@dxc-technology/halstack-react 0.0.0-df9dd3c → 0.0.0-dfb16f5

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 (269) hide show
  1. package/HalstackContext.d.ts +12 -0
  2. package/HalstackContext.js +295 -0
  3. package/accordion/Accordion.d.ts +1 -1
  4. package/accordion/Accordion.js +122 -135
  5. package/accordion/Accordion.stories.tsx +20 -14
  6. package/accordion/Accordion.test.js +71 -0
  7. package/accordion/types.d.ts +11 -10
  8. package/accordion-group/AccordionGroup.d.ts +1 -1
  9. package/accordion-group/AccordionGroup.js +15 -36
  10. package/accordion-group/AccordionGroup.stories.tsx +28 -2
  11. package/accordion-group/AccordionGroup.test.js +126 -0
  12. package/accordion-group/types.d.ts +16 -9
  13. package/alert/Alert.js +5 -2
  14. package/alert/Alert.test.js +92 -0
  15. package/badge/Badge.d.ts +4 -0
  16. package/badge/Badge.js +5 -3
  17. package/badge/types.d.ts +5 -0
  18. package/{radio → badge}/types.js +0 -0
  19. package/bleed/Bleed.d.ts +3 -0
  20. package/bleed/Bleed.js +51 -0
  21. package/bleed/Bleed.stories.tsx +341 -0
  22. package/bleed/types.d.ts +37 -0
  23. package/bleed/types.js +5 -0
  24. package/box/Box.js +23 -33
  25. package/box/Box.test.js +18 -0
  26. package/box/types.d.ts +1 -0
  27. package/bulleted-list/BulletedList.d.ts +7 -0
  28. package/bulleted-list/BulletedList.js +123 -0
  29. package/bulleted-list/BulletedList.stories.tsx +200 -0
  30. package/bulleted-list/types.d.ts +11 -0
  31. package/bulleted-list/types.js +5 -0
  32. package/button/Button.d.ts +1 -1
  33. package/button/Button.js +57 -80
  34. package/button/Button.stories.tsx +15 -8
  35. package/button/Button.test.js +35 -0
  36. package/button/types.d.ts +8 -12
  37. package/card/Card.js +24 -27
  38. package/card/Card.stories.tsx +1 -1
  39. package/card/Card.test.js +50 -0
  40. package/card/types.d.ts +1 -0
  41. package/checkbox/Checkbox.d.ts +2 -2
  42. package/checkbox/Checkbox.js +106 -109
  43. package/checkbox/Checkbox.stories.tsx +146 -130
  44. package/checkbox/Checkbox.test.js +155 -0
  45. package/checkbox/types.d.ts +13 -5
  46. package/chip/Chip.d.ts +1 -1
  47. package/chip/Chip.js +14 -52
  48. package/chip/Chip.stories.tsx +6 -8
  49. package/chip/Chip.test.js +56 -0
  50. package/chip/types.d.ts +5 -13
  51. package/common/variables.js +250 -346
  52. package/date-input/DateInput.js +62 -48
  53. package/date-input/DateInput.stories.tsx +7 -7
  54. package/date-input/DateInput.test.js +479 -0
  55. package/date-input/types.d.ts +16 -9
  56. package/dialog/Dialog.js +46 -50
  57. package/dialog/Dialog.stories.tsx +57 -2
  58. package/dialog/Dialog.test.js +70 -0
  59. package/dialog/types.d.ts +3 -2
  60. package/dropdown/Dropdown.d.ts +1 -1
  61. package/dropdown/Dropdown.js +247 -273
  62. package/dropdown/Dropdown.stories.tsx +144 -79
  63. package/dropdown/Dropdown.test.js +585 -0
  64. package/dropdown/DropdownMenu.d.ts +4 -0
  65. package/dropdown/DropdownMenu.js +80 -0
  66. package/dropdown/DropdownMenuItem.d.ts +4 -0
  67. package/dropdown/DropdownMenuItem.js +92 -0
  68. package/dropdown/types.d.ts +29 -18
  69. package/file-input/FileInput.d.ts +2 -2
  70. package/file-input/FileInput.js +179 -220
  71. package/file-input/FileInput.stories.tsx +39 -10
  72. package/file-input/FileInput.test.js +498 -0
  73. package/file-input/FileItem.d.ts +4 -14
  74. package/file-input/FileItem.js +43 -66
  75. package/file-input/types.d.ts +17 -0
  76. package/flex/Flex.d.ts +4 -0
  77. package/flex/Flex.js +69 -0
  78. package/flex/Flex.stories.tsx +103 -0
  79. package/flex/types.d.ts +32 -0
  80. package/flex/types.js +5 -0
  81. package/footer/Footer.js +24 -99
  82. package/footer/Footer.stories.tsx +8 -1
  83. package/footer/Footer.test.js +109 -0
  84. package/footer/Icons.js +1 -1
  85. package/footer/types.d.ts +2 -1
  86. package/header/Header.js +95 -114
  87. package/header/Header.stories.tsx +46 -36
  88. package/header/Header.test.js +79 -0
  89. package/header/Icons.js +2 -2
  90. package/header/types.d.ts +3 -2
  91. package/heading/Heading.stories.tsx +3 -2
  92. package/heading/Heading.test.js +186 -0
  93. package/inset/Inset.d.ts +3 -0
  94. package/inset/Inset.js +51 -0
  95. package/inset/Inset.stories.tsx +229 -0
  96. package/inset/types.d.ts +37 -0
  97. package/inset/types.js +5 -0
  98. package/layout/ApplicationLayout.d.ts +16 -6
  99. package/layout/ApplicationLayout.js +71 -125
  100. package/layout/ApplicationLayout.stories.tsx +84 -93
  101. package/layout/Icons.d.ts +5 -0
  102. package/layout/Icons.js +13 -2
  103. package/layout/SidenavContext.d.ts +5 -0
  104. package/layout/SidenavContext.js +19 -0
  105. package/layout/types.d.ts +18 -33
  106. package/link/Link.d.ts +3 -2
  107. package/link/Link.js +60 -85
  108. package/link/Link.stories.tsx +99 -52
  109. package/link/Link.test.js +83 -0
  110. package/link/types.d.ts +9 -29
  111. package/main.d.ts +11 -15
  112. package/main.js +53 -79
  113. package/number-input/NumberInput.js +11 -18
  114. package/number-input/NumberInput.stories.tsx +5 -5
  115. package/number-input/NumberInput.test.js +543 -0
  116. package/number-input/types.d.ts +17 -10
  117. package/package.json +14 -12
  118. package/paginator/Paginator.js +17 -38
  119. package/paginator/Paginator.test.js +308 -0
  120. package/paragraph/Paragraph.d.ts +6 -0
  121. package/paragraph/Paragraph.js +38 -0
  122. package/paragraph/Paragraph.stories.tsx +44 -0
  123. package/password-input/PasswordInput.js +7 -4
  124. package/password-input/PasswordInput.stories.tsx +3 -3
  125. package/password-input/PasswordInput.test.js +181 -0
  126. package/password-input/types.d.ts +14 -11
  127. package/progress-bar/ProgressBar.d.ts +2 -2
  128. package/progress-bar/ProgressBar.js +57 -51
  129. package/progress-bar/ProgressBar.stories.jsx +13 -11
  130. package/progress-bar/ProgressBar.test.js +110 -0
  131. package/progress-bar/types.d.ts +3 -4
  132. package/quick-nav/QuickNav.d.ts +4 -0
  133. package/quick-nav/QuickNav.js +117 -0
  134. package/quick-nav/QuickNav.stories.tsx +342 -0
  135. package/quick-nav/types.d.ts +21 -0
  136. package/quick-nav/types.js +5 -0
  137. package/radio-group/Radio.d.ts +1 -1
  138. package/radio-group/Radio.js +79 -32
  139. package/radio-group/RadioGroup.js +153 -36
  140. package/radio-group/RadioGroup.stories.tsx +64 -19
  141. package/radio-group/RadioGroup.test.js +722 -0
  142. package/radio-group/types.d.ts +90 -13
  143. package/resultsetTable/ResultsetTable.js +6 -5
  144. package/resultsetTable/ResultsetTable.stories.tsx +7 -8
  145. package/resultsetTable/ResultsetTable.test.js +348 -0
  146. package/select/Icons.d.ts +10 -0
  147. package/select/Icons.js +93 -0
  148. package/select/Listbox.d.ts +4 -0
  149. package/select/Listbox.js +198 -0
  150. package/select/Option.d.ts +4 -0
  151. package/select/Option.js +110 -0
  152. package/select/Select.js +147 -365
  153. package/select/Select.stories.tsx +231 -176
  154. package/select/Select.test.js +2233 -0
  155. package/select/types.d.ts +52 -12
  156. package/sidenav/Sidenav.d.ts +6 -5
  157. package/sidenav/Sidenav.js +184 -52
  158. package/sidenav/Sidenav.stories.tsx +154 -139
  159. package/sidenav/Sidenav.test.js +44 -0
  160. package/sidenav/types.d.ts +50 -27
  161. package/slider/Slider.d.ts +2 -2
  162. package/slider/Slider.js +122 -96
  163. package/slider/Slider.stories.tsx +15 -9
  164. package/slider/Slider.test.js +250 -0
  165. package/slider/types.d.ts +10 -2
  166. package/spinner/Spinner.js +1 -1
  167. package/spinner/Spinner.stories.jsx +1 -0
  168. package/spinner/Spinner.test.js +64 -0
  169. package/switch/Switch.d.ts +2 -2
  170. package/switch/Switch.js +150 -67
  171. package/switch/Switch.stories.tsx +21 -43
  172. package/switch/Switch.test.js +225 -0
  173. package/switch/types.d.ts +12 -4
  174. package/table/Table.js +1 -1
  175. package/table/Table.stories.jsx +2 -1
  176. package/table/Table.test.js +26 -0
  177. package/tabs/Tab.d.ts +4 -0
  178. package/tabs/Tab.js +135 -0
  179. package/tabs/Tabs.d.ts +1 -1
  180. package/tabs/Tabs.js +364 -110
  181. package/tabs/Tabs.stories.tsx +81 -16
  182. package/tabs/Tabs.test.js +351 -0
  183. package/tabs/types.d.ts +39 -17
  184. package/tabs-nav/NavTabs.d.ts +8 -0
  185. package/tabs-nav/NavTabs.js +125 -0
  186. package/tabs-nav/NavTabs.stories.tsx +170 -0
  187. package/tabs-nav/NavTabs.test.js +82 -0
  188. package/tabs-nav/Tab.d.ts +4 -0
  189. package/tabs-nav/Tab.js +130 -0
  190. package/tabs-nav/types.d.ts +53 -0
  191. package/tabs-nav/types.js +5 -0
  192. package/tag/Tag.d.ts +1 -1
  193. package/tag/Tag.js +18 -28
  194. package/tag/Tag.stories.tsx +26 -29
  195. package/tag/Tag.test.js +60 -0
  196. package/tag/types.d.ts +23 -14
  197. package/text-input/Icons.d.ts +8 -0
  198. package/text-input/Icons.js +60 -0
  199. package/text-input/Suggestion.d.ts +4 -0
  200. package/text-input/Suggestion.js +57 -0
  201. package/text-input/Suggestions.d.ts +4 -0
  202. package/text-input/Suggestions.js +134 -0
  203. package/text-input/TextInput.js +213 -322
  204. package/text-input/TextInput.stories.tsx +218 -193
  205. package/text-input/TextInput.test.js +1771 -0
  206. package/text-input/types.d.ts +51 -13
  207. package/textarea/Textarea.js +20 -27
  208. package/textarea/Textarea.stories.jsx +37 -15
  209. package/textarea/Textarea.test.js +437 -0
  210. package/textarea/types.d.ts +18 -11
  211. package/toggle-group/ToggleGroup.d.ts +1 -1
  212. package/toggle-group/ToggleGroup.js +5 -4
  213. package/toggle-group/ToggleGroup.stories.tsx +4 -4
  214. package/toggle-group/ToggleGroup.test.js +156 -0
  215. package/toggle-group/types.d.ts +9 -1
  216. package/typography/Typography.d.ts +4 -0
  217. package/typography/Typography.js +131 -0
  218. package/typography/Typography.stories.tsx +198 -0
  219. package/typography/types.d.ts +18 -0
  220. package/typography/types.js +5 -0
  221. package/useTheme.js +2 -2
  222. package/useTranslatedLabels.d.ts +2 -0
  223. package/useTranslatedLabels.js +20 -0
  224. package/wizard/Wizard.d.ts +1 -1
  225. package/wizard/Wizard.js +58 -54
  226. package/wizard/Wizard.stories.tsx +33 -24
  227. package/wizard/Wizard.test.js +141 -0
  228. package/wizard/types.d.ts +10 -5
  229. package/ThemeContext.d.ts +0 -15
  230. package/ThemeContext.js +0 -243
  231. package/V3Select/V3Select.js +0 -455
  232. package/V3Select/index.d.ts +0 -27
  233. package/V3Textarea/V3Textarea.js +0 -260
  234. package/V3Textarea/index.d.ts +0 -27
  235. package/date/Date.js +0 -373
  236. package/date/index.d.ts +0 -27
  237. package/input-text/Icons.js +0 -22
  238. package/input-text/InputText.js +0 -611
  239. package/input-text/index.d.ts +0 -36
  240. package/list/List.d.ts +0 -8
  241. package/list/List.js +0 -47
  242. package/list/List.stories.tsx +0 -85
  243. package/radio/Radio.d.ts +0 -4
  244. package/radio/Radio.js +0 -174
  245. package/radio/Radio.stories.tsx +0 -192
  246. package/radio/types.d.ts +0 -54
  247. package/row/Row.d.ts +0 -11
  248. package/row/Row.js +0 -124
  249. package/row/Row.stories.tsx +0 -223
  250. package/stack/Stack.d.ts +0 -10
  251. package/stack/Stack.js +0 -94
  252. package/stack/Stack.stories.tsx +0 -150
  253. package/text/Text.d.ts +0 -7
  254. package/text/Text.js +0 -30
  255. package/text/Text.stories.tsx +0 -19
  256. package/toggle/Toggle.js +0 -186
  257. package/toggle/index.d.ts +0 -21
  258. package/upload/Upload.js +0 -201
  259. package/upload/buttons-upload/ButtonsUpload.js +0 -111
  260. package/upload/buttons-upload/Icons.js +0 -40
  261. package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
  262. package/upload/dragAndDropArea/Icons.js +0 -39
  263. package/upload/file-upload/FileToUpload.js +0 -115
  264. package/upload/file-upload/Icons.js +0 -66
  265. package/upload/files-upload/FilesToUpload.js +0 -109
  266. package/upload/index.d.ts +0 -15
  267. package/upload/transaction/Icons.js +0 -160
  268. package/upload/transaction/Transaction.js +0 -104
  269. package/upload/transactions/Transactions.js +0 -94
package/tabs/Tabs.js CHANGED
@@ -9,34 +9,72 @@ Object.defineProperty(exports, "__esModule", {
9
9
  });
10
10
  exports["default"] = void 0;
11
11
 
12
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
12
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
13
 
16
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
17
-
18
- var _react = _interopRequireDefault(require("react"));
14
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
19
15
 
20
- var _Tabs = _interopRequireDefault(require("@material-ui/core/Tabs"));
16
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
21
17
 
22
- var _Tab = _interopRequireDefault(require("@material-ui/core/Tab"));
18
+ var _react = _interopRequireWildcard(require("react"));
23
19
 
24
20
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
25
21
 
26
22
  var _variables = require("../common/variables.js");
27
23
 
28
- var _Badge = _interopRequireDefault(require("../badge/Badge"));
29
-
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
- var activeTabIndex = _ref.activeTabIndex,
76
+ var defaultActiveTabIndex = _ref.defaultActiveTabIndex,
77
+ activeTabIndex = _ref.activeTabIndex,
40
78
  tabs = _ref.tabs,
41
79
  onTabClick = _ref.onTabClick,
42
80
  onTabHover = _ref.onTabHover,
@@ -45,62 +83,296 @@ var DxcTabs = function DxcTabs(_ref) {
45
83
  iconPosition = _ref$iconPosition === void 0 ? "top" : _ref$iconPosition,
46
84
  _ref$tabIndex = _ref.tabIndex,
47
85
  tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
48
-
49
- var _React$useState = _react["default"].useState(0),
50
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
51
- innerActiveTabIndex = _React$useState2[0],
52
- setInnerActiveTabIndex = _React$useState2[1];
53
-
54
86
  var colorsTheme = (0, _useTheme["default"])();
55
87
  var hasLabelAndIcon = tabs && tabs.filter(function (tab) {
56
88
  return tab.label && tab.icon;
57
89
  }).length > 0;
58
-
59
- var handleChange = function handleChange(event, newValue) {
60
- if (activeTabIndex == null) {
61
- setInnerActiveTabIndex(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);
62
177
  }
178
+ }, [activeTabIndex]);
63
179
 
180
+ var handleSelected = function handleSelected(newValue) {
181
+ activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : setInnerActiveTabIndex(newValue);
64
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
+ }
65
190
  };
66
191
 
67
- var getLabelForTab = function getLabelForTab(tab) {
68
- return /*#__PURE__*/_react["default"].createElement(ParentLabelSpan, null, /*#__PURE__*/_react["default"].createElement(MainLabelContainer, {
69
- hasBadge: tab.notificationNumber
70
- }, /*#__PURE__*/_react["default"].createElement(TabLabelContainer, {
71
- hasLabelAndIcon: hasLabelAndIcon,
72
- iconPosition: iconPosition
73
- }, tab.icon ? /*#__PURE__*/_react["default"].createElement(TabIconContainer, {
74
- hasLabelAndIcon: hasLabelAndIcon,
75
- iconPosition: iconPosition
76
- }, (0, _typeof2["default"])(tab.icon) === "object" ? tab.icon : /*#__PURE__*/_react["default"].createElement(tab.icon)) : tab.iconSrc && /*#__PURE__*/_react["default"].createElement(TabIcon, {
77
- src: tab.iconSrc
78
- }), /*#__PURE__*/_react["default"].createElement(LabelTextContainer, null, tab.label))), tab.notificationNumber && tab.notificationNumber !== false && /*#__PURE__*/_react["default"].createElement(BadgeContainer, {
79
- hasLabelAndIcon: hasLabelAndIcon,
80
- iconPosition: iconPosition
81
- }, /*#__PURE__*/_react["default"].createElement(_Badge["default"], {
82
- notificationText: tab.notificationNumber > 99 ? "+99" : tab.notificationNumber
83
- })));
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;
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;
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);
84
297
  };
85
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;
334
+ };
335
+
336
+ var isActiveIndicatorDisabled = firstFocus === -1 || tabs && activeTabIndex >= 0 && tabs[activeTabIndex].isDisabled;
86
337
  return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
87
338
  theme: colorsTheme.tabs
88
- }, /*#__PURE__*/_react["default"].createElement(DxCTabs, {
89
- margin: margin,
339
+ }, /*#__PURE__*/_react["default"].createElement(TabsContainer, {
340
+ margin: margin
341
+ }, /*#__PURE__*/_react["default"].createElement(Underline, null), /*#__PURE__*/_react["default"].createElement(Tabs, {
90
342
  hasLabelAndIcon: hasLabelAndIcon,
91
343
  iconPosition: iconPosition
92
- }, /*#__PURE__*/_react["default"].createElement(Underline, null), /*#__PURE__*/_react["default"].createElement(_Tabs["default"], {
93
- value: activeTabIndex != null ? activeTabIndex : innerActiveTabIndex,
94
- onChange: handleChange,
95
- variant: "scrollable",
96
- scrollButtons: "auto"
344
+ }, /*#__PURE__*/_react["default"].createElement(ScrollIndicator, {
345
+ onClick: scrollLeft,
346
+ scrollLeftEnabled: scrollLeftEnabled,
347
+ enabled: enabledIndicator,
348
+ "aria-disabled": !scrollLeftEnabled,
349
+ "aria-label": translatedLabels.tabs.scrollLeft,
350
+ tabIndex: scrollLeftEnabled ? tabIndex : -1,
351
+ minHeightTabs: minHeightTabs
352
+ }, arrowIcons.left), /*#__PURE__*/_react["default"].createElement(TabsContent, null, /*#__PURE__*/_react["default"].createElement(TabsContentScroll, {
353
+ translateScroll: translateScroll,
354
+ ref: refTabList,
355
+ enabled: enabledIndicator
356
+ }, /*#__PURE__*/_react["default"].createElement(TabList, {
357
+ role: "tablist",
358
+ onKeyDown: handleOnKeyDown,
359
+ minHeightTabs: minHeightTabs
97
360
  }, tabs.map(function (tab, i) {
98
361
  return /*#__PURE__*/_react["default"].createElement(_Tab["default"], {
99
- tabIndex: (activeTabIndex === i || innerActiveTabIndex === i) && !tab.isDisabled ? tabIndex : -1,
362
+ tab: tab,
100
363
  key: "tab".concat(i).concat(tab.label),
101
- label: getLabelForTab(tab),
102
- disabled: tab.isDisabled,
103
- disableRipple: true,
364
+ active: isTabActive(i),
365
+ tabIndex: isTabActive(i) && !tab.isDisabled ? tabIndex : -1,
366
+ hasLabelAndIcon: hasLabelAndIcon,
367
+ iconPosition: iconPosition,
368
+ ref: function ref(el) {
369
+ return refTabs.current[i] = el;
370
+ },
371
+ onClick: function onClick() {
372
+ setCurrentFocusIndex(i);
373
+ setTemporalFocusIndex(i);
374
+ handleSelected(i);
375
+ },
104
376
  onMouseEnter: function onMouseEnter() {
105
377
  onTabHover === null || onTabHover === void 0 ? void 0 : onTabHover(i);
106
378
  },
@@ -108,34 +380,28 @@ var DxcTabs = function DxcTabs(_ref) {
108
380
  onTabHover === null || onTabHover === void 0 ? void 0 : onTabHover(null);
109
381
  }
110
382
  });
111
- }))));
383
+ })), /*#__PURE__*/_react["default"].createElement(ActiveIndicator, {
384
+ tabWidth: activeIndicatorWidth,
385
+ tabLeft: activeIndicatorLeft,
386
+ "aria-disabled": isActiveIndicatorDisabled
387
+ }))), /*#__PURE__*/_react["default"].createElement(ScrollIndicator, {
388
+ onClick: scrollRight,
389
+ scrollRightEnabled: scrollRightEnabled,
390
+ enabled: enabledIndicator,
391
+ "aria-disabled": !scrollRightEnabled,
392
+ "aria-label": translatedLabels.tabs.scrollRight,
393
+ tabIndex: scrollRightEnabled ? tabIndex : -1,
394
+ minHeightTabs: minHeightTabs
395
+ }, arrowIcons.right))));
112
396
  };
113
397
 
114
- var ParentLabelSpan = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n"])));
115
-
116
- var TabLabelContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n align-items: center;\n"])), function (props) {
117
- return props.hasLabelAndIcon && props.iconPosition === "top" && "column" || "row";
118
- });
119
-
120
- var LabelTextContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])([""])));
121
-
122
- 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) {
123
- return props.hasLabelAndIcon && props.iconPosition === "top" && "0" || "5px";
124
- });
125
-
126
- 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) {
127
- return props.hasBadge && "35px" || "unset";
128
- }, function (props) {
129
- return props.hasBadge && "35px" || "unset";
130
- });
131
-
132
- 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) {
398
+ var Underline = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n left: 0;\n bottom: 0;\n width: 100%;\n position: absolute;\n height: ", ";\n background-color: ", ";\n z-index: 1;\n"])), function (props) {
133
399
  return props.theme.dividerThickness;
134
400
  }, function (props) {
135
401
  return props.theme.dividerColor;
136
402
  });
137
403
 
138
- 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) {
404
+ 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) {
139
405
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
140
406
  }, function (props) {
141
407
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
@@ -145,68 +411,56 @@ var DxCTabs = _styledComponents["default"].div(_templateObject7 || (_templateObj
145
411
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
146
412
  }, function (props) {
147
413
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
148
- }, function (props) {
149
- return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
150
- }, function (props) {
151
- return props.theme.fontTextTransform;
152
- }, function (props) {
153
- return props.theme.fontFamily;
154
- }, function (props) {
155
- return props.theme.fontSize;
156
- }, function (props) {
157
- return props.theme.fontStyle;
158
- }, function (props) {
159
- return props.theme.fontWeight;
160
- }, function (props) {
161
- return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "12px 16px" || "8px 16px";
162
- }, function (props) {
414
+ });
415
+
416
+ 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) {
163
417
  return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
164
418
  }, function (props) {
165
419
  return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
166
- }, function (props) {
167
- return "".concat(props.theme.hoverBackgroundColor, " !important");
168
- }, function (props) {
169
- return "".concat(props.theme.pressedBackgroundColor, " !important");
170
- }, function (props) {
171
- return "".concat(props.theme.pressedFontWeight, " !important");
172
420
  }, function (props) {
173
421
  return props.theme.unselectedBackgroundColor;
422
+ });
423
+
424
+ var ScrollIndicator = _styledComponents["default"].button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: ", ";\n background-color: #ffffff;\n font-size: 1.25rem;\n min-width: ", ";\n height: ", "px;\n padding: 0;\n justify-content: center;\n cursor: pointer;\n border-bottom: solid ", " ", ";\n box-sizing: border-box;\n border: none;\n &:hover {\n background-color: ", ";\n }\n &:focus {\n outline: ", " solid 1px;\n outline-offset: -1px;\n }\n &:active {\n background-color: ", ";\n }\n svg {\n height: 20px;\n width: 20px;\n align-self: center;\n fill: ", ";\n visibility: visible;\n }\n &[aria-disabled=\"true\"] {\n pointer-events: none;\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"])), function (props) {
425
+ return props.enabled ? "flex" : "none";
174
426
  }, function (props) {
175
- return props.theme.unselectedFontColor;
176
- }, function (props) {
177
- return props.theme.unselectedIconColor;
427
+ return props.theme.scrollButtonsWidth;
178
428
  }, function (props) {
179
- return props.theme.selectedBackgroundColor;
429
+ return props.minHeightTabs - 1;
180
430
  }, function (props) {
181
- return props.theme.selectedFontColor;
431
+ return props.theme.dividerThickness;
182
432
  }, function (props) {
183
- return props.theme.selectedIconColor;
433
+ return props.theme.dividerColor;
184
434
  }, function (props) {
185
- return props.theme.unselectedBackgroundColor;
435
+ return "".concat(props.theme.hoverBackgroundColor, " !important");
186
436
  }, function (props) {
187
- return props.theme.disabledFontColor;
437
+ return props.theme.focusOutline;
188
438
  }, function (props) {
189
- return props.theme.disabledFontStyle;
439
+ return "".concat(props.theme.pressedBackgroundColor, " !important");
190
440
  }, function (props) {
191
- return props.theme.disabledIconColor;
441
+ return props.theme.unselectedFontColor;
442
+ });
443
+
444
+ var ActiveIndicator = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n left: ", ";\n width: ", ";\n z-index: 2;\n background-color: ", ";\n bottom: 0;\n height: ", ";\n position: absolute;\n &[aria-disabled=\"true\"] {\n background-color: ", ";\n display: none;\n }\n"])), function (props) {
445
+ return "".concat(props.tabLeft, "px");
192
446
  }, function (props) {
193
- return props.theme.focusOutline;
447
+ return "".concat(props.tabWidth, "px");
194
448
  }, function (props) {
195
449
  return props.theme.selectedUnderlineColor;
196
450
  }, function (props) {
197
451
  return props.theme.selectedUnderlineThickness;
198
452
  }, function (props) {
199
- return props.theme.scrollButtonsWidth;
200
- }, function (props) {
201
- return props.theme.scrollButtonsWidth;
453
+ return props.theme.disabledFontColor;
202
454
  });
203
455
 
204
- var TabIcon = _styledComponents["default"].img(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: 22px;\n max-width: 22px;\n"])));
456
+ var TabsContent = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n z-index: 1;\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"])));
205
457
 
206
- 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) {
207
- return props.hasLabelAndIcon && props.iconPosition === "top" && "8px" || "";
208
- }, function (props) {
209
- return props.hasLabelAndIcon && props.iconPosition === "left" && "12px" || "";
458
+ var TabList = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n min-height: ", "px;\n"])), function (props) {
459
+ return props.minHeightTabs;
460
+ });
461
+
462
+ 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) {
463
+ return props.enabled ? "transform: translateX(".concat(props.translateScroll, "px)") : "transform: translateX(0px)";
210
464
  });
211
465
 
212
466
  var _default = DxcTabs;