@dxc-technology/halstack-react 0.0.0-ec7b867 → 0.0.0-ecc45e2
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/HalstackContext.d.ts +12 -0
- package/HalstackContext.js +295 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +7 -28
- package/accordion/Accordion.stories.tsx +12 -12
- package/accordion/Accordion.test.js +72 -0
- package/accordion/types.d.ts +5 -1
- package/accordion-group/AccordionGroup.d.ts +1 -1
- package/accordion-group/AccordionGroup.js +14 -15
- package/accordion-group/AccordionGroup.stories.tsx +1 -1
- package/accordion-group/AccordionGroup.test.js +151 -0
- package/accordion-group/types.d.ts +5 -1
- package/alert/Alert.js +4 -1
- package/alert/Alert.test.js +92 -0
- package/badge/Badge.d.ts +4 -0
- package/badge/Badge.js +5 -3
- package/badge/types.d.ts +5 -0
- package/{list → badge}/types.js +0 -0
- package/bleed/Bleed.js +1 -34
- package/bleed/Bleed.stories.tsx +94 -95
- package/bleed/types.d.ts +25 -1
- package/box/Box.js +22 -32
- package/box/Box.test.js +18 -0
- package/bulleted-list/BulletedList.d.ts +7 -0
- package/bulleted-list/BulletedList.js +123 -0
- package/bulleted-list/BulletedList.stories.tsx +200 -0
- package/bulleted-list/types.d.ts +11 -0
- package/{radio → bulleted-list}/types.js +0 -0
- package/button/Button.js +53 -68
- package/button/Button.stories.tsx +9 -0
- package/button/Button.test.js +35 -0
- package/button/types.d.ts +7 -7
- package/card/Card.js +24 -27
- package/card/Card.test.js +50 -0
- package/checkbox/Checkbox.d.ts +1 -1
- package/checkbox/Checkbox.js +43 -39
- package/checkbox/Checkbox.stories.tsx +124 -128
- package/checkbox/Checkbox.test.js +78 -0
- package/checkbox/types.d.ts +7 -3
- package/chip/Chip.test.js +56 -0
- package/chip/types.d.ts +1 -1
- package/common/variables.js +229 -336
- package/date-input/DateInput.js +56 -42
- package/date-input/DateInput.stories.tsx +7 -7
- package/date-input/DateInput.test.js +479 -0
- package/date-input/types.d.ts +16 -9
- package/dialog/Dialog.js +46 -50
- package/dialog/Dialog.stories.tsx +1 -2
- package/dialog/Dialog.test.js +70 -0
- package/dialog/types.d.ts +2 -2
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +242 -250
- package/dropdown/Dropdown.stories.tsx +126 -63
- package/dropdown/Dropdown.test.js +591 -0
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +80 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +92 -0
- package/dropdown/types.d.ts +25 -5
- package/file-input/FileInput.js +9 -6
- package/file-input/FileInput.test.js +457 -0
- package/file-input/FileItem.js +7 -5
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +57 -0
- package/flex/Flex.stories.tsx +103 -0
- package/flex/types.d.ts +21 -0
- package/{row → flex}/types.js +0 -0
- package/footer/Footer.js +15 -88
- package/footer/Footer.test.js +109 -0
- package/footer/Icons.js +1 -1
- package/footer/types.d.ts +1 -1
- package/header/Header.js +95 -114
- package/header/Header.stories.tsx +46 -36
- package/header/Header.test.js +79 -0
- package/header/Icons.js +2 -2
- package/header/types.d.ts +2 -2
- package/heading/Heading.test.js +186 -0
- package/inset/Inset.js +1 -34
- package/inset/Inset.stories.tsx +36 -36
- package/inset/types.d.ts +25 -1
- package/layout/ApplicationLayout.d.ts +16 -6
- package/layout/ApplicationLayout.js +71 -131
- package/layout/ApplicationLayout.stories.tsx +83 -93
- package/layout/Icons.d.ts +5 -0
- package/layout/Icons.js +13 -2
- package/layout/SidenavContext.d.ts +5 -0
- package/layout/SidenavContext.js +19 -0
- package/layout/types.d.ts +18 -33
- package/link/Link.d.ts +3 -2
- package/link/Link.js +57 -74
- package/link/Link.stories.tsx +95 -53
- package/link/Link.test.js +83 -0
- package/link/types.d.ts +7 -23
- package/main.d.ts +10 -15
- package/main.js +48 -82
- package/number-input/NumberInput.js +11 -18
- package/number-input/NumberInput.stories.tsx +5 -5
- package/number-input/NumberInput.test.js +506 -0
- package/number-input/types.d.ts +17 -10
- package/package.json +12 -10
- package/paginator/Paginator.js +17 -38
- package/paginator/Paginator.test.js +308 -0
- package/paragraph/Paragraph.d.ts +6 -0
- package/paragraph/Paragraph.js +38 -0
- package/paragraph/Paragraph.stories.tsx +44 -0
- package/password-input/PasswordInput.js +7 -4
- package/password-input/PasswordInput.test.js +180 -0
- package/password-input/types.d.ts +14 -11
- package/progress-bar/ProgressBar.d.ts +2 -2
- package/progress-bar/ProgressBar.js +57 -51
- package/progress-bar/ProgressBar.stories.jsx +13 -11
- package/progress-bar/ProgressBar.test.js +110 -0
- package/progress-bar/types.d.ts +3 -4
- package/quick-nav/QuickNav.d.ts +4 -0
- package/quick-nav/QuickNav.js +118 -0
- package/quick-nav/QuickNav.stories.tsx +264 -0
- package/quick-nav/types.d.ts +21 -0
- package/{stack → quick-nav}/types.js +0 -0
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +25 -24
- package/radio-group/RadioGroup.js +58 -50
- package/radio-group/RadioGroup.stories.tsx +60 -39
- package/radio-group/RadioGroup.test.js +530 -83
- package/radio-group/types.d.ts +80 -2
- package/resultsetTable/ResultsetTable.test.js +348 -0
- package/select/Icons.d.ts +10 -0
- package/select/Icons.js +93 -0
- package/select/Listbox.d.ts +4 -0
- package/select/Listbox.js +199 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +110 -0
- package/select/Select.js +145 -365
- package/select/Select.stories.tsx +231 -176
- package/select/Select.test.js +2175 -0
- package/select/types.d.ts +52 -12
- package/sidenav/Sidenav.d.ts +6 -5
- package/sidenav/Sidenav.js +184 -52
- package/sidenav/Sidenav.stories.tsx +154 -156
- package/sidenav/Sidenav.test.js +44 -0
- package/sidenav/types.d.ts +50 -27
- package/slider/Slider.d.ts +1 -1
- package/slider/Slider.js +5 -4
- package/slider/Slider.stories.tsx +8 -8
- package/slider/Slider.test.js +187 -0
- package/slider/types.d.ts +4 -0
- package/spinner/Spinner.js +1 -1
- package/spinner/Spinner.test.js +64 -0
- package/switch/Switch.d.ts +2 -2
- package/switch/Switch.js +127 -55
- package/switch/Switch.stories.tsx +20 -42
- package/switch/Switch.test.js +212 -0
- package/switch/types.d.ts +9 -6
- package/table/Table.test.js +26 -0
- package/tabs/Tabs.d.ts +1 -1
- package/tabs/Tabs.js +9 -11
- package/tabs/Tabs.stories.tsx +0 -8
- package/tabs/Tabs.test.js +140 -0
- package/tabs/types.d.ts +5 -1
- package/tabs-nav/NavTabs.d.ts +8 -0
- package/tabs-nav/NavTabs.js +125 -0
- package/tabs-nav/NavTabs.stories.tsx +170 -0
- package/tabs-nav/NavTabs.test.js +82 -0
- package/tabs-nav/Tab.d.ts +4 -0
- package/tabs-nav/Tab.js +130 -0
- package/tabs-nav/types.d.ts +53 -0
- package/tabs-nav/types.js +5 -0
- package/tag/Tag.js +14 -19
- package/tag/Tag.stories.tsx +12 -8
- package/tag/Tag.test.js +60 -0
- package/tag/types.d.ts +1 -1
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +55 -0
- package/text-input/TextInput.js +68 -101
- package/text-input/TextInput.stories.tsx +31 -14
- package/text-input/TextInput.test.js +1712 -0
- package/text-input/types.d.ts +31 -12
- package/textarea/Textarea.js +20 -27
- package/textarea/Textarea.stories.jsx +33 -12
- package/textarea/Textarea.test.js +437 -0
- package/textarea/types.d.ts +18 -11
- package/toggle-group/ToggleGroup.d.ts +1 -1
- package/toggle-group/ToggleGroup.js +5 -4
- package/toggle-group/ToggleGroup.stories.tsx +4 -4
- package/toggle-group/ToggleGroup.test.js +156 -0
- package/toggle-group/types.d.ts +9 -1
- package/typography/Typography.d.ts +4 -0
- package/typography/Typography.js +131 -0
- package/typography/Typography.stories.tsx +198 -0
- package/typography/types.d.ts +18 -0
- package/typography/types.js +5 -0
- package/useTheme.js +2 -2
- package/useTranslatedLabels.d.ts +2 -0
- package/useTranslatedLabels.js +20 -0
- package/wizard/Wizard.d.ts +1 -1
- package/wizard/Wizard.js +58 -54
- package/wizard/Wizard.stories.tsx +33 -24
- package/wizard/Wizard.test.js +141 -0
- package/wizard/types.d.ts +10 -5
- package/ThemeContext.d.ts +0 -15
- package/ThemeContext.js +0 -243
- package/V3Select/V3Select.js +0 -455
- package/V3Select/index.d.ts +0 -27
- package/V3Textarea/V3Textarea.js +0 -260
- package/V3Textarea/index.d.ts +0 -27
- package/date/Date.js +0 -373
- package/date/index.d.ts +0 -27
- package/input-text/Icons.js +0 -22
- package/input-text/InputText.js +0 -611
- package/input-text/index.d.ts +0 -36
- package/list/List.d.ts +0 -4
- package/list/List.js +0 -47
- package/list/List.stories.tsx +0 -95
- package/list/types.d.ts +0 -7
- package/radio/Radio.d.ts +0 -4
- package/radio/Radio.js +0 -174
- package/radio/Radio.stories.tsx +0 -192
- package/radio/types.d.ts +0 -54
- package/row/Row.d.ts +0 -3
- package/row/Row.js +0 -127
- package/row/Row.stories.tsx +0 -237
- package/row/types.d.ts +0 -10
- package/stack/Stack.d.ts +0 -3
- package/stack/Stack.js +0 -97
- package/stack/Stack.stories.tsx +0 -164
- package/stack/types.d.ts +0 -9
- package/text/Text.d.ts +0 -7
- package/text/Text.js +0 -30
- package/text/Text.stories.tsx +0 -19
- package/upload/Upload.js +0 -201
- package/upload/buttons-upload/ButtonsUpload.js +0 -111
- package/upload/buttons-upload/Icons.js +0 -40
- package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
- package/upload/dragAndDropArea/Icons.js +0 -39
- package/upload/file-upload/FileToUpload.js +0 -115
- package/upload/file-upload/Icons.js +0 -66
- package/upload/files-upload/FilesToUpload.js +0 -109
- package/upload/index.d.ts +0 -15
- package/upload/transaction/Icons.js +0 -160
- package/upload/transaction/Transaction.js +0 -104
- package/upload/transactions/Transactions.js +0 -94
package/wizard/Wizard.js
CHANGED
|
@@ -9,10 +9,10 @@ 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
|
|
|
14
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
+
|
|
16
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
17
|
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -82,8 +82,11 @@ var icons = {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
var DxcWizard = function DxcWizard(_ref) {
|
|
85
|
+
var _ref2;
|
|
86
|
+
|
|
85
87
|
var _ref$mode = _ref.mode,
|
|
86
88
|
mode = _ref$mode === void 0 ? "horizontal" : _ref$mode,
|
|
89
|
+
defaultCurrentStep = _ref.defaultCurrentStep,
|
|
87
90
|
currentStep = _ref.currentStep,
|
|
88
91
|
onStepClick = _ref.onStepClick,
|
|
89
92
|
steps = _ref.steps,
|
|
@@ -91,7 +94,7 @@ var DxcWizard = function DxcWizard(_ref) {
|
|
|
91
94
|
_ref$tabIndex = _ref.tabIndex,
|
|
92
95
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
93
96
|
|
|
94
|
-
var _useState = (0, _react.useState)(currentStep
|
|
97
|
+
var _useState = (0, _react.useState)((_ref2 = currentStep !== null && currentStep !== void 0 ? currentStep : defaultCurrentStep) !== null && _ref2 !== void 0 ? _ref2 : 0),
|
|
95
98
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
96
99
|
innerCurrent = _useState2[0],
|
|
97
100
|
setInnerCurrentStep = _useState2[1];
|
|
@@ -113,48 +116,49 @@ var DxcWizard = function DxcWizard(_ref) {
|
|
|
113
116
|
theme: colorsTheme.wizard
|
|
114
117
|
}, /*#__PURE__*/_react["default"].createElement(StepsContainer, {
|
|
115
118
|
mode: mode,
|
|
116
|
-
margin: margin
|
|
119
|
+
margin: margin,
|
|
120
|
+
role: "group"
|
|
117
121
|
}, steps === null || steps === void 0 ? void 0 : steps.map(function (step, i) {
|
|
118
122
|
return /*#__PURE__*/_react["default"].createElement(StepContainer, {
|
|
119
123
|
key: "step".concat(i),
|
|
120
124
|
mode: mode,
|
|
121
125
|
lastStep: i === (steps === null || steps === void 0 ? void 0 : steps.length) - 1
|
|
122
126
|
}, /*#__PURE__*/_react["default"].createElement(Step, {
|
|
123
|
-
tabIndex: tabIndex,
|
|
124
127
|
onClick: function onClick() {
|
|
125
|
-
|
|
128
|
+
handleStepClick(i);
|
|
126
129
|
},
|
|
127
|
-
mode: mode,
|
|
128
130
|
disabled: step.disabled,
|
|
131
|
+
mode: mode,
|
|
129
132
|
first: i === 0,
|
|
130
|
-
last: i === (steps === null || steps === void 0 ? void 0 : steps.length) - 1
|
|
131
|
-
|
|
133
|
+
last: i === (steps === null || steps === void 0 ? void 0 : steps.length) - 1,
|
|
134
|
+
"aria-current": renderedCurrent === i ? "step" : "false",
|
|
135
|
+
tabIndex: tabIndex
|
|
136
|
+
}, /*#__PURE__*/_react["default"].createElement(StepHeader, {
|
|
137
|
+
validityIcon: step.valid !== undefined
|
|
138
|
+
}, /*#__PURE__*/_react["default"].createElement(IconContainer, {
|
|
132
139
|
current: i === renderedCurrent,
|
|
133
140
|
visited: i < renderedCurrent,
|
|
134
141
|
disabled: step.disabled
|
|
135
|
-
}, step.icon ? typeof step.icon === "string" ? /*#__PURE__*/_react["default"].createElement(Icon, {
|
|
142
|
+
}, step.icon ? /*#__PURE__*/_react["default"].createElement(StepIconContainer, null, typeof step.icon === "string" ? /*#__PURE__*/_react["default"].createElement(Icon, {
|
|
136
143
|
src: step.icon
|
|
137
|
-
}) : /*#__PURE__*/_react["default"].createElement(
|
|
138
|
-
|
|
139
|
-
}, (0, _typeof2["default"])(step.icon) === "object" ? step.icon : /*#__PURE__*/_react["default"].createElement(step.icon)) : /*#__PURE__*/_react["default"].createElement(Number, {
|
|
140
|
-
disabled: step.disabled,
|
|
141
|
-
current: i === renderedCurrent
|
|
142
|
-
}, i + 1)), step.valid !== undefined ? step.valid ? /*#__PURE__*/_react["default"].createElement(ValidityIconContainer, null, icons.validIcon) : /*#__PURE__*/_react["default"].createElement(ValidityIconContainer, null, icons.invalidIcon) : ""), step.label || step.description ? /*#__PURE__*/_react["default"].createElement(InfoContainer, null, step.label ? /*#__PURE__*/_react["default"].createElement(Label, {
|
|
144
|
+
}) : step.icon) : /*#__PURE__*/_react["default"].createElement(Number, null, i + 1)), step.valid !== undefined && (step.valid ? /*#__PURE__*/_react["default"].createElement(ValidityIconContainer, null, icons.validIcon) : /*#__PURE__*/_react["default"].createElement(ValidityIconContainer, null, icons.invalidIcon))), (step.label || step.description) && /*#__PURE__*/_react["default"].createElement(InfoContainer, null, step.label && /*#__PURE__*/_react["default"].createElement(Label, {
|
|
145
|
+
current: i === renderedCurrent,
|
|
143
146
|
disabled: step.disabled,
|
|
144
147
|
visited: i <= innerCurrent
|
|
145
|
-
}, step.label)
|
|
148
|
+
}, step.label), step.description && /*#__PURE__*/_react["default"].createElement(Description, {
|
|
149
|
+
current: i === renderedCurrent,
|
|
146
150
|
disabled: step.disabled,
|
|
147
151
|
visited: i <= innerCurrent
|
|
148
|
-
}, step.description)
|
|
152
|
+
}, step.description))), i === steps.length - 1 ? "" : /*#__PURE__*/_react["default"].createElement(StepSeparator, {
|
|
149
153
|
mode: mode
|
|
150
154
|
}));
|
|
151
155
|
})));
|
|
152
156
|
};
|
|
153
157
|
|
|
154
|
-
var StepsContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display:
|
|
158
|
+
var StepsContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n justify-content: center;\n ", ";\n font-family: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
|
|
155
159
|
return props.mode === "vertical" ? "column" : "row";
|
|
156
160
|
}, function (props) {
|
|
157
|
-
return props.mode === "vertical"
|
|
161
|
+
return props.mode === "vertical" && "height: 500px";
|
|
158
162
|
}, function (props) {
|
|
159
163
|
return props.theme.fontFamily;
|
|
160
164
|
}, function (props) {
|
|
@@ -170,16 +174,16 @@ var StepsContainer = _styledComponents["default"].div(_templateObject || (_templ
|
|
|
170
174
|
});
|
|
171
175
|
|
|
172
176
|
var StepContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n ", "\n flex-grow: ", ";\n flex-direction: ", ";\n ", "\n"])), function (props) {
|
|
173
|
-
return props.mode
|
|
177
|
+
return props.mode !== "vertical" && "align-items: center;";
|
|
174
178
|
}, function (props) {
|
|
175
179
|
return props.lastStep ? "0" : "1";
|
|
176
180
|
}, function (props) {
|
|
177
181
|
return props.mode === "vertical" ? "column" : "row";
|
|
178
182
|
}, function (props) {
|
|
179
|
-
return props.mode === "vertical"
|
|
183
|
+
return props.mode === "vertical" && "width: fit-content;";
|
|
180
184
|
});
|
|
181
185
|
|
|
182
|
-
var Step = _styledComponents["default"].button(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
186
|
+
var Step = _styledComponents["default"].button(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border: none;\n border-radius: 0.25rem;\n background: inherit;\n margin: ", ";\n\n padding: 0px;\n ", ";\n\n &:hover {\n ", ";\n }\n &:focus {\n outline: 2px solid ", ";\n }\n"])), function (props) {
|
|
183
187
|
return props.first ? props.mode === "vertical" ? "0 0 24px 0" : "0 24px 0 0" : props.last ? props.mode === "vertical" ? "24px 0 0 0" : "0 0 0 24px" : props.mode === "vertical" ? "24px 0" : "0 24px";
|
|
184
188
|
}, function (props) {
|
|
185
189
|
return props.disabled ? "cursor: not-allowed" : "";
|
|
@@ -189,42 +193,44 @@ var Step = _styledComponents["default"].button(_templateObject3 || (_templateObj
|
|
|
189
193
|
return props.theme.focusColor;
|
|
190
194
|
});
|
|
191
195
|
|
|
192
|
-
var StepHeader = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n display: inline-flex;\n
|
|
196
|
+
var StepHeader = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n display: inline-flex;\n ", "\n"])), function (props) {
|
|
197
|
+
return props.validityIcon && "padding-bottom: 4px;";
|
|
198
|
+
});
|
|
193
199
|
|
|
194
|
-
var IconContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n\n ", "\n ", ";\n\n border-radius: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n"])), function (props) {
|
|
195
|
-
return props.disabled ? props.theme.
|
|
200
|
+
var IconContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n\n ", "\n ", ";\n\n border-radius: ", ";\n\n display: flex;\n justify-content: center;\n align-items: center;\n"])), function (props) {
|
|
201
|
+
return props.disabled ? props.theme.disabledStepWidth : props.current ? props.theme.selectedStepWidth : props.theme.stepWidth;
|
|
196
202
|
}, function (props) {
|
|
197
|
-
return props.disabled ? props.theme.
|
|
203
|
+
return props.disabled ? props.theme.disabledStepHeight : props.current ? props.theme.selectedStepHeight : props.theme.stepHeight;
|
|
198
204
|
}, function (props) {
|
|
199
|
-
return "\n ".concat(
|
|
205
|
+
return "\n ".concat(props.disabled ? "border: ".concat(props.theme.disabledStepBorderThickness, " ").concat(props.theme.disabledStepBorderStyle, " ").concat(props.theme.disabledStepBorderColor, ";") : props.current ? "border: ".concat(props.theme.selectedStepBorderThickness, " ").concat(props.theme.selectedStepBorderStyle, " ").concat(props.theme.selectedStepBorderColor, ";") : props.visited ? "border: ".concat(props.theme.stepBorderThickness, " ").concat(props.theme.stepBorderStyle, " ").concat(props.theme.visitedStepBorderColor, ";") : "border: ".concat(props.theme.stepBorderThickness, " ").concat(props.theme.stepBorderStyle, " ").concat(props.theme.unvisitedStepBorderColor, ";"), "\n background: ").concat(props.disabled ? "".concat(props.theme.disabledStepBackgroundColor) : props.current ? "".concat(props.theme.selectedStepBackgroundColor) : !props.visited ? "".concat(props.theme.unvisitedStepBackgroundColor) : "".concat(props.theme.visitedStepBackgroundColor), ";\n ");
|
|
200
206
|
}, function (props) {
|
|
201
|
-
return props.disabled ? "color: ".concat(props.theme.
|
|
207
|
+
return props.disabled ? "color: ".concat(props.theme.disabledStepFontColor, ";") : "color: ".concat(props.current ? props.theme.selectedStepFontColor : !props.visited ? props.theme.unvisitedStepFontColor : props.theme.visitedStepFontColor, ";");
|
|
202
208
|
}, function (props) {
|
|
203
|
-
return !props.current && !props.disabled ? props.theme.
|
|
209
|
+
return !props.current && !props.disabled ? props.theme.stepBorderRadius : props.current ? props.theme.selectedStepBorderRadius : props.disabled ? props.theme.disabledStepBorderRadius : "";
|
|
204
210
|
});
|
|
205
211
|
|
|
206
212
|
var Icon = _styledComponents["default"].img(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n"])), function (props) {
|
|
207
|
-
return props.theme.
|
|
213
|
+
return props.theme.stepIconSize;
|
|
208
214
|
}, function (props) {
|
|
209
|
-
return props.theme.
|
|
215
|
+
return props.theme.stepIconSize;
|
|
210
216
|
});
|
|
211
217
|
|
|
212
218
|
var StepIconContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n overflow: hidden;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
|
|
213
|
-
return props.theme.
|
|
219
|
+
return props.theme.stepIconSize;
|
|
214
220
|
}, function (props) {
|
|
215
|
-
return props.theme.
|
|
221
|
+
return props.theme.stepIconSize;
|
|
216
222
|
});
|
|
217
223
|
|
|
218
224
|
var Number = _styledComponents["default"].p(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n opacity: 1;\n margin: 0px 0px 0px 1px;\n"])), function (props) {
|
|
219
|
-
return props.theme.
|
|
225
|
+
return props.theme.stepFontSize;
|
|
220
226
|
}, function (props) {
|
|
221
|
-
return props.theme.
|
|
227
|
+
return props.theme.stepFontFamily;
|
|
222
228
|
}, function (props) {
|
|
223
|
-
return props.theme.
|
|
229
|
+
return props.theme.stepFontStyle;
|
|
224
230
|
}, function (props) {
|
|
225
|
-
return props.theme.
|
|
231
|
+
return props.theme.stepFontWeight;
|
|
226
232
|
}, function (props) {
|
|
227
|
-
return props.theme.
|
|
233
|
+
return props.theme.stepFontTracking;
|
|
228
234
|
});
|
|
229
235
|
|
|
230
236
|
var ValidityIconContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n width: 18px;\n height: 18px;\n position: absolute;\n top: 22.5px;\n left: 22.5px;\n"])));
|
|
@@ -242,37 +248,35 @@ var Label = _styledComponents["default"].p(_templateObject11 || (_templateObject
|
|
|
242
248
|
}, function (props) {
|
|
243
249
|
return props.theme.labelFontWeight;
|
|
244
250
|
}, function (props) {
|
|
245
|
-
return props.theme.
|
|
251
|
+
return props.theme.labelFontTracking;
|
|
246
252
|
}, function (props) {
|
|
247
|
-
return props.disabled ? "color: ".concat(props.theme.
|
|
253
|
+
return props.disabled ? "color: ".concat(props.theme.disabledLabelFontColor, ";") : "color: ".concat(!props.visited ? props.theme.unvisitedLabelFontColor : props.current ? props.theme.selectedLabelFontColor : props.theme.visitedLabelFontColor, ";");
|
|
248
254
|
}, function (props) {
|
|
249
255
|
return props.theme.labelFontTextTransform;
|
|
250
256
|
});
|
|
251
257
|
|
|
252
258
|
var Description = _styledComponents["default"].p(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n text-align: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n ", ";\n margin: 0;\n"])), function (props) {
|
|
253
|
-
return props.theme.
|
|
259
|
+
return props.theme.helperTextTextAlign;
|
|
254
260
|
}, function (props) {
|
|
255
|
-
return props.theme.
|
|
261
|
+
return props.theme.helperTextFontFamily;
|
|
256
262
|
}, function (props) {
|
|
257
|
-
return props.theme.
|
|
263
|
+
return props.theme.helperTextFontSize;
|
|
258
264
|
}, function (props) {
|
|
259
|
-
return props.theme.
|
|
265
|
+
return props.theme.helperTextFontStyle;
|
|
260
266
|
}, function (props) {
|
|
261
|
-
return props.theme.
|
|
267
|
+
return props.theme.helperTextFontWeight;
|
|
262
268
|
}, function (props) {
|
|
263
|
-
return props.theme.
|
|
269
|
+
return props.theme.helperTextFontTracking;
|
|
264
270
|
}, function (props) {
|
|
265
|
-
return props.theme.
|
|
271
|
+
return props.theme.helperTextFontTextTransform;
|
|
266
272
|
}, function (props) {
|
|
267
|
-
return props.disabled ? "color: ".concat(props.theme.
|
|
273
|
+
return props.disabled ? "color: ".concat(props.theme.disabledHelperTextFontColor, ";") : "color: ".concat(!props.visited ? props.theme.unvisitedHelperTextFontColor : props.current ? props.theme.selectedHelperTextFontColor : props.theme.visitedHelperTextFontColor, ";");
|
|
268
274
|
});
|
|
269
275
|
|
|
270
|
-
var StepSeparator = _styledComponents["default"].div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
271
|
-
return props.mode === "horizontal" ? "" : "0";
|
|
272
|
-
}, function (props) {
|
|
273
|
-
return props.mode === "horizontal" ? "0" : "";
|
|
276
|
+
var StepSeparator = _styledComponents["default"].div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n ", ";\n ", "\n border: ", ";\n opacity: 1;\n flex-grow: 1;\n"])), function (props) {
|
|
277
|
+
return props.mode === "horizontal" ? "height: 0;" : "width: 0;";
|
|
274
278
|
}, function (props) {
|
|
275
|
-
return props.mode === "vertical"
|
|
279
|
+
return props.mode === "vertical" && "margin: 0 18px;";
|
|
276
280
|
}, function (props) {
|
|
277
281
|
return "".concat(props.theme.separatorBorderStyle, " ").concat(props.theme.separatorBorderThickness, " ").concat(props.theme.separatorColor);
|
|
278
282
|
});
|
|
@@ -9,23 +9,18 @@ export default {
|
|
|
9
9
|
component: DxcWizard,
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const favoriteSVG = (
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<path d="M0 0h24v24H0z" fill="none" />
|
|
25
|
-
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
|
|
26
|
-
</svg>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
12
|
+
const favoriteSVG = (
|
|
13
|
+
<svg viewBox="0 0 24 24" fill="currentColor">
|
|
14
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
15
|
+
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" />
|
|
16
|
+
</svg>
|
|
17
|
+
);
|
|
18
|
+
const largeIcon = (
|
|
19
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="currentColor">
|
|
20
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
21
|
+
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
|
|
22
|
+
</svg>
|
|
23
|
+
);
|
|
29
24
|
|
|
30
25
|
const stepWithLabel = [
|
|
31
26
|
{
|
|
@@ -41,7 +36,6 @@ const stepWithLabel = [
|
|
|
41
36
|
label: "Forth step",
|
|
42
37
|
},
|
|
43
38
|
];
|
|
44
|
-
|
|
45
39
|
const stepWithLabelDescription = [
|
|
46
40
|
{
|
|
47
41
|
label: "First step",
|
|
@@ -62,7 +56,6 @@ const stepWithLabelDescription = [
|
|
|
62
56
|
valid: false,
|
|
63
57
|
},
|
|
64
58
|
];
|
|
65
|
-
|
|
66
59
|
const stepWithLongDescription = [
|
|
67
60
|
{
|
|
68
61
|
label: "First step",
|
|
@@ -80,7 +73,6 @@ const stepWithLongDescription = [
|
|
|
80
73
|
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ",
|
|
81
74
|
},
|
|
82
75
|
];
|
|
83
|
-
|
|
84
76
|
const stepDisabled = [
|
|
85
77
|
{
|
|
86
78
|
label: "First step",
|
|
@@ -106,7 +98,6 @@ const stepDisabled = [
|
|
|
106
98
|
disabled: true,
|
|
107
99
|
},
|
|
108
100
|
];
|
|
109
|
-
|
|
110
101
|
const stepIcons = [
|
|
111
102
|
{
|
|
112
103
|
label: "First step",
|
|
@@ -121,7 +112,6 @@ const stepIcons = [
|
|
|
121
112
|
icon: favoriteSVG,
|
|
122
113
|
},
|
|
123
114
|
];
|
|
124
|
-
|
|
125
115
|
const stepLargeIcons = [
|
|
126
116
|
{
|
|
127
117
|
label: "First step",
|
|
@@ -141,15 +131,29 @@ export const Chromatic = () => (
|
|
|
141
131
|
<>
|
|
142
132
|
<ExampleContainer>
|
|
143
133
|
<Title title="Current step in the third step, labels and description" theme="light" level={4} />
|
|
144
|
-
<DxcWizard
|
|
134
|
+
<DxcWizard defaultCurrentStep={2} steps={stepWithLabelDescription}></DxcWizard>
|
|
135
|
+
</ExampleContainer>
|
|
136
|
+
<ExampleContainer>
|
|
145
137
|
<Title title="With long description in horizontal" theme="light" level={4} />
|
|
146
138
|
<DxcWizard steps={stepWithLongDescription}></DxcWizard>
|
|
139
|
+
</ExampleContainer>
|
|
140
|
+
<ExampleContainer>
|
|
147
141
|
<Title title="With long description in vertical" theme="light" level={4} />
|
|
148
142
|
<DxcWizard mode="vertical" steps={stepWithLongDescription}></DxcWizard>
|
|
143
|
+
</ExampleContainer>
|
|
144
|
+
<ExampleContainer>
|
|
149
145
|
<Title title="Disabled steps" theme="light" level={4} />
|
|
150
146
|
<DxcWizard steps={stepDisabled}></DxcWizard>
|
|
147
|
+
</ExampleContainer>
|
|
148
|
+
<ExampleContainer pseudoState="pseudo-focus">
|
|
149
|
+
<Title title="Focused steps" theme="light" level={4} />
|
|
150
|
+
<DxcWizard steps={stepIcons}></DxcWizard>
|
|
151
|
+
</ExampleContainer>
|
|
152
|
+
<ExampleContainer>
|
|
151
153
|
<Title title="With icons" theme="light" level={4} />
|
|
152
154
|
<DxcWizard steps={stepIcons}></DxcWizard>
|
|
155
|
+
</ExampleContainer>
|
|
156
|
+
<ExampleContainer>
|
|
153
157
|
<Title title="With large icons" theme="light" level={4} />
|
|
154
158
|
<DxcWizard steps={stepLargeIcons}></DxcWizard>
|
|
155
159
|
</ExampleContainer>
|
|
@@ -214,7 +218,12 @@ export const Chromatic = () => (
|
|
|
214
218
|
</>
|
|
215
219
|
);
|
|
216
220
|
|
|
217
|
-
const WizardSelected = () =>
|
|
221
|
+
const WizardSelected = () => (
|
|
222
|
+
<ExampleContainer>
|
|
223
|
+
<Title title="Clicked step" theme="light" level={4} />
|
|
224
|
+
<DxcWizard steps={stepWithLabel} mode="vertical"></DxcWizard>
|
|
225
|
+
</ExampleContainer>
|
|
226
|
+
);
|
|
218
227
|
|
|
219
228
|
export const WizardStepActived = WizardSelected.bind({});
|
|
220
229
|
WizardStepActived.play = async ({ canvasElement }) => {
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@testing-library/react");
|
|
8
|
+
|
|
9
|
+
var _Wizard = _interopRequireDefault(require("./Wizard"));
|
|
10
|
+
|
|
11
|
+
describe("Wizard components tests", function () {
|
|
12
|
+
test("Wizard renders with correct steps", function () {
|
|
13
|
+
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Wizard["default"], {
|
|
14
|
+
steps: [{
|
|
15
|
+
label: "first-step"
|
|
16
|
+
}, {
|
|
17
|
+
label: "second-step"
|
|
18
|
+
}]
|
|
19
|
+
})),
|
|
20
|
+
getByText = _render.getByText,
|
|
21
|
+
getAllByRole = _render.getAllByRole;
|
|
22
|
+
|
|
23
|
+
var steps = getAllByRole("button");
|
|
24
|
+
expect(getByText("first-step")).toBeTruthy();
|
|
25
|
+
expect(getByText("second-step")).toBeTruthy();
|
|
26
|
+
expect(steps[0].getAttribute("aria-current")).toBe("step");
|
|
27
|
+
expect(steps[1].getAttribute("aria-current")).toBe("false");
|
|
28
|
+
});
|
|
29
|
+
test("Wizard renders with initially selected step", function () {
|
|
30
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Wizard["default"], {
|
|
31
|
+
defaultCurrentStep: 1,
|
|
32
|
+
steps: [{
|
|
33
|
+
label: "first-step"
|
|
34
|
+
}, {
|
|
35
|
+
label: "second-step"
|
|
36
|
+
}]
|
|
37
|
+
})),
|
|
38
|
+
getAllByRole = _render2.getAllByRole;
|
|
39
|
+
|
|
40
|
+
var steps = getAllByRole("button");
|
|
41
|
+
expect(steps[1].getAttribute("aria-current")).toBe("step");
|
|
42
|
+
});
|
|
43
|
+
test("Click on step text", function () {
|
|
44
|
+
var onClick = jest.fn();
|
|
45
|
+
|
|
46
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Wizard["default"], {
|
|
47
|
+
onStepClick: onClick,
|
|
48
|
+
steps: [{
|
|
49
|
+
label: "first-step"
|
|
50
|
+
}]
|
|
51
|
+
})),
|
|
52
|
+
getByText = _render3.getByText;
|
|
53
|
+
|
|
54
|
+
var step = getByText("first-step");
|
|
55
|
+
|
|
56
|
+
_react2.fireEvent.click(step);
|
|
57
|
+
|
|
58
|
+
expect(onClick).toHaveBeenCalled();
|
|
59
|
+
});
|
|
60
|
+
test("Click on step description", function () {
|
|
61
|
+
var onClick = jest.fn();
|
|
62
|
+
|
|
63
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Wizard["default"], {
|
|
64
|
+
onStepClick: onClick,
|
|
65
|
+
steps: [{
|
|
66
|
+
label: "first-step",
|
|
67
|
+
description: "step-description"
|
|
68
|
+
}]
|
|
69
|
+
})),
|
|
70
|
+
getByText = _render4.getByText;
|
|
71
|
+
|
|
72
|
+
var step = getByText("step-description");
|
|
73
|
+
|
|
74
|
+
_react2.fireEvent.click(step);
|
|
75
|
+
|
|
76
|
+
expect(onClick).toHaveBeenCalled();
|
|
77
|
+
});
|
|
78
|
+
test("Click on step number", function () {
|
|
79
|
+
var onClick = jest.fn();
|
|
80
|
+
|
|
81
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Wizard["default"], {
|
|
82
|
+
onStepClick: onClick,
|
|
83
|
+
steps: [{
|
|
84
|
+
label: "first-step"
|
|
85
|
+
}]
|
|
86
|
+
})),
|
|
87
|
+
getByText = _render5.getByText;
|
|
88
|
+
|
|
89
|
+
var step = getByText("1");
|
|
90
|
+
|
|
91
|
+
_react2.fireEvent.click(step);
|
|
92
|
+
|
|
93
|
+
expect(onClick).toHaveBeenCalled();
|
|
94
|
+
});
|
|
95
|
+
test("Click on disable step", function () {
|
|
96
|
+
var onClick = jest.fn();
|
|
97
|
+
|
|
98
|
+
var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Wizard["default"], {
|
|
99
|
+
onStepClick: onClick,
|
|
100
|
+
steps: [{
|
|
101
|
+
label: "first-step"
|
|
102
|
+
}, {
|
|
103
|
+
label: "second-step",
|
|
104
|
+
disabled: true
|
|
105
|
+
}]
|
|
106
|
+
})),
|
|
107
|
+
getByText = _render6.getByText;
|
|
108
|
+
|
|
109
|
+
var step = getByText("second-step");
|
|
110
|
+
|
|
111
|
+
_react2.fireEvent.click(step);
|
|
112
|
+
|
|
113
|
+
expect(onClick).toHaveBeenCalledTimes(0);
|
|
114
|
+
});
|
|
115
|
+
test("Controlled wizard function is called", function () {
|
|
116
|
+
var onClick = jest.fn(function (i) {
|
|
117
|
+
return i;
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Wizard["default"], {
|
|
121
|
+
currentStep: 0,
|
|
122
|
+
onStepClick: onClick,
|
|
123
|
+
steps: [{
|
|
124
|
+
label: "first-step"
|
|
125
|
+
}, {
|
|
126
|
+
label: "second-step"
|
|
127
|
+
}]
|
|
128
|
+
})),
|
|
129
|
+
getAllByRole = _render7.getAllByRole;
|
|
130
|
+
|
|
131
|
+
var steps = getAllByRole("button");
|
|
132
|
+
|
|
133
|
+
_react2.fireEvent.click(steps[1]);
|
|
134
|
+
|
|
135
|
+
_react2.fireEvent.click(steps[0]);
|
|
136
|
+
|
|
137
|
+
expect(onClick).toHaveBeenCalledTimes(2);
|
|
138
|
+
expect(onClick).toHaveBeenNthCalledWith(1, 1);
|
|
139
|
+
expect(onClick).toHaveBeenNthCalledWith(2, 0);
|
|
140
|
+
});
|
|
141
|
+
});
|
package/wizard/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
-
declare type Margin = {
|
|
2
|
+
export declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
export declare type Margin = {
|
|
4
4
|
top?: Space;
|
|
5
5
|
bottom?: Space;
|
|
6
6
|
left?: Space;
|
|
7
7
|
right?: Space;
|
|
8
8
|
};
|
|
9
|
-
declare type SVG = React.
|
|
9
|
+
declare type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
|
|
10
10
|
declare type Step = {
|
|
11
11
|
/**
|
|
12
12
|
* Step label.
|
|
@@ -29,13 +29,18 @@ declare type Step = {
|
|
|
29
29
|
*/
|
|
30
30
|
valid?: boolean;
|
|
31
31
|
};
|
|
32
|
+
export declare type Mode = "horizontal" | "vertical";
|
|
32
33
|
declare type Props = {
|
|
33
34
|
/**
|
|
34
35
|
* The wizard can be showed in horizontal or vertical.
|
|
35
36
|
*/
|
|
36
|
-
mode?:
|
|
37
|
+
mode?: Mode;
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
+
* Initially selected step, only when it is uncontrolled.
|
|
40
|
+
*/
|
|
41
|
+
defaultCurrentStep?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Defines which step is marked as the current. The numeration starts at 0.
|
|
39
44
|
*/
|
|
40
45
|
currentStep?: number;
|
|
41
46
|
/**
|
package/ThemeContext.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare const ThemeContext: React.Context<object>;
|
|
3
|
-
declare type ThemeProviderCommonProps = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
declare type ThemeProviderDefaultTheme = ThemeProviderCommonProps & {
|
|
7
|
-
theme: object;
|
|
8
|
-
};
|
|
9
|
-
declare type ThemeProviderAdvancedTheme = ThemeProviderCommonProps & {
|
|
10
|
-
advancedTheme: object;
|
|
11
|
-
};
|
|
12
|
-
declare type ThemeProviderPropsType = ThemeProviderDefaultTheme | ThemeProviderAdvancedTheme;
|
|
13
|
-
declare const ThemeProvider: (props: ThemeProviderPropsType) => JSX.Element;
|
|
14
|
-
export default ThemeContext;
|
|
15
|
-
export { ThemeProvider };
|