@dxc-technology/halstack-react 11.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/BackgroundColorContext.d.ts +1 -10
- package/BackgroundColorContext.js +3 -8
- package/HalstackContext.d.ts +32 -145
- package/HalstackContext.js +3 -7
- package/accordion/Accordion.accessibility.test.d.ts +1 -0
- package/accordion/Accordion.accessibility.test.js +71 -0
- package/accordion/Accordion.js +18 -35
- package/accordion/Accordion.stories.tsx +7 -49
- package/accordion/Accordion.test.d.ts +1 -0
- package/accordion/Accordion.test.js +3 -3
- package/accordion/types.d.ts +1 -1
- package/accordion-group/AccordionGroup.accessibility.test.d.ts +1 -0
- package/accordion-group/AccordionGroup.accessibility.test.js +82 -0
- package/accordion-group/AccordionGroup.d.ts +2 -3
- package/accordion-group/AccordionGroup.js +4 -4
- 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 +3 -3
- package/accordion-group/AccordionGroupContext.d.ts +3 -0
- package/accordion-group/AccordionGroupContext.js +8 -0
- package/accordion-group/types.d.ts +1 -1
- package/action-icon/ActionIcon.accessibility.test.d.ts +1 -0
- package/action-icon/ActionIcon.accessibility.test.js +63 -0
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +48 -0
- package/action-icon/ActionIcon.stories.tsx +41 -0
- package/action-icon/ActionIcon.test.d.ts +1 -0
- package/action-icon/ActionIcon.test.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/action-icon/types.js +5 -0
- package/alert/Alert.accessibility.test.d.ts +1 -0
- package/alert/Alert.accessibility.test.js +95 -0
- package/alert/Alert.js +21 -75
- 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 +129 -0
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +141 -28
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.d.ts +1 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +52 -3
- package/box/Box.accessibility.test.d.ts +1 -0
- package/box/Box.accessibility.test.js +33 -0
- package/box/Box.js +2 -5
- 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 +169 -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 +119 -0
- package/bulleted-list/BulletedList.js +16 -23
- package/bulleted-list/BulletedList.stories.tsx +1 -2
- package/button/Button.accessibility.test.d.ts +1 -0
- package/button/Button.accessibility.test.js +127 -0
- package/button/Button.js +16 -16
- package/button/Button.stories.tsx +34 -53
- package/button/Button.test.d.ts +1 -0
- package/button/Button.test.js +4 -2
- package/button/types.d.ts +1 -1
- package/card/Card.accessibility.test.d.ts +1 -0
- package/card/Card.accessibility.test.js +36 -0
- package/card/Card.js +3 -2
- 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 +87 -0
- package/checkbox/Checkbox.js +36 -44
- 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 +69 -0
- package/chip/Chip.js +20 -26
- package/chip/Chip.stories.tsx +67 -50
- package/chip/Chip.test.d.ts +1 -0
- package/chip/Chip.test.js +5 -5
- package/chip/types.d.ts +35 -12
- package/common/coreTokens.d.ts +105 -14
- package/common/coreTokens.js +40 -22
- package/common/fonts.css +2 -0
- package/common/variables.d.ts +31 -141
- package/common/variables.js +104 -214
- package/container/Container.d.ts +4 -0
- package/container/Container.js +194 -0
- package/container/Container.stories.tsx +214 -0
- package/container/types.d.ts +74 -0
- package/container/types.js +5 -0
- package/contextual-menu/ContextualMenu.accessibility.test.d.ts +1 -0
- package/contextual-menu/ContextualMenu.accessibility.test.js +98 -0
- package/contextual-menu/ContextualMenu.d.ts +5 -0
- package/contextual-menu/ContextualMenu.js +88 -0
- package/contextual-menu/ContextualMenu.stories.tsx +232 -0
- package/contextual-menu/ContextualMenu.test.d.ts +1 -0
- package/contextual-menu/ContextualMenu.test.js +205 -0
- 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 +51 -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 +58 -0
- package/contextual-menu/types.js +5 -0
- package/date-input/Calendar.js +1 -1
- package/date-input/DateInput.accessibility.test.d.ts +1 -0
- package/date-input/DateInput.accessibility.test.js +230 -0
- package/date-input/DateInput.js +19 -20
- package/date-input/DateInput.stories.tsx +15 -8
- package/date-input/DateInput.test.d.ts +1 -0
- package/date-input/DateInput.test.js +9 -8
- package/date-input/DatePicker.js +13 -7
- package/date-input/YearPicker.js +1 -1
- package/date-input/types.d.ts +2 -2
- package/dialog/Dialog.accessibility.test.d.ts +1 -0
- package/dialog/Dialog.accessibility.test.js +69 -0
- package/dialog/Dialog.js +11 -25
- package/dialog/Dialog.stories.tsx +175 -0
- package/dialog/Dialog.test.d.ts +1 -0
- package/dialog/Dialog.test.js +113 -49
- package/divider/Divider.accessibility.test.d.ts +1 -0
- package/divider/Divider.accessibility.test.js +33 -0
- package/divider/Divider.d.ts +4 -0
- package/divider/Divider.js +36 -0
- package/divider/Divider.stories.tsx +223 -0
- package/divider/Divider.test.d.ts +1 -0
- package/divider/Divider.test.js +38 -0
- package/divider/types.d.ts +21 -0
- package/divider/types.js +5 -0
- package/dropdown/Dropdown.accessibility.test.d.ts +1 -0
- package/dropdown/Dropdown.accessibility.test.js +184 -0
- package/dropdown/Dropdown.js +37 -51
- package/dropdown/Dropdown.stories.tsx +15 -26
- package/dropdown/Dropdown.test.d.ts +1 -0
- package/dropdown/Dropdown.test.js +100 -70
- package/dropdown/DropdownMenu.js +4 -4
- package/dropdown/DropdownMenuItem.js +8 -4
- package/dropdown/types.d.ts +3 -5
- package/file-input/FileInput.accessibility.test.d.ts +1 -0
- package/file-input/FileInput.accessibility.test.js +167 -0
- package/file-input/FileInput.js +127 -145
- package/file-input/FileInput.test.d.ts +1 -0
- package/file-input/FileInput.test.js +125 -129
- package/file-input/FileItem.js +18 -28
- package/file-input/types.d.ts +1 -1
- package/footer/Footer.accessibility.test.d.ts +1 -0
- package/footer/Footer.accessibility.test.js +125 -0
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +36 -31
- package/footer/Footer.stories.tsx +58 -2
- package/footer/Footer.test.d.ts +1 -0
- package/footer/Footer.test.js +1 -1
- package/footer/Icons.d.ts +1 -0
- package/footer/Icons.js +52 -16
- package/footer/types.d.ts +8 -8
- package/header/Header.accessibility.test.d.ts +1 -0
- package/header/Header.accessibility.test.js +94 -0
- package/header/Header.js +20 -41
- package/header/Header.stories.tsx +16 -0
- package/header/Header.test.d.ts +1 -0
- package/header/Header.test.js +1 -1
- package/header/Icons.js +1 -6
- package/header/types.d.ts +4 -3
- package/heading/Heading.accessibility.test.d.ts +1 -0
- package/heading/Heading.accessibility.test.js +33 -0
- 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 +30 -0
- package/icon/Icon.d.ts +4 -0
- package/icon/Icon.js +33 -0
- package/icon/Icon.stories.tsx +28 -0
- package/icon/types.d.ts +4 -0
- package/icon/types.js +5 -0
- package/image/Image.accessibility.test.d.ts +1 -0
- package/image/Image.accessibility.test.js +56 -0
- package/image/Image.js +1 -1
- package/image/Image.stories.tsx +3 -1
- package/layout/ApplicationLayout.d.ts +1 -1
- package/layout/ApplicationLayout.js +10 -7
- package/layout/Icons.d.ts +0 -1
- package/layout/Icons.js +1 -11
- package/link/Link.accessibility.test.d.ts +1 -0
- package/link/Link.accessibility.test.js +108 -0
- package/link/Link.js +8 -6
- package/link/Link.stories.tsx +4 -4
- package/link/Link.test.d.ts +1 -0
- package/link/Link.test.js +1 -1
- package/link/types.d.ts +1 -1
- package/main.d.ts +8 -3
- package/main.js +38 -9
- package/nav-tabs/NavTabs.accessibility.test.d.ts +1 -0
- package/nav-tabs/NavTabs.accessibility.test.js +44 -0
- package/nav-tabs/NavTabs.d.ts +1 -2
- package/nav-tabs/NavTabs.js +25 -7
- package/nav-tabs/NavTabs.stories.tsx +44 -24
- package/nav-tabs/NavTabs.test.d.ts +1 -0
- package/nav-tabs/NavTabs.test.js +12 -10
- package/nav-tabs/NavTabsContext.d.ts +3 -0
- package/nav-tabs/NavTabsContext.js +8 -0
- package/nav-tabs/Tab.js +23 -23
- package/nav-tabs/types.d.ts +1 -1
- package/number-input/NumberInput.accessibility.test.d.ts +1 -0
- package/number-input/NumberInput.accessibility.test.js +228 -0
- package/number-input/NumberInput.d.ts +0 -7
- package/number-input/NumberInput.js +24 -5
- package/number-input/NumberInput.test.d.ts +1 -0
- package/number-input/NumberInput.test.js +166 -7
- package/number-input/NumberInputContext.d.ts +3 -0
- package/number-input/NumberInputContext.js +8 -0
- package/number-input/types.d.ts +6 -0
- package/package.json +20 -18
- package/paginator/Paginator.accessibility.test.d.ts +1 -0
- package/paginator/Paginator.accessibility.test.js +79 -0
- package/paginator/Paginator.js +14 -14
- 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/paragraph/Paragraph.accessibility.test.js +28 -0
- package/paragraph/Paragraph.js +2 -7
- package/password-input/PasswordInput.accessibility.test.d.ts +1 -0
- package/password-input/PasswordInput.accessibility.test.js +153 -0
- package/password-input/PasswordInput.js +7 -7
- package/password-input/PasswordInput.stories.tsx +0 -1
- package/password-input/PasswordInput.test.d.ts +1 -0
- package/password-input/PasswordInput.test.js +5 -5
- package/progress-bar/ProgressBar.accessibility.test.d.ts +1 -0
- package/progress-bar/ProgressBar.accessibility.test.js +35 -0
- package/progress-bar/ProgressBar.js +11 -15
- 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 +57 -0
- 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 +97 -0
- package/radio-group/RadioGroup.js +15 -17
- 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 +285 -0
- package/resultset-table/ResultsetTable.d.ts +4 -1
- package/resultset-table/ResultsetTable.js +25 -13
- package/resultset-table/ResultsetTable.stories.tsx +118 -5
- package/resultset-table/ResultsetTable.test.d.ts +1 -0
- package/resultset-table/ResultsetTable.test.js +76 -1
- package/resultset-table/types.d.ts +40 -7
- package/select/Listbox.js +24 -16
- package/select/Option.js +19 -10
- package/select/Select.accessibility.test.d.ts +1 -0
- package/select/Select.accessibility.test.js +228 -0
- package/select/Select.js +72 -54
- package/select/Select.stories.tsx +59 -111
- package/select/Select.test.d.ts +1 -0
- package/select/Select.test.js +393 -459
- package/select/types.d.ts +3 -3
- package/sidenav/Sidenav.accessibility.test.d.ts +1 -0
- package/sidenav/Sidenav.accessibility.test.js +59 -0
- package/sidenav/Sidenav.js +21 -19
- package/sidenav/Sidenav.stories.tsx +4 -9
- package/sidenav/Sidenav.test.d.ts +1 -0
- package/sidenav/Sidenav.test.js +1 -1
- package/sidenav/types.d.ts +2 -2
- package/slider/Slider.accessibility.test.d.ts +1 -0
- package/slider/Slider.accessibility.test.js +104 -0
- package/slider/Slider.js +31 -42
- 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 +96 -0
- package/spinner/Spinner.js +12 -16
- 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 +157 -0
- package/status-light/StatusLight.d.ts +4 -0
- package/status-light/StatusLight.js +51 -0
- package/status-light/StatusLight.stories.tsx +74 -0
- package/status-light/StatusLight.test.d.ts +1 -0
- package/status-light/StatusLight.test.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/switch/Switch.accessibility.test.d.ts +1 -0
- package/switch/Switch.accessibility.test.js +98 -0
- package/switch/Switch.js +29 -37
- package/switch/Switch.stories.tsx +12 -0
- package/switch/Switch.test.d.ts +1 -0
- package/switch/Switch.test.js +1 -1
- package/table/DropdownTheme.js +62 -0
- package/table/Table.accessibility.test.d.ts +1 -0
- package/table/Table.accessibility.test.js +93 -0
- package/table/Table.d.ts +6 -2
- package/table/Table.js +74 -12
- package/table/Table.stories.tsx +309 -2
- package/table/Table.test.d.ts +1 -0
- package/table/Table.test.js +92 -1
- package/table/types.d.ts +28 -0
- package/tabs/Tab.js +13 -9
- package/tabs/Tabs.accessibility.test.d.ts +1 -0
- package/tabs/Tabs.accessibility.test.js +56 -0
- package/tabs/Tabs.js +12 -24
- package/tabs/Tabs.stories.tsx +8 -4
- package/tabs/Tabs.test.d.ts +1 -0
- package/tabs/Tabs.test.js +20 -38
- package/tabs/types.d.ts +2 -2
- package/tag/Tag.accessibility.test.d.ts +1 -0
- package/tag/Tag.accessibility.test.js +69 -0
- package/tag/Tag.js +7 -7
- package/tag/Tag.stories.tsx +4 -7
- package/tag/Tag.test.d.ts +1 -0
- package/tag/Tag.test.js +5 -13
- package/tag/types.d.ts +2 -2
- package/text-input/Suggestion.js +1 -1
- package/text-input/Suggestions.js +19 -14
- package/text-input/TextInput.accessibility.test.d.ts +1 -0
- package/text-input/TextInput.accessibility.test.js +321 -0
- package/text-input/TextInput.js +103 -126
- package/text-input/TextInput.stories.tsx +17 -8
- package/text-input/TextInput.test.d.ts +1 -0
- package/text-input/TextInput.test.js +97 -80
- package/textarea/Textarea.accessibility.test.d.ts +1 -0
- package/textarea/Textarea.accessibility.test.js +155 -0
- package/textarea/Textarea.js +13 -21
- package/textarea/Textarea.stories.tsx +0 -1
- 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 +107 -0
- package/toggle-group/ToggleGroup.js +11 -16
- package/toggle-group/ToggleGroup.stories.tsx +3 -3
- package/toggle-group/ToggleGroup.test.d.ts +1 -0
- package/toggle-group/ToggleGroup.test.js +1 -1
- package/toggle-group/types.d.ts +2 -2
- package/typography/Typography.accessibility.test.d.ts +1 -0
- package/typography/Typography.accessibility.test.js +339 -0
- package/useTheme.d.ts +31 -141
- package/utils/BaseTypography.js +1 -1
- package/utils/FocusLock.js +16 -6
- package/wizard/Wizard.accessibility.test.d.ts +1 -0
- package/wizard/Wizard.accessibility.test.js +55 -0
- package/wizard/Wizard.js +14 -25
- package/wizard/Wizard.stories.tsx +19 -0
- package/wizard/Wizard.test.d.ts +1 -0
- package/wizard/Wizard.test.js +1 -1
- package/wizard/types.d.ts +2 -2
- package/common/OpenSans.css +0 -69
- package/common/fonts/OpenSans-Bold.ttf +0 -0
- package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-Italic.ttf +0 -0
- package/common/fonts/OpenSans-Light.ttf +0 -0
- package/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/common/fonts/OpenSans-Regular.ttf +0 -0
- package/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/date-input/Icons.d.ts +0 -6
- package/date-input/Icons.js +0 -58
- package/paginator/Icons.d.ts +0 -5
- package/paginator/Icons.js +0 -40
- package/password-input/Icons.d.ts +0 -6
- package/password-input/Icons.js +0 -35
- package/select/Icons.d.ts +0 -10
- package/select/Icons.js +0 -89
- package/sidenav/Icons.d.ts +0 -7
- package/sidenav/Icons.js +0 -47
- package/text-input/Icons.d.ts +0 -8
- package/text-input/Icons.js +0 -56
- /package/{layout → sidenav}/SidenavContext.d.ts +0 -0
- /package/{layout → sidenav}/SidenavContext.js +0 -0
package/date-input/YearPicker.js
CHANGED
|
@@ -13,7 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
14
14
|
var _templateObject, _templateObject2;
|
|
15
15
|
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); }
|
|
16
|
-
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 &&
|
|
16
|
+
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; }
|
|
17
17
|
var getYearsArray = function getYearsArray() {
|
|
18
18
|
var yearList = [];
|
|
19
19
|
for (var i = 1899; i <= 2100; i++) {
|
package/date-input/types.d.ts
CHANGED
|
@@ -127,11 +127,11 @@ export type CalendarPropsType = {
|
|
|
127
127
|
*/
|
|
128
128
|
selectedDate: Dayjs;
|
|
129
129
|
/**
|
|
130
|
-
* Date
|
|
130
|
+
* Date shown by the calendar.
|
|
131
131
|
*/
|
|
132
132
|
innerDate: Dayjs;
|
|
133
133
|
/**
|
|
134
|
-
* Function called when the
|
|
134
|
+
* Function called when the shown date needs to be updated.
|
|
135
135
|
*/
|
|
136
136
|
onInnerDateChange: (date: Dayjs) => void;
|
|
137
137
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
5
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
var _react2 = require("@testing-library/react");
|
|
8
|
+
var _axeHelper = require("../../test/accessibility/axe-helper.js");
|
|
9
|
+
var _Dialog = _interopRequireDefault(require("./Dialog"));
|
|
10
|
+
describe("Dialog component accessibility tests", function () {
|
|
11
|
+
it("Should not have basic accessibility issues", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
12
|
+
var _render, baseElement, results;
|
|
13
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
14
|
+
while (1) switch (_context.prev = _context.next) {
|
|
15
|
+
case 0:
|
|
16
|
+
// baseElement is needed when using React Portals
|
|
17
|
+
_render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Dialog["default"], null, "Dialog text")), baseElement = _render.baseElement;
|
|
18
|
+
_context.next = 3;
|
|
19
|
+
return (0, _axeHelper.axe)(baseElement);
|
|
20
|
+
case 3:
|
|
21
|
+
results = _context.sent;
|
|
22
|
+
expect(results).toHaveNoViolations();
|
|
23
|
+
case 5:
|
|
24
|
+
case "end":
|
|
25
|
+
return _context.stop();
|
|
26
|
+
}
|
|
27
|
+
}, _callee);
|
|
28
|
+
})));
|
|
29
|
+
it("Should not have basic accessibility issues for close button not visible", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
30
|
+
var _render2, baseElement, results;
|
|
31
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
32
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
33
|
+
case 0:
|
|
34
|
+
// baseElement is needed when using React Portals
|
|
35
|
+
_render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
36
|
+
isCloseVisible: false
|
|
37
|
+
}, "Dialog text")), baseElement = _render2.baseElement;
|
|
38
|
+
_context2.next = 3;
|
|
39
|
+
return (0, _axeHelper.axe)(baseElement);
|
|
40
|
+
case 3:
|
|
41
|
+
results = _context2.sent;
|
|
42
|
+
expect(results).toHaveNoViolations();
|
|
43
|
+
case 5:
|
|
44
|
+
case "end":
|
|
45
|
+
return _context2.stop();
|
|
46
|
+
}
|
|
47
|
+
}, _callee2);
|
|
48
|
+
})));
|
|
49
|
+
it("Should not have basic accessibility issues for overlay not visible", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
50
|
+
var _render3, baseElement, results;
|
|
51
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
52
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
53
|
+
case 0:
|
|
54
|
+
// baseElement is needed when using React Portals
|
|
55
|
+
_render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
56
|
+
overlay: false
|
|
57
|
+
}, "Dialog text")), baseElement = _render3.baseElement;
|
|
58
|
+
_context3.next = 3;
|
|
59
|
+
return (0, _axeHelper.axe)(baseElement);
|
|
60
|
+
case 3:
|
|
61
|
+
results = _context3.sent;
|
|
62
|
+
expect(results).toHaveNoViolations();
|
|
63
|
+
case 5:
|
|
64
|
+
case "end":
|
|
65
|
+
return _context3.stop();
|
|
66
|
+
}
|
|
67
|
+
}, _callee3);
|
|
68
|
+
})));
|
|
69
|
+
});
|
package/dialog/Dialog.js
CHANGED
|
@@ -11,26 +11,13 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
12
12
|
var _variables = require("../common/variables");
|
|
13
13
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
14
|
-
var _BackgroundColorContext = require("../BackgroundColorContext");
|
|
15
14
|
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
16
15
|
var _reactDom = require("react-dom");
|
|
17
16
|
var _FocusLock = _interopRequireDefault(require("../utils/FocusLock"));
|
|
17
|
+
var _Icon = _interopRequireDefault(require("../icon/Icon"));
|
|
18
18
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
19
19
|
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); }
|
|
20
|
-
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 &&
|
|
21
|
-
var closeIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
22
|
-
role: "img",
|
|
23
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
-
width: "24",
|
|
25
|
-
height: "24",
|
|
26
|
-
viewBox: "0 0 24 24",
|
|
27
|
-
fill: "currentColor"
|
|
28
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
29
|
-
d: "M0 0h24v24H0V0z",
|
|
30
|
-
fill: "none"
|
|
31
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
32
|
-
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
33
|
-
}));
|
|
20
|
+
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; }
|
|
34
21
|
var DxcDialog = function DxcDialog(_ref) {
|
|
35
22
|
var _ref$isCloseVisible = _ref.isCloseVisible,
|
|
36
23
|
isCloseVisible = _ref$isCloseVisible === void 0 ? true : _ref$isCloseVisible,
|
|
@@ -57,23 +44,24 @@ var DxcDialog = function DxcDialog(_ref) {
|
|
|
57
44
|
}, [onCloseClick]);
|
|
58
45
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
59
46
|
theme: colorsTheme.dialog
|
|
60
|
-
}, /*#__PURE__*/_react["default"].createElement(BodyStyle, null), /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react["default"].createElement(
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement(BodyStyle, null), /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react["default"].createElement(DialogContainer, null, overlay && /*#__PURE__*/_react["default"].createElement(Overlay, {
|
|
61
48
|
onClick: function onClick() {
|
|
62
49
|
onBackgroundClick === null || onBackgroundClick === void 0 ? void 0 : onBackgroundClick();
|
|
63
50
|
}
|
|
64
51
|
}), /*#__PURE__*/_react["default"].createElement(Dialog, {
|
|
65
52
|
role: "dialog",
|
|
66
53
|
"aria-modal": overlay,
|
|
67
|
-
isCloseVisible: isCloseVisible
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, children), isCloseVisible && /*#__PURE__*/_react["default"].createElement(CloseIconAction, {
|
|
54
|
+
isCloseVisible: isCloseVisible,
|
|
55
|
+
"aria-label": "Dialog"
|
|
56
|
+
}, /*#__PURE__*/_react["default"].createElement(_FocusLock["default"], null, children, isCloseVisible && /*#__PURE__*/_react["default"].createElement(CloseIconAction, {
|
|
71
57
|
onClick: function onClick() {
|
|
72
58
|
onCloseClick === null || onCloseClick === void 0 ? void 0 : onCloseClick();
|
|
73
59
|
},
|
|
74
60
|
"aria-label": translatedLabels.dialog.closeIconAriaLabel,
|
|
75
61
|
tabIndex: tabIndex
|
|
76
|
-
},
|
|
62
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
63
|
+
icon: "close"
|
|
64
|
+
}))))), document.body));
|
|
77
65
|
};
|
|
78
66
|
var BodyStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n body {\n overflow: hidden;\n }\n"])));
|
|
79
67
|
var DialogContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n z-index: 2147483647;\n"])));
|
|
@@ -87,7 +75,7 @@ var Dialog = _styledComponents["default"].div(_templateObject4 || (_templateObje
|
|
|
87
75
|
}, function (props) {
|
|
88
76
|
return "".concat(props.theme.boxShadowOffsetX, " ").concat(props.theme.boxShadowOffsetY, " ").concat(props.theme.boxShadowBlur, " ").concat(props.theme.boxShadowColor);
|
|
89
77
|
}, _variables.responsiveSizes.medium);
|
|
90
|
-
var CloseIconAction = _styledComponents["default"].button(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n all: unset;\n position: absolute;\n top: 24px;\n right: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n box-shadow: 0 0 0 2px transparent;\n color: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n cursor: pointer;\n z-index: 1;\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px #0095ff;\n }\n &:hover {\n background-color: #f2f2f2;\n }\n &:active {\n background-color: #cccccc;\n }\n
|
|
78
|
+
var CloseIconAction = _styledComponents["default"].button(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n all: unset;\n position: absolute;\n top: 24px;\n right: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n box-shadow: 0 0 0 2px transparent;\n color: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n cursor: pointer;\n z-index: 1;\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px #0095ff;\n }\n &:hover {\n background-color: #f2f2f2;\n }\n &:active {\n background-color: #cccccc;\n }\n span {\n font-size: ", ";\n }\n"])), function (props) {
|
|
91
79
|
return props.theme.closeIconBackgroundColor;
|
|
92
80
|
}, function (props) {
|
|
93
81
|
return props.theme.closeIconColor;
|
|
@@ -100,8 +88,6 @@ var CloseIconAction = _styledComponents["default"].button(_templateObject5 || (_
|
|
|
100
88
|
}, function (props) {
|
|
101
89
|
return props.theme.closeIconBorderColor;
|
|
102
90
|
}, function (props) {
|
|
103
|
-
return props.theme.
|
|
104
|
-
}, function (props) {
|
|
105
|
-
return props.theme.closeIconHeight;
|
|
91
|
+
return props.theme.closeIconSize;
|
|
106
92
|
});
|
|
107
93
|
var _default = exports["default"] = DxcDialog;
|
|
@@ -10,10 +10,17 @@ import { HalstackProvider } from "../HalstackContext";
|
|
|
10
10
|
import DxcHeading from "../heading/Heading";
|
|
11
11
|
import DxcParagraph from "../paragraph/Paragraph";
|
|
12
12
|
import DxcAlert from "../alert/Alert";
|
|
13
|
+
import { userEvent, within } from "@storybook/testing-library";
|
|
14
|
+
import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
|
|
13
15
|
|
|
14
16
|
export default {
|
|
15
17
|
title: "Dialog",
|
|
16
18
|
component: DxcDialog,
|
|
19
|
+
parameters: {
|
|
20
|
+
viewport: {
|
|
21
|
+
viewports: INITIAL_VIEWPORTS,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
17
24
|
};
|
|
18
25
|
|
|
19
26
|
const opinionatedTheme = {
|
|
@@ -74,6 +81,166 @@ export const DefaultDialogOpinionated = () => (
|
|
|
74
81
|
</ExampleContainer>
|
|
75
82
|
);
|
|
76
83
|
|
|
84
|
+
const ScrollingDialog = () => (
|
|
85
|
+
<ExampleContainer expanded={true}>
|
|
86
|
+
<Title title="Default dialog" theme="light" level={4} />
|
|
87
|
+
<>
|
|
88
|
+
<DxcParagraph>
|
|
89
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
90
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
91
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
92
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
93
|
+
laborum.
|
|
94
|
+
</DxcParagraph>
|
|
95
|
+
<DxcParagraph>
|
|
96
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
97
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
98
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
99
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
100
|
+
laborum.
|
|
101
|
+
</DxcParagraph>
|
|
102
|
+
<DxcParagraph>
|
|
103
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
104
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
105
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
106
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
107
|
+
laborum.
|
|
108
|
+
</DxcParagraph>
|
|
109
|
+
<DxcParagraph>
|
|
110
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
111
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
112
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
113
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
114
|
+
laborum.
|
|
115
|
+
</DxcParagraph>
|
|
116
|
+
<DxcParagraph>
|
|
117
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
118
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
119
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
120
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
121
|
+
laborum.
|
|
122
|
+
</DxcParagraph>
|
|
123
|
+
<DxcParagraph>
|
|
124
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
125
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
126
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
127
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
128
|
+
laborum.
|
|
129
|
+
</DxcParagraph>
|
|
130
|
+
<DxcParagraph>
|
|
131
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
132
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
133
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
134
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
135
|
+
laborum.
|
|
136
|
+
</DxcParagraph>
|
|
137
|
+
<DxcParagraph>
|
|
138
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
139
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
140
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
141
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
142
|
+
laborum.
|
|
143
|
+
</DxcParagraph>
|
|
144
|
+
<DxcParagraph>
|
|
145
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
146
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
147
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
148
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
149
|
+
laborum.
|
|
150
|
+
</DxcParagraph>
|
|
151
|
+
<DxcParagraph>
|
|
152
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
153
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
154
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
155
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
156
|
+
laborum.
|
|
157
|
+
</DxcParagraph>
|
|
158
|
+
<DxcParagraph>
|
|
159
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
160
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
161
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
162
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
163
|
+
laborum.
|
|
164
|
+
</DxcParagraph>
|
|
165
|
+
<DxcParagraph>
|
|
166
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
167
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
168
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
169
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
170
|
+
laborum.
|
|
171
|
+
</DxcParagraph>
|
|
172
|
+
<DxcParagraph>
|
|
173
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
174
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
175
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
176
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
177
|
+
laborum.
|
|
178
|
+
</DxcParagraph>
|
|
179
|
+
<DxcParagraph>
|
|
180
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
181
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
182
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
183
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
184
|
+
laborum.
|
|
185
|
+
</DxcParagraph>
|
|
186
|
+
<DxcParagraph>
|
|
187
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
188
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
189
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
190
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
191
|
+
laborum.
|
|
192
|
+
</DxcParagraph>
|
|
193
|
+
<DxcParagraph>
|
|
194
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
195
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
196
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
197
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
198
|
+
laborum.
|
|
199
|
+
</DxcParagraph>
|
|
200
|
+
<DxcParagraph>
|
|
201
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
202
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
203
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
204
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
205
|
+
laborum.
|
|
206
|
+
</DxcParagraph>
|
|
207
|
+
<DxcParagraph>
|
|
208
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
209
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
210
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
211
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
212
|
+
laborum.
|
|
213
|
+
</DxcParagraph>
|
|
214
|
+
<DxcParagraph>
|
|
215
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
216
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
217
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
218
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
219
|
+
laborum.
|
|
220
|
+
</DxcParagraph>
|
|
221
|
+
</>
|
|
222
|
+
<DxcDialog>
|
|
223
|
+
<DxcInset space="1.5rem">
|
|
224
|
+
<DxcFlex direction="column" gap="1rem">
|
|
225
|
+
<DxcHeading level={4} text="Example title" />
|
|
226
|
+
<DxcParagraph>
|
|
227
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas luctus porttitor. Donec massa magna,
|
|
228
|
+
placerat sit amet felis eget, venenatis fringilla ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing
|
|
229
|
+
elit. Donec congue laoreet orci, nec elementum dolor consequat quis. Curabitur rhoncus justo sed dapibus
|
|
230
|
+
tincidunt. Vestibulum cursus ut risus sit amet congue. Nunc luctus, urna ullamcorper facilisis Jia Le, risus
|
|
231
|
+
eros aliquam erat, ut efficitur ante neque id odio. Nam orci leo, dignissim sit amet dolor ut, congue
|
|
232
|
+
gravida enim. Donec rhoncus aliquam nisl, ac cursus enim bibendum vitae. Nunc sit amet elit ornare,
|
|
233
|
+
malesuada urna eu, fringilla mauris. Vivamus bibendum turpis est, id elementum purus euismod sit amet. Etiam
|
|
234
|
+
sit amet maximus augue. Vivamus erat sapien, ultricies fringilla tellus id, condimentum blandit justo.
|
|
235
|
+
Praesent quis nunc dignissim, pharetra neque molestie, molestie lectus.
|
|
236
|
+
</DxcParagraph>
|
|
237
|
+
<DxcButton label="Test" />
|
|
238
|
+
</DxcFlex>
|
|
239
|
+
</DxcInset>
|
|
240
|
+
</DxcDialog>
|
|
241
|
+
</ExampleContainer>
|
|
242
|
+
);
|
|
243
|
+
|
|
77
244
|
export const DialogWithInputs = () => (
|
|
78
245
|
<ExampleContainer expanded={true}>
|
|
79
246
|
<Title title="Dialog with inputs" theme="light" level={4} />
|
|
@@ -193,3 +360,11 @@ MobileResponsiveDialog.parameters = {
|
|
|
193
360
|
},
|
|
194
361
|
chromatic: { viewports: [375] },
|
|
195
362
|
};
|
|
363
|
+
|
|
364
|
+
export const ScrollDialog = ScrollingDialog.bind({});
|
|
365
|
+
ScrollDialog.play = async ({ canvasElement }) => {
|
|
366
|
+
const canvas = within(canvasElement);
|
|
367
|
+
await userEvent.tab();
|
|
368
|
+
await userEvent.tab();
|
|
369
|
+
await userEvent.tab();
|
|
370
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|