@laerdal/life-react-components 2.2.1-dev.21 → 2.2.1-dev.23

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.
Files changed (258) hide show
  1. package/dist/Accordion/AccordionItem.cjs +8 -17
  2. package/dist/Accordion/AccordionItem.cjs.map +1 -1
  3. package/dist/Accordion/AccordionItem.d.ts +2 -0
  4. package/dist/Accordion/AccordionItem.js +9 -18
  5. package/dist/Accordion/AccordionItem.js.map +1 -1
  6. package/dist/Accordion/AccordionMenu.cjs +6 -2
  7. package/dist/Accordion/AccordionMenu.cjs.map +1 -1
  8. package/dist/Accordion/AccordionMenu.d.ts +3 -0
  9. package/dist/Accordion/AccordionMenu.js +6 -2
  10. package/dist/Accordion/AccordionMenu.js.map +1 -1
  11. package/dist/Accordion/styles.cjs +7 -11
  12. package/dist/Accordion/styles.cjs.map +1 -1
  13. package/dist/Accordion/styles.d.ts +1 -4
  14. package/dist/Accordion/styles.js +6 -9
  15. package/dist/Accordion/styles.js.map +1 -1
  16. package/dist/AuthPage/AuthPage.js +1 -1
  17. package/dist/Banners/Banner.cjs.map +1 -1
  18. package/dist/Banners/Banner.js.map +1 -1
  19. package/dist/Button/Button.cjs +1 -1
  20. package/dist/Button/Button.cjs.map +1 -1
  21. package/dist/Button/Button.js +2 -2
  22. package/dist/Button/Button.js.map +1 -1
  23. package/dist/Button/Iconbutton.cjs +68 -61
  24. package/dist/Button/Iconbutton.cjs.map +1 -1
  25. package/dist/Button/Iconbutton.d.ts +3 -1
  26. package/dist/Button/Iconbutton.js +68 -61
  27. package/dist/Button/Iconbutton.js.map +1 -1
  28. package/dist/Card/HorizontalCard/HorizontalCard.cjs +12 -9
  29. package/dist/Card/HorizontalCard/HorizontalCard.cjs.map +1 -1
  30. package/dist/Card/HorizontalCard/HorizontalCard.d.ts +2 -0
  31. package/dist/Card/HorizontalCard/HorizontalCard.js +9 -8
  32. package/dist/Card/HorizontalCard/HorizontalCard.js.map +1 -1
  33. package/dist/Card/HorizontalCard/HorizontalCardActions.cjs +1 -0
  34. package/dist/Card/HorizontalCard/HorizontalCardActions.cjs.map +1 -1
  35. package/dist/Card/HorizontalCard/HorizontalCardActions.js +1 -0
  36. package/dist/Card/HorizontalCard/HorizontalCardActions.js.map +1 -1
  37. package/dist/Card/HorizontalCard/HorizontalCardBody.cjs +13 -9
  38. package/dist/Card/HorizontalCard/HorizontalCardBody.cjs.map +1 -1
  39. package/dist/Card/HorizontalCard/HorizontalCardBody.d.ts +4 -0
  40. package/dist/Card/HorizontalCard/HorizontalCardBody.js +8 -8
  41. package/dist/Card/HorizontalCard/HorizontalCardBody.js.map +1 -1
  42. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs +7 -5
  43. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs.map +1 -1
  44. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.d.ts +2 -0
  45. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +5 -5
  46. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js.map +1 -1
  47. package/dist/Card/HorizontalCard/index.cjs +33 -12
  48. package/dist/Card/HorizontalCard/index.cjs.map +1 -1
  49. package/dist/Card/HorizontalCard/index.d.ts +3 -1
  50. package/dist/Card/HorizontalCard/index.js +3 -1
  51. package/dist/Card/HorizontalCard/index.js.map +1 -1
  52. package/dist/Card/HorizontalCard/types.cjs.map +1 -1
  53. package/dist/Card/HorizontalCard/types.d.ts +2 -2
  54. package/dist/Card/HorizontalCard/types.js.map +1 -1
  55. package/dist/ChipsInput/ChipInputField.cjs +1 -1
  56. package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
  57. package/dist/ChipsInput/ChipInputField.js +1 -1
  58. package/dist/ChipsInput/ChipInputField.js.map +1 -1
  59. package/dist/Dropdown/BasicDropdown.cjs +6 -18
  60. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  61. package/dist/Dropdown/BasicDropdown.d.ts +0 -1
  62. package/dist/Dropdown/BasicDropdown.js +7 -19
  63. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  64. package/dist/Dropdown/CommonStyling.cjs +4 -7
  65. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  66. package/dist/Dropdown/CommonStyling.d.ts +1 -3
  67. package/dist/Dropdown/CommonStyling.js +4 -7
  68. package/dist/Dropdown/CommonStyling.js.map +1 -1
  69. package/dist/Dropdown/DropdownButton.cjs +1 -0
  70. package/dist/Dropdown/DropdownButton.cjs.map +1 -1
  71. package/dist/Dropdown/DropdownButton.js +1 -0
  72. package/dist/Dropdown/DropdownButton.js.map +1 -1
  73. package/dist/Dropdown/DropdownButtonTypes.cjs.map +1 -1
  74. package/dist/Dropdown/DropdownButtonTypes.d.ts +2 -0
  75. package/dist/Dropdown/DropdownButtonTypes.js.map +1 -1
  76. package/dist/Dropdown/DropdownContent.cjs +1 -1
  77. package/dist/Dropdown/DropdownContent.js +1 -1
  78. package/dist/Dropdown/DropdownFilter.cjs +2 -12
  79. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  80. package/dist/Dropdown/DropdownFilter.js +2 -12
  81. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  82. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
  83. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  84. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs +1 -3
  85. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs.map +1 -1
  86. package/dist/GlobalNavigationBar/GlobalNavigationBar.js +2 -4
  87. package/dist/GlobalNavigationBar/GlobalNavigationBar.js.map +1 -1
  88. package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
  89. package/dist/GlobalNavigationBar/Logo.js.map +1 -1
  90. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs +1 -6
  91. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs.map +1 -1
  92. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.d.ts +0 -4
  93. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js +4 -5
  94. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js.map +1 -1
  95. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +56 -147
  96. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
  97. package/dist/GlobalNavigationBar/desktop/MainMenu.d.ts +2 -2
  98. package/dist/GlobalNavigationBar/desktop/MainMenu.js +56 -147
  99. package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
  100. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs +1 -1
  101. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
  102. package/dist/GlobalNavigationBar/mobile/MobileMenu.d.ts +1 -1
  103. package/dist/GlobalNavigationBar/mobile/MobileMenu.js +2 -2
  104. package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  105. package/dist/GlobalNavigationBar/types.cjs.map +1 -1
  106. package/dist/GlobalNavigationBar/types.d.ts +2 -12
  107. package/dist/GlobalNavigationBar/types.js.map +1 -1
  108. package/dist/Image/ImageWithFallbacks.js +1 -1
  109. package/dist/InputFields/DatepickerField.cjs +31 -49
  110. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  111. package/dist/InputFields/DatepickerField.js +32 -50
  112. package/dist/InputFields/DatepickerField.js.map +1 -1
  113. package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
  114. package/dist/InputFields/DatepickerFieldHeader.js +1 -1
  115. package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
  116. package/dist/InputFields/Label.cjs +8 -12
  117. package/dist/InputFields/Label.cjs.map +1 -1
  118. package/dist/InputFields/Label.js +8 -12
  119. package/dist/InputFields/Label.js.map +1 -1
  120. package/dist/InputFields/NumberField.cjs +12 -28
  121. package/dist/InputFields/NumberField.cjs.map +1 -1
  122. package/dist/InputFields/NumberField.js +15 -31
  123. package/dist/InputFields/NumberField.js.map +1 -1
  124. package/dist/InputFields/PasswordField.cjs +44 -50
  125. package/dist/InputFields/PasswordField.cjs.map +1 -1
  126. package/dist/InputFields/PasswordField.js +45 -51
  127. package/dist/InputFields/PasswordField.js.map +1 -1
  128. package/dist/InputFields/SearchBar.cjs +1 -2
  129. package/dist/InputFields/SearchBar.cjs.map +1 -1
  130. package/dist/InputFields/SearchBar.js +2 -3
  131. package/dist/InputFields/SearchBar.js.map +1 -1
  132. package/dist/InputFields/TextField.cjs +1 -10
  133. package/dist/InputFields/TextField.cjs.map +1 -1
  134. package/dist/InputFields/TextField.js +2 -11
  135. package/dist/InputFields/TextField.js.map +1 -1
  136. package/dist/InputFields/Textarea.cjs +8 -3
  137. package/dist/InputFields/Textarea.cjs.map +1 -1
  138. package/dist/InputFields/Textarea.d.ts +3 -7
  139. package/dist/InputFields/Textarea.js +12 -6
  140. package/dist/InputFields/Textarea.js.map +1 -1
  141. package/dist/InputFields/components/SearchField.cjs +1 -1
  142. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  143. package/dist/InputFields/components/SearchField.js +1 -1
  144. package/dist/InputFields/components/SearchField.js.map +1 -1
  145. package/dist/InputFields/styling.cjs +11 -11
  146. package/dist/InputFields/styling.cjs.map +1 -1
  147. package/dist/InputFields/styling.d.ts +3 -2
  148. package/dist/InputFields/styling.js +10 -11
  149. package/dist/InputFields/styling.js.map +1 -1
  150. package/dist/InputFields/types.cjs.map +1 -1
  151. package/dist/InputFields/types.d.ts +4 -8
  152. package/dist/InputFields/types.js.map +1 -1
  153. package/dist/LinearProgress/LinearProgress.js +1 -1
  154. package/dist/Modals/ModalContent.cjs +9 -2
  155. package/dist/Modals/ModalContent.cjs.map +1 -1
  156. package/dist/Modals/ModalContent.d.ts +1 -0
  157. package/dist/Modals/ModalContent.js +9 -2
  158. package/dist/Modals/ModalContent.js.map +1 -1
  159. package/dist/Modals/ModalTypes.cjs.map +1 -1
  160. package/dist/Modals/ModalTypes.d.ts +1 -1
  161. package/dist/Modals/ModalTypes.js.map +1 -1
  162. package/dist/NavItem/NavItem.cjs +1 -2
  163. package/dist/NavItem/NavItem.cjs.map +1 -1
  164. package/dist/NavItem/NavItem.d.ts +0 -1
  165. package/dist/NavItem/NavItem.js +1 -1
  166. package/dist/NavItem/NavItem.js.map +1 -1
  167. package/dist/Paginator/Paginator.cjs.map +1 -1
  168. package/dist/Paginator/Paginator.js.map +1 -1
  169. package/dist/Table/Table.cjs +2 -1
  170. package/dist/Table/Table.cjs.map +1 -1
  171. package/dist/Table/Table.js +2 -1
  172. package/dist/Table/Table.js.map +1 -1
  173. package/dist/Table/TableFooter.cjs.map +1 -1
  174. package/dist/Table/TableFooter.js +1 -1
  175. package/dist/Table/TableFooter.js.map +1 -1
  176. package/dist/Table/TableStyles.cjs +4 -4
  177. package/dist/Table/TableStyles.cjs.map +1 -1
  178. package/dist/Table/TableStyles.js +4 -4
  179. package/dist/Table/TableStyles.js.map +1 -1
  180. package/dist/Table/TableTypes.cjs.map +1 -1
  181. package/dist/Table/TableTypes.d.ts +2 -1
  182. package/dist/Table/TableTypes.js.map +1 -1
  183. package/dist/Tabs/HorizontalTabs.cjs +10 -12
  184. package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
  185. package/dist/Tabs/HorizontalTabs.d.ts +2 -1
  186. package/dist/Tabs/HorizontalTabs.js +13 -14
  187. package/dist/Tabs/HorizontalTabs.js.map +1 -1
  188. package/dist/Tabs/TabLink.cjs +14 -39
  189. package/dist/Tabs/TabLink.cjs.map +1 -1
  190. package/dist/Tabs/TabLink.d.ts +1 -6
  191. package/dist/Tabs/TabLink.js +14 -39
  192. package/dist/Tabs/TabLink.js.map +1 -1
  193. package/dist/Tabs/VerticalTabs.cjs +0 -2
  194. package/dist/Tabs/VerticalTabs.cjs.map +1 -1
  195. package/dist/Tabs/VerticalTabs.d.ts +0 -1
  196. package/dist/Tabs/VerticalTabs.js +0 -2
  197. package/dist/Tabs/VerticalTabs.js.map +1 -1
  198. package/dist/Tile/TileCommonItems.cjs +4 -2
  199. package/dist/Tile/TileCommonItems.cjs.map +1 -1
  200. package/dist/Tile/TileCommonItems.js +4 -2
  201. package/dist/Tile/TileCommonItems.js.map +1 -1
  202. package/dist/Tile/TileHeader.cjs +18 -10
  203. package/dist/Tile/TileHeader.cjs.map +1 -1
  204. package/dist/Tile/TileHeader.js +18 -10
  205. package/dist/Tile/TileHeader.js.map +1 -1
  206. package/dist/Tile/TileTypes.cjs.map +1 -1
  207. package/dist/Tile/TileTypes.d.ts +5 -2
  208. package/dist/Tile/TileTypes.js.map +1 -1
  209. package/dist/Toggles/ToggleSwitch.cjs +11 -1
  210. package/dist/Toggles/ToggleSwitch.cjs.map +1 -1
  211. package/dist/Toggles/ToggleSwitch.js +12 -2
  212. package/dist/Toggles/ToggleSwitch.js.map +1 -1
  213. package/dist/Toggles/TogglerStyles.cjs +1 -1
  214. package/dist/Toggles/TogglerStyles.cjs.map +1 -1
  215. package/dist/Toggles/TogglerStyles.js +1 -1
  216. package/dist/Toggles/TogglerStyles.js.map +1 -1
  217. package/dist/Tooltips/TooltipStyles.cjs +5 -8
  218. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  219. package/dist/Tooltips/TooltipStyles.d.ts +1 -3
  220. package/dist/Tooltips/TooltipStyles.js +5 -8
  221. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  222. package/dist/Tooltips/TooltipWrapper.cjs +5 -5
  223. package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
  224. package/dist/Tooltips/TooltipWrapper.js +3 -3
  225. package/dist/Tooltips/TooltipWrapper.js.map +1 -1
  226. package/dist/assets/index.cjs.map +1 -1
  227. package/dist/assets/index.js.map +1 -1
  228. package/dist/common/ActionWithin.cjs +1 -1
  229. package/dist/common/ActionWithin.js +1 -1
  230. package/dist/common/FocusVisible.cjs +1 -1
  231. package/dist/common/FocusVisible.js +1 -1
  232. package/dist/icons/index.cjs +1 -1
  233. package/dist/icons/index.cjs.map +1 -1
  234. package/dist/icons/index.js +1 -1
  235. package/dist/icons/index.js.map +1 -1
  236. package/dist/icons/systemicons/SystemIcons.cjs.map +1 -1
  237. package/dist/icons/systemicons/SystemIcons.js.map +1 -1
  238. package/package.json +1 -2
  239. package/dist/GlobalNavigationBar/desktop/SubMenu.cjs +0 -176
  240. package/dist/GlobalNavigationBar/desktop/SubMenu.cjs.map +0 -1
  241. package/dist/GlobalNavigationBar/desktop/SubMenu.d.ts +0 -18
  242. package/dist/GlobalNavigationBar/desktop/SubMenu.js +0 -166
  243. package/dist/GlobalNavigationBar/desktop/SubMenu.js.map +0 -1
  244. package/dist/GlobalNavigationBar/utils.cjs +0 -17
  245. package/dist/GlobalNavigationBar/utils.cjs.map +0 -1
  246. package/dist/GlobalNavigationBar/utils.d.ts +0 -2
  247. package/dist/GlobalNavigationBar/utils.js +0 -10
  248. package/dist/GlobalNavigationBar/utils.js.map +0 -1
  249. package/dist/NavItem/NestedNavItem.cjs +0 -38
  250. package/dist/NavItem/NestedNavItem.cjs.map +0 -1
  251. package/dist/NavItem/NestedNavItem.d.ts +0 -13
  252. package/dist/NavItem/NestedNavItem.js +0 -28
  253. package/dist/NavItem/NestedNavItem.js.map +0 -1
  254. package/dist/Tooltips/TooltipOverflow.cjs +0 -112
  255. package/dist/Tooltips/TooltipOverflow.cjs.map +0 -1
  256. package/dist/Tooltips/TooltipOverflow.d.ts +0 -10
  257. package/dist/Tooltips/TooltipOverflow.js +0 -102
  258. package/dist/Tooltips/TooltipOverflow.js.map +0 -1
@@ -17,9 +17,9 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
17
17
  * Table styles
18
18
  */
19
19
 
20
- var TableWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"])));
20
+ var TableWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n\n &.border{\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n"])), _styles.COLORS.neutral_200, _styles.COLORS.neutral_200);
21
21
  exports.TableWrapper = TableWrapper;
22
- var StyledTable = _styledComponents.default.table(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: transparent;\n width: 100%;\n\n &.fixed {\n table-layout: fixed;\n }\n\n &.auto {\n table-layout: auto;\n }\n"])));
22
+ var StyledTable = _styledComponents.default.table(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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"])));
23
23
  exports.StyledTable = StyledTable;
24
24
  var StyledTableHeader = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n"])));
25
25
  exports.StyledTableHeader = StyledTableHeader;
@@ -37,11 +37,11 @@ var StyledTableHeaderColumnSortDirection = _styledComponents.default.span(_templ
37
37
  exports.StyledTableHeaderColumnSortDirection = StyledTableHeaderColumnSortDirection;
38
38
  var StyledTableHeaderColumn = _styledComponents.default.th(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n position: relative;\n text-align: unset;\n background-color: ", ";\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n &:focus {\n ", "\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 ", " > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ", " > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ", ";\n }\n"])), (0, _typography.ComponentSStyling)(_typography.ComponentTextStyle.Bold, _styles.COLORS.neutral_600), _styles.COLORS.white, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_100, _styles.COLORS.primary_800, _zIndexes.Z_INDEXES.active, _styles.focusStyles, StyledTableHeaderColumnContent, StyledTableHeaderColumnContent, _styles.COLORS.neutral_20);
39
39
  exports.StyledTableHeaderColumn = StyledTableHeaderColumn;
40
- var StyledTableBodyRow = _styledComponents.default.tr(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n position: relative;\n outline: none;\n\n &.selected{\n background-color: ", ";\n }\n \n &:hover {\n background-color: ", ";\n z-index: ", ";\n }\n\n &:focus {\n ", "\n }\n\n &:active {\n z-index: ", ";\n }\n\n"])), _styles.COLORS.primary_100, _styles.COLORS.primary_200, _zIndexes.Z_INDEXES.hover, _styles.focusStyles, _zIndexes.Z_INDEXES.active);
40
+ var StyledTableBodyRow = _styledComponents.default.tr(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n position: relative;\n outline: none;\n background-color: ", ";\n \n &:not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n\n &.selected{\n background-color: ", ";\n }\n \n &:hover {\n background-color: ", ";\n z-index: ", ";\n }\n\n &:focus {\n ", "\n }\n\n &:active {\n z-index: ", ";\n }\n\n"])), _styles.COLORS.white, _styles.COLORS.neutral_200, _styles.COLORS.primary_100, _styles.COLORS.primary_100, _zIndexes.Z_INDEXES.hover, _styles.focusStyles, _zIndexes.Z_INDEXES.active);
41
41
  exports.StyledTableBodyRow = StyledTableBodyRow;
42
42
  var StyledTableNoRowsLabelRow = _styledComponents.default.tr(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n outline: none;\n background-color: ", ";\n"])), _styles.COLORS.neutral_50);
43
43
  exports.StyledTableNoRowsLabelRow = StyledTableNoRowsLabelRow;
44
- var StyledTableBody = _styledComponents.default.tbody(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", ":nth-child(odd):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ", ";\n }\n\n ", ":nth-child(even):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ", ";\n }\n"])), StyledTableBodyRow, _styles.COLORS.neutral_50, StyledTableBodyRow, _styles.COLORS.neutral_20);
44
+ var StyledTableBody = _styledComponents.default.tbody(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n"])));
45
45
  exports.StyledTableBody = StyledTableBody;
46
46
  var StyledTableCell = _styledComponents.default.td(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)([""])));
47
47
  exports.StyledTableCell = StyledTableCell;
@@ -1 +1 @@
1
- {"version":3,"file":"TableStyles.cjs","names":["TableWrapper","styled","div","StyledTable","table","StyledTableHeader","StyledTableHeaderTitle","StyledTableHeaderTitleContent","COLORS","neutral_200","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","primary_200","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\n\nexport const StyledTable = styled.table`\n background: transparent;\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\n &.selected{\n background-color: ${COLORS.primary_100};\n }\n \n &:hover {\n background-color: ${COLORS.primary_200};\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 ${StyledTableBodyRow}:nth-child(odd):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ${COLORS.neutral_50};\n }\n\n ${StyledTableBodyRow}:nth-child(even):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ${COLORS.neutral_20};\n }\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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B,GAAGrD,yBAAM,CAACC,GAAG,+NAM/B0B,mBAAS,CAAC2B,QAAQ,CAC9B;AAAC;AAEK,IAAMC,+BAA+B,GAAGvD,yBAAM,CAACwD,MAAM,upBAE/BjD,cAAM,CAACC,WAAW,EACrBD,cAAM,CAACC,WAAW,EAU5BD,cAAM,CAACiB,KAAK,EAIxB,IAAAiC,6BAAiB,EAAC/C,8BAAkB,CAACC,IAAI,EAAEJ,cAAM,CAACgB,WAAW,CAAC,EAG5DS,mBAAW,EAIFL,mBAAS,CAACC,KAAK,EACZrB,cAAM,CAACkB,UAAU,EACtBlB,cAAM,CAACmB,WAAW,EAIhBC,mBAAS,CAACI,MAAM,EACbxB,cAAM,CAACsB,WAAW,EACvBtB,cAAM,CAACuB,WAAW,CAO9B;AAAC;AAGK,IAAM4B,sBAAsB,GAAG1D,yBAAM,CAACC,GAAG,2PAE5C,IAAA0D,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","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,cAAM,CAACC,WAAW,EACrBD,cAAM,CAACC,WAAW,EAGxC,IAAAM,6BAAiB,EAACC,8BAAkB,CAACC,IAAI,EAAET,cAAM,CAACU,KAAK,CAAC,CAI3D;AAAC;AAEK,IAAMC,oBAAoB,GAAGb,yBAAM,CAACc,KAAK,uFAC/C;AAAC;AAEK,IAAMC,wBAAwB,GAAGf,yBAAM,CAACgB,EAAE,uFAChD;AAAC;AAEK,IAAMC,8BAA8B,GAAGjB,yBAAM,CAACC,GAAG,2TAQ9BC,cAAM,CAACC,WAAW,EACfD,cAAM,CAACC,WAAW,CAC9C;AAAC;AAEK,IAAMe,oCAAoC,GAAGlB,yBAAM,CAACmB,IAAI,wHAG9D;AAAC;AAEK,IAAMC,uBAAuB,GAAGpB,yBAAM,CAACqB,EAAE,g3BAC5C,IAAAC,6BAAiB,EAACZ,8BAAkB,CAACC,IAAI,EAAET,cAAM,CAACqB,WAAW,CAAC,EAG5CrB,cAAM,CAACsB,KAAK,EASRtB,cAAM,CAACuB,UAAU,EAC5BvB,cAAM,CAACwB,WAAW,EAChBC,mBAAS,CAACC,KAAK,EAIN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IAAA+B,8BAAkB,EAACxC,8BAAkB,CAACgC,OAAO,EAAExC,cAAM,CAACU,KAAK,CAAC,CAC/D;AAAC;AAEK,IAAMuC,yBAAyB,GAAGnD,yBAAM,CAACC,GAAG,2GAElD;AAAC;AAEK,IAAMmD,kBAAkB,GAAGpD,yBAAM,CAACC,GAAG,+NAM/B0B,mBAAS,CAAC0B,QAAQ,CAC9B;AAAC;AAEK,IAAMC,+BAA+B,GAAGtD,yBAAM,CAACuD,MAAM,upBAE/BrD,cAAM,CAACC,WAAW,EACrBD,cAAM,CAACC,WAAW,EAU5BD,cAAM,CAACsB,KAAK,EAIxB,IAAAgC,6BAAiB,EAAC9C,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,IAAM2B,sBAAsB,GAAGzD,yBAAM,CAACC,GAAG,2PAE5C,IAAAyD,wBAAgB,EAACC,WAAI,CAACC,KAAK,CAAC,CAU/B;AAAC"}
@@ -18,8 +18,8 @@ import { Size } from "../types";
18
18
  * Table styles
19
19
  */
20
20
 
21
- export var TableWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
22
- export var StyledTable = styled.table(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: transparent;\n width: 100%;\n\n &.fixed {\n table-layout: fixed;\n }\n\n &.auto {\n table-layout: auto;\n }\n"])));
21
+ export var TableWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n &.border{\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n"])), COLORS.neutral_200, COLORS.neutral_200);
22
+ export var StyledTable = styled.table(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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"])));
23
23
  export var StyledTableHeader = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n"])));
24
24
  export var StyledTableHeaderTitle = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n"])));
25
25
  export var StyledTableHeaderTitleContent = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\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 ", ";\n border-top: 2px solid ", ";\n padding: 0 16px;\n\n ", "\n .title-menu {\n margin-right: -16px;\n }\n"])), COLORS.neutral_200, COLORS.neutral_200, ComponentLStyling(ComponentTextStyle.Bold, COLORS.black));
@@ -28,9 +28,9 @@ export var StyledTableHeaderColumns = styled.tr(_templateObject7 || (_templateOb
28
28
  export var StyledTableHeaderColumnContent = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\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 ", ";\n border-bottom: 1px solid ", ";\n"])), COLORS.neutral_200, COLORS.neutral_200);
29
29
  export var StyledTableHeaderColumnSortDirection = styled.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 24px;\n height: 24px;\n"])));
30
30
  export var StyledTableHeaderColumn = styled.th(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n ", "\n position: relative;\n text-align: unset;\n background-color: ", ";\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n &:focus {\n ", "\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 ", " > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ", " > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ", ";\n }\n"])), ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600), COLORS.white, COLORS.primary_20, COLORS.primary_700, Z_INDEXES.hover, COLORS.primary_100, COLORS.primary_800, Z_INDEXES.active, focusStyles, StyledTableHeaderColumnContent, StyledTableHeaderColumnContent, COLORS.neutral_20);
31
- export var StyledTableBodyRow = styled.tr(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n outline: none;\n\n &.selected{\n background-color: ", ";\n }\n \n &:hover {\n background-color: ", ";\n z-index: ", ";\n }\n\n &:focus {\n ", "\n }\n\n &:active {\n z-index: ", ";\n }\n\n"])), COLORS.primary_100, COLORS.primary_200, Z_INDEXES.hover, focusStyles, Z_INDEXES.active);
31
+ export var StyledTableBodyRow = styled.tr(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n outline: none;\n background-color: ", ";\n \n &:not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n\n &.selected{\n background-color: ", ";\n }\n \n &:hover {\n background-color: ", ";\n z-index: ", ";\n }\n\n &:focus {\n ", "\n }\n\n &:active {\n z-index: ", ";\n }\n\n"])), COLORS.white, COLORS.neutral_200, COLORS.primary_100, COLORS.primary_100, Z_INDEXES.hover, focusStyles, Z_INDEXES.active);
32
32
  export var StyledTableNoRowsLabelRow = styled.tr(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n position: relative;\n outline: none;\n background-color: ", ";\n"])), COLORS.neutral_50);
33
- export var StyledTableBody = styled.tbody(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", ":nth-child(odd):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ", ";\n }\n\n ", ":nth-child(even):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ", ";\n }\n"])), StyledTableBodyRow, COLORS.neutral_50, StyledTableBodyRow, COLORS.neutral_20);
33
+ export var StyledTableBody = styled.tbody(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n"])));
34
34
  export var StyledTableCell = styled.td(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral([""])));
35
35
  export var StyledTableCellContent = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n min-height: 48px;\n\n padding: 0 16px;\n ", "\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 ", "{\n width: fit-content;\n }\n"])), ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), StyledCheckBox);
36
36
  export var StyledTableCellIcon = styled.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n width: 24px;\n height: 24px;\n\n svg {\n color: ", ";\n width: 24px;\n height: 24px;\n }\n"])), COLORS.neutral_700, COLORS.neutral_700);
@@ -1 +1 @@
1
- {"version":3,"file":"TableStyles.js","names":["styled","COLORS","focusStyles","scrollBarStyling","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","Z_INDEXES","StyledCheckBox","Size","TableWrapper","div","StyledTable","table","StyledTableHeader","StyledTableHeaderTitle","StyledTableHeaderTitleContent","neutral_200","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","primary_200","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\n\nexport const StyledTable = styled.table`\n background: transparent;\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\n &.selected{\n background-color: ${COLORS.primary_100};\n }\n \n &:hover {\n background-color: ${COLORS.primary_200};\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 ${StyledTableBodyRow}:nth-child(odd):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ${COLORS.neutral_50};\n }\n\n ${StyledTableBodyRow}:nth-child(even):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ${COLORS.neutral_20};\n }\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,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,8FAErC;AAGD,OAAO,IAAMC,WAAW,GAAGd,MAAM,CAACe,KAAK,+MAWtC;AAED,OAAO,IAAMC,iBAAiB,GAAGhB,MAAM,CAACa,GAAG,yEAC1C;AAED,OAAO,IAAMI,sBAAsB,GAAGjB,MAAM,CAACa,GAAG,yEAC/C;AAED,OAAO,IAAMK,6BAA6B,GAAGlB,MAAM,CAACa,GAAG,sWAO1BZ,MAAM,CAACkB,WAAW,EACrBlB,MAAM,CAACkB,WAAW,EAGxCf,iBAAiB,CAACG,kBAAkB,CAACa,IAAI,EAAEnB,MAAM,CAACoB,KAAK,CAAC,CAI3D;AAED,OAAO,IAAMC,oBAAoB,GAAGtB,MAAM,CAACuB,KAAK,yEAC/C;AAED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AACQ,IAAI,CAACmD,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","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,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,CA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AW,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 +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 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'> | 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\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":""}
@@ -9,6 +9,7 @@ export interface TableProps {
9
9
  title?: string;
10
10
  columns: TableColumn[];
11
11
  rows: any[];
12
+ border?: boolean;
12
13
  accordion?: boolean;
13
14
  collapsed?: boolean;
14
15
  collapsedRows?: number;
@@ -47,7 +48,7 @@ export interface TableColumn {
47
48
  shortenText?: boolean;
48
49
  action?: (row: any, event: any) => void;
49
50
  type?: TableColumnTypes;
50
- additionalProps?: Pick<ButtonProps, 'variant' | 'size' | 'width' | 'icon'> | Pick<IconButtonProps, 'variant' | 'shape' | 'disabled'> | Pick<HyperlinkProps, 'variant'>;
51
+ additionalProps?: Pick<ButtonProps, 'variant' | 'size' | 'width' | 'icon'> | Pick<IconButtonProps, 'variant' | 'shape' | 'disabled' | 'tooltip'> | Pick<HyperlinkProps, 'variant'>;
51
52
  customContent?: (row: any, key: string) => any;
52
53
  sortable?: boolean;
53
54
  }
@@ -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 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'> | 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\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":""}
@@ -15,11 +15,9 @@ var React = _interopRequireWildcard(require("react"));
15
15
  var _types = require("../types");
16
16
  var _styles = require("../styles");
17
17
  var _styledComponents = _interopRequireDefault(require("styled-components"));
18
- var _typography = require("../styles/typography");
19
- var _zIndexes = require("../styles/z-indexes");
20
18
  var _common = require("../common");
21
19
  var _jsxRuntime = require("react/jsx-runtime");
22
- var _excluded = ["size", "tabs", "sideFill", "fullWidth", "onTabChange"],
20
+ var _excluded = ["size", "tabs", "sideFill", "fullWidth", "onTabChange", "variant"],
23
21
  _excluded2 = ["value", "selected", "to", "disabled", "className"];
24
22
  var _templateObject, _templateObject2, _templateObject3;
25
23
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -27,9 +25,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
27
25
  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; }
28
26
  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; }
29
27
  // Add custom styles
30
- var HorizontalTabContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n display: flex;\n position: relative;\n flex-direction: row;\n\n &:focus{\n ", ";\n }\n \n"])), _styles.focusStyles);
28
+ var HorizontalTabContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n display: flex;\n position: relative;\n flex-direction: row;\n\n &:focus {\n ", ";\n }\n\n"])), _styles.focusStyles);
31
29
  var TabSideFill = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n border-bottom: 1px solid ", ";\n bottom: 0;\n width: 100%;\n\n &.fill {\n background: ", ";\n }\n"])), _styles.COLORS.neutral_100, _styles.COLORS.white);
32
- var TabButton = _styledComponents.default.button(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n border: none;\n background-color: transparent;\n cursor: pointer;\n padding: 0px;\n\n &:hover {\n z-index: ", ";\n div {\n background: ", ";\n color: ", ";\n\n &[aria-selected=\"true\"] {\n border-top: 2px solid ", ";\n border-bottom: 0px;\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n }\n }\n &[aria-selected=\"true\"] {\n z-index: ", ";\n }\n\n div {\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n &:hover {\n background: ", ";\n color: ", ";\n\n &.selected {\n border-top: 2px solid ", ";\n border-bottom: 0px;\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n }\n\n &.selected {\n background-color: ", ";\n border-top: 2px solid ", ";\n border-bottom: 0px;\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n\n &:active {\n background: ", ";\n color: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n outline: none;\n\n &.selected {\n border-top: 2px solid ", ";\n border-bottom: 0px;\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n cursor: not-allowed;\n box-shadow: none !important;\n\n &:hover {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.size-", " {\n ", "\n padding: 0px 16px;\n height: 32px;\n margin-top: 16px;\n }\n\n &.size-", " {\n ", "\n padding: 0px 16px;\n height: 40px;\n margin-top: 8px;\n }\n\n &.size-", " {\n ", "\n height: 48px;\n min-width: 96px;\n padding: 0px 16px;\n }\n\n &.size-", " {\n ", "\n height: 56px;\n min-width: 144px;\n padding: 0px 16px;\n }\n }\n"])), _styles.COLORS.neutral_800, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _styles.COLORS.primary_700, _styles.COLORS.neutral_100, _styles.COLORS.neutral_100, _zIndexes.Z_INDEXES.active, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _styles.COLORS.primary_700, _styles.COLORS.neutral_100, _styles.COLORS.neutral_100, _styles.COLORS.white, _styles.COLORS.primary_500, _styles.COLORS.neutral_100, _styles.COLORS.neutral_100, _styles.COLORS.primary_100, _styles.COLORS.primary_800, _styles.COLORS.focus_25, _styles.COLORS.focus, _styles.COLORS.primary_800, _styles.COLORS.neutral_100, _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, _styles.COLORS.neutral_300, _types.Size.XSmall, (0, _typography.ComponentXSStyling)(_styles.ComponentTextStyle.Regular, null), _types.Size.Small, (0, _typography.ComponentSStyling)(_styles.ComponentTextStyle.Regular, null), _types.Size.Medium, (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, null), _types.Size.Large, (0, _typography.ComponentLStyling)(_styles.ComponentTextStyle.Regular, null));
30
+ var TabButton = _styledComponents.default.button(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n border: none;\n background-color: transparent;\n position: relative;\n cursor: pointer;\n display: flex;\n box-sizing: border-box;\n justify-content: center;\n align-items: center;\n padding: 0;\n\n &[aria-selected=\"true\"] {\n z-index: ", ";\n }\n\n &.floating {\n border-radius: 2px;\n }\n \n &.selected {\n background-color: ", ";\n color: ", ";\n }\n\n &.selected.floating {\n background-color: ", ";\n }\n\n &.default {\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n }\n \n &.default.selected {\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n\n &.selected:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: -1px;\n right: -1px;\n height: 2px;\n background-color: ", ";\n }\n\n &.selected.floating:after {\n top: unset;\n bottom: 1px;\n left: 1px;\n right: 1px;\n height: 2px;\n border-radius: 2px;\n background-color: ", ";\n }\n\n\n &:hover, &:hover.selected {\n background: ", ";\n color: ", ";\n }\n\n &:hover:after {\n background-color: ", ";\n }\n\n &:active, &:active.selected {\n background: ", ";\n color: ", ";\n outline: none;\n }\n\n &:active:after {\n background-color: ", ";\n }\n\n &:disabled {\n color: ", ";\n background: transparent;\n cursor: not-allowed;\n }\n\n // Sizes\n &.", " {\n ", "\n padding: 0px 16px;\n height: 32px;\n margin-top: 16px;\n }\n\n &.", " {\n ", "\n padding: 0px 16px;\n height: 40px;\n margin-top: 8px;\n }\n\n &.", " {\n ", "\n height: 48px;\n min-width: 96px;\n padding: 0 16px;\n }\n\n &.", " {\n ", "\n height: 56px;\n min-width: 144px;\n padding: 0 16px;\n }\n"])), _styles.COLORS.neutral_600, _styles.Z_INDEXES.active, _styles.COLORS.white, _styles.COLORS.neutral_800, _styles.COLORS.neutral_20, _styles.COLORS.neutral_100, _styles.COLORS.neutral_100, _styles.COLORS.primary_500, _styles.COLORS.primary_500, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _styles.COLORS.primary_700, _styles.COLORS.primary_100, _styles.COLORS.primary_800, _styles.COLORS.primary_800, _styles.COLORS.neutral_300, _types.Size.XSmall, (0, _styles.ComponentXSStyling)(_styles.ComponentTextStyle.Regular, null), _types.Size.Small, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Regular, null), _types.Size.Medium, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Regular, null), _types.Size.Large, (0, _styles.ComponentLStyling)(_styles.ComponentTextStyle.Regular, null));
33
31
 
34
32
  // Add component-specific types
35
33
 
@@ -39,6 +37,7 @@ var HorizontalTabs = function HorizontalTabs(_ref) {
39
37
  sideFill = _ref.sideFill,
40
38
  fullWidth = _ref.fullWidth,
41
39
  onTabChange = _ref.onTabChange,
40
+ variant = _ref.variant,
42
41
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
43
42
  /**
44
43
  * Informs parent component of tab change and clears focus.
@@ -118,7 +117,7 @@ var HorizontalTabs = function HorizontalTabs(_ref) {
118
117
  role: "tablist",
119
118
  "data-testid": 'horizontal-tabs-container'
120
119
  }, rest), {}, {
121
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(TabSideFill, {
120
+ children: [variant !== 'floating' && /*#__PURE__*/(0, _jsxRuntime.jsx)(TabSideFill, {
122
121
  tabIndex: -1,
123
122
  className: "".concat(sideFill ? 'fill' : '')
124
123
  }), tabs.map(function (tab, index) {
@@ -138,15 +137,13 @@ var HorizontalTabs = function HorizontalTabs(_ref) {
138
137
  style: fullWidth ? {
139
138
  width: "".concat(100 / tabs.length, "%")
140
139
  } : {},
141
- className: "".concat(className || '', " size-").concat(size),
140
+ disabled: disabled,
141
+ className: "".concat(className || '', " ").concat(size, " ").concat(variant || 'default', " ").concat(tab.selected ? 'selected' : ''),
142
142
  onClick: function onClick() {
143
143
  return !disabled && changeTabInternal(tab);
144
144
  }
145
145
  }, rest), {}, {
146
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
147
- className: "size-".concat(size, " ").concat(tab.selected ? 'selected' : '', " ").concat(tab.disabled ? 'disabled' : ''),
148
- children: tab.value
149
- })
146
+ children: tab.value
150
147
  }), "".concat(tab, "_").concat(index));
151
148
  })]
152
149
  }));
@@ -159,7 +156,8 @@ HorizontalTabs.propTypes = {
159
156
  })).isRequired,
160
157
  sideFill: _propTypes.default.bool,
161
158
  fullWidth: _propTypes.default.bool,
162
- onTabChange: _propTypes.default.func.isRequired
159
+ onTabChange: _propTypes.default.func.isRequired,
160
+ variant: _propTypes.default.oneOf(['default', 'floating'])
163
161
  };
164
162
  var _default = HorizontalTabs;
165
163
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalTabs.cjs","names":["HorizontalTabContainer","styled","div","focusStyles","TabSideFill","COLORS","neutral_100","white","TabButton","button","neutral_800","Z_INDEXES","hover","primary_20","primary_700","active","primary_500","primary_100","primary_800","focus_25","focus","neutral_300","Size","XSmall","ComponentXSStyling","ComponentTextStyle","Regular","Small","ComponentSStyling","Medium","ComponentMStyling","Large","ComponentLStyling","HorizontalTabs","size","tabs","sideFill","fullWidth","onTabChange","rest","doTabChange","to","document","activeElement","HTMLElement","blur","React","useState","focused","setFocused","currentTab","setCurrentTab","useEffect","selectedTab","find","x","selected","disabled","tabListBlur","tabListFocus","e","changeTabInternal","tab","forEach","tabListKeyDown","key","preventDefault","i","j","length","nextIndex","map","index","value","className","defaultOnMouseDownHandler","width"],"sources":["../../src/Tabs/HorizontalTabs.tsx"],"sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\nimport { Size } from '../types';\n\n/**\n * Import custom styles.\n */\nimport { COLORS, ComponentTextStyle, focusStyles } from '../styles';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXSStyling } from '../styles/typography';\nimport { Z_INDEXES } from '../styles/z-indexes';\nimport { defaultOnMouseDownHandler } from '../common';\n\n// Add custom styles\nconst HorizontalTabContainer = styled.div`\n width: 100%;\n display: flex;\n position: relative;\n flex-direction: row;\n\n &:focus{\n ${focusStyles};\n }\n \n`;\n\nconst TabSideFill = styled.div`\n position: absolute;\n border-bottom: 1px solid ${COLORS.neutral_100};\n bottom: 0;\n width: 100%;\n\n &.fill {\n background: ${COLORS.white};\n }\n`;\n\nconst TabButton = styled.button`\n color: ${COLORS.neutral_800};\n border: none;\n background-color: transparent;\n cursor: pointer;\n padding: 0px;\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n div {\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n\n &[aria-selected=\"true\"] {\n border-top: 2px solid ${COLORS.primary_700};\n border-bottom: 0px;\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n }\n }\n &[aria-selected=\"true\"] {\n z-index: ${Z_INDEXES.active};\n }\n\n div {\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n &:hover {\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n\n &.selected {\n border-top: 2px solid ${COLORS.primary_700};\n border-bottom: 0px;\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n }\n\n &.selected {\n background-color: ${COLORS.white};\n border-top: 2px solid ${COLORS.primary_500};\n border-bottom: 0px;\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n\n &:active {\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n outline: none;\n\n &.selected {\n border-top: 2px solid ${COLORS.primary_800};\n border-bottom: 0px;\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n cursor: not-allowed;\n box-shadow: none !important;\n\n &:hover {\n background-color: transparent;\n color: ${COLORS.neutral_300};\n }\n }\n\n &.size-${Size.XSmall} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n padding: 0px 16px;\n height: 32px;\n margin-top: 16px;\n }\n\n &.size-${Size.Small} {\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n padding: 0px 16px;\n height: 40px;\n margin-top: 8px;\n }\n\n &.size-${Size.Medium} {\n ${ComponentMStyling(ComponentTextStyle.Regular, null)}\n height: 48px;\n min-width: 96px;\n padding: 0px 16px;\n }\n\n &.size-${Size.Large} {\n ${ComponentLStyling(ComponentTextStyle.Regular, null)}\n height: 56px;\n min-width: 144px;\n padding: 0px 16px;\n }\n }\n`;\n\n// Add component-specific types\ninterface HorizontalTabProps extends React.HTMLAttributes<HTMLDivElement>{\n size: Size;\n tabs: HorizontalTab[];\n sideFill?: boolean;\n fullWidth?: boolean;\n onTabChange: (to: string) => void;\n}\n\nexport interface HorizontalTab extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'tabIndex' | 'onMouseDown' | 'onClick' | 'style'> {\n value: string;\n selected: boolean;\n to: string;\n}\n\nconst HorizontalTabs = ({ size, tabs, sideFill, fullWidth, onTabChange, ...rest }: HorizontalTabProps) => {\n /**\n * Informs parent component of tab change and clears focus.\n * @param to - A link to which user should be navigated.\n */\n const doTabChange = (to: string): void => {\n // Let's inform parent component\n onTabChange(to);\n\n // Let's clear focus\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement!.blur();\n }\n };\n\n const [focused, setFocused ] = React.useState<boolean>(false);\n const [currentTab, setCurrentTab] = React.useState<string>();\n\n React.useEffect(() => {\n const selectedTab = tabs.find(x => x.selected && !x.disabled);\n if(selectedTab)\n setCurrentTab(selectedTab.to);\n }, [tabs]);\n\n const tabListBlur = () => setFocused(false);\n\n const tabListFocus = (e: React.FocusEvent<HTMLDivElement, Element>) => setFocused(true);\n\n const changeTabInternal = (tab: HorizontalTab) => {\n tab.selected = true;\n tabs.forEach(x => {\n if(x.to != tab.to)\n x.selected = false;\n });\n setCurrentTab(tab.to);\n onTabChange(tab.to);\n }\n\n const tabListKeyDown = (e:React.KeyboardEvent) => {\n if (focused && (e.key === 'ArrowLeft' || e.key === 'ArrowRight')) {\n e.preventDefault();\n if(e.key === 'ArrowRight')\n {\n tabs.forEach((x, i) => {\n if(x.to != currentTab)\n return;\n\n for(let j = 1; j < tabs.length - 1; j++)\n {\n let nextIndex = j + i;\n if(nextIndex > tabs.length - 1)\n nextIndex = nextIndex - tabs.length;\n if(tabs[nextIndex].disabled)\n continue;\n changeTabInternal(tabs[nextIndex]);\n break;\n }\n });\n }\n\n if(e.key === 'ArrowLeft')\n {\n tabs.forEach((x, i) => {\n if(x.to != currentTab)\n return;\n\n for(let j = 1; j < tabs.length - 1; j++)\n {\n let nextIndex = i - j;\n if(nextIndex < 0)\n nextIndex = nextIndex + tabs.length;\n if(tabs[nextIndex].disabled)\n continue;\n changeTabInternal(tabs[nextIndex]);\n break;\n }\n });\n }\n }\n };\n\n return (\n <HorizontalTabContainer tabIndex={0} onBlur={tabListBlur} onFocus={tabListFocus} onKeyDown={tabListKeyDown} role=\"tablist\" data-testid={'horizontal-tabs-container'} {...rest}>\n <TabSideFill tabIndex={-1} className={`${sideFill ? 'fill' : ''}`} />\n {tabs.map((tab: HorizontalTab, index: number) => {\n const { value, selected, to, disabled, className, ...rest } = tab;\n return (\n <TabButton\n role=\"tab\"\n data-testid={`tab_${value}`}\n key={`${tab}_${index}`}\n aria-selected={selected}\n aria-expanded={selected}\n tabIndex={-1}\n onMouseDown={defaultOnMouseDownHandler}\n style={fullWidth ? {width: `${100 / tabs.length}%`} : {}}\n className={`${className || ''} size-${size}`}\n onClick={() => !disabled && changeTabInternal(tab)}\n {...rest}>\n <div\n className={`size-${size} ${tab.selected ? 'selected' : ''} ${tab.disabled ? 'disabled' : ''}`}>{tab.value}</div>\n </TabButton>\n );\n })}\n </HorizontalTabContainer>\n );\n};\n\nexport default HorizontalTabs;\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;QACxB,iBAAeA,QAAS;QACxB,QAAQ,EAAE,CAAC,CAAE;QACb,WAAW,EAAEmB,iCAA0B;QACvC,KAAK,EAAEtC,SAAS,GAAG;UAACuC,KAAK,YAAK,GAAG,GAAGzC,IAAI,CAACkC,MAAM;QAAG,CAAC,GAAG,CAAC,CAAE;QACzD,SAAS,YAAKK,SAAS,IAAI,EAAE,mBAASxC,IAAI,CAAG;QAC7C,OAAO,EAAE;UAAA,OAAM,CAACuB,QAAQ,IAAII,iBAAiB,CAACC,GAAG,CAAC;QAAA;MAAC,GAC/CvB,IAAI;QAAA,uBACR;UACE,SAAS,iBAAUL,IAAI,cAAI4B,GAAG,CAACN,QAAQ,GAAG,UAAU,GAAG,EAAE,cAAIM,GAAG,CAACL,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAG;UAAA,UAAEK,GAAG,CAACW;QAAK;MAAO,cAV1GX,GAAG,cAAIU,KAAK,EAWV;IAEhB,CAAC,CAAC;EAAA,GACqB;AAE7B,CAAC;AAAC;EAtHArC,IAAI;IAOJsC,KAAK;IACLjB,QAAQ;IACRf,EAAE;EAAA;EARFL,QAAQ;EACRC,SAAS;EACTC,WAAW;AAAA;AAAA,eAqHEL,cAAc;AAAA"}
1
+ {"version":3,"file":"HorizontalTabs.cjs","names":["HorizontalTabContainer","styled","div","focusStyles","TabSideFill","COLORS","neutral_100","white","TabButton","button","neutral_600","Z_INDEXES","active","neutral_800","neutral_20","primary_500","primary_20","primary_700","primary_100","primary_800","neutral_300","Size","XSmall","ComponentXSStyling","ComponentTextStyle","Regular","Small","ComponentSStyling","Medium","ComponentMStyling","Large","ComponentLStyling","HorizontalTabs","size","tabs","sideFill","fullWidth","onTabChange","variant","rest","doTabChange","to","document","activeElement","HTMLElement","blur","React","useState","focused","setFocused","currentTab","setCurrentTab","useEffect","selectedTab","find","x","selected","disabled","tabListBlur","tabListFocus","e","changeTabInternal","tab","forEach","tabListKeyDown","key","preventDefault","i","j","length","nextIndex","map","index","value","className","defaultOnMouseDownHandler","width"],"sources":["../../src/Tabs/HorizontalTabs.tsx"],"sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\nimport {Size} from '../types';\n\n/**\n * Import custom styles.\n */\nimport {COLORS, ComponentTextStyle, focusStyles} from '../styles';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport {ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXSStyling} from '../styles';\nimport {Z_INDEXES} from '../styles';\nimport {defaultOnMouseDownHandler} from '../common';\nimport Colors from \"../styles/colors\";\n\n// Add custom styles\nconst HorizontalTabContainer = styled.div`\n width: 100%;\n display: flex;\n position: relative;\n flex-direction: row;\n\n &:focus {\n ${focusStyles};\n }\n\n`;\n\nconst TabSideFill = styled.div`\n position: absolute;\n border-bottom: 1px solid ${COLORS.neutral_100};\n bottom: 0;\n width: 100%;\n\n &.fill {\n background: ${COLORS.white};\n }\n`;\n\nconst TabButton = styled.button`\n color: ${COLORS.neutral_600};\n border: none;\n background-color: transparent;\n position: relative;\n cursor: pointer;\n display: flex;\n box-sizing: border-box;\n justify-content: center;\n align-items: center;\n padding: 0;\n\n &[aria-selected=\"true\"] {\n z-index: ${Z_INDEXES.active};\n }\n\n &.floating {\n border-radius: 2px;\n }\n \n &.selected {\n background-color: ${COLORS.white};\n color: ${COLORS.neutral_800};\n }\n\n &.selected.floating {\n background-color: ${COLORS.neutral_20};\n }\n\n &.default {\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n }\n \n &.default.selected {\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n\n &.selected:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: -1px;\n right: -1px;\n height: 2px;\n background-color: ${COLORS.primary_500};\n }\n\n &.selected.floating:after {\n top: unset;\n bottom: 1px;\n left: 1px;\n right: 1px;\n height: 2px;\n border-radius: 2px;\n background-color: ${COLORS.primary_500};\n }\n\n\n &:hover, &:hover.selected {\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n\n &:hover:after {\n background-color: ${COLORS.primary_700};\n }\n\n &:active, &:active.selected {\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n outline: none;\n }\n\n &:active:after {\n background-color: ${COLORS.primary_800};\n }\n\n &:disabled {\n color: ${COLORS.neutral_300};\n background: transparent;\n cursor: not-allowed;\n }\n\n // Sizes\n &.${Size.XSmall} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n padding: 0px 16px;\n height: 32px;\n margin-top: 16px;\n }\n\n &.${Size.Small} {\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n padding: 0px 16px;\n height: 40px;\n margin-top: 8px;\n }\n\n &.${Size.Medium} {\n ${ComponentMStyling(ComponentTextStyle.Regular, null)}\n height: 48px;\n min-width: 96px;\n padding: 0 16px;\n }\n\n &.${Size.Large} {\n ${ComponentLStyling(ComponentTextStyle.Regular, null)}\n height: 56px;\n min-width: 144px;\n padding: 0 16px;\n }\n`;\n\n// Add component-specific types\ninterface HorizontalTabProps extends React.HTMLAttributes<HTMLDivElement> {\n size: Size;\n tabs: HorizontalTab[];\n sideFill?: boolean;\n fullWidth?: boolean;\n onTabChange: (to: string) => void;\n variant?: 'default' | 'floating';\n}\n\nexport interface HorizontalTab extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'tabIndex' | 'onMouseDown' | 'onClick' | 'style'> {\n value: string;\n selected: boolean;\n to: string;\n}\n\nconst HorizontalTabs = ({size, tabs, sideFill, fullWidth, onTabChange, variant, ...rest}: HorizontalTabProps) => {\n /**\n * Informs parent component of tab change and clears focus.\n * @param to - A link to which user should be navigated.\n */\n const doTabChange = (to: string): void => {\n // Let's inform parent component\n onTabChange(to);\n\n // Let's clear focus\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement!.blur();\n }\n };\n\n const [focused, setFocused] = React.useState<boolean>(false);\n const [currentTab, setCurrentTab] = React.useState<string>();\n\n React.useEffect(() => {\n const selectedTab = tabs.find(x => x.selected && !x.disabled);\n if (selectedTab)\n setCurrentTab(selectedTab.to);\n }, [tabs]);\n\n const tabListBlur = () => setFocused(false);\n\n const tabListFocus = (e: React.FocusEvent<HTMLDivElement, Element>) => setFocused(true);\n\n const changeTabInternal = (tab: HorizontalTab) => {\n tab.selected = true;\n tabs.forEach(x => {\n if (x.to != tab.to)\n x.selected = false;\n });\n setCurrentTab(tab.to);\n onTabChange(tab.to);\n }\n\n const tabListKeyDown = (e: React.KeyboardEvent) => {\n if (focused && (e.key === 'ArrowLeft' || e.key === 'ArrowRight')) {\n e.preventDefault();\n if (e.key === 'ArrowRight') {\n tabs.forEach((x, i) => {\n if (x.to != currentTab)\n return;\n\n for (let j = 1; j < tabs.length - 1; j++) {\n let nextIndex = j + i;\n if (nextIndex > tabs.length - 1)\n nextIndex = nextIndex - tabs.length;\n if (tabs[nextIndex].disabled)\n continue;\n changeTabInternal(tabs[nextIndex]);\n break;\n }\n });\n }\n\n if (e.key === 'ArrowLeft') {\n tabs.forEach((x, i) => {\n if (x.to != currentTab)\n return;\n\n for (let j = 1; j < tabs.length - 1; j++) {\n let nextIndex = i - j;\n if (nextIndex < 0)\n nextIndex = nextIndex + tabs.length;\n if (tabs[nextIndex].disabled)\n continue;\n changeTabInternal(tabs[nextIndex]);\n break;\n }\n });\n }\n }\n };\n\n return (\n <HorizontalTabContainer tabIndex={0} onBlur={tabListBlur} onFocus={tabListFocus} onKeyDown={tabListKeyDown}\n role=\"tablist\" data-testid={'horizontal-tabs-container'} {...rest}>\n {\n variant !== 'floating' && <TabSideFill tabIndex={-1} className={`${sideFill ? 'fill' : ''}`}/>\n }\n {tabs.map((tab: HorizontalTab, index: number) => {\n const {value, selected, to, disabled, className, ...rest} = tab;\n return (\n <TabButton\n role=\"tab\"\n data-testid={`tab_${value}`}\n key={`${tab}_${index}`}\n aria-selected={selected}\n aria-expanded={selected}\n tabIndex={-1}\n onMouseDown={defaultOnMouseDownHandler}\n style={fullWidth ? {width: `${100 / tabs.length}%`} : {}}\n disabled={disabled}\n className={`${className || ''} ${size} ${variant || 'default'} ${tab.selected ? 'selected' : ''}`}\n onClick={() => !disabled && changeTabInternal(tab)}\n {...rest}>\n {tab.value}\n </TabButton>\n );\n })}\n </HorizontalTabContainer>\n );\n};\n\nexport default HorizontalTabs;\n"],"mappings":";;;;;;;;;;;;;AAGA;AACA;AAKA;AAKA;AAGA;AAAoD;AAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGpD;AACA,IAAMA,sBAAsB,GAAGC,yBAAM,CAACC,GAAG,wMAOnCC,mBAAW,CAGhB;AAED,IAAMC,WAAW,GAAGH,yBAAM,CAACC,GAAG,yNAEDG,cAAM,CAACC,WAAW,EAK7BD,cAAM,CAACE,KAAK,CAE7B;AAED,IAAMC,SAAS,GAAGP,yBAAM,CAACQ,MAAM,u1DACpBJ,cAAM,CAACK,WAAW,EAYdC,iBAAS,CAACC,MAAM,EAQPP,cAAM,CAACE,KAAK,EACvBF,cAAM,CAACQ,WAAW,EAIPR,cAAM,CAACS,UAAU,EASZT,cAAM,CAACC,WAAW,EACjBD,cAAM,CAACC,WAAW,EAUxBD,cAAM,CAACU,WAAW,EAUlBV,cAAM,CAACU,WAAW,EAKxBV,cAAM,CAACW,UAAU,EACtBX,cAAM,CAACY,WAAW,EAIPZ,cAAM,CAACY,WAAW,EAIxBZ,cAAM,CAACa,WAAW,EACvBb,cAAM,CAACc,WAAW,EAKPd,cAAM,CAACc,WAAW,EAI7Bd,cAAM,CAACe,WAAW,EAMzBC,WAAI,CAACC,MAAM,EACX,IAAAC,0BAAkB,EAACC,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAMpDJ,WAAI,CAACK,KAAK,EACV,IAAAC,yBAAiB,EAACH,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAMnDJ,WAAI,CAACO,MAAM,EACX,IAAAC,yBAAiB,EAACL,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAMnDJ,W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AS;QACxB,QAAQ,EAAE,CAAC,CAAE;QACb,WAAW,EAAEmB,iCAA0B;QACvC,KAAK,EAAEvC,SAAS,GAAG;UAACwC,KAAK,YAAK,GAAG,GAAG1C,IAAI,CAACmC,MAAM;QAAG,CAAC,GAAG,CAAC,CAAE;QACzD,QAAQ,EAAEZ,QAAS;QACnB,SAAS,YAAKiB,SAAS,IAAI,EAAE,cAAIzC,IAAI,cAAIK,OAAO,IAAI,SAAS,cAAIwB,GAAG,CAACN,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAG;QAClG,OAAO,EAAE;UAAA,OAAM,CAACC,QAAQ,IAAII,iBAAiB,CAACC,GAAG,CAAC;QAAA;MAAC,GAC/CvB,IAAI;QAAA,UACPuB,GAAG,CAACW;MAAK,cAVFX,GAAG,cAAIU,KAAK,EAWV;IAEhB,CAAC,CAAC;EAAA,GACqB;AAE7B,CAAC;AAAC;EAtHAtC,IAAI;IAQJuC,KAAK;IACLjB,QAAQ;IACRf,EAAE;EAAA;EATFN,QAAQ;EACRC,SAAS;EACTC,WAAW;EACXC,OAAO,4BAAG,SAAS,EAAG,UAAU;AAAA;AAAA,eAoHnBN,cAAc;AAAA"}
@@ -9,11 +9,12 @@ interface HorizontalTabProps extends React.HTMLAttributes<HTMLDivElement> {
9
9
  sideFill?: boolean;
10
10
  fullWidth?: boolean;
11
11
  onTabChange: (to: string) => void;
12
+ variant?: 'default' | 'floating';
12
13
  }
13
14
  export interface HorizontalTab extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'tabIndex' | 'onMouseDown' | 'onClick' | 'style'> {
14
15
  value: string;
15
16
  selected: boolean;
16
17
  to: string;
17
18
  }
18
- declare const HorizontalTabs: ({ size, tabs, sideFill, fullWidth, onTabChange, ...rest }: HorizontalTabProps) => JSX.Element;
19
+ declare const HorizontalTabs: ({ size, tabs, sideFill, fullWidth, onTabChange, variant, ...rest }: HorizontalTabProps) => JSX.Element;
19
20
  export default HorizontalTabs;
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
4
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
5
5
  import _pt from "prop-types";
6
- var _excluded = ["size", "tabs", "sideFill", "fullWidth", "onTabChange"],
6
+ var _excluded = ["size", "tabs", "sideFill", "fullWidth", "onTabChange", "variant"],
7
7
  _excluded2 = ["value", "selected", "to", "disabled", "className"];
8
8
  var _templateObject, _templateObject2, _templateObject3;
9
9
  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; }
@@ -23,16 +23,15 @@ import { COLORS, ComponentTextStyle, focusStyles } from '../styles';
23
23
  * Import third-party libraries.
24
24
  */
25
25
  import styled from 'styled-components';
26
- import { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXSStyling } from '../styles/typography';
27
- import { Z_INDEXES } from '../styles/z-indexes';
26
+ import { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXSStyling } from '../styles';
27
+ import { Z_INDEXES } from '../styles';
28
28
  import { defaultOnMouseDownHandler } from '../common';
29
-
30
- // Add custom styles
31
29
  import { jsx as _jsx } from "react/jsx-runtime";
32
30
  import { jsxs as _jsxs } from "react/jsx-runtime";
33
- var HorizontalTabContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n position: relative;\n flex-direction: row;\n\n &:focus{\n ", ";\n }\n \n"])), focusStyles);
31
+ // Add custom styles
32
+ var HorizontalTabContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n position: relative;\n flex-direction: row;\n\n &:focus {\n ", ";\n }\n\n"])), focusStyles);
34
33
  var TabSideFill = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n border-bottom: 1px solid ", ";\n bottom: 0;\n width: 100%;\n\n &.fill {\n background: ", ";\n }\n"])), COLORS.neutral_100, COLORS.white);
35
- var TabButton = styled.button(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n border: none;\n background-color: transparent;\n cursor: pointer;\n padding: 0px;\n\n &:hover {\n z-index: ", ";\n div {\n background: ", ";\n color: ", ";\n\n &[aria-selected=\"true\"] {\n border-top: 2px solid ", ";\n border-bottom: 0px;\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n }\n }\n &[aria-selected=\"true\"] {\n z-index: ", ";\n }\n\n div {\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n &:hover {\n background: ", ";\n color: ", ";\n\n &.selected {\n border-top: 2px solid ", ";\n border-bottom: 0px;\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n }\n\n &.selected {\n background-color: ", ";\n border-top: 2px solid ", ";\n border-bottom: 0px;\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n\n &:active {\n background: ", ";\n color: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n outline: none;\n\n &.selected {\n border-top: 2px solid ", ";\n border-bottom: 0px;\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n cursor: not-allowed;\n box-shadow: none !important;\n\n &:hover {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.size-", " {\n ", "\n padding: 0px 16px;\n height: 32px;\n margin-top: 16px;\n }\n\n &.size-", " {\n ", "\n padding: 0px 16px;\n height: 40px;\n margin-top: 8px;\n }\n\n &.size-", " {\n ", "\n height: 48px;\n min-width: 96px;\n padding: 0px 16px;\n }\n\n &.size-", " {\n ", "\n height: 56px;\n min-width: 144px;\n padding: 0px 16px;\n }\n }\n"])), COLORS.neutral_800, Z_INDEXES.hover, COLORS.primary_20, COLORS.primary_700, COLORS.primary_700, COLORS.neutral_100, COLORS.neutral_100, Z_INDEXES.active, COLORS.primary_20, COLORS.primary_700, COLORS.primary_700, COLORS.neutral_100, COLORS.neutral_100, COLORS.white, COLORS.primary_500, COLORS.neutral_100, COLORS.neutral_100, COLORS.primary_100, COLORS.primary_800, COLORS.focus_25, COLORS.focus, COLORS.primary_800, COLORS.neutral_100, COLORS.neutral_100, COLORS.neutral_300, COLORS.neutral_300, Size.XSmall, ComponentXSStyling(ComponentTextStyle.Regular, null), Size.Small, ComponentSStyling(ComponentTextStyle.Regular, null), Size.Medium, ComponentMStyling(ComponentTextStyle.Regular, null), Size.Large, ComponentLStyling(ComponentTextStyle.Regular, null));
34
+ var TabButton = styled.button(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n border: none;\n background-color: transparent;\n position: relative;\n cursor: pointer;\n display: flex;\n box-sizing: border-box;\n justify-content: center;\n align-items: center;\n padding: 0;\n\n &[aria-selected=\"true\"] {\n z-index: ", ";\n }\n\n &.floating {\n border-radius: 2px;\n }\n \n &.selected {\n background-color: ", ";\n color: ", ";\n }\n\n &.selected.floating {\n background-color: ", ";\n }\n\n &.default {\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n }\n \n &.default.selected {\n border-left: 1px solid ", ";\n border-right: 1px solid ", ";\n }\n\n &.selected:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: -1px;\n right: -1px;\n height: 2px;\n background-color: ", ";\n }\n\n &.selected.floating:after {\n top: unset;\n bottom: 1px;\n left: 1px;\n right: 1px;\n height: 2px;\n border-radius: 2px;\n background-color: ", ";\n }\n\n\n &:hover, &:hover.selected {\n background: ", ";\n color: ", ";\n }\n\n &:hover:after {\n background-color: ", ";\n }\n\n &:active, &:active.selected {\n background: ", ";\n color: ", ";\n outline: none;\n }\n\n &:active:after {\n background-color: ", ";\n }\n\n &:disabled {\n color: ", ";\n background: transparent;\n cursor: not-allowed;\n }\n\n // Sizes\n &.", " {\n ", "\n padding: 0px 16px;\n height: 32px;\n margin-top: 16px;\n }\n\n &.", " {\n ", "\n padding: 0px 16px;\n height: 40px;\n margin-top: 8px;\n }\n\n &.", " {\n ", "\n height: 48px;\n min-width: 96px;\n padding: 0 16px;\n }\n\n &.", " {\n ", "\n height: 56px;\n min-width: 144px;\n padding: 0 16px;\n }\n"])), COLORS.neutral_600, Z_INDEXES.active, COLORS.white, COLORS.neutral_800, COLORS.neutral_20, COLORS.neutral_100, COLORS.neutral_100, COLORS.primary_500, COLORS.primary_500, COLORS.primary_20, COLORS.primary_700, COLORS.primary_700, COLORS.primary_100, COLORS.primary_800, COLORS.primary_800, COLORS.neutral_300, Size.XSmall, ComponentXSStyling(ComponentTextStyle.Regular, null), Size.Small, ComponentSStyling(ComponentTextStyle.Regular, null), Size.Medium, ComponentMStyling(ComponentTextStyle.Regular, null), Size.Large, ComponentLStyling(ComponentTextStyle.Regular, null));
36
35
 
37
36
  // Add component-specific types
38
37
 
@@ -42,6 +41,7 @@ var HorizontalTabs = function HorizontalTabs(_ref) {
42
41
  sideFill = _ref.sideFill,
43
42
  fullWidth = _ref.fullWidth,
44
43
  onTabChange = _ref.onTabChange,
44
+ variant = _ref.variant,
45
45
  rest = _objectWithoutProperties(_ref, _excluded);
46
46
  /**
47
47
  * Informs parent component of tab change and clears focus.
@@ -121,7 +121,7 @@ var HorizontalTabs = function HorizontalTabs(_ref) {
121
121
  role: "tablist",
122
122
  "data-testid": 'horizontal-tabs-container'
123
123
  }, rest), {}, {
124
- children: [/*#__PURE__*/_jsx(TabSideFill, {
124
+ children: [variant !== 'floating' && /*#__PURE__*/_jsx(TabSideFill, {
125
125
  tabIndex: -1,
126
126
  className: "".concat(sideFill ? 'fill' : '')
127
127
  }), tabs.map(function (tab, index) {
@@ -141,15 +141,13 @@ var HorizontalTabs = function HorizontalTabs(_ref) {
141
141
  style: fullWidth ? {
142
142
  width: "".concat(100 / tabs.length, "%")
143
143
  } : {},
144
- className: "".concat(className || '', " size-").concat(size),
144
+ disabled: disabled,
145
+ className: "".concat(className || '', " ").concat(size, " ").concat(variant || 'default', " ").concat(tab.selected ? 'selected' : ''),
145
146
  onClick: function onClick() {
146
147
  return !disabled && changeTabInternal(tab);
147
148
  }
148
149
  }, rest), {}, {
149
- children: /*#__PURE__*/_jsx("div", {
150
- className: "size-".concat(size, " ").concat(tab.selected ? 'selected' : '', " ").concat(tab.disabled ? 'disabled' : ''),
151
- children: tab.value
152
- })
150
+ children: tab.value
153
151
  }), "".concat(tab, "_").concat(index));
154
152
  })]
155
153
  }));
@@ -162,7 +160,8 @@ HorizontalTabs.propTypes = {
162
160
  })).isRequired,
163
161
  sideFill: _pt.bool,
164
162
  fullWidth: _pt.bool,
165
- onTabChange: _pt.func.isRequired
163
+ onTabChange: _pt.func.isRequired,
164
+ variant: _pt.oneOf(['default', 'floating'])
166
165
  };
167
166
  export default HorizontalTabs;
168
167
  //# sourceMappingURL=HorizontalTabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalTabs.js","names":["React","Size","COLORS","ComponentTextStyle","focusStyles","styled","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentXSStyling","Z_INDEXES","defaultOnMouseDownHandler","HorizontalTabContainer","div","TabSideFill","neutral_100","white","TabButton","button","neutral_800","hover","primary_20","primary_700","active","primary_500","primary_100","primary_800","focus_25","focus","neutral_300","XSmall","Regular","Small","Medium","Large","HorizontalTabs","size","tabs","sideFill","fullWidth","onTabChange","rest","doTabChange","to","document","activeElement","HTMLElement","blur","useState","focused","setFocused","currentTab","setCurrentTab","useEffect","selectedTab","find","x","selected","disabled","tabListBlur","tabListFocus","e","changeTabInternal","tab","forEach","tabListKeyDown","key","preventDefault","i","j","length","nextIndex","map","index","value","className","width"],"sources":["../../src/Tabs/HorizontalTabs.tsx"],"sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\nimport { Size } from '../types';\n\n/**\n * Import custom styles.\n */\nimport { COLORS, ComponentTextStyle, focusStyles } from '../styles';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXSStyling } from '../styles/typography';\nimport { Z_INDEXES } from '../styles/z-indexes';\nimport { defaultOnMouseDownHandler } from '../common';\n\n// Add custom styles\nconst HorizontalTabContainer = styled.div`\n width: 100%;\n display: flex;\n position: relative;\n flex-direction: row;\n\n &:focus{\n ${focusStyles};\n }\n \n`;\n\nconst TabSideFill = styled.div`\n position: absolute;\n border-bottom: 1px solid ${COLORS.neutral_100};\n bottom: 0;\n width: 100%;\n\n &.fill {\n background: ${COLORS.white};\n }\n`;\n\nconst TabButton = styled.button`\n color: ${COLORS.neutral_800};\n border: none;\n background-color: transparent;\n cursor: pointer;\n padding: 0px;\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n div {\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n\n &[aria-selected=\"true\"] {\n border-top: 2px solid ${COLORS.primary_700};\n border-bottom: 0px;\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n }\n }\n &[aria-selected=\"true\"] {\n z-index: ${Z_INDEXES.active};\n }\n\n div {\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n &:hover {\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n\n &.selected {\n border-top: 2px solid ${COLORS.primary_700};\n border-bottom: 0px;\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n }\n\n &.selected {\n background-color: ${COLORS.white};\n border-top: 2px solid ${COLORS.primary_500};\n border-bottom: 0px;\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n\n &:active {\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n outline: none;\n\n &.selected {\n border-top: 2px solid ${COLORS.primary_800};\n border-bottom: 0px;\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n cursor: not-allowed;\n box-shadow: none !important;\n\n &:hover {\n background-color: transparent;\n color: ${COLORS.neutral_300};\n }\n }\n\n &.size-${Size.XSmall} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n padding: 0px 16px;\n height: 32px;\n margin-top: 16px;\n }\n\n &.size-${Size.Small} {\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n padding: 0px 16px;\n height: 40px;\n margin-top: 8px;\n }\n\n &.size-${Size.Medium} {\n ${ComponentMStyling(ComponentTextStyle.Regular, null)}\n height: 48px;\n min-width: 96px;\n padding: 0px 16px;\n }\n\n &.size-${Size.Large} {\n ${ComponentLStyling(ComponentTextStyle.Regular, null)}\n height: 56px;\n min-width: 144px;\n padding: 0px 16px;\n }\n }\n`;\n\n// Add component-specific types\ninterface HorizontalTabProps extends React.HTMLAttributes<HTMLDivElement>{\n size: Size;\n tabs: HorizontalTab[];\n sideFill?: boolean;\n fullWidth?: boolean;\n onTabChange: (to: string) => void;\n}\n\nexport interface HorizontalTab extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'tabIndex' | 'onMouseDown' | 'onClick' | 'style'> {\n value: string;\n selected: boolean;\n to: string;\n}\n\nconst HorizontalTabs = ({ size, tabs, sideFill, fullWidth, onTabChange, ...rest }: HorizontalTabProps) => {\n /**\n * Informs parent component of tab change and clears focus.\n * @param to - A link to which user should be navigated.\n */\n const doTabChange = (to: string): void => {\n // Let's inform parent component\n onTabChange(to);\n\n // Let's clear focus\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement!.blur();\n }\n };\n\n const [focused, setFocused ] = React.useState<boolean>(false);\n const [currentTab, setCurrentTab] = React.useState<string>();\n\n React.useEffect(() => {\n const selectedTab = tabs.find(x => x.selected && !x.disabled);\n if(selectedTab)\n setCurrentTab(selectedTab.to);\n }, [tabs]);\n\n const tabListBlur = () => setFocused(false);\n\n const tabListFocus = (e: React.FocusEvent<HTMLDivElement, Element>) => setFocused(true);\n\n const changeTabInternal = (tab: HorizontalTab) => {\n tab.selected = true;\n tabs.forEach(x => {\n if(x.to != tab.to)\n x.selected = false;\n });\n setCurrentTab(tab.to);\n onTabChange(tab.to);\n }\n\n const tabListKeyDown = (e:React.KeyboardEvent) => {\n if (focused && (e.key === 'ArrowLeft' || e.key === 'ArrowRight')) {\n e.preventDefault();\n if(e.key === 'ArrowRight')\n {\n tabs.forEach((x, i) => {\n if(x.to != currentTab)\n return;\n\n for(let j = 1; j < tabs.length - 1; j++)\n {\n let nextIndex = j + i;\n if(nextIndex > tabs.length - 1)\n nextIndex = nextIndex - tabs.length;\n if(tabs[nextIndex].disabled)\n continue;\n changeTabInternal(tabs[nextIndex]);\n break;\n }\n });\n }\n\n if(e.key === 'ArrowLeft')\n {\n tabs.forEach((x, i) => {\n if(x.to != currentTab)\n return;\n\n for(let j = 1; j < tabs.length - 1; j++)\n {\n let nextIndex = i - j;\n if(nextIndex < 0)\n nextIndex = nextIndex + tabs.length;\n if(tabs[nextIndex].disabled)\n continue;\n changeTabInternal(tabs[nextIndex]);\n break;\n }\n });\n }\n }\n };\n\n return (\n <HorizontalTabContainer tabIndex={0} onBlur={tabListBlur} onFocus={tabListFocus} onKeyDown={tabListKeyDown} role=\"tablist\" data-testid={'horizontal-tabs-container'} {...rest}>\n <TabSideFill tabIndex={-1} className={`${sideFill ? 'fill' : ''}`} />\n {tabs.map((tab: HorizontalTab, index: number) => {\n const { value, selected, to, disabled, className, ...rest } = tab;\n return (\n <TabButton\n role=\"tab\"\n data-testid={`tab_${value}`}\n key={`${tab}_${index}`}\n aria-selected={selected}\n aria-expanded={selected}\n tabIndex={-1}\n onMouseDown={defaultOnMouseDownHandler}\n style={fullWidth ? {width: `${100 / tabs.length}%`} : {}}\n className={`${className || ''} size-${size}`}\n onClick={() => !disabled && changeTabInternal(tab)}\n {...rest}>\n <div\n className={`size-${size} ${tab.selected ? 'selected' : ''} ${tab.disabled ? 'disabled' : ''}`}>{tab.value}</div>\n </TabButton>\n );\n })}\n </HorizontalTabContainer>\n );\n};\n\nexport default HorizontalTabs;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,UAAU;;AAE/B;AACA;AACA;AACA,SAASC,MAAM,EAAEC,kBAAkB,EAAEC,WAAW,QAAQ,WAAW;;AAEnE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAASC,iBAAiB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,sBAAsB;AAClH,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SAASC,yBAAyB,QAAQ,WAAW;;AAErD;AAAA;AAAA;AACA,IAAMC,sBAAsB,GAAGP,MAAM,CAACQ,GAAG,2LAOnCT,WAAW,CAGhB;AAED,IAAMU,WAAW,GAAGT,MAAM,CAACQ,GAAG,2MAEDX,MAAM,CAACa,WAAW,EAK7Bb,MAAM,CAACc,KAAK,CAE7B;AAED,IAAMC,SAAS,GAAGZ,MAAM,CAACa,MAAM,q/DACpBhB,MAAM,CAACiB,WAAW,EAOdT,SAAS,CAACU,KAAK,EAEVlB,MAAM,CAACmB,UAAU,EACtBnB,MAAM,CAACoB,WAAW,EAGDpB,MAAM,CAACoB,WAAW,EAEjBpB,MAAM,CAACa,WAAW,EACjBb,MAAM,CAACa,WAAW,EAKrCL,SAAS,CAACa,MAAM,EASXrB,MAAM,CAACmB,UAAU,EACtBnB,MAAM,CAACoB,WAAW,EAGDpB,MAAM,CAACoB,WAAW,EAEjBpB,MAAM,CAACa,WAAW,EACjBb,MAAM,CAACa,WAAW,EAK1Bb,MAAM,CAACc,KAAK,EACRd,MAAM,CAACsB,WAAW,EAEjBtB,MAAM,CAACa,WAAW,EACjBb,MAAM,CA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 {"version":3,"file":"HorizontalTabs.js","names":["React","Size","COLORS","ComponentTextStyle","focusStyles","styled","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentXSStyling","Z_INDEXES","defaultOnMouseDownHandler","HorizontalTabContainer","div","TabSideFill","neutral_100","white","TabButton","button","neutral_600","active","neutral_800","neutral_20","primary_500","primary_20","primary_700","primary_100","primary_800","neutral_300","XSmall","Regular","Small","Medium","Large","HorizontalTabs","size","tabs","sideFill","fullWidth","onTabChange","variant","rest","doTabChange","to","document","activeElement","HTMLElement","blur","useState","focused","setFocused","currentTab","setCurrentTab","useEffect","selectedTab","find","x","selected","disabled","tabListBlur","tabListFocus","e","changeTabInternal","tab","forEach","tabListKeyDown","key","preventDefault","i","j","length","nextIndex","map","index","value","className","width"],"sources":["../../src/Tabs/HorizontalTabs.tsx"],"sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\nimport {Size} from '../types';\n\n/**\n * Import custom styles.\n */\nimport {COLORS, ComponentTextStyle, focusStyles} from '../styles';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport {ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXSStyling} from '../styles';\nimport {Z_INDEXES} from '../styles';\nimport {defaultOnMouseDownHandler} from '../common';\nimport Colors from \"../styles/colors\";\n\n// Add custom styles\nconst HorizontalTabContainer = styled.div`\n width: 100%;\n display: flex;\n position: relative;\n flex-direction: row;\n\n &:focus {\n ${focusStyles};\n }\n\n`;\n\nconst TabSideFill = styled.div`\n position: absolute;\n border-bottom: 1px solid ${COLORS.neutral_100};\n bottom: 0;\n width: 100%;\n\n &.fill {\n background: ${COLORS.white};\n }\n`;\n\nconst TabButton = styled.button`\n color: ${COLORS.neutral_600};\n border: none;\n background-color: transparent;\n position: relative;\n cursor: pointer;\n display: flex;\n box-sizing: border-box;\n justify-content: center;\n align-items: center;\n padding: 0;\n\n &[aria-selected=\"true\"] {\n z-index: ${Z_INDEXES.active};\n }\n\n &.floating {\n border-radius: 2px;\n }\n \n &.selected {\n background-color: ${COLORS.white};\n color: ${COLORS.neutral_800};\n }\n\n &.selected.floating {\n background-color: ${COLORS.neutral_20};\n }\n\n &.default {\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n }\n \n &.default.selected {\n border-left: 1px solid ${COLORS.neutral_100};\n border-right: 1px solid ${COLORS.neutral_100};\n }\n\n &.selected:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: -1px;\n right: -1px;\n height: 2px;\n background-color: ${COLORS.primary_500};\n }\n\n &.selected.floating:after {\n top: unset;\n bottom: 1px;\n left: 1px;\n right: 1px;\n height: 2px;\n border-radius: 2px;\n background-color: ${COLORS.primary_500};\n }\n\n\n &:hover, &:hover.selected {\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n\n &:hover:after {\n background-color: ${COLORS.primary_700};\n }\n\n &:active, &:active.selected {\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n outline: none;\n }\n\n &:active:after {\n background-color: ${COLORS.primary_800};\n }\n\n &:disabled {\n color: ${COLORS.neutral_300};\n background: transparent;\n cursor: not-allowed;\n }\n\n // Sizes\n &.${Size.XSmall} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n padding: 0px 16px;\n height: 32px;\n margin-top: 16px;\n }\n\n &.${Size.Small} {\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n padding: 0px 16px;\n height: 40px;\n margin-top: 8px;\n }\n\n &.${Size.Medium} {\n ${ComponentMStyling(ComponentTextStyle.Regular, null)}\n height: 48px;\n min-width: 96px;\n padding: 0 16px;\n }\n\n &.${Size.Large} {\n ${ComponentLStyling(ComponentTextStyle.Regular, null)}\n height: 56px;\n min-width: 144px;\n padding: 0 16px;\n }\n`;\n\n// Add component-specific types\ninterface HorizontalTabProps extends React.HTMLAttributes<HTMLDivElement> {\n size: Size;\n tabs: HorizontalTab[];\n sideFill?: boolean;\n fullWidth?: boolean;\n onTabChange: (to: string) => void;\n variant?: 'default' | 'floating';\n}\n\nexport interface HorizontalTab extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'tabIndex' | 'onMouseDown' | 'onClick' | 'style'> {\n value: string;\n selected: boolean;\n to: string;\n}\n\nconst HorizontalTabs = ({size, tabs, sideFill, fullWidth, onTabChange, variant, ...rest}: HorizontalTabProps) => {\n /**\n * Informs parent component of tab change and clears focus.\n * @param to - A link to which user should be navigated.\n */\n const doTabChange = (to: string): void => {\n // Let's inform parent component\n onTabChange(to);\n\n // Let's clear focus\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement!.blur();\n }\n };\n\n const [focused, setFocused] = React.useState<boolean>(false);\n const [currentTab, setCurrentTab] = React.useState<string>();\n\n React.useEffect(() => {\n const selectedTab = tabs.find(x => x.selected && !x.disabled);\n if (selectedTab)\n setCurrentTab(selectedTab.to);\n }, [tabs]);\n\n const tabListBlur = () => setFocused(false);\n\n const tabListFocus = (e: React.FocusEvent<HTMLDivElement, Element>) => setFocused(true);\n\n const changeTabInternal = (tab: HorizontalTab) => {\n tab.selected = true;\n tabs.forEach(x => {\n if (x.to != tab.to)\n x.selected = false;\n });\n setCurrentTab(tab.to);\n onTabChange(tab.to);\n }\n\n const tabListKeyDown = (e: React.KeyboardEvent) => {\n if (focused && (e.key === 'ArrowLeft' || e.key === 'ArrowRight')) {\n e.preventDefault();\n if (e.key === 'ArrowRight') {\n tabs.forEach((x, i) => {\n if (x.to != currentTab)\n return;\n\n for (let j = 1; j < tabs.length - 1; j++) {\n let nextIndex = j + i;\n if (nextIndex > tabs.length - 1)\n nextIndex = nextIndex - tabs.length;\n if (tabs[nextIndex].disabled)\n continue;\n changeTabInternal(tabs[nextIndex]);\n break;\n }\n });\n }\n\n if (e.key === 'ArrowLeft') {\n tabs.forEach((x, i) => {\n if (x.to != currentTab)\n return;\n\n for (let j = 1; j < tabs.length - 1; j++) {\n let nextIndex = i - j;\n if (nextIndex < 0)\n nextIndex = nextIndex + tabs.length;\n if (tabs[nextIndex].disabled)\n continue;\n changeTabInternal(tabs[nextIndex]);\n break;\n }\n });\n }\n }\n };\n\n return (\n <HorizontalTabContainer tabIndex={0} onBlur={tabListBlur} onFocus={tabListFocus} onKeyDown={tabListKeyDown}\n role=\"tablist\" data-testid={'horizontal-tabs-container'} {...rest}>\n {\n variant !== 'floating' && <TabSideFill tabIndex={-1} className={`${sideFill ? 'fill' : ''}`}/>\n }\n {tabs.map((tab: HorizontalTab, index: number) => {\n const {value, selected, to, disabled, className, ...rest} = tab;\n return (\n <TabButton\n role=\"tab\"\n data-testid={`tab_${value}`}\n key={`${tab}_${index}`}\n aria-selected={selected}\n aria-expanded={selected}\n tabIndex={-1}\n onMouseDown={defaultOnMouseDownHandler}\n style={fullWidth ? {width: `${100 / tabs.length}%`} : {}}\n disabled={disabled}\n className={`${className || ''} ${size} ${variant || 'default'} ${tab.selected ? 'selected' : ''}`}\n onClick={() => !disabled && changeTabInternal(tab)}\n {...rest}>\n {tab.value}\n </TabButton>\n );\n })}\n </HorizontalTabContainer>\n );\n};\n\nexport default HorizontalTabs;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAQC,IAAI,QAAO,UAAU;;AAE7B;AACA;AACA;AACA,SAAQC,MAAM,EAAEC,kBAAkB,EAAEC,WAAW,QAAO,WAAW;;AAEjE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAQC,iBAAiB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAO,WAAW;AACrG,SAAQC,SAAS,QAAO,WAAW;AACnC,SAAQC,yBAAyB,QAAO,WAAW;AAAC;AAAA;AAGpD;AACA,IAAMC,sBAAsB,GAAGP,MAAM,CAACQ,GAAG,0LAOnCT,WAAW,CAGhB;AAED,IAAMU,WAAW,GAAGT,MAAM,CAACQ,GAAG,2MAEDX,MAAM,CAACa,WAAW,EAK7Bb,MAAM,CAACc,KAAK,CAE7B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