@dxc-technology/halstack-react 0.0.0-a7970fd → 0.0.0-a7fec42
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 +4 -2
- package/HalstackContext.js +110 -58
- package/accordion/Accordion.js +122 -103
- package/accordion/Accordion.stories.tsx +2 -3
- package/accordion/Accordion.test.js +9 -10
- package/accordion/types.d.ts +5 -4
- package/accordion-group/AccordionGroup.js +2 -21
- package/accordion-group/AccordionGroup.stories.tsx +27 -1
- package/accordion-group/AccordionGroup.test.js +20 -45
- package/accordion-group/types.d.ts +10 -3
- package/alert/Alert.js +5 -2
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +5 -3
- package/badge/types.d.ts +1 -0
- package/bleed/Bleed.js +1 -34
- package/bleed/Bleed.stories.tsx +94 -95
- package/bleed/types.d.ts +1 -1
- package/box/Box.js +23 -33
- package/box/types.d.ts +1 -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/{list → bulleted-list}/types.js +0 -0
- package/button/Button.js +43 -61
- package/button/Button.stories.tsx +9 -0
- package/button/types.d.ts +7 -7
- package/card/Card.js +34 -36
- package/card/types.d.ts +1 -0
- package/checkbox/Checkbox.js +90 -95
- package/checkbox/Checkbox.test.js +93 -16
- package/checkbox/types.d.ts +2 -2
- package/chip/types.d.ts +1 -1
- package/common/variables.js +232 -96
- package/date-input/DateInput.js +8 -5
- package/dialog/Dialog.js +52 -28
- package/dialog/Dialog.stories.tsx +57 -2
- package/dialog/Dialog.test.js +34 -4
- package/dialog/types.d.ts +3 -2
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +244 -247
- package/dropdown/Dropdown.stories.tsx +126 -63
- package/dropdown/Dropdown.test.js +509 -108
- 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/FileItem.js +7 -5
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +69 -0
- package/flex/Flex.stories.tsx +103 -0
- package/flex/types.d.ts +32 -0
- package/{quick-nav-container → flex}/types.js +0 -0
- package/footer/Footer.js +7 -5
- package/footer/Footer.stories.tsx +8 -1
- package/footer/Icons.js +1 -1
- package/footer/types.d.ts +2 -1
- package/header/Header.js +80 -75
- package/header/Header.stories.tsx +4 -4
- package/header/Icons.js +2 -2
- package/header/types.d.ts +3 -2
- package/inset/Inset.js +1 -34
- package/inset/Inset.stories.tsx +36 -36
- package/inset/types.d.ts +1 -1
- package/layout/ApplicationLayout.d.ts +16 -6
- package/layout/ApplicationLayout.js +70 -117
- package/layout/ApplicationLayout.stories.tsx +84 -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 -70
- package/link/Link.stories.tsx +95 -53
- package/link/Link.test.js +7 -15
- package/link/types.d.ts +7 -23
- package/main.d.ts +8 -11
- package/main.js +40 -58
- package/number-input/NumberInput.test.js +1 -1
- package/number-input/types.d.ts +1 -1
- package/package.json +10 -9
- package/paginator/Paginator.js +17 -38
- package/paginator/Paginator.test.js +42 -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 +11 -6
- package/password-input/PasswordInput.test.js +14 -14
- package/password-input/types.d.ts +1 -1
- 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 +67 -22
- package/progress-bar/types.d.ts +3 -4
- package/quick-nav/QuickNav.js +75 -22
- package/quick-nav/QuickNav.stories.tsx +131 -26
- package/quick-nav/types.d.ts +1 -1
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +43 -28
- package/radio-group/RadioGroup.js +30 -27
- package/radio-group/RadioGroup.stories.tsx +1 -0
- package/radio-group/RadioGroup.test.js +123 -96
- package/radio-group/types.d.ts +2 -2
- package/resultsetTable/ResultsetTable.test.js +42 -0
- package/select/Listbox.d.ts +1 -1
- package/select/Listbox.js +58 -8
- package/select/Select.js +80 -90
- package/select/Select.stories.tsx +145 -100
- package/select/Select.test.js +425 -249
- package/select/types.d.ts +2 -5
- 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 +25 -37
- package/sidenav/types.d.ts +50 -27
- package/slider/Slider.js +116 -92
- package/slider/Slider.stories.tsx +7 -1
- package/slider/Slider.test.js +121 -21
- package/slider/types.d.ts +2 -2
- package/spinner/Spinner.js +1 -1
- package/switch/Switch.d.ts +1 -1
- package/switch/Switch.js +135 -66
- package/switch/Switch.stories.tsx +8 -30
- package/switch/Switch.test.js +144 -17
- package/switch/types.d.ts +3 -4
- package/table/Table.js +1 -1
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +135 -0
- package/tabs/Tabs.js +360 -104
- package/tabs/Tabs.stories.tsx +74 -0
- package/tabs/Tabs.test.js +217 -6
- package/tabs/types.d.ts +15 -5
- 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/{radio → tabs-nav}/types.js +0 -0
- package/tag/Tag.js +1 -1
- package/tag/types.d.ts +1 -1
- package/text-input/Icons.d.ts +8 -0
- package/text-input/Icons.js +60 -0
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +57 -0
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +134 -0
- package/text-input/TextInput.js +206 -329
- package/text-input/TextInput.stories.tsx +189 -182
- package/text-input/TextInput.test.js +166 -164
- package/text-input/types.d.ts +35 -4
- package/textarea/Textarea.js +10 -19
- package/textarea/types.d.ts +1 -1
- package/toggle-group/types.d.ts +1 -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/{row → typography}/types.js +0 -0
- package/useTranslatedLabels.d.ts +2 -0
- package/useTranslatedLabels.js +20 -0
- package/wizard/Wizard.js +36 -41
- package/wizard/Wizard.stories.tsx +20 -1
- package/wizard/types.d.ts +5 -4
- 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/quick-nav-container/HeadingLink.d.ts +0 -8
- package/quick-nav-container/HeadingLink.js +0 -58
- package/quick-nav-container/QuickNavContainer.d.ts +0 -4
- package/quick-nav-container/QuickNavContainer.js +0 -69
- package/quick-nav-container/Section.d.ts +0 -9
- package/quick-nav-container/Section.js +0 -37
- package/quick-nav-container/types.d.ts +0 -34
- package/radio/Radio.d.ts +0 -4
- package/radio/Radio.js +0 -173
- package/radio/Radio.stories.tsx +0 -192
- package/radio/Radio.test.js +0 -71
- 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 -28
- 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 -24
- package/stack/types.js +0 -5
- package/text/Text.d.ts +0 -7
- package/text/Text.js +0 -30
- package/text/Text.stories.tsx +0 -19
package/wizard/Wizard.js
CHANGED
|
@@ -139,17 +139,14 @@ var DxcWizard = function DxcWizard(_ref) {
|
|
|
139
139
|
current: i === renderedCurrent,
|
|
140
140
|
visited: i < renderedCurrent,
|
|
141
141
|
disabled: step.disabled
|
|
142
|
-
}, step.icon ? /*#__PURE__*/_react["default"].createElement(StepIconContainer, {
|
|
143
|
-
disabled: step.disabled
|
|
144
|
-
}, 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, {
|
|
145
143
|
src: step.icon
|
|
146
|
-
}) : step.icon) : /*#__PURE__*/_react["default"].createElement(Number, {
|
|
147
|
-
|
|
148
|
-
current: i === renderedCurrent
|
|
149
|
-
}, 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,
|
|
150
146
|
disabled: step.disabled,
|
|
151
147
|
visited: i <= innerCurrent
|
|
152
148
|
}, step.label), step.description && /*#__PURE__*/_react["default"].createElement(Description, {
|
|
149
|
+
current: i === renderedCurrent,
|
|
153
150
|
disabled: step.disabled,
|
|
154
151
|
visited: i <= innerCurrent
|
|
155
152
|
}, step.description))), i === steps.length - 1 ? "" : /*#__PURE__*/_react["default"].createElement(StepSeparator, {
|
|
@@ -158,7 +155,7 @@ var DxcWizard = function DxcWizard(_ref) {
|
|
|
158
155
|
})));
|
|
159
156
|
};
|
|
160
157
|
|
|
161
|
-
var StepsContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n justify-content:
|
|
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) {
|
|
162
159
|
return props.mode === "vertical" ? "column" : "row";
|
|
163
160
|
}, function (props) {
|
|
164
161
|
return props.mode === "vertical" && "height: 500px";
|
|
@@ -177,16 +174,16 @@ var StepsContainer = _styledComponents["default"].div(_templateObject || (_templ
|
|
|
177
174
|
});
|
|
178
175
|
|
|
179
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) {
|
|
180
|
-
return props.mode
|
|
177
|
+
return props.mode !== "vertical" && "align-items: center;";
|
|
181
178
|
}, function (props) {
|
|
182
179
|
return props.lastStep ? "0" : "1";
|
|
183
180
|
}, function (props) {
|
|
184
181
|
return props.mode === "vertical" ? "column" : "row";
|
|
185
182
|
}, function (props) {
|
|
186
|
-
return props.mode === "vertical"
|
|
183
|
+
return props.mode === "vertical" && "width: fit-content;";
|
|
187
184
|
});
|
|
188
185
|
|
|
189
|
-
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) {
|
|
190
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";
|
|
191
188
|
}, function (props) {
|
|
192
189
|
return props.disabled ? "cursor: not-allowed" : "";
|
|
@@ -200,40 +197,40 @@ var StepHeader = _styledComponents["default"].div(_templateObject4 || (_template
|
|
|
200
197
|
return props.validityIcon && "padding-bottom: 4px;";
|
|
201
198
|
});
|
|
202
199
|
|
|
203
|
-
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) {
|
|
204
|
-
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;
|
|
205
202
|
}, function (props) {
|
|
206
|
-
return props.disabled ? props.theme.
|
|
203
|
+
return props.disabled ? props.theme.disabledStepHeight : props.current ? props.theme.selectedStepHeight : props.theme.stepHeight;
|
|
207
204
|
}, function (props) {
|
|
208
|
-
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 ");
|
|
209
206
|
}, function (props) {
|
|
210
|
-
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, ";");
|
|
211
208
|
}, function (props) {
|
|
212
|
-
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 : "";
|
|
213
210
|
});
|
|
214
211
|
|
|
215
212
|
var Icon = _styledComponents["default"].img(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n"])), function (props) {
|
|
216
|
-
return props.theme.
|
|
213
|
+
return props.theme.stepIconSize;
|
|
217
214
|
}, function (props) {
|
|
218
|
-
return props.theme.
|
|
215
|
+
return props.theme.stepIconSize;
|
|
219
216
|
});
|
|
220
217
|
|
|
221
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) {
|
|
222
|
-
return props.theme.
|
|
219
|
+
return props.theme.stepIconSize;
|
|
223
220
|
}, function (props) {
|
|
224
|
-
return props.theme.
|
|
221
|
+
return props.theme.stepIconSize;
|
|
225
222
|
});
|
|
226
223
|
|
|
227
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) {
|
|
228
|
-
return props.theme.
|
|
225
|
+
return props.theme.stepFontSize;
|
|
229
226
|
}, function (props) {
|
|
230
|
-
return props.theme.
|
|
227
|
+
return props.theme.stepFontFamily;
|
|
231
228
|
}, function (props) {
|
|
232
|
-
return props.theme.
|
|
229
|
+
return props.theme.stepFontStyle;
|
|
233
230
|
}, function (props) {
|
|
234
|
-
return props.theme.
|
|
231
|
+
return props.theme.stepFontWeight;
|
|
235
232
|
}, function (props) {
|
|
236
|
-
return props.theme.
|
|
233
|
+
return props.theme.stepFontTracking;
|
|
237
234
|
});
|
|
238
235
|
|
|
239
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"])));
|
|
@@ -251,37 +248,35 @@ var Label = _styledComponents["default"].p(_templateObject11 || (_templateObject
|
|
|
251
248
|
}, function (props) {
|
|
252
249
|
return props.theme.labelFontWeight;
|
|
253
250
|
}, function (props) {
|
|
254
|
-
return props.theme.
|
|
251
|
+
return props.theme.labelFontTracking;
|
|
255
252
|
}, function (props) {
|
|
256
|
-
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, ";");
|
|
257
254
|
}, function (props) {
|
|
258
255
|
return props.theme.labelFontTextTransform;
|
|
259
256
|
});
|
|
260
257
|
|
|
261
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) {
|
|
262
|
-
return props.theme.
|
|
259
|
+
return props.theme.helperTextTextAlign;
|
|
263
260
|
}, function (props) {
|
|
264
|
-
return props.theme.
|
|
261
|
+
return props.theme.helperTextFontFamily;
|
|
265
262
|
}, function (props) {
|
|
266
|
-
return props.theme.
|
|
263
|
+
return props.theme.helperTextFontSize;
|
|
267
264
|
}, function (props) {
|
|
268
|
-
return props.theme.
|
|
265
|
+
return props.theme.helperTextFontStyle;
|
|
269
266
|
}, function (props) {
|
|
270
|
-
return props.theme.
|
|
267
|
+
return props.theme.helperTextFontWeight;
|
|
271
268
|
}, function (props) {
|
|
272
|
-
return props.theme.
|
|
269
|
+
return props.theme.helperTextFontTracking;
|
|
273
270
|
}, function (props) {
|
|
274
|
-
return props.theme.
|
|
271
|
+
return props.theme.helperTextFontTextTransform;
|
|
275
272
|
}, function (props) {
|
|
276
|
-
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, ";");
|
|
277
274
|
});
|
|
278
275
|
|
|
279
|
-
var StepSeparator = _styledComponents["default"].div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
280
|
-
return props.mode === "horizontal" ? "" : "0";
|
|
281
|
-
}, function (props) {
|
|
282
|
-
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;";
|
|
283
278
|
}, function (props) {
|
|
284
|
-
return props.mode === "vertical"
|
|
279
|
+
return props.mode === "vertical" && "margin: 0 18px;";
|
|
285
280
|
}, function (props) {
|
|
286
281
|
return "".concat(props.theme.separatorBorderStyle, " ").concat(props.theme.separatorBorderThickness, " ").concat(props.theme.separatorColor);
|
|
287
282
|
});
|
|
@@ -132,14 +132,28 @@ export const Chromatic = () => (
|
|
|
132
132
|
<ExampleContainer>
|
|
133
133
|
<Title title="Current step in the third step, labels and description" theme="light" level={4} />
|
|
134
134
|
<DxcWizard defaultCurrentStep={2} steps={stepWithLabelDescription}></DxcWizard>
|
|
135
|
+
</ExampleContainer>
|
|
136
|
+
<ExampleContainer>
|
|
135
137
|
<Title title="With long description in horizontal" theme="light" level={4} />
|
|
136
138
|
<DxcWizard steps={stepWithLongDescription}></DxcWizard>
|
|
139
|
+
</ExampleContainer>
|
|
140
|
+
<ExampleContainer>
|
|
137
141
|
<Title title="With long description in vertical" theme="light" level={4} />
|
|
138
142
|
<DxcWizard mode="vertical" steps={stepWithLongDescription}></DxcWizard>
|
|
143
|
+
</ExampleContainer>
|
|
144
|
+
<ExampleContainer>
|
|
139
145
|
<Title title="Disabled steps" theme="light" level={4} />
|
|
140
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>
|
|
141
153
|
<Title title="With icons" theme="light" level={4} />
|
|
142
154
|
<DxcWizard steps={stepIcons}></DxcWizard>
|
|
155
|
+
</ExampleContainer>
|
|
156
|
+
<ExampleContainer>
|
|
143
157
|
<Title title="With large icons" theme="light" level={4} />
|
|
144
158
|
<DxcWizard steps={stepLargeIcons}></DxcWizard>
|
|
145
159
|
</ExampleContainer>
|
|
@@ -204,7 +218,12 @@ export const Chromatic = () => (
|
|
|
204
218
|
</>
|
|
205
219
|
);
|
|
206
220
|
|
|
207
|
-
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
|
+
);
|
|
208
227
|
|
|
209
228
|
export const WizardStepActived = WizardSelected.bind({});
|
|
210
229
|
WizardStepActived.play = async ({ canvasElement }) => {
|
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.SVGProps<SVGSVGElement>;
|
|
9
|
+
declare type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
|
|
10
10
|
declare type Step = {
|
|
11
11
|
/**
|
|
12
12
|
* Step label.
|
|
@@ -29,11 +29,12 @@ 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.
|
|
39
40
|
*/
|
package/list/List.d.ts
DELETED
package/list/List.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
|
-
var _Stack = _interopRequireDefault(require("../stack/Stack"));
|
|
17
|
-
|
|
18
|
-
var _Text = _interopRequireDefault(require("../text/Text"));
|
|
19
|
-
|
|
20
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
21
|
-
|
|
22
|
-
function List(_ref) {
|
|
23
|
-
var children = _ref.children,
|
|
24
|
-
_ref$type = _ref.type,
|
|
25
|
-
type = _ref$type === void 0 ? "disc" : _ref$type,
|
|
26
|
-
_ref$gutter = _ref.gutter,
|
|
27
|
-
gutter = _ref$gutter === void 0 ? "xxsmall" : _ref$gutter;
|
|
28
|
-
return /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
29
|
-
as: type === "number" ? "ol" : "ul",
|
|
30
|
-
gutter: gutter
|
|
31
|
-
}, _react["default"].Children.map(children, function (child, index) {
|
|
32
|
-
return /*#__PURE__*/_react["default"].createElement(ListItem, null, type === "number" ? /*#__PURE__*/_react["default"].createElement(Number, null, /*#__PURE__*/_react["default"].createElement(_Text["default"], null, index + 1, ".")) : type === "square" ? /*#__PURE__*/_react["default"].createElement(Square, null) : type === "circle" ? /*#__PURE__*/_react["default"].createElement(Circle, null) : /*#__PURE__*/_react["default"].createElement(Disc, null), child);
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
var Number = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n user-select: none;\n margin-right: 10px;\n flex-shrink: 0;\n"])));
|
|
37
|
-
|
|
38
|
-
var Square = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n background-color: black;\n width: 5px;\n height: 5px;\n flex-shrink: 0;\n margin-top: 10px;\n margin-right: 10px;\n"])));
|
|
39
|
-
|
|
40
|
-
var Circle = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n width: 5px;\n height: 5px;\n border-radius: 50%;\n border: 1px solid black;\n flex-shrink: 0;\n margin-top: 10px;\n margin-right: 10px;\n box-sizing: border-box;\n"])));
|
|
41
|
-
|
|
42
|
-
var Disc = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n background-color: black;\n width: 5px;\n height: 5px;\n border-radius: 50%;\n flex-shrink: 0;\n margin-top: 10px;\n margin-right: 10px;\n"])));
|
|
43
|
-
|
|
44
|
-
var ListItem = _styledComponents["default"].li(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0px;\n padding: 0px;\n list-style: none;\n display: flex;\n"])));
|
|
45
|
-
|
|
46
|
-
var _default = List;
|
|
47
|
-
exports["default"] = _default;
|
package/list/List.stories.tsx
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import Title from "../../.storybook/components/Title";
|
|
4
|
-
import DxcList from "./List";
|
|
5
|
-
import DxcText from "../text/Text";
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: "List",
|
|
9
|
-
component: DxcList,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const Chromatic = () => (
|
|
13
|
-
<>
|
|
14
|
-
<Title title="Default list" theme="light" level={4} />
|
|
15
|
-
<DxcList>
|
|
16
|
-
<DxcText>Text 1.</DxcText>
|
|
17
|
-
<DxcText>Text 2.</DxcText>
|
|
18
|
-
</DxcList>
|
|
19
|
-
<Title title="Number" theme="light" level={4} />
|
|
20
|
-
<DxcList type="number">
|
|
21
|
-
<DxcText>Text 1.</DxcText>
|
|
22
|
-
<DxcText>Text 2.</DxcText>
|
|
23
|
-
</DxcList>
|
|
24
|
-
<Title title="Square" theme="light" level={4} />
|
|
25
|
-
<DxcList type="square">
|
|
26
|
-
<DxcText>Text 1.</DxcText>
|
|
27
|
-
<DxcText>Text 2.</DxcText>
|
|
28
|
-
</DxcList>
|
|
29
|
-
<Title title="Circle" theme="light" level={4} />
|
|
30
|
-
<DxcList type="circle">
|
|
31
|
-
<DxcText>Text 1.</DxcText>
|
|
32
|
-
<DxcText>Text 2.</DxcText>
|
|
33
|
-
</DxcList>
|
|
34
|
-
<Title title="Multiple lines" theme="light" level={4} />
|
|
35
|
-
<Container>
|
|
36
|
-
<DxcList>
|
|
37
|
-
<DxcText>
|
|
38
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
39
|
-
magna aliqua.
|
|
40
|
-
</DxcText>
|
|
41
|
-
<DxcText>Text 2.</DxcText>
|
|
42
|
-
</DxcList>
|
|
43
|
-
</Container>
|
|
44
|
-
<Title title="gutter = xxxsmall" theme="light" level={4} />
|
|
45
|
-
<DxcList gutter="xxsmall">
|
|
46
|
-
<DxcText>Text 1.</DxcText>
|
|
47
|
-
<DxcText>Text 2.</DxcText>
|
|
48
|
-
</DxcList>
|
|
49
|
-
<Title title="gutter = xxsmall" theme="light" level={4} />
|
|
50
|
-
<DxcList gutter="xxsmall">
|
|
51
|
-
<DxcText>Text 1.</DxcText>
|
|
52
|
-
<DxcText>Text 2.</DxcText>
|
|
53
|
-
</DxcList>
|
|
54
|
-
<Title title="gutter = xsmall" theme="light" level={4} />
|
|
55
|
-
<DxcList gutter="xsmall">
|
|
56
|
-
<DxcText>Text 1.</DxcText>
|
|
57
|
-
<DxcText>Text 2.</DxcText>
|
|
58
|
-
</DxcList>
|
|
59
|
-
<Title title="gutter = small" theme="light" level={4} />
|
|
60
|
-
<DxcList gutter="small">
|
|
61
|
-
<DxcText>Text 1.</DxcText>
|
|
62
|
-
<DxcText>Text 2.</DxcText>
|
|
63
|
-
</DxcList>
|
|
64
|
-
<Title title="gutter = medium" theme="light" level={4} />
|
|
65
|
-
<DxcList gutter="medium">
|
|
66
|
-
<DxcText>Text 1.</DxcText>
|
|
67
|
-
<DxcText>Text 2.</DxcText>
|
|
68
|
-
</DxcList>
|
|
69
|
-
<Title title="gutter = large" theme="light" level={4} />
|
|
70
|
-
<DxcList gutter="large">
|
|
71
|
-
<DxcText>Text 1.</DxcText>
|
|
72
|
-
<DxcText>Text 2.</DxcText>
|
|
73
|
-
</DxcList>
|
|
74
|
-
<Title title="gutter = xlarge" theme="light" level={4} />
|
|
75
|
-
<DxcList gutter="xlarge">
|
|
76
|
-
<DxcText>Text 1.</DxcText>
|
|
77
|
-
<DxcText>Text 2.</DxcText>
|
|
78
|
-
</DxcList>
|
|
79
|
-
<Title title="gutter = xxlarge" theme="light" level={4} />
|
|
80
|
-
<DxcList gutter="xxlarge">
|
|
81
|
-
<DxcText>Text 1.</DxcText>
|
|
82
|
-
<DxcText>Text 2.</DxcText>
|
|
83
|
-
</DxcList>
|
|
84
|
-
<Title title="gutter = xxxlarge" theme="light" level={4} />
|
|
85
|
-
<DxcList gutter="xxxlarge">
|
|
86
|
-
<DxcText>Text 1.</DxcText>
|
|
87
|
-
<DxcText>Text 2.</DxcText>
|
|
88
|
-
</DxcList>
|
|
89
|
-
|
|
90
|
-
</>
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
const Container = styled.div`
|
|
94
|
-
width: 400px;
|
|
95
|
-
`;
|
package/list/types.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare type Props = {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
gutter?: "none" | "xxxsmall" | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "xxxlarge";
|
|
5
|
-
type?: "disc" | "circle" | "square" | "number";
|
|
6
|
-
};
|
|
7
|
-
export default Props;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare type HeadingLinkProps = {
|
|
3
|
-
children: string;
|
|
4
|
-
level?: 1 | 2 | 3 | 4 | 5;
|
|
5
|
-
as?: "h1" | "h2" | "h3" | "h4" | "h5";
|
|
6
|
-
};
|
|
7
|
-
declare function HeadingLink({ children, level, as }: HeadingLinkProps): JSX.Element;
|
|
8
|
-
export default HeadingLink;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
|
-
var _slugify = _interopRequireDefault(require("slugify"));
|
|
17
|
-
|
|
18
|
-
var _Heading = _interopRequireDefault(require("../heading/Heading"));
|
|
19
|
-
|
|
20
|
-
var _templateObject, _templateObject2;
|
|
21
|
-
|
|
22
|
-
function HeadingLink(_ref) {
|
|
23
|
-
var children = _ref.children,
|
|
24
|
-
level = _ref.level,
|
|
25
|
-
as = _ref.as;
|
|
26
|
-
var elementId = (0, _slugify["default"])(children, {
|
|
27
|
-
lower: true
|
|
28
|
-
});
|
|
29
|
-
return /*#__PURE__*/_react["default"].createElement(HeadingLinkContainer, {
|
|
30
|
-
id: elementId
|
|
31
|
-
}, /*#__PURE__*/_react["default"].createElement(HeadingAnchor, {
|
|
32
|
-
href: "#".concat(elementId)
|
|
33
|
-
}, linkIcon), /*#__PURE__*/_react["default"].createElement(_Heading["default"], {
|
|
34
|
-
weight: "bold",
|
|
35
|
-
text: children,
|
|
36
|
-
level: level,
|
|
37
|
-
as: as
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var linkIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
42
|
-
"aria-hidden": "true",
|
|
43
|
-
role: "img",
|
|
44
|
-
viewBox: "0 0 16 16",
|
|
45
|
-
width: "16",
|
|
46
|
-
height: "16",
|
|
47
|
-
fill: "currentColor"
|
|
48
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
49
|
-
fillRule: "evenodd",
|
|
50
|
-
d: "M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"
|
|
51
|
-
}));
|
|
52
|
-
|
|
53
|
-
var HeadingLinkContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n scroll-margin-top: 64px;\n &:hover svg {\n opacity: 0.5;\n }\n"])));
|
|
54
|
-
|
|
55
|
-
var HeadingAnchor = _styledComponents["default"].a(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n color: inherit;\n text-decoration: none;\n display: inline-flex;\n align-items: center;\n padding: 8px;\n margin-left: -32px;\n & svg {\n width: 16px;\n height: 16px;\n opacity: 0;\n }\n &:focus {\n outline-color: #0095ff;\n outline-offset: -0.25rem;\n svg {\n opacity: 0.5;\n }\n }\n"])));
|
|
56
|
-
|
|
57
|
-
var _default = HeadingLink;
|
|
58
|
-
exports["default"] = _default;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
|
-
var _QuickNav = _interopRequireDefault(require("../quick-nav/QuickNav"));
|
|
17
|
-
|
|
18
|
-
var _Stack = _interopRequireDefault(require("../stack/Stack"));
|
|
19
|
-
|
|
20
|
-
var _Section = _interopRequireDefault(require("./Section"));
|
|
21
|
-
|
|
22
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
23
|
-
|
|
24
|
-
var DxcQuickNavContainer = function DxcQuickNavContainer(_ref) {
|
|
25
|
-
var title = _ref.title,
|
|
26
|
-
sections = _ref.sections,
|
|
27
|
-
_ref$startHeadingLeve = _ref.startHeadingLevel,
|
|
28
|
-
startHeadingLevel = _ref$startHeadingLeve === void 0 ? 1 : _ref$startHeadingLeve;
|
|
29
|
-
|
|
30
|
-
var getSubSectionsLinks = function getSubSectionsLinks(sections) {
|
|
31
|
-
var linksList = [];
|
|
32
|
-
sections.map(function (section) {
|
|
33
|
-
if (section.subSections) {
|
|
34
|
-
linksList.push({
|
|
35
|
-
label: section.title,
|
|
36
|
-
links: getSubSectionsLinks(section.subSections)
|
|
37
|
-
});
|
|
38
|
-
} else {
|
|
39
|
-
linksList.push({
|
|
40
|
-
label: section.title
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
return linksList;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return /*#__PURE__*/_react["default"].createElement(Container, null, /*#__PURE__*/_react["default"].createElement(ContentContainer, null, /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
48
|
-
gutter: "xlarge"
|
|
49
|
-
}, sections.map(function (section) {
|
|
50
|
-
return /*#__PURE__*/_react["default"].createElement(_Section["default"], {
|
|
51
|
-
title: section.title,
|
|
52
|
-
subSections: section.subSections,
|
|
53
|
-
level: startHeadingLevel,
|
|
54
|
-
key: "section-".concat(section.title)
|
|
55
|
-
}, section.content);
|
|
56
|
-
}))), /*#__PURE__*/_react["default"].createElement(QuickNavContainer, null, /*#__PURE__*/_react["default"].createElement(_QuickNav["default"], {
|
|
57
|
-
title: title,
|
|
58
|
-
links: getSubSectionsLinks(sections)
|
|
59
|
-
})));
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
var Container = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n width: 100%;\n"])));
|
|
63
|
-
|
|
64
|
-
var ContentContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
|
|
65
|
-
|
|
66
|
-
var QuickNavContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: calc(100vh - 150px);\n position: sticky;\n width: 300px;\n"])));
|
|
67
|
-
|
|
68
|
-
var _default = DxcQuickNavContainer;
|
|
69
|
-
exports["default"] = _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare type SectionType = {
|
|
3
|
-
title: string;
|
|
4
|
-
level?: 1 | 2 | 3 | 4 | 5;
|
|
5
|
-
subSections?: SectionType[];
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
declare const Section: ({ title, subSections, level, children }: SectionType) => JSX.Element;
|
|
9
|
-
export default Section;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _Stack = _interopRequireDefault(require("../stack/Stack"));
|
|
13
|
-
|
|
14
|
-
var _HeadingLink = _interopRequireDefault(require("./HeadingLink"));
|
|
15
|
-
|
|
16
|
-
// @ts-nocheck
|
|
17
|
-
var Section = function Section(_ref) {
|
|
18
|
-
var title = _ref.title,
|
|
19
|
-
subSections = _ref.subSections,
|
|
20
|
-
level = _ref.level,
|
|
21
|
-
children = _ref.children;
|
|
22
|
-
return /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
23
|
-
gutter: level === 1 ? "xlarge" : level === 2 ? "large" : "medium"
|
|
24
|
-
}, /*#__PURE__*/_react["default"].createElement(_HeadingLink["default"], {
|
|
25
|
-
level: level
|
|
26
|
-
}, title), children, subSections === null || subSections === void 0 ? void 0 : subSections.map(function (subSection) {
|
|
27
|
-
return /*#__PURE__*/_react["default"].createElement(Section, {
|
|
28
|
-
key: "subSection-".concat(subSection.title),
|
|
29
|
-
title: subSection.title,
|
|
30
|
-
subSections: subSection.subSections,
|
|
31
|
-
level: level + 1 <= 5 ? level + 1 : 5
|
|
32
|
-
}, subSection.content);
|
|
33
|
-
}));
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
var _default = Section;
|
|
37
|
-
exports["default"] = _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare type Props = {
|
|
3
|
-
/**
|
|
4
|
-
* Title of the quick nav component.
|
|
5
|
-
*/
|
|
6
|
-
title: string;
|
|
7
|
-
/**
|
|
8
|
-
* Sections to be shown as the content of the quick nav container.
|
|
9
|
-
*/
|
|
10
|
-
sections: SectionType[];
|
|
11
|
-
/**
|
|
12
|
-
* The level of the first heading of the content.
|
|
13
|
-
*/
|
|
14
|
-
startHeadingLevel?: 1 | 2 | 3 | 4 | 5;
|
|
15
|
-
};
|
|
16
|
-
declare type SectionType = {
|
|
17
|
-
/**
|
|
18
|
-
* Title of each section.
|
|
19
|
-
*/
|
|
20
|
-
title: string;
|
|
21
|
-
/**
|
|
22
|
-
* Level of each section.
|
|
23
|
-
*/
|
|
24
|
-
level?: 1 | 2 | 3 | 4 | 5;
|
|
25
|
-
/**
|
|
26
|
-
* Content of each section.
|
|
27
|
-
*/
|
|
28
|
-
content?: React.ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* Subsections of each section.
|
|
31
|
-
*/
|
|
32
|
-
subSections?: SectionType[];
|
|
33
|
-
};
|
|
34
|
-
export default Props;
|
package/radio/Radio.d.ts
DELETED