@dxc-technology/halstack-react 0.0.0-bd364ae → 0.0.0-bd47c58

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 (265) hide show
  1. package/BackgroundColorContext.d.ts +2 -2
  2. package/BackgroundColorContext.js +1 -1
  3. package/HalstackContext.d.ts +1337 -5
  4. package/HalstackContext.js +117 -77
  5. package/README.md +47 -0
  6. package/accordion/Accordion.d.ts +1 -1
  7. package/accordion/Accordion.js +110 -114
  8. package/accordion/Accordion.stories.tsx +105 -115
  9. package/accordion/Accordion.test.js +10 -11
  10. package/accordion/types.d.ts +1 -12
  11. package/accordion-group/AccordionGroup.d.ts +4 -3
  12. package/accordion-group/AccordionGroup.js +25 -65
  13. package/accordion-group/AccordionGroup.stories.tsx +93 -66
  14. package/accordion-group/AccordionGroup.test.js +27 -62
  15. package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
  16. package/accordion-group/AccordionGroupAccordion.js +43 -0
  17. package/accordion-group/types.d.ts +7 -12
  18. package/alert/Alert.js +5 -9
  19. package/alert/Alert.stories.tsx +28 -0
  20. package/alert/Alert.test.js +1 -1
  21. package/bleed/Bleed.stories.tsx +64 -63
  22. package/box/Box.d.ts +1 -1
  23. package/box/Box.js +8 -27
  24. package/box/Box.stories.tsx +38 -51
  25. package/box/Box.test.js +1 -1
  26. package/box/types.d.ts +0 -11
  27. package/bulleted-list/BulletedList.d.ts +7 -0
  28. package/bulleted-list/BulletedList.js +125 -0
  29. package/bulleted-list/BulletedList.stories.tsx +206 -0
  30. package/bulleted-list/types.d.ts +38 -0
  31. package/button/Button.d.ts +1 -1
  32. package/button/Button.js +42 -72
  33. package/button/Button.stories.tsx +159 -8
  34. package/button/Button.test.js +12 -1
  35. package/button/types.d.ts +9 -5
  36. package/card/Card.d.ts +1 -1
  37. package/card/Card.js +27 -45
  38. package/card/Card.stories.tsx +12 -42
  39. package/card/Card.test.js +1 -1
  40. package/card/types.d.ts +1 -6
  41. package/checkbox/Checkbox.d.ts +2 -2
  42. package/checkbox/Checkbox.js +94 -101
  43. package/checkbox/Checkbox.stories.tsx +131 -59
  44. package/checkbox/Checkbox.test.js +94 -17
  45. package/checkbox/types.d.ts +4 -0
  46. package/chip/Chip.js +28 -49
  47. package/chip/Chip.stories.tsx +121 -26
  48. package/chip/Chip.test.js +3 -5
  49. package/chip/types.d.ts +1 -1
  50. package/common/OpenSans.css +68 -80
  51. package/common/coreTokens.d.ts +146 -0
  52. package/common/coreTokens.js +167 -0
  53. package/common/utils.d.ts +1 -0
  54. package/common/utils.js +4 -4
  55. package/common/variables.d.ts +1490 -0
  56. package/common/variables.js +1016 -1117
  57. package/date-input/Calendar.d.ts +4 -0
  58. package/date-input/Calendar.js +258 -0
  59. package/date-input/DateInput.js +134 -237
  60. package/date-input/DateInput.stories.tsx +199 -33
  61. package/date-input/DateInput.test.js +494 -138
  62. package/date-input/DatePicker.d.ts +4 -0
  63. package/date-input/DatePicker.js +146 -0
  64. package/date-input/Icons.d.ts +6 -0
  65. package/date-input/Icons.js +75 -0
  66. package/date-input/YearPicker.d.ts +4 -0
  67. package/date-input/YearPicker.js +126 -0
  68. package/date-input/types.d.ts +51 -0
  69. package/dialog/Dialog.d.ts +1 -1
  70. package/dialog/Dialog.js +72 -79
  71. package/dialog/Dialog.stories.tsx +154 -171
  72. package/dialog/Dialog.test.js +334 -5
  73. package/dialog/types.d.ts +0 -12
  74. package/dropdown/Dropdown.d.ts +1 -1
  75. package/dropdown/Dropdown.js +246 -249
  76. package/dropdown/Dropdown.stories.tsx +245 -56
  77. package/dropdown/Dropdown.test.js +507 -110
  78. package/dropdown/DropdownMenu.d.ts +4 -0
  79. package/dropdown/DropdownMenu.js +74 -0
  80. package/dropdown/DropdownMenuItem.d.ts +4 -0
  81. package/dropdown/DropdownMenuItem.js +79 -0
  82. package/dropdown/types.d.ts +23 -3
  83. package/file-input/FileInput.d.ts +2 -2
  84. package/file-input/FileInput.js +174 -220
  85. package/file-input/FileInput.stories.tsx +122 -11
  86. package/file-input/FileInput.test.js +14 -14
  87. package/file-input/FileItem.d.ts +4 -14
  88. package/file-input/FileItem.js +39 -63
  89. package/file-input/types.d.ts +18 -1
  90. package/flex/Flex.d.ts +4 -0
  91. package/flex/Flex.js +71 -0
  92. package/flex/Flex.stories.tsx +112 -0
  93. package/flex/types.d.ts +97 -0
  94. package/footer/Footer.d.ts +1 -1
  95. package/footer/Footer.js +44 -64
  96. package/footer/Footer.stories.tsx +37 -16
  97. package/footer/Footer.test.js +16 -26
  98. package/footer/Icons.js +1 -1
  99. package/footer/types.d.ts +11 -12
  100. package/grid/Grid.d.ts +7 -0
  101. package/grid/Grid.js +91 -0
  102. package/grid/Grid.stories.tsx +219 -0
  103. package/grid/types.d.ts +115 -0
  104. package/header/Header.d.ts +4 -3
  105. package/header/Header.js +83 -110
  106. package/header/Header.stories.tsx +118 -39
  107. package/header/Header.test.js +2 -2
  108. package/header/Icons.js +2 -2
  109. package/header/types.d.ts +0 -13
  110. package/heading/Heading.js +1 -1
  111. package/heading/Heading.test.js +1 -1
  112. package/image/Image.d.ts +4 -0
  113. package/image/Image.js +85 -0
  114. package/image/Image.stories.tsx +127 -0
  115. package/image/types.d.ts +72 -0
  116. package/inset/Inset.stories.tsx +5 -4
  117. package/layout/ApplicationLayout.d.ts +15 -6
  118. package/layout/ApplicationLayout.js +44 -69
  119. package/layout/ApplicationLayout.stories.tsx +80 -44
  120. package/layout/types.d.ts +18 -29
  121. package/link/Link.js +4 -4
  122. package/link/Link.stories.tsx +73 -6
  123. package/link/Link.test.js +2 -4
  124. package/link/types.d.ts +3 -3
  125. package/main.d.ts +8 -9
  126. package/main.js +41 -49
  127. package/{tabs-nav → nav-tabs}/NavTabs.d.ts +2 -2
  128. package/{tabs-nav → nav-tabs}/NavTabs.js +13 -16
  129. package/{tabs-nav → nav-tabs}/NavTabs.stories.tsx +110 -6
  130. package/{tabs-nav → nav-tabs}/NavTabs.test.js +1 -1
  131. package/{tabs-nav → nav-tabs}/Tab.js +51 -37
  132. package/{tabs-nav → nav-tabs}/types.d.ts +9 -10
  133. package/number-input/NumberInput.d.ts +7 -0
  134. package/number-input/NumberInput.js +6 -4
  135. package/number-input/NumberInput.test.js +317 -98
  136. package/package.json +18 -22
  137. package/paginator/Icons.d.ts +5 -0
  138. package/paginator/Icons.js +16 -28
  139. package/paginator/Paginator.js +8 -16
  140. package/paginator/Paginator.stories.tsx +24 -0
  141. package/paginator/Paginator.test.js +91 -39
  142. package/paragraph/Paragraph.d.ts +5 -0
  143. package/paragraph/Paragraph.js +38 -0
  144. package/paragraph/Paragraph.stories.tsx +44 -0
  145. package/password-input/Icons.d.ts +6 -0
  146. package/password-input/Icons.js +39 -0
  147. package/password-input/PasswordInput.js +35 -82
  148. package/password-input/PasswordInput.stories.tsx +1 -0
  149. package/password-input/PasswordInput.test.js +34 -40
  150. package/progress-bar/ProgressBar.js +60 -54
  151. package/progress-bar/ProgressBar.stories.jsx +38 -3
  152. package/progress-bar/ProgressBar.test.js +68 -23
  153. package/quick-nav/QuickNav.js +23 -18
  154. package/quick-nav/QuickNav.stories.tsx +145 -26
  155. package/radio-group/Radio.d.ts +1 -1
  156. package/radio-group/Radio.js +46 -31
  157. package/radio-group/RadioGroup.js +31 -32
  158. package/radio-group/RadioGroup.stories.tsx +132 -18
  159. package/radio-group/RadioGroup.test.js +124 -97
  160. package/radio-group/types.d.ts +2 -2
  161. package/resultsetTable/Icons.d.ts +7 -0
  162. package/resultsetTable/Icons.js +51 -0
  163. package/resultsetTable/ResultsetTable.js +49 -108
  164. package/resultsetTable/ResultsetTable.stories.tsx +50 -25
  165. package/resultsetTable/ResultsetTable.test.js +61 -42
  166. package/resultsetTable/types.d.ts +1 -1
  167. package/select/Listbox.d.ts +1 -1
  168. package/select/Listbox.js +33 -16
  169. package/select/Option.js +11 -24
  170. package/select/Select.js +92 -71
  171. package/select/Select.stories.tsx +513 -136
  172. package/select/Select.test.js +413 -305
  173. package/select/types.d.ts +3 -6
  174. package/sidenav/Icons.d.ts +7 -0
  175. package/sidenav/Icons.js +51 -0
  176. package/sidenav/Sidenav.d.ts +6 -5
  177. package/sidenav/Sidenav.js +139 -48
  178. package/sidenav/Sidenav.stories.tsx +251 -151
  179. package/sidenav/Sidenav.test.js +25 -37
  180. package/sidenav/types.d.ts +52 -26
  181. package/slider/Slider.d.ts +2 -2
  182. package/slider/Slider.js +121 -97
  183. package/slider/Slider.stories.tsx +64 -1
  184. package/slider/Slider.test.js +122 -22
  185. package/slider/types.d.ts +4 -0
  186. package/spinner/Spinner.js +17 -23
  187. package/spinner/Spinner.stories.jsx +53 -27
  188. package/spinner/Spinner.test.js +1 -1
  189. package/switch/Switch.d.ts +2 -2
  190. package/switch/Switch.js +137 -70
  191. package/switch/Switch.stories.tsx +41 -30
  192. package/switch/Switch.test.js +145 -18
  193. package/switch/types.d.ts +4 -0
  194. package/table/Table.js +3 -3
  195. package/table/Table.stories.jsx +80 -1
  196. package/table/Table.test.js +2 -2
  197. package/tabs/Tab.d.ts +4 -0
  198. package/tabs/Tab.js +132 -0
  199. package/tabs/Tabs.js +358 -108
  200. package/tabs/Tabs.stories.tsx +119 -5
  201. package/tabs/Tabs.test.js +220 -10
  202. package/tabs/types.d.ts +13 -3
  203. package/tag/Tag.js +8 -10
  204. package/tag/Tag.stories.tsx +14 -1
  205. package/tag/Tag.test.js +1 -1
  206. package/tag/types.d.ts +1 -1
  207. package/text-input/Icons.d.ts +8 -0
  208. package/text-input/Icons.js +60 -0
  209. package/text-input/Suggestion.js +40 -11
  210. package/text-input/Suggestions.d.ts +4 -0
  211. package/text-input/Suggestions.js +134 -0
  212. package/text-input/TextInput.js +235 -348
  213. package/text-input/TextInput.stories.tsx +280 -185
  214. package/text-input/TextInput.test.js +736 -725
  215. package/text-input/types.d.ts +22 -3
  216. package/textarea/Textarea.js +3 -4
  217. package/textarea/Textarea.stories.jsx +60 -1
  218. package/textarea/Textarea.test.js +2 -4
  219. package/toggle-group/ToggleGroup.d.ts +2 -2
  220. package/toggle-group/ToggleGroup.js +85 -59
  221. package/toggle-group/ToggleGroup.stories.tsx +45 -0
  222. package/toggle-group/ToggleGroup.test.js +38 -24
  223. package/toggle-group/types.d.ts +23 -14
  224. package/typography/Typography.d.ts +4 -0
  225. package/typography/Typography.js +32 -0
  226. package/typography/Typography.stories.tsx +198 -0
  227. package/typography/types.d.ts +18 -0
  228. package/typography/types.js +5 -0
  229. package/useTheme.d.ts +1242 -1
  230. package/useTheme.js +1 -1
  231. package/useTranslatedLabels.d.ts +84 -1
  232. package/utils/BaseTypography.d.ts +21 -0
  233. package/utils/BaseTypography.js +108 -0
  234. package/utils/FocusLock.d.ts +13 -0
  235. package/utils/FocusLock.js +138 -0
  236. package/wizard/Wizard.js +10 -17
  237. package/wizard/Wizard.stories.tsx +40 -1
  238. package/wizard/Wizard.test.js +1 -1
  239. package/wizard/types.d.ts +3 -3
  240. package/card/ice-cream.jpg +0 -0
  241. package/common/RequiredComponent.js +0 -32
  242. package/list/List.d.ts +0 -4
  243. package/list/List.js +0 -47
  244. package/list/List.stories.tsx +0 -95
  245. package/list/types.d.ts +0 -7
  246. package/number-input/NumberInputContext.d.ts +0 -4
  247. package/number-input/NumberInputContext.js +0 -19
  248. package/number-input/numberInputContextTypes.d.ts +0 -19
  249. package/row/Row.d.ts +0 -3
  250. package/row/Row.js +0 -127
  251. package/row/Row.stories.tsx +0 -237
  252. package/row/types.d.ts +0 -28
  253. package/stack/Stack.d.ts +0 -3
  254. package/stack/Stack.js +0 -97
  255. package/stack/Stack.stories.tsx +0 -164
  256. package/stack/types.d.ts +0 -24
  257. package/text/Text.d.ts +0 -7
  258. package/text/Text.js +0 -30
  259. package/text/Text.stories.tsx +0 -19
  260. /package/{list → bulleted-list}/types.js +0 -0
  261. /package/{row → flex}/types.js +0 -0
  262. /package/{stack → grid}/types.js +0 -0
  263. /package/{tabs-nav → image}/types.js +0 -0
  264. /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
  265. /package/{number-input/numberInputContextTypes.js → nav-tabs/types.js} +0 -0
package/tabs/Tabs.js CHANGED
@@ -17,24 +17,61 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
17
17
 
18
18
  var _react = _interopRequireWildcard(require("react"));
19
19
 
20
- var _Tabs = _interopRequireDefault(require("@material-ui/core/Tabs"));
21
-
22
- var _Tab = _interopRequireDefault(require("@material-ui/core/Tab"));
23
-
24
20
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
25
21
 
26
- var _variables = require("../common/variables.js");
27
-
28
- var _Badge = _interopRequireDefault(require("../badge/Badge"));
22
+ var _variables = require("../common/variables");
29
23
 
30
24
  var _useTheme = _interopRequireDefault(require("../useTheme"));
31
25
 
32
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
26
+ var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
27
+
28
+ var _Tab = _interopRequireDefault(require("./Tab"));
29
+
30
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
33
31
 
34
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
33
 
36
34
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
37
35
 
36
+ var arrowIcons = {
37
+ left: /*#__PURE__*/_react["default"].createElement("svg", {
38
+ focusable: "false",
39
+ viewBox: "0 0 24 24",
40
+ "aria-hidden": "true"
41
+ }, /*#__PURE__*/_react["default"].createElement("path", {
42
+ d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
43
+ })),
44
+ right: /*#__PURE__*/_react["default"].createElement("svg", {
45
+ focusable: "false",
46
+ viewBox: "0 0 24 24",
47
+ "aria-hidden": "true"
48
+ }, /*#__PURE__*/_react["default"].createElement("path", {
49
+ d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
50
+ }))
51
+ };
52
+
53
+ var useResize = function useResize(refTabList) {
54
+ var _useState = (0, _react.useState)(0),
55
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
56
+ viewWidth = _useState2[0],
57
+ setViewWidth = _useState2[1];
58
+
59
+ var handleWindowSizeChange = (0, _react.useCallback)(function () {
60
+ var _refTabList$current;
61
+
62
+ setViewWidth(refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current = refTabList.current) === null || _refTabList$current === void 0 ? void 0 : _refTabList$current.offsetWidth);
63
+ }, [refTabList]);
64
+ (0, _react.useEffect)(function () {
65
+ window.addEventListener("load", handleWindowSizeChange);
66
+ window.addEventListener("resize", handleWindowSizeChange);
67
+ return function () {
68
+ window.removeEventListener("load", handleWindowSizeChange);
69
+ window.removeEventListener("resize", handleWindowSizeChange);
70
+ };
71
+ }, [handleWindowSizeChange]);
72
+ return viewWidth;
73
+ };
74
+
38
75
  var DxcTabs = function DxcTabs(_ref) {
39
76
  var defaultActiveTabIndex = _ref.defaultActiveTabIndex,
40
77
  activeTabIndex = _ref.activeTabIndex,
@@ -46,59 +83,295 @@ var DxcTabs = function DxcTabs(_ref) {
46
83
  iconPosition = _ref$iconPosition === void 0 ? "top" : _ref$iconPosition,
47
84
  _ref$tabIndex = _ref.tabIndex,
48
85
  tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
49
-
50
- var _useState = (0, _react.useState)(defaultActiveTabIndex !== null && defaultActiveTabIndex !== void 0 ? defaultActiveTabIndex : 0),
51
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
52
- innerActiveTabIndex = _useState2[0],
53
- setInnerActiveTabIndex = _useState2[1];
54
-
55
86
  var colorsTheme = (0, _useTheme["default"])();
56
87
  var hasLabelAndIcon = tabs && tabs.filter(function (tab) {
57
88
  return tab.label && tab.icon;
58
89
  }).length > 0;
59
-
60
- var handleChange = function handleChange(event, newValue) {
90
+ var firstFocus = tabs && tabs.findIndex(function (tab) {
91
+ return !tab.isDisabled;
92
+ });
93
+
94
+ var _useState3 = (0, _react.useState)(tabs && defaultActiveTabIndex && !tabs[defaultActiveTabIndex].isDisabled ? defaultActiveTabIndex : firstFocus),
95
+ _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
96
+ innerActiveTabIndex = _useState4[0],
97
+ setInnerActiveTabIndex = _useState4[1];
98
+
99
+ var _useState5 = (0, _react.useState)(0),
100
+ _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
101
+ activeIndicatorWidth = _useState6[0],
102
+ setActiveIndicatorWidth = _useState6[1];
103
+
104
+ var _useState7 = (0, _react.useState)(0),
105
+ _useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
106
+ activeIndicatorLeft = _useState8[0],
107
+ setActiveIndicatorLeft = _useState8[1];
108
+
109
+ var _useState9 = (0, _react.useState)(0),
110
+ _useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
111
+ translateScroll = _useState10[0],
112
+ setTranslateScroll = _useState10[1];
113
+
114
+ var _useState11 = (0, _react.useState)(true),
115
+ _useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
116
+ scrollRightEnabled = _useState12[0],
117
+ setScrollRightEnabled = _useState12[1];
118
+
119
+ var _useState13 = (0, _react.useState)(false),
120
+ _useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
121
+ scrollLeftEnabled = _useState14[0],
122
+ setScrollLeftEnabled = _useState14[1];
123
+
124
+ var _useState15 = (0, _react.useState)(0),
125
+ _useState16 = (0, _slicedToArray2["default"])(_useState15, 2),
126
+ countClick = _useState16[0],
127
+ setCountClick = _useState16[1];
128
+
129
+ var _useState17 = (0, _react.useState)(0),
130
+ _useState18 = (0, _slicedToArray2["default"])(_useState17, 2),
131
+ totalTabsWidth = _useState18[0],
132
+ setTotalTabsWidth = _useState18[1];
133
+
134
+ var _useState19 = (0, _react.useState)(activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : innerActiveTabIndex),
135
+ _useState20 = (0, _slicedToArray2["default"])(_useState19, 2),
136
+ currentFocusIndex = _useState20[0],
137
+ setCurrentFocusIndex = _useState20[1];
138
+
139
+ var _useState21 = (0, _react.useState)(activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : innerActiveTabIndex),
140
+ _useState22 = (0, _slicedToArray2["default"])(_useState21, 2),
141
+ temporalFocusIndex = _useState22[0],
142
+ setTemporalFocusIndex = _useState22[1];
143
+
144
+ var _useState23 = (0, _react.useState)(0),
145
+ _useState24 = (0, _slicedToArray2["default"])(_useState23, 2),
146
+ minHeightTabs = _useState24[0],
147
+ setMinHeightTabs = _useState24[1];
148
+
149
+ var refTabs = (0, _react.useRef)([]);
150
+ var refTabList = (0, _react.useRef)(null);
151
+ var viewWidth = useResize(refTabList);
152
+ var translatedLabels = (0, _useTranslatedLabels["default"])();
153
+ var enabledIndicator = (0, _react.useMemo)(function () {
154
+ return viewWidth < totalTabsWidth;
155
+ }, [viewWidth]);
156
+ (0, _react.useEffect)(function () {
157
+ var _refTabs$current, _refTabs$current2, _refTabs$current3;
158
+
159
+ var sumWidth = refTabs === null || refTabs === void 0 ? void 0 : (_refTabs$current = refTabs.current) === null || _refTabs$current === void 0 ? void 0 : _refTabs$current.reduce(function (count, obj) {
160
+ return count + obj.offsetWidth;
161
+ }, 0);
162
+ setTotalTabsWidth(sumWidth);
163
+ setActiveIndicatorWidth(refTabs === null || refTabs === void 0 ? void 0 : (_refTabs$current2 = refTabs.current[activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : innerActiveTabIndex]) === null || _refTabs$current2 === void 0 ? void 0 : _refTabs$current2.offsetWidth);
164
+ setActiveIndicatorLeft(refTabs === null || refTabs === void 0 ? void 0 : (_refTabs$current3 = refTabs.current[activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : innerActiveTabIndex]) === null || _refTabs$current3 === void 0 ? void 0 : _refTabs$current3.offsetLeft);
165
+ }, [refTabs]);
166
+ (0, _react.useEffect)(function () {
167
+ var _refTabList$current2;
168
+
169
+ setMinHeightTabs((refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current2 = refTabList.current) === null || _refTabList$current2 === void 0 ? void 0 : _refTabList$current2.offsetHeight) + 1);
170
+ }, [refTabList]);
171
+ (0, _react.useEffect)(function () {
172
+ if (activeTabIndex >= 0) {
173
+ var _refTabs$current$acti, _refTabs$current$acti2;
174
+
175
+ setActiveIndicatorWidth(refTabs === null || refTabs === void 0 ? void 0 : (_refTabs$current$acti = refTabs.current[activeTabIndex]) === null || _refTabs$current$acti === void 0 ? void 0 : _refTabs$current$acti.offsetWidth);
176
+ setActiveIndicatorLeft(refTabs === null || refTabs === void 0 ? void 0 : (_refTabs$current$acti2 = refTabs.current[activeTabIndex]) === null || _refTabs$current$acti2 === void 0 ? void 0 : _refTabs$current$acti2.offsetLeft);
177
+ }
178
+ }, [activeTabIndex]);
179
+
180
+ var handleSelected = function handleSelected(newValue) {
61
181
  activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : setInnerActiveTabIndex(newValue);
62
182
  onTabClick === null || onTabClick === void 0 ? void 0 : onTabClick(newValue);
183
+
184
+ if (activeTabIndex === undefined) {
185
+ var _refTabs$current$newV, _refTabs$current$newV2;
186
+
187
+ setActiveIndicatorWidth(refTabs === null || refTabs === void 0 ? void 0 : (_refTabs$current$newV = refTabs.current[newValue]) === null || _refTabs$current$newV === void 0 ? void 0 : _refTabs$current$newV.offsetWidth);
188
+ setActiveIndicatorLeft(refTabs === null || refTabs === void 0 ? void 0 : (_refTabs$current$newV2 = refTabs.current[newValue]) === null || _refTabs$current$newV2 === void 0 ? void 0 : _refTabs$current$newV2.offsetLeft);
189
+ }
63
190
  };
64
191
 
65
- var getLabelForTab = function getLabelForTab(tab) {
66
- return /*#__PURE__*/_react["default"].createElement(ParentLabelSpan, null, /*#__PURE__*/_react["default"].createElement(MainLabelContainer, {
67
- hasBadge: tab.notificationNumber
68
- }, /*#__PURE__*/_react["default"].createElement(TabLabelContainer, {
69
- hasLabelAndIcon: hasLabelAndIcon,
70
- iconPosition: iconPosition
71
- }, tab.icon && /*#__PURE__*/_react["default"].createElement(TabIconContainer, {
72
- hasLabelAndIcon: hasLabelAndIcon,
73
- iconPosition: iconPosition
74
- }, typeof tab.icon === "string" ? /*#__PURE__*/_react["default"].createElement(TabIcon, {
75
- src: tab.icon
76
- }) : tab.icon), /*#__PURE__*/_react["default"].createElement(LabelTextContainer, null, tab.label))), tab.notificationNumber && tab.notificationNumber !== false && /*#__PURE__*/_react["default"].createElement(BadgeContainer, {
77
- hasLabelAndIcon: hasLabelAndIcon,
78
- iconPosition: iconPosition
79
- }, /*#__PURE__*/_react["default"].createElement(_Badge["default"], {
80
- notificationText: tab.notificationNumber > 99 ? "+99" : tab.notificationNumber
81
- })));
192
+ var scrollLeft = function scrollLeft() {
193
+ var _refTabList$current3;
194
+
195
+ var scrollWidth = (refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current3 = refTabList.current) === null || _refTabList$current3 === void 0 ? void 0 : _refTabList$current3.offsetWidth) * 0.75;
196
+ var moveX = 0;
197
+
198
+ if (countClick <= scrollWidth) {
199
+ moveX = 0;
200
+ setScrollLeftEnabled(false);
201
+ setScrollRightEnabled(true);
202
+ } else {
203
+ moveX = countClick - scrollWidth;
204
+ setScrollRightEnabled(true);
205
+ setScrollLeftEnabled(true);
206
+ }
207
+
208
+ setTranslateScroll(-moveX);
209
+ setCountClick(moveX);
210
+ };
211
+
212
+ var scrollRight = function scrollRight() {
213
+ var _refTabList$current4, _refTabList$current5;
214
+
215
+ var scrollWidth = (refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current4 = refTabList.current) === null || _refTabList$current4 === void 0 ? void 0 : _refTabList$current4.offsetWidth) * 0.75;
216
+ var moveX = 0;
217
+
218
+ if (countClick + scrollWidth + (refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current5 = refTabList.current) === null || _refTabList$current5 === void 0 ? void 0 : _refTabList$current5.offsetWidth) >= totalTabsWidth) {
219
+ var _refTabList$current6;
220
+
221
+ moveX = totalTabsWidth - (refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current6 = refTabList.current) === null || _refTabList$current6 === void 0 ? void 0 : _refTabList$current6.offsetWidth);
222
+ setScrollRightEnabled(false);
223
+ setScrollLeftEnabled(true);
224
+ } else {
225
+ moveX = countClick + scrollWidth;
226
+ setScrollLeftEnabled(true);
227
+ setScrollRightEnabled(true);
228
+ }
229
+
230
+ setTranslateScroll(-moveX);
231
+ setCountClick(moveX);
232
+ };
233
+
234
+ var setPreviousTabFocus = function setPreviousTabFocus() {
235
+ setTemporalFocusIndex(function (temporalFocusIndex) {
236
+ var index = temporalFocusIndex === 0 ? tabs.length - 1 : temporalFocusIndex - 1;
237
+
238
+ while (tabs[index].isDisabled) {
239
+ index = index === 0 ? tabs.length - 1 : index - 1;
240
+ }
241
+
242
+ refTabs === null || refTabs === void 0 ? void 0 : refTabs.current[index].focus({
243
+ preventScroll: true
244
+ });
245
+ setScrollFocus(index);
246
+ return index;
247
+ });
248
+ };
249
+
250
+ var setNextTabFocus = function setNextTabFocus() {
251
+ setTemporalFocusIndex(function (temporalFocusIndex) {
252
+ var index = temporalFocusIndex === tabs.length - 1 ? 0 : temporalFocusIndex + 1;
253
+
254
+ while (tabs[index].isDisabled) {
255
+ index = index === tabs.length - 1 ? 0 : index + 1;
256
+ }
257
+
258
+ refTabs === null || refTabs === void 0 ? void 0 : refTabs.current[index].focus({
259
+ preventScroll: true
260
+ });
261
+ setScrollFocus(index);
262
+ return index;
263
+ });
264
+ };
265
+
266
+ var setScrollFocus = function setScrollFocus(actualIndex) {
267
+ var _refTabs$current4, _refTabList$current8;
268
+
269
+ var sumPrev = 0;
270
+ refTabs === null || refTabs === void 0 ? void 0 : (_refTabs$current4 = refTabs.current) === null || _refTabs$current4 === void 0 ? void 0 : _refTabs$current4.map(function (item, index) {
271
+ if (index <= actualIndex) {
272
+ sumPrev += item.offsetWidth;
273
+ }
274
+ });
275
+ var moveX = 0;
276
+
277
+ if (actualIndex === tabs.length - 1) {
278
+ var _refTabList$current7;
279
+
280
+ moveX = totalTabsWidth - (refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current7 = refTabList.current) === null || _refTabList$current7 === void 0 ? void 0 : _refTabList$current7.offsetWidth);
281
+ setScrollLeftEnabled(true);
282
+ setScrollRightEnabled(false);
283
+ } else if (sumPrev > (refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current8 = refTabList.current) === null || _refTabList$current8 === void 0 ? void 0 : _refTabList$current8.offsetWidth)) {
284
+ var _refTabList$current9;
285
+
286
+ moveX = sumPrev - (refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current9 = refTabList.current) === null || _refTabList$current9 === void 0 ? void 0 : _refTabList$current9.offsetWidth) + 1; //plus 1px for the outline
287
+
288
+ setScrollLeftEnabled(true);
289
+ setScrollRightEnabled(true);
290
+ } else {
291
+ setScrollLeftEnabled(false);
292
+ setScrollRightEnabled(true);
293
+ }
294
+
295
+ setTranslateScroll(-moveX);
296
+ setCountClick(moveX);
297
+ };
298
+
299
+ var handleOnKeyDown = function handleOnKeyDown(event) {
300
+ switch (event.key) {
301
+ case "Left":
302
+ case "ArrowLeft":
303
+ event.preventDefault();
304
+ setPreviousTabFocus();
305
+ break;
306
+
307
+ case "Right":
308
+ case "ArrowRight":
309
+ event.preventDefault();
310
+ setNextTabFocus();
311
+ break;
312
+
313
+ case "Enter":
314
+ case " ":
315
+ event.preventDefault();
316
+ setCurrentFocusIndex(temporalFocusIndex);
317
+ handleSelected(temporalFocusIndex);
318
+ break;
319
+
320
+ case "Tab":
321
+ if (temporalFocusIndex !== currentFocusIndex) {
322
+ event.preventDefault();
323
+ setTemporalFocusIndex(currentFocusIndex);
324
+ refTabs === null || refTabs === void 0 ? void 0 : refTabs.current[currentFocusIndex].focus();
325
+ }
326
+
327
+ handleSelected(currentFocusIndex);
328
+ break;
329
+ }
330
+ };
331
+
332
+ var isTabActive = function isTabActive(index) {
333
+ return activeTabIndex >= 0 ? activeTabIndex === index : innerActiveTabIndex === index;
82
334
  };
83
335
 
336
+ var isActiveIndicatorDisabled = firstFocus === -1 || tabs && activeTabIndex >= 0 && tabs[activeTabIndex].isDisabled;
84
337
  return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
85
338
  theme: colorsTheme.tabs
86
- }, /*#__PURE__*/_react["default"].createElement(DxCTabs, {
87
- margin: margin,
339
+ }, /*#__PURE__*/_react["default"].createElement(TabsContainer, {
340
+ margin: margin
341
+ }, /*#__PURE__*/_react["default"].createElement(Underline, null), /*#__PURE__*/_react["default"].createElement(Tabs, {
88
342
  hasLabelAndIcon: hasLabelAndIcon,
89
343
  iconPosition: iconPosition
90
- }, /*#__PURE__*/_react["default"].createElement(Underline, null), /*#__PURE__*/_react["default"].createElement(_Tabs["default"], {
91
- value: activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : innerActiveTabIndex,
92
- onChange: handleChange,
93
- variant: "scrollable",
94
- scrollButtons: "auto"
344
+ }, /*#__PURE__*/_react["default"].createElement(ScrollIndicator, {
345
+ onClick: scrollLeft,
346
+ enabled: enabledIndicator,
347
+ disabled: !scrollLeftEnabled,
348
+ "aria-label": translatedLabels.tabs.scrollLeft,
349
+ tabIndex: scrollLeftEnabled ? tabIndex : -1,
350
+ minHeightTabs: minHeightTabs
351
+ }, arrowIcons.left), /*#__PURE__*/_react["default"].createElement(TabsContent, null, /*#__PURE__*/_react["default"].createElement(TabsContentScroll, {
352
+ translateScroll: translateScroll,
353
+ ref: refTabList,
354
+ enabled: enabledIndicator
355
+ }, /*#__PURE__*/_react["default"].createElement(TabList, {
356
+ role: "tablist",
357
+ onKeyDown: handleOnKeyDown,
358
+ minHeightTabs: minHeightTabs
95
359
  }, tabs.map(function (tab, i) {
96
360
  return /*#__PURE__*/_react["default"].createElement(_Tab["default"], {
97
- tabIndex: (activeTabIndex === i || innerActiveTabIndex === i) && !tab.isDisabled ? tabIndex : -1,
361
+ tab: tab,
98
362
  key: "tab".concat(i).concat(tab.label),
99
- label: getLabelForTab(tab),
100
- disabled: tab.isDisabled,
101
- disableRipple: true,
363
+ active: isTabActive(i),
364
+ tabIndex: isTabActive(i) && !tab.isDisabled ? tabIndex : -1,
365
+ hasLabelAndIcon: hasLabelAndIcon,
366
+ iconPosition: iconPosition,
367
+ ref: function ref(el) {
368
+ return refTabs.current[i] = el;
369
+ },
370
+ onClick: function onClick() {
371
+ setCurrentFocusIndex(i);
372
+ setTemporalFocusIndex(i);
373
+ handleSelected(i);
374
+ },
102
375
  onMouseEnter: function onMouseEnter() {
103
376
  onTabHover === null || onTabHover === void 0 ? void 0 : onTabHover(i);
104
377
  },
@@ -106,34 +379,27 @@ var DxcTabs = function DxcTabs(_ref) {
106
379
  onTabHover === null || onTabHover === void 0 ? void 0 : onTabHover(null);
107
380
  }
108
381
  });
109
- }))));
382
+ })), /*#__PURE__*/_react["default"].createElement(ActiveIndicator, {
383
+ tabWidth: activeIndicatorWidth,
384
+ tabLeft: activeIndicatorLeft,
385
+ "aria-disabled": isActiveIndicatorDisabled
386
+ }))), /*#__PURE__*/_react["default"].createElement(ScrollIndicator, {
387
+ onClick: scrollRight,
388
+ enabled: enabledIndicator,
389
+ disabled: !scrollRightEnabled,
390
+ "aria-label": translatedLabels.tabs.scrollRight,
391
+ tabIndex: scrollRightEnabled ? tabIndex : -1,
392
+ minHeightTabs: minHeightTabs
393
+ }, arrowIcons.right))));
110
394
  };
111
395
 
112
- var ParentLabelSpan = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n"])));
113
-
114
- var TabLabelContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n align-items: center;\n"])), function (props) {
115
- return props.hasLabelAndIcon && props.iconPosition === "top" && "column" || "row";
116
- });
117
-
118
- var LabelTextContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])([""])));
119
-
120
- var BadgeContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n right: 0;\n top: ", ";\n width: 23px;\n height: 17px;\n"])), function (props) {
121
- return props.hasLabelAndIcon && props.iconPosition === "top" && "0" || "5px";
122
- });
123
-
124
- var MainLabelContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n margin-left: ", ";\n margin-right: ", ";\n"])), function (props) {
125
- return props.hasBadge && "35px" || "unset";
126
- }, function (props) {
127
- return props.hasBadge && "35px" || "unset";
128
- });
129
-
130
- var Underline = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n left: 0px;\n bottom: 0;\n width: 100%;\n height: ", ";\n position: absolute;\n background-color: ", ";\n"])), function (props) {
396
+ var Underline = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n height: ", ";\n background-color: ", ";\n"])), function (props) {
131
397
  return props.theme.dividerThickness;
132
398
  }, function (props) {
133
399
  return props.theme.dividerColor;
134
400
  });
135
401
 
136
- var DxCTabs = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n .MuiTabs-root {\n background: white;\n min-height: ", ";\n\n .MuiTabs-scroller {\n .MuiTabs-flexContainer + span {\n z-index: 4;\n }\n }\n .MuiTab-root {\n text-transform: ", " !important;\n }\n .MuiButtonBase-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n\n padding: ", ";\n height: ", ";\n min-width: 90px;\n max-width: 360px;\n min-height: ", ";\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n font-weight: ", ";\n }\n &:not(.Mui-selected) {\n background-color: ", ";\n color: ", ";\n svg {\n color: ", ";\n }\n }\n &.Mui-selected {\n background-color: ", ";\n color: ", ";\n svg {\n color: ", ";\n }\n }\n &.Mui-disabled {\n background-color: ", " !important;\n cursor: not-allowed !important;\n pointer-events: all;\n color: ", ";\n font-style: ", ";\n svg {\n color: ", ";\n }\n outline: none !important;\n }\n &:focus {\n outline: ", " auto 1px;\n }\n }\n .MuiTabs-indicator {\n background-color: ", ";\n height: ", ";\n }\n .MuiTabs-scrollButtons {\n min-width: ", ";\n width: ", ";\n padding: 0;\n }\n @media (max-width: 599.95px) {\n .MuiTabs-scrollButtonsDesktop {\n display: flex;\n }\n }\n }\n"])), function (props) {
402
+ var TabsContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
137
403
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
138
404
  }, function (props) {
139
405
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
@@ -143,68 +409,52 @@ var DxCTabs = _styledComponents["default"].div(_templateObject7 || (_templateObj
143
409
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
144
410
  }, function (props) {
145
411
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
146
- }, function (props) {
147
- return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
148
- }, function (props) {
149
- return props.theme.fontTextTransform;
150
- }, function (props) {
151
- return props.theme.fontFamily;
152
- }, function (props) {
153
- return props.theme.fontSize;
154
- }, function (props) {
155
- return props.theme.fontStyle;
156
- }, function (props) {
157
- return props.theme.fontWeight;
158
- }, function (props) {
159
- return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "12px 16px" || "8px 16px";
160
- }, function (props) {
412
+ });
413
+
414
+ var Tabs = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n min-height: ", ";\n height: ", ";\n display: flex;\n overflow: hidden;\n background-color: ", ";\n"])), function (props) {
161
415
  return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
162
416
  }, function (props) {
163
417
  return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
164
- }, function (props) {
165
- return "".concat(props.theme.hoverBackgroundColor, " !important");
166
- }, function (props) {
167
- return "".concat(props.theme.pressedBackgroundColor, " !important");
168
- }, function (props) {
169
- return "".concat(props.theme.pressedFontWeight, " !important");
170
418
  }, function (props) {
171
419
  return props.theme.unselectedBackgroundColor;
420
+ });
421
+
422
+ var ScrollIndicator = _styledComponents["default"].button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: ", ";\n justify-content: center;\n min-width: ", ";\n height: ", "px;\n padding: 0;\n border: none;\n background-color: #ffffff;\n font-size: 1.25rem;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n &:focus {\n outline: ", " solid 1px;\n outline-offset: -1px;\n }\n &:active {\n background-color: ", ";\n }\n &:disabled {\n cursor: default;\n svg {\n visibility: hidden;\n }\n &:focus {\n outline: none;\n }\n &:hover,\n &:active {\n background-color: transparent !important;\n }\n }\n\n svg {\n align-self: center;\n height: 20px;\n width: 20px;\n fill: ", ";\n }\n"])), function (props) {
423
+ return props.enabled ? "flex" : "none";
172
424
  }, function (props) {
173
- return props.theme.unselectedFontColor;
174
- }, function (props) {
175
- return props.theme.unselectedIconColor;
176
- }, function (props) {
177
- return props.theme.selectedBackgroundColor;
178
- }, function (props) {
179
- return props.theme.selectedFontColor;
180
- }, function (props) {
181
- return props.theme.selectedIconColor;
425
+ return props.theme.scrollButtonsWidth;
182
426
  }, function (props) {
183
- return props.theme.unselectedBackgroundColor;
427
+ return props.minHeightTabs - 1;
184
428
  }, function (props) {
185
- return props.theme.disabledFontColor;
429
+ return "".concat(props.theme.hoverBackgroundColor, " !important");
186
430
  }, function (props) {
187
- return props.theme.disabledFontStyle;
431
+ return props.theme.focusOutline;
188
432
  }, function (props) {
189
- return props.theme.disabledIconColor;
433
+ return "".concat(props.theme.pressedBackgroundColor, " !important");
190
434
  }, function (props) {
191
- return props.theme.focusOutline;
435
+ return props.theme.unselectedFontColor;
436
+ });
437
+
438
+ var ActiveIndicator = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n bottom: 0;\n left: ", ";\n width: ", ";\n height: ", ";\n background-color: ", ";\n &[aria-disabled=\"true\"] {\n background-color: ", ";\n display: none;\n }\n"])), function (props) {
439
+ return "".concat(props.tabLeft, "px");
192
440
  }, function (props) {
193
- return props.theme.selectedUnderlineColor;
441
+ return "".concat(props.tabWidth, "px");
194
442
  }, function (props) {
195
443
  return props.theme.selectedUnderlineThickness;
196
444
  }, function (props) {
197
- return props.theme.scrollButtonsWidth;
445
+ return props.theme.selectedUnderlineColor;
198
446
  }, function (props) {
199
- return props.theme.scrollButtonsWidth;
447
+ return props.theme.disabledFontColor;
200
448
  });
201
449
 
202
- var TabIcon = _styledComponents["default"].img(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])([""])));
450
+ var TabsContent = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1 1 auto;\n display: inline-block;\n position: relative;\n white-space: nowrap;\n overflow-x: scroll;\n ::-webkit-scrollbar {\n display: none;\n }\n"])));
203
451
 
204
- var TabIconContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: 22px;\n max-width: 22px;\n margin-bottom: ", ";\n margin-right: ", ";\n overflow: hidden;\n display: flex;\n align-items: center;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
205
- return props.hasLabelAndIcon && props.iconPosition === "top" && "8px" || "";
206
- }, function (props) {
207
- return props.hasLabelAndIcon && props.iconPosition === "left" && "12px" || "";
452
+ var TabList = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n min-height: ", "px;\n"])), function (props) {
453
+ return props.minHeightTabs;
454
+ });
455
+
456
+ var TabsContentScroll = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n ", ";\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n"])), function (props) {
457
+ return props.enabled ? "transform: translateX(".concat(props.translateScroll, "px)") : "transform: translateX(0px)";
208
458
  });
209
459
 
210
460
  var _default = DxcTabs;