@dxc-technology/halstack-react 4.0.0 → 6.0.0
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 +10 -0
- package/BackgroundColorContext.js +7 -6
- package/HalstackContext.d.ts +12 -0
- package/HalstackContext.js +295 -0
- package/accordion/Accordion.d.ts +4 -0
- package/accordion/Accordion.js +35 -162
- package/accordion/Accordion.stories.tsx +307 -0
- package/accordion/Accordion.test.js +72 -0
- package/accordion/types.d.ts +68 -0
- package/accordion/types.js +5 -0
- package/accordion-group/AccordionGroup.d.ts +7 -0
- package/accordion-group/AccordionGroup.js +68 -85
- package/accordion-group/AccordionGroup.stories.tsx +225 -0
- package/accordion-group/AccordionGroup.test.js +151 -0
- package/accordion-group/types.d.ts +72 -0
- package/accordion-group/types.js +5 -0
- package/alert/Alert.d.ts +4 -0
- package/alert/Alert.js +43 -153
- package/alert/Alert.stories.tsx +170 -0
- package/alert/Alert.test.js +92 -0
- package/alert/types.d.ts +49 -0
- package/alert/types.js +5 -0
- package/badge/Badge.d.ts +4 -0
- package/badge/Badge.js +15 -17
- package/badge/types.d.ts +5 -0
- package/badge/types.js +5 -0
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +51 -0
- package/bleed/Bleed.stories.tsx +341 -0
- package/bleed/types.d.ts +37 -0
- package/bleed/types.js +5 -0
- package/box/Box.d.ts +4 -0
- package/box/Box.js +36 -76
- package/box/Box.stories.tsx +132 -0
- package/box/Box.test.js +18 -0
- package/box/types.d.ts +43 -0
- package/box/types.js +5 -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/bulleted-list/types.js +5 -0
- package/button/Button.d.ts +4 -0
- package/button/Button.js +33 -97
- package/button/Button.stories.tsx +274 -0
- package/button/Button.test.js +35 -0
- package/button/types.d.ts +53 -0
- package/button/types.js +5 -0
- package/card/Card.d.ts +4 -0
- package/card/Card.js +44 -137
- package/card/Card.stories.tsx +201 -0
- package/card/Card.test.js +50 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +67 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.d.ts +4 -0
- package/checkbox/Checkbox.js +52 -94
- package/checkbox/Checkbox.stories.tsx +188 -0
- package/checkbox/Checkbox.test.js +78 -0
- package/checkbox/types.d.ts +64 -0
- package/checkbox/types.js +5 -0
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +26 -130
- package/chip/Chip.stories.tsx +119 -0
- package/chip/Chip.test.js +56 -0
- package/chip/types.d.ts +45 -0
- package/chip/types.js +5 -0
- package/common/RequiredComponent.js +3 -11
- package/common/variables.js +301 -373
- package/date-input/DateInput.d.ts +4 -0
- package/date-input/DateInput.js +80 -108
- package/date-input/DateInput.stories.tsx +138 -0
- package/date-input/DateInput.test.js +479 -0
- package/date-input/types.d.ts +107 -0
- package/date-input/types.js +5 -0
- package/dialog/Dialog.d.ts +4 -0
- package/dialog/Dialog.js +25 -105
- package/dialog/Dialog.stories.tsx +212 -0
- package/dialog/Dialog.test.js +40 -0
- package/dialog/types.d.ts +43 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/dropdown/Dropdown.js +54 -207
- package/dropdown/Dropdown.stories.tsx +249 -0
- package/dropdown/Dropdown.test.js +189 -0
- package/dropdown/types.d.ts +80 -0
- package/dropdown/types.js +5 -0
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +200 -251
- package/file-input/FileInput.stories.tsx +507 -0
- package/file-input/FileInput.test.js +457 -0
- package/file-input/FileItem.d.ts +14 -0
- package/file-input/FileItem.js +44 -145
- package/file-input/types.d.ts +112 -0
- package/file-input/types.js +5 -0
- 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/flex/types.js +5 -0
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +50 -286
- package/footer/Footer.stories.tsx +130 -0
- package/footer/Footer.test.js +109 -0
- package/footer/Icons.d.ts +2 -0
- package/footer/Icons.js +16 -16
- package/footer/types.d.ts +65 -0
- package/footer/types.js +5 -0
- package/header/Header.d.ts +7 -0
- package/header/Header.js +82 -249
- package/header/Header.stories.tsx +172 -0
- package/header/Header.test.js +79 -0
- package/header/Icons.d.ts +2 -0
- package/header/Icons.js +7 -32
- package/header/types.d.ts +47 -0
- package/header/types.js +5 -0
- package/heading/Heading.d.ts +4 -0
- package/heading/Heading.js +25 -96
- package/heading/Heading.stories.tsx +54 -0
- package/heading/Heading.test.js +186 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/inset/Inset.d.ts +3 -0
- package/inset/Inset.js +51 -0
- package/inset/Inset.stories.tsx +229 -0
- package/inset/types.d.ts +37 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +20 -0
- package/layout/ApplicationLayout.js +76 -232
- package/layout/ApplicationLayout.stories.tsx +161 -0
- package/layout/Icons.d.ts +5 -0
- package/layout/Icons.js +19 -8
- package/layout/SidenavContext.d.ts +5 -0
- package/layout/SidenavContext.js +19 -0
- package/layout/types.d.ts +42 -0
- package/layout/types.js +5 -0
- package/link/Link.d.ts +4 -0
- package/link/Link.js +64 -165
- package/link/Link.stories.tsx +186 -0
- package/link/Link.test.js +83 -0
- package/link/types.d.ts +54 -0
- package/link/types.js +5 -0
- package/main.d.ts +44 -40
- package/main.js +114 -104
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +21 -81
- package/number-input/NumberInput.stories.tsx +115 -0
- package/number-input/NumberInput.test.js +506 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +124 -0
- package/number-input/types.js +5 -0
- package/package.json +23 -16
- package/paginator/Icons.js +9 -9
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +32 -166
- package/paginator/Paginator.stories.tsx +63 -0
- package/paginator/Paginator.test.js +308 -0
- package/paginator/types.d.ts +38 -0
- package/paginator/types.js +5 -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.d.ts +4 -0
- package/password-input/PasswordInput.js +40 -77
- package/password-input/PasswordInput.stories.tsx +131 -0
- package/password-input/PasswordInput.test.js +180 -0
- package/password-input/types.d.ts +110 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/progress-bar/ProgressBar.js +23 -95
- package/progress-bar/ProgressBar.stories.jsx +58 -0
- package/progress-bar/ProgressBar.test.js +65 -0
- package/progress-bar/types.d.ts +37 -0
- package/progress-bar/types.js +5 -0
- 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/quick-nav/types.js +5 -0
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +141 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +283 -0
- package/radio-group/RadioGroup.stories.tsx +100 -0
- package/radio-group/RadioGroup.test.js +695 -0
- package/radio-group/types.d.ts +114 -0
- package/radio-group/types.js +5 -0
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +43 -147
- package/resultsetTable/ResultsetTable.stories.tsx +275 -0
- package/resultsetTable/ResultsetTable.test.js +348 -0
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -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 +175 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +110 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +231 -709
- package/select/Select.stories.tsx +626 -0
- package/select/Select.test.js +2162 -0
- package/select/types.d.ts +212 -0
- package/select/types.js +5 -0
- package/sidenav/Sidenav.d.ts +10 -0
- package/sidenav/Sidenav.js +182 -105
- package/sidenav/Sidenav.stories.tsx +180 -0
- package/sidenav/Sidenav.test.js +44 -0
- package/sidenav/types.d.ts +73 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +76 -162
- package/slider/Slider.stories.tsx +177 -0
- package/slider/Slider.test.js +150 -0
- package/slider/types.d.ts +82 -0
- package/slider/types.js +5 -0
- package/spinner/Spinner.d.ts +4 -0
- package/spinner/Spinner.js +46 -177
- package/spinner/Spinner.stories.jsx +103 -0
- package/spinner/Spinner.test.js +64 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- package/switch/Switch.d.ts +4 -0
- package/switch/Switch.js +55 -82
- package/switch/Switch.stories.tsx +160 -0
- package/switch/Switch.test.js +98 -0
- package/switch/types.d.ts +62 -0
- package/switch/types.js +5 -0
- package/table/Table.d.ts +4 -0
- package/table/Table.js +12 -26
- package/table/Table.stories.jsx +277 -0
- package/table/Table.test.js +26 -0
- package/table/types.d.ts +21 -0
- package/table/types.js +5 -0
- package/tabs/Tabs.d.ts +4 -0
- package/tabs/Tabs.js +43 -175
- package/tabs/Tabs.stories.tsx +112 -0
- package/tabs/Tabs.test.js +140 -0
- package/tabs/types.d.ts +82 -0
- package/tabs/types.js +5 -0
- 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 +132 -0
- package/tabs-nav/types.d.ts +53 -0
- package/tabs-nav/types.js +5 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +44 -143
- package/tag/Tag.stories.tsx +142 -0
- package/tag/Tag.test.js +60 -0
- package/tag/types.d.ts +69 -0
- package/tag/types.js +5 -0
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +55 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +169 -391
- package/text-input/TextInput.stories.tsx +474 -0
- package/text-input/TextInput.test.js +1712 -0
- package/text-input/types.d.ts +178 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +50 -142
- package/textarea/Textarea.stories.jsx +157 -0
- package/textarea/Textarea.test.js +437 -0
- package/textarea/types.d.ts +137 -0
- package/textarea/types.js +5 -0
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +36 -148
- package/toggle-group/ToggleGroup.stories.tsx +173 -0
- package/toggle-group/ToggleGroup.test.js +156 -0
- package/toggle-group/types.d.ts +105 -0
- package/toggle-group/types.js +5 -0
- 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.d.ts +2 -0
- package/useTheme.js +2 -2
- package/useTranslatedLabels.d.ts +2 -0
- package/useTranslatedLabels.js +20 -0
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +132 -252
- package/wizard/Wizard.stories.tsx +233 -0
- package/wizard/Wizard.test.js +141 -0
- package/wizard/types.d.ts +65 -0
- package/wizard/types.js +5 -0
- package/ThemeContext.js +0 -250
- package/V3Select/V3Select.js +0 -549
- package/V3Select/index.d.ts +0 -27
- package/V3Textarea/V3Textarea.js +0 -264
- package/V3Textarea/index.d.ts +0 -27
- package/accordion/index.d.ts +0 -28
- package/accordion-group/index.d.ts +0 -16
- package/alert/index.d.ts +0 -51
- package/box/index.d.ts +0 -25
- package/button/Button.stories.js +0 -27
- package/button/index.d.ts +0 -24
- package/card/index.d.ts +0 -22
- package/checkbox/index.d.ts +0 -24
- package/chip/index.d.ts +0 -22
- package/date/Date.js +0 -379
- package/date/index.d.ts +0 -27
- package/date-input/index.d.ts +0 -95
- package/dialog/index.d.ts +0 -18
- package/dropdown/index.d.ts +0 -26
- package/file-input/index.d.ts +0 -81
- package/footer/index.d.ts +0 -25
- package/header/index.d.ts +0 -25
- package/heading/index.d.ts +0 -17
- package/input-text/Icons.js +0 -22
- package/input-text/InputText.js +0 -705
- package/input-text/index.d.ts +0 -36
- package/link/index.d.ts +0 -23
- package/number-input/index.d.ts +0 -113
- package/paginator/index.d.ts +0 -20
- package/password-input/index.d.ts +0 -94
- package/progress-bar/index.d.ts +0 -18
- package/radio/Radio.js +0 -209
- package/radio/index.d.ts +0 -23
- package/resultsetTable/index.d.ts +0 -19
- package/select/index.d.ts +0 -131
- package/sidenav/index.d.ts +0 -13
- package/slider/index.d.ts +0 -29
- package/spinner/index.d.ts +0 -17
- package/switch/index.d.ts +0 -24
- package/table/index.d.ts +0 -13
- package/tabs/index.d.ts +0 -19
- package/tag/index.d.ts +0 -24
- package/text-input/index.d.ts +0 -135
- package/textarea/index.d.ts +0 -117
- package/toggle/Toggle.js +0 -220
- package/toggle/index.d.ts +0 -21
- package/toggle-group/index.d.ts +0 -21
- package/upload/Upload.js +0 -205
- package/upload/buttons-upload/ButtonsUpload.js +0 -135
- package/upload/buttons-upload/Icons.js +0 -40
- package/upload/dragAndDropArea/DragAndDropArea.js +0 -329
- package/upload/dragAndDropArea/Icons.js +0 -39
- package/upload/file-upload/FileToUpload.js +0 -189
- package/upload/file-upload/Icons.js +0 -66
- package/upload/files-upload/FilesToUpload.js +0 -123
- package/upload/index.d.ts +0 -15
- package/upload/transaction/Icons.js +0 -160
- package/upload/transaction/Transaction.js +0 -148
- package/upload/transactions/Transactions.js +0 -138
- package/wizard/Icons.js +0 -65
- package/wizard/index.d.ts +0 -18
|
@@ -0,0 +1,72 @@
|
|
|
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 _Accordion = _interopRequireDefault(require("./Accordion"));
|
|
10
|
+
|
|
11
|
+
describe("Accordion component tests", function () {
|
|
12
|
+
test("Accordion renders with correct text", function () {
|
|
13
|
+
var onChange = jest.fn();
|
|
14
|
+
|
|
15
|
+
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Accordion["default"], {
|
|
16
|
+
label: "Accordion",
|
|
17
|
+
assistiveText: "Assistive text",
|
|
18
|
+
onChange: onChange
|
|
19
|
+
})),
|
|
20
|
+
getByText = _render.getByText;
|
|
21
|
+
|
|
22
|
+
expect(getByText("Accordion")).toBeTruthy();
|
|
23
|
+
expect(getByText("Assistive text")).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
test("Accordion renders expanded by default when it is uncontrolled", function () {
|
|
26
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Accordion["default"], {
|
|
27
|
+
label: "Accordion",
|
|
28
|
+
defaultIsExpanded: true
|
|
29
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, "test-expanded"))),
|
|
30
|
+
getByRole = _render2.getByRole;
|
|
31
|
+
|
|
32
|
+
var accordion = getByRole("button");
|
|
33
|
+
expect(accordion.getAttribute("aria-expanded")).toBe("true");
|
|
34
|
+
});
|
|
35
|
+
test("Calls correct function on click", function () {
|
|
36
|
+
var onChange = jest.fn();
|
|
37
|
+
|
|
38
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Accordion["default"], {
|
|
39
|
+
label: "Accordion",
|
|
40
|
+
onChange: onChange
|
|
41
|
+
})),
|
|
42
|
+
getByText = _render3.getByText;
|
|
43
|
+
|
|
44
|
+
_react2.fireEvent.click(getByText("Accordion"));
|
|
45
|
+
|
|
46
|
+
expect(onChange).toHaveBeenCalled();
|
|
47
|
+
});
|
|
48
|
+
test("Controlled accordion", function () {
|
|
49
|
+
var onChange = jest.fn();
|
|
50
|
+
|
|
51
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Accordion["default"], {
|
|
52
|
+
label: "Accordion",
|
|
53
|
+
onChange: onChange,
|
|
54
|
+
isExpanded: true
|
|
55
|
+
})),
|
|
56
|
+
getByText = _render4.getByText,
|
|
57
|
+
getByRole = _render4.getByRole;
|
|
58
|
+
|
|
59
|
+
expect(getByRole("button").getAttribute("aria-expanded")).toBe("true");
|
|
60
|
+
|
|
61
|
+
_react2.fireEvent.click(getByText("Accordion"));
|
|
62
|
+
|
|
63
|
+
_react2.fireEvent.click(getByText("Accordion"));
|
|
64
|
+
|
|
65
|
+
_react2.fireEvent.click(getByText("Accordion"));
|
|
66
|
+
|
|
67
|
+
expect(onChange).toHaveBeenCalledTimes(3);
|
|
68
|
+
expect(onChange.mock.calls[0][0]).toBe(false);
|
|
69
|
+
expect(onChange.mock.calls[1][0]).toBe(false);
|
|
70
|
+
expect(onChange.mock.calls[2][0]).toBe(false);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
declare type Margin = {
|
|
4
|
+
top?: Space;
|
|
5
|
+
bottom?: Space;
|
|
6
|
+
left?: Space;
|
|
7
|
+
right?: Space;
|
|
8
|
+
};
|
|
9
|
+
declare type Padding = {
|
|
10
|
+
top?: Space;
|
|
11
|
+
bottom?: Space;
|
|
12
|
+
left?: Space;
|
|
13
|
+
right?: Space;
|
|
14
|
+
};
|
|
15
|
+
declare type SVG = React.SVGProps<SVGSVGElement>;
|
|
16
|
+
declare type Props = {
|
|
17
|
+
/**
|
|
18
|
+
* The panel label.
|
|
19
|
+
*/
|
|
20
|
+
label: string;
|
|
21
|
+
/**
|
|
22
|
+
* Initial state of the panel, only when it is uncontrolled.
|
|
23
|
+
*/
|
|
24
|
+
defaultIsExpanded?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Represents the state of the panel. When true, the component will be
|
|
27
|
+
* expanded. If undefined, the component will be uncontrolled and its
|
|
28
|
+
* value will be managed internally by the component.
|
|
29
|
+
*/
|
|
30
|
+
isExpanded?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Element or path used as the icon that will be placed next to panel label.
|
|
33
|
+
*/
|
|
34
|
+
icon?: string | SVG;
|
|
35
|
+
/**
|
|
36
|
+
* Assistive text to be placed on the right side of the panel.
|
|
37
|
+
*/
|
|
38
|
+
assistiveText?: string;
|
|
39
|
+
/**
|
|
40
|
+
* If true, the component will be disabled.
|
|
41
|
+
*/
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* This function will be called when the user clicks the accordion to expand or collapse
|
|
45
|
+
* the panel. The new state of the panel will be passed as a parameter.
|
|
46
|
+
*/
|
|
47
|
+
onChange?: (isExpanded: boolean) => void;
|
|
48
|
+
/**
|
|
49
|
+
* The expanded panel of the accordion. This area can be used to render
|
|
50
|
+
* custom content.
|
|
51
|
+
*/
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
55
|
+
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
56
|
+
*/
|
|
57
|
+
margin?: Space | Margin;
|
|
58
|
+
/**
|
|
59
|
+
* Size of the padding to be applied to the custom area ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
60
|
+
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different padding sizes.
|
|
61
|
+
*/
|
|
62
|
+
padding?: Space | Padding;
|
|
63
|
+
/**
|
|
64
|
+
* Value of the tabindex.
|
|
65
|
+
*/
|
|
66
|
+
tabIndex?: number;
|
|
67
|
+
};
|
|
68
|
+
export default Props;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import AccordionGroupPropsType, { AccordionPropsType } from "./types";
|
|
3
|
+
declare const DxcAccordionGroup: {
|
|
4
|
+
({ defaultIndexActive, indexActive, disabled, onActiveChange, margin, children, }: AccordionGroupPropsType): JSX.Element;
|
|
5
|
+
Accordion: ({ ...childProps }: AccordionPropsType) => JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default DxcAccordionGroup;
|
|
@@ -1,108 +1,118 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
4
|
|
|
5
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
13
|
|
|
16
14
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
15
|
|
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
+
|
|
18
18
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
21
21
|
|
|
22
22
|
var _react = _interopRequireWildcard(require("react"));
|
|
23
23
|
|
|
24
24
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
25
25
|
|
|
26
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
26
|
var _Accordion = _interopRequireDefault(require("../accordion/Accordion"));
|
|
29
27
|
|
|
30
28
|
var _utils = require("../common/utils.js");
|
|
31
29
|
|
|
32
30
|
var _variables = require("../common/variables.js");
|
|
33
31
|
|
|
34
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
32
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
33
|
+
|
|
34
|
+
var _templateObject;
|
|
35
|
+
|
|
36
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
|
+
|
|
38
|
+
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
39
|
|
|
36
|
-
function
|
|
37
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n cursor: ", ";\n\n & > :not(div:last-child) {\n & > div:first-child {\n border-radius: 0;\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-radius: 0;\n }\n\n & > .MuiButtonBase-root {\n border-radius: 0;\n }\n }\n }\n\n & > div:first-child {\n & > div:first-child {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n\n & > .MuiButtonBase-root {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n }\n }\n\n & > div:last-child {\n & > div:first-child {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n\n & > .Mui-expanded {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n & > .MuiButtonBase-root {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n }\n"]);
|
|
40
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
return data;
|
|
41
|
-
};
|
|
42
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
}
|
|
44
|
+
var AccordionGroupAccordionContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
45
45
|
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
var AccordionGroupAccordion = function AccordionGroupAccordion(_ref) {
|
|
47
|
+
var childProps = (0, _extends2["default"])({}, _ref);
|
|
48
|
+
|
|
49
|
+
var _useContext = (0, _react.useContext)(AccordionGroupAccordionContext),
|
|
50
|
+
activeIndex = _useContext.activeIndex,
|
|
51
|
+
handlerActiveChange = _useContext.handlerActiveChange,
|
|
52
|
+
disabled = _useContext.disabled,
|
|
53
|
+
index = _useContext.index;
|
|
54
|
+
|
|
55
|
+
return /*#__PURE__*/_react["default"].createElement(_Accordion["default"], (0, _extends2["default"])({
|
|
56
|
+
isExpanded: activeIndex === index,
|
|
57
|
+
onChange: function onChange() {
|
|
58
|
+
handlerActiveChange(index);
|
|
59
|
+
},
|
|
60
|
+
disabled: disabled
|
|
61
|
+
}, childProps), childProps.children);
|
|
50
62
|
};
|
|
51
63
|
|
|
52
64
|
var DxcAccordionGroup = function DxcAccordionGroup(_ref2) {
|
|
53
|
-
var
|
|
65
|
+
var defaultIndexActive = _ref2.defaultIndexActive,
|
|
66
|
+
indexActive = _ref2.indexActive,
|
|
67
|
+
_ref2$disabled = _ref2.disabled,
|
|
54
68
|
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
55
69
|
onActiveChange = _ref2.onActiveChange,
|
|
56
|
-
_ref2$indexActive = _ref2.indexActive,
|
|
57
|
-
indexActive = _ref2$indexActive === void 0 ? undefined : _ref2$indexActive,
|
|
58
70
|
margin = _ref2.margin,
|
|
59
|
-
|
|
60
|
-
children = _ref2$children === void 0 ? [] : _ref2$children;
|
|
71
|
+
children = _ref2.children;
|
|
61
72
|
var colorsTheme = (0, _useTheme["default"])();
|
|
62
73
|
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var handlerActiveChange = function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}, [indexActive]);
|
|
83
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
74
|
+
var _useState = (0, _react.useState)(defaultIndexActive !== null && defaultIndexActive !== void 0 ? defaultIndexActive : -1),
|
|
75
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
76
|
+
innerIndexActive = _useState2[0],
|
|
77
|
+
setInnerIndexActive = _useState2[1];
|
|
78
|
+
|
|
79
|
+
var handlerActiveChange = (0, _react.useCallback)(function (index) {
|
|
80
|
+
indexActive !== null && indexActive !== void 0 ? indexActive : setInnerIndexActive(function (prev) {
|
|
81
|
+
return index === prev ? -1 : index;
|
|
82
|
+
});
|
|
83
|
+
!disabled && (onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(index));
|
|
84
|
+
}, [disabled, indexActive, onActiveChange]);
|
|
85
|
+
var contextValue = (0, _react.useMemo)(function () {
|
|
86
|
+
return {
|
|
87
|
+
activeIndex: indexActive !== null && indexActive !== void 0 ? indexActive : innerIndexActive,
|
|
88
|
+
handlerActiveChange: handlerActiveChange,
|
|
89
|
+
disabled: disabled
|
|
90
|
+
};
|
|
91
|
+
}, [indexActive, innerIndexActive, handlerActiveChange, disabled]);
|
|
92
|
+
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
84
93
|
theme: colorsTheme.accordion
|
|
85
|
-
}, _react["default"].createElement(AccordionGroupContainer, {
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement(AccordionGroupContainer, {
|
|
86
95
|
margin: margin,
|
|
87
96
|
disabled: disabled
|
|
88
|
-
}, (Array.isArray(children) ? children : [children]).filter(function (
|
|
89
|
-
return
|
|
90
|
-
}).map(function (
|
|
91
|
-
return _react["default"].
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
});
|
|
97
|
+
}, (Array.isArray(children) ? children : [children]).filter(function (child) {
|
|
98
|
+
return child.type === AccordionGroupAccordion;
|
|
99
|
+
}).map(function (accordion, index) {
|
|
100
|
+
return /*#__PURE__*/_react["default"].createElement(AccordionGroupAccordionContext.Provider, {
|
|
101
|
+
key: "accordion-".concat(index),
|
|
102
|
+
value: _objectSpread({
|
|
103
|
+
index: index
|
|
104
|
+
}, contextValue)
|
|
105
|
+
}, accordion);
|
|
98
106
|
})));
|
|
99
107
|
};
|
|
100
108
|
|
|
109
|
+
DxcAccordionGroup.Accordion = AccordionGroupAccordion;
|
|
110
|
+
|
|
101
111
|
var calculateWidth = function calculateWidth(margin) {
|
|
102
112
|
return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
|
|
103
113
|
};
|
|
104
114
|
|
|
105
|
-
var AccordionGroupContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
115
|
+
var AccordionGroupContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-block;\n width: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n cursor: ", ";\n\n & > :not(div:last-child) {\n & > div:first-child {\n border-radius: 0;\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-radius: 0;\n }\n & > .MuiButtonBase-root {\n border-radius: 0;\n }\n }\n }\n\n & > div:first-child {\n & > div:first-child {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n & > .MuiButtonBase-root {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n }\n }\n\n & > div:last-child {\n & > div:first-child {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n\n & > .Mui-expanded {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n & > .MuiButtonBase-root {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n }\n"])), function (props) {
|
|
106
116
|
return calculateWidth(props.margin);
|
|
107
117
|
}, function (_ref3) {
|
|
108
118
|
var margin = _ref3.margin;
|
|
@@ -120,7 +130,7 @@ var AccordionGroupContainer = _styledComponents["default"].div(_templateObject()
|
|
|
120
130
|
var margin = _ref7.margin;
|
|
121
131
|
return margin && (0, _typeof2["default"])(margin) === "object" && margin.left ? _variables.spaces[margin.left] : "";
|
|
122
132
|
}, function (props) {
|
|
123
|
-
return props.disabled
|
|
133
|
+
return props.disabled ? "not-allowed" : "pointer";
|
|
124
134
|
}, function (props) {
|
|
125
135
|
return "".concat(props.theme.accordionGroupSeparatorBorderThickness, " ").concat(props.theme.accordionGroupSeparatorBorderStyle);
|
|
126
136
|
}, function (props) {
|
|
@@ -155,32 +165,5 @@ var AccordionGroupContainer = _styledComponents["default"].div(_templateObject()
|
|
|
155
165
|
return props.theme.borderRadius;
|
|
156
166
|
});
|
|
157
167
|
|
|
158
|
-
DxcAccordionGroup.propTypes = {
|
|
159
|
-
disabled: _propTypes["default"].bool,
|
|
160
|
-
onActiveChange: _propTypes["default"].func,
|
|
161
|
-
indexActive: _propTypes["default"].number,
|
|
162
|
-
children: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
163
|
-
label: _propTypes["default"].string,
|
|
164
|
-
icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
165
|
-
iconSrc: _propTypes["default"].string,
|
|
166
|
-
iconPosition: _propTypes["default"].oneOf(["before", "after"]),
|
|
167
|
-
assistiveText: _propTypes["default"].string,
|
|
168
|
-
disabled: _propTypes["default"].bool,
|
|
169
|
-
children: _propTypes["default"].element,
|
|
170
|
-
padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
171
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
172
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
173
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
174
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
175
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
|
|
176
|
-
})),
|
|
177
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
178
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
179
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
180
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
181
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
182
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
|
|
183
|
-
};
|
|
184
|
-
DxcAccordionGroup.Accordion = Accordion;
|
|
185
168
|
var _default = DxcAccordionGroup;
|
|
186
169
|
exports["default"] = _default;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DxcAccordionGroup from "./AccordionGroup";
|
|
3
|
+
import Title from "../../.storybook/components/Title";
|
|
4
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Accordion group",
|
|
8
|
+
component: DxcAccordionGroup,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Chromatic = () => (
|
|
12
|
+
<>
|
|
13
|
+
<Title title="States" theme="light" level={2} />
|
|
14
|
+
<ExampleContainer>
|
|
15
|
+
<Title title="Default" theme="light" level={4} />
|
|
16
|
+
<DxcAccordionGroup>
|
|
17
|
+
<DxcAccordionGroup.Accordion label="Accordion1" assistiveText="Assistive text" padding="medium">
|
|
18
|
+
<div>
|
|
19
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
20
|
+
leo lobortis eget.
|
|
21
|
+
</div>
|
|
22
|
+
</DxcAccordionGroup.Accordion>
|
|
23
|
+
<DxcAccordionGroup.Accordion label="Accordion2" assistiveText="Assistive text" padding="medium">
|
|
24
|
+
<div>
|
|
25
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
26
|
+
leo lobortis eget.
|
|
27
|
+
</div>
|
|
28
|
+
</DxcAccordionGroup.Accordion>
|
|
29
|
+
<DxcAccordionGroup.Accordion label="Accordion2" assistiveText="Assistive text" padding="medium">
|
|
30
|
+
<div>
|
|
31
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
32
|
+
leo lobortis eget.
|
|
33
|
+
</div>
|
|
34
|
+
</DxcAccordionGroup.Accordion>
|
|
35
|
+
</DxcAccordionGroup>
|
|
36
|
+
</ExampleContainer>
|
|
37
|
+
<ExampleContainer>
|
|
38
|
+
<Title title="Expanded" theme="light" level={4} />
|
|
39
|
+
<DxcAccordionGroup defaultIndexActive={1}>
|
|
40
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
41
|
+
<div>
|
|
42
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
43
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
44
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
45
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
46
|
+
anim id est laborum.
|
|
47
|
+
</div>
|
|
48
|
+
</DxcAccordionGroup.Accordion>
|
|
49
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
50
|
+
<div>
|
|
51
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
52
|
+
leo lobortis eget.
|
|
53
|
+
</div>
|
|
54
|
+
</DxcAccordionGroup.Accordion>
|
|
55
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
56
|
+
<div>
|
|
57
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
58
|
+
leo lobortis eget.
|
|
59
|
+
</div>
|
|
60
|
+
</DxcAccordionGroup.Accordion>
|
|
61
|
+
</DxcAccordionGroup>
|
|
62
|
+
</ExampleContainer>
|
|
63
|
+
<ExampleContainer>
|
|
64
|
+
<Title title="Disabled" theme="light" level={4} />
|
|
65
|
+
<DxcAccordionGroup disabled>
|
|
66
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
67
|
+
<div>
|
|
68
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
69
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
70
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
71
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
72
|
+
anim id est laborum.
|
|
73
|
+
</div>
|
|
74
|
+
</DxcAccordionGroup.Accordion>
|
|
75
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
76
|
+
<div>
|
|
77
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
78
|
+
leo lobortis eget.
|
|
79
|
+
</div>
|
|
80
|
+
</DxcAccordionGroup.Accordion>
|
|
81
|
+
</DxcAccordionGroup>
|
|
82
|
+
</ExampleContainer>
|
|
83
|
+
<Title title="Margins" theme="light" level={2} />
|
|
84
|
+
<ExampleContainer>
|
|
85
|
+
<Title title="Xxsmall" theme="light" level={4} />
|
|
86
|
+
<DxcAccordionGroup margin="xxsmall">
|
|
87
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
88
|
+
<div>
|
|
89
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
90
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
91
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
92
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
93
|
+
anim id est laborum.
|
|
94
|
+
</div>
|
|
95
|
+
</DxcAccordionGroup.Accordion>
|
|
96
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
97
|
+
<div>
|
|
98
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
99
|
+
leo lobortis eget.
|
|
100
|
+
</div>
|
|
101
|
+
</DxcAccordionGroup.Accordion>
|
|
102
|
+
</DxcAccordionGroup>
|
|
103
|
+
</ExampleContainer>
|
|
104
|
+
<ExampleContainer>
|
|
105
|
+
<Title title="Xsmall" theme="light" level={4} />
|
|
106
|
+
<DxcAccordionGroup margin="xsmall">
|
|
107
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
108
|
+
<div>
|
|
109
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
110
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
111
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
112
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
113
|
+
anim id est laborum.
|
|
114
|
+
</div>
|
|
115
|
+
</DxcAccordionGroup.Accordion>
|
|
116
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
117
|
+
<div>
|
|
118
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
119
|
+
leo lobortis eget.
|
|
120
|
+
</div>
|
|
121
|
+
</DxcAccordionGroup.Accordion>
|
|
122
|
+
</DxcAccordionGroup>
|
|
123
|
+
</ExampleContainer>
|
|
124
|
+
<ExampleContainer>
|
|
125
|
+
<Title title="Small" theme="light" level={4} />
|
|
126
|
+
<DxcAccordionGroup margin="small">
|
|
127
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
128
|
+
<div>
|
|
129
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
130
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
131
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
132
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
133
|
+
anim id est laborum.
|
|
134
|
+
</div>
|
|
135
|
+
</DxcAccordionGroup.Accordion>
|
|
136
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
137
|
+
<div>
|
|
138
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
139
|
+
leo lobortis eget.
|
|
140
|
+
</div>
|
|
141
|
+
</DxcAccordionGroup.Accordion>
|
|
142
|
+
</DxcAccordionGroup>
|
|
143
|
+
</ExampleContainer>
|
|
144
|
+
<ExampleContainer>
|
|
145
|
+
<Title title="Medium" theme="light" level={4} />
|
|
146
|
+
<DxcAccordionGroup margin="medium">
|
|
147
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
148
|
+
<div>
|
|
149
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
150
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
151
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
152
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
153
|
+
anim id est laborum.
|
|
154
|
+
</div>
|
|
155
|
+
</DxcAccordionGroup.Accordion>
|
|
156
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
157
|
+
<div>
|
|
158
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
159
|
+
leo lobortis eget.
|
|
160
|
+
</div>
|
|
161
|
+
</DxcAccordionGroup.Accordion>
|
|
162
|
+
</DxcAccordionGroup>
|
|
163
|
+
</ExampleContainer>
|
|
164
|
+
<ExampleContainer>
|
|
165
|
+
<Title title="Large" theme="light" level={4} />
|
|
166
|
+
<DxcAccordionGroup margin="large">
|
|
167
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
168
|
+
<div>
|
|
169
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
170
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
171
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
172
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
173
|
+
anim id est laborum.
|
|
174
|
+
</div>
|
|
175
|
+
</DxcAccordionGroup.Accordion>
|
|
176
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
177
|
+
<div>
|
|
178
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
179
|
+
leo lobortis eget.
|
|
180
|
+
</div>
|
|
181
|
+
</DxcAccordionGroup.Accordion>
|
|
182
|
+
</DxcAccordionGroup>
|
|
183
|
+
</ExampleContainer>
|
|
184
|
+
<ExampleContainer>
|
|
185
|
+
<Title title="Xlarge" theme="light" level={4} />
|
|
186
|
+
<DxcAccordionGroup margin="xlarge">
|
|
187
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
188
|
+
<div>
|
|
189
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
190
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
191
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
192
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
193
|
+
anim id est laborum.
|
|
194
|
+
</div>
|
|
195
|
+
</DxcAccordionGroup.Accordion>
|
|
196
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
197
|
+
<div>
|
|
198
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
199
|
+
leo lobortis eget.
|
|
200
|
+
</div>
|
|
201
|
+
</DxcAccordionGroup.Accordion>
|
|
202
|
+
</DxcAccordionGroup>
|
|
203
|
+
</ExampleContainer>
|
|
204
|
+
<ExampleContainer>
|
|
205
|
+
<Title title="Xxlarge" theme="light" level={4} />
|
|
206
|
+
<DxcAccordionGroup margin="xxlarge">
|
|
207
|
+
<DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
|
|
208
|
+
<div>
|
|
209
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
210
|
+
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
211
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
212
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
213
|
+
anim id est laborum.
|
|
214
|
+
</div>
|
|
215
|
+
</DxcAccordionGroup.Accordion>
|
|
216
|
+
<DxcAccordionGroup.Accordion label="Accordion2" padding="medium">
|
|
217
|
+
<div>
|
|
218
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
|
|
219
|
+
leo lobortis eget.
|
|
220
|
+
</div>
|
|
221
|
+
</DxcAccordionGroup.Accordion>
|
|
222
|
+
</DxcAccordionGroup>
|
|
223
|
+
</ExampleContainer>
|
|
224
|
+
</>
|
|
225
|
+
);
|