@dxc-technology/halstack-react 12.0.0 → 12.0.1
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 +0 -3
- package/HalstackContext.js +2 -6
- package/accordion/Accordion.accessibility.test.d.ts +1 -0
- package/accordion/Accordion.accessibility.test.js +1 -1
- package/accordion/Accordion.js +5 -8
- package/accordion/Accordion.test.d.ts +1 -0
- package/accordion/Accordion.test.js +3 -3
- package/accordion-group/AccordionGroup.accessibility.test.d.ts +1 -0
- package/accordion-group/AccordionGroup.accessibility.test.js +8 -14
- package/accordion-group/AccordionGroup.test.d.ts +1 -0
- package/accordion-group/AccordionGroup.test.js +5 -9
- package/action-icon/ActionIcon.accessibility.test.d.ts +1 -0
- package/action-icon/ActionIcon.accessibility.test.js +1 -1
- package/action-icon/ActionIcon.test.d.ts +1 -0
- package/action-icon/ActionIcon.test.js +1 -1
- package/alert/Alert.accessibility.test.d.ts +1 -0
- package/alert/Alert.accessibility.test.js +1 -1
- package/alert/Alert.test.d.ts +1 -0
- package/alert/Alert.test.js +1 -1
- package/badge/Badge.accessibility.test.d.ts +1 -0
- package/badge/Badge.accessibility.test.js +2 -2
- package/badge/Badge.test.d.ts +1 -0
- package/badge/Badge.test.js +2 -2
- package/box/Box.accessibility.test.d.ts +1 -0
- package/box/Box.accessibility.test.js +1 -1
- package/box/Box.test.d.ts +1 -0
- package/box/Box.test.js +1 -1
- package/bulleted-list/BulletedList.accessibility.test.d.ts +1 -0
- package/button/Button.accessibility.test.d.ts +1 -0
- package/button/Button.accessibility.test.js +1 -1
- package/button/Button.test.d.ts +1 -0
- package/button/Button.test.js +1 -1
- package/card/Card.accessibility.test.d.ts +1 -0
- package/card/Card.accessibility.test.js +1 -1
- package/card/Card.test.d.ts +1 -0
- package/card/Card.test.js +1 -1
- package/checkbox/Checkbox.accessibility.test.d.ts +1 -0
- package/checkbox/Checkbox.accessibility.test.js +1 -1
- package/checkbox/Checkbox.js +5 -8
- package/checkbox/Checkbox.test.d.ts +1 -0
- package/checkbox/Checkbox.test.js +1 -1
- package/chip/Chip.accessibility.test.d.ts +1 -0
- package/chip/Chip.accessibility.test.js +3 -1
- package/chip/Chip.js +10 -21
- package/chip/Chip.stories.tsx +78 -46
- package/chip/Chip.test.d.ts +1 -0
- package/chip/Chip.test.js +1 -1
- package/chip/types.d.ts +35 -12
- package/common/fonts.css +2 -0
- package/common/variables.d.ts +0 -3
- package/common/variables.js +1 -4
- package/contextual-menu/ContextualMenu.accessibility.test.d.ts +1 -0
- package/contextual-menu/ContextualMenu.accessibility.test.js +2 -1
- package/contextual-menu/ContextualMenu.test.d.ts +1 -0
- package/contextual-menu/ContextualMenu.test.js +1 -1
- package/date-input/DateInput.accessibility.test.d.ts +1 -0
- package/date-input/DateInput.accessibility.test.js +4 -2
- package/date-input/DateInput.js +15 -15
- package/date-input/DateInput.test.d.ts +1 -0
- package/date-input/DateInput.test.js +9 -8
- package/dialog/Dialog.accessibility.test.d.ts +1 -0
- package/dialog/Dialog.accessibility.test.js +1 -1
- package/dialog/Dialog.stories.tsx +1 -2
- package/dialog/Dialog.test.d.ts +1 -0
- package/dialog/Dialog.test.js +112 -48
- package/divider/Divider.accessibility.test.d.ts +1 -0
- package/divider/Divider.test.d.ts +1 -0
- package/dropdown/Dropdown.accessibility.test.d.ts +1 -0
- package/dropdown/Dropdown.accessibility.test.js +6 -2
- package/dropdown/Dropdown.js +11 -12
- package/dropdown/Dropdown.test.d.ts +1 -0
- package/dropdown/Dropdown.test.js +82 -52
- package/file-input/FileInput.accessibility.test.d.ts +1 -0
- package/file-input/FileInput.accessibility.test.js +25 -18
- package/file-input/FileInput.js +1 -4
- package/file-input/FileInput.test.d.ts +1 -0
- package/file-input/FileInput.test.js +44 -22
- package/footer/Footer.accessibility.test.d.ts +1 -0
- package/footer/Footer.accessibility.test.js +1 -1
- package/footer/Footer.test.d.ts +1 -0
- package/footer/Footer.test.js +1 -1
- package/header/Header.accessibility.test.d.ts +1 -0
- package/header/Header.accessibility.test.js +5 -4
- package/header/Header.test.d.ts +1 -0
- package/header/Header.test.js +1 -1
- package/heading/Heading.accessibility.test.d.ts +1 -0
- package/heading/Heading.accessibility.test.js +1 -1
- package/heading/Heading.test.d.ts +1 -0
- package/heading/Heading.test.js +1 -14
- package/icon/Icon.accessibility.test.d.ts +1 -0
- package/image/Image.accessibility.test.d.ts +1 -0
- package/link/Link.accessibility.test.d.ts +1 -0
- package/link/Link.accessibility.test.js +2 -2
- package/link/Link.test.d.ts +1 -0
- package/link/Link.test.js +1 -1
- package/main.d.ts +1 -0
- package/main.js +1 -0
- package/nav-tabs/NavTabs.accessibility.test.d.ts +1 -0
- package/nav-tabs/NavTabs.accessibility.test.js +1 -1
- package/nav-tabs/NavTabs.js +18 -3
- package/nav-tabs/NavTabs.stories.tsx +18 -3
- package/nav-tabs/NavTabs.test.d.ts +1 -0
- package/nav-tabs/NavTabs.test.js +1 -1
- package/nav-tabs/Tab.js +1 -1
- package/number-input/NumberInput.accessibility.test.d.ts +1 -0
- package/number-input/NumberInput.accessibility.test.js +1 -1
- package/number-input/NumberInput.test.d.ts +1 -0
- package/number-input/NumberInput.test.js +5 -5
- package/package.json +6 -6
- package/paginator/Paginator.accessibility.test.d.ts +1 -0
- package/paginator/Paginator.accessibility.test.js +1 -1
- package/paginator/Paginator.test.d.ts +1 -0
- package/paginator/Paginator.test.js +1 -1
- package/paragraph/Paragraph.accessibility.test.d.ts +1 -0
- package/password-input/PasswordInput.accessibility.test.d.ts +1 -0
- package/password-input/PasswordInput.accessibility.test.js +1 -1
- package/password-input/PasswordInput.test.d.ts +1 -0
- package/password-input/PasswordInput.test.js +1 -1
- package/progress-bar/ProgressBar.accessibility.test.d.ts +1 -0
- package/progress-bar/ProgressBar.accessibility.test.js +1 -1
- package/progress-bar/ProgressBar.test.d.ts +1 -0
- package/progress-bar/ProgressBar.test.js +1 -1
- package/quick-nav/QuickNav.accessibility.test.d.ts +1 -0
- package/radio-group/Radio.js +5 -8
- package/radio-group/RadioGroup.accessibility.test.d.ts +1 -0
- package/radio-group/RadioGroup.accessibility.test.js +1 -1
- package/radio-group/RadioGroup.js +12 -15
- package/radio-group/RadioGroup.test.d.ts +1 -0
- package/radio-group/RadioGroup.test.js +3 -5
- package/resultset-table/ResultsetTable.accessibility.test.d.ts +1 -0
- package/resultset-table/ResultsetTable.accessibility.test.js +1 -1
- package/resultset-table/ResultsetTable.test.d.ts +1 -0
- package/resultset-table/ResultsetTable.test.js +1 -2
- package/select/Listbox.js +6 -10
- package/select/Select.accessibility.test.d.ts +1 -0
- package/select/Select.accessibility.test.js +3 -3
- package/select/Select.js +15 -17
- package/select/Select.test.d.ts +1 -0
- package/select/Select.test.js +6 -3
- package/sidenav/Sidenav.accessibility.test.d.ts +1 -0
- package/sidenav/Sidenav.accessibility.test.js +1 -1
- package/sidenav/Sidenav.test.d.ts +1 -0
- package/sidenav/Sidenav.test.js +1 -1
- package/slider/Slider.accessibility.test.d.ts +1 -0
- package/slider/Slider.accessibility.test.js +1 -1
- package/slider/Slider.js +8 -11
- package/slider/Slider.stories.tsx +180 -0
- package/slider/Slider.test.d.ts +1 -0
- package/slider/Slider.test.js +12 -9
- package/spinner/Spinner.accessibility.test.d.ts +1 -0
- package/spinner/Spinner.accessibility.test.js +2 -2
- package/spinner/Spinner.test.d.ts +1 -0
- package/spinner/Spinner.test.js +1 -1
- package/status-light/StatusLight.accessibility.test.d.ts +1 -0
- package/status-light/StatusLight.accessibility.test.js +2 -2
- package/status-light/StatusLight.test.d.ts +1 -0
- package/status-light/StatusLight.test.js +1 -1
- package/switch/Switch.accessibility.test.d.ts +1 -0
- package/switch/Switch.accessibility.test.js +1 -1
- package/switch/Switch.js +5 -8
- package/switch/Switch.test.d.ts +1 -0
- package/switch/Switch.test.js +1 -1
- package/table/Table.accessibility.test.d.ts +1 -0
- package/table/Table.accessibility.test.js +1 -1
- package/table/Table.test.d.ts +1 -0
- package/table/Table.test.js +1 -2
- package/tabs/Tabs.accessibility.test.d.ts +1 -0
- package/tabs/Tabs.accessibility.test.js +1 -1
- package/tabs/Tabs.test.d.ts +1 -0
- package/tabs/Tabs.test.js +1 -1
- package/tag/Tag.accessibility.test.d.ts +1 -0
- package/tag/Tag.accessibility.test.js +1 -1
- package/tag/Tag.test.d.ts +1 -0
- package/tag/Tag.test.js +1 -1
- package/text-input/TextInput.accessibility.test.d.ts +1 -0
- package/text-input/TextInput.accessibility.test.js +1 -1
- package/text-input/TextInput.js +19 -21
- package/text-input/TextInput.test.d.ts +1 -0
- package/text-input/TextInput.test.js +1 -1
- package/textarea/Textarea.accessibility.test.d.ts +1 -0
- package/textarea/Textarea.accessibility.test.js +1 -1
- package/textarea/Textarea.js +1 -4
- package/textarea/Textarea.test.d.ts +1 -0
- package/textarea/Textarea.test.js +1 -1
- package/toggle-group/ToggleGroup.accessibility.test.d.ts +1 -0
- package/toggle-group/ToggleGroup.accessibility.test.js +2 -2
- package/toggle-group/ToggleGroup.js +5 -8
- package/toggle-group/ToggleGroup.test.d.ts +1 -0
- package/toggle-group/ToggleGroup.test.js +1 -1
- package/typography/Typography.accessibility.test.d.ts +1 -0
- package/useTheme.d.ts +0 -3
- package/wizard/Wizard.accessibility.test.d.ts +1 -0
- package/wizard/Wizard.accessibility.test.js +1 -1
- package/wizard/Wizard.test.d.ts +1 -0
- package/wizard/Wizard.test.js +1 -1
|
@@ -11,7 +11,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
14
|
-
var _uuid = require("uuid");
|
|
15
14
|
var _variables = require("../common/variables");
|
|
16
15
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
17
16
|
var _Flex = _interopRequireDefault(require("../flex/Flex"));
|
|
@@ -33,13 +32,11 @@ var DxcToggleGroup = function DxcToggleGroup(_ref) {
|
|
|
33
32
|
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
|
|
34
33
|
_ref$tabIndex = _ref.tabIndex,
|
|
35
34
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
selectedValue = _useState4[0],
|
|
42
|
-
setSelectedValue = _useState4[1];
|
|
35
|
+
var toggleGroupLabelId = "label-toggle-group-".concat((0, _react.useId)());
|
|
36
|
+
var _useState = (0, _react.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : multiple ? [] : -1),
|
|
37
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
38
|
+
selectedValue = _useState2[0],
|
|
39
|
+
setSelectedValue = _useState2[1];
|
|
43
40
|
var colorsTheme = (0, _useTheme["default"])();
|
|
44
41
|
var handleToggleChange = function handleToggleChange(selectedOption) {
|
|
45
42
|
var newSelectedOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
var _react = _interopRequireDefault(require("react"));
|
|
5
5
|
var _react2 = require("@testing-library/react");
|
|
6
|
-
var _ToggleGroup = _interopRequireDefault(require("./ToggleGroup
|
|
6
|
+
var _ToggleGroup = _interopRequireDefault(require("./ToggleGroup"));
|
|
7
7
|
var options = [{
|
|
8
8
|
value: 1,
|
|
9
9
|
label: "Amazon"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/useTheme.d.ts
CHANGED
|
@@ -191,13 +191,11 @@ declare const useTheme: () => {
|
|
|
191
191
|
}>;
|
|
192
192
|
chip?: Partial<{
|
|
193
193
|
backgroundColor: string;
|
|
194
|
-
disabledBackgroundColor: string;
|
|
195
194
|
fontFamily: string;
|
|
196
195
|
fontSize: string;
|
|
197
196
|
fontStyle: string;
|
|
198
197
|
fontWeight: string;
|
|
199
198
|
fontColor: string;
|
|
200
|
-
disabledFontColor: string;
|
|
201
199
|
borderColor: string;
|
|
202
200
|
borderRadius: string;
|
|
203
201
|
borderThickness: string;
|
|
@@ -215,7 +213,6 @@ declare const useTheme: () => {
|
|
|
215
213
|
focusColor: string;
|
|
216
214
|
focusBorderStyle: string;
|
|
217
215
|
focusBorderThickness: string;
|
|
218
|
-
focusBorderRadius: string;
|
|
219
216
|
}>;
|
|
220
217
|
dateInput?: Partial<{
|
|
221
218
|
pickerBackgroundColor: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,7 +6,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
var _react2 = require("@testing-library/react");
|
|
8
8
|
var _axeHelper = require("../../test/accessibility/axe-helper.js");
|
|
9
|
-
var _Wizard = _interopRequireDefault(require("./Wizard
|
|
9
|
+
var _Wizard = _interopRequireDefault(require("./Wizard"));
|
|
10
10
|
var favoriteSVG = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
11
11
|
viewBox: "0 0 24 24",
|
|
12
12
|
fill: "currentColor"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/wizard/Wizard.test.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
var _react = _interopRequireDefault(require("react"));
|
|
5
5
|
var _react2 = require("@testing-library/react");
|
|
6
|
-
var _Wizard = _interopRequireDefault(require("./Wizard
|
|
6
|
+
var _Wizard = _interopRequireDefault(require("./Wizard"));
|
|
7
7
|
describe("Wizard components tests", function () {
|
|
8
8
|
test("Wizard renders with correct steps", function () {
|
|
9
9
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Wizard["default"], {
|