@dxc-technology/halstack-react 0.0.0-1021ecf → 0.0.0-10af1a2
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 +5 -22
- package/HalstackContext.d.ts +1246 -0
- package/HalstackContext.js +310 -0
- package/README.md +47 -0
- package/accordion/Accordion.accessibility.test.js +71 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +105 -192
- package/accordion/Accordion.stories.tsx +83 -149
- package/accordion/Accordion.test.js +56 -0
- package/accordion/types.d.ts +11 -22
- package/accordion-group/AccordionGroup.accessibility.test.js +88 -0
- package/accordion-group/AccordionGroup.d.ts +3 -3
- package/accordion-group/AccordionGroup.js +38 -107
- package/accordion-group/AccordionGroup.stories.tsx +95 -68
- package/accordion-group/AccordionGroup.test.js +98 -0
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +31 -0
- package/accordion-group/AccordionGroupContext.d.ts +3 -0
- package/accordion-group/AccordionGroupContext.js +8 -0
- package/accordion-group/types.d.ts +17 -22
- 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.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/alert/Alert.accessibility.test.js +95 -0
- package/alert/Alert.js +40 -127
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.js +75 -0
- package/alert/types.d.ts +5 -5
- package/badge/Badge.accessibility.test.js +129 -0
- package/badge/Badge.d.ts +4 -0
- package/badge/Badge.js +142 -40
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +54 -0
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +43 -0
- package/bleed/Bleed.stories.tsx +342 -0
- package/bleed/types.d.ts +37 -0
- package/box/Box.accessibility.test.js +33 -0
- package/box/Box.d.ts +1 -1
- package/box/Box.js +30 -81
- package/box/Box.stories.tsx +38 -51
- package/box/Box.test.js +13 -0
- package/box/types.d.ts +3 -14
- 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.js +119 -0
- package/bulleted-list/BulletedList.d.ts +7 -0
- package/bulleted-list/BulletedList.js +92 -0
- package/bulleted-list/BulletedList.stories.tsx +115 -0
- package/bulleted-list/types.d.ts +38 -0
- package/bulleted-list/types.js +5 -0
- package/button/Button.accessibility.test.js +127 -0
- package/button/Button.d.ts +1 -1
- package/button/Button.js +64 -122
- package/button/Button.stories.tsx +155 -106
- package/button/Button.test.js +38 -0
- package/button/types.d.ts +12 -12
- package/card/Card.accessibility.test.js +36 -0
- package/card/Card.d.ts +1 -1
- package/card/Card.js +59 -102
- package/card/Card.stories.tsx +12 -42
- package/card/Card.test.js +39 -0
- package/card/types.d.ts +6 -11
- package/checkbox/Checkbox.accessibility.test.js +87 -0
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/Checkbox.js +143 -181
- package/checkbox/Checkbox.stories.tsx +166 -136
- package/checkbox/Checkbox.test.js +199 -0
- package/checkbox/types.d.ts +18 -6
- package/chip/Chip.accessibility.test.js +67 -0
- package/chip/Chip.d.ts +1 -1
- package/chip/Chip.js +49 -122
- package/chip/Chip.stories.tsx +109 -31
- package/chip/Chip.test.js +41 -0
- package/chip/types.d.ts +8 -16
- package/common/coreTokens.d.ts +237 -0
- package/common/coreTokens.js +184 -0
- package/common/utils.d.ts +1 -0
- package/common/utils.js +6 -12
- package/common/variables.d.ts +1392 -0
- package/common/variables.js +1080 -1428
- 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.js +97 -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.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.d.ts +4 -0
- package/date-input/Calendar.js +214 -0
- package/date-input/DateInput.accessibility.test.js +228 -0
- package/date-input/DateInput.js +170 -306
- package/date-input/DateInput.stories.tsx +210 -56
- package/date-input/DateInput.test.js +808 -0
- package/date-input/DatePicker.d.ts +4 -0
- package/date-input/DatePicker.js +121 -0
- package/date-input/YearPicker.d.ts +4 -0
- package/date-input/YearPicker.js +100 -0
- package/date-input/types.d.ts +86 -22
- package/dialog/Dialog.accessibility.test.js +69 -0
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +56 -129
- package/dialog/Dialog.stories.tsx +326 -167
- package/dialog/Dialog.test.js +307 -0
- package/dialog/types.d.ts +18 -25
- 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.js +38 -0
- package/divider/types.d.ts +21 -0
- package/divider/types.js +5 -0
- package/dropdown/Dropdown.accessibility.test.js +180 -0
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +233 -329
- package/dropdown/Dropdown.stories.tsx +244 -64
- package/dropdown/Dropdown.test.js +599 -0
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +63 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +71 -0
- package/dropdown/types.d.ts +37 -30
- package/file-input/FileInput.accessibility.test.js +160 -0
- package/file-input/FileInput.d.ts +2 -2
- package/file-input/FileInput.js +246 -393
- package/file-input/FileInput.stories.tsx +123 -12
- package/file-input/FileInput.test.js +382 -0
- package/file-input/FileItem.d.ts +4 -14
- package/file-input/FileItem.js +61 -120
- package/file-input/types.d.ts +25 -8
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +57 -0
- package/flex/Flex.stories.tsx +112 -0
- package/flex/types.d.ts +97 -0
- package/flex/types.js +5 -0
- package/footer/Footer.accessibility.test.js +125 -0
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +73 -193
- package/footer/Footer.stories.tsx +99 -21
- package/footer/Footer.test.js +85 -0
- package/footer/Icons.d.ts +3 -2
- package/footer/Icons.js +54 -23
- package/footer/types.d.ts +26 -27
- package/grid/Grid.d.ts +7 -0
- package/grid/Grid.js +76 -0
- package/grid/Grid.stories.tsx +219 -0
- package/grid/types.d.ts +115 -0
- package/grid/types.js +5 -0
- package/header/Header.accessibility.test.js +93 -0
- package/header/Header.d.ts +4 -3
- package/header/Header.js +104 -218
- package/header/Header.stories.tsx +168 -63
- package/header/Header.test.js +66 -0
- package/header/Icons.d.ts +2 -2
- package/header/Icons.js +5 -15
- package/header/types.d.ts +7 -21
- package/heading/Heading.accessibility.test.js +33 -0
- package/heading/Heading.js +10 -32
- package/heading/Heading.test.js +169 -0
- package/heading/types.d.ts +7 -7
- 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.js +56 -0
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +129 -0
- package/image/types.d.ts +72 -0
- package/image/types.js +5 -0
- package/inset/Inset.d.ts +3 -0
- package/inset/Inset.js +43 -0
- package/inset/Inset.stories.tsx +230 -0
- package/inset/types.d.ts +37 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +16 -6
- package/layout/ApplicationLayout.js +88 -176
- package/layout/ApplicationLayout.stories.tsx +85 -94
- package/layout/Icons.d.ts +7 -0
- package/layout/Icons.js +41 -48
- package/layout/types.d.ts +19 -35
- package/link/Link.accessibility.test.js +108 -0
- package/link/Link.d.ts +3 -2
- package/link/Link.js +64 -108
- package/link/Link.stories.tsx +161 -54
- package/link/Link.test.js +63 -0
- package/link/types.d.ts +15 -35
- package/main.d.ts +20 -18
- package/main.js +89 -120
- package/nav-tabs/NavTabs.accessibility.test.js +44 -0
- package/nav-tabs/NavTabs.d.ts +7 -0
- package/nav-tabs/NavTabs.js +93 -0
- package/nav-tabs/NavTabs.stories.tsx +279 -0
- package/nav-tabs/NavTabs.test.js +77 -0
- package/nav-tabs/NavTabsContext.d.ts +3 -0
- package/nav-tabs/NavTabsContext.js +8 -0
- package/nav-tabs/Tab.d.ts +4 -0
- package/nav-tabs/Tab.js +117 -0
- package/nav-tabs/types.d.ts +52 -0
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.accessibility.test.js +228 -0
- package/number-input/NumberInput.js +47 -44
- package/number-input/NumberInput.stories.tsx +44 -28
- package/number-input/NumberInput.test.js +989 -0
- package/number-input/NumberInputContext.d.ts +3 -4
- package/number-input/NumberInputContext.js +3 -14
- package/number-input/types.d.ts +34 -15
- package/package.json +54 -53
- package/paginator/Paginator.accessibility.test.js +79 -0
- package/paginator/Paginator.js +46 -100
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.js +335 -0
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.accessibility.test.js +28 -0
- package/paragraph/Paragraph.d.ts +5 -0
- package/paragraph/Paragraph.js +22 -0
- package/paragraph/Paragraph.stories.tsx +27 -0
- package/password-input/PasswordInput.accessibility.test.js +153 -0
- package/password-input/PasswordInput.js +58 -124
- package/password-input/PasswordInput.stories.tsx +1 -33
- package/password-input/PasswordInput.test.js +198 -0
- package/password-input/types.d.ts +21 -17
- package/progress-bar/ProgressBar.accessibility.test.js +35 -0
- package/progress-bar/ProgressBar.js +68 -92
- package/progress-bar/ProgressBar.stories.tsx +93 -0
- package/progress-bar/ProgressBar.test.js +93 -0
- package/progress-bar/types.d.ts +3 -3
- package/quick-nav/QuickNav.accessibility.test.js +57 -0
- package/quick-nav/QuickNav.d.ts +4 -0
- package/quick-nav/QuickNav.js +94 -0
- package/quick-nav/QuickNav.stories.tsx +356 -0
- package/quick-nav/types.d.ts +21 -0
- package/quick-nav/types.js +5 -0
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +67 -73
- package/radio-group/RadioGroup.accessibility.test.js +97 -0
- package/radio-group/RadioGroup.js +109 -141
- package/radio-group/RadioGroup.stories.tsx +171 -36
- package/radio-group/RadioGroup.test.js +756 -0
- package/radio-group/types.d.ts +88 -10
- package/resultset-table/Icons.d.ts +7 -0
- package/resultset-table/Icons.js +47 -0
- package/resultset-table/ResultsetTable.accessibility.test.js +285 -0
- package/resultset-table/ResultsetTable.d.ts +7 -0
- package/resultset-table/ResultsetTable.js +171 -0
- package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +173 -37
- package/resultset-table/ResultsetTable.test.js +381 -0
- package/{resultsetTable → resultset-table}/types.d.ts +44 -11
- package/resultset-table/types.js +5 -0
- package/select/Listbox.d.ts +4 -0
- package/select/Listbox.js +155 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +89 -0
- package/select/Select.accessibility.test.js +228 -0
- package/select/Select.js +243 -504
- package/select/Select.stories.tsx +602 -255
- package/select/Select.test.js +2265 -0
- package/select/types.d.ts +65 -26
- package/sidenav/Sidenav.accessibility.test.js +59 -0
- package/sidenav/Sidenav.d.ts +6 -5
- package/sidenav/Sidenav.js +136 -71
- package/sidenav/Sidenav.stories.tsx +246 -151
- package/sidenav/Sidenav.test.js +37 -0
- package/sidenav/SidenavContext.d.ts +5 -0
- package/sidenav/SidenavContext.js +13 -0
- package/sidenav/types.d.ts +52 -26
- package/slider/Slider.accessibility.test.js +104 -0
- package/slider/Slider.d.ts +2 -2
- package/slider/Slider.js +149 -180
- package/slider/Slider.stories.tsx +68 -65
- package/slider/Slider.test.js +254 -0
- package/slider/types.d.ts +11 -3
- package/spinner/Spinner.accessibility.test.js +96 -0
- package/spinner/Spinner.js +34 -74
- package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +53 -27
- package/spinner/Spinner.test.js +55 -0
- package/spinner/types.d.ts +3 -3
- 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.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/switch/Switch.accessibility.test.js +98 -0
- package/switch/Switch.d.ts +2 -2
- package/switch/Switch.js +149 -114
- package/switch/Switch.stories.tsx +56 -67
- package/switch/Switch.test.js +180 -0
- package/switch/types.d.ts +13 -5
- package/table/DropdownTheme.js +62 -0
- package/table/Table.accessibility.test.js +93 -0
- package/table/Table.d.ts +6 -2
- package/table/Table.js +78 -35
- package/table/Table.stories.tsx +663 -0
- package/table/Table.test.js +113 -0
- package/table/types.d.ts +34 -6
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +117 -0
- package/tabs/Tabs.accessibility.test.js +56 -0
- package/tabs/Tabs.d.ts +1 -1
- package/tabs/Tabs.js +306 -146
- package/tabs/Tabs.stories.tsx +127 -19
- package/tabs/Tabs.test.js +276 -0
- package/tabs/types.d.ts +46 -24
- package/tag/Tag.accessibility.test.js +69 -0
- package/tag/Tag.d.ts +1 -1
- package/tag/Tag.js +43 -85
- package/tag/Tag.stories.tsx +36 -29
- package/tag/Tag.test.js +41 -0
- package/tag/types.d.ts +25 -16
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +67 -0
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +94 -0
- package/text-input/TextInput.accessibility.test.js +321 -0
- package/text-input/TextInput.js +334 -557
- package/text-input/TextInput.stories.tsx +291 -273
- package/text-input/TextInput.test.js +1756 -0
- package/text-input/types.d.ts +70 -24
- package/textarea/Textarea.accessibility.test.js +155 -0
- package/textarea/Textarea.js +86 -135
- package/textarea/Textarea.stories.tsx +174 -0
- package/textarea/Textarea.test.js +406 -0
- package/textarea/types.d.ts +27 -16
- package/toggle-group/ToggleGroup.accessibility.test.js +107 -0
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +94 -106
- package/toggle-group/ToggleGroup.stories.tsx +56 -11
- package/toggle-group/ToggleGroup.test.js +137 -0
- package/toggle-group/types.d.ts +36 -19
- package/typography/Typography.accessibility.test.js +339 -0
- package/typography/Typography.d.ts +4 -0
- package/typography/Typography.js +23 -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 +1144 -1
- package/useTheme.js +4 -11
- package/useTranslatedLabels.d.ts +85 -0
- package/useTranslatedLabels.js +14 -0
- package/utils/BaseTypography.d.ts +21 -0
- package/utils/BaseTypography.js +94 -0
- package/utils/FocusLock.d.ts +13 -0
- package/utils/FocusLock.js +124 -0
- package/wizard/Wizard.accessibility.test.js +55 -0
- package/wizard/Wizard.d.ts +1 -1
- package/wizard/Wizard.js +78 -120
- package/wizard/Wizard.stories.tsx +67 -19
- package/wizard/Wizard.test.js +114 -0
- package/wizard/types.d.ts +14 -10
- package/ThemeContext.d.ts +0 -15
- package/ThemeContext.js +0 -243
- package/V3Select/V3Select.js +0 -455
- package/V3Select/index.d.ts +0 -27
- package/V3Textarea/V3Textarea.js +0 -260
- package/V3Textarea/index.d.ts +0 -27
- package/card/ice-cream.jpg +0 -0
- package/common/OpenSans.css +0 -81
- package/common/RequiredComponent.js +0 -32
- 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/Date.js +0 -373
- package/date/index.d.ts +0 -27
- package/input-text/Icons.js +0 -22
- package/input-text/InputText.js +0 -611
- package/input-text/index.d.ts +0 -36
- package/list/List.d.ts +0 -8
- package/list/List.js +0 -47
- package/list/List.stories.tsx +0 -95
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/paginator/Icons.js +0 -66
- package/progress-bar/ProgressBar.stories.jsx +0 -58
- package/radio/Radio.d.ts +0 -4
- package/radio/Radio.js +0 -174
- package/radio/Radio.stories.tsx +0 -192
- package/radio/types.d.ts +0 -54
- package/resultsetTable/ResultsetTable.d.ts +0 -4
- package/resultsetTable/ResultsetTable.js +0 -251
- package/row/Row.d.ts +0 -11
- package/row/Row.js +0 -127
- package/row/Row.stories.tsx +0 -239
- package/stack/Stack.d.ts +0 -10
- package/stack/Stack.js +0 -97
- package/stack/Stack.stories.tsx +0 -166
- package/table/Table.stories.jsx +0 -277
- package/text/Text.d.ts +0 -7
- package/text/Text.js +0 -30
- package/text/Text.stories.tsx +0 -19
- package/textarea/Textarea.stories.jsx +0 -136
- package/toggle/Toggle.js +0 -186
- package/toggle/index.d.ts +0 -21
- package/upload/Upload.js +0 -201
- package/upload/buttons-upload/ButtonsUpload.js +0 -111
- package/upload/buttons-upload/Icons.js +0 -40
- package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
- package/upload/dragAndDropArea/Icons.js +0 -39
- package/upload/file-upload/FileToUpload.js +0 -115
- package/upload/file-upload/Icons.js +0 -66
- package/upload/files-upload/FilesToUpload.js +0 -109
- package/upload/index.d.ts +0 -15
- package/upload/transaction/Icons.js +0 -160
- package/upload/transaction/Transaction.js +0 -104
- package/upload/transactions/Transactions.js +0 -94
- /package/{radio → action-icon}/types.js +0 -0
- /package/{resultsetTable → badge}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → bleed/types.js} +0 -0
|
@@ -1,23 +1,34 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import DxcResultsetTable from "./ResultsetTable";
|
|
3
|
-
import DxcButton from "../button/Button";
|
|
4
3
|
import Title from "../../.storybook/components/Title";
|
|
5
4
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
6
5
|
import { userEvent, within } from "@storybook/testing-library";
|
|
6
|
+
import styled from "styled-components";
|
|
7
|
+
import { HalstackProvider } from "../HalstackContext";
|
|
8
|
+
import { disabledRules } from "../../test/accessibility/rules/specific/resultset-table/disabledRules";
|
|
9
|
+
import preview from "../../.storybook/preview";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
9
12
|
title: "Resultset Table",
|
|
10
13
|
component: DxcResultsetTable,
|
|
14
|
+
parameters: {
|
|
15
|
+
a11y: {
|
|
16
|
+
config: {
|
|
17
|
+
rules: [
|
|
18
|
+
...disabledRules.map((ruleId) => ({ id: ruleId, reviewOnFail: true })),
|
|
19
|
+
...preview?.parameters?.a11y?.config?.rules,
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
11
24
|
};
|
|
12
25
|
|
|
13
|
-
const deleteIcon = (
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
);
|
|
20
|
-
};
|
|
26
|
+
const deleteIcon = (
|
|
27
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
|
|
28
|
+
<path fill="currentColor" d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" />
|
|
29
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
30
|
+
</svg>
|
|
31
|
+
);
|
|
21
32
|
|
|
22
33
|
const columns = [{ displayValue: "Id" }, { displayValue: "Name" }, { displayValue: "City" }];
|
|
23
34
|
|
|
@@ -30,17 +41,77 @@ const rows = [
|
|
|
30
41
|
[{ displayValue: "006" }, { displayValue: "Cris" }, { displayValue: "Paris" }],
|
|
31
42
|
];
|
|
32
43
|
|
|
44
|
+
const advancedTheme = {
|
|
45
|
+
table: {
|
|
46
|
+
actionIconColor: "#1B75BB",
|
|
47
|
+
hoverActionIconColor: "#1B75BB",
|
|
48
|
+
activeActionIconColor: "#1B75BB",
|
|
49
|
+
focusActionIconColor: "#1B75BB",
|
|
50
|
+
disabledActionIconColor: "#666666",
|
|
51
|
+
hoverButtonBackgroundColor: "#cccccc",
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const actions = [
|
|
56
|
+
{
|
|
57
|
+
title: "icon",
|
|
58
|
+
onClick: (value?) => {
|
|
59
|
+
console.log(value);
|
|
60
|
+
},
|
|
61
|
+
options: [
|
|
62
|
+
{
|
|
63
|
+
value: "1",
|
|
64
|
+
label: "Amazon with a very long text",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
value: "2",
|
|
68
|
+
label: "Ebay",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
value: "3",
|
|
72
|
+
label: "Apple",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
icon: "filled_edit",
|
|
78
|
+
title: "icon",
|
|
79
|
+
onClick: () => {},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
icon: deleteIcon,
|
|
83
|
+
title: "icon",
|
|
84
|
+
onClick: () => {},
|
|
85
|
+
disabled: true,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
icon: deleteIcon,
|
|
89
|
+
title: "icon",
|
|
90
|
+
onClick: () => {},
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
|
|
33
94
|
const rowsIcon = [
|
|
34
95
|
[
|
|
35
96
|
{ displayValue: "001", sortValue: "001" },
|
|
36
97
|
{ displayValue: "Peter" },
|
|
37
|
-
{
|
|
98
|
+
{
|
|
99
|
+
displayValue: <DxcResultsetTable.ActionsCell actions={actions} />,
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
[
|
|
103
|
+
{ displayValue: "002", sortValue: "002" },
|
|
104
|
+
{ displayValue: "Louis" },
|
|
105
|
+
{
|
|
106
|
+
displayValue: <DxcResultsetTable.ActionsCell actions={actions} />,
|
|
107
|
+
},
|
|
38
108
|
],
|
|
39
|
-
[{ displayValue: "002", sortValue: "002" }, { displayValue: "Louis" }, { displayValue: "" }],
|
|
40
109
|
[
|
|
41
110
|
{ displayValue: "003", sortValue: "003" },
|
|
42
111
|
{ displayValue: "Mark" },
|
|
43
|
-
{
|
|
112
|
+
{
|
|
113
|
+
displayValue: <DxcResultsetTable.ActionsCell actions={actions} />,
|
|
114
|
+
},
|
|
44
115
|
],
|
|
45
116
|
];
|
|
46
117
|
|
|
@@ -50,6 +121,24 @@ const columnsSortable = [
|
|
|
50
121
|
{ displayValue: "City", isSortable: false },
|
|
51
122
|
];
|
|
52
123
|
|
|
124
|
+
const longValues = [
|
|
125
|
+
[
|
|
126
|
+
{ displayValue: "000000000000000001", sortValue: "000000000000000001" },
|
|
127
|
+
{ displayValue: "Peter Larsson González", sortValue: "Peter" },
|
|
128
|
+
{ displayValue: "Miami: The city that never sleeps", sortValue: "Miami" },
|
|
129
|
+
],
|
|
130
|
+
[
|
|
131
|
+
{ displayValue: "002", sortValue: "002" },
|
|
132
|
+
{ displayValue: "Louis", sortValue: "Louis" },
|
|
133
|
+
{ displayValue: "London", sortValue: "London" },
|
|
134
|
+
],
|
|
135
|
+
[
|
|
136
|
+
{ displayValue: "003", sortValue: "003" },
|
|
137
|
+
{ displayValue: "Aida", sortValue: "Aida" },
|
|
138
|
+
{ displayValue: "Wroclaw", sortValue: "Wroclaw" },
|
|
139
|
+
],
|
|
140
|
+
];
|
|
141
|
+
|
|
53
142
|
const rowsSortable = [
|
|
54
143
|
[
|
|
55
144
|
{ displayValue: "001", sortValue: "001" },
|
|
@@ -169,89 +258,118 @@ export const Chromatic = () => (
|
|
|
169
258
|
<>
|
|
170
259
|
<ExampleContainer>
|
|
171
260
|
<Title title="Sortable table" theme="light" level={4} />
|
|
172
|
-
<DxcResultsetTable columns={columnsSortable} rows={rowsSortable}
|
|
261
|
+
<DxcResultsetTable columns={columnsSortable} rows={rowsSortable} />
|
|
173
262
|
</ExampleContainer>
|
|
174
263
|
<ExampleContainer>
|
|
175
264
|
<Title title="With action" theme="light" level={4} />
|
|
176
|
-
<DxcResultsetTable columns={columns} rows={rowsIcon}
|
|
265
|
+
<DxcResultsetTable columns={columns} rows={rowsIcon} />
|
|
177
266
|
</ExampleContainer>
|
|
178
267
|
<ExampleContainer>
|
|
179
268
|
<Title title="With items per page option" theme="light" level={4} />
|
|
180
|
-
<DxcResultsetTable
|
|
181
|
-
columns={columns}
|
|
182
|
-
rows={rows}
|
|
183
|
-
itemsPerPage={2}
|
|
184
|
-
itemsPerPageOptions={[2, 3]}
|
|
185
|
-
></DxcResultsetTable>
|
|
269
|
+
<DxcResultsetTable columns={columns} rows={rows} itemsPerPage={2} itemsPerPageOptions={[2, 3]} />
|
|
186
270
|
</ExampleContainer>
|
|
187
271
|
<ExampleContainer>
|
|
188
272
|
<Title title="Scroll resultset table" theme="light" level={4} />
|
|
189
|
-
<DxcResultsetTable columns={longColumns} rows={longRows}
|
|
273
|
+
<DxcResultsetTable columns={longColumns} rows={longRows} />
|
|
274
|
+
</ExampleContainer>
|
|
275
|
+
<ExampleContainer>
|
|
276
|
+
<Title title="Without paginator" theme="light" level={4} />
|
|
277
|
+
<DxcResultsetTable columns={columns} rows={rows} hidePaginator />
|
|
278
|
+
</ExampleContainer>
|
|
279
|
+
<ExampleContainer>
|
|
280
|
+
<SmallContainer>
|
|
281
|
+
<Title title="Small container and text overflow" theme="light" level={4} />
|
|
282
|
+
<DxcResultsetTable columns={columnsSortable} rows={longValues} />
|
|
283
|
+
</SmallContainer>
|
|
284
|
+
</ExampleContainer>
|
|
285
|
+
<ExampleContainer>
|
|
286
|
+
<Title title="Reduced sortable table" theme="light" level={4} />
|
|
287
|
+
<DxcResultsetTable columns={columnsSortable} rows={rowsSortable} mode="reduced" />
|
|
288
|
+
</ExampleContainer>
|
|
289
|
+
{/* PENDING SMALL ICON VERSION */}
|
|
290
|
+
<ExampleContainer>
|
|
291
|
+
<Title title="Reduced with items per page option" theme="light" level={4} />
|
|
292
|
+
<DxcResultsetTable columns={columns} rows={rows} itemsPerPage={2} itemsPerPageOptions={[2, 3]} mode="reduced" />
|
|
293
|
+
</ExampleContainer>
|
|
294
|
+
<ExampleContainer>
|
|
295
|
+
<Title title="Reduced scroll resultset table" theme="light" level={4} />
|
|
296
|
+
<DxcResultsetTable columns={longColumns} rows={longRows} mode="reduced" />
|
|
297
|
+
</ExampleContainer>
|
|
298
|
+
<ExampleContainer>
|
|
299
|
+
<SmallContainer>
|
|
300
|
+
<Title title="Reduced small container and text overflow" theme="light" level={4} />
|
|
301
|
+
<DxcResultsetTable columns={columnsSortable} rows={longValues} mode="reduced" />
|
|
302
|
+
</SmallContainer>
|
|
190
303
|
</ExampleContainer>
|
|
191
304
|
<Title title="Margins" theme="light" level={2} />
|
|
192
305
|
<ExampleContainer>
|
|
193
306
|
<Title title="Xxsmall" theme="light" level={4} />
|
|
194
|
-
<DxcResultsetTable columns={columns} rows={rows} margin={"xxsmall"}
|
|
307
|
+
<DxcResultsetTable columns={columns} rows={rows} margin={"xxsmall"} />
|
|
195
308
|
</ExampleContainer>
|
|
196
309
|
<ExampleContainer>
|
|
197
310
|
<Title title="Xsmall" theme="light" level={4} />
|
|
198
|
-
<DxcResultsetTable columns={columns} rows={rows} margin={"xsmall"}
|
|
311
|
+
<DxcResultsetTable columns={columns} rows={rows} margin={"xsmall"} />
|
|
199
312
|
</ExampleContainer>
|
|
200
313
|
<ExampleContainer>
|
|
201
314
|
<Title title="Small" theme="light" level={4} />
|
|
202
|
-
<DxcResultsetTable columns={columns} rows={rows} margin={"small"}
|
|
315
|
+
<DxcResultsetTable columns={columns} rows={rows} margin={"small"} />
|
|
203
316
|
</ExampleContainer>
|
|
204
317
|
<ExampleContainer>
|
|
205
318
|
<Title title="Medium" theme="light" level={4} />
|
|
206
|
-
<DxcResultsetTable columns={columns} rows={rows} margin={"medium"}
|
|
319
|
+
<DxcResultsetTable columns={columns} rows={rows} margin={"medium"} />
|
|
207
320
|
</ExampleContainer>
|
|
208
321
|
<ExampleContainer>
|
|
209
322
|
<Title title="Large" theme="light" level={4} />
|
|
210
|
-
<DxcResultsetTable columns={columns} rows={rows} margin={"large"}
|
|
323
|
+
<DxcResultsetTable columns={columns} rows={rows} margin={"large"} />
|
|
211
324
|
</ExampleContainer>
|
|
212
325
|
<ExampleContainer>
|
|
213
326
|
<Title title="Xlarge" theme="light" level={4} />
|
|
214
|
-
<DxcResultsetTable columns={columns} rows={rows} margin={"xlarge"}
|
|
327
|
+
<DxcResultsetTable columns={columns} rows={rows} margin={"xlarge"} />
|
|
215
328
|
</ExampleContainer>
|
|
216
|
-
<ExampleContainer>
|
|
329
|
+
<ExampleContainer expanded>
|
|
217
330
|
<Title title="Xxlarge" theme="light" level={4} />
|
|
218
|
-
<DxcResultsetTable columns={columns} rows={rows} margin={"xxlarge"}
|
|
219
|
-
<hr />
|
|
331
|
+
<DxcResultsetTable columns={columns} rows={rows} margin={"xxlarge"} />
|
|
220
332
|
</ExampleContainer>
|
|
221
333
|
</>
|
|
222
334
|
);
|
|
223
335
|
|
|
336
|
+
const SmallContainer = styled.div`
|
|
337
|
+
width: 500px;
|
|
338
|
+
`;
|
|
339
|
+
|
|
224
340
|
const ResultsetTableAsc = () => (
|
|
225
341
|
<ExampleContainer>
|
|
226
342
|
<Title title="Ascendant sorting" theme="light" level={4} />
|
|
227
|
-
<DxcResultsetTable columns={columnsSortable} rows={rowsSortable}
|
|
343
|
+
<DxcResultsetTable columns={columnsSortable} rows={rowsSortable} />
|
|
228
344
|
</ExampleContainer>
|
|
229
345
|
);
|
|
230
346
|
|
|
231
347
|
export const AscendentSorting = ResultsetTableAsc.bind({});
|
|
232
348
|
AscendentSorting.play = async ({ canvasElement }) => {
|
|
233
349
|
const canvas = within(canvasElement);
|
|
234
|
-
|
|
350
|
+
const idHeader = canvas.getAllByRole("button")[0];
|
|
351
|
+
await userEvent.click(idHeader);
|
|
235
352
|
};
|
|
236
353
|
|
|
237
354
|
const ResultsetTableDesc = () => (
|
|
238
355
|
<ExampleContainer>
|
|
239
356
|
<Title title="Descendant sorting" theme="light" level={4} />
|
|
240
|
-
<DxcResultsetTable columns={columnsSortable} rows={rowsSortable}
|
|
357
|
+
<DxcResultsetTable columns={columnsSortable} rows={rowsSortable} />
|
|
241
358
|
</ExampleContainer>
|
|
242
359
|
);
|
|
243
360
|
|
|
244
361
|
export const DescendantSorting = ResultsetTableDesc.bind({});
|
|
245
362
|
DescendantSorting.play = async ({ canvasElement }) => {
|
|
246
363
|
const canvas = within(canvasElement);
|
|
247
|
-
|
|
248
|
-
await userEvent.click(
|
|
364
|
+
const nameHeader = canvas.getAllByRole("button")[1];
|
|
365
|
+
await userEvent.click(nameHeader);
|
|
366
|
+
await userEvent.click(nameHeader);
|
|
249
367
|
};
|
|
250
368
|
|
|
251
369
|
const ResultsetTableMiddle = () => (
|
|
252
370
|
<ExampleContainer>
|
|
253
371
|
<Title title="Middle page" theme="light" level={4} />
|
|
254
|
-
<DxcResultsetTable columns={columns} rows={rows} itemsPerPage={2}
|
|
372
|
+
<DxcResultsetTable columns={columns} rows={rows} itemsPerPage={2} />
|
|
255
373
|
</ExampleContainer>
|
|
256
374
|
);
|
|
257
375
|
|
|
@@ -265,7 +383,7 @@ MiddlePage.play = async ({ canvasElement }) => {
|
|
|
265
383
|
const ResultsetTableLast = () => (
|
|
266
384
|
<ExampleContainer>
|
|
267
385
|
<Title title="Last page" theme="light" level={4} />
|
|
268
|
-
<DxcResultsetTable columns={columns} rows={rows} itemsPerPage={2}
|
|
386
|
+
<DxcResultsetTable columns={columns} rows={rows} itemsPerPage={2} />
|
|
269
387
|
</ExampleContainer>
|
|
270
388
|
);
|
|
271
389
|
|
|
@@ -275,3 +393,21 @@ LastPage.play = async ({ canvasElement }) => {
|
|
|
275
393
|
const nextButton = canvas.getAllByRole("button")[3];
|
|
276
394
|
await userEvent.click(nextButton);
|
|
277
395
|
};
|
|
396
|
+
|
|
397
|
+
const ResultsetActionsCellDropdown = () => (
|
|
398
|
+
<ExampleContainer>
|
|
399
|
+
<Title title="Dropdown Action" theme="light" level={4} />
|
|
400
|
+
<DxcResultsetTable columns={columns} rows={rowsIcon} itemsPerPage={2} />
|
|
401
|
+
<Title title="Custom theme actions cell" theme="light" level={4} />
|
|
402
|
+
<HalstackProvider advancedTheme={advancedTheme}>
|
|
403
|
+
<DxcResultsetTable columns={columns} rows={rowsIcon} itemsPerPage={2} />
|
|
404
|
+
</HalstackProvider>
|
|
405
|
+
</ExampleContainer>
|
|
406
|
+
);
|
|
407
|
+
|
|
408
|
+
export const DropdownAction = ResultsetActionsCellDropdown.bind({});
|
|
409
|
+
DropdownAction.play = async ({ canvasElement }) => {
|
|
410
|
+
const canvas = within(canvasElement);
|
|
411
|
+
const dropdown = canvas.getAllByRole("button")[5];
|
|
412
|
+
await userEvent.click(dropdown);
|
|
413
|
+
};
|