@dxc-technology/halstack-react 0.0.0-d3ac293 → 0.0.0-d3df47e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BackgroundColorContext.d.ts +1 -10
- package/BackgroundColorContext.js +4 -21
- package/HalstackContext.d.ts +24 -139
- package/HalstackContext.js +11 -36
- package/README.md +47 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +26 -83
- package/accordion/Accordion.stories.tsx +2 -114
- package/accordion/Accordion.test.js +18 -33
- package/accordion/types.d.ts +5 -17
- package/accordion-group/AccordionGroup.d.ts +4 -3
- package/accordion-group/AccordionGroup.js +27 -75
- package/accordion-group/AccordionGroup.stories.tsx +78 -77
- package/accordion-group/AccordionGroup.test.js +43 -71
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +31 -0
- package/accordion-group/types.d.ts +6 -18
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +47 -0
- package/action-icon/ActionIcon.stories.tsx +41 -0
- package/action-icon/ActionIcon.test.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/alert/Alert.js +17 -56
- package/alert/Alert.test.js +28 -45
- package/alert/types.d.ts +5 -5
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +142 -42
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +52 -3
- package/bleed/Bleed.js +13 -21
- package/bleed/Bleed.stories.tsx +1 -0
- package/bleed/types.d.ts +2 -2
- package/box/Box.d.ts +1 -1
- package/box/Box.js +16 -55
- package/box/Box.stories.tsx +25 -53
- package/box/Box.test.js +1 -6
- package/box/types.d.ts +3 -15
- package/bulleted-list/BulletedList.js +19 -53
- package/bulleted-list/BulletedList.stories.tsx +8 -93
- package/bulleted-list/types.d.ts +32 -5
- package/button/Button.d.ts +1 -1
- package/button/Button.js +66 -100
- package/button/Button.stories.tsx +9 -90
- package/button/Button.test.js +19 -16
- package/button/types.d.ts +8 -4
- package/card/Card.d.ts +1 -1
- package/card/Card.js +47 -88
- package/card/Card.stories.tsx +12 -42
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +6 -12
- package/checkbox/Checkbox.js +85 -120
- package/checkbox/Checkbox.stories.tsx +16 -54
- package/checkbox/Checkbox.test.js +107 -63
- package/checkbox/types.d.ts +8 -4
- package/chip/Chip.js +34 -68
- package/chip/Chip.stories.tsx +25 -17
- package/chip/Chip.test.js +15 -28
- package/chip/types.d.ts +4 -4
- package/common/OpenSans.css +68 -80
- package/common/coreTokens.d.ts +237 -0
- package/common/coreTokens.js +184 -0
- package/common/utils.js +2 -8
- package/common/variables.d.ts +24 -282
- package/common/variables.js +860 -1125
- package/container/Container.d.ts +4 -0
- package/container/Container.js +194 -0
- package/container/Container.stories.tsx +214 -0
- package/container/types.d.ts +74 -0
- package/date-input/Calendar.js +15 -59
- package/date-input/DateInput.js +50 -96
- package/date-input/DateInput.stories.tsx +11 -30
- package/date-input/DateInput.test.js +674 -701
- package/date-input/DatePicker.js +11 -42
- package/date-input/Icons.d.ts +6 -6
- package/date-input/Icons.js +6 -23
- package/date-input/YearPicker.js +8 -34
- package/date-input/types.d.ts +27 -21
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +15 -60
- package/dialog/Dialog.stories.tsx +215 -169
- package/dialog/Dialog.test.js +125 -187
- package/dialog/types.d.ts +18 -26
- package/dropdown/Dropdown.js +39 -93
- package/dropdown/Dropdown.test.js +391 -378
- package/dropdown/DropdownMenu.js +13 -20
- package/dropdown/DropdownMenuItem.js +5 -19
- package/dropdown/types.d.ts +17 -19
- package/file-input/FileInput.js +180 -249
- package/file-input/FileInput.stories.tsx +1 -1
- package/file-input/FileInput.test.js +356 -354
- package/file-input/FileItem.js +14 -41
- package/file-input/types.d.ts +10 -10
- package/flex/Flex.js +27 -39
- package/flex/Flex.stories.tsx +35 -26
- package/flex/types.d.ts +74 -9
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +69 -116
- package/footer/Footer.stories.tsx +38 -95
- package/footer/Footer.test.js +21 -33
- package/footer/Icons.d.ts +3 -2
- package/footer/Icons.js +66 -7
- package/footer/types.d.ts +25 -27
- package/grid/Grid.d.ts +7 -0
- package/grid/Grid.js +76 -0
- package/grid/Grid.stories.tsx +219 -0
- package/grid/types.d.ts +115 -0
- package/grid/types.js +5 -0
- package/header/Header.d.ts +4 -3
- package/header/Header.js +33 -116
- package/header/Header.stories.tsx +7 -71
- package/header/Header.test.js +12 -25
- package/header/Icons.d.ts +2 -2
- package/header/Icons.js +2 -7
- package/header/types.d.ts +5 -20
- package/heading/Heading.js +9 -31
- package/heading/Heading.test.js +70 -87
- package/heading/types.d.ts +7 -7
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +127 -0
- package/image/types.d.ts +72 -0
- package/image/types.js +5 -0
- package/inset/Inset.js +13 -21
- package/inset/Inset.stories.tsx +2 -1
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +5 -5
- package/layout/ApplicationLayout.js +28 -65
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +8 -5
- package/layout/Icons.js +51 -59
- package/layout/SidenavContext.d.ts +1 -1
- package/layout/SidenavContext.js +3 -9
- package/layout/types.d.ts +5 -6
- package/link/Link.js +23 -44
- package/link/Link.test.js +23 -41
- package/link/types.d.ts +14 -14
- package/main.d.ts +7 -4
- package/main.js +32 -58
- package/nav-tabs/NavTabs.d.ts +2 -2
- package/nav-tabs/NavTabs.js +22 -54
- package/nav-tabs/NavTabs.stories.tsx +21 -5
- package/nav-tabs/NavTabs.test.js +38 -44
- package/nav-tabs/Tab.js +40 -72
- package/nav-tabs/types.d.ts +14 -15
- package/number-input/NumberInput.d.ts +7 -0
- package/number-input/NumberInput.js +26 -35
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.js +700 -412
- package/number-input/types.d.ts +11 -5
- package/package.json +30 -28
- package/paginator/Icons.d.ts +5 -5
- package/paginator/Icons.js +5 -19
- package/paginator/Paginator.js +17 -47
- package/paginator/Paginator.test.js +229 -199
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.d.ts +2 -3
- package/paragraph/Paragraph.js +3 -19
- package/paragraph/Paragraph.stories.tsx +0 -17
- package/password-input/Icons.d.ts +6 -0
- package/password-input/Icons.js +35 -0
- package/password-input/PasswordInput.js +57 -126
- package/password-input/PasswordInput.stories.tsx +1 -33
- package/password-input/PasswordInput.test.js +157 -140
- package/password-input/types.d.ts +8 -7
- package/progress-bar/ProgressBar.d.ts +2 -2
- package/progress-bar/ProgressBar.js +21 -53
- package/progress-bar/{ProgressBar.stories.jsx → ProgressBar.stories.tsx} +1 -1
- package/progress-bar/ProgressBar.test.js +35 -52
- package/progress-bar/types.d.ts +4 -3
- package/quick-nav/QuickNav.js +4 -27
- package/quick-nav/QuickNav.stories.tsx +1 -1
- package/quick-nav/types.d.ts +10 -10
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +31 -63
- package/radio-group/RadioGroup.js +45 -93
- package/radio-group/RadioGroup.stories.tsx +10 -10
- package/radio-group/RadioGroup.test.js +504 -470
- package/radio-group/types.d.ts +8 -8
- package/resultset-table/Icons.d.ts +7 -0
- package/{resultsetTable → resultset-table}/Icons.js +1 -5
- package/{resultsetTable → resultset-table}/ResultsetTable.d.ts +1 -1
- package/{resultsetTable → resultset-table}/ResultsetTable.js +33 -63
- package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +19 -0
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +72 -92
- package/{resultsetTable → resultset-table}/types.d.ts +13 -7
- package/resultset-table/types.js +5 -0
- package/select/Icons.d.ts +7 -7
- package/select/Icons.js +1 -5
- package/select/Listbox.js +13 -39
- package/select/Option.js +17 -27
- package/select/Select.js +92 -166
- package/select/Select.stories.tsx +3 -3
- package/select/Select.test.js +1946 -1804
- package/select/types.d.ts +14 -15
- package/sidenav/Icons.d.ts +7 -0
- package/sidenav/Icons.js +47 -0
- package/sidenav/Sidenav.d.ts +2 -2
- package/sidenav/Sidenav.js +80 -150
- package/sidenav/Sidenav.stories.tsx +60 -60
- package/sidenav/Sidenav.test.js +3 -10
- package/sidenav/types.d.ts +31 -28
- package/slider/Slider.js +68 -126
- package/slider/Slider.test.js +107 -103
- package/slider/types.d.ts +4 -4
- package/spinner/Spinner.js +28 -72
- package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +28 -28
- package/spinner/Spinner.test.js +25 -34
- package/spinner/types.d.ts +3 -3
- package/status-light/StatusLight.d.ts +4 -0
- package/status-light/StatusLight.js +51 -0
- package/status-light/StatusLight.stories.tsx +74 -0
- package/status-light/StatusLight.test.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/switch/Switch.js +49 -97
- package/switch/Switch.stories.tsx +0 -34
- package/switch/Switch.test.js +51 -96
- package/switch/types.d.ts +4 -4
- package/table/Table.d.ts +1 -1
- package/table/Table.js +23 -30
- package/table/{Table.stories.jsx → Table.stories.tsx} +98 -0
- package/table/Table.test.js +1 -6
- package/table/types.d.ts +12 -6
- package/tabs/Tab.js +19 -36
- package/tabs/Tabs.js +61 -144
- package/tabs/Tabs.stories.tsx +1 -1
- package/tabs/Tabs.test.js +65 -121
- package/tabs/types.d.ts +19 -19
- package/tag/Tag.js +26 -58
- package/tag/Tag.test.js +19 -30
- package/tag/types.d.ts +7 -7
- package/text-input/Icons.d.ts +5 -5
- package/text-input/Icons.js +1 -5
- package/text-input/Suggestion.js +11 -28
- package/text-input/Suggestions.d.ts +1 -1
- package/text-input/Suggestions.js +15 -65
- package/text-input/TextInput.js +217 -318
- package/text-input/TextInput.stories.tsx +48 -152
- package/text-input/TextInput.test.js +1210 -1194
- package/text-input/types.d.ts +25 -17
- package/textarea/Textarea.js +68 -111
- package/textarea/{Textarea.stories.jsx → Textarea.stories.tsx} +58 -100
- package/textarea/Textarea.test.js +151 -182
- package/textarea/types.d.ts +9 -5
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +91 -105
- package/toggle-group/ToggleGroup.stories.tsx +7 -4
- package/toggle-group/ToggleGroup.test.js +68 -87
- package/toggle-group/types.d.ts +26 -17
- package/typography/Typography.js +4 -13
- package/typography/types.d.ts +1 -1
- package/useTheme.d.ts +21 -136
- package/useTheme.js +1 -8
- package/useTranslatedLabels.js +1 -7
- package/utils/BaseTypography.d.ts +2 -2
- package/utils/BaseTypography.js +16 -30
- package/utils/FocusLock.js +28 -43
- package/wizard/Wizard.js +15 -50
- package/wizard/Wizard.test.js +53 -80
- package/wizard/types.d.ts +8 -9
- package/card/ice-cream.jpg +0 -0
- package/number-input/NumberInputContext.d.ts +0 -4
- package/number-input/NumberInputContext.js +0 -19
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/resultsetTable/Icons.d.ts +0 -7
- package/slider/Slider.stories.tsx +0 -240
- /package/{resultsetTable → action-icon}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → container/types.js} +0 -0
package/tabs/Tabs.js
CHANGED
|
@@ -1,38 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
|
|
14
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
-
|
|
16
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
-
|
|
18
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
13
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
21
|
-
|
|
22
14
|
var _variables = require("../common/variables");
|
|
23
|
-
|
|
24
15
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
|
-
|
|
26
16
|
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
27
|
-
|
|
28
17
|
var _Tab = _interopRequireDefault(require("./Tab"));
|
|
29
|
-
|
|
30
18
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
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; }
|
|
35
|
-
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
36
21
|
var arrowIcons = {
|
|
37
22
|
left: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
38
23
|
focusable: "false",
|
|
@@ -49,40 +34,35 @@ var arrowIcons = {
|
|
|
49
34
|
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
50
35
|
}))
|
|
51
36
|
};
|
|
52
|
-
|
|
53
37
|
var useResize = function useResize(refTabList) {
|
|
54
38
|
var _useState = (0, _react.useState)(0),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
40
|
+
viewWidth = _useState2[0],
|
|
41
|
+
setViewWidth = _useState2[1];
|
|
59
42
|
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);
|
|
43
|
+
var _refTabList$current$o, _refTabList$current;
|
|
44
|
+
setViewWidth((_refTabList$current$o = refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current = refTabList.current) === null || _refTabList$current === void 0 ? void 0 : _refTabList$current.offsetWidth) !== null && _refTabList$current$o !== void 0 ? _refTabList$current$o : 0);
|
|
63
45
|
}, [refTabList]);
|
|
64
46
|
(0, _react.useEffect)(function () {
|
|
65
|
-
|
|
47
|
+
handleWindowSizeChange();
|
|
66
48
|
window.addEventListener("resize", handleWindowSizeChange);
|
|
67
49
|
return function () {
|
|
68
|
-
window.removeEventListener("load", handleWindowSizeChange);
|
|
69
50
|
window.removeEventListener("resize", handleWindowSizeChange);
|
|
70
51
|
};
|
|
71
52
|
}, [handleWindowSizeChange]);
|
|
72
53
|
return viewWidth;
|
|
73
54
|
};
|
|
74
|
-
|
|
75
55
|
var DxcTabs = function DxcTabs(_ref) {
|
|
76
56
|
var defaultActiveTabIndex = _ref.defaultActiveTabIndex,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
57
|
+
activeTabIndex = _ref.activeTabIndex,
|
|
58
|
+
tabs = _ref.tabs,
|
|
59
|
+
onTabClick = _ref.onTabClick,
|
|
60
|
+
onTabHover = _ref.onTabHover,
|
|
61
|
+
margin = _ref.margin,
|
|
62
|
+
_ref$iconPosition = _ref.iconPosition,
|
|
63
|
+
iconPosition = _ref$iconPosition === void 0 ? "top" : _ref$iconPosition,
|
|
64
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
65
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
86
66
|
var colorsTheme = (0, _useTheme["default"])();
|
|
87
67
|
var hasLabelAndIcon = tabs && tabs.filter(function (tab) {
|
|
88
68
|
return tab.label && tab.icon;
|
|
@@ -90,62 +70,50 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
90
70
|
var firstFocus = tabs && tabs.findIndex(function (tab) {
|
|
91
71
|
return !tab.isDisabled;
|
|
92
72
|
});
|
|
93
|
-
|
|
94
73
|
var _useState3 = (0, _react.useState)(tabs && defaultActiveTabIndex && !tabs[defaultActiveTabIndex].isDisabled ? defaultActiveTabIndex : firstFocus),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
74
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
75
|
+
innerActiveTabIndex = _useState4[0],
|
|
76
|
+
setInnerActiveTabIndex = _useState4[1];
|
|
99
77
|
var _useState5 = (0, _react.useState)(0),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
78
|
+
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
|
79
|
+
activeIndicatorWidth = _useState6[0],
|
|
80
|
+
setActiveIndicatorWidth = _useState6[1];
|
|
104
81
|
var _useState7 = (0, _react.useState)(0),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
82
|
+
_useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
|
|
83
|
+
activeIndicatorLeft = _useState8[0],
|
|
84
|
+
setActiveIndicatorLeft = _useState8[1];
|
|
109
85
|
var _useState9 = (0, _react.useState)(0),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
86
|
+
_useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
|
|
87
|
+
translateScroll = _useState10[0],
|
|
88
|
+
setTranslateScroll = _useState10[1];
|
|
114
89
|
var _useState11 = (0, _react.useState)(true),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
90
|
+
_useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
|
|
91
|
+
scrollRightEnabled = _useState12[0],
|
|
92
|
+
setScrollRightEnabled = _useState12[1];
|
|
119
93
|
var _useState13 = (0, _react.useState)(false),
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
94
|
+
_useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
|
|
95
|
+
scrollLeftEnabled = _useState14[0],
|
|
96
|
+
setScrollLeftEnabled = _useState14[1];
|
|
124
97
|
var _useState15 = (0, _react.useState)(0),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
98
|
+
_useState16 = (0, _slicedToArray2["default"])(_useState15, 2),
|
|
99
|
+
countClick = _useState16[0],
|
|
100
|
+
setCountClick = _useState16[1];
|
|
129
101
|
var _useState17 = (0, _react.useState)(0),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
102
|
+
_useState18 = (0, _slicedToArray2["default"])(_useState17, 2),
|
|
103
|
+
totalTabsWidth = _useState18[0],
|
|
104
|
+
setTotalTabsWidth = _useState18[1];
|
|
134
105
|
var _useState19 = (0, _react.useState)(activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : innerActiveTabIndex),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
106
|
+
_useState20 = (0, _slicedToArray2["default"])(_useState19, 2),
|
|
107
|
+
currentFocusIndex = _useState20[0],
|
|
108
|
+
setCurrentFocusIndex = _useState20[1];
|
|
139
109
|
var _useState21 = (0, _react.useState)(activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : innerActiveTabIndex),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
110
|
+
_useState22 = (0, _slicedToArray2["default"])(_useState21, 2),
|
|
111
|
+
temporalFocusIndex = _useState22[0],
|
|
112
|
+
setTemporalFocusIndex = _useState22[1];
|
|
144
113
|
var _useState23 = (0, _react.useState)(0),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
114
|
+
_useState24 = (0, _slicedToArray2["default"])(_useState23, 2),
|
|
115
|
+
minHeightTabs = _useState24[0],
|
|
116
|
+
setMinHeightTabs = _useState24[1];
|
|
149
117
|
var refTabs = (0, _react.useRef)([]);
|
|
150
118
|
var refTabList = (0, _react.useRef)(null);
|
|
151
119
|
var viewWidth = useResize(refTabList);
|
|
@@ -155,7 +123,6 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
155
123
|
}, [viewWidth]);
|
|
156
124
|
(0, _react.useEffect)(function () {
|
|
157
125
|
var _refTabs$current, _refTabs$current2, _refTabs$current3;
|
|
158
|
-
|
|
159
126
|
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
127
|
return count + obj.offsetWidth;
|
|
161
128
|
}, 0);
|
|
@@ -165,36 +132,28 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
165
132
|
}, [refTabs]);
|
|
166
133
|
(0, _react.useEffect)(function () {
|
|
167
134
|
var _refTabList$current2;
|
|
168
|
-
|
|
169
135
|
setMinHeightTabs((refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current2 = refTabList.current) === null || _refTabList$current2 === void 0 ? void 0 : _refTabList$current2.offsetHeight) + 1);
|
|
170
136
|
}, [refTabList]);
|
|
171
137
|
(0, _react.useEffect)(function () {
|
|
172
138
|
if (activeTabIndex >= 0) {
|
|
173
139
|
var _refTabs$current$acti, _refTabs$current$acti2;
|
|
174
|
-
|
|
175
140
|
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
141
|
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
142
|
}
|
|
178
143
|
}, [activeTabIndex]);
|
|
179
|
-
|
|
180
144
|
var handleSelected = function handleSelected(newValue) {
|
|
181
145
|
activeTabIndex !== null && activeTabIndex !== void 0 ? activeTabIndex : setInnerActiveTabIndex(newValue);
|
|
182
146
|
onTabClick === null || onTabClick === void 0 ? void 0 : onTabClick(newValue);
|
|
183
|
-
|
|
184
147
|
if (activeTabIndex === undefined) {
|
|
185
148
|
var _refTabs$current$newV, _refTabs$current$newV2;
|
|
186
|
-
|
|
187
149
|
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
150
|
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
151
|
}
|
|
190
152
|
};
|
|
191
|
-
|
|
192
153
|
var scrollLeft = function scrollLeft() {
|
|
193
154
|
var _refTabList$current3;
|
|
194
|
-
|
|
195
155
|
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
|
-
|
|
156
|
+
var moveX = 0;
|
|
198
157
|
if (countClick <= scrollWidth) {
|
|
199
158
|
moveX = 0;
|
|
200
159
|
setScrollLeftEnabled(false);
|
|
@@ -204,20 +163,15 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
204
163
|
setScrollRightEnabled(true);
|
|
205
164
|
setScrollLeftEnabled(true);
|
|
206
165
|
}
|
|
207
|
-
|
|
208
166
|
setTranslateScroll(-moveX);
|
|
209
167
|
setCountClick(moveX);
|
|
210
168
|
};
|
|
211
|
-
|
|
212
169
|
var scrollRight = function scrollRight() {
|
|
213
170
|
var _refTabList$current4, _refTabList$current5;
|
|
214
|
-
|
|
215
171
|
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
|
-
|
|
172
|
+
var moveX = 0;
|
|
218
173
|
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
174
|
var _refTabList$current6;
|
|
220
|
-
|
|
221
175
|
moveX = totalTabsWidth - (refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current6 = refTabList.current) === null || _refTabList$current6 === void 0 ? void 0 : _refTabList$current6.offsetWidth);
|
|
222
176
|
setScrollRightEnabled(false);
|
|
223
177
|
setScrollLeftEnabled(true);
|
|
@@ -226,19 +180,15 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
226
180
|
setScrollLeftEnabled(true);
|
|
227
181
|
setScrollRightEnabled(true);
|
|
228
182
|
}
|
|
229
|
-
|
|
230
183
|
setTranslateScroll(-moveX);
|
|
231
184
|
setCountClick(moveX);
|
|
232
185
|
};
|
|
233
|
-
|
|
234
186
|
var setPreviousTabFocus = function setPreviousTabFocus() {
|
|
235
187
|
setTemporalFocusIndex(function (temporalFocusIndex) {
|
|
236
188
|
var index = temporalFocusIndex === 0 ? tabs.length - 1 : temporalFocusIndex - 1;
|
|
237
|
-
|
|
238
189
|
while (tabs[index].isDisabled) {
|
|
239
190
|
index = index === 0 ? tabs.length - 1 : index - 1;
|
|
240
191
|
}
|
|
241
|
-
|
|
242
192
|
refTabs === null || refTabs === void 0 ? void 0 : refTabs.current[index].focus({
|
|
243
193
|
preventScroll: true
|
|
244
194
|
});
|
|
@@ -246,15 +196,12 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
246
196
|
return index;
|
|
247
197
|
});
|
|
248
198
|
};
|
|
249
|
-
|
|
250
199
|
var setNextTabFocus = function setNextTabFocus() {
|
|
251
200
|
setTemporalFocusIndex(function (temporalFocusIndex) {
|
|
252
201
|
var index = temporalFocusIndex === tabs.length - 1 ? 0 : temporalFocusIndex + 1;
|
|
253
|
-
|
|
254
202
|
while (tabs[index].isDisabled) {
|
|
255
203
|
index = index === tabs.length - 1 ? 0 : index + 1;
|
|
256
204
|
}
|
|
257
|
-
|
|
258
205
|
refTabs === null || refTabs === void 0 ? void 0 : refTabs.current[index].focus({
|
|
259
206
|
preventScroll: true
|
|
260
207
|
});
|
|
@@ -262,10 +209,8 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
262
209
|
return index;
|
|
263
210
|
});
|
|
264
211
|
};
|
|
265
|
-
|
|
266
212
|
var setScrollFocus = function setScrollFocus(actualIndex) {
|
|
267
213
|
var _refTabs$current4, _refTabList$current8;
|
|
268
|
-
|
|
269
214
|
var sumPrev = 0;
|
|
270
215
|
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
216
|
if (index <= actualIndex) {
|
|
@@ -273,29 +218,23 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
273
218
|
}
|
|
274
219
|
});
|
|
275
220
|
var moveX = 0;
|
|
276
|
-
|
|
277
221
|
if (actualIndex === tabs.length - 1) {
|
|
278
222
|
var _refTabList$current7;
|
|
279
|
-
|
|
280
223
|
moveX = totalTabsWidth - (refTabList === null || refTabList === void 0 ? void 0 : (_refTabList$current7 = refTabList.current) === null || _refTabList$current7 === void 0 ? void 0 : _refTabList$current7.offsetWidth);
|
|
281
224
|
setScrollLeftEnabled(true);
|
|
282
225
|
setScrollRightEnabled(false);
|
|
283
226
|
} 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
227
|
var _refTabList$current9;
|
|
285
|
-
|
|
286
228
|
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
229
|
setScrollLeftEnabled(true);
|
|
289
230
|
setScrollRightEnabled(true);
|
|
290
231
|
} else {
|
|
291
232
|
setScrollLeftEnabled(false);
|
|
292
233
|
setScrollRightEnabled(true);
|
|
293
234
|
}
|
|
294
|
-
|
|
295
235
|
setTranslateScroll(-moveX);
|
|
296
236
|
setCountClick(moveX);
|
|
297
237
|
};
|
|
298
|
-
|
|
299
238
|
var handleOnKeyDown = function handleOnKeyDown(event) {
|
|
300
239
|
switch (event.key) {
|
|
301
240
|
case "Left":
|
|
@@ -303,36 +242,30 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
303
242
|
event.preventDefault();
|
|
304
243
|
setPreviousTabFocus();
|
|
305
244
|
break;
|
|
306
|
-
|
|
307
245
|
case "Right":
|
|
308
246
|
case "ArrowRight":
|
|
309
247
|
event.preventDefault();
|
|
310
248
|
setNextTabFocus();
|
|
311
249
|
break;
|
|
312
|
-
|
|
313
250
|
case "Enter":
|
|
314
251
|
case " ":
|
|
315
252
|
event.preventDefault();
|
|
316
253
|
setCurrentFocusIndex(temporalFocusIndex);
|
|
317
254
|
handleSelected(temporalFocusIndex);
|
|
318
255
|
break;
|
|
319
|
-
|
|
320
256
|
case "Tab":
|
|
321
257
|
if (temporalFocusIndex !== currentFocusIndex) {
|
|
322
258
|
event.preventDefault();
|
|
323
259
|
setTemporalFocusIndex(currentFocusIndex);
|
|
324
260
|
refTabs === null || refTabs === void 0 ? void 0 : refTabs.current[currentFocusIndex].focus();
|
|
325
261
|
}
|
|
326
|
-
|
|
327
262
|
handleSelected(currentFocusIndex);
|
|
328
263
|
break;
|
|
329
264
|
}
|
|
330
265
|
};
|
|
331
|
-
|
|
332
266
|
var isTabActive = function isTabActive(index) {
|
|
333
267
|
return activeTabIndex >= 0 ? activeTabIndex === index : innerActiveTabIndex === index;
|
|
334
268
|
};
|
|
335
|
-
|
|
336
269
|
var isActiveIndicatorDisabled = firstFocus === -1 || tabs && activeTabIndex >= 0 && tabs[activeTabIndex].isDisabled;
|
|
337
270
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
338
271
|
theme: colorsTheme.tabs
|
|
@@ -343,9 +276,8 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
343
276
|
iconPosition: iconPosition
|
|
344
277
|
}, /*#__PURE__*/_react["default"].createElement(ScrollIndicator, {
|
|
345
278
|
onClick: scrollLeft,
|
|
346
|
-
scrollLeftEnabled: scrollLeftEnabled,
|
|
347
279
|
enabled: enabledIndicator,
|
|
348
|
-
|
|
280
|
+
disabled: !scrollLeftEnabled,
|
|
349
281
|
"aria-label": translatedLabels.tabs.scrollLeft,
|
|
350
282
|
tabIndex: scrollLeftEnabled ? tabIndex : -1,
|
|
351
283
|
minHeightTabs: minHeightTabs
|
|
@@ -386,21 +318,18 @@ var DxcTabs = function DxcTabs(_ref) {
|
|
|
386
318
|
"aria-disabled": isActiveIndicatorDisabled
|
|
387
319
|
}))), /*#__PURE__*/_react["default"].createElement(ScrollIndicator, {
|
|
388
320
|
onClick: scrollRight,
|
|
389
|
-
scrollRightEnabled: scrollRightEnabled,
|
|
390
321
|
enabled: enabledIndicator,
|
|
391
|
-
|
|
322
|
+
disabled: !scrollRightEnabled,
|
|
392
323
|
"aria-label": translatedLabels.tabs.scrollRight,
|
|
393
324
|
tabIndex: scrollRightEnabled ? tabIndex : -1,
|
|
394
325
|
minHeightTabs: minHeightTabs
|
|
395
326
|
}, arrowIcons.right))));
|
|
396
327
|
};
|
|
397
|
-
|
|
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"])), function (props) {
|
|
328
|
+
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) {
|
|
399
329
|
return props.theme.dividerThickness;
|
|
400
330
|
}, function (props) {
|
|
401
331
|
return props.theme.dividerColor;
|
|
402
332
|
});
|
|
403
|
-
|
|
404
333
|
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) {
|
|
405
334
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
406
335
|
}, function (props) {
|
|
@@ -412,7 +341,6 @@ var TabsContainer = _styledComponents["default"].div(_templateObject2 || (_templ
|
|
|
412
341
|
}, function (props) {
|
|
413
342
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
414
343
|
});
|
|
415
|
-
|
|
416
344
|
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) {
|
|
417
345
|
return (!props.hasLabelAndIcon || props.hasLabelAndIcon && props.iconPosition !== "top") && "48px" || "72px";
|
|
418
346
|
}, function (props) {
|
|
@@ -420,17 +348,12 @@ var Tabs = _styledComponents["default"].div(_templateObject3 || (_templateObject
|
|
|
420
348
|
}, function (props) {
|
|
421
349
|
return props.theme.unselectedBackgroundColor;
|
|
422
350
|
});
|
|
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) {
|
|
351
|
+
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 display: none;\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) {
|
|
425
352
|
return props.enabled ? "flex" : "none";
|
|
426
353
|
}, function (props) {
|
|
427
354
|
return props.theme.scrollButtonsWidth;
|
|
428
355
|
}, function (props) {
|
|
429
356
|
return props.minHeightTabs - 1;
|
|
430
|
-
}, function (props) {
|
|
431
|
-
return props.theme.dividerThickness;
|
|
432
|
-
}, function (props) {
|
|
433
|
-
return props.theme.dividerColor;
|
|
434
357
|
}, function (props) {
|
|
435
358
|
return "".concat(props.theme.hoverBackgroundColor, " !important");
|
|
436
359
|
}, function (props) {
|
|
@@ -440,28 +363,22 @@ var ScrollIndicator = _styledComponents["default"].button(_templateObject4 || (_
|
|
|
440
363
|
}, function (props) {
|
|
441
364
|
return props.theme.unselectedFontColor;
|
|
442
365
|
});
|
|
443
|
-
|
|
444
|
-
var ActiveIndicator = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n left: ", ";\n width: ", ";\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) {
|
|
366
|
+
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) {
|
|
445
367
|
return "".concat(props.tabLeft, "px");
|
|
446
368
|
}, function (props) {
|
|
447
369
|
return "".concat(props.tabWidth, "px");
|
|
448
|
-
}, function (props) {
|
|
449
|
-
return props.theme.selectedUnderlineColor;
|
|
450
370
|
}, function (props) {
|
|
451
371
|
return props.theme.selectedUnderlineThickness;
|
|
372
|
+
}, function (props) {
|
|
373
|
+
return props.theme.selectedUnderlineColor;
|
|
452
374
|
}, function (props) {
|
|
453
375
|
return props.theme.disabledFontColor;
|
|
454
376
|
});
|
|
455
|
-
|
|
456
|
-
var TabsContent = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\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"])));
|
|
457
|
-
|
|
377
|
+
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"])));
|
|
458
378
|
var TabList = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n min-height: ", "px;\n"])), function (props) {
|
|
459
379
|
return props.minHeightTabs;
|
|
460
380
|
});
|
|
461
|
-
|
|
462
381
|
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
382
|
return props.enabled ? "transform: translateX(".concat(props.translateScroll, "px)") : "transform: translateX(0px)";
|
|
464
383
|
});
|
|
465
|
-
|
|
466
|
-
var _default = DxcTabs;
|
|
467
|
-
exports["default"] = _default;
|
|
384
|
+
var _default = exports["default"] = DxcTabs;
|
package/tabs/Tabs.stories.tsx
CHANGED
|
@@ -71,7 +71,7 @@ const firstDisabledTabs: any = [
|
|
|
71
71
|
|
|
72
72
|
const tabsNotification = tabs.map((tab, index) => ({
|
|
73
73
|
...tab,
|
|
74
|
-
notificationNumber: (index === 0 && true) || (index === 1 && 5) || (index === 2 && 200),
|
|
74
|
+
notificationNumber: (index === 0 && true) || (index === 1 && 5) || (index === 2 && 100) || (index === 3 && 200),
|
|
75
75
|
}));
|
|
76
76
|
|
|
77
77
|
const tabsIcon = tabs.map((tab, index) =>
|