@laerdal/life-react-components 3.0.1-dev.13.full → 3.0.1-dev.14.full
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/AccordionItem.cjs +2 -2
- package/dist/Accordion/AccordionItem.cjs.map +1 -1
- package/dist/Accordion/AccordionItem.js +3 -3
- package/dist/Accordion/AccordionItem.js.map +1 -1
- package/dist/Accordion/index.cjs +46 -4
- package/dist/Accordion/index.cjs.map +1 -1
- package/dist/Accordion/index.d.ts +4 -1
- package/dist/Accordion/index.js +4 -1
- package/dist/Accordion/index.js.map +1 -1
- package/dist/Accordion/styles.cjs +6 -6
- package/dist/Accordion/styles.cjs.map +1 -1
- package/dist/Accordion/styles.d.ts +2 -2
- package/dist/Accordion/styles.js +3 -3
- package/dist/Accordion/styles.js.map +1 -1
- package/dist/AuthPage/AuthPage.cjs +4 -3
- package/dist/AuthPage/AuthPage.cjs.map +1 -1
- package/dist/AuthPage/AuthPage.d.ts +2 -1
- package/dist/AuthPage/AuthPage.js +2 -2
- package/dist/AuthPage/AuthPage.js.map +1 -1
- package/dist/AuthPage/index.cjs +31 -3
- package/dist/AuthPage/index.cjs.map +1 -1
- package/dist/AuthPage/index.d.ts +4 -3
- package/dist/AuthPage/index.js +4 -3
- package/dist/AuthPage/index.js.map +1 -1
- package/dist/Banners/Banner.cjs +16 -11
- package/dist/Banners/Banner.cjs.map +1 -1
- package/dist/Banners/Banner.d.ts +33 -1
- package/dist/Banners/Banner.js +10 -10
- package/dist/Banners/Banner.js.map +1 -1
- package/dist/Banners/OverviewBanner.cjs +7 -5
- package/dist/Banners/OverviewBanner.cjs.map +1 -1
- package/dist/Banners/OverviewBanner.d.ts +8 -2
- package/dist/Banners/OverviewBanner.js +4 -4
- package/dist/Banners/OverviewBanner.js.map +1 -1
- package/dist/Banners/index.cjs +31 -3
- package/dist/Banners/index.cjs.map +1 -1
- package/dist/Banners/index.d.ts +4 -3
- package/dist/Banners/index.js +4 -5
- package/dist/Banners/index.js.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.cjs +2 -2
- package/dist/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +3 -3
- package/dist/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/Breadcrumb/index.cjs +42 -2
- package/dist/Breadcrumb/index.cjs.map +1 -1
- package/dist/Breadcrumb/index.d.ts +3 -0
- package/dist/Breadcrumb/index.js +3 -0
- package/dist/Breadcrumb/index.js.map +1 -1
- package/dist/Breadcrumb/styles.cjs +5 -5
- package/dist/Breadcrumb/styles.cjs.map +1 -1
- package/dist/Breadcrumb/styles.d.ts +2 -2
- package/dist/Breadcrumb/styles.js +2 -2
- package/dist/Breadcrumb/styles.js.map +1 -1
- package/dist/Button/BackButton.cjs +2 -2
- package/dist/Button/BackButton.cjs.map +1 -1
- package/dist/Button/BackButton.d.ts +1 -1
- package/dist/Button/BackButton.js +2 -2
- package/dist/Button/BackButton.js.map +1 -1
- package/dist/Button/DualFunctionButton.cjs +3 -3
- package/dist/Button/DualFunctionButton.cjs.map +1 -1
- package/dist/Button/DualFunctionButton.js +4 -4
- package/dist/Button/DualFunctionButton.js.map +1 -1
- package/dist/Button/Iconbutton.cjs +10 -10
- package/dist/Button/Iconbutton.cjs.map +1 -1
- package/dist/Button/Iconbutton.d.ts +1 -1
- package/dist/Button/Iconbutton.js +8 -8
- package/dist/Button/Iconbutton.js.map +1 -1
- package/dist/Button/index.cjs +57 -5
- package/dist/Button/index.cjs.map +1 -1
- package/dist/Button/index.d.ts +4 -0
- package/dist/Button/index.js +4 -0
- package/dist/Button/index.js.map +1 -1
- package/dist/Card/VerticalCard/Card.cjs +7 -7
- package/dist/Card/VerticalCard/Card.cjs.map +1 -1
- package/dist/Card/VerticalCard/Card.d.ts +2 -2
- package/dist/Card/VerticalCard/Card.js +4 -4
- package/dist/Card/VerticalCard/Card.js.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.cjs +21 -21
- package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.d.ts +7 -7
- package/dist/Card/VerticalCard/CardBottomSection.js +13 -13
- package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.cjs +11 -11
- package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.d.ts +3 -3
- package/dist/Card/VerticalCard/CardMiddleSection.js +7 -7
- package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.cjs +13 -13
- package/dist/Card/VerticalCard/CardTopSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.d.ts +4 -4
- package/dist/Card/VerticalCard/CardTopSection.js +8 -8
- package/dist/Card/VerticalCard/CardTopSection.js.map +1 -1
- package/dist/Chips/index.cjs +19 -0
- package/dist/Chips/index.cjs.map +1 -1
- package/dist/Chips/index.d.ts +1 -0
- package/dist/Chips/index.js +1 -0
- package/dist/Chips/index.js.map +1 -1
- package/dist/Dropdown/BasicDropdown.cjs +3 -3
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.d.ts +5 -5
- package/dist/Dropdown/BasicDropdown.js +4 -4
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/CommonStyling.cjs +19 -19
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.d.ts +9 -9
- package/dist/Dropdown/CommonStyling.js +9 -9
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownButton.cjs +9 -8
- package/dist/Dropdown/DropdownButton.cjs.map +1 -1
- package/dist/Dropdown/DropdownButton.d.ts +1 -0
- package/dist/Dropdown/DropdownButton.js +8 -8
- package/dist/Dropdown/DropdownButton.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +18 -16
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.d.ts +10 -1
- package/dist/Dropdown/DropdownContent.js +15 -15
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +3 -3
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.d.ts +1 -1
- package/dist/Dropdown/DropdownFilter.js +4 -4
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Dropdown/index.cjs +57 -5
- package/dist/Dropdown/index.cjs.map +1 -1
- package/dist/Dropdown/index.d.ts +4 -0
- package/dist/Dropdown/index.js +4 -0
- package/dist/Dropdown/index.js.map +1 -1
- package/dist/ProfileButton/ProfileButton.cjs +1 -1
- package/dist/ProfileButton/ProfileButton.cjs.map +1 -1
- package/dist/ProfileButton/ProfileButton.js +2 -2
- package/dist/ProfileButton/ProfileButton.js.map +1 -1
- package/dist/Table/Table.cjs +18 -6
- package/dist/Table/Table.cjs.map +1 -1
- package/dist/Table/Table.js +18 -6
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableStyles.cjs +4 -1
- package/dist/Table/TableStyles.cjs.map +1 -1
- package/dist/Table/TableStyles.d.ts +3 -1
- package/dist/Table/TableStyles.js +4 -1
- package/dist/Table/TableStyles.js.map +1 -1
- package/dist/Table/TableTypes.cjs.map +1 -1
- package/dist/Table/TableTypes.d.ts +2 -0
- package/dist/Table/TableTypes.js.map +1 -1
- package/dist/Toggles/ToggleButton.cjs +1 -1
- package/dist/Toggles/ToggleButton.cjs.map +1 -1
- package/dist/Toggles/ToggleButton.js +2 -2
- package/dist/Toggles/ToggleButton.js.map +1 -1
- package/dist/styles/z-indexes.cjs +1 -0
- package/dist/styles/z-indexes.cjs.map +1 -1
- package/dist/styles/z-indexes.d.ts +1 -0
- package/dist/styles/z-indexes.js +1 -0
- package/dist/styles/z-indexes.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableStyles.cjs","names":["TableWrapper","styled","div","COLORS","neutral_200","StyledTable","table","StyledTableHeader","StyledTableHeaderTitle","StyledTableHeaderTitleContent","ComponentLStyling","ComponentTextStyle","Bold","black","StyledTableHeaderRow","thead","StyledTableHeaderColumns","tr","StyledTableHeaderColumnContent","StyledTableHeaderColumnSortDirection","span","StyledTableHeaderColumn","th","ComponentSStyling","neutral_600","white","primary_20","primary_700","Z_INDEXES","hover","primary_100","primary_800","active","focusStyles","neutral_20","StyledTableBodyRow","StyledTableNoRowsLabelRow","neutral_50","StyledTableBody","tbody","StyledTableCell","td","StyledTableCellContent","Regular","StyledCheckBox","StyledTableCellIcon","neutral_700","StyledTableCellText","StyledTableFooter","StyledTableFooterContent","StyledTableFooterCurrentInfo","ComponentXSStyling","StyledTableFooterControls","StyledTableSpinner","backdrop","StyledTableFooterCollapseButton","button","ComponentMStyling","StyledTableBodyWrapper","scrollBarStyling","Size","Small"],"sources":["../../src/Table/TableStyles.ts"],"sourcesContent":["/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\n\n/**\n * Import custom style properties.\n */\nimport {COLORS, focusStyles, scrollBarStyling} from '../styles';\nimport {\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling\n} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {StyledCheckBox} from '../InputFields/Checkbox';\nimport {Size} from \"../types\";\n\n/**\n * Table styles\n */\n\nexport const TableWrapper = styled.div`\n position: relative;\n\n &.border{\n border-left: 1px solid ${COLORS.neutral_200};\n border-right: 1px solid ${COLORS.neutral_200};\n }\n`;\n\n\nexport const StyledTable = styled.table`\n background: transparent;\n border-collapse: collapse;\n width: 100%;\n\n &.fixed {\n table-layout: fixed;\n }\n\n &.auto {\n table-layout: auto;\n }\n`;\n\nexport const StyledTableHeader = styled.div`\n`;\n\nexport const StyledTableHeaderTitle = styled.div`\n`;\n\nexport const StyledTableHeaderTitleContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n box-sizing: border-box;\n min-height: 56px;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 2px solid ${COLORS.neutral_200};\n padding: 0 16px;\n\n ${ComponentLStyling(ComponentTextStyle.Bold, COLORS.black)}\n .title-menu {\n margin-right: -16px;\n }\n`;\n\nexport const StyledTableHeaderRow = styled.thead`\n`;\n\nexport const StyledTableHeaderColumns = styled.tr`\n`;\n\nexport const StyledTableHeaderColumnContent = styled.div`\n box-sizing: border-box;\n min-height: 56px;\n padding: 0 16px;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-top: 1px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n`;\n\nexport const StyledTableHeaderColumnSortDirection = styled.span`\n width: 24px;\n height: 24px;\n`;\n\nexport const StyledTableHeaderColumn = styled.th`\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n position: relative;\n text-align: unset;\n background-color: ${COLORS.white};\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:active {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n z-index: ${Z_INDEXES.active};\n }\n\n &:focus {\n ${focusStyles}\n }\n }\n\n &.left {\n & > div {\n justify-content: left;\n }\n }\n\n &.right {\n & > div {\n justify-content: right;\n }\n }\n\n &.center {\n & > div {\n justify-content: center;\n }\n }\n\n &.sortable ${StyledTableHeaderColumnContent} > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ${StyledTableHeaderColumnContent} > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ${COLORS.neutral_20};\n }\n`;\n\nexport const StyledTableBodyRow = styled.tr`\n cursor: pointer;\n position: relative;\n outline: none;\n background-color: ${COLORS.white};\n \n &:not(:last-child) {\n border-bottom: 1px solid ${COLORS.neutral_200};\n }\n\n &.selected{\n background-color: ${COLORS.primary_100};\n }\n \n &:hover {\n background-color: ${COLORS.primary_100};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n }\n\n`;\n\nexport const StyledTableNoRowsLabelRow = styled.tr`\n position: relative;\n outline: none;\n background-color: ${COLORS.neutral_50};\n`;\n\nexport const StyledTableBody = styled.tbody`\n`;\n\n\nexport const StyledTableCell = styled.td``;\n\nexport const StyledTableCellContent = styled.div`\n min-height: 48px;\n\n padding: 0 16px;\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n display: flex;\n align-items: center;\n justify-content: left;\n gap: 8px;\n\n &.truncate-text,\n &.truncate-text span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &.left {\n justify-content: left;\n }\n\n &.right {\n justify-content: right;\n }\n\n &.center {\n justify-content: center;\n }\n\n a:first-letter,\n span:first-letter {\n text-transform: uppercase;\n }\n \n ${StyledCheckBox}{\n width: fit-content;\n }\n`;\n\nexport const StyledTableCellIcon = styled.div`\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n\n svg {\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const StyledTableCellText = styled.span`\n padding: 12px 0;\n`;\n\n\nexport const StyledTableFooter = styled.div`\n`;\n\nexport const StyledTableFooterContent = styled.div`\n border-top: 2px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n`;\n\nexport const StyledTableFooterCurrentInfo = styled.span`\n padding: 0 16px;\n ${ComponentXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n`;\n\nexport const StyledTableFooterControls = styled.div`\n display: flex;\n`;\n\nexport const StyledTableSpinner = styled.div`\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ${Z_INDEXES.backdrop};\n`;\n\nexport const StyledTableFooterCollapseButton = styled.button`\n position: relative;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 1px solid ${COLORS.neutral_200};\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ${COLORS.white};\n\n cursor: pointer;\n\n ${ComponentMStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n \n &:focus {\n ${focusStyles}\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &:disabled {\n display: none;\n }\n\n`;\n\n\nexport const StyledTableBodyWrapper = styled.div`\n overflow-x: auto;\n ${scrollBarStyling(Size.Small)}\n\n ::-webkit-scrollbar-track {\n margin: 6px;\n }\n\n &.scrollable{\n margin-bottom: 6px;\n padding-bottom: 10px;\n }\n`;\n"],"mappings":";;;;;;;;AAGA;AAKA;AACA;AAOA;AACA;AACA;AAA8B;AAE9B;AACA;AACA;;AAEO,IAAMA,YAAY,GAAGC,yBAAM,CAACC,GAAG,sMAITC,cAAM,CAACC,WAAW,EACjBD,cAAM,CAACC,WAAW,CAE/C;AAAC;AAGK,IAAMC,WAAW,GAAGJ,yBAAM,CAACK,KAAK,2PAYtC;AAAC;AAEK,IAAMC,iBAAiB,GAAGN,yBAAM,CAACC,GAAG,uFAC1C;AAAC;AAEK,IAAMM,sBAAsB,GAAGP,yBAAM,CAACC,GAAG,uFAC/C;AAAC;AAEK,IAAMO,6BAA6B,GAAGR,yBAAM,CAACC,GAAG,oXAO1BC,c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BvB,cAAM,CAACwB,WAAW,EAIhBC,mBAAS,CAACI,MAAM,EACb7B,cAAM,CAAC2B,WAAW,EACvB3B,cAAM,CAAC4B,WAAW,CAO9B;AAAC;AAGK,IAAM2B,sBAAsB,GAAGzD,yBAAM,CAACC,GAAG,2PAE5C,IAAAyD,wBAAgB,EAACC,WAAI,CAACC,KAAK,CAAC,CAU/B;AAAC"}
|
|
1
|
+
{"version":3,"file":"TableStyles.cjs","names":["TableWrapper","styled","div","COLORS","neutral_200","StyledTable","table","StyledTableHeader","StyledTableHeaderTitle","StyledTableHeaderTitleContent","ComponentLStyling","ComponentTextStyle","Bold","black","StyledTableHeaderRow","thead","StyledTableHeaderColumns","tr","StyledTableHeaderColumnContent","StyledTableHeaderColumnSortDirection","span","StyledTableHeaderColumn","th","ComponentSStyling","neutral_600","white","primary_20","primary_700","Z_INDEXES","hover","primary_100","primary_800","active","focusStyles","neutral_20","StyledTableBodyRow","StyledTableNoRowsLabelRow","neutral_50","StyledTableBody","tbody","StyledTableCell","td","StyledTableCellContent","Regular","StyledCheckBox","StyledTableCellIcon","neutral_700","StyledTableCellText","StyledTableFooter","StyledTableFooterContent","StyledTableFooterCurrentInfo","ComponentXSStyling","StyledTableFooterControls","StyledTableSpinner","props","zindex","loader","StyledTableFooterCollapseButton","button","ComponentMStyling","StyledTableBodyWrapper","scrollBarStyling","Size","Small"],"sources":["../../src/Table/TableStyles.ts"],"sourcesContent":["/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\n\n/**\n * Import custom style properties.\n */\nimport {COLORS, focusStyles, scrollBarStyling} from '../styles';\nimport {\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling\n} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {StyledCheckBox} from '../InputFields/Checkbox';\nimport {Size} from \"../types\";\n\n/**\n * Table styles\n */\n\nexport const TableWrapper = styled.div`\n position: relative;\n\n &.border{\n border-left: 1px solid ${COLORS.neutral_200};\n border-right: 1px solid ${COLORS.neutral_200};\n }\n`;\n\n\nexport const StyledTable = styled.table`\n background: transparent;\n border-collapse: collapse;\n width: 100%;\n\n &.fixed {\n table-layout: fixed;\n }\n\n &.auto {\n table-layout: auto;\n }\n`;\n\nexport const StyledTableHeader = styled.div`\n`;\n\nexport const StyledTableHeaderTitle = styled.div`\n`;\n\nexport const StyledTableHeaderTitleContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n box-sizing: border-box;\n min-height: 56px;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 2px solid ${COLORS.neutral_200};\n padding: 0 16px;\n\n ${ComponentLStyling(ComponentTextStyle.Bold, COLORS.black)}\n .title-menu {\n margin-right: -16px;\n }\n`;\n\nexport const StyledTableHeaderRow = styled.thead`\n`;\n\nexport const StyledTableHeaderColumns = styled.tr`\n`;\n\nexport const StyledTableHeaderColumnContent = styled.div`\n box-sizing: border-box;\n min-height: 56px;\n padding: 0 16px;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-top: 1px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n`;\n\nexport const StyledTableHeaderColumnSortDirection = styled.span`\n width: 24px;\n height: 24px;\n`;\n\nexport const StyledTableHeaderColumn = styled.th`\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n position: relative;\n text-align: unset;\n background-color: ${COLORS.white};\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:active {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n z-index: ${Z_INDEXES.active};\n }\n\n &:focus {\n ${focusStyles}\n }\n }\n\n &.left {\n & > div {\n justify-content: left;\n }\n }\n\n &.right {\n & > div {\n justify-content: right;\n }\n }\n\n &.center {\n & > div {\n justify-content: center;\n }\n }\n\n &.sortable ${StyledTableHeaderColumnContent} > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ${StyledTableHeaderColumnContent} > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ${COLORS.neutral_20};\n }\n`;\n\nexport const StyledTableBodyRow = styled.tr`\n cursor: pointer;\n position: relative;\n outline: none;\n background-color: ${COLORS.white};\n \n &:not(:last-child) {\n border-bottom: 1px solid ${COLORS.neutral_200};\n }\n\n &.selected{\n background-color: ${COLORS.primary_100};\n }\n \n &:hover {\n background-color: ${COLORS.primary_100};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n }\n\n`;\n\nexport const StyledTableNoRowsLabelRow = styled.tr`\n position: relative;\n outline: none;\n background-color: ${COLORS.neutral_50};\n`;\n\nexport const StyledTableBody = styled.tbody`\n`;\n\n\nexport const StyledTableCell = styled.td``;\n\nexport const StyledTableCellContent = styled.div`\n min-height: 48px;\n\n padding: 0 16px;\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n display: flex;\n align-items: center;\n justify-content: left;\n gap: 8px;\n\n &.truncate-text,\n &.truncate-text span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &.left {\n justify-content: left;\n }\n\n &.right {\n justify-content: right;\n }\n\n &.center {\n justify-content: center;\n }\n\n a:first-letter,\n span:first-letter {\n text-transform: uppercase;\n }\n \n ${StyledCheckBox}{\n width: fit-content;\n }\n`;\n\nexport const StyledTableCellIcon = styled.div`\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n\n svg {\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const StyledTableCellText = styled.span`\n padding: 12px 0;\n`;\n\n\nexport const StyledTableFooter = styled.div`\n`;\n\nexport const StyledTableFooterContent = styled.div`\n border-top: 2px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n`;\n\nexport const StyledTableFooterCurrentInfo = styled.span`\n padding: 0 16px;\n ${ComponentXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n`;\n\nexport const StyledTableFooterControls = styled.div`\n display: flex;\n`;\n\nexport const StyledTableSpinner = styled.div<{zindex?: string}>`\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ${(props) => (props.zindex ?? Z_INDEXES.loader)};\n`;\n\nexport const StyledTableFooterCollapseButton = styled.button`\n position: relative;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 1px solid ${COLORS.neutral_200};\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ${COLORS.white};\n\n cursor: pointer;\n\n ${ComponentMStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n \n &:focus {\n ${focusStyles}\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &:disabled {\n display: none;\n }\n\n`;\n\n\nexport const StyledTableBodyWrapper = styled.div`\n overflow-x: auto;\n ${scrollBarStyling(Size.Small)}\n\n ::-webkit-scrollbar-track {\n margin: 6px;\n }\n\n &.scrollable{\n margin-bottom: 6px;\n padding-bottom: 10px;\n }\n`;\n"],"mappings":";;;;;;;;AAGA;AAKA;AACA;AAOA;AACA;AACA;AAA8B;AAE9B;AACA;AACA;;AAEO,IAAMA,YAAY,GAAGC,yBAAM,CAACC,GAAG,sMAITC,cAAM,CAACC,WAAW,EACjBD,cAAM,CAACC,WAAW,CAE/C;AAAC;AAGK,IAAMC,WAAW,GAAGJ,yBA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AAMC,+BAA+B,GAAGxD,yBAAM,CAACyD,MAAM,upBAE/BvD,cAAM,CAACC,WAAW,EACrBD,cAAM,CAACC,WAAW,EAU5BD,cAAM,CAACsB,KAAK,EAIxB,IAAAkC,6BAAiB,EAAChD,8BAAkB,CAACC,IAAI,EAAET,cAAM,CAACqB,WAAW,CAAC,EAG5DS,mBAAW,EAIFL,mBAAS,CAACC,KAAK,EACZ1B,cAAM,CAACuB,UAAU,EACtBvB,cAAM,CAACwB,WAAW,EAIhBC,mBAAS,CAACI,MAAM,EACb7B,cAAM,CAAC2B,WAAW,EACvB3B,cAAM,CAAC4B,WAAW,CAO9B;AAAC;AAGK,IAAM6B,sBAAsB,GAAG3D,yBAAM,CAACC,GAAG,2PAE5C,IAAA2D,wBAAgB,EAACC,WAAI,CAACC,KAAK,CAAC,CAU/B;AAAC"}
|
|
@@ -22,6 +22,8 @@ export declare const StyledTableFooter: import("styled-components").StyledCompon
|
|
|
22
22
|
export declare const StyledTableFooterContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
23
23
|
export declare const StyledTableFooterCurrentInfo: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
24
24
|
export declare const StyledTableFooterControls: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
25
|
-
export declare const StyledTableSpinner: import("styled-components").StyledComponent<"div", any, {
|
|
25
|
+
export declare const StyledTableSpinner: import("styled-components").StyledComponent<"div", any, {
|
|
26
|
+
zindex?: string | undefined;
|
|
27
|
+
}, never>;
|
|
26
28
|
export declare const StyledTableFooterCollapseButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
27
29
|
export declare const StyledTableBodyWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -39,7 +39,10 @@ export var StyledTableFooter = styled.div(_templateObject18 || (_templateObject1
|
|
|
39
39
|
export var StyledTableFooterContent = styled.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n border-top: 2px solid ", ";\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n"])), COLORS.neutral_200, COLORS.neutral_200);
|
|
40
40
|
export var StyledTableFooterCurrentInfo = styled.span(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n padding: 0 16px;\n ", "\n"])), ComponentXSStyling(ComponentTextStyle.Regular, COLORS.black));
|
|
41
41
|
export var StyledTableFooterControls = styled.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
42
|
-
export var StyledTableSpinner = styled.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ", ";\n"])),
|
|
42
|
+
export var StyledTableSpinner = styled.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ", ";\n"])), function (props) {
|
|
43
|
+
var _props$zindex;
|
|
44
|
+
return (_props$zindex = props.zindex) !== null && _props$zindex !== void 0 ? _props$zindex : Z_INDEXES.loader;
|
|
45
|
+
});
|
|
43
46
|
export var StyledTableFooterCollapseButton = styled.button(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n position: relative;\n border-bottom: 1px solid ", ";\n border-top: 1px solid ", ";\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ", ";\n\n cursor: pointer;\n\n ", "\n \n &:focus {\n ", "\n }\n\n &:hover {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:active {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:disabled {\n display: none;\n }\n\n"])), COLORS.neutral_200, COLORS.neutral_200, COLORS.white, ComponentMStyling(ComponentTextStyle.Bold, COLORS.neutral_600), focusStyles, Z_INDEXES.hover, COLORS.primary_20, COLORS.primary_700, Z_INDEXES.active, COLORS.primary_100, COLORS.primary_800);
|
|
44
47
|
export var StyledTableBodyWrapper = styled.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n overflow-x: auto;\n ", "\n\n ::-webkit-scrollbar-track {\n margin: 6px;\n }\n\n &.scrollable{\n margin-bottom: 6px;\n padding-bottom: 10px;\n }\n"])), scrollBarStyling(Size.Small));
|
|
45
48
|
//# sourceMappingURL=TableStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableStyles.js","names":["styled","COLORS","focusStyles","scrollBarStyling","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","Z_INDEXES","StyledCheckBox","Size","TableWrapper","div","neutral_200","StyledTable","table","StyledTableHeader","StyledTableHeaderTitle","StyledTableHeaderTitleContent","Bold","black","StyledTableHeaderRow","thead","StyledTableHeaderColumns","tr","StyledTableHeaderColumnContent","StyledTableHeaderColumnSortDirection","span","StyledTableHeaderColumn","th","neutral_600","white","primary_20","primary_700","hover","primary_100","primary_800","active","neutral_20","StyledTableBodyRow","StyledTableNoRowsLabelRow","neutral_50","StyledTableBody","tbody","StyledTableCell","td","StyledTableCellContent","Regular","StyledTableCellIcon","neutral_700","StyledTableCellText","StyledTableFooter","StyledTableFooterContent","StyledTableFooterCurrentInfo","StyledTableFooterControls","StyledTableSpinner","backdrop","StyledTableFooterCollapseButton","button","StyledTableBodyWrapper","Small"],"sources":["../../src/Table/TableStyles.ts"],"sourcesContent":["/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\n\n/**\n * Import custom style properties.\n */\nimport {COLORS, focusStyles, scrollBarStyling} from '../styles';\nimport {\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling\n} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {StyledCheckBox} from '../InputFields/Checkbox';\nimport {Size} from \"../types\";\n\n/**\n * Table styles\n */\n\nexport const TableWrapper = styled.div`\n position: relative;\n\n &.border{\n border-left: 1px solid ${COLORS.neutral_200};\n border-right: 1px solid ${COLORS.neutral_200};\n }\n`;\n\n\nexport const StyledTable = styled.table`\n background: transparent;\n border-collapse: collapse;\n width: 100%;\n\n &.fixed {\n table-layout: fixed;\n }\n\n &.auto {\n table-layout: auto;\n }\n`;\n\nexport const StyledTableHeader = styled.div`\n`;\n\nexport const StyledTableHeaderTitle = styled.div`\n`;\n\nexport const StyledTableHeaderTitleContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n box-sizing: border-box;\n min-height: 56px;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 2px solid ${COLORS.neutral_200};\n padding: 0 16px;\n\n ${ComponentLStyling(ComponentTextStyle.Bold, COLORS.black)}\n .title-menu {\n margin-right: -16px;\n }\n`;\n\nexport const StyledTableHeaderRow = styled.thead`\n`;\n\nexport const StyledTableHeaderColumns = styled.tr`\n`;\n\nexport const StyledTableHeaderColumnContent = styled.div`\n box-sizing: border-box;\n min-height: 56px;\n padding: 0 16px;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-top: 1px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n`;\n\nexport const StyledTableHeaderColumnSortDirection = styled.span`\n width: 24px;\n height: 24px;\n`;\n\nexport const StyledTableHeaderColumn = styled.th`\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n position: relative;\n text-align: unset;\n background-color: ${COLORS.white};\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:active {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n z-index: ${Z_INDEXES.active};\n }\n\n &:focus {\n ${focusStyles}\n }\n }\n\n &.left {\n & > div {\n justify-content: left;\n }\n }\n\n &.right {\n & > div {\n justify-content: right;\n }\n }\n\n &.center {\n & > div {\n justify-content: center;\n }\n }\n\n &.sortable ${StyledTableHeaderColumnContent} > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ${StyledTableHeaderColumnContent} > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ${COLORS.neutral_20};\n }\n`;\n\nexport const StyledTableBodyRow = styled.tr`\n cursor: pointer;\n position: relative;\n outline: none;\n background-color: ${COLORS.white};\n \n &:not(:last-child) {\n border-bottom: 1px solid ${COLORS.neutral_200};\n }\n\n &.selected{\n background-color: ${COLORS.primary_100};\n }\n \n &:hover {\n background-color: ${COLORS.primary_100};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n }\n\n`;\n\nexport const StyledTableNoRowsLabelRow = styled.tr`\n position: relative;\n outline: none;\n background-color: ${COLORS.neutral_50};\n`;\n\nexport const StyledTableBody = styled.tbody`\n`;\n\n\nexport const StyledTableCell = styled.td``;\n\nexport const StyledTableCellContent = styled.div`\n min-height: 48px;\n\n padding: 0 16px;\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n display: flex;\n align-items: center;\n justify-content: left;\n gap: 8px;\n\n &.truncate-text,\n &.truncate-text span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &.left {\n justify-content: left;\n }\n\n &.right {\n justify-content: right;\n }\n\n &.center {\n justify-content: center;\n }\n\n a:first-letter,\n span:first-letter {\n text-transform: uppercase;\n }\n \n ${StyledCheckBox}{\n width: fit-content;\n }\n`;\n\nexport const StyledTableCellIcon = styled.div`\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n\n svg {\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const StyledTableCellText = styled.span`\n padding: 12px 0;\n`;\n\n\nexport const StyledTableFooter = styled.div`\n`;\n\nexport const StyledTableFooterContent = styled.div`\n border-top: 2px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n`;\n\nexport const StyledTableFooterCurrentInfo = styled.span`\n padding: 0 16px;\n ${ComponentXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n`;\n\nexport const StyledTableFooterControls = styled.div`\n display: flex;\n`;\n\nexport const StyledTableSpinner = styled.div`\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ${Z_INDEXES.backdrop};\n`;\n\nexport const StyledTableFooterCollapseButton = styled.button`\n position: relative;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 1px solid ${COLORS.neutral_200};\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ${COLORS.white};\n\n cursor: pointer;\n\n ${ComponentMStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n \n &:focus {\n ${focusStyles}\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &:disabled {\n display: none;\n }\n\n`;\n\n\nexport const StyledTableBodyWrapper = styled.div`\n overflow-x: auto;\n ${scrollBarStyling(Size.Small)}\n\n ::-webkit-scrollbar-track {\n margin: 6px;\n }\n\n &.scrollable{\n margin-bottom: 6px;\n padding-bottom: 10px;\n }\n`;\n"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,mBAAmB;;AAEtC;AACA;AACA;AACA,SAAQC,MAAM,EAAEC,WAAW,EAAEC,gBAAgB,QAAO,WAAW;AAC/D,SACEC,iBAAiB,EACjB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BAAkB,CAACyC,OAAO,EAAE/C,MAAM,CAACoB,KAAK,CAAC,CAC/D;AAED,OAAO,IAAMkC,yBAAyB,GAAGvD,MAAM,CAACa,GAAG,6FAElD;AAED,OAAO,IAAM2C,kBAAkB,GAAGxD,MAAM,CAACa,GAAG,iNAM/BJ,SAAS,CAACgD,QAAQ,CAC9B;AAED,OAAO,IAAMC,+BAA+B,GAAG1D,MAAM,CAAC2D,MAAM,yoBAE/B1D,MAAM,CAACa,WAAW,EACrBb,MAAM,CAACa,WAAW,EAU5Bb,MAAM,CAAC+B,KAAK,EAIxB3B,iBAAiB,CAACE,kBAAkB,CAACa,IAAI,EAAEnB,MAAM,CAAC8B,WAAW,CAAC,EAG5D7B,WAAW,EAIFO,SAAS,CAAC0B,KAAK,EACZlC,MAAM,CAACgC,UAAU,EACtBhC,MAAM,CAACiC,WAAW,EAIhBzB,SAAS,CAAC6B,MAAM,EACbrC,MAAM,CAACmC,WAAW,EACvBnC,MAAM,CAACoC,WAAW,CAO9B;AAGD,OAAO,IAAMuB,sBAAsB,GAAG5D,MAAM,CAACa,GAAG,6OAE5CV,gBAAgB,CAACQ,IAAI,CAACkD,KAAK,CAAC,CAU/B"}
|
|
1
|
+
{"version":3,"file":"TableStyles.js","names":["styled","COLORS","focusStyles","scrollBarStyling","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","Z_INDEXES","StyledCheckBox","Size","TableWrapper","div","neutral_200","StyledTable","table","StyledTableHeader","StyledTableHeaderTitle","StyledTableHeaderTitleContent","Bold","black","StyledTableHeaderRow","thead","StyledTableHeaderColumns","tr","StyledTableHeaderColumnContent","StyledTableHeaderColumnSortDirection","span","StyledTableHeaderColumn","th","neutral_600","white","primary_20","primary_700","hover","primary_100","primary_800","active","neutral_20","StyledTableBodyRow","StyledTableNoRowsLabelRow","neutral_50","StyledTableBody","tbody","StyledTableCell","td","StyledTableCellContent","Regular","StyledTableCellIcon","neutral_700","StyledTableCellText","StyledTableFooter","StyledTableFooterContent","StyledTableFooterCurrentInfo","StyledTableFooterControls","StyledTableSpinner","props","zindex","loader","StyledTableFooterCollapseButton","button","StyledTableBodyWrapper","Small"],"sources":["../../src/Table/TableStyles.ts"],"sourcesContent":["/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\n\n/**\n * Import custom style properties.\n */\nimport {COLORS, focusStyles, scrollBarStyling} from '../styles';\nimport {\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling\n} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {StyledCheckBox} from '../InputFields/Checkbox';\nimport {Size} from \"../types\";\n\n/**\n * Table styles\n */\n\nexport const TableWrapper = styled.div`\n position: relative;\n\n &.border{\n border-left: 1px solid ${COLORS.neutral_200};\n border-right: 1px solid ${COLORS.neutral_200};\n }\n`;\n\n\nexport const StyledTable = styled.table`\n background: transparent;\n border-collapse: collapse;\n width: 100%;\n\n &.fixed {\n table-layout: fixed;\n }\n\n &.auto {\n table-layout: auto;\n }\n`;\n\nexport const StyledTableHeader = styled.div`\n`;\n\nexport const StyledTableHeaderTitle = styled.div`\n`;\n\nexport const StyledTableHeaderTitleContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n box-sizing: border-box;\n min-height: 56px;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 2px solid ${COLORS.neutral_200};\n padding: 0 16px;\n\n ${ComponentLStyling(ComponentTextStyle.Bold, COLORS.black)}\n .title-menu {\n margin-right: -16px;\n }\n`;\n\nexport const StyledTableHeaderRow = styled.thead`\n`;\n\nexport const StyledTableHeaderColumns = styled.tr`\n`;\n\nexport const StyledTableHeaderColumnContent = styled.div`\n box-sizing: border-box;\n min-height: 56px;\n padding: 0 16px;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-top: 1px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n`;\n\nexport const StyledTableHeaderColumnSortDirection = styled.span`\n width: 24px;\n height: 24px;\n`;\n\nexport const StyledTableHeaderColumn = styled.th`\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n position: relative;\n text-align: unset;\n background-color: ${COLORS.white};\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:active {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n z-index: ${Z_INDEXES.active};\n }\n\n &:focus {\n ${focusStyles}\n }\n }\n\n &.left {\n & > div {\n justify-content: left;\n }\n }\n\n &.right {\n & > div {\n justify-content: right;\n }\n }\n\n &.center {\n & > div {\n justify-content: center;\n }\n }\n\n &.sortable ${StyledTableHeaderColumnContent} > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ${StyledTableHeaderColumnContent} > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ${COLORS.neutral_20};\n }\n`;\n\nexport const StyledTableBodyRow = styled.tr`\n cursor: pointer;\n position: relative;\n outline: none;\n background-color: ${COLORS.white};\n \n &:not(:last-child) {\n border-bottom: 1px solid ${COLORS.neutral_200};\n }\n\n &.selected{\n background-color: ${COLORS.primary_100};\n }\n \n &:hover {\n background-color: ${COLORS.primary_100};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n }\n\n`;\n\nexport const StyledTableNoRowsLabelRow = styled.tr`\n position: relative;\n outline: none;\n background-color: ${COLORS.neutral_50};\n`;\n\nexport const StyledTableBody = styled.tbody`\n`;\n\n\nexport const StyledTableCell = styled.td``;\n\nexport const StyledTableCellContent = styled.div`\n min-height: 48px;\n\n padding: 0 16px;\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n display: flex;\n align-items: center;\n justify-content: left;\n gap: 8px;\n\n &.truncate-text,\n &.truncate-text span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &.left {\n justify-content: left;\n }\n\n &.right {\n justify-content: right;\n }\n\n &.center {\n justify-content: center;\n }\n\n a:first-letter,\n span:first-letter {\n text-transform: uppercase;\n }\n \n ${StyledCheckBox}{\n width: fit-content;\n }\n`;\n\nexport const StyledTableCellIcon = styled.div`\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n\n svg {\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const StyledTableCellText = styled.span`\n padding: 12px 0;\n`;\n\n\nexport const StyledTableFooter = styled.div`\n`;\n\nexport const StyledTableFooterContent = styled.div`\n border-top: 2px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n`;\n\nexport const StyledTableFooterCurrentInfo = styled.span`\n padding: 0 16px;\n ${ComponentXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n`;\n\nexport const StyledTableFooterControls = styled.div`\n display: flex;\n`;\n\nexport const StyledTableSpinner = styled.div<{zindex?: string}>`\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ${(props) => (props.zindex ?? Z_INDEXES.loader)};\n`;\n\nexport const StyledTableFooterCollapseButton = styled.button`\n position: relative;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 1px solid ${COLORS.neutral_200};\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ${COLORS.white};\n\n cursor: pointer;\n\n ${ComponentMStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n \n &:focus {\n ${focusStyles}\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &:disabled {\n display: none;\n }\n\n`;\n\n\nexport const StyledTableBodyWrapper = styled.div`\n overflow-x: auto;\n ${scrollBarStyling(Size.Small)}\n\n ::-webkit-scrollbar-track {\n margin: 6px;\n }\n\n &.scrollable{\n margin-bottom: 6px;\n padding-bottom: 10px;\n }\n`;\n"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,mBAAmB;;AAEtC;AACA;AACA;AACA,SAAQC,MAAM,EAAEC,WAAW,EAAEC,gBAAgB,QAAO,WAAW;AAC/D,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,kBAAkB,QACb,sBAAsB;AAC7B,SAAQC,SAAS,QAAO,qBAAqB;AAC7C,SAAQC,cAAc,QAAO,yBAAyB;AACtD,SAAQC,IAAI,QAAO,UAAU;;AAE7B;AACA;AACA;;AAEA,OAAO,IAAMC,YAAY,GAAGZ,MAAM,CAACa,GAAG,wLAITZ,MAAM,CAACa,WAAW,EACjBb,MAAM,CAACa,WAAW,CAE/C;AAGD,OAAO,IAAMC,WAAW,GAAGf,MAAM,CAACgB,KAAK,6OAYtC;AAED,OAAO,IAAMC,iBAAiB,GAAGjB,MAAM,CAACa,GAAG,yEAC1C;AAED,OAAO,IAAMK,sBAAsB,GAAGlB,MAAM,CAACa,GAAG,yEAC/C;AAED,OAAO,IAAMM,6BAA6B,GAAGnB,MAAM,CAACa,GAAG,sWAO1BZ,MAAM,CAACa,WAAW,EACrBb,MAAM,CAACa,WAAW,EAGxCV,iBAAiB,CAACG,kBAAkB,CAACa,IAAI,EAAEnB,MAAM,CAACoB,KAAK,CAAC,CAI3D;AAED,OAAO,IAAMC,oBAAoB,GAAGtB,MAAM,CAACuB,KAAK,yEAC/C;AAED,OAAO,IAAMC,wBAAwB,GAAGxB,MAAM,CAACyB,EAAE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K,CAAC,CAU/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableTypes.cjs","names":[],"sources":["../../src/Table/TableTypes.ts"],"sourcesContent":["/**\n * Types for the table.\n */\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\nimport {ButtonProps} from '../Button/Button';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\n\nexport interface TableProps {\n title?: string; // Will render header row\n\n columns: TableColumn[];\n rows: any[];\n\n border?: boolean;\n accordion?: boolean; // Will render accordion table\n collapsed?: boolean; // whether table should be collapsed or not\n collapsedRows?: number; // Number of rows to show when table is collapsed\n sortProps?: TableSortProps;\n\n remoteOperations?: boolean; // Indicates that pagination should be done remotely\n pagination?: TablePagination; // Required only in case remotePagination is set to true\n onPreviousPageClick?: () => void; // Will fire on previous page click in case remotePagination is set to true\n onNextPageClick?: () => void; // Will fire on next page click in case remotePagination is set to true\n onRowsPerPageChange?: (count: number) => void; // Will fire when rows per page changes in case remotePagination is set to true\n onTriggerSortingChange?: (key: string, direction?: TableSortingDirection) => void; // Will fire when the sorting direction changes. Used with remote pagination,\n\n showLoadingIndicator?: boolean;\n rowsPerPageLabel? :string; //label that will be shown next to the rows per page selector\n noRowsLabel?: string; //label that will be shown when there are no rows in the grid\n showMoreLabel?: string; //label that will be shown for 'accordion' grid when there are some rows collapsed\n showFewerLabel?: string; //label that will be shown for 'accordion' grid when user can 'collapse' some of the rows\n\n menu?: Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'width' | 'itemsType' | 'multiSelect'>;\n\n selectable?: boolean;\n onSelectionChange?: (value: any | any[]) => void;\n multiSelect?: boolean;\n keyExpr?: string;\n selectedRows?: any[];\n\n layout?: TableLayout;\n}\n\nexport interface TableSortProps {\n column: string;\n direction: TableSortingDirection;\n}\n\nexport interface TableColumn {\n key: string;\n name: string;\n filterValue?: string;\n\n icon?: React.ReactNode;\n\n width?: string | number;\n colorFn?: (row: any, key: string) => string;\n justify?: TableJustification;\n shortenText?: boolean;\n\n action?: (row: any, event: any) => void;\n type?: TableColumnTypes;\n additionalProps?: Pick<ButtonProps, 'variant' | 'size' | 'width' | 'icon'> | Pick<IconButtonProps, 'variant' | 'shape' | 'disabled' | 'tooltip'> | Pick<HyperlinkProps, 'variant'>;\n customContent?: (row: any, key: string) => any;\n\n sortable?: boolean;\n}\n\nexport type TableColumnTypes = 'text' | 'boolean' | 'number' | 'custom' | 'button' | 'icon' | 'link';\n\nexport type TableJustification = 'right' | 'left' | 'center';\n\nexport type TableSortingDirection = 'asc' | 'desc';\n\nexport type TableLayout = 'auto' | 'fixed';\n\nexport interface TablePagination {\n from: number;\n to: number;\n total: number;\n currentPage: number;\n rowsPerPage: number;\n}\n\n// will override component properties in case of button, icon and link\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"TableTypes.cjs","names":[],"sources":["../../src/Table/TableTypes.ts"],"sourcesContent":["/**\n * Types for the table.\n */\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\nimport {ButtonProps} from '../Button/Button';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\n\nexport interface TableProps {\n title?: string; // Will render header row\n\n columns: TableColumn[];\n rows: any[];\n\n border?: boolean;\n accordion?: boolean; // Will render accordion table\n collapsed?: boolean; // whether table should be collapsed or not\n collapsedRows?: number; // Number of rows to show when table is collapsed\n sortProps?: TableSortProps;\n\n remoteOperations?: boolean; // Indicates that pagination should be done remotely\n pagination?: TablePagination; // Required only in case remotePagination is set to true\n onPreviousPageClick?: () => void; // Will fire on previous page click in case remotePagination is set to true\n onNextPageClick?: () => void; // Will fire on next page click in case remotePagination is set to true\n onRowsPerPageChange?: (count: number) => void; // Will fire when rows per page changes in case remotePagination is set to true\n onTriggerSortingChange?: (key: string, direction?: TableSortingDirection) => void; // Will fire when the sorting direction changes. Used with remote pagination,\n\n showLoadingIndicator?: boolean;\n rowsPerPageLabel? :string; //label that will be shown next to the rows per page selector\n noRowsLabel?: string; //label that will be shown when there are no rows in the grid\n showMoreLabel?: string; //label that will be shown for 'accordion' grid when there are some rows collapsed\n showFewerLabel?: string; //label that will be shown for 'accordion' grid when user can 'collapse' some of the rows\n\n menu?: Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'width' | 'itemsType' | 'multiSelect'>;\n\n selectable?: boolean;\n onSelectionChange?: (value: any | any[]) => void;\n multiSelect?: boolean;\n keyExpr?: string;\n selectedRows?: any[];\n loaderZIndex?: string;\n\n layout?: TableLayout;\n}\n\nexport interface TableSortProps {\n column: string;\n direction: TableSortingDirection;\n allowClearingSort?: boolean;\n}\n\nexport interface TableColumn {\n key: string;\n name: string;\n filterValue?: string;\n\n icon?: React.ReactNode;\n\n width?: string | number;\n colorFn?: (row: any, key: string) => string;\n justify?: TableJustification;\n shortenText?: boolean;\n\n action?: (row: any, event: any) => void;\n type?: TableColumnTypes;\n additionalProps?: Pick<ButtonProps, 'variant' | 'size' | 'width' | 'icon'> | Pick<IconButtonProps, 'variant' | 'shape' | 'disabled' | 'tooltip'> | Pick<HyperlinkProps, 'variant'>;\n customContent?: (row: any, key: string) => any;\n\n sortable?: boolean;\n}\n\nexport type TableColumnTypes = 'text' | 'boolean' | 'number' | 'custom' | 'button' | 'icon' | 'link';\n\nexport type TableJustification = 'right' | 'left' | 'center';\n\nexport type TableSortingDirection = 'asc' | 'desc';\n\nexport type TableLayout = 'auto' | 'fixed';\n\nexport interface TablePagination {\n from: number;\n to: number;\n total: number;\n currentPage: number;\n rowsPerPage: number;\n}\n\n// will override component properties in case of button, icon and link\n"],"mappings":""}
|
|
@@ -32,11 +32,13 @@ export interface TableProps {
|
|
|
32
32
|
multiSelect?: boolean;
|
|
33
33
|
keyExpr?: string;
|
|
34
34
|
selectedRows?: any[];
|
|
35
|
+
loaderZIndex?: string;
|
|
35
36
|
layout?: TableLayout;
|
|
36
37
|
}
|
|
37
38
|
export interface TableSortProps {
|
|
38
39
|
column: string;
|
|
39
40
|
direction: TableSortingDirection;
|
|
41
|
+
allowClearingSort?: boolean;
|
|
40
42
|
}
|
|
41
43
|
export interface TableColumn {
|
|
42
44
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableTypes.js","names":[],"sources":["../../src/Table/TableTypes.ts"],"sourcesContent":["/**\n * Types for the table.\n */\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\nimport {ButtonProps} from '../Button/Button';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\n\nexport interface TableProps {\n title?: string; // Will render header row\n\n columns: TableColumn[];\n rows: any[];\n\n border?: boolean;\n accordion?: boolean; // Will render accordion table\n collapsed?: boolean; // whether table should be collapsed or not\n collapsedRows?: number; // Number of rows to show when table is collapsed\n sortProps?: TableSortProps;\n\n remoteOperations?: boolean; // Indicates that pagination should be done remotely\n pagination?: TablePagination; // Required only in case remotePagination is set to true\n onPreviousPageClick?: () => void; // Will fire on previous page click in case remotePagination is set to true\n onNextPageClick?: () => void; // Will fire on next page click in case remotePagination is set to true\n onRowsPerPageChange?: (count: number) => void; // Will fire when rows per page changes in case remotePagination is set to true\n onTriggerSortingChange?: (key: string, direction?: TableSortingDirection) => void; // Will fire when the sorting direction changes. Used with remote pagination,\n\n showLoadingIndicator?: boolean;\n rowsPerPageLabel? :string; //label that will be shown next to the rows per page selector\n noRowsLabel?: string; //label that will be shown when there are no rows in the grid\n showMoreLabel?: string; //label that will be shown for 'accordion' grid when there are some rows collapsed\n showFewerLabel?: string; //label that will be shown for 'accordion' grid when user can 'collapse' some of the rows\n\n menu?: Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'width' | 'itemsType' | 'multiSelect'>;\n\n selectable?: boolean;\n onSelectionChange?: (value: any | any[]) => void;\n multiSelect?: boolean;\n keyExpr?: string;\n selectedRows?: any[];\n\n layout?: TableLayout;\n}\n\nexport interface TableSortProps {\n column: string;\n direction: TableSortingDirection;\n}\n\nexport interface TableColumn {\n key: string;\n name: string;\n filterValue?: string;\n\n icon?: React.ReactNode;\n\n width?: string | number;\n colorFn?: (row: any, key: string) => string;\n justify?: TableJustification;\n shortenText?: boolean;\n\n action?: (row: any, event: any) => void;\n type?: TableColumnTypes;\n additionalProps?: Pick<ButtonProps, 'variant' | 'size' | 'width' | 'icon'> | Pick<IconButtonProps, 'variant' | 'shape' | 'disabled' | 'tooltip'> | Pick<HyperlinkProps, 'variant'>;\n customContent?: (row: any, key: string) => any;\n\n sortable?: boolean;\n}\n\nexport type TableColumnTypes = 'text' | 'boolean' | 'number' | 'custom' | 'button' | 'icon' | 'link';\n\nexport type TableJustification = 'right' | 'left' | 'center';\n\nexport type TableSortingDirection = 'asc' | 'desc';\n\nexport type TableLayout = 'auto' | 'fixed';\n\nexport interface TablePagination {\n from: number;\n to: number;\n total: number;\n currentPage: number;\n rowsPerPage: number;\n}\n\n// will override component properties in case of button, icon and link\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"TableTypes.js","names":[],"sources":["../../src/Table/TableTypes.ts"],"sourcesContent":["/**\n * Types for the table.\n */\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\nimport {ButtonProps} from '../Button/Button';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\n\nexport interface TableProps {\n title?: string; // Will render header row\n\n columns: TableColumn[];\n rows: any[];\n\n border?: boolean;\n accordion?: boolean; // Will render accordion table\n collapsed?: boolean; // whether table should be collapsed or not\n collapsedRows?: number; // Number of rows to show when table is collapsed\n sortProps?: TableSortProps;\n\n remoteOperations?: boolean; // Indicates that pagination should be done remotely\n pagination?: TablePagination; // Required only in case remotePagination is set to true\n onPreviousPageClick?: () => void; // Will fire on previous page click in case remotePagination is set to true\n onNextPageClick?: () => void; // Will fire on next page click in case remotePagination is set to true\n onRowsPerPageChange?: (count: number) => void; // Will fire when rows per page changes in case remotePagination is set to true\n onTriggerSortingChange?: (key: string, direction?: TableSortingDirection) => void; // Will fire when the sorting direction changes. Used with remote pagination,\n\n showLoadingIndicator?: boolean;\n rowsPerPageLabel? :string; //label that will be shown next to the rows per page selector\n noRowsLabel?: string; //label that will be shown when there are no rows in the grid\n showMoreLabel?: string; //label that will be shown for 'accordion' grid when there are some rows collapsed\n showFewerLabel?: string; //label that will be shown for 'accordion' grid when user can 'collapse' some of the rows\n\n menu?: Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'width' | 'itemsType' | 'multiSelect'>;\n\n selectable?: boolean;\n onSelectionChange?: (value: any | any[]) => void;\n multiSelect?: boolean;\n keyExpr?: string;\n selectedRows?: any[];\n loaderZIndex?: string;\n\n layout?: TableLayout;\n}\n\nexport interface TableSortProps {\n column: string;\n direction: TableSortingDirection;\n allowClearingSort?: boolean;\n}\n\nexport interface TableColumn {\n key: string;\n name: string;\n filterValue?: string;\n\n icon?: React.ReactNode;\n\n width?: string | number;\n colorFn?: (row: any, key: string) => string;\n justify?: TableJustification;\n shortenText?: boolean;\n\n action?: (row: any, event: any) => void;\n type?: TableColumnTypes;\n additionalProps?: Pick<ButtonProps, 'variant' | 'size' | 'width' | 'icon'> | Pick<IconButtonProps, 'variant' | 'shape' | 'disabled' | 'tooltip'> | Pick<HyperlinkProps, 'variant'>;\n customContent?: (row: any, key: string) => any;\n\n sortable?: boolean;\n}\n\nexport type TableColumnTypes = 'text' | 'boolean' | 'number' | 'custom' | 'button' | 'icon' | 'link';\n\nexport type TableJustification = 'right' | 'left' | 'center';\n\nexport type TableSortingDirection = 'asc' | 'desc';\n\nexport type TableLayout = 'auto' | 'fixed';\n\nexport interface TablePagination {\n from: number;\n to: number;\n total: number;\n currentPage: number;\n rowsPerPage: number;\n}\n\n// will override component properties in case of button, icon and link\n"],"mappings":""}
|
|
@@ -20,7 +20,7 @@ var _excluded = ["id", "active", "onChange", "disabled", "defaultState", "active
|
|
|
20
20
|
var _templateObject;
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
-
var Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", " {\n transition: all 0.1s ease-in-out;\n }\n\n &.disabled,\n &.active:not(.state-change) {\n ", " {\n background: ", ";\n }\n }\n\n &.active:not(.state-change) {\n ", ":after {\n content: '';\n position: absolute;\n left: 12px;\n bottom: 1px;\n background-color: ", ";\n border-radius: 4px;\n height: 4px;\n width: 24px;\n }\n }\n\n &.disabled:not(.state-change) {\n ", ":after {\n background: ", ";\n }\n }\n"])), _Iconbutton.
|
|
23
|
+
var Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", " {\n transition: all 0.1s ease-in-out;\n }\n\n &.disabled,\n &.active:not(.state-change) {\n ", " {\n background: ", ";\n }\n }\n\n &.active:not(.state-change) {\n ", ":after {\n content: '';\n position: absolute;\n left: 12px;\n bottom: 1px;\n background-color: ", ";\n border-radius: 4px;\n height: 4px;\n width: 24px;\n }\n }\n\n &.disabled:not(.state-change) {\n ", ":after {\n background: ", ";\n }\n }\n"])), _Iconbutton.IconButtonContentStyles, _Iconbutton.IconButtonContentStyles, _styles.COLORS.white, _Iconbutton.IconButtonContentStyles, _styles.COLORS.primary_500, _Iconbutton.IconButtonContentStyles, _styles.COLORS.neutral_300);
|
|
24
24
|
var ToggleButton = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
25
25
|
var _activeState$color, _activeState$icon;
|
|
26
26
|
var id = _ref.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButton.cjs","names":["Wrapper","styled","div","
|
|
1
|
+
{"version":3,"file":"ToggleButton.cjs","names":["Wrapper","styled","div","IconButtonContentStyles","COLORS","white","primary_500","neutral_300","ToggleButton","React","forwardRef","ref","id","active","onChange","disabled","defaultState","activeState","className","rest","useState","isActive","setIsActive","useEffect","cls","color","icon"],"sources":["../../src/Toggles/ToggleButton.tsx"],"sourcesContent":["import React from 'react';\nimport { IconButton } from '../Button';\nimport styled from 'styled-components';\nimport { IconButtonContentStyles } from '../Button/Iconbutton';\nimport { COLORS } from '../styles';\n\nconst Wrapper = styled.div`\n ${IconButtonContentStyles} {\n transition: all 0.1s ease-in-out;\n }\n\n &.disabled,\n &.active:not(.state-change) {\n ${IconButtonContentStyles} {\n background: ${COLORS.white};\n }\n }\n\n &.active:not(.state-change) {\n ${IconButtonContentStyles}:after {\n content: '';\n position: absolute;\n left: 12px;\n bottom: 1px;\n background-color: ${COLORS.primary_500};\n border-radius: 4px;\n height: 4px;\n width: 24px;\n }\n }\n\n &.disabled:not(.state-change) {\n ${IconButtonContentStyles}:after {\n background: ${COLORS.neutral_300};\n }\n }\n`;\n\nexport interface ToggleButtonState {\n icon: React.ReactNode;\n color?: string;\n}\n\nexport interface ToggleButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'disabled' | 'onClick'> {\n active: boolean;\n onChange?: (value: boolean) => void;\n disabled?: boolean;\n\n defaultState: ToggleButtonState;\n activeState?: ToggleButtonState;\n}\n\nexport const ToggleButton = React.forwardRef(({\n id,\n active,\n onChange,\n disabled,\n defaultState,\n activeState,\n className,\n ...rest\n }: ToggleButtonProps, ref: React.Ref<HTMLButtonElement>) => {\n const [isActive, setIsActive] = React.useState(false);\n\n React.useEffect(() => setIsActive(active), [active]);\n\n const cls = `${className || ''} ${isActive ? 'active' : ''} ${activeState ? 'state-change' : ''} ${disabled ? 'disabled' : ''}`;\n\n return (\n <Wrapper className={cls}>\n <IconButton\n variant={'secondary'}\n ref={ref}\n useTransparentBackground={true}\n shape={'circular'}\n action={() => {\n setIsActive(!isActive);\n if (onChange) {\n onChange(!isActive);\n }\n }}\n id={id}\n iconColor={isActive ? activeState?.color ?? defaultState.color : defaultState.color}\n disabled={disabled}\n aria-pressed={isActive}\n {...rest}>\n {isActive ? activeState?.icon ?? defaultState.icon : defaultState.icon}\n </IconButton>\n </Wrapper>\n );\n});\n\nexport default ToggleButton;\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAAmC;AAAA;AAAA;AAAA;AAAA;AAEnC,IAAMA,OAAO,GAAGC,yBAAM,CAACC,GAAG,okBACtBC,mCAAuB,EAMrBA,mCAAuB,EACTC,cAAM,CAACC,KAAK,EAK1BF,mCAAuB,EAKHC,cAAM,CAACE,WAAW,EAQtCH,mCAAuB,EACTC,cAAM,CAACG,WAAW,CAGrC;AAgBM,IAAMC,YAAY,gBAAGC,cAAK,CAACC,UAAU,CAAC,gBASuBC,GAAiC,EAAK;EAAA;EAAA,IAR1DC,EAAE,QAAFA,EAAE;IACFC,MAAM,QAANA,MAAM;IACNC,QAAQ,QAARA,QAAQ;IACRC,QAAQ,QAARA,QAAQ;IACRC,YAAY,QAAZA,YAAY;IACZC,WAAW,QAAXA,WAAW;IACXC,SAAS,QAATA,SAAS;IACNC,IAAI;EAErD,sBAAgCV,cAAK,CAACW,QAAQ,CAAC,KAAK,CAAC;IAAA;IAA9CC,QAAQ;IAAEC,WAAW;EAE5Bb,cAAK,CAACc,SAAS,CAAC;IAAA,OAAMD,WAAW,CAACT,MAAM,CAAC;EAAA,GAAE,CAACA,MAAM,CAAC,CAAC;EAEpD,IAAMW,GAAG,aAAMN,SAAS,IAAI,EAAE,cAAIG,QAAQ,GAAG,QAAQ,GAAG,EAAE,cAAIJ,WAAW,GAAG,cAAc,GAAG,EAAE,cAAIF,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAE;EAE/H,oBACE,qBAAC,OAAO;IAAC,SAAS,EAAES,GAAI;IAAA,uBACtB,qBAAC,kBAAU;MACT,OAAO,EAAE,WAAY;MACrB,GAAG,EAAEb,GAAI;MACT,wBAAwB,EAAE,IAAK;MAC/B,KAAK,EAAE,UAAW;MAClB,MAAM,EAAE,kBAAM;QACZW,WAAW,CAAC,CAACD,QAAQ,CAAC;QACtB,IAAIP,QAAQ,EAAE;UACZA,QAAQ,CAAC,CAACO,QAAQ,CAAC;QACrB;MACF,CAAE;MACF,EAAE,EAAET,EAAG;MACP,SAAS,EAAES,QAAQ,yBAAGJ,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEQ,KAAK,mEAAIT,YAAY,CAACS,KAAK,GAAGT,YAAY,CAACS,KAAM;MACpF,QAAQ,EAAEV,QAAS;MACnB,gBAAcM;IAAS,GACnBF,IAAI;MAAA,UACPE,QAAQ,wBAAGJ,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAES,IAAI,iEAAIV,YAAY,CAACU,IAAI,GAAGV,YAAY,CAACU;IAAI;EAC3D,EACL;AAEd,CAAC,CAAC;AAAC;AAAA;EA9CDb,MAAM;EACNC,QAAQ;EACRC,QAAQ;EAERC,YAAY;IATZU,IAAI;IACJD,KAAK;EAAA;EASLR,WAAW;IAVXS,IAAI;IACJD,KAAK;EAAA;AAAA;AAAA,eAoDQjB,YAAY;AAAA"}
|
|
@@ -10,10 +10,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { IconButton } from '../Button';
|
|
12
12
|
import styled from 'styled-components';
|
|
13
|
-
import {
|
|
13
|
+
import { IconButtonContentStyles } from '../Button/Iconbutton';
|
|
14
14
|
import { COLORS } from '../styles';
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
var Wrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", " {\n transition: all 0.1s ease-in-out;\n }\n\n &.disabled,\n &.active:not(.state-change) {\n ", " {\n background: ", ";\n }\n }\n\n &.active:not(.state-change) {\n ", ":after {\n content: '';\n position: absolute;\n left: 12px;\n bottom: 1px;\n background-color: ", ";\n border-radius: 4px;\n height: 4px;\n width: 24px;\n }\n }\n\n &.disabled:not(.state-change) {\n ", ":after {\n background: ", ";\n }\n }\n"])),
|
|
16
|
+
var Wrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", " {\n transition: all 0.1s ease-in-out;\n }\n\n &.disabled,\n &.active:not(.state-change) {\n ", " {\n background: ", ";\n }\n }\n\n &.active:not(.state-change) {\n ", ":after {\n content: '';\n position: absolute;\n left: 12px;\n bottom: 1px;\n background-color: ", ";\n border-radius: 4px;\n height: 4px;\n width: 24px;\n }\n }\n\n &.disabled:not(.state-change) {\n ", ":after {\n background: ", ";\n }\n }\n"])), IconButtonContentStyles, IconButtonContentStyles, COLORS.white, IconButtonContentStyles, COLORS.primary_500, IconButtonContentStyles, COLORS.neutral_300);
|
|
17
17
|
export var ToggleButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18
18
|
var _activeState$color, _activeState$icon;
|
|
19
19
|
var id = _ref.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButton.js","names":["React","IconButton","styled","
|
|
1
|
+
{"version":3,"file":"ToggleButton.js","names":["React","IconButton","styled","IconButtonContentStyles","COLORS","Wrapper","div","white","primary_500","neutral_300","ToggleButton","forwardRef","ref","id","active","onChange","disabled","defaultState","activeState","className","rest","useState","isActive","setIsActive","useEffect","cls","color","icon"],"sources":["../../src/Toggles/ToggleButton.tsx"],"sourcesContent":["import React from 'react';\nimport { IconButton } from '../Button';\nimport styled from 'styled-components';\nimport { IconButtonContentStyles } from '../Button/Iconbutton';\nimport { COLORS } from '../styles';\n\nconst Wrapper = styled.div`\n ${IconButtonContentStyles} {\n transition: all 0.1s ease-in-out;\n }\n\n &.disabled,\n &.active:not(.state-change) {\n ${IconButtonContentStyles} {\n background: ${COLORS.white};\n }\n }\n\n &.active:not(.state-change) {\n ${IconButtonContentStyles}:after {\n content: '';\n position: absolute;\n left: 12px;\n bottom: 1px;\n background-color: ${COLORS.primary_500};\n border-radius: 4px;\n height: 4px;\n width: 24px;\n }\n }\n\n &.disabled:not(.state-change) {\n ${IconButtonContentStyles}:after {\n background: ${COLORS.neutral_300};\n }\n }\n`;\n\nexport interface ToggleButtonState {\n icon: React.ReactNode;\n color?: string;\n}\n\nexport interface ToggleButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'disabled' | 'onClick'> {\n active: boolean;\n onChange?: (value: boolean) => void;\n disabled?: boolean;\n\n defaultState: ToggleButtonState;\n activeState?: ToggleButtonState;\n}\n\nexport const ToggleButton = React.forwardRef(({\n id,\n active,\n onChange,\n disabled,\n defaultState,\n activeState,\n className,\n ...rest\n }: ToggleButtonProps, ref: React.Ref<HTMLButtonElement>) => {\n const [isActive, setIsActive] = React.useState(false);\n\n React.useEffect(() => setIsActive(active), [active]);\n\n const cls = `${className || ''} ${isActive ? 'active' : ''} ${activeState ? 'state-change' : ''} ${disabled ? 'disabled' : ''}`;\n\n return (\n <Wrapper className={cls}>\n <IconButton\n variant={'secondary'}\n ref={ref}\n useTransparentBackground={true}\n shape={'circular'}\n action={() => {\n setIsActive(!isActive);\n if (onChange) {\n onChange(!isActive);\n }\n }}\n id={id}\n iconColor={isActive ? activeState?.color ?? defaultState.color : defaultState.color}\n disabled={disabled}\n aria-pressed={isActive}\n {...rest}>\n {isActive ? activeState?.icon ?? defaultState.icon : defaultState.icon}\n </IconButton>\n </Wrapper>\n );\n});\n\nexport default ToggleButton;\n"],"mappings":";;;;;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,CAAC,CAACD,QAAQ,CAAC;QACtB,IAAIP,QAAQ,EAAE;UACZA,QAAQ,CAAC,CAACO,QAAQ,CAAC;QACrB;MACF,CAAE;MACF,EAAE,EAAET,EAAG;MACP,SAAS,EAAES,QAAQ,yBAAGJ,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEQ,KAAK,mEAAIT,YAAY,CAACS,KAAK,GAAGT,YAAY,CAACS,KAAM;MACpF,QAAQ,EAAEV,QAAS;MACnB,gBAAcM;IAAS,GACnBF,IAAI;MAAA,UACPE,QAAQ,wBAAGJ,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAES,IAAI,iEAAIV,YAAY,CAACU,IAAI,GAAGV,YAAY,CAACU;IAAI;EAC3D,EACL;AAEd,CAAC,CAAC;AAAC;EA9CDb,MAAM;EACNC,QAAQ;EACRC,QAAQ;EAERC,YAAY;IATZU,IAAI;IACJD,KAAK;EAAA;EASLR,WAAW;IAVXS,IAAI;IACJD,KAAK;EAAA;AAAA;AAoDP,eAAehB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"z-indexes.cjs","names":["Z_INDEXES","hover","active","focus","badge","dropdown","sticky_menu","fixed_menu","backdrop","off_canvas","modal","toast","tooltip","popover"],"sources":["../../src/styles/z-indexes.ts"],"sourcesContent":["export const Z_INDEXES = {\n hover: '1',\n active: '2',\n focus: '3',\n\n badge: '10',\n\n\n dropdown: '1000',\n sticky_menu: '1020',\n fixed_menu: '1030',\n backdrop: '1040',\n off_canvas: '1050',\n modal: '1060',\n toast: '1070',\n tooltip: '1080',\n popover: '1070'\n}\n"],"mappings":";;;;;;AAAO,IAAMA,SAAS,GAAG;EACvBC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE,GAAG;EACXC,KAAK,EAAE,GAAG;EAEVC,KAAK,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"z-indexes.cjs","names":["Z_INDEXES","hover","active","focus","badge","loader","dropdown","sticky_menu","fixed_menu","backdrop","off_canvas","modal","toast","tooltip","popover"],"sources":["../../src/styles/z-indexes.ts"],"sourcesContent":["export const Z_INDEXES = {\n hover: '1',\n active: '2',\n focus: '3',\n\n badge: '10',\n\n loader: '990', \n dropdown: '1000',\n sticky_menu: '1020',\n fixed_menu: '1030',\n backdrop: '1040',\n off_canvas: '1050',\n modal: '1060',\n toast: '1070',\n tooltip: '1080',\n popover: '1070'\n}\n"],"mappings":";;;;;;AAAO,IAAMA,SAAS,GAAG;EACvBC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE,GAAG;EACXC,KAAK,EAAE,GAAG;EAEVC,KAAK,EAAE,IAAI;EAEXC,MAAM,EAAE,KAAK;EACbC,QAAQ,EAAE,MAAM;EAChBC,WAAW,EAAE,MAAM;EACnBC,UAAU,EAAE,MAAM;EAClBC,QAAQ,EAAE,MAAM;EAChBC,UAAU,EAAE,MAAM;EAClBC,KAAK,EAAE,MAAM;EACbC,KAAK,EAAE,MAAM;EACbC,OAAO,EAAE,MAAM;EACfC,OAAO,EAAE;AACX,CAAC;AAAA"}
|
package/dist/styles/z-indexes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"z-indexes.js","names":["Z_INDEXES","hover","active","focus","badge","dropdown","sticky_menu","fixed_menu","backdrop","off_canvas","modal","toast","tooltip","popover"],"sources":["../../src/styles/z-indexes.ts"],"sourcesContent":["export const Z_INDEXES = {\n hover: '1',\n active: '2',\n focus: '3',\n\n badge: '10',\n\n\n dropdown: '1000',\n sticky_menu: '1020',\n fixed_menu: '1030',\n backdrop: '1040',\n off_canvas: '1050',\n modal: '1060',\n toast: '1070',\n tooltip: '1080',\n popover: '1070'\n}\n"],"mappings":"AAAA,OAAO,IAAMA,SAAS,GAAG;EACvBC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE,GAAG;EACXC,KAAK,EAAE,GAAG;EAEVC,KAAK,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"z-indexes.js","names":["Z_INDEXES","hover","active","focus","badge","loader","dropdown","sticky_menu","fixed_menu","backdrop","off_canvas","modal","toast","tooltip","popover"],"sources":["../../src/styles/z-indexes.ts"],"sourcesContent":["export const Z_INDEXES = {\n hover: '1',\n active: '2',\n focus: '3',\n\n badge: '10',\n\n loader: '990', \n dropdown: '1000',\n sticky_menu: '1020',\n fixed_menu: '1030',\n backdrop: '1040',\n off_canvas: '1050',\n modal: '1060',\n toast: '1070',\n tooltip: '1080',\n popover: '1070'\n}\n"],"mappings":"AAAA,OAAO,IAAMA,SAAS,GAAG;EACvBC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE,GAAG;EACXC,KAAK,EAAE,GAAG;EAEVC,KAAK,EAAE,IAAI;EAEXC,MAAM,EAAE,KAAK;EACbC,QAAQ,EAAE,MAAM;EAChBC,WAAW,EAAE,MAAM;EACnBC,UAAU,EAAE,MAAM;EAClBC,QAAQ,EAAE,MAAM;EAChBC,UAAU,EAAE,MAAM;EAClBC,KAAK,EAAE,MAAM;EACbC,KAAK,EAAE,MAAM;EACbC,OAAO,EAAE,MAAM;EACfC,OAAO,EAAE;AACX,CAAC"}
|