@laerdal/life-react-components 1.10.3-dev.8.full → 1.11.0

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 (159) hide show
  1. package/dist/Banners/Banner.cjs +51 -43
  2. package/dist/Banners/Banner.cjs.map +1 -1
  3. package/dist/Banners/Banner.d.ts +2 -1
  4. package/dist/Banners/Banner.js +50 -42
  5. package/dist/Banners/Banner.js.map +1 -1
  6. package/dist/Button/DualFunctionButton.cjs +1 -0
  7. package/dist/Button/DualFunctionButton.cjs.map +1 -1
  8. package/dist/Button/DualFunctionButton.js +1 -0
  9. package/dist/Button/DualFunctionButton.js.map +1 -1
  10. package/dist/Button/Iconbutton.cjs +0 -5
  11. package/dist/Button/Iconbutton.cjs.map +1 -1
  12. package/dist/Button/Iconbutton.d.ts +1 -7
  13. package/dist/Button/Iconbutton.js +0 -5
  14. package/dist/Button/Iconbutton.js.map +1 -1
  15. package/dist/ChipsInput/ChipDropdownInput.cjs +1 -0
  16. package/dist/ChipsInput/ChipDropdownInput.cjs.map +1 -1
  17. package/dist/ChipsInput/ChipDropdownInput.js +1 -0
  18. package/dist/ChipsInput/ChipDropdownInput.js.map +1 -1
  19. package/dist/Dropdown/BasicDropdown.cjs +9 -4
  20. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  21. package/dist/Dropdown/BasicDropdown.d.ts +2 -2
  22. package/dist/Dropdown/BasicDropdown.js +9 -4
  23. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  24. package/dist/Dropdown/CommonStyling.cjs +2 -2
  25. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  26. package/dist/Dropdown/CommonStyling.js +2 -2
  27. package/dist/Dropdown/CommonStyling.js.map +1 -1
  28. package/dist/Dropdown/DropdownButton.cjs +8 -4
  29. package/dist/Dropdown/DropdownButton.cjs.map +1 -1
  30. package/dist/Dropdown/DropdownButton.js +8 -4
  31. package/dist/Dropdown/DropdownButton.js.map +1 -1
  32. package/dist/Dropdown/DropdownContent.cjs +94 -53
  33. package/dist/Dropdown/DropdownContent.cjs.map +1 -1
  34. package/dist/Dropdown/DropdownContent.d.ts +3 -1
  35. package/dist/Dropdown/DropdownContent.js +92 -53
  36. package/dist/Dropdown/DropdownContent.js.map +1 -1
  37. package/dist/Dropdown/DropdownFilter.cjs +1 -1
  38. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  39. package/dist/Dropdown/DropdownFilter.js +1 -1
  40. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  41. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs +14 -13
  42. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs.map +1 -1
  43. package/dist/GlobalNavigationBar/GlobalNavigationBar.d.ts +2 -1
  44. package/dist/GlobalNavigationBar/GlobalNavigationBar.js +13 -12
  45. package/dist/GlobalNavigationBar/GlobalNavigationBar.js.map +1 -1
  46. package/dist/GlobalNavigationBar/Logo.cjs +4 -4
  47. package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
  48. package/dist/GlobalNavigationBar/Logo.js +4 -4
  49. package/dist/GlobalNavigationBar/Logo.js.map +1 -1
  50. package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs +70 -36
  51. package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs.map +1 -1
  52. package/dist/GlobalNavigationBar/desktop/DesktopActions.js +68 -36
  53. package/dist/GlobalNavigationBar/desktop/DesktopActions.js.map +1 -1
  54. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +48 -23
  55. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
  56. package/dist/GlobalNavigationBar/desktop/MainMenu.js +47 -23
  57. package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
  58. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs +3 -3
  59. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +1 -1
  60. package/dist/GlobalNavigationBar/desktop/RightSideNav.js +3 -3
  61. package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +1 -1
  62. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +3 -3
  63. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
  64. package/dist/GlobalNavigationBar/desktop/UserMenu.js +3 -3
  65. package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +1 -1
  66. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs +1 -1
  67. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
  68. package/dist/GlobalNavigationBar/mobile/MobileMenu.js +1 -1
  69. package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  70. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs +4 -4
  71. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs.map +1 -1
  72. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js +4 -4
  73. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js.map +1 -1
  74. package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.cjs +60 -31
  75. package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.cjs.map +1 -1
  76. package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.js +59 -31
  77. package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.js.map +1 -1
  78. package/dist/GlobalNavigationBar/types.d.ts +9 -10
  79. package/dist/InputFields/SearchBar.cjs +1 -0
  80. package/dist/InputFields/SearchBar.cjs.map +1 -1
  81. package/dist/InputFields/SearchBar.js +1 -0
  82. package/dist/InputFields/SearchBar.js.map +1 -1
  83. package/dist/List/ListRow.cjs +1 -1
  84. package/dist/List/ListRow.cjs.map +1 -1
  85. package/dist/List/ListRow.js +1 -1
  86. package/dist/List/ListRow.js.map +1 -1
  87. package/dist/MenuItem/MenuItem.cjs +4 -2
  88. package/dist/MenuItem/MenuItem.cjs.map +1 -1
  89. package/dist/MenuItem/MenuItem.js +4 -2
  90. package/dist/MenuItem/MenuItem.js.map +1 -1
  91. package/dist/Modals/ModalContainer.cjs +3 -3
  92. package/dist/Modals/ModalContainer.cjs.map +1 -1
  93. package/dist/Modals/ModalContainer.js +3 -3
  94. package/dist/Modals/ModalContainer.js.map +1 -1
  95. package/dist/Modals/ModalDialog.cjs +3 -5
  96. package/dist/Modals/ModalDialog.cjs.map +1 -1
  97. package/dist/Modals/ModalDialog.js +3 -6
  98. package/dist/Modals/ModalDialog.js.map +1 -1
  99. package/dist/Modals/ModalStyles.cjs +3 -3
  100. package/dist/Modals/ModalStyles.cjs.map +1 -1
  101. package/dist/Modals/ModalStyles.js +3 -3
  102. package/dist/Modals/ModalStyles.js.map +1 -1
  103. package/dist/ProfileButton/ProfileButton.cjs.map +1 -1
  104. package/dist/ProfileButton/ProfileButton.d.ts +8 -0
  105. package/dist/ProfileButton/ProfileButton.js.map +1 -1
  106. package/dist/Switcher/SwitcherMenuItem.cjs +4 -1
  107. package/dist/Switcher/SwitcherMenuItem.cjs.map +1 -1
  108. package/dist/Switcher/SwitcherMenuItem.js +3 -1
  109. package/dist/Switcher/SwitcherMenuItem.js.map +1 -1
  110. package/dist/Table/Table.cjs +21 -28
  111. package/dist/Table/Table.cjs.map +1 -1
  112. package/dist/Table/Table.js +22 -29
  113. package/dist/Table/Table.js.map +1 -1
  114. package/dist/Table/TableBody.cjs +122 -42
  115. package/dist/Table/TableBody.cjs.map +1 -1
  116. package/dist/Table/TableBody.d.ts +4 -1
  117. package/dist/Table/TableBody.js +120 -43
  118. package/dist/Table/TableBody.js.map +1 -1
  119. package/dist/Table/TableFooter.cjs +54 -59
  120. package/dist/Table/TableFooter.cjs.map +1 -1
  121. package/dist/Table/TableFooter.js +54 -59
  122. package/dist/Table/TableFooter.js.map +1 -1
  123. package/dist/Table/TableHeaders.cjs +13 -67
  124. package/dist/Table/TableHeaders.cjs.map +1 -1
  125. package/dist/Table/TableHeaders.d.ts +1 -4
  126. package/dist/Table/TableHeaders.js +15 -64
  127. package/dist/Table/TableHeaders.js.map +1 -1
  128. package/dist/Table/TableStyles.cjs +30 -20
  129. package/dist/Table/TableStyles.cjs.map +1 -1
  130. package/dist/Table/TableStyles.d.ts +5 -3
  131. package/dist/Table/TableStyles.js +23 -20
  132. package/dist/Table/TableStyles.js.map +1 -1
  133. package/dist/Tabs/TabLink.cjs +2 -2
  134. package/dist/Tabs/TabLink.cjs.map +1 -1
  135. package/dist/Tabs/TabLink.d.ts +1 -1
  136. package/dist/Tabs/TabLink.js +2 -2
  137. package/dist/Tabs/TabLink.js.map +1 -1
  138. package/dist/Tabs/VerticalTabs.cjs +2 -2
  139. package/dist/Tabs/VerticalTabs.cjs.map +1 -1
  140. package/dist/Tabs/VerticalTabs.d.ts +1 -1
  141. package/dist/Tabs/VerticalTabs.js +2 -2
  142. package/dist/Tabs/VerticalTabs.js.map +1 -1
  143. package/dist/common/ClickOutside.cjs +1 -1
  144. package/dist/common/ClickOutside.cjs.map +1 -1
  145. package/dist/common/ClickOutside.js +1 -1
  146. package/dist/common/ClickOutside.js.map +1 -1
  147. package/dist/{GlobalNavigationBar → common}/NavigationHelper.cjs +0 -0
  148. package/dist/common/NavigationHelper.cjs.map +1 -0
  149. package/dist/{GlobalNavigationBar → common}/NavigationHelper.d.ts +0 -0
  150. package/dist/{GlobalNavigationBar → common}/NavigationHelper.js +0 -0
  151. package/dist/common/NavigationHelper.js.map +1 -0
  152. package/package.json +1 -1
  153. package/dist/GlobalNavigationBar/NavigationHelper.cjs.map +0 -1
  154. package/dist/GlobalNavigationBar/NavigationHelper.js.map +0 -1
  155. package/dist/hooks/useClickOutside.cjs +0 -39
  156. package/dist/hooks/useClickOutside.cjs.map +0 -1
  157. package/dist/hooks/useClickOutside.d.ts +0 -5
  158. package/dist/hooks/useClickOutside.js +0 -26
  159. package/dist/hooks/useClickOutside.js.map +0 -1
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.TableWrapper = exports.StyledTableSpinner = exports.StyledTableNoRowsLabelRow = exports.StyledTableHeaderTitleContent = exports.StyledTableHeaderTitle = exports.StyledTableHeaderColumns = exports.StyledTableHeaderColumnContent = exports.StyledTableHeaderColumn = exports.StyledTableHeader = exports.StyledTableFooterCurrentInfo = exports.StyledTableFooterControls = exports.StyledTableFooterContent = exports.StyledTableFooterCollapseButton = exports.StyledTableFooter = exports.StyledTableCellText = exports.StyledTableCellIcon = exports.StyledTableCellContent = exports.StyledTableCell = exports.StyledTableBodyRow = exports.StyledTableBody = exports.StyledTable = void 0;
8
+ exports.TableWrapper = exports.StyledTableSpinner = exports.StyledTableNoRowsLabelRow = exports.StyledTableHeaderTitleContent = exports.StyledTableHeaderTitle = exports.StyledTableHeaderRow = exports.StyledTableHeaderColumns = exports.StyledTableHeaderColumnContent = exports.StyledTableHeaderColumn = exports.StyledTableHeader = exports.StyledTableFooterCurrentInfo = exports.StyledTableFooterControls = exports.StyledTableFooterContent = exports.StyledTableFooterCollapseButton = exports.StyledTableFooter = exports.StyledTableCellText = exports.StyledTableCellIcon = exports.StyledTableCellContent = exports.StyledTableCell = exports.StyledTableBodyWrapper = exports.StyledTableBodyRow = exports.StyledTableBody = exports.StyledTable = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
11
 
@@ -19,7 +19,9 @@ var _zIndexes = require("../styles/z-indexes");
19
19
 
20
20
  var _Checkbox = require("../InputFields/Checkbox");
21
21
 
22
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
22
+ var _types = require("../types");
23
+
24
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23;
23
25
 
24
26
  /**
25
27
  * Table styles
@@ -32,11 +34,11 @@ var StyledTable = _styledComponents.default.table(_templateObject2 || (_template
32
34
 
33
35
  exports.StyledTable = StyledTable;
34
36
 
35
- var StyledTableHeader = _styledComponents.default.thead(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n"])));
37
+ var StyledTableHeader = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n"])));
36
38
 
37
39
  exports.StyledTableHeader = StyledTableHeader;
38
40
 
39
- var StyledTableHeaderTitle = _styledComponents.default.tr(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n"])));
41
+ var StyledTableHeaderTitle = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n"])));
40
42
 
41
43
  exports.StyledTableHeaderTitle = StyledTableHeaderTitle;
42
44
 
@@ -44,67 +46,75 @@ var StyledTableHeaderTitleContent = _styledComponents.default.div(_templateObjec
44
46
 
45
47
  exports.StyledTableHeaderTitleContent = StyledTableHeaderTitleContent;
46
48
 
47
- var StyledTableHeaderColumns = _styledComponents.default.tr(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n"])));
49
+ var StyledTableHeaderRow = _styledComponents.default.thead(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n"])));
50
+
51
+ exports.StyledTableHeaderRow = StyledTableHeaderRow;
52
+
53
+ var StyledTableHeaderColumns = _styledComponents.default.tr(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n"])));
48
54
 
49
55
  exports.StyledTableHeaderColumns = StyledTableHeaderColumns;
50
56
 
51
- var StyledTableHeaderColumnContent = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\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"])), _styles.COLORS.neutral_200, _styles.COLORS.neutral_200);
57
+ var StyledTableHeaderColumnContent = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\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"])), _styles.COLORS.neutral_200, _styles.COLORS.neutral_200);
52
58
 
53
59
  exports.StyledTableHeaderColumnContent = StyledTableHeaderColumnContent;
54
60
 
55
- var StyledTableHeaderColumn = _styledComponents.default.th(_templateObject8 || (_templateObject8 = (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 &.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);
61
+ var StyledTableHeaderColumn = _styledComponents.default.th(_templateObject9 || (_templateObject9 = (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 &.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);
56
62
 
57
63
  exports.StyledTableHeaderColumn = StyledTableHeaderColumn;
58
64
 
59
- var StyledTableBodyRow = _styledComponents.default.tr(_templateObject9 || (_templateObject9 = (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);
65
+ var StyledTableBodyRow = _styledComponents.default.tr(_templateObject10 || (_templateObject10 = (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);
60
66
 
61
67
  exports.StyledTableBodyRow = StyledTableBodyRow;
62
68
 
63
- var StyledTableNoRowsLabelRow = _styledComponents.default.tr(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n outline: none;\n background-color: ", ";\n"])), _styles.COLORS.neutral_50);
69
+ var StyledTableNoRowsLabelRow = _styledComponents.default.tr(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n outline: none;\n background-color: ", ";\n"])), _styles.COLORS.neutral_50);
64
70
 
65
71
  exports.StyledTableNoRowsLabelRow = StyledTableNoRowsLabelRow;
66
72
 
67
- var StyledTableBody = _styledComponents.default.tbody(_templateObject11 || (_templateObject11 = (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);
73
+ var StyledTableBody = _styledComponents.default.tbody(_templateObject12 || (_templateObject12 = (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);
68
74
 
69
75
  exports.StyledTableBody = StyledTableBody;
70
76
 
71
- var StyledTableCell = _styledComponents.default.td(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)([""])));
77
+ var StyledTableCell = _styledComponents.default.td(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)([""])));
72
78
 
73
79
  exports.StyledTableCell = StyledTableCell;
74
80
 
75
- var StyledTableCellContent = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _typography.ComponentSStyling)(_typography.ComponentTextStyle.Regular, _styles.COLORS.black), _Checkbox.StyledCheckBox);
81
+ var StyledTableCellContent = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _typography.ComponentSStyling)(_typography.ComponentTextStyle.Regular, _styles.COLORS.black), _Checkbox.StyledCheckBox);
76
82
 
77
83
  exports.StyledTableCellContent = StyledTableCellContent;
78
84
 
79
- var StyledTableCellIcon = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n width: 24px;\n height: 24px;\n\n svg {\n color: ", ";\n width: 24px;\n height: 24px;\n }\n"])), _styles.COLORS.neutral_700, _styles.COLORS.neutral_700);
85
+ var StyledTableCellIcon = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n width: 24px;\n height: 24px;\n\n svg {\n color: ", ";\n width: 24px;\n height: 24px;\n }\n"])), _styles.COLORS.neutral_700, _styles.COLORS.neutral_700);
80
86
 
81
87
  exports.StyledTableCellIcon = StyledTableCellIcon;
82
88
 
83
- var StyledTableCellText = _styledComponents.default.span(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n padding: 12px 0;\n"])));
89
+ var StyledTableCellText = _styledComponents.default.span(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n padding: 12px 0;\n"])));
84
90
 
85
91
  exports.StyledTableCellText = StyledTableCellText;
86
92
 
87
- var StyledTableFooter = _styledComponents.default.tfoot(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n"])));
93
+ var StyledTableFooter = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n"])));
88
94
 
89
95
  exports.StyledTableFooter = StyledTableFooter;
90
96
 
91
- var StyledTableFooterContent = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n border-top: 2px solid ", ";\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n"])), _styles.COLORS.neutral_200, _styles.COLORS.neutral_200);
97
+ var StyledTableFooterContent = _styledComponents.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n border-top: 2px solid ", ";\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n"])), _styles.COLORS.neutral_200, _styles.COLORS.neutral_200);
92
98
 
93
99
  exports.StyledTableFooterContent = StyledTableFooterContent;
94
100
 
95
- var StyledTableFooterCurrentInfo = _styledComponents.default.span(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 16px;\n ", "\n"])), (0, _typography.ComponentXSStyling)(_typography.ComponentTextStyle.Regular, _styles.COLORS.black));
101
+ var StyledTableFooterCurrentInfo = _styledComponents.default.span(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 16px;\n ", "\n"])), (0, _typography.ComponentXSStyling)(_typography.ComponentTextStyle.Regular, _styles.COLORS.black));
96
102
 
97
103
  exports.StyledTableFooterCurrentInfo = StyledTableFooterCurrentInfo;
98
104
 
99
- var StyledTableFooterControls = _styledComponents.default.div(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n"])));
105
+ var StyledTableFooterControls = _styledComponents.default.div(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n"])));
100
106
 
101
107
  exports.StyledTableFooterControls = StyledTableFooterControls;
102
108
 
103
- var StyledTableSpinner = _styledComponents.default.div(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ", ";\n"])), _zIndexes.Z_INDEXES.backdrop);
109
+ var StyledTableSpinner = _styledComponents.default.div(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ", ";\n"])), _zIndexes.Z_INDEXES.backdrop);
104
110
 
105
111
  exports.StyledTableSpinner = StyledTableSpinner;
106
112
 
107
- var StyledTableFooterCollapseButton = _styledComponents.default.button(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n border-bottom: 1px solid ", ";\n border-top: 1px solid ", ";\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ", ";\n\n cursor: pointer;\n\n ", "\n \n &:focus {\n ", "\n }\n\n &:hover {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:active {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:disabled {\n display: none;\n }\n\n"])), _styles.COLORS.neutral_200, _styles.COLORS.neutral_200, _styles.COLORS.white, (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Bold, _styles.COLORS.neutral_600), _styles.focusStyles, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.active, _styles.COLORS.primary_100, _styles.COLORS.primary_800);
113
+ var StyledTableFooterCollapseButton = _styledComponents.default.button(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n border-bottom: 1px solid ", ";\n border-top: 1px solid ", ";\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ", ";\n\n cursor: pointer;\n\n ", "\n \n &:focus {\n ", "\n }\n\n &:hover {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:active {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:disabled {\n display: none;\n }\n\n"])), _styles.COLORS.neutral_200, _styles.COLORS.neutral_200, _styles.COLORS.white, (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Bold, _styles.COLORS.neutral_600), _styles.focusStyles, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.active, _styles.COLORS.primary_100, _styles.COLORS.primary_800);
108
114
 
109
115
  exports.StyledTableFooterCollapseButton = StyledTableFooterCollapseButton;
116
+
117
+ var StyledTableBodyWrapper = _styledComponents.default.div(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2.default)(["\n overflow-x: auto;\n ", "\n\n ::-webkit-scrollbar-track {\n margin: 6px;\n }\n\n &.scrollable{\n margin-bottom: 6px;\n padding-bottom: 10px;\n }\n"])), (0, _styles.scrollBarStyling)(_types.Size.Small));
118
+
119
+ exports.StyledTableBodyWrapper = StyledTableBodyWrapper;
110
120
  //# sourceMappingURL=TableStyles.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Table/TableStyles.ts"],"names":["TableWrapper","styled","div","StyledTable","table","StyledTableHeader","thead","StyledTableHeaderTitle","tr","StyledTableHeaderTitleContent","COLORS","neutral_200","ComponentTextStyle","Bold","black","StyledTableHeaderColumns","StyledTableHeaderColumnContent","StyledTableHeaderColumn","th","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","span","StyledTableFooter","tfoot","StyledTableFooterContent","StyledTableFooterCurrentInfo","StyledTableFooterControls","StyledTableSpinner","backdrop","StyledTableFooterCollapseButton","button"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AAOA;;AACA;;;;AAEA;AACA;AACA;AAEO,IAAMA,YAAY,GAAGC,0BAAOC,GAAV,4GAAlB;;;;AAKA,IAAMC,WAAW,GAAGF,0BAAOG,KAAV,6NAAjB;;;;AAaA,IAAMC,iBAAiB,GAAGJ,0BAAOK,KAAV,uFAAvB;;;;AAGA,IAAMC,sBAAsB,GAAGN,0BAAOO,EAAV,uFAA5B;;;;AAGA,IAAMC,6BAA6B,GAAGR,0BAAOC,GAAV,oXAObQ,eAAOC,WAPM,EAQhBD,eAAOC,WARS,EAWtC,mCAAkBC,+BAAmBC,IAArC,EAA2CH,eAAOI,KAAlD,CAXsC,CAAnC;;;;AAiBA,IAAMC,wBAAwB,GAAGd,0BAAOO,EAAV,uFAA9B;;;;AAGA,IAAMQ,8BAA8B,GAAGf,0BAAOC,GAAV,2TAQjBQ,eAAOC,WARU,EASdD,eAAOC,WATO,CAApC;;;;AAYA,IAAMM,uBAAuB,GAAGhB,0BAAOiB,EAAV,mpBAChC,mCAAkBN,+B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hC,+BAAmB2B,OAAtC,EAA+C7B,eAAOI,KAAtD,CAFqC,CAAlC;;;;AAKA,IAAMmC,yBAAyB,GAAGhD,0BAAOC,GAAV,2GAA/B;;;;AAIA,IAAMgD,kBAAkB,GAAGjD,0BAAOC,GAAV,+NAMlBqB,oBAAU4B,QANQ,CAAxB;;;;AASA,IAAMC,+BAA+B,GAAGnD,0BAAOoD,MAAV,upBAEf3C,eAAOC,WAFQ,EAGlBD,eAAOC,WAHW,EAa5BD,eAAOU,KAbqB,EAiBxC,mCAAkBR,+BAAmBC,IAArC,EAA2CH,eAAOS,WAAlD,CAjBwC,EAoBtCS,mBApBsC,EAwB7BL,oBAAUC,KAxBmB,EAyB1Bd,eAAOW,UAzBmB,EA0B/BX,eAAOY,WA1BwB,EA8B7BC,oBAAUI,MA9BmB,EA+B1BjB,eAAOe,WA/BmB,EAgC/Bf,eAAOgB,WAhCwB,CAArC","sourcesContent":["/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\n\n/**\n * Import custom style properties.\n */\nimport {COLORS, focusStyles} 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';\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.thead`\n`;\n\nexport const StyledTableHeaderTitle = styled.tr`\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 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 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 &.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.tfoot`\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"],"file":"TableStyles.cjs"}
1
+ {"version":3,"sources":["../../src/Table/TableStyles.ts"],"names":["TableWrapper","styled","div","StyledTable","table","StyledTableHeader","StyledTableHeaderTitle","StyledTableHeaderTitleContent","COLORS","neutral_200","ComponentTextStyle","Bold","black","StyledTableHeaderRow","thead","StyledTableHeaderColumns","tr","StyledTableHeaderColumnContent","StyledTableHeaderColumn","th","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","span","StyledTableFooter","StyledTableFooterContent","StyledTableFooterCurrentInfo","StyledTableFooterControls","StyledTableSpinner","backdrop","StyledTableFooterCollapseButton","button","StyledTableBodyWrapper","Size","Small"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AAOA;;AACA;;AACA;;;;AAEA;AACA;AACA;AAEO,IAAMA,YAAY,GAAGC,0BAAOC,GAAV,4GAAlB;;;;AAKA,IAAMC,WAAW,GAAGF,0BAAOG,KAAV,6NAAjB;;;;AAaA,IAAMC,iBAAiB,GAAGJ,0BAAOC,GAAV,uFAAvB;;;;AAGA,IAAMI,sBAAsB,GAAGL,0BAAOC,GAAV,uFAA5B;;;;AAGA,IAAMK,6BAA6B,GAAGN,0BAAOC,GAAV,oXAObM,eAAOC,WAPM,EAQhBD,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IAAMC,mBAAmB,GAAGzC,0BAAOC,GAAV,kNACrBM,eAAOmC,WADc,EAMnBnC,eAAOmC,WANY,CAAzB;;;;AAYA,IAAMC,mBAAmB,GAAG3C,0BAAO4C,IAAV,6GAAzB;;;;AAKA,IAAMC,iBAAiB,GAAG7C,0BAAOC,GAAV,yFAAvB;;;;AAGA,IAAM6C,wBAAwB,GAAG9C,0BAAOC,GAAV,oRACXM,eAAOC,WADI,EAERD,eAAOC,WAFC,CAA9B;;;;AAYA,IAAMuC,4BAA4B,GAAG/C,0BAAO4C,IAAV,sHAErC,oCAAmBnC,+BAAmB8B,OAAtC,EAA+ChC,eAAOI,KAAtD,CAFqC,CAAlC;;;;AAKA,IAAMqC,yBAAyB,GAAGhD,0BAAOC,GAAV,2GAA/B;;;;AAIA,IAAMgD,kBAAkB,GAAGjD,0BAAOC,GAAV,+NAMlBsB,oBAAU2B,QANQ,CAAxB;;;;AASA,IAAMC,+BAA+B,GAAGnD,0BAAOoD,MAAV,upBAEf7C,eAAOC,WAFQ,EAGlBD,eAAOC,WAHW,EAa5BD,eAAOa,KAbqB,EAiBxC,mCAAkBX,+BAAmBC,IAArC,EAA2CH,eAAOY,WAAlD,CAjBwC,EAoBtCS,mBApBsC,EAwB7BL,oBAAUC,KAxBmB,EAyB1BjB,eAAOc,UAzBmB,EA0B/Bd,eAAOe,WA1BwB,EA8B7BC,oBAAUI,MA9BmB,EA+B1BpB,eAAOkB,WA/BmB,EAgC/BlB,eAAOmB,WAhCwB,CAArC;;;;AA0CA,IAAM2B,sBAAsB,GAAGrD,0BAAOC,GAAV,2PAE/B,8BAAiBqD,YAAKC,KAAtB,CAF+B,CAA5B","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 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 &.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`;"],"file":"TableStyles.cjs"}
@@ -3,9 +3,10 @@
3
3
  */
4
4
  export declare const TableWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
5
  export declare const StyledTable: import("styled-components").StyledComponent<"table", any, {}, never>;
6
- export declare const StyledTableHeader: import("styled-components").StyledComponent<"thead", any, {}, never>;
7
- export declare const StyledTableHeaderTitle: import("styled-components").StyledComponent<"tr", any, {}, never>;
6
+ export declare const StyledTableHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const StyledTableHeaderTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
8
8
  export declare const StyledTableHeaderTitleContent: import("styled-components").StyledComponent<"div", any, {}, never>;
9
+ export declare const StyledTableHeaderRow: import("styled-components").StyledComponent<"thead", any, {}, never>;
9
10
  export declare const StyledTableHeaderColumns: import("styled-components").StyledComponent<"tr", any, {}, never>;
10
11
  export declare const StyledTableHeaderColumnContent: import("styled-components").StyledComponent<"div", any, {}, never>;
11
12
  export declare const StyledTableHeaderColumn: import("styled-components").StyledComponent<"th", any, {}, never>;
@@ -16,9 +17,10 @@ export declare const StyledTableCell: import("styled-components").StyledComponen
16
17
  export declare const StyledTableCellContent: import("styled-components").StyledComponent<"div", any, {}, never>;
17
18
  export declare const StyledTableCellIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
18
19
  export declare const StyledTableCellText: import("styled-components").StyledComponent<"span", any, {}, never>;
19
- export declare const StyledTableFooter: import("styled-components").StyledComponent<"tfoot", any, {}, never>;
20
+ export declare const StyledTableFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
20
21
  export declare const StyledTableFooterContent: import("styled-components").StyledComponent<"div", any, {}, never>;
21
22
  export declare const StyledTableFooterCurrentInfo: import("styled-components").StyledComponent<"span", any, {}, never>;
22
23
  export declare const StyledTableFooterControls: import("styled-components").StyledComponent<"div", any, {}, never>;
23
24
  export declare const StyledTableSpinner: import("styled-components").StyledComponent<"div", any, {}, never>;
24
25
  export declare const StyledTableFooterCollapseButton: import("styled-components").StyledComponent<"button", any, {}, never>;
26
+ export declare const StyledTableBodyWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,6 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
2
 
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23;
4
4
 
5
5
  /**
6
6
  * Import third-party libraries.
@@ -10,33 +10,36 @@ import styled from 'styled-components';
10
10
  * Import custom style properties.
11
11
  */
12
12
 
13
- import { COLORS, focusStyles } from '../styles';
13
+ import { COLORS, focusStyles, scrollBarStyling } from '../styles';
14
14
  import { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling } from '../styles/typography';
15
15
  import { Z_INDEXES } from '../styles/z-indexes';
16
16
  import { StyledCheckBox } from '../InputFields/Checkbox';
17
+ import { Size } from "../types";
17
18
  /**
18
19
  * Table styles
19
20
  */
20
21
 
21
22
  export var TableWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
22
23
  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"])));
23
- export var StyledTableHeader = styled.thead(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n"])));
24
- export var StyledTableHeaderTitle = styled.tr(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n"])));
24
+ export var StyledTableHeader = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n"])));
25
+ export var StyledTableHeaderTitle = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n"])));
25
26
  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));
26
- export var StyledTableHeaderColumns = styled.tr(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n"])));
27
- export var StyledTableHeaderColumnContent = styled.div(_templateObject7 || (_templateObject7 = _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);
28
- export var StyledTableHeaderColumn = styled.th(_templateObject8 || (_templateObject8 = _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 &.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);
29
- export var StyledTableBodyRow = styled.tr(_templateObject9 || (_templateObject9 = _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);
30
- export var StyledTableNoRowsLabelRow = styled.tr(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: relative;\n outline: none;\n background-color: ", ";\n"])), COLORS.neutral_50);
31
- export var StyledTableBody = styled.tbody(_templateObject11 || (_templateObject11 = _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);
32
- export var StyledTableCell = styled.td(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral([""])));
33
- export var StyledTableCellContent = styled.div(_templateObject13 || (_templateObject13 = _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);
34
- export var StyledTableCellIcon = styled.div(_templateObject14 || (_templateObject14 = _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);
35
- export var StyledTableCellText = styled.span(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n padding: 12px 0;\n"])));
36
- export var StyledTableFooter = styled.tfoot(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n"])));
37
- export var StyledTableFooterContent = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n border-top: 2px solid ", ";\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n"])), COLORS.neutral_200, COLORS.neutral_200);
38
- export var StyledTableFooterCurrentInfo = styled.span(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n padding: 0 16px;\n ", "\n"])), ComponentXSStyling(ComponentTextStyle.Regular, COLORS.black));
39
- export var StyledTableFooterControls = styled.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n"])));
40
- export var StyledTableSpinner = styled.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ", ";\n"])), Z_INDEXES.backdrop);
41
- export var StyledTableFooterCollapseButton = styled.button(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n position: relative;\n border-bottom: 1px solid ", ";\n border-top: 1px solid ", ";\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ", ";\n\n cursor: pointer;\n\n ", "\n \n &:focus {\n ", "\n }\n\n &:hover {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:active {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:disabled {\n display: none;\n }\n\n"])), COLORS.neutral_200, COLORS.neutral_200, COLORS.white, ComponentMStyling(ComponentTextStyle.Bold, COLORS.neutral_600), focusStyles, Z_INDEXES.hover, COLORS.primary_20, COLORS.primary_700, Z_INDEXES.active, COLORS.primary_100, COLORS.primary_800);
27
+ export var StyledTableHeaderRow = styled.thead(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n"])));
28
+ export var StyledTableHeaderColumns = styled.tr(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n"])));
29
+ 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);
30
+ export var StyledTableHeaderColumn = styled.th(_templateObject9 || (_templateObject9 = _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 &.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(_templateObject10 || (_templateObject10 = _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);
32
+ export var StyledTableNoRowsLabelRow = styled.tr(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n outline: none;\n background-color: ", ";\n"])), COLORS.neutral_50);
33
+ export var StyledTableBody = styled.tbody(_templateObject12 || (_templateObject12 = _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);
34
+ export var StyledTableCell = styled.td(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral([""])));
35
+ export var StyledTableCellContent = styled.div(_templateObject14 || (_templateObject14 = _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
+ export var StyledTableCellIcon = styled.div(_templateObject15 || (_templateObject15 = _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);
37
+ export var StyledTableCellText = styled.span(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n padding: 12px 0;\n"])));
38
+ export var StyledTableFooter = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n"])));
39
+ export var StyledTableFooterContent = styled.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n border-top: 2px solid ", ";\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n"])), COLORS.neutral_200, COLORS.neutral_200);
40
+ export var StyledTableFooterCurrentInfo = styled.span(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n padding: 0 16px;\n ", "\n"])), ComponentXSStyling(ComponentTextStyle.Regular, COLORS.black));
41
+ export var StyledTableFooterControls = styled.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: flex;\n"])));
42
+ export var StyledTableSpinner = styled.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(255, 255, 255, 0.75);\n top: 0;\n z-index: ", ";\n"])), Z_INDEXES.backdrop);
43
+ export var StyledTableFooterCollapseButton = styled.button(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n position: relative;\n border-bottom: 1px solid ", ";\n border-top: 1px solid ", ";\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ", ";\n\n cursor: pointer;\n\n ", "\n \n &:focus {\n ", "\n }\n\n &:hover {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:active {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:disabled {\n display: none;\n }\n\n"])), COLORS.neutral_200, COLORS.neutral_200, COLORS.white, ComponentMStyling(ComponentTextStyle.Bold, COLORS.neutral_600), focusStyles, Z_INDEXES.hover, COLORS.primary_20, COLORS.primary_700, Z_INDEXES.active, COLORS.primary_100, COLORS.primary_800);
44
+ export var StyledTableBodyWrapper = styled.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n overflow-x: auto;\n ", "\n\n ::-webkit-scrollbar-track {\n margin: 6px;\n }\n\n &.scrollable{\n margin-bottom: 6px;\n padding-bottom: 10px;\n }\n"])), scrollBarStyling(Size.Small));
42
45
  //# sourceMappingURL=TableStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Table/TableStyles.ts"],"names":["styled","COLORS","focusStyles","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","Z_INDEXES","StyledCheckBox","TableWrapper","div","StyledTable","table","StyledTableHeader","thead","StyledTableHeaderTitle","tr","StyledTableHeaderTitleContent","neutral_200","Bold","black","StyledTableHeaderColumns","StyledTableHeaderColumnContent","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","span","StyledTableFooter","tfoot","StyledTableFooterContent","StyledTableFooterCurrentInfo","StyledTableFooterControls","StyledTableSpinner","backdrop","StyledTableFooterCollapseButton","button"],"mappings":";;;;AAAA;AACA;AACA;AACA,OAAOA,MAAP,MAAmB,mBAAnB;AAEA;AACA;AACA;;AACA,SAAQC,MAAR,EAAgBC,WAAhB,QAAkC,WAAlC;AACA,SACEC,iBADF,EAEEC,iBAFF,EAGEC,iBAHF,EAIEC,kBAJF,EAKEC,kBALF,QAMO,sBANP;AAOA,SAAQC,SAAR,QAAwB,qBAAxB;AACA,SAAQC,cAAR,QAA6B,yBAA7B;AAEA;AACA;AACA;;AAEA,OAAO,IAAMC,YAAY,GAAGV,MAAM,CAACW,GAAV,8FAAlB;AAKP,OAAO,IAAMC,WAAW,GAAGZ,MAAM,CAACa,KAAV,+MAAjB;AAaP,OAAO,IAAMC,iBAAiB,GAAGd,MAAM,CAACe,KAAV,yEAAvB;AAGP,OAAO,IAAMC,sBAAsB,GAAGhB,MAAM,CAACiB,EAAV,yEAA5B;AAGP,OAAO,IAAMC,6BAA6B,GAAGlB,MAAM,CAACW,GAAV,sWAObV,MAAM,CAACkB,WAPM,EAQhBlB,MAAM,CAACkB,WARS,EAWtChB,iBAAiB,CAACG,kBAAkB,CAACc,IAApB,EAA0BnB,MAAM,CAACoB,KAAjC,CAXq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AAM,CAACoB,KAApC,CAJc,EAmC/BZ,cAnC+B,CAA5B;AAwCP,OAAO,IAAMoC,mBAAmB,GAAG7C,MAAM,CAACW,GAAV,oMACrBV,MAAM,CAAC6C,WADc,EAMnB7C,MAAM,CAAC6C,WANY,CAAzB;AAYP,OAAO,IAAMC,mBAAmB,GAAG/C,MAAM,CAACgD,IAAV,+FAAzB;AAKP,OAAO,IAAMC,iBAAiB,GAAGjD,MAAM,CAACkD,KAAV,2EAAvB;AAGP,OAAO,IAAMC,wBAAwB,GAAGnD,MAAM,CAACW,GAAV,sQACXV,MAAM,CAACkB,WADI,EAERlB,MAAM,CAACkB,WAFC,CAA9B;AAYP,OAAO,IAAMiC,4BAA4B,GAAGpD,MAAM,CAACgD,IAAV,wGAErCzC,kBAAkB,CAACD,kBAAkB,CAACsC,OAApB,EAA6B3C,MAAM,CAACoB,KAApC,CAFmB,CAAlC;AAKP,OAAO,IAAMgC,yBAAyB,GAAGrD,MAAM,CAACW,GAAV,6FAA/B;AAIP,OAAO,IAAM2C,kBAAkB,GAAGtD,MAAM,CAACW,GAAV,iNAMlBH,SAAS,CAAC+C,QANQ,CAAxB;AASP,OAAO,IAAMC,+BAA+B,GAAGxD,MAAM,CAACyD,MAAV,yoBAEfxD,MAAM,CAACkB,WAFQ,EAGlBlB,MAAM,CAACkB,WAHW,EAa5BlB,MAAM,CAAC0B,KAbqB,EAiBxCvB,iBAAiB,CAACE,kBAAkB,CAACc,IAApB,EAA0BnB,MAAM,CAACyB,WAAjC,CAjBuB,EAoBtCxB,WApBsC,EAwB7BM,SAAS,CAACsB,KAxBmB,EAyB1B7B,MAAM,CAAC2B,UAzBmB,EA0B/B3B,MAAM,CAAC4B,WA1BwB,EA8B7BrB,SAAS,CAACyB,MA9BmB,EA+B1BhC,MAAM,CAAC8B,WA/BmB,EAgC/B9B,MAAM,CAAC+B,WAhCwB,CAArC","sourcesContent":["/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\n\n/**\n * Import custom style properties.\n */\nimport {COLORS, focusStyles} 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';\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.thead`\n`;\n\nexport const StyledTableHeaderTitle = styled.tr`\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 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 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 &.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.tfoot`\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"],"file":"TableStyles.js"}
1
+ {"version":3,"sources":["../../src/Table/TableStyles.ts"],"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","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","span","StyledTableFooter","StyledTableFooterContent","StyledTableFooterCurrentInfo","StyledTableFooterControls","StyledTableSpinner","backdrop","StyledTableFooterCollapseButton","button","StyledTableBodyWrapper","Small"],"mappings":";;;;AAAA;AACA;AACA;AACA,OAAOA,MAAP,MAAmB,mBAAnB;AAEA;AACA;AACA;;AACA,SAAQC,MAAR,EAAgBC,WAAhB,EAA6BC,gBAA7B,QAAoD,WAApD;AACA,SACEC,iBADF,EAEEC,iBAFF,EAGEC,iBAHF,EAIEC,kBAJF,EAKEC,kBALF,QAMO,sBANP;AAOA,SAAQC,SAAR,QAAwB,qBAAxB;AACA,SAAQC,cAAR,QAA6B,yBAA7B;AACA,SAAQC,IAAR,QAAmB,UAAnB;AAEA;AACA;AACA;;AAEA,OAAO,IAAMC,YAAY,GAAGZ,MAAM,CAACa,GAAV,8FAAlB;AAKP,OAAO,IAAMC,WAAW,GAAGd,MAAM,CAACe,KAAV,+MAAjB;AAaP,OAAO,IAAMC,iBAAiB,GAAGhB,MAAM,CAACa,GAAV,yEAAvB;AAGP,OAAO,IAAMI,sBAAsB,GAAGjB,MAAM,CAACa,GAAV,yEAA5B;AAGP,OAAO,IAAMK,6BAA6B,GAAGlB,MAAM,CAACa,GAAV,sWAObZ,MAAM,CAACkB,WAPM,EAQhBlB,MAAM,CAACkB,WARS,EAWtCf,iBAAiB,CAACG,kBAAkB,CAACa,IAApB,EAA0BnB,MAAM,CAACoB,KAAjC,CAXqB,CAAnC;AAiBP,OAAO,IAAMC,oBAAoB,GAAGtB,MAAM,CAACuB,KAAV,yEAA1B;AAGP,OAAO,IAAMC,wBAAwB,GAAGxB,MAAM,CAACyB,EAAV,yEAA9B;AAGP,OAAO,IAAMC,8BAA8B,GAA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\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 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 &.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`;"],"file":"TableStyles.js"}
@@ -85,8 +85,8 @@ var TabLink = function TabLink(_ref) {
85
85
  tabIndex: disabled ? -1 : 0,
86
86
  role: "tab",
87
87
  "aria-selected": to === location.pathname,
88
- onClick: function onClick() {
89
- return !disabled && onLinkClick && onLinkClick();
88
+ onClick: function onClick(e) {
89
+ return !disabled && onLinkClick && onLinkClick(e);
90
90
  },
91
91
  ref: ref,
92
92
  "data-testid": testId,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Tabs/TabLink.tsx"],"names":["StyledTabLink","NavLink","COLORS","neutral_600","props","disabled","neutral_100","focusStyles","Z_INDEXES","active","neutral_20","primary_20","hover","primary_600","primary_100","primary_800","primary_500","white","neutral_300","OptionalLineWrapperWithIcon","styled","div","TopWrapper","TextContainer","StyledNotification","OptionalLineWrapper","Wrapper","TabLink","to","exact","requiredLine","optionalLine","OptionalLineIcon","onLinkClick","testId","showNotificationDot","size","Size","Small","variant","location","ref","React","useRef","toString","defaultOnMouseDownHandler","pathname"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAmBA,IAAMA,aAAa,GAAG,+BAAOC,uBAAP,CAAH,4zCAORC,eAAOC,WAPC,EASG,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,GAAiBH,eAAOI,WAAxB,GAAsC,aAAlD;AAAA,CATH,EAUP,UAACF,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,GAAiB,aAAjB,GAAiC,SAA7C;AAAA,CAVO,EAqBbE,mBArBa,EAyBJC,oBAAUC,MAzBN,EA0BKP,eAAOQ,UA1BZ,EA8BKR,eAAOS,UA9BZ,EAkCJH,oBAAUI,KAlCN,EAmCKV,eAAOS,UAnCZ,EAoCNT,eAAOW,WApCD,EAwCJL,oBAAUC,MAxCN,EAyCKP,eAAOY,WAzCZ,EA0CNZ,eAAOa,WA1CD,EAqDOb,eAAOc,WArDd,EA6DOd,eAAOW,WA7Dd,EAkEKX,eAAOY,WAlEZ,EAqEOZ,eAAOa,WArEd,EA0EKb,eAAOe,KA1EZ,EA2ENf,eAAOgB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,QAAQ,GAAG,UAAH,GAAgB,EAFrC;AAGE,MAAA,eAAe,EAAC,QAHlB;AAIE,MAAA,WAAW,EAAEwC,iCAJf;AAKE,MAAA,KAAK,EAAEhB,KALT;AAME,MAAA,QAAQ,EAAExB,QAAQ,GAAG,CAAC,CAAJ,GAAQ,CAN5B;AAOE,MAAA,IAAI,EAAC,KAPP;AAQE,uBAAeuB,EAAE,KAAKY,QAAQ,CAACM,QARjC;AASE,MAAA,OAAO,EAAE;AAAA,eAAM,CAACzC,QAAD,IAAa4B,WAAb,IAA4BA,WAAW,EAA7C;AAAA,OATX;AAUE,MAAA,GAAG,EAAEQ,GAVP;AAWE,qBAAaP,MAXf;AAAA,8BAYE,sBAAC,aAAD;AAAA,gCACE,qBAAC,UAAD;AAAA,iCACE;AAAA,sBAAOJ;AAAP;AADF,UADF,EAIGC,YAAY,IAAIC,gBAAhB,gBACC,sBAAC,2BAAD;AAAA,qBACGA,gBAAgB,IAAIA,gBADvB,EAEG,CAAC,CAACD,YAAF,iBAAkB;AAAA,sBAAOA;AAAP,YAFrB;AAAA,UADD,GAKGA,YAAY,gBACd,qBAAC,mBAAD;AAAA,iCACE;AAAA,sBAAOA;AAAP;AADF,UADc,gBAKd,8CAdJ;AAAA,QAZF,eA6BE,qBAAC,kBAAD;AAAA,kBACGI,mBAAmB,iBAAI,qBAAC,gCAAD;AAAiB,UAAA,MAAM,EAAC,iBAAxB;AAA0C,UAAA,IAAI,EAAEC,IAAhD;AAAsD,UAAA,OAAO,EAAEG;AAA/D;AAD1B,QA7BF;AAAA;AADF,IADF;AAqCD,CArDD;;;AAlJElC,EAAAA,Q;AACAyB,EAAAA,Y;AACAC,EAAAA,Y;AACAC,EAAAA,gB;AACAC,EAAAA,W;AACAC,EAAAA,M;AACAC,EAAAA,mB;AAEAI,EAAAA,O,4BAAU,U,EAAa,U;;eAiMVZ,O","sourcesContent":["import * as React from 'react';\nimport {NavLink, NavLinkProps, useLocation} from 'react-router-dom';\nimport styled from 'styled-components';\nimport {NotificationDot} from '../NotificationDot';\nimport {BaseProps} from '../icons';\nimport {Size} from '../types';\nimport {COLORS, focusStyles} from '../styles';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {defaultOnMouseDownHandler} from '../common';\n\ntype TabLinkProps = {\n disabled?: boolean;\n requiredLine: string;\n optionalLine?: string;\n OptionalLineIcon?: React.ReactNode;//React.FunctionComponent<BaseProps>;\n onLinkClick?: () => void;\n testId?: string;\n showNotificationDot?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n variant?: 'positive' | 'critical';\n} & NavLinkProps;\n\ntype StyledTabLinkProps = {\n disabled?: boolean;\n exact: boolean;\n};\n\nconst StyledTabLink = styled(NavLink)<StyledTabLinkProps>`\n display: flex;\n flex-direction: row;\n align-items: center;\n\n font-size: 16px;\n line-height: 120%;\n color: ${COLORS.neutral_600};\n\n background-color: ${(props) => (props.disabled ? COLORS.neutral_100 : 'transparent')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n border-left: 1px solid transparent;\n text-decoration: none;\n position: relative;\n border-radius: 2px;\n\n &:not(:last-child) {\n margin-bottom: 4px;\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &.active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n }\n\n &.active:hover {\n background-color: ${COLORS.primary_20};\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &.active {\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 0;\n bottom: 0;\n left: -1px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 2px;\n }\n }\n\n &.active:hover {\n &::after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.active:active {\n background-color: ${COLORS.primary_100};\n\n &::after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n background-color: ${COLORS.white};\n color: ${COLORS.neutral_300};\n\n span {\n color: ${COLORS.neutral_300};\n }\n\n &::after {\n background-color: ${COLORS.neutral_300};\n }\n }\n`;\n\nconst OptionalLineWrapperWithIcon = styled.div`\n display: flex;\n flex-direction: row;\n\n span {\n margin: 0 0 0 4px !important;\n font-size: 12px;\n line-height: 16px;\n }\n`;\n\nconst TopWrapper = styled.div`\n display: flex;\n flex-direction: row;\n\n span:not(:only-child) {\n width: calc(100% - 32px);\n }\n`;\n\nconst TextContainer = styled.div`\n width: 100%;\n margin: auto 0 auto 16px !important;\n`;\n\nconst StyledNotification = styled.div`\n margin: 0 15px 0 0 !important;\n`;\n\nconst OptionalLineWrapper = styled.div`\n font-size: 12px;\n`;\n\nconst Wrapper = styled.div`\n &.disabled {\n cursor: not-allowed;\n\n ${StyledTabLink} {\n pointer-events: none;\n }\n }\n`;\n\nconst TabLink = ({\n to,\n disabled = false,\n exact = false,\n requiredLine,\n optionalLine,\n OptionalLineIcon,\n onLinkClick,\n testId,\n showNotificationDot = false,\n size = Size.Small,\n variant = 'critical'\n }: TabLinkProps) => {\n const location = useLocation();\n const ref = React.useRef<any>(null);\n\n return (\n <Wrapper className={disabled ? 'disabled' : ''}>\n <StyledTabLink\n to={to.toString()}\n className={disabled ? 'disabled' : ''}\n activeClassName=\"active\"\n onMouseDown={defaultOnMouseDownHandler}\n exact={exact}\n tabIndex={disabled ? -1 : 0}\n role=\"tab\"\n aria-selected={to === location.pathname}\n onClick={() => !disabled && onLinkClick && onLinkClick()}\n ref={ref}\n data-testid={testId}>\n <TextContainer>\n <TopWrapper>\n <span>{requiredLine}</span>\n </TopWrapper>\n {optionalLine && OptionalLineIcon ? (\n <OptionalLineWrapperWithIcon>\n {OptionalLineIcon && OptionalLineIcon}\n {!!optionalLine && <span>{optionalLine}</span>}\n </OptionalLineWrapperWithIcon>\n ) : optionalLine ? (\n <OptionalLineWrapper>\n <span>{optionalLine}</span>\n </OptionalLineWrapper>\n ) : (\n <></>\n )}\n </TextContainer>\n <StyledNotification>\n {showNotificationDot && <NotificationDot testId=\"NotificationDot\" size={size} variant={variant}/>}\n </StyledNotification>\n </StyledTabLink>\n </Wrapper>\n );\n};\n\nexport default TabLink;\n"],"file":"TabLink.cjs"}
1
+ {"version":3,"sources":["../../src/Tabs/TabLink.tsx"],"names":["StyledTabLink","NavLink","COLORS","neutral_600","props","disabled","neutral_100","focusStyles","Z_INDEXES","active","neutral_20","primary_20","hover","primary_600","primary_100","primary_800","primary_500","white","neutral_300","OptionalLineWrapperWithIcon","styled","div","TopWrapper","TextContainer","StyledNotification","OptionalLineWrapper","Wrapper","TabLink","to","exact","requiredLine","optionalLine","OptionalLineIcon","onLinkClick","testId","showNotificationDot","size","Size","Small","variant","location","ref","React","useRef","toString","defaultOnMouseDownHandler","pathname","e"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAmBA,IAAMA,aAAa,GAAG,+BAAOC,uBAAP,CAAH,4zCAORC,eAAOC,WAPC,EASG,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,GAAiBH,eAAOI,WAAxB,GAAsC,aAAlD;AAAA,CATH,EAUP,UAACF,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,GAAiB,aAAjB,GAAiC,SAA7C;AAAA,CAVO,EAqBbE,mBArBa,EAyBJC,oBAAUC,MAzBN,EA0BKP,eAAOQ,UA1BZ,EA8BKR,eAAOS,UA9BZ,EAkCJH,oBAAUI,KAlCN,EAmCKV,eAAOS,UAnCZ,EAoCNT,eAAOW,WApCD,EAwCJL,oBAAUC,MAxCN,EAyCKP,eAAOY,WAzCZ,EA0CNZ,eAAOa,WA1CD,EAqDOb,eAAOc,WArDd,EA6DOd,eAAOW,WA7Dd,EAkEKX,eAAOY,WAlEZ,EAqEOZ,eAAOa,WArEd,EA0EKb,eAAOe,KA1EZ,EA2ENf,eAAOgB,WA3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-router-dom';\nimport styled from 'styled-components';\nimport {NotificationDot} from '../NotificationDot';\nimport {BaseProps} from '../icons';\nimport {Size} from '../types';\nimport {COLORS, focusStyles} from '../styles';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {defaultOnMouseDownHandler} from '../common';\n\ntype TabLinkProps = {\n disabled?: boolean;\n requiredLine: string;\n optionalLine?: string;\n OptionalLineIcon?: React.ReactNode;//React.FunctionComponent<BaseProps>;\n onLinkClick?: (e: React.MouseEvent) => void;\n testId?: string;\n showNotificationDot?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n variant?: 'positive' | 'critical';\n} & NavLinkProps;\n\ntype StyledTabLinkProps = {\n disabled?: boolean;\n exact: boolean;\n};\n\nconst StyledTabLink = styled(NavLink)<StyledTabLinkProps>`\n display: flex;\n flex-direction: row;\n align-items: center;\n\n font-size: 16px;\n line-height: 120%;\n color: ${COLORS.neutral_600};\n\n background-color: ${(props) => (props.disabled ? COLORS.neutral_100 : 'transparent')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n border-left: 1px solid transparent;\n text-decoration: none;\n position: relative;\n border-radius: 2px;\n\n &:not(:last-child) {\n margin-bottom: 4px;\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &.active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n }\n\n &.active:hover {\n background-color: ${COLORS.primary_20};\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &.active {\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 0;\n bottom: 0;\n left: -1px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 2px;\n }\n }\n\n &.active:hover {\n &::after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.active:active {\n background-color: ${COLORS.primary_100};\n\n &::after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n background-color: ${COLORS.white};\n color: ${COLORS.neutral_300};\n\n span {\n color: ${COLORS.neutral_300};\n }\n\n &::after {\n background-color: ${COLORS.neutral_300};\n }\n }\n`;\n\nconst OptionalLineWrapperWithIcon = styled.div`\n display: flex;\n flex-direction: row;\n\n span {\n margin: 0 0 0 4px !important;\n font-size: 12px;\n line-height: 16px;\n }\n`;\n\nconst TopWrapper = styled.div`\n display: flex;\n flex-direction: row;\n\n span:not(:only-child) {\n width: calc(100% - 32px);\n }\n`;\n\nconst TextContainer = styled.div`\n width: 100%;\n margin: auto 0 auto 16px !important;\n`;\n\nconst StyledNotification = styled.div`\n margin: 0 15px 0 0 !important;\n`;\n\nconst OptionalLineWrapper = styled.div`\n font-size: 12px;\n`;\n\nconst Wrapper = styled.div`\n &.disabled {\n cursor: not-allowed;\n\n ${StyledTabLink} {\n pointer-events: none;\n }\n }\n`;\n\nconst TabLink = ({\n to,\n disabled = false,\n exact = false,\n requiredLine,\n optionalLine,\n OptionalLineIcon,\n onLinkClick,\n testId,\n showNotificationDot = false,\n size = Size.Small,\n variant = 'critical'\n }: TabLinkProps) => {\n const location = useLocation();\n const ref = React.useRef<any>(null);\n\n return (\n <Wrapper className={disabled ? 'disabled' : ''}>\n <StyledTabLink\n to={to.toString()}\n className={disabled ? 'disabled' : ''}\n activeClassName=\"active\"\n onMouseDown={defaultOnMouseDownHandler}\n exact={exact}\n tabIndex={disabled ? -1 : 0}\n role=\"tab\"\n aria-selected={to === location.pathname}\n onClick={(e: React.MouseEvent) => !disabled && onLinkClick && onLinkClick(e)}\n ref={ref}\n data-testid={testId}>\n <TextContainer>\n <TopWrapper>\n <span>{requiredLine}</span>\n </TopWrapper>\n {optionalLine && OptionalLineIcon ? (\n <OptionalLineWrapperWithIcon>\n {OptionalLineIcon && OptionalLineIcon}\n {!!optionalLine && <span>{optionalLine}</span>}\n </OptionalLineWrapperWithIcon>\n ) : optionalLine ? (\n <OptionalLineWrapper>\n <span>{optionalLine}</span>\n </OptionalLineWrapper>\n ) : (\n <></>\n )}\n </TextContainer>\n <StyledNotification>\n {showNotificationDot && <NotificationDot testId=\"NotificationDot\" size={size} variant={variant}/>}\n </StyledNotification>\n </StyledTabLink>\n </Wrapper>\n );\n};\n\nexport default TabLink;\n"],"file":"TabLink.cjs"}
@@ -6,7 +6,7 @@ declare type TabLinkProps = {
6
6
  requiredLine: string;
7
7
  optionalLine?: string;
8
8
  OptionalLineIcon?: React.ReactNode;
9
- onLinkClick?: () => void;
9
+ onLinkClick?: (e: React.MouseEvent) => void;
10
10
  testId?: string;
11
11
  showNotificationDot?: boolean;
12
12
  size?: Size.Small | Size.Medium | Size.Large;
@@ -56,8 +56,8 @@ var TabLink = function TabLink(_ref) {
56
56
  tabIndex: disabled ? -1 : 0,
57
57
  role: "tab",
58
58
  "aria-selected": to === location.pathname,
59
- onClick: function onClick() {
60
- return !disabled && onLinkClick && onLinkClick();
59
+ onClick: function onClick(e) {
60
+ return !disabled && onLinkClick && onLinkClick(e);
61
61
  },
62
62
  ref: ref,
63
63
  "data-testid": testId,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Tabs/TabLink.tsx"],"names":["React","NavLink","useLocation","styled","NotificationDot","Size","COLORS","focusStyles","Z_INDEXES","defaultOnMouseDownHandler","StyledTabLink","neutral_600","props","disabled","neutral_100","active","neutral_20","primary_20","hover","primary_600","primary_100","primary_800","primary_500","white","neutral_300","OptionalLineWrapperWithIcon","div","TopWrapper","TextContainer","StyledNotification","OptionalLineWrapper","Wrapper","TabLink","to","exact","requiredLine","optionalLine","OptionalLineIcon","onLinkClick","testId","showNotificationDot","size","Small","variant","location","ref","useRef","toString","pathname"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAAQC,OAAR,EAA+BC,WAA/B,QAAiD,kBAAjD;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,eAAR,QAA8B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nC,QAAD,IAAayB,WAAb,IAA4BA,WAAW,EAA7C;AAAA,OATX;AAUE,MAAA,GAAG,EAAEO,GAVP;AAWE,qBAAaN,MAXf;AAAA,8BAYE,MAAC,aAAD;AAAA,gCACE,KAAC,UAAD;AAAA,iCACE;AAAA,sBAAOJ;AAAP;AADF,UADF,EAIGC,YAAY,IAAIC,gBAAhB,gBACC,MAAC,2BAAD;AAAA,qBACGA,gBAAgB,IAAIA,gBADvB,EAEG,CAAC,CAACD,YAAF,iBAAkB;AAAA,sBAAOA;AAAP,YAFrB;AAAA,UADD,GAKGA,YAAY,gBACd,KAAC,mBAAD;AAAA,iCACE;AAAA,sBAAOA;AAAP;AADF,UADc,gBAKd,mBAdJ;AAAA,QAZF,eA6BE,KAAC,kBAAD;AAAA,kBACGI,mBAAmB,iBAAI,KAAC,eAAD;AAAiB,UAAA,MAAM,EAAC,iBAAxB;AAA0C,UAAA,IAAI,EAAEC,IAAhD;AAAsD,UAAA,OAAO,EAAEE;AAA/D;AAD1B,QA7BF;AAAA;AADF,IADF;AAqCD,CArDD;;;AAlJE9B,EAAAA,Q;AACAsB,EAAAA,Y;AACAC,EAAAA,Y;AACAC,EAAAA,gB;AACAC,EAAAA,W;AACAC,EAAAA,M;AACAC,EAAAA,mB;AAEAG,EAAAA,O,aAAU,U,EAAa,U;;AAiMzB,eAAeX,OAAf","sourcesContent":["import * as React from 'react';\nimport {NavLink, NavLinkProps, useLocation} from 'react-router-dom';\nimport styled from 'styled-components';\nimport {NotificationDot} from '../NotificationDot';\nimport {BaseProps} from '../icons';\nimport {Size} from '../types';\nimport {COLORS, focusStyles} from '../styles';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {defaultOnMouseDownHandler} from '../common';\n\ntype TabLinkProps = {\n disabled?: boolean;\n requiredLine: string;\n optionalLine?: string;\n OptionalLineIcon?: React.ReactNode;//React.FunctionComponent<BaseProps>;\n onLinkClick?: () => void;\n testId?: string;\n showNotificationDot?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n variant?: 'positive' | 'critical';\n} & NavLinkProps;\n\ntype StyledTabLinkProps = {\n disabled?: boolean;\n exact: boolean;\n};\n\nconst StyledTabLink = styled(NavLink)<StyledTabLinkProps>`\n display: flex;\n flex-direction: row;\n align-items: center;\n\n font-size: 16px;\n line-height: 120%;\n color: ${COLORS.neutral_600};\n\n background-color: ${(props) => (props.disabled ? COLORS.neutral_100 : 'transparent')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n border-left: 1px solid transparent;\n text-decoration: none;\n position: relative;\n border-radius: 2px;\n\n &:not(:last-child) {\n margin-bottom: 4px;\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &.active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n }\n\n &.active:hover {\n background-color: ${COLORS.primary_20};\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &.active {\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 0;\n bottom: 0;\n left: -1px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 2px;\n }\n }\n\n &.active:hover {\n &::after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.active:active {\n background-color: ${COLORS.primary_100};\n\n &::after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n background-color: ${COLORS.white};\n color: ${COLORS.neutral_300};\n\n span {\n color: ${COLORS.neutral_300};\n }\n\n &::after {\n background-color: ${COLORS.neutral_300};\n }\n }\n`;\n\nconst OptionalLineWrapperWithIcon = styled.div`\n display: flex;\n flex-direction: row;\n\n span {\n margin: 0 0 0 4px !important;\n font-size: 12px;\n line-height: 16px;\n }\n`;\n\nconst TopWrapper = styled.div`\n display: flex;\n flex-direction: row;\n\n span:not(:only-child) {\n width: calc(100% - 32px);\n }\n`;\n\nconst TextContainer = styled.div`\n width: 100%;\n margin: auto 0 auto 16px !important;\n`;\n\nconst StyledNotification = styled.div`\n margin: 0 15px 0 0 !important;\n`;\n\nconst OptionalLineWrapper = styled.div`\n font-size: 12px;\n`;\n\nconst Wrapper = styled.div`\n &.disabled {\n cursor: not-allowed;\n\n ${StyledTabLink} {\n pointer-events: none;\n }\n }\n`;\n\nconst TabLink = ({\n to,\n disabled = false,\n exact = false,\n requiredLine,\n optionalLine,\n OptionalLineIcon,\n onLinkClick,\n testId,\n showNotificationDot = false,\n size = Size.Small,\n variant = 'critical'\n }: TabLinkProps) => {\n const location = useLocation();\n const ref = React.useRef<any>(null);\n\n return (\n <Wrapper className={disabled ? 'disabled' : ''}>\n <StyledTabLink\n to={to.toString()}\n className={disabled ? 'disabled' : ''}\n activeClassName=\"active\"\n onMouseDown={defaultOnMouseDownHandler}\n exact={exact}\n tabIndex={disabled ? -1 : 0}\n role=\"tab\"\n aria-selected={to === location.pathname}\n onClick={() => !disabled && onLinkClick && onLinkClick()}\n ref={ref}\n data-testid={testId}>\n <TextContainer>\n <TopWrapper>\n <span>{requiredLine}</span>\n </TopWrapper>\n {optionalLine && OptionalLineIcon ? (\n <OptionalLineWrapperWithIcon>\n {OptionalLineIcon && OptionalLineIcon}\n {!!optionalLine && <span>{optionalLine}</span>}\n </OptionalLineWrapperWithIcon>\n ) : optionalLine ? (\n <OptionalLineWrapper>\n <span>{optionalLine}</span>\n </OptionalLineWrapper>\n ) : (\n <></>\n )}\n </TextContainer>\n <StyledNotification>\n {showNotificationDot && <NotificationDot testId=\"NotificationDot\" size={size} variant={variant}/>}\n </StyledNotification>\n </StyledTabLink>\n </Wrapper>\n );\n};\n\nexport default TabLink;\n"],"file":"TabLink.js"}
1
+ {"version":3,"sources":["../../src/Tabs/TabLink.tsx"],"names":["React","NavLink","useLocation","styled","NotificationDot","Size","COLORS","focusStyles","Z_INDEXES","defaultOnMouseDownHandler","StyledTabLink","neutral_600","props","disabled","neutral_100","active","neutral_20","primary_20","hover","primary_600","primary_100","primary_800","primary_500","white","neutral_300","OptionalLineWrapperWithIcon","div","TopWrapper","TextContainer","StyledNotification","OptionalLineWrapper","Wrapper","TabLink","to","exact","requiredLine","optionalLine","OptionalLineIcon","onLinkClick","testId","showNotificationDot","size","Small","variant","location","ref","useRef","toString","pathname","e"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAAQC,OAAR,EAA+BC,WAA/B,QAAiD,kBAAjD;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,eAAR,QAA8B,oBAA9B;AAEA,SAAQC,IAAR,QAAmB,UAAnB;AACA,SAAQC,MAAR,EAAgBC,WAAhB,QAAkC,WAAlC;AACA,SAAQC,SAAR,QAAwB,qBAAxB;AACA,SAAQC,yBAAR,QAAwC,WAAxC;;;;AAmBA,IAAMC,aAAa,GAAGP,MAAM,CAACF,OAAD,CAAT,8yCAORK,MAAM,CAACK,WAPC,EASG,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,GAAiBP,MAAM,CAACQ,WAAxB,GAAsC,aAAlD;AAAA,CATH,EAUP,UAACF,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,GAAiB,aAAjB,GAAiC,SAA7C;AAAA,CAVO,EAqBbN,WArBa,EAyBJC,SAAS,CAACO,MAzBN,EA0BKT,MAAM,CAACU,UA1BZ,EA8BKV,MAAM,CAACW,UA9BZ,EAkCJT,SAAS,CAACU,KAlCN,EAmCKZ,MAAM,CAACW,UAnCZ,EAoCNX,MAAM,CAACa,WApCD,EAwCJX,SAAS,CAACO,MAxCN,EAyCKT,MAAM,CAACc,WAzCZ,EA0CNd,MAAM,CAACe,WA1CD,EAqDOf,MAAM,CAACgB,WArDd,EA6DOhB,MAAM,CAACa,WA7Dd,EAkEKb,MAAM,CAACc,WAlEZ,EAqEOd,MAAM,CAACe,WArEd,EA0EKf,MAAM,CAACiB,KA1EZ,EA2ENj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MzB,eAAeX,OAAf","sourcesContent":["import * as React from 'react';\nimport {NavLink, NavLinkProps, useLocation} from 'react-router-dom';\nimport styled from 'styled-components';\nimport {NotificationDot} from '../NotificationDot';\nimport {BaseProps} from '../icons';\nimport {Size} from '../types';\nimport {COLORS, focusStyles} from '../styles';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {defaultOnMouseDownHandler} from '../common';\n\ntype TabLinkProps = {\n disabled?: boolean;\n requiredLine: string;\n optionalLine?: string;\n OptionalLineIcon?: React.ReactNode;//React.FunctionComponent<BaseProps>;\n onLinkClick?: (e: React.MouseEvent) => void;\n testId?: string;\n showNotificationDot?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n variant?: 'positive' | 'critical';\n} & NavLinkProps;\n\ntype StyledTabLinkProps = {\n disabled?: boolean;\n exact: boolean;\n};\n\nconst StyledTabLink = styled(NavLink)<StyledTabLinkProps>`\n display: flex;\n flex-direction: row;\n align-items: center;\n\n font-size: 16px;\n line-height: 120%;\n color: ${COLORS.neutral_600};\n\n background-color: ${(props) => (props.disabled ? COLORS.neutral_100 : 'transparent')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n border-left: 1px solid transparent;\n text-decoration: none;\n position: relative;\n border-radius: 2px;\n\n &:not(:last-child) {\n margin-bottom: 4px;\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &.active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n }\n\n &.active:hover {\n background-color: ${COLORS.primary_20};\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &.active {\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 0;\n bottom: 0;\n left: -1px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 2px;\n }\n }\n\n &.active:hover {\n &::after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.active:active {\n background-color: ${COLORS.primary_100};\n\n &::after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n background-color: ${COLORS.white};\n color: ${COLORS.neutral_300};\n\n span {\n color: ${COLORS.neutral_300};\n }\n\n &::after {\n background-color: ${COLORS.neutral_300};\n }\n }\n`;\n\nconst OptionalLineWrapperWithIcon = styled.div`\n display: flex;\n flex-direction: row;\n\n span {\n margin: 0 0 0 4px !important;\n font-size: 12px;\n line-height: 16px;\n }\n`;\n\nconst TopWrapper = styled.div`\n display: flex;\n flex-direction: row;\n\n span:not(:only-child) {\n width: calc(100% - 32px);\n }\n`;\n\nconst TextContainer = styled.div`\n width: 100%;\n margin: auto 0 auto 16px !important;\n`;\n\nconst StyledNotification = styled.div`\n margin: 0 15px 0 0 !important;\n`;\n\nconst OptionalLineWrapper = styled.div`\n font-size: 12px;\n`;\n\nconst Wrapper = styled.div`\n &.disabled {\n cursor: not-allowed;\n\n ${StyledTabLink} {\n pointer-events: none;\n }\n }\n`;\n\nconst TabLink = ({\n to,\n disabled = false,\n exact = false,\n requiredLine,\n optionalLine,\n OptionalLineIcon,\n onLinkClick,\n testId,\n showNotificationDot = false,\n size = Size.Small,\n variant = 'critical'\n }: TabLinkProps) => {\n const location = useLocation();\n const ref = React.useRef<any>(null);\n\n return (\n <Wrapper className={disabled ? 'disabled' : ''}>\n <StyledTabLink\n to={to.toString()}\n className={disabled ? 'disabled' : ''}\n activeClassName=\"active\"\n onMouseDown={defaultOnMouseDownHandler}\n exact={exact}\n tabIndex={disabled ? -1 : 0}\n role=\"tab\"\n aria-selected={to === location.pathname}\n onClick={(e: React.MouseEvent) => !disabled && onLinkClick && onLinkClick(e)}\n ref={ref}\n data-testid={testId}>\n <TextContainer>\n <TopWrapper>\n <span>{requiredLine}</span>\n </TopWrapper>\n {optionalLine && OptionalLineIcon ? (\n <OptionalLineWrapperWithIcon>\n {OptionalLineIcon && OptionalLineIcon}\n {!!optionalLine && <span>{optionalLine}</span>}\n </OptionalLineWrapperWithIcon>\n ) : optionalLine ? (\n <OptionalLineWrapper>\n <span>{optionalLine}</span>\n </OptionalLineWrapper>\n ) : (\n <></>\n )}\n </TextContainer>\n <StyledNotification>\n {showNotificationDot && <NotificationDot testId=\"NotificationDot\" size={size} variant={variant}/>}\n </StyledNotification>\n </StyledTabLink>\n </Wrapper>\n );\n};\n\nexport default TabLink;\n"],"file":"TabLink.js"}
@@ -41,9 +41,9 @@ var VerticalTabs = function VerticalTabs(_ref) {
41
41
  showNotificationDot: entry.showNotificationDot,
42
42
  size: size,
43
43
  variant: entry.variant,
44
- onLinkClick: function onLinkClick() {
44
+ onLinkClick: function onLinkClick(e) {
45
45
  if (entry.onClick) {
46
- entry.onClick();
46
+ entry.onClick(e);
47
47
  }
48
48
  }
49
49
  }, entry.to);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Tabs/VerticalTabs.tsx"],"names":["VerticalTabs","size","entries","Size","Large","map","entry","to","exact","requiredLine","optionalLine","optionalLineIcon","disabled","showNotificationDot","variant","onClick"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;;;AAkBA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAA0C;AAAA,MAAvCC,IAAuC,QAAvCA,IAAuC;AAAA,MAAjCC,OAAiC,QAAjCA,OAAiC;AAC7D,sBACE,qBAAC,aAAD;AAAM,IAAA,IAAI,EAAED,IAAF,aAAEA,IAAF,cAAEA,IAAF,GAAUE,YAAKC,KAAzB;AAAA,cACGF,OADH,aACGA,OADH,uBACGA,OAAO,CAAEG,GAAT,CAAa,UAACC,KAAD;AAAA,0BACZ,qBAAC,gBAAD;AAEE,QAAA,EAAE,EAAEA,KAAK,CAACC,EAFZ;AAGE,QAAA,KAAK,EAAED,KAAK,CAACE,KAHf;AAIE,QAAA,YAAY,EAAEF,KAAK,CAACG,YAJtB;AAKE,QAAA,YAAY,EAAEH,KAAK,CAACI,YALtB;AAME,QAAA,gBAAgB,EAAEJ,KAAK,CAACK,gBAN1B;AAOE,QAAA,QAAQ,EAAEL,KAAK,CAACM,QAPlB;AAQE,QAAA,mBAAmB,EAAEN,KAAK,CAACO,mBAR7B;AASE,QAAA,IAAI,EAAEZ,IATR;AAUE,QAAA,OAAO,EAAEK,KAAK,CAACQ,OAVjB;AAWE,QAAA,WAAW,EAAE,uBAAM;AACjB,cAAIR,KAAK,CAACS,OAAV,EAAmB;AACjBT,YAAAA,KAAK,CAACS,OAAN;AACD;AACF;AAfH,SACOT,KAAK,CAACC,EADb,CADY;AAAA,KAAb;AADH,IADF;AAsBD,CAvBD;;;AAHEL,EAAAA,O;AAZAO,IAAAA,Y;AACAC,IAAAA,Y;AAEAH,IAAAA,E;AACAK,IAAAA,Q;AACAG,IAAAA,O;AACAP,IAAAA,K;AACAK,IAAAA,mB;AACAC,IAAAA,O,4BAAU,U,EAAa,U;;;eAgCVd,Y","sourcesContent":["import * as React from 'react';\nimport Tabs from './Tabs';\nimport TabLink from './TabLink';\nimport { BaseProps } from '../icons';\nimport { Size } from '../types';\n\nexport interface VerticalTabEntry {\n requiredLine: string;\n optionalLine?: string;\n optionalLineIcon?: React.FunctionComponent<BaseProps>;\n to: string;\n disabled?: boolean;\n onClick?: () => void;\n exact?: boolean;\n showNotificationDot?: boolean;\n variant?: 'critical' | 'positive';\n}\ninterface VerticalTabsProps {\n size?: Size.Small | Size.Medium | Size.Large;\n entries: VerticalTabEntry[];\n}\n\nconst VerticalTabs = ({ size, entries }: VerticalTabsProps) => {\n return (\n <Tabs size={size ?? Size.Large}>\n {entries?.map((entry: VerticalTabEntry) => (\n <TabLink\n key={entry.to}\n to={entry.to}\n exact={entry.exact}\n requiredLine={entry.requiredLine}\n optionalLine={entry.optionalLine}\n OptionalLineIcon={entry.optionalLineIcon}\n disabled={entry.disabled}\n showNotificationDot={entry.showNotificationDot}\n size={size}\n variant={entry.variant}\n onLinkClick={() => {\n if (entry.onClick) {\n entry.onClick();\n }\n }}/>\n ))}\n </Tabs>\n );\n};\n\nexport default VerticalTabs;\n"],"file":"VerticalTabs.cjs"}
1
+ {"version":3,"sources":["../../src/Tabs/VerticalTabs.tsx"],"names":["VerticalTabs","size","entries","Size","Large","map","entry","to","exact","requiredLine","optionalLine","optionalLineIcon","disabled","showNotificationDot","variant","e","onClick"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;;;AAkBA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAA0C;AAAA,MAAvCC,IAAuC,QAAvCA,IAAuC;AAAA,MAAjCC,OAAiC,QAAjCA,OAAiC;AAC7D,sBACE,qBAAC,aAAD;AAAM,IAAA,IAAI,EAAED,IAAF,aAAEA,IAAF,cAAEA,IAAF,GAAUE,YAAKC,KAAzB;AAAA,cACGF,OADH,aACGA,OADH,uBACGA,OAAO,CAAEG,GAAT,CAAa,UAACC,KAAD;AAAA,0BACZ,qBAAC,gBAAD;AAEE,QAAA,EAAE,EAAEA,KAAK,CAACC,EAFZ;AAGE,QAAA,KAAK,EAAED,KAAK,CAACE,KAHf;AAIE,QAAA,YAAY,EAAEF,KAAK,CAACG,YAJtB;AAKE,QAAA,YAAY,EAAEH,KAAK,CAACI,YALtB;AAME,QAAA,gBAAgB,EAAEJ,KAAK,CAACK,gBAN1B;AAOE,QAAA,QAAQ,EAAEL,KAAK,CAACM,QAPlB;AAQE,QAAA,mBAAmB,EAAEN,KAAK,CAACO,mBAR7B;AASE,QAAA,IAAI,EAAEZ,IATR;AAUE,QAAA,OAAO,EAAEK,KAAK,CAACQ,OAVjB;AAWE,QAAA,WAAW,EAAE,qBAACC,CAAD,EAAO;AAClB,cAAIT,KAAK,CAACU,OAAV,EAAmB;AACjBV,YAAAA,KAAK,CAACU,OAAN,CAAcD,CAAd;AACD;AACF;AAfH,SACOT,KAAK,CAACC,EADb,CADY;AAAA,KAAb;AADH,IADF;AAsBD,CAvBD;;;AAHEL,EAAAA,O;AAZAO,IAAAA,Y;AACAC,IAAAA,Y;AAEAH,IAAAA,E;AACAK,IAAAA,Q;AACAI,IAAAA,O;AACAR,IAAAA,K;AACAK,IAAAA,mB;AACAC,IAAAA,O,4BAAU,U,EAAa,U;;;eAgCVd,Y","sourcesContent":["import * as React from 'react';\nimport Tabs from './Tabs';\nimport TabLink from './TabLink';\nimport { BaseProps } from '../icons';\nimport { Size } from '../types';\n\nexport interface VerticalTabEntry {\n requiredLine: string;\n optionalLine?: string;\n optionalLineIcon?: React.FunctionComponent<BaseProps>;\n to: string;\n disabled?: boolean;\n onClick?: (e: React.MouseEvent) => void;\n exact?: boolean;\n showNotificationDot?: boolean;\n variant?: 'critical' | 'positive';\n}\ninterface VerticalTabsProps {\n size?: Size.Small | Size.Medium | Size.Large;\n entries: VerticalTabEntry[];\n}\n\nconst VerticalTabs = ({ size, entries }: VerticalTabsProps) => {\n return (\n <Tabs size={size ?? Size.Large}>\n {entries?.map((entry: VerticalTabEntry) => (\n <TabLink\n key={entry.to}\n to={entry.to}\n exact={entry.exact}\n requiredLine={entry.requiredLine}\n optionalLine={entry.optionalLine}\n OptionalLineIcon={entry.optionalLineIcon}\n disabled={entry.disabled}\n showNotificationDot={entry.showNotificationDot}\n size={size}\n variant={entry.variant}\n onLinkClick={(e) => {\n if (entry.onClick) {\n entry.onClick(e);\n }\n }}/>\n ))}\n </Tabs>\n );\n};\n\nexport default VerticalTabs;\n"],"file":"VerticalTabs.cjs"}
@@ -7,7 +7,7 @@ export interface VerticalTabEntry {
7
7
  optionalLineIcon?: React.FunctionComponent<BaseProps>;
8
8
  to: string;
9
9
  disabled?: boolean;
10
- onClick?: () => void;
10
+ onClick?: (e: React.MouseEvent) => void;
11
11
  exact?: boolean;
12
12
  showNotificationDot?: boolean;
13
13
  variant?: 'critical' | 'positive';
@@ -21,9 +21,9 @@ var VerticalTabs = function VerticalTabs(_ref) {
21
21
  showNotificationDot: entry.showNotificationDot,
22
22
  size: size,
23
23
  variant: entry.variant,
24
- onLinkClick: function onLinkClick() {
24
+ onLinkClick: function onLinkClick(e) {
25
25
  if (entry.onClick) {
26
- entry.onClick();
26
+ entry.onClick(e);
27
27
  }
28
28
  }
29
29
  }, entry.to);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Tabs/VerticalTabs.tsx"],"names":["React","Tabs","TabLink","Size","VerticalTabs","size","entries","Large","map","entry","to","exact","requiredLine","optionalLine","optionalLineIcon","disabled","showNotificationDot","variant","onClick"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,OAAP,MAAoB,WAApB;AAEA,SAASC,IAAT,QAAqB,UAArB;;;AAkBA,IAAMC,YAAY,GAAG,SAAfA,YAAe,OAA0C;AAAA,MAAvCC,IAAuC,QAAvCA,IAAuC;AAAA,MAAjCC,OAAiC,QAAjCA,OAAiC;AAC7D,sBACE,KAAC,IAAD;AAAM,IAAA,IAAI,EAAED,IAAF,aAAEA,IAAF,cAAEA,IAAF,GAAUF,IAAI,CAACI,KAAzB;AAAA,cACGD,OADH,aACGA,OADH,uBACGA,OAAO,CAAEE,GAAT,CAAa,UAACC,KAAD;AAAA,0BACZ,KAAC,OAAD;AAEE,QAAA,EAAE,EAAEA,KAAK,CAACC,EAFZ;AAGE,QAAA,KAAK,EAAED,KAAK,CAACE,KAHf;AAIE,QAAA,YAAY,EAAEF,KAAK,CAACG,YAJtB;AAKE,QAAA,YAAY,EAAEH,KAAK,CAACI,YALtB;AAME,QAAA,gBAAgB,EAAEJ,KAAK,CAACK,gBAN1B;AAOE,QAAA,QAAQ,EAAEL,KAAK,CAACM,QAPlB;AAQE,QAAA,mBAAmB,EAAEN,KAAK,CAACO,mBAR7B;AASE,QAAA,IAAI,EAAEX,IATR;AAUE,QAAA,OAAO,EAAEI,KAAK,CAACQ,OAVjB;AAWE,QAAA,WAAW,EAAE,uBAAM;AACjB,cAAIR,KAAK,CAACS,OAAV,EAAmB;AACjBT,YAAAA,KAAK,CAACS,OAAN;AACD;AACF;AAfH,SACOT,KAAK,CAACC,EADb,CADY;AAAA,KAAb;AADH,IADF;AAsBD,CAvBD;;;AAHEJ,EAAAA,O;AAZAM,IAAAA,Y;AACAC,IAAAA,Y;AAEAH,IAAAA,E;AACAK,IAAAA,Q;AACAG,IAAAA,O;AACAP,IAAAA,K;AACAK,IAAAA,mB;AACAC,IAAAA,O,aAAU,U,EAAa,U;;;AAgCzB,eAAeb,YAAf","sourcesContent":["import * as React from 'react';\nimport Tabs from './Tabs';\nimport TabLink from './TabLink';\nimport { BaseProps } from '../icons';\nimport { Size } from '../types';\n\nexport interface VerticalTabEntry {\n requiredLine: string;\n optionalLine?: string;\n optionalLineIcon?: React.FunctionComponent<BaseProps>;\n to: string;\n disabled?: boolean;\n onClick?: () => void;\n exact?: boolean;\n showNotificationDot?: boolean;\n variant?: 'critical' | 'positive';\n}\ninterface VerticalTabsProps {\n size?: Size.Small | Size.Medium | Size.Large;\n entries: VerticalTabEntry[];\n}\n\nconst VerticalTabs = ({ size, entries }: VerticalTabsProps) => {\n return (\n <Tabs size={size ?? Size.Large}>\n {entries?.map((entry: VerticalTabEntry) => (\n <TabLink\n key={entry.to}\n to={entry.to}\n exact={entry.exact}\n requiredLine={entry.requiredLine}\n optionalLine={entry.optionalLine}\n OptionalLineIcon={entry.optionalLineIcon}\n disabled={entry.disabled}\n showNotificationDot={entry.showNotificationDot}\n size={size}\n variant={entry.variant}\n onLinkClick={() => {\n if (entry.onClick) {\n entry.onClick();\n }\n }}/>\n ))}\n </Tabs>\n );\n};\n\nexport default VerticalTabs;\n"],"file":"VerticalTabs.js"}
1
+ {"version":3,"sources":["../../src/Tabs/VerticalTabs.tsx"],"names":["React","Tabs","TabLink","Size","VerticalTabs","size","entries","Large","map","entry","to","exact","requiredLine","optionalLine","optionalLineIcon","disabled","showNotificationDot","variant","e","onClick"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,IAAP,MA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s';\nimport TabLink from './TabLink';\nimport { BaseProps } from '../icons';\nimport { Size } from '../types';\n\nexport interface VerticalTabEntry {\n requiredLine: string;\n optionalLine?: string;\n optionalLineIcon?: React.FunctionComponent<BaseProps>;\n to: string;\n disabled?: boolean;\n onClick?: (e: React.MouseEvent) => void;\n exact?: boolean;\n showNotificationDot?: boolean;\n variant?: 'critical' | 'positive';\n}\ninterface VerticalTabsProps {\n size?: Size.Small | Size.Medium | Size.Large;\n entries: VerticalTabEntry[];\n}\n\nconst VerticalTabs = ({ size, entries }: VerticalTabsProps) => {\n return (\n <Tabs size={size ?? Size.Large}>\n {entries?.map((entry: VerticalTabEntry) => (\n <TabLink\n key={entry.to}\n to={entry.to}\n exact={entry.exact}\n requiredLine={entry.requiredLine}\n optionalLine={entry.optionalLine}\n OptionalLineIcon={entry.optionalLineIcon}\n disabled={entry.disabled}\n showNotificationDot={entry.showNotificationDot}\n size={size}\n variant={entry.variant}\n onLinkClick={(e) => {\n if (entry.onClick) {\n entry.onClick(e);\n }\n }}/>\n ))}\n </Tabs>\n );\n};\n\nexport default VerticalTabs;\n"],"file":"VerticalTabs.js"}
@@ -30,7 +30,7 @@ var useClickOutsideRef = function useClickOutsideRef(callback) {
30
30
  return function () {
31
31
  document.removeEventListener('click', handleClickOutside);
32
32
  };
33
- }, [elementRef]);
33
+ }, [elementRef, relatedRefs]);
34
34
 
35
35
  return elementRef;
36
36
  };