@dxc-technology/halstack-react 0.0.0-bd364ae → 0.0.0-bd47c58
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 +2 -2
- package/BackgroundColorContext.js +1 -1
- package/HalstackContext.d.ts +1337 -5
- package/HalstackContext.js +117 -77
- package/README.md +47 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +110 -114
- package/accordion/Accordion.stories.tsx +105 -115
- package/accordion/Accordion.test.js +10 -11
- package/accordion/types.d.ts +1 -12
- package/accordion-group/AccordionGroup.d.ts +4 -3
- package/accordion-group/AccordionGroup.js +25 -65
- package/accordion-group/AccordionGroup.stories.tsx +93 -66
- package/accordion-group/AccordionGroup.test.js +27 -62
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +43 -0
- package/accordion-group/types.d.ts +7 -12
- package/alert/Alert.js +5 -9
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.js +1 -1
- package/bleed/Bleed.stories.tsx +64 -63
- package/box/Box.d.ts +1 -1
- package/box/Box.js +8 -27
- package/box/Box.stories.tsx +38 -51
- package/box/Box.test.js +1 -1
- package/box/types.d.ts +0 -11
- package/bulleted-list/BulletedList.d.ts +7 -0
- package/bulleted-list/BulletedList.js +125 -0
- package/bulleted-list/BulletedList.stories.tsx +206 -0
- package/bulleted-list/types.d.ts +38 -0
- package/button/Button.d.ts +1 -1
- package/button/Button.js +42 -72
- package/button/Button.stories.tsx +159 -8
- package/button/Button.test.js +12 -1
- package/button/types.d.ts +9 -5
- package/card/Card.d.ts +1 -1
- package/card/Card.js +27 -45
- package/card/Card.stories.tsx +12 -42
- package/card/Card.test.js +1 -1
- package/card/types.d.ts +1 -6
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/Checkbox.js +94 -101
- package/checkbox/Checkbox.stories.tsx +131 -59
- package/checkbox/Checkbox.test.js +94 -17
- package/checkbox/types.d.ts +4 -0
- package/chip/Chip.js +28 -49
- package/chip/Chip.stories.tsx +121 -26
- package/chip/Chip.test.js +3 -5
- package/chip/types.d.ts +1 -1
- package/common/OpenSans.css +68 -80
- package/common/coreTokens.d.ts +146 -0
- package/common/coreTokens.js +167 -0
- package/common/utils.d.ts +1 -0
- package/common/utils.js +4 -4
- package/common/variables.d.ts +1490 -0
- package/common/variables.js +1016 -1117
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +258 -0
- package/date-input/DateInput.js +134 -237
- package/date-input/DateInput.stories.tsx +199 -33
- package/date-input/DateInput.test.js +494 -138
- package/date-input/DatePicker.d.ts +4 -0
- package/date-input/DatePicker.js +146 -0
- package/date-input/Icons.d.ts +6 -0
- package/date-input/Icons.js +75 -0
- package/date-input/YearPicker.d.ts +4 -0
- package/date-input/YearPicker.js +126 -0
- package/date-input/types.d.ts +51 -0
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +72 -79
- package/dialog/Dialog.stories.tsx +154 -171
- package/dialog/Dialog.test.js +334 -5
- package/dialog/types.d.ts +0 -12
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +246 -249
- package/dropdown/Dropdown.stories.tsx +245 -56
- package/dropdown/Dropdown.test.js +507 -110
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +74 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +79 -0
- package/dropdown/types.d.ts +23 -3
- package/file-input/FileInput.d.ts +2 -2
- package/file-input/FileInput.js +174 -220
- package/file-input/FileInput.stories.tsx +122 -11
- package/file-input/FileInput.test.js +14 -14
- package/file-input/FileItem.d.ts +4 -14
- package/file-input/FileItem.js +39 -63
- package/file-input/types.d.ts +18 -1
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +71 -0
- package/flex/Flex.stories.tsx +112 -0
- package/flex/types.d.ts +97 -0
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +44 -64
- package/footer/Footer.stories.tsx +37 -16
- package/footer/Footer.test.js +16 -26
- package/footer/Icons.js +1 -1
- package/footer/types.d.ts +11 -12
- package/grid/Grid.d.ts +7 -0
- package/grid/Grid.js +91 -0
- package/grid/Grid.stories.tsx +219 -0
- package/grid/types.d.ts +115 -0
- package/header/Header.d.ts +4 -3
- package/header/Header.js +83 -110
- package/header/Header.stories.tsx +118 -39
- package/header/Header.test.js +2 -2
- package/header/Icons.js +2 -2
- package/header/types.d.ts +0 -13
- package/heading/Heading.js +1 -1
- package/heading/Heading.test.js +1 -1
- package/image/Image.d.ts +4 -0
- package/image/Image.js +85 -0
- package/image/Image.stories.tsx +127 -0
- package/image/types.d.ts +72 -0
- package/inset/Inset.stories.tsx +5 -4
- package/layout/ApplicationLayout.d.ts +15 -6
- package/layout/ApplicationLayout.js +44 -69
- package/layout/ApplicationLayout.stories.tsx +80 -44
- package/layout/types.d.ts +18 -29
- package/link/Link.js +4 -4
- package/link/Link.stories.tsx +73 -6
- package/link/Link.test.js +2 -4
- package/link/types.d.ts +3 -3
- package/main.d.ts +8 -9
- package/main.js +41 -49
- package/{tabs-nav → nav-tabs}/NavTabs.d.ts +2 -2
- package/{tabs-nav → nav-tabs}/NavTabs.js +13 -16
- package/{tabs-nav → nav-tabs}/NavTabs.stories.tsx +110 -6
- package/{tabs-nav → nav-tabs}/NavTabs.test.js +1 -1
- package/{tabs-nav → nav-tabs}/Tab.js +51 -37
- package/{tabs-nav → nav-tabs}/types.d.ts +9 -10
- package/number-input/NumberInput.d.ts +7 -0
- package/number-input/NumberInput.js +6 -4
- package/number-input/NumberInput.test.js +317 -98
- package/package.json +18 -22
- package/paginator/Icons.d.ts +5 -0
- package/paginator/Icons.js +16 -28
- package/paginator/Paginator.js +8 -16
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.js +91 -39
- package/paragraph/Paragraph.d.ts +5 -0
- package/paragraph/Paragraph.js +38 -0
- package/paragraph/Paragraph.stories.tsx +44 -0
- package/password-input/Icons.d.ts +6 -0
- package/password-input/Icons.js +39 -0
- package/password-input/PasswordInput.js +35 -82
- package/password-input/PasswordInput.stories.tsx +1 -0
- package/password-input/PasswordInput.test.js +34 -40
- package/progress-bar/ProgressBar.js +60 -54
- package/progress-bar/ProgressBar.stories.jsx +38 -3
- package/progress-bar/ProgressBar.test.js +68 -23
- package/quick-nav/QuickNav.js +23 -18
- package/quick-nav/QuickNav.stories.tsx +145 -26
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +46 -31
- package/radio-group/RadioGroup.js +31 -32
- package/radio-group/RadioGroup.stories.tsx +132 -18
- package/radio-group/RadioGroup.test.js +124 -97
- package/radio-group/types.d.ts +2 -2
- package/resultsetTable/Icons.d.ts +7 -0
- package/resultsetTable/Icons.js +51 -0
- package/resultsetTable/ResultsetTable.js +49 -108
- package/resultsetTable/ResultsetTable.stories.tsx +50 -25
- package/resultsetTable/ResultsetTable.test.js +61 -42
- package/resultsetTable/types.d.ts +1 -1
- package/select/Listbox.d.ts +1 -1
- package/select/Listbox.js +33 -16
- package/select/Option.js +11 -24
- package/select/Select.js +92 -71
- package/select/Select.stories.tsx +513 -136
- package/select/Select.test.js +413 -305
- package/select/types.d.ts +3 -6
- package/sidenav/Icons.d.ts +7 -0
- package/sidenav/Icons.js +51 -0
- package/sidenav/Sidenav.d.ts +6 -5
- package/sidenav/Sidenav.js +139 -48
- package/sidenav/Sidenav.stories.tsx +251 -151
- package/sidenav/Sidenav.test.js +25 -37
- package/sidenav/types.d.ts +52 -26
- package/slider/Slider.d.ts +2 -2
- package/slider/Slider.js +121 -97
- package/slider/Slider.stories.tsx +64 -1
- package/slider/Slider.test.js +122 -22
- package/slider/types.d.ts +4 -0
- package/spinner/Spinner.js +17 -23
- package/spinner/Spinner.stories.jsx +53 -27
- package/spinner/Spinner.test.js +1 -1
- package/switch/Switch.d.ts +2 -2
- package/switch/Switch.js +137 -70
- package/switch/Switch.stories.tsx +41 -30
- package/switch/Switch.test.js +145 -18
- package/switch/types.d.ts +4 -0
- package/table/Table.js +3 -3
- package/table/Table.stories.jsx +80 -1
- package/table/Table.test.js +2 -2
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +132 -0
- package/tabs/Tabs.js +358 -108
- package/tabs/Tabs.stories.tsx +119 -5
- package/tabs/Tabs.test.js +220 -10
- package/tabs/types.d.ts +13 -3
- package/tag/Tag.js +8 -10
- package/tag/Tag.stories.tsx +14 -1
- package/tag/Tag.test.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.js +40 -11
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +134 -0
- package/text-input/TextInput.js +235 -348
- package/text-input/TextInput.stories.tsx +280 -185
- package/text-input/TextInput.test.js +736 -725
- package/text-input/types.d.ts +22 -3
- package/textarea/Textarea.js +3 -4
- package/textarea/Textarea.stories.jsx +60 -1
- package/textarea/Textarea.test.js +2 -4
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +85 -59
- package/toggle-group/ToggleGroup.stories.tsx +45 -0
- package/toggle-group/ToggleGroup.test.js +38 -24
- package/toggle-group/types.d.ts +23 -14
- package/typography/Typography.d.ts +4 -0
- package/typography/Typography.js +32 -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 +1242 -1
- package/useTheme.js +1 -1
- package/useTranslatedLabels.d.ts +84 -1
- package/utils/BaseTypography.d.ts +21 -0
- package/utils/BaseTypography.js +108 -0
- package/utils/FocusLock.d.ts +13 -0
- package/utils/FocusLock.js +138 -0
- package/wizard/Wizard.js +10 -17
- package/wizard/Wizard.stories.tsx +40 -1
- package/wizard/Wizard.test.js +1 -1
- package/wizard/types.d.ts +3 -3
- package/card/ice-cream.jpg +0 -0
- package/common/RequiredComponent.js +0 -32
- 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/number-input/NumberInputContext.d.ts +0 -4
- package/number-input/NumberInputContext.js +0 -19
- package/number-input/numberInputContextTypes.d.ts +0 -19
- 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/text/Text.d.ts +0 -7
- package/text/Text.js +0 -30
- package/text/Text.stories.tsx +0 -19
- /package/{list → bulleted-list}/types.js +0 -0
- /package/{row → flex}/types.js +0 -0
- /package/{stack → grid}/types.js +0 -0
- /package/{tabs-nav → image}/types.js +0 -0
- /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
- /package/{number-input/numberInputContextTypes.js → nav-tabs/types.js} +0 -0
package/text-input/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare type Margin = {
|
|
|
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 Action = {
|
|
11
11
|
/**
|
|
12
12
|
* This function will be called when the user clicks the action.
|
|
@@ -159,20 +159,39 @@ declare type Props = {
|
|
|
159
159
|
*/
|
|
160
160
|
tabIndex?: number;
|
|
161
161
|
};
|
|
162
|
+
/**
|
|
163
|
+
* List of suggestions of an Text Input component.
|
|
164
|
+
*/
|
|
165
|
+
export declare type SuggestionsProps = {
|
|
166
|
+
id: string;
|
|
167
|
+
value: string;
|
|
168
|
+
suggestions: string[];
|
|
169
|
+
visualFocusIndex: number;
|
|
170
|
+
highlightedSuggestions: boolean;
|
|
171
|
+
searchHasErrors: boolean;
|
|
172
|
+
isSearching: boolean;
|
|
173
|
+
suggestionOnClick: (suggestion: string) => void;
|
|
174
|
+
getTextInputWidth: () => number;
|
|
175
|
+
};
|
|
162
176
|
/**
|
|
163
177
|
* Reference to the component.
|
|
164
178
|
*/
|
|
165
179
|
export declare type RefType = HTMLDivElement;
|
|
166
180
|
/**
|
|
167
|
-
* Single suggestion of
|
|
181
|
+
* Single suggestion of an Text Input component.
|
|
168
182
|
*/
|
|
169
183
|
export declare type SuggestionProps = {
|
|
170
184
|
id: string;
|
|
171
185
|
value: string;
|
|
172
|
-
onClick: () => void;
|
|
186
|
+
onClick: (suggestion: string) => void;
|
|
173
187
|
suggestion: string;
|
|
174
188
|
isLast: boolean;
|
|
175
189
|
visuallyFocused: boolean;
|
|
176
190
|
highlighted: boolean;
|
|
177
191
|
};
|
|
192
|
+
export declare type AutosuggestWrapperProps = {
|
|
193
|
+
condition: boolean;
|
|
194
|
+
wrapper: (children: React.ReactNode) => JSX.Element;
|
|
195
|
+
children: React.ReactNode;
|
|
196
|
+
};
|
|
178
197
|
export default Props;
|
package/textarea/Textarea.js
CHANGED
|
@@ -19,13 +19,13 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
19
19
|
|
|
20
20
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
21
21
|
|
|
22
|
-
var _utils = require("../common/utils
|
|
22
|
+
var _utils = require("../common/utils");
|
|
23
23
|
|
|
24
24
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
25
|
|
|
26
26
|
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
27
27
|
|
|
28
|
-
var _variables = require("../common/variables
|
|
28
|
+
var _variables = require("../common/variables");
|
|
29
29
|
|
|
30
30
|
var _uuid = require("uuid");
|
|
31
31
|
|
|
@@ -171,7 +171,6 @@ var DxcTextarea = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref)
|
|
|
171
171
|
backgroundType: backgroundType,
|
|
172
172
|
ref: textareaRef,
|
|
173
173
|
tabIndex: tabIndex,
|
|
174
|
-
"aria-disabled": disabled,
|
|
175
174
|
"aria-invalid": error ? "true" : "false",
|
|
176
175
|
"aria-errormessage": error ? errorId : undefined,
|
|
177
176
|
"aria-required": optional ? "false" : "true"
|
|
@@ -193,7 +192,7 @@ var calculateWidth = function calculateWidth(margin, size) {
|
|
|
193
192
|
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
194
193
|
};
|
|
195
194
|
|
|
196
|
-
var TextareaContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n
|
|
195
|
+
var TextareaContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
|
|
197
196
|
return calculateWidth(props.margin, props.size);
|
|
198
197
|
}, function (props) {
|
|
199
198
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
@@ -4,12 +4,20 @@ import Title from "../../.storybook/components/Title";
|
|
|
4
4
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
5
|
import { BackgroundColorProvider } from "../BackgroundColorContext";
|
|
6
6
|
import DarkContainer from "../../.storybook/components/DarkSection";
|
|
7
|
+
import { HalstackProvider } from "../HalstackContext";
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
10
|
title: "Textarea",
|
|
10
11
|
component: DxcTextarea,
|
|
11
12
|
};
|
|
12
13
|
|
|
14
|
+
const opinionatedTheme = {
|
|
15
|
+
textarea: {
|
|
16
|
+
fontColor: "#000000",
|
|
17
|
+
hoverBorderColor: "#a46ede",
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
13
21
|
export const Chromatic = () => (
|
|
14
22
|
<>
|
|
15
23
|
<>
|
|
@@ -151,7 +159,58 @@ export const Chromatic = () => (
|
|
|
151
159
|
<ExampleContainer>
|
|
152
160
|
<Title title="Xxlarge margin" theme="light" level={4} />
|
|
153
161
|
<DxcTextarea label="Xxlarge" margin="xxlarge" />
|
|
154
|
-
|
|
162
|
+
</ExampleContainer>
|
|
163
|
+
<Title title="Opinionated theme" theme="light" level={2} />
|
|
164
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
165
|
+
<Title title="Hovered" theme="light" level={4} />
|
|
166
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
167
|
+
<DxcTextarea label="Hovered" helperText="Sample text" placeholder="Placeholder" />
|
|
168
|
+
</HalstackProvider>
|
|
169
|
+
</ExampleContainer>
|
|
170
|
+
<ExampleContainer pseudoState="pseudo-focus">
|
|
171
|
+
<Title title="Focused" theme="light" level={4} />
|
|
172
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
173
|
+
<DxcTextarea label="Focused" helperText="Sample text" />
|
|
174
|
+
</HalstackProvider>
|
|
175
|
+
</ExampleContainer>
|
|
176
|
+
<ExampleContainer>
|
|
177
|
+
<Title title="Disabled" theme="light" level={4} />
|
|
178
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
179
|
+
<DxcTextarea
|
|
180
|
+
label="Disabled"
|
|
181
|
+
optional
|
|
182
|
+
helperText="Sample text"
|
|
183
|
+
placeholder="Enter your text here..."
|
|
184
|
+
disabled
|
|
185
|
+
/>
|
|
186
|
+
</HalstackProvider>
|
|
187
|
+
</ExampleContainer>
|
|
188
|
+
<ExampleContainer>
|
|
189
|
+
<Title title="Disabled with value" theme="light" level={4} />
|
|
190
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
191
|
+
<DxcTextarea label="Disabled" helperText="Sample text" defaultValue="Example text" disabled />
|
|
192
|
+
</HalstackProvider>
|
|
193
|
+
</ExampleContainer>
|
|
194
|
+
<ExampleContainer>
|
|
195
|
+
<Title title="With error" theme="light" level={4} />
|
|
196
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
197
|
+
<DxcTextarea
|
|
198
|
+
label="Textarea with error"
|
|
199
|
+
helperText="Helper text"
|
|
200
|
+
placeholder="Enter your text here..."
|
|
201
|
+
error="Error message."
|
|
202
|
+
/>
|
|
203
|
+
</HalstackProvider>
|
|
204
|
+
</ExampleContainer>
|
|
205
|
+
<ExampleContainer>
|
|
206
|
+
<Title title="Grow manual" theme="light" level={4} />{" "}
|
|
207
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
208
|
+
<DxcTextarea
|
|
209
|
+
label="Manual vertical grow"
|
|
210
|
+
verticalGrow="manual"
|
|
211
|
+
defaultValue="Long textttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt"
|
|
212
|
+
/>
|
|
213
|
+
</HalstackProvider>
|
|
155
214
|
</ExampleContainer>
|
|
156
215
|
</>
|
|
157
216
|
);
|
|
@@ -8,7 +8,7 @@ var _react2 = require("@testing-library/react");
|
|
|
8
8
|
|
|
9
9
|
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
|
10
10
|
|
|
11
|
-
var _Textarea = _interopRequireDefault(require("./Textarea"));
|
|
11
|
+
var _Textarea = _interopRequireDefault(require("./Textarea.tsx"));
|
|
12
12
|
|
|
13
13
|
describe("Textarea component tests", function () {
|
|
14
14
|
test("Renders with correct label", function () {
|
|
@@ -85,7 +85,6 @@ describe("Textarea component tests", function () {
|
|
|
85
85
|
getByLabelText = _render7.getByLabelText;
|
|
86
86
|
|
|
87
87
|
var textarea = getByLabelText("Example label");
|
|
88
|
-
expect(textarea.getAttribute("aria-disabled")).toBe("false");
|
|
89
88
|
expect(textarea.getAttribute("aria-invalid")).toBe("false");
|
|
90
89
|
expect(textarea.getAttribute("aria-describedBy")).toBeNull();
|
|
91
90
|
expect(textarea.getAttribute("aria-required")).toBe("true");
|
|
@@ -101,7 +100,7 @@ describe("Textarea component tests", function () {
|
|
|
101
100
|
var textarea = getByLabelText("Example label");
|
|
102
101
|
expect(textarea.value).toBe("Example text");
|
|
103
102
|
});
|
|
104
|
-
test("Disabled textarea
|
|
103
|
+
test("Disabled textarea can not be modified", function () {
|
|
105
104
|
var onChange = jest.fn();
|
|
106
105
|
|
|
107
106
|
var _render9 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Textarea["default"], {
|
|
@@ -112,7 +111,6 @@ describe("Textarea component tests", function () {
|
|
|
112
111
|
getByLabelText = _render9.getByLabelText;
|
|
113
112
|
|
|
114
113
|
var textarea = getByLabelText("Example label");
|
|
115
|
-
expect(textarea.getAttribute("aria-disabled")).toBe("true");
|
|
116
114
|
|
|
117
115
|
_userEvent["default"].type(textarea, "Test");
|
|
118
116
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
declare const DxcToggleGroup: ({ label, helperText, defaultValue, value, onChange, disabled, options, margin, multiple, tabIndex, }:
|
|
2
|
+
import ToggleGroupPropsType from "./types";
|
|
3
|
+
declare const DxcToggleGroup: ({ label, helperText, defaultValue, value, onChange, disabled, options, margin, multiple, tabIndex, }: ToggleGroupPropsType) => JSX.Element;
|
|
4
4
|
export default DxcToggleGroup;
|
|
@@ -21,11 +21,15 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
21
21
|
|
|
22
22
|
var _uuid = require("uuid");
|
|
23
23
|
|
|
24
|
-
var _variables = require("../common/variables
|
|
24
|
+
var _variables = require("../common/variables");
|
|
25
25
|
|
|
26
26
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
|
|
29
|
+
|
|
30
|
+
var _Flex = _interopRequireDefault(require("../flex/Flex"));
|
|
31
|
+
|
|
32
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
29
33
|
|
|
30
34
|
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); }
|
|
31
35
|
|
|
@@ -45,16 +49,18 @@ var DxcToggleGroup = function DxcToggleGroup(_ref) {
|
|
|
45
49
|
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
|
|
46
50
|
_ref$tabIndex = _ref.tabIndex,
|
|
47
51
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
48
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
49
52
|
|
|
50
|
-
var _useState = (0, _react.useState)(
|
|
51
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState,
|
|
52
|
-
|
|
53
|
-
setSelectedValue = _useState2[1];
|
|
53
|
+
var _useState = (0, _react.useState)("label-toggle-group-".concat((0, _uuid.v4)())),
|
|
54
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 1),
|
|
55
|
+
toggleGroupLabelId = _useState2[0];
|
|
54
56
|
|
|
55
|
-
var _useState3 = (0, _react.useState)(
|
|
56
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3,
|
|
57
|
-
|
|
57
|
+
var _useState3 = (0, _react.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : multiple ? [] : -1),
|
|
58
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
59
|
+
selectedValue = _useState4[0],
|
|
60
|
+
setSelectedValue = _useState4[1];
|
|
61
|
+
|
|
62
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
63
|
+
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
58
64
|
|
|
59
65
|
var handleToggleChange = function handleToggleChange(selectedOption) {
|
|
60
66
|
var newSelectedOptions;
|
|
@@ -89,51 +95,67 @@ var DxcToggleGroup = function DxcToggleGroup(_ref) {
|
|
|
89
95
|
onChange === null || onChange === void 0 ? void 0 : onChange(multiple ? newSelectedOptions : selectedOption);
|
|
90
96
|
};
|
|
91
97
|
|
|
92
|
-
var
|
|
93
|
-
event.
|
|
94
|
-
|
|
98
|
+
var handleOnKeyDown = function handleOnKeyDown(event, optionValue) {
|
|
99
|
+
switch (event.key) {
|
|
100
|
+
case "Enter":
|
|
101
|
+
case " ":
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
handleToggleChange(optionValue);
|
|
104
|
+
}
|
|
95
105
|
};
|
|
96
106
|
|
|
97
107
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
98
108
|
theme: colorsTheme.toggleGroup
|
|
99
109
|
}, /*#__PURE__*/_react["default"].createElement(ToggleGroup, {
|
|
100
|
-
margin: margin
|
|
101
|
-
disabled: disabled
|
|
110
|
+
margin: margin
|
|
102
111
|
}, /*#__PURE__*/_react["default"].createElement(Label, {
|
|
103
|
-
|
|
112
|
+
id: toggleGroupLabelId,
|
|
104
113
|
disabled: disabled
|
|
105
114
|
}, label), /*#__PURE__*/_react["default"].createElement(HelperText, {
|
|
106
115
|
disabled: disabled
|
|
107
116
|
}, helperText), /*#__PURE__*/_react["default"].createElement(OptionsContainer, {
|
|
108
|
-
|
|
109
|
-
role: multiple ? "group" : "radiogroup"
|
|
117
|
+
"aria-labelledby": toggleGroupLabelId
|
|
110
118
|
}, options.map(function (option, i) {
|
|
111
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"aria-
|
|
115
|
-
|
|
119
|
+
return /*#__PURE__*/_react["default"].createElement(ToggleButton, {
|
|
120
|
+
key: "toggle-".concat(i, "-").concat(option.label),
|
|
121
|
+
"aria-label": option.title,
|
|
122
|
+
"aria-pressed": multiple ? value ? Array.isArray(value) && value.includes(option.value) : Array.isArray(selectedValue) && selectedValue.includes(option.value) : value ? option.value === value : option.value === selectedValue,
|
|
123
|
+
disabled: disabled,
|
|
116
124
|
onClick: function onClick() {
|
|
117
|
-
|
|
125
|
+
handleToggleChange(option.value);
|
|
118
126
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
isIcon: option.icon,
|
|
122
|
-
optionLabel: option.label,
|
|
123
|
-
disabled: disabled,
|
|
124
|
-
onKeyPress: function onKeyPress(event) {
|
|
125
|
-
handleKeyPress(event, option.value);
|
|
127
|
+
onKeyDown: function onKeyDown(event) {
|
|
128
|
+
handleOnKeyDown(event, option.value);
|
|
126
129
|
},
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
tabIndex: !disabled ? tabIndex : -1,
|
|
131
|
+
title: option.title,
|
|
132
|
+
backgroundType: backgroundType,
|
|
133
|
+
hasIcon: option.icon,
|
|
134
|
+
optionLabel: option.label,
|
|
135
|
+
selected: multiple ? value ? Array.isArray(value) && value.includes(option.value) : Array.isArray(selectedValue) && selectedValue.includes(option.value) : value ? option.value === value : option.value === selectedValue
|
|
136
|
+
}, /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
137
|
+
alignItems: "center"
|
|
138
|
+
}, option.icon && /*#__PURE__*/_react["default"].createElement(IconContainer, {
|
|
129
139
|
optionLabel: option.label
|
|
130
|
-
}, typeof option.icon === "string" ? /*#__PURE__*/_react["default"].createElement(
|
|
140
|
+
}, typeof option.icon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
131
141
|
src: option.icon
|
|
132
142
|
}) : option.icon), option.label && /*#__PURE__*/_react["default"].createElement(LabelContainer, null, option.label)));
|
|
133
143
|
}))));
|
|
134
144
|
};
|
|
135
145
|
|
|
136
|
-
var
|
|
146
|
+
var ToggleGroup = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n flex-direction: column;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
|
|
147
|
+
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
148
|
+
}, function (props) {
|
|
149
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
150
|
+
}, function (props) {
|
|
151
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
|
|
152
|
+
}, function (props) {
|
|
153
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
154
|
+
}, function (props) {
|
|
155
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
var Label = _styledComponents["default"].label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (props) {
|
|
137
159
|
return props.disabled ? props.theme.disabledLabelFontColor : props.theme.labelFontColor;
|
|
138
160
|
}, function (props) {
|
|
139
161
|
return props.theme.labelFontFamily;
|
|
@@ -147,7 +169,7 @@ var Label = _styledComponents["default"].label(_templateObject || (_templateObje
|
|
|
147
169
|
return props.theme.labelLineHeight;
|
|
148
170
|
});
|
|
149
171
|
|
|
150
|
-
var HelperText = _styledComponents["default"].span(
|
|
172
|
+
var HelperText = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (props) {
|
|
151
173
|
return props.disabled ? props.theme.disabledHelperTextFontcolor : props.theme.helperTextFontColor;
|
|
152
174
|
}, function (props) {
|
|
153
175
|
return props.theme.helperTextFontFamily;
|
|
@@ -161,19 +183,7 @@ var HelperText = _styledComponents["default"].span(_templateObject2 || (_templat
|
|
|
161
183
|
return props.theme.helperTextLineHeight;
|
|
162
184
|
});
|
|
163
185
|
|
|
164
|
-
var
|
|
165
|
-
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
166
|
-
}, function (props) {
|
|
167
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
168
|
-
}, function (props) {
|
|
169
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
|
|
170
|
-
}, function (props) {
|
|
171
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
172
|
-
}, function (props) {
|
|
173
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
var OptionsContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n width: max-content;\n opacity: 1;\n height: calc(48px - 4px - 4px);\n border-width: ", ";\n border-style: ", ";\n border-radius: ", ";\n border-color: ", ";\n background-color: ", ";\n padding: 4px;\n margin-top: ", ";\n"])), function (props) {
|
|
186
|
+
var OptionsContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n gap: 0.25rem;\n width: max-content;\n height: calc(48px - 4px - 4px);\n padding: 0.25rem;\n border-width: ", ";\n border-style: ", ";\n border-radius: ", ";\n border-color: ", ";\n margin-top: ", ";\n background-color: ", ";\n"])), function (props) {
|
|
177
187
|
return props.theme.containerBorderThickness;
|
|
178
188
|
}, function (props) {
|
|
179
189
|
return props.theme.containerBorderStyle;
|
|
@@ -181,16 +191,36 @@ var OptionsContainer = _styledComponents["default"].div(_templateObject4 || (_te
|
|
|
181
191
|
return props.theme.containerBorderRadius;
|
|
182
192
|
}, function (props) {
|
|
183
193
|
return props.theme.containerBorderColor;
|
|
184
|
-
}, function (props) {
|
|
185
|
-
return props.theme.containerBackgroundColor;
|
|
186
194
|
}, function (props) {
|
|
187
195
|
return props.theme.containerMarginTop;
|
|
196
|
+
}, function (props) {
|
|
197
|
+
return props.theme.containerBackgroundColor;
|
|
188
198
|
});
|
|
189
199
|
|
|
190
|
-
var
|
|
191
|
-
return
|
|
200
|
+
var ToggleButton = _styledComponents["default"].button(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding-left: ", ";\n padding-right: ", ";\n border-width: ", ";\n border-style: ", ";\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n color: #ffffff;\n }\n &:focus {\n outline: none;\n box-shadow: ", ";\n }\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n"])), function (props) {
|
|
201
|
+
return props.optionLabel && props.hasIcon || props.optionLabel && !props.hasIcon ? props.theme.labelPaddingLeft : props.theme.iconPaddingLeft;
|
|
192
202
|
}, function (props) {
|
|
193
|
-
return
|
|
203
|
+
return props.optionLabel && props.hasIcon || props.optionLabel && !props.hasIcon ? props.theme.labelPaddingRight : props.theme.iconPaddingRight;
|
|
204
|
+
}, function (props) {
|
|
205
|
+
return props.theme.optionBorderThickness;
|
|
206
|
+
}, function (props) {
|
|
207
|
+
return props.theme.optionBorderStyle;
|
|
208
|
+
}, function (props) {
|
|
209
|
+
return props.theme.optionBorderRadius;
|
|
210
|
+
}, function (props) {
|
|
211
|
+
return props.selected ? props.theme.selectedBackgroundColor : props.theme.unselectedBackgroundColor;
|
|
212
|
+
}, function (props) {
|
|
213
|
+
return props.selected ? props.theme.selectedFontColor : props.theme.unselectedFontColor;
|
|
214
|
+
}, function (props) {
|
|
215
|
+
return props.selected ? props.theme.selectedHoverBackgroundColor : props.theme.unselectedHoverBackgroundColor;
|
|
216
|
+
}, function (props) {
|
|
217
|
+
return props.selected ? props.theme.selectedActiveBackgroundColor : props.theme.unselectedActiveBackgroundColor;
|
|
218
|
+
}, function (props) {
|
|
219
|
+
return "0 0 0 ".concat(props.theme.optionFocusBorderThickness, " ").concat(props.backgroundType === "dark" ? props.theme.focusColorOnDark : props.theme.focusColor);
|
|
220
|
+
}, function (props) {
|
|
221
|
+
return props.selected ? props.theme.selectedDisabledBackgroundColor : props.theme.unselectedDisabledBackgroundColor;
|
|
222
|
+
}, function (props) {
|
|
223
|
+
return props.selected ? props.theme.selectedDisabledFontColor : props.theme.unselectedDisabledFontColor;
|
|
194
224
|
});
|
|
195
225
|
|
|
196
226
|
var LabelContainer = _styledComponents["default"].span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"])), function (props) {
|
|
@@ -203,11 +233,7 @@ var LabelContainer = _styledComponents["default"].span(_templateObject6 || (_tem
|
|
|
203
233
|
return props.theme.optionLabelFontWeight;
|
|
204
234
|
});
|
|
205
235
|
|
|
206
|
-
var
|
|
207
|
-
|
|
208
|
-
var Icon = _styledComponents["default"].img(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])([""])));
|
|
209
|
-
|
|
210
|
-
var IconContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: ", ";\n height: 24px;\n width: 24px;\n overflow: hidden;\n display: flex;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
|
|
236
|
+
var IconContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n height: 24px;\n width: 24px;\n margin-right: ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
|
|
211
237
|
return props.optionLabel && props.theme.iconMarginRight;
|
|
212
238
|
});
|
|
213
239
|
|
|
@@ -3,6 +3,7 @@ import { userEvent, within } from "@storybook/testing-library";
|
|
|
3
3
|
import DxcToggleGroup from "./ToggleGroup";
|
|
4
4
|
import Title from "../../.storybook/components/Title";
|
|
5
5
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
6
|
+
import { HalstackProvider } from "../HalstackContext";
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
title: "ToggleGroup",
|
|
@@ -52,14 +53,17 @@ const optionsWithIcon = [
|
|
|
52
53
|
{
|
|
53
54
|
value: 1,
|
|
54
55
|
icon: wifiSVG,
|
|
56
|
+
title: "WiFi connection",
|
|
55
57
|
},
|
|
56
58
|
{
|
|
57
59
|
value: 2,
|
|
58
60
|
icon: ethernetSVG,
|
|
61
|
+
title: "Ethernet connection",
|
|
59
62
|
},
|
|
60
63
|
{
|
|
61
64
|
value: 3,
|
|
62
65
|
icon: gMobileSVG,
|
|
66
|
+
title: "3G Mobile data connection",
|
|
63
67
|
},
|
|
64
68
|
];
|
|
65
69
|
const optionsWithIconAndLabel = [
|
|
@@ -89,6 +93,16 @@ const twoOptions = [
|
|
|
89
93
|
label: "Twitter",
|
|
90
94
|
},
|
|
91
95
|
];
|
|
96
|
+
|
|
97
|
+
const opinionatedTheme = {
|
|
98
|
+
toggleGroup: {
|
|
99
|
+
selectedBaseColor: "#5f249f",
|
|
100
|
+
selectedFontColor: "#ffffff",
|
|
101
|
+
unselectedBaseColor: "#e6e6e6",
|
|
102
|
+
unselectedFontColor: "#000000",
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
|
|
92
106
|
export const Chromatic = () => (
|
|
93
107
|
<>
|
|
94
108
|
<ExampleContainer>
|
|
@@ -154,6 +168,37 @@ export const Chromatic = () => (
|
|
|
154
168
|
<Title title="xxLarge" theme="light" level={4} />
|
|
155
169
|
<DxcToggleGroup label="xxLarge margin" options={options} margin="xxlarge" />
|
|
156
170
|
</ExampleContainer>
|
|
171
|
+
<Title title="Opinionated theme" theme="light" level={2} />
|
|
172
|
+
<ExampleContainer>
|
|
173
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
174
|
+
<Title title="Selected" theme="light" level={4} />
|
|
175
|
+
<DxcToggleGroup label="Selected" helperText="HelperText" defaultValue={2} options={options} />
|
|
176
|
+
</HalstackProvider>
|
|
177
|
+
</ExampleContainer>
|
|
178
|
+
<ExampleContainer>
|
|
179
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
180
|
+
<Title title="Icons & label toggle group" theme="light" level={4} />
|
|
181
|
+
<DxcToggleGroup label="Icons & label" options={optionsWithIconAndLabel} />
|
|
182
|
+
</HalstackProvider>
|
|
183
|
+
</ExampleContainer>
|
|
184
|
+
<ExampleContainer>
|
|
185
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
186
|
+
<Title title="Disabled" theme="light" level={4} />
|
|
187
|
+
<DxcToggleGroup label="Disabled" defaultValue={2} options={options} disabled />
|
|
188
|
+
</HalstackProvider>
|
|
189
|
+
</ExampleContainer>
|
|
190
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
191
|
+
<Title title="Hovered" theme="light" level={4} />
|
|
192
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
193
|
+
<DxcToggleGroup label="Hovered" options={twoOptions} defaultValue={2} />
|
|
194
|
+
</HalstackProvider>
|
|
195
|
+
</ExampleContainer>
|
|
196
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
197
|
+
<Title title="Actived" theme="light" level={4} />
|
|
198
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
199
|
+
<DxcToggleGroup label="Actived" options={twoOptions} defaultValue={2} />
|
|
200
|
+
</HalstackProvider>
|
|
201
|
+
</ExampleContainer>
|
|
157
202
|
</>
|
|
158
203
|
);
|
|
159
204
|
const OptionSelected = () => <DxcToggleGroup label="Toggle group" helperText="HelperText" options={options} />;
|