@dxc-technology/halstack-react 0.0.0-c293b72 → 0.0.0-c2b6ec9
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.js +1 -1
- package/HalstackContext.d.ts +2 -5
- package/HalstackContext.js +6 -6
- package/accordion/Accordion.accessibility.test.d.ts +1 -0
- package/accordion/Accordion.accessibility.test.js +4 -4
- package/accordion/Accordion.js +9 -10
- package/accordion/Accordion.stories.tsx +4 -14
- 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 +11 -17
- package/accordion-group/AccordionGroup.js +1 -1
- package/accordion-group/AccordionGroup.stories.tsx +23 -23
- package/accordion-group/AccordionGroup.test.d.ts +1 -0
- package/accordion-group/AccordionGroup.test.js +5 -9
- package/accordion-group/AccordionGroupAccordion.js +1 -1
- package/action-icon/ActionIcon.accessibility.test.d.ts +1 -0
- package/action-icon/ActionIcon.accessibility.test.js +4 -4
- 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 +6 -6
- package/alert/Alert.js +6 -3
- 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 +5 -5
- 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 +3 -3
- package/box/Box.js +1 -1
- package/box/Box.test.d.ts +1 -0
- package/box/Box.test.js +1 -1
- package/breadcrumbs/Breadcrumbs.accessibility.test.d.ts +1 -0
- package/breadcrumbs/Breadcrumbs.accessibility.test.js +96 -0
- package/breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/breadcrumbs/Breadcrumbs.js +79 -0
- package/breadcrumbs/Breadcrumbs.stories.tsx +194 -0
- package/breadcrumbs/Breadcrumbs.test.d.ts +1 -0
- package/breadcrumbs/Breadcrumbs.test.js +168 -0
- package/breadcrumbs/Item.d.ts +4 -0
- package/breadcrumbs/Item.js +52 -0
- package/breadcrumbs/dropdownTheme.d.ts +53 -0
- package/breadcrumbs/dropdownTheme.js +62 -0
- package/breadcrumbs/types.d.ts +16 -0
- package/breadcrumbs/types.js +5 -0
- package/bulleted-list/BulletedList.accessibility.test.d.ts +1 -0
- package/bulleted-list/BulletedList.accessibility.test.js +18 -6
- package/bulleted-list/BulletedList.js +2 -2
- package/button/Button.accessibility.test.d.ts +1 -0
- package/button/Button.accessibility.test.js +6 -6
- package/button/Button.js +1 -1
- package/button/Button.stories.tsx +3 -3
- 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 +3 -3
- package/card/Card.js +3 -2
- package/card/Card.stories.tsx +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 +5 -5
- package/checkbox/Checkbox.js +10 -13
- 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 +4 -4
- package/chip/Chip.js +3 -1
- package/chip/Chip.stories.tsx +1 -1
- package/chip/Chip.test.d.ts +1 -0
- package/chip/Chip.test.js +1 -1
- package/common/coreTokens.js +3 -3
- package/common/variables.d.ts +2 -5
- package/common/variables.js +68 -71
- package/container/Container.stories.tsx +3 -3
- package/contextual-menu/ContextualMenu.accessibility.test.d.ts +1 -0
- package/contextual-menu/ContextualMenu.accessibility.test.js +15 -3
- package/contextual-menu/ContextualMenu.d.ts +3 -5
- package/contextual-menu/ContextualMenu.js +89 -52
- package/contextual-menu/ContextualMenu.stories.tsx +115 -74
- package/contextual-menu/ContextualMenu.test.d.ts +1 -0
- package/contextual-menu/ContextualMenu.test.js +200 -24
- package/contextual-menu/GroupItem.d.ts +4 -0
- package/contextual-menu/GroupItem.js +67 -0
- package/contextual-menu/ItemAction.d.ts +4 -0
- package/contextual-menu/ItemAction.js +50 -0
- package/contextual-menu/MenuItem.d.ts +4 -0
- package/contextual-menu/MenuItem.js +29 -0
- package/contextual-menu/SingleItem.d.ts +4 -0
- package/contextual-menu/SingleItem.js +38 -0
- package/contextual-menu/types.d.ts +50 -11
- package/date-input/Calendar.js +47 -31
- package/date-input/DateInput.accessibility.test.d.ts +1 -0
- package/date-input/DateInput.accessibility.test.js +24 -11
- package/date-input/DateInput.js +27 -21
- package/date-input/DateInput.stories.tsx +18 -12
- package/date-input/DateInput.test.d.ts +1 -0
- package/date-input/DateInput.test.js +39 -39
- package/date-input/DatePicker.js +1 -1
- package/date-input/YearPicker.js +10 -5
- package/dialog/Dialog.accessibility.test.d.ts +1 -0
- package/dialog/Dialog.accessibility.test.js +5 -5
- package/dialog/Dialog.js +9 -20
- package/dialog/Dialog.stories.tsx +8 -4
- package/dialog/Dialog.test.d.ts +1 -0
- package/dialog/Dialog.test.js +111 -48
- package/divider/Divider.accessibility.test.d.ts +1 -0
- package/divider/Divider.accessibility.test.js +2 -2
- package/divider/Divider.test.d.ts +1 -0
- package/dropdown/Dropdown.accessibility.test.d.ts +1 -0
- package/dropdown/Dropdown.accessibility.test.js +12 -9
- package/dropdown/Dropdown.js +16 -15
- package/dropdown/Dropdown.stories.tsx +11 -11
- package/dropdown/Dropdown.test.d.ts +1 -0
- package/dropdown/Dropdown.test.js +101 -72
- package/dropdown/DropdownMenu.js +4 -4
- package/dropdown/DropdownMenuItem.js +2 -1
- package/file-input/FileInput.accessibility.test.d.ts +1 -0
- package/file-input/FileInput.accessibility.test.js +30 -23
- package/file-input/FileInput.js +3 -8
- package/file-input/FileInput.test.d.ts +1 -0
- package/file-input/FileInput.test.js +44 -22
- package/file-input/FileItem.js +6 -2
- package/file-input/types.d.ts +0 -4
- package/footer/Footer.accessibility.test.d.ts +1 -0
- package/footer/Footer.accessibility.test.js +13 -5
- package/footer/Footer.js +1 -1
- package/footer/Footer.stories.tsx +12 -0
- package/footer/Footer.test.d.ts +1 -0
- package/footer/Footer.test.js +1 -1
- package/footer/Icons.js +2 -30
- package/grid/Grid.stories.tsx +3 -1
- package/header/Header.accessibility.test.d.ts +1 -0
- package/header/Header.accessibility.test.js +16 -6
- package/header/Header.js +3 -2
- package/header/Header.stories.tsx +17 -1
- package/header/Header.test.d.ts +1 -0
- package/header/Header.test.js +1 -1
- package/header/Icons.js +1 -6
- package/heading/Heading.accessibility.test.d.ts +1 -0
- package/heading/Heading.accessibility.test.js +3 -3
- package/heading/Heading.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/icon/Icon.accessibility.test.js +2 -2
- package/icon/Icon.js +1 -1
- package/image/Image.accessibility.test.d.ts +1 -0
- package/image/Image.accessibility.test.js +3 -3
- package/image/Image.js +1 -1
- package/layout/ApplicationLayout.js +9 -6
- package/layout/Icons.d.ts +0 -1
- package/layout/Icons.js +1 -9
- package/link/Link.accessibility.test.d.ts +1 -0
- package/link/Link.accessibility.test.js +8 -12
- package/link/Link.js +1 -1
- package/link/Link.stories.tsx +2 -2
- package/link/Link.test.d.ts +1 -0
- package/link/Link.test.js +1 -1
- package/main.d.ts +2 -1
- package/main.js +8 -1
- package/nav-tabs/NavTabs.accessibility.test.d.ts +1 -0
- package/nav-tabs/NavTabs.accessibility.test.js +3 -3
- package/nav-tabs/NavTabs.js +19 -4
- package/nav-tabs/NavTabs.stories.tsx +18 -3
- package/nav-tabs/NavTabs.test.d.ts +1 -0
- package/nav-tabs/NavTabs.test.js +9 -7
- package/nav-tabs/Tab.js +7 -7
- package/number-input/NumberInput.accessibility.test.d.ts +1 -0
- package/number-input/NumberInput.accessibility.test.js +9 -10
- package/number-input/NumberInput.js +6 -3
- package/number-input/NumberInput.stories.tsx +11 -16
- package/number-input/NumberInput.test.d.ts +1 -0
- package/number-input/NumberInput.test.js +6 -7
- package/package.json +25 -20
- package/paginator/Paginator.accessibility.test.d.ts +1 -0
- package/paginator/Paginator.accessibility.test.js +4 -5
- package/paginator/Paginator.js +13 -10
- package/paginator/Paginator.test.d.ts +1 -0
- package/paginator/Paginator.test.js +2 -3
- package/paragraph/Paragraph.accessibility.test.d.ts +1 -0
- package/paragraph/Paragraph.accessibility.test.js +2 -2
- package/password-input/PasswordInput.accessibility.test.d.ts +1 -0
- package/password-input/PasswordInput.accessibility.test.js +7 -8
- package/password-input/PasswordInput.js +11 -7
- package/password-input/PasswordInput.stories.tsx +10 -1
- package/password-input/PasswordInput.test.d.ts +1 -0
- package/password-input/PasswordInput.test.js +6 -7
- package/progress-bar/ProgressBar.accessibility.test.d.ts +1 -0
- package/progress-bar/ProgressBar.accessibility.test.js +3 -3
- package/progress-bar/ProgressBar.js +6 -4
- 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/quick-nav/QuickNav.accessibility.test.js +2 -2
- package/quick-nav/QuickNav.js +1 -1
- package/radio-group/Radio.js +6 -9
- package/radio-group/RadioGroup.accessibility.test.d.ts +1 -0
- package/radio-group/RadioGroup.accessibility.test.js +4 -4
- package/radio-group/RadioGroup.js +14 -16
- 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 +16 -6
- package/resultset-table/ResultsetTable.js +3 -2
- package/resultset-table/ResultsetTable.stories.tsx +13 -1
- package/resultset-table/ResultsetTable.test.d.ts +1 -0
- package/resultset-table/ResultsetTable.test.js +2 -4
- package/select/Listbox.js +19 -13
- package/select/Option.js +2 -1
- package/select/Select.accessibility.test.d.ts +1 -0
- package/select/Select.accessibility.test.js +18 -8
- package/select/Select.js +25 -21
- package/select/Select.stories.tsx +36 -15
- package/select/Select.test.d.ts +1 -0
- package/select/Select.test.js +42 -51
- package/sidenav/Sidenav.accessibility.test.d.ts +1 -0
- package/sidenav/Sidenav.accessibility.test.js +3 -3
- package/sidenav/Sidenav.js +1 -1
- package/sidenav/Sidenav.stories.tsx +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 +5 -6
- package/slider/Slider.js +11 -13
- package/slider/Slider.stories.tsx +180 -0
- package/slider/Slider.test.d.ts +1 -0
- package/slider/Slider.test.js +13 -11
- package/spinner/Spinner.accessibility.test.d.ts +1 -0
- package/spinner/Spinner.accessibility.test.js +6 -6
- package/spinner/Spinner.js +6 -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 +8 -8
- 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 +14 -5
- package/switch/Switch.js +6 -9
- package/switch/Switch.stories.tsx +12 -0
- 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 +16 -6
- package/table/Table.js +1 -1
- package/table/Table.stories.tsx +13 -1
- package/table/Table.test.d.ts +1 -0
- package/table/Table.test.js +2 -4
- package/tabs/Tab.js +1 -1
- package/tabs/Tabs.accessibility.test.d.ts +1 -0
- package/tabs/Tabs.accessibility.test.js +3 -3
- package/tabs/Tabs.js +1 -1
- package/tabs/Tabs.stories.tsx +7 -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 +4 -4
- package/tag/Tag.js +1 -1
- package/tag/Tag.stories.tsx +1 -1
- package/tag/Tag.test.d.ts +1 -0
- package/tag/Tag.test.js +1 -1
- package/text-input/Suggestion.js +1 -1
- package/text-input/Suggestions.js +14 -6
- package/text-input/TextInput.accessibility.test.d.ts +1 -0
- package/text-input/TextInput.accessibility.test.js +11 -12
- package/text-input/TextInput.js +29 -25
- package/text-input/TextInput.stories.tsx +19 -7
- package/text-input/TextInput.test.d.ts +1 -0
- package/text-input/TextInput.test.js +2 -3
- package/textarea/Textarea.accessibility.test.d.ts +1 -0
- package/textarea/Textarea.accessibility.test.js +7 -7
- package/textarea/Textarea.js +14 -13
- 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 +5 -5
- package/toggle-group/ToggleGroup.js +6 -9
- package/toggle-group/ToggleGroup.stories.tsx +1 -1
- package/toggle-group/ToggleGroup.test.d.ts +1 -0
- package/toggle-group/ToggleGroup.test.js +1 -1
- package/tooltip/Tooltip.accessibility.test.d.ts +1 -0
- package/tooltip/Tooltip.accessibility.test.js +144 -0
- package/tooltip/Tooltip.d.ts +4 -0
- package/tooltip/Tooltip.js +50 -0
- package/tooltip/Tooltip.stories.tsx +111 -0
- package/tooltip/Tooltip.test.d.ts +1 -0
- package/tooltip/Tooltip.test.js +112 -0
- package/tooltip/types.d.ts +16 -0
- package/tooltip/types.js +5 -0
- package/typography/Typography.accessibility.test.d.ts +1 -0
- package/typography/Typography.accessibility.test.js +12 -12
- package/typography/Typography.stories.tsx +1 -3
- package/useTheme.d.ts +2 -5
- package/utils/BaseTypography.js +1 -1
- package/utils/FocusLock.js +3 -2
- package/wizard/Wizard.accessibility.test.d.ts +1 -0
- package/wizard/Wizard.accessibility.test.js +3 -3
- package/wizard/Wizard.js +1 -9
- package/wizard/Wizard.stories.tsx +1 -1
- package/wizard/Wizard.test.d.ts +1 -0
- package/wizard/Wizard.test.js +1 -1
- package/contextual-menu/MenuItemAction.d.ts +0 -4
- package/contextual-menu/MenuItemAction.js +0 -46
- package/paginator/Icons.d.ts +0 -5
- package/paginator/Icons.js +0 -40
package/useTheme.d.ts
CHANGED
|
@@ -251,8 +251,7 @@ declare const useTheme: () => {
|
|
|
251
251
|
dialog?: Partial<{
|
|
252
252
|
overlayColor: string;
|
|
253
253
|
backgroundColor: string;
|
|
254
|
-
|
|
255
|
-
closeIconHeight: string;
|
|
254
|
+
closeIconSize: string;
|
|
256
255
|
closeIconTopPosition: string;
|
|
257
256
|
closeIconRightPosition: string;
|
|
258
257
|
closeIconBackgroundColor: string;
|
|
@@ -290,7 +289,6 @@ declare const useTheme: () => {
|
|
|
290
289
|
disabledColor: string;
|
|
291
290
|
disabledButtonBackgroundColor: string;
|
|
292
291
|
disabledButtonBorderColor: string;
|
|
293
|
-
disabledBorderColor: string;
|
|
294
292
|
optionBackgroundColor: string;
|
|
295
293
|
hoverOptionBackgroundColor: string;
|
|
296
294
|
activeOptionBackgroundColor: string;
|
|
@@ -330,7 +328,6 @@ declare const useTheme: () => {
|
|
|
330
328
|
focusDropBorderColor: string;
|
|
331
329
|
disabledDropBorderColor: string;
|
|
332
330
|
dragoverDropBackgroundColor: string;
|
|
333
|
-
activeFileItemIconBackgrounColor: string;
|
|
334
331
|
errorFileItemBorderColor: string;
|
|
335
332
|
errorFileItemBackgroundColor: string;
|
|
336
333
|
errorFilePreviewBackgroundColor: string;
|
|
@@ -531,8 +528,8 @@ declare const useTheme: () => {
|
|
|
531
528
|
totalItemsContainerMarginLeft: string;
|
|
532
529
|
}>;
|
|
533
530
|
paragraph?: Partial<{
|
|
534
|
-
fontColor: string;
|
|
535
531
|
display: string;
|
|
532
|
+
fontColor: string;
|
|
536
533
|
fontSize: string;
|
|
537
534
|
fontWeight: string;
|
|
538
535
|
}>;
|
package/utils/BaseTypography.js
CHANGED
|
@@ -11,7 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
12
|
var _templateObject;
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
15
|
var TypographyContext = /*#__PURE__*/_react["default"].createContext(null);
|
|
16
16
|
var BaseTypography = function BaseTypography(_ref) {
|
|
17
17
|
var as = _ref.as,
|
package/utils/FocusLock.js
CHANGED
|
@@ -9,7 +9,7 @@ exports["default"] = void 0;
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
13
13
|
var not = {
|
|
14
14
|
negTabIndex: ':not([tabindex^="-"])',
|
|
15
15
|
disabled: ":not(:disabled)"
|
|
@@ -95,7 +95,8 @@ var FocusLock = function FocusLock(_ref) {
|
|
|
95
95
|
});
|
|
96
96
|
}, [focusableElements]);
|
|
97
97
|
var focusLast = function focusLast() {
|
|
98
|
-
|
|
98
|
+
var _focusableElements$re;
|
|
99
|
+
focusableElements === null || focusableElements === void 0 ? void 0 : (_focusableElements$re = focusableElements.reverse()) === null || _focusableElements$re === void 0 ? void 0 : _focusableElements$re.some(function (element) {
|
|
99
100
|
return attemptFocus(element);
|
|
100
101
|
});
|
|
101
102
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,8 +5,8 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
5
5
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
var _react2 = require("@testing-library/react");
|
|
8
|
-
var
|
|
9
|
-
var _Wizard = _interopRequireDefault(require("./Wizard
|
|
8
|
+
var _axeHelper = require("../../test/accessibility/axe-helper.js");
|
|
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"
|
|
@@ -42,7 +42,7 @@ describe("Wizard component accessibility tests", function () {
|
|
|
42
42
|
margin: "medium"
|
|
43
43
|
})), container = _render.container;
|
|
44
44
|
_context.next = 3;
|
|
45
|
-
return (0,
|
|
45
|
+
return (0, _axeHelper.axe)(container);
|
|
46
46
|
case 3:
|
|
47
47
|
results = _context.sent;
|
|
48
48
|
expect(results).toHaveNoViolations();
|
package/wizard/Wizard.js
CHANGED
|
@@ -16,52 +16,44 @@ var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
|
16
16
|
var _Icon = _interopRequireDefault(require("../icon/Icon"));
|
|
17
17
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
20
20
|
var icons = {
|
|
21
21
|
validIcon: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
22
|
-
id: "check_circle_black_18dp",
|
|
23
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24
23
|
width: "18",
|
|
25
24
|
height: "18",
|
|
26
25
|
viewBox: "0 0 18 18"
|
|
27
26
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
28
|
-
id: "Path_2946",
|
|
29
27
|
"data-name": "Path 2946",
|
|
30
28
|
d: "M0,0H18V18H0Z",
|
|
31
29
|
fill: "none"
|
|
32
30
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
33
|
-
id: "Path_2947",
|
|
34
31
|
"data-name": "Path 2947",
|
|
35
32
|
d: "M9.986,4a5.986,5.986,0,1,0,5.986,5.986A5.994,5.994,0,0,0,9.986,4Zm-1.5,9.727L5.5,10.734,6.551,9.679l1.938,1.93L13.42,6.679l1.055,1.063Z",
|
|
36
33
|
transform: "translate(-0.986 -0.986)",
|
|
37
34
|
fill: "#eafaef",
|
|
38
35
|
opacity: "0.999"
|
|
39
36
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
40
|
-
id: "Path_2948",
|
|
41
37
|
"data-name": "Path 2948",
|
|
42
38
|
d: "M9.493,2a7.493,7.493,0,1,0,7.493,7.493A7.5,7.5,0,0,0,9.493,2Zm0,13.487a5.994,5.994,0,1,1,5.994-5.994A6,6,0,0,1,9.493,15.487Zm3.439-9.306L7.994,11.119,6.054,9.186,5,10.242l3,3,5.994-5.994Z",
|
|
43
39
|
transform: "translate(-0.493 -0.493)",
|
|
44
40
|
fill: "#24a148"
|
|
45
41
|
})),
|
|
46
42
|
invalidIcon: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
47
|
-
id: "highlight_off_black_18dp",
|
|
48
43
|
xmlns: "http://www.w3.org/2000/svg",
|
|
49
44
|
width: "18",
|
|
50
45
|
height: "18",
|
|
51
46
|
viewBox: "0 0 18 18"
|
|
52
47
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
53
|
-
id: "Path_2943",
|
|
54
48
|
"data-name": "Path 2943",
|
|
55
49
|
d: "M0,0H18V18H0Z",
|
|
56
50
|
fill: "none"
|
|
57
51
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
58
|
-
id: "Path_2944",
|
|
59
52
|
"data-name": "Path 2944",
|
|
60
53
|
d: "M10,4a6,6,0,1,0,6,6A6.01,6.01,0,0,0,10,4Zm3,7.945L11.945,13,10,11.06,8.059,13,7,11.945,8.944,10,7,8.059,8.059,7,10,8.944,11.945,7,13,8.059,11.06,10Z",
|
|
61
54
|
transform: "translate(-1.002 -1.002)",
|
|
62
55
|
fill: "#ffe6e9"
|
|
63
56
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
64
|
-
id: "Path_2945",
|
|
65
57
|
"data-name": "Path 2945",
|
|
66
58
|
d: "M11.444,6.5,9.5,8.443,7.558,6.5,6.5,7.558,8.443,9.5,6.5,11.444,7.558,12.5,9.5,10.558,11.444,12.5,12.5,11.444,10.558,9.5,12.5,7.558ZM9.5,2A7.5,7.5,0,1,0,17,9.5,7.494,7.494,0,0,0,9.5,2Zm0,13.5a6,6,0,1,1,6-6A6.009,6.009,0,0,1,9.5,15.5Z",
|
|
67
59
|
transform: "translate(-0.501 -0.501)",
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import DxcWizard from "./Wizard";
|
|
3
3
|
import Title from "../../.storybook/components/Title";
|
|
4
4
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
-
import { userEvent, within } from "@storybook/
|
|
5
|
+
import { userEvent, within } from "@storybook/test";
|
|
6
6
|
import { HalstackProvider } from "../HalstackContext";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
@@ -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"], {
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
var _coreTokens = _interopRequireDefault(require("../common/coreTokens"));
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
13
|
-
var MenuItemAction = function MenuItemAction(_ref) {
|
|
14
|
-
var label = _ref.label,
|
|
15
|
-
icon = _ref.icon,
|
|
16
|
-
slot = _ref.slot,
|
|
17
|
-
selected = _ref.selected,
|
|
18
|
-
onSelect = _ref.onSelect;
|
|
19
|
-
return /*#__PURE__*/_react["default"].createElement(Action, {
|
|
20
|
-
"aria-selected": selected,
|
|
21
|
-
selected: selected,
|
|
22
|
-
onClick: function onClick() {
|
|
23
|
-
return onSelect();
|
|
24
|
-
}
|
|
25
|
-
}, /*#__PURE__*/_react["default"].createElement(Label, null, icon && /*#__PURE__*/_react["default"].createElement(Icon, {
|
|
26
|
-
"aria-hidden": true
|
|
27
|
-
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
28
|
-
src: icon
|
|
29
|
-
}) : icon), /*#__PURE__*/_react["default"].createElement(Text, {
|
|
30
|
-
onMouseEnter: function onMouseEnter(event) {
|
|
31
|
-
var text = event.currentTarget;
|
|
32
|
-
if (text.title === "" && text.scrollWidth > text.clientWidth) text.title = label;
|
|
33
|
-
}
|
|
34
|
-
}, label)), slot);
|
|
35
|
-
};
|
|
36
|
-
var Action = _styledComponents["default"].button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n border: none;\n border-radius: 4px;\n padding: ", " ", ";\n box-shadow: inset 0 0 0 2px transparent;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: 24px;\n ", ";\n cursor: pointer;\n overflow: hidden;\n\n &:hover {\n ", ";\n }\n &:active {\n ", ";\n }\n &:focus {\n outline: 2px solid ", ";\n outline-offset: -1px;\n }\n"])), _coreTokens["default"].spacing_4, _coreTokens["default"].spacing_8, _coreTokens["default"].spacing_16, _coreTokens["default"].color_grey_900, _coreTokens["default"].type_sans, _coreTokens["default"].type_scale_02, function (props) {
|
|
37
|
-
return props.selected ? "background-color: ".concat(_coreTokens["default"].color_purple_100, "; font-weight: ").concat(_coreTokens["default"].type_semibold, ";") : "background-color: ".concat(_coreTokens["default"].color_transparent);
|
|
38
|
-
}, function (props) {
|
|
39
|
-
return props.selected ? "background-color: ".concat(_coreTokens["default"].color_purple_200, ";") : "background-color: ".concat(_coreTokens["default"].color_grey_100, ";");
|
|
40
|
-
}, function (props) {
|
|
41
|
-
return props.selected ? "background-color: ".concat(_coreTokens["default"].color_purple_200, ";") : "background-color: ".concat(_coreTokens["default"].color_grey_100, ";");
|
|
42
|
-
}, _coreTokens["default"].color_blue_600);
|
|
43
|
-
var Label = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n gap: ", ";\n overflow: hidden;\n"])), _coreTokens["default"].spacing_8);
|
|
44
|
-
var Text = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
|
|
45
|
-
var Icon = _styledComponents["default"].span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n"])));
|
|
46
|
-
var _default = exports["default"] = /*#__PURE__*/_react["default"].memo(MenuItemAction);
|
package/paginator/Icons.d.ts
DELETED
package/paginator/Icons.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.previousIcon = exports.nextIcon = exports.lastIcon = exports.firstIcon = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var firstIcon = exports.firstIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
10
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
-
height: "24",
|
|
12
|
-
width: "24",
|
|
13
|
-
fill: "currentColor"
|
|
14
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
15
|
-
d: "M6 18V6h2v12Zm11 0-6-6 6-6 1.4 1.4-4.6 4.6 4.6 4.6Z"
|
|
16
|
-
}));
|
|
17
|
-
var previousIcon = exports.previousIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
18
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
-
height: "24",
|
|
20
|
-
width: "24",
|
|
21
|
-
fill: "currentColor"
|
|
22
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
-
d: "m14 18-6-6 6-6 1.4 1.4-4.6 4.6 4.6 4.6Z"
|
|
24
|
-
}));
|
|
25
|
-
var nextIcon = exports.nextIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
26
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
-
height: "24",
|
|
28
|
-
width: "24",
|
|
29
|
-
fill: "currentColor"
|
|
30
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
31
|
-
d: "M9.4 18 8 16.6l4.6-4.6L8 7.4 9.4 6l6 6Z"
|
|
32
|
-
}));
|
|
33
|
-
var lastIcon = exports.lastIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
34
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
-
height: "24",
|
|
36
|
-
width: "24",
|
|
37
|
-
fill: "currentColor"
|
|
38
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
39
|
-
d: "m7 18-1.4-1.4 4.6-4.6-4.6-4.6L7 6l6 6Zm9 0V6h2v12Z"
|
|
40
|
-
}));
|