@dxc-technology/halstack-react 0.0.0-a062293 → 0.0.0-a0fadb7
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 +1237 -6
- package/HalstackContext.js +123 -111
- package/README.md +47 -0
- package/accordion/Accordion.accessibility.test.d.ts +1 -0
- package/accordion/Accordion.accessibility.test.js +71 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +41 -112
- package/accordion/Accordion.stories.tsx +52 -157
- package/accordion/Accordion.test.d.ts +1 -0
- package/accordion/Accordion.test.js +18 -33
- package/accordion/types.d.ts +6 -18
- 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 -2
- package/accordion-group/AccordionGroup.js +29 -77
- package/accordion-group/AccordionGroup.stories.tsx +78 -77
- package/accordion-group/AccordionGroup.test.d.ts +1 -0
- package/accordion-group/AccordionGroup.test.js +41 -73
- 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 +7 -19
- 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/alert/Alert.accessibility.test.d.ts +1 -0
- package/alert/Alert.accessibility.test.js +95 -0
- package/alert/Alert.js +36 -126
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.d.ts +1 -0
- package/alert/Alert.test.js +28 -45
- package/alert/types.d.ts +5 -5
- 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 +142 -42
- 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/bleed/Bleed.js +13 -21
- package/bleed/Bleed.stories.tsx +1 -0
- package/bleed/types.d.ts +2 -2
- package/box/Box.accessibility.test.d.ts +1 -0
- package/box/Box.accessibility.test.js +33 -0
- package/box/Box.d.ts +1 -1
- package/box/Box.js +18 -59
- package/box/Box.stories.tsx +38 -51
- package/box/Box.test.d.ts +1 -0
- package/box/Box.test.js +1 -6
- package/box/types.d.ts +3 -15
- 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/bulleted-list/BulletedList.accessibility.test.d.ts +1 -0
- package/bulleted-list/BulletedList.accessibility.test.js +119 -0
- package/bulleted-list/BulletedList.js +22 -53
- package/bulleted-list/BulletedList.stories.tsx +8 -93
- package/bulleted-list/types.d.ts +32 -5
- package/button/Button.accessibility.test.d.ts +1 -0
- package/button/Button.accessibility.test.js +127 -0
- package/button/Button.d.ts +1 -1
- package/button/Button.js +70 -103
- package/button/Button.stories.tsx +107 -116
- package/button/Button.test.d.ts +1 -0
- package/button/Button.test.js +19 -16
- package/button/types.d.ts +9 -5
- package/card/Card.accessibility.test.d.ts +1 -0
- package/card/Card.accessibility.test.js +36 -0
- package/card/Card.d.ts +1 -1
- package/card/Card.js +49 -89
- package/card/Card.stories.tsx +12 -42
- package/card/Card.test.d.ts +1 -0
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +6 -12
- package/checkbox/Checkbox.accessibility.test.d.ts +1 -0
- package/checkbox/Checkbox.accessibility.test.js +87 -0
- package/checkbox/Checkbox.js +90 -128
- package/checkbox/Checkbox.stories.tsx +68 -54
- package/checkbox/Checkbox.test.d.ts +1 -0
- package/checkbox/Checkbox.test.js +107 -63
- package/checkbox/types.d.ts +8 -4
- package/chip/Chip.accessibility.test.d.ts +1 -0
- package/chip/Chip.accessibility.test.js +69 -0
- package/chip/Chip.js +42 -76
- package/chip/Chip.stories.tsx +120 -40
- package/chip/Chip.test.d.ts +1 -0
- package/chip/Chip.test.js +17 -32
- package/chip/types.d.ts +38 -15
- package/common/coreTokens.d.ts +237 -0
- package/common/coreTokens.js +184 -0
- package/common/fonts.css +2 -0
- package/common/utils.d.ts +1 -0
- package/common/utils.js +6 -12
- package/common/variables.d.ts +1389 -0
- package/common/variables.js +957 -1208
- 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/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 +38 -70
- package/date-input/DateInput.accessibility.test.d.ts +1 -0
- package/date-input/DateInput.accessibility.test.js +230 -0
- package/date-input/DateInput.js +61 -108
- package/date-input/DateInput.stories.tsx +86 -31
- package/date-input/DateInput.test.d.ts +1 -0
- package/date-input/DateInput.test.js +676 -702
- package/date-input/DatePicker.js +46 -57
- package/date-input/YearPicker.js +28 -44
- package/date-input/types.d.ts +28 -22
- package/dialog/Dialog.accessibility.test.d.ts +1 -0
- package/dialog/Dialog.accessibility.test.js +69 -0
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +51 -120
- package/dialog/Dialog.stories.tsx +315 -212
- package/dialog/Dialog.test.d.ts +1 -0
- package/dialog/Dialog.test.js +333 -32
- package/dialog/types.d.ts +18 -26
- 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 +69 -138
- package/dropdown/Dropdown.stories.tsx +205 -98
- package/dropdown/Dropdown.test.d.ts +1 -0
- package/dropdown/Dropdown.test.js +434 -390
- package/dropdown/DropdownMenu.js +23 -40
- package/dropdown/DropdownMenuItem.js +17 -38
- package/dropdown/types.d.ts +20 -24
- package/file-input/FileInput.accessibility.test.d.ts +1 -0
- package/file-input/FileInput.accessibility.test.js +167 -0
- package/file-input/FileInput.js +183 -294
- package/file-input/FileInput.stories.tsx +86 -3
- package/file-input/FileInput.test.d.ts +1 -0
- package/file-input/FileInput.test.js +301 -395
- package/file-input/FileItem.js +31 -67
- package/file-input/types.d.ts +10 -10
- package/flex/Flex.js +27 -39
- package/flex/Flex.stories.tsx +35 -26
- package/flex/types.d.ts +74 -9
- 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 +73 -118
- package/footer/Footer.stories.tsx +94 -23
- package/footer/Footer.test.d.ts +1 -0
- package/footer/Footer.test.js +32 -56
- package/footer/Icons.d.ts +3 -2
- package/footer/Icons.js +53 -22
- package/footer/types.d.ts +26 -28
- 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.d.ts +1 -0
- package/header/Header.accessibility.test.js +94 -0
- package/header/Header.d.ts +4 -3
- package/header/Header.js +55 -150
- package/header/Header.stories.tsx +130 -35
- package/header/Header.test.d.ts +1 -0
- package/header/Header.test.js +12 -25
- package/header/Icons.d.ts +2 -2
- package/header/Icons.js +3 -13
- package/header/types.d.ts +7 -22
- package/heading/Heading.accessibility.test.d.ts +1 -0
- package/heading/Heading.accessibility.test.js +33 -0
- package/heading/Heading.js +10 -32
- package/heading/Heading.test.d.ts +1 -0
- package/heading/Heading.test.js +64 -94
- package/heading/types.d.ts +7 -7
- 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.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.js +13 -21
- package/inset/Inset.stories.tsx +2 -1
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +5 -5
- package/layout/ApplicationLayout.js +36 -70
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +7 -5
- package/layout/Icons.js +41 -59
- package/layout/types.d.ts +5 -6
- package/link/Link.accessibility.test.d.ts +1 -0
- package/link/Link.accessibility.test.js +108 -0
- package/link/Link.js +31 -50
- package/link/Link.stories.tsx +64 -4
- package/link/Link.test.d.ts +1 -0
- package/link/Link.test.js +23 -43
- package/link/types.d.ts +14 -14
- package/main.d.ts +12 -5
- package/main.js +55 -59
- 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 +7 -0
- package/nav-tabs/NavTabs.js +108 -0
- package/nav-tabs/NavTabs.stories.tsx +294 -0
- package/nav-tabs/NavTabs.test.d.ts +1 -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.js +117 -0
- package/{tabs-nav → nav-tabs}/types.d.ts +15 -16
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.accessibility.test.d.ts +1 -0
- package/number-input/NumberInput.accessibility.test.js +228 -0
- package/number-input/NumberInput.js +46 -36
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.d.ts +1 -0
- package/number-input/NumberInput.test.js +859 -412
- package/number-input/NumberInputContext.d.ts +3 -4
- package/number-input/NumberInputContext.js +3 -14
- package/number-input/types.d.ts +17 -5
- package/package.json +45 -41
- package/paginator/Paginator.accessibility.test.d.ts +1 -0
- package/paginator/Paginator.accessibility.test.js +79 -0
- package/paginator/Paginator.js +29 -56
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.d.ts +1 -0
- package/paginator/Paginator.test.js +234 -214
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.accessibility.test.d.ts +1 -0
- package/paragraph/Paragraph.accessibility.test.js +28 -0
- package/paragraph/Paragraph.d.ts +3 -4
- package/paragraph/Paragraph.js +6 -22
- package/paragraph/Paragraph.stories.tsx +0 -17
- package/password-input/PasswordInput.accessibility.test.d.ts +1 -0
- package/password-input/PasswordInput.accessibility.test.js +153 -0
- package/password-input/PasswordInput.js +58 -127
- package/password-input/PasswordInput.stories.tsx +1 -33
- package/password-input/PasswordInput.test.d.ts +1 -0
- package/password-input/PasswordInput.test.js +157 -140
- package/password-input/types.d.ts +8 -7
- package/progress-bar/ProgressBar.accessibility.test.d.ts +1 -0
- package/progress-bar/ProgressBar.accessibility.test.js +35 -0
- package/progress-bar/ProgressBar.d.ts +2 -2
- package/progress-bar/ProgressBar.js +28 -58
- package/progress-bar/{ProgressBar.stories.jsx → ProgressBar.stories.tsx} +36 -3
- package/progress-bar/ProgressBar.test.d.ts +1 -0
- package/progress-bar/ProgressBar.test.js +35 -52
- package/progress-bar/types.d.ts +4 -3
- package/quick-nav/QuickNav.accessibility.test.d.ts +1 -0
- package/quick-nav/QuickNav.accessibility.test.js +57 -0
- package/quick-nav/QuickNav.js +4 -27
- package/quick-nav/QuickNav.stories.tsx +15 -1
- package/quick-nav/types.d.ts +10 -10
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +31 -66
- package/radio-group/RadioGroup.accessibility.test.d.ts +1 -0
- package/radio-group/RadioGroup.accessibility.test.js +97 -0
- package/radio-group/RadioGroup.js +48 -98
- package/radio-group/RadioGroup.stories.tsx +131 -18
- package/radio-group/RadioGroup.test.d.ts +1 -0
- package/radio-group/RadioGroup.test.js +506 -474
- package/radio-group/types.d.ts +8 -8
- package/resultset-table/Icons.d.ts +7 -0
- package/{resultsetTable → resultset-table}/Icons.js +1 -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 +7 -0
- package/{resultsetTable → resultset-table}/ResultsetTable.js +47 -71
- package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +118 -5
- package/resultset-table/ResultsetTable.test.d.ts +1 -0
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +147 -92
- package/{resultsetTable → resultset-table}/types.d.ts +44 -11
- package/resultset-table/types.js +5 -0
- package/select/Listbox.js +36 -54
- package/select/Option.js +28 -36
- package/select/Select.accessibility.test.d.ts +1 -0
- package/select/Select.accessibility.test.js +228 -0
- package/select/Select.js +118 -182
- package/select/Select.stories.tsx +504 -255
- package/select/Select.test.d.ts +1 -0
- package/select/Select.test.js +1903 -1863
- package/select/types.d.ts +15 -16
- package/sidenav/Sidenav.accessibility.test.d.ts +1 -0
- package/sidenav/Sidenav.accessibility.test.js +59 -0
- package/sidenav/Sidenav.d.ts +2 -2
- package/sidenav/Sidenav.js +90 -155
- package/sidenav/Sidenav.stories.tsx +113 -25
- package/sidenav/Sidenav.test.d.ts +1 -0
- package/sidenav/Sidenav.test.js +4 -11
- package/{layout → sidenav}/SidenavContext.d.ts +1 -1
- package/{layout → sidenav}/SidenavContext.js +3 -9
- package/sidenav/types.d.ts +33 -30
- package/slider/Slider.accessibility.test.d.ts +1 -0
- package/slider/Slider.accessibility.test.js +104 -0
- package/slider/Slider.js +68 -128
- package/slider/Slider.stories.tsx +57 -60
- package/slider/Slider.test.d.ts +1 -0
- package/slider/Slider.test.js +118 -111
- package/slider/types.d.ts +4 -4
- package/spinner/Spinner.accessibility.test.d.ts +1 -0
- package/spinner/Spinner.accessibility.test.js +96 -0
- package/spinner/Spinner.js +32 -72
- package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +53 -27
- package/spinner/Spinner.test.d.ts +1 -0
- package/spinner/Spinner.test.js +25 -34
- package/spinner/types.d.ts +3 -3
- 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 +51 -102
- package/switch/Switch.stories.tsx +45 -34
- package/switch/Switch.test.d.ts +1 -0
- package/switch/Switch.test.js +51 -96
- package/switch/types.d.ts +4 -4
- 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 +78 -35
- package/table/Table.stories.tsx +663 -0
- package/table/Table.test.d.ts +1 -0
- package/table/Table.test.js +92 -6
- package/table/types.d.ts +34 -6
- package/tabs/Tab.js +27 -43
- package/tabs/Tabs.accessibility.test.d.ts +1 -0
- package/tabs/Tabs.accessibility.test.js +56 -0
- package/tabs/Tabs.js +69 -163
- package/tabs/Tabs.stories.tsx +46 -4
- package/tabs/Tabs.test.d.ts +1 -0
- package/tabs/Tabs.test.js +60 -135
- package/tabs/types.d.ts +21 -21
- package/tag/Tag.accessibility.test.d.ts +1 -0
- package/tag/Tag.accessibility.test.js +69 -0
- package/tag/Tag.js +34 -66
- package/tag/Tag.stories.tsx +18 -8
- package/tag/Tag.test.d.ts +1 -0
- package/tag/Tag.test.js +17 -36
- package/tag/types.d.ts +9 -9
- package/text-input/Suggestion.js +11 -28
- package/text-input/Suggestions.d.ts +1 -1
- package/text-input/Suggestions.js +30 -70
- package/text-input/TextInput.accessibility.test.d.ts +1 -0
- package/text-input/TextInput.accessibility.test.js +321 -0
- package/text-input/TextInput.js +224 -328
- package/text-input/TextInput.stories.tsx +133 -160
- package/text-input/TextInput.test.d.ts +1 -0
- package/text-input/TextInput.test.js +1227 -1195
- package/text-input/types.d.ts +25 -17
- package/textarea/Textarea.accessibility.test.d.ts +1 -0
- package/textarea/Textarea.accessibility.test.js +155 -0
- package/textarea/Textarea.js +70 -115
- package/textarea/Textarea.stories.tsx +174 -0
- package/textarea/Textarea.test.d.ts +1 -0
- package/textarea/Textarea.test.js +151 -182
- package/textarea/types.d.ts +9 -5
- package/toggle-group/ToggleGroup.accessibility.test.d.ts +1 -0
- package/toggle-group/ToggleGroup.accessibility.test.js +107 -0
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +92 -108
- package/toggle-group/ToggleGroup.stories.tsx +52 -7
- package/toggle-group/ToggleGroup.test.d.ts +1 -0
- package/toggle-group/ToggleGroup.test.js +68 -87
- package/toggle-group/types.d.ts +28 -19
- package/typography/Typography.accessibility.test.d.ts +1 -0
- package/typography/Typography.accessibility.test.js +339 -0
- package/typography/Typography.d.ts +2 -2
- package/typography/Typography.js +15 -123
- package/typography/Typography.stories.tsx +1 -1
- package/typography/types.d.ts +1 -1
- package/useTheme.d.ts +1141 -1
- package/useTheme.js +2 -9
- package/useTranslatedLabels.d.ts +84 -1
- package/useTranslatedLabels.js +1 -7
- 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.d.ts +1 -0
- package/wizard/Wizard.accessibility.test.js +55 -0
- package/wizard/Wizard.js +29 -75
- package/wizard/Wizard.stories.tsx +39 -0
- package/wizard/Wizard.test.d.ts +1 -0
- package/wizard/Wizard.test.js +53 -80
- package/wizard/types.d.ts +10 -11
- package/card/ice-cream.jpg +0 -0
- package/common/OpenSans.css +0 -81
- 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 -75
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/paginator/Icons.d.ts +0 -5
- package/paginator/Icons.js +0 -54
- package/resultsetTable/Icons.d.ts +0 -7
- package/resultsetTable/ResultsetTable.d.ts +0 -4
- package/select/Icons.d.ts +0 -10
- package/select/Icons.js +0 -93
- package/table/Table.stories.jsx +0 -277
- package/tabs-nav/NavTabs.d.ts +0 -8
- package/tabs-nav/NavTabs.js +0 -125
- package/tabs-nav/NavTabs.stories.tsx +0 -172
- package/tabs-nav/NavTabs.test.js +0 -82
- package/tabs-nav/Tab.js +0 -128
- package/text-input/Icons.d.ts +0 -8
- package/text-input/Icons.js +0 -60
- package/textarea/Textarea.stories.jsx +0 -157
- /package/{resultsetTable → action-icon}/types.js +0 -0
- /package/{tabs-nav → breadcrumbs}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → container/types.js} +0 -0
- /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { userEvent, within } from "@storybook/testing-library";
|
|
3
|
-
import { BackgroundColorProvider } from "../BackgroundColorContext";
|
|
4
3
|
import Title from "../../.storybook/components/Title";
|
|
5
4
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
6
|
-
import DarkContainer from "../../.storybook/components/DarkSection";
|
|
7
5
|
import DxcTextInput from "./TextInput";
|
|
8
|
-
import DxcButton from "../button/Button";
|
|
9
|
-
import DxcCheckbox from "../checkbox/Checkbox";
|
|
10
|
-
import DxcFlex from "../flex/Flex";
|
|
11
6
|
import Suggestions from "./Suggestions";
|
|
12
7
|
import { ThemeProvider } from "styled-components";
|
|
13
8
|
import useTheme from "../useTheme";
|
|
9
|
+
import { HalstackProvider } from "../HalstackContext";
|
|
14
10
|
|
|
15
11
|
export default {
|
|
16
|
-
title: "Text
|
|
12
|
+
title: "Text Input",
|
|
17
13
|
component: DxcTextInput,
|
|
18
14
|
};
|
|
19
15
|
|
|
@@ -25,21 +21,30 @@ const action = {
|
|
|
25
21
|
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" />
|
|
26
22
|
</svg>
|
|
27
23
|
),
|
|
24
|
+
title: "Copy",
|
|
28
25
|
};
|
|
29
26
|
|
|
30
27
|
const actionLargeIconSVG = {
|
|
31
28
|
onClick: () => {},
|
|
32
29
|
icon: (
|
|
33
|
-
<svg
|
|
30
|
+
<svg
|
|
31
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
+
height="48px"
|
|
33
|
+
viewBox="0 0 24 24"
|
|
34
|
+
width="48px"
|
|
35
|
+
fill="currentColor"
|
|
36
|
+
>
|
|
34
37
|
<path d="M0 0h24v24H0V0z" fill="none" />
|
|
35
38
|
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z" />
|
|
36
39
|
</svg>
|
|
37
40
|
),
|
|
41
|
+
title: "Clock",
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
const actionLargeIconURL = {
|
|
41
45
|
onClick: () => {},
|
|
42
|
-
icon: "
|
|
46
|
+
icon: "search",
|
|
47
|
+
title: "Search",
|
|
43
48
|
};
|
|
44
49
|
|
|
45
50
|
const country = ["Afghanistan"];
|
|
@@ -47,9 +52,9 @@ const countries = [
|
|
|
47
52
|
"Afghanistan",
|
|
48
53
|
"Albania",
|
|
49
54
|
"Algeria",
|
|
50
|
-
"Andorra
|
|
55
|
+
"Andorra",
|
|
51
56
|
"Angola",
|
|
52
|
-
"Antigua and Barbuda
|
|
57
|
+
"Antigua and Barbuda",
|
|
53
58
|
"Bahamas",
|
|
54
59
|
"Bahrain",
|
|
55
60
|
"Bangladesh",
|
|
@@ -66,9 +71,15 @@ const countries = [
|
|
|
66
71
|
"Dominica",
|
|
67
72
|
"Denmark",
|
|
68
73
|
"Djibouti",
|
|
69
|
-
"*",
|
|
70
74
|
];
|
|
71
75
|
|
|
76
|
+
const opinionatedTheme = {
|
|
77
|
+
textInput: {
|
|
78
|
+
fontColor: "#000000",
|
|
79
|
+
hoverBorderColor: "#a46ede",
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
72
83
|
export const Chromatic = () => (
|
|
73
84
|
<>
|
|
74
85
|
<ExampleContainer pseudoState="pseudo-hover">
|
|
@@ -178,94 +189,45 @@ export const Chromatic = () => (
|
|
|
178
189
|
action={action}
|
|
179
190
|
/>
|
|
180
191
|
</ExampleContainer>
|
|
181
|
-
<
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
error="Error message."
|
|
221
|
-
defaultValue="Text"
|
|
222
|
-
clearable
|
|
223
|
-
action={action}
|
|
224
|
-
/>
|
|
225
|
-
</ExampleContainer>
|
|
226
|
-
<ExampleContainer pseudoState="pseudo-hover">
|
|
227
|
-
<Title title="Invalid and hovered" theme="dark" level={4} />
|
|
228
|
-
<DxcTextInput
|
|
229
|
-
label="Error text input"
|
|
230
|
-
helperText="Help message"
|
|
231
|
-
placeholder="Placeholder"
|
|
232
|
-
error="Error message."
|
|
233
|
-
/>
|
|
234
|
-
</ExampleContainer>
|
|
235
|
-
<ExampleContainer>
|
|
236
|
-
<Title title="Prefix and suffix" theme="dark" level={4} />
|
|
237
|
-
<DxcTextInput label="With prefix and suffix" prefix="+34" suffix="USD" />
|
|
238
|
-
</ExampleContainer>
|
|
239
|
-
<ExampleContainer>
|
|
240
|
-
<Title title="Disabled and placeholder" theme="dark" level={4} />
|
|
241
|
-
<DxcTextInput label="Disabled text input" disabled placeholder="Placeholder" />
|
|
242
|
-
</ExampleContainer>
|
|
243
|
-
<ExampleContainer>
|
|
244
|
-
<Title title="Disabled, helper text, optional, value and action" theme="dark" level={4} />
|
|
245
|
-
<DxcTextInput
|
|
246
|
-
label="Disabled text input"
|
|
247
|
-
helperText="Help message"
|
|
248
|
-
disabled
|
|
249
|
-
optional
|
|
250
|
-
defaultValue="Text"
|
|
251
|
-
action={action}
|
|
252
|
-
/>
|
|
253
|
-
</ExampleContainer>
|
|
254
|
-
<ExampleContainer>
|
|
255
|
-
<Title title="Disabled with prefix and suffix" theme="dark" level={4} />
|
|
256
|
-
<DxcTextInput
|
|
257
|
-
label="Disabled text input"
|
|
258
|
-
helperText="Help message"
|
|
259
|
-
disabled
|
|
260
|
-
optional
|
|
261
|
-
prefix="+34"
|
|
262
|
-
suffix="USD"
|
|
263
|
-
defaultValue="Text"
|
|
264
|
-
action={action}
|
|
265
|
-
/>
|
|
266
|
-
</ExampleContainer>
|
|
267
|
-
</DarkContainer>
|
|
268
|
-
</BackgroundColorProvider>
|
|
192
|
+
<ExampleContainer>
|
|
193
|
+
<Title title="Read only" theme="light" level={4} />
|
|
194
|
+
<DxcTextInput
|
|
195
|
+
label="Example label"
|
|
196
|
+
helperText="Help message"
|
|
197
|
+
clearable
|
|
198
|
+
readOnly
|
|
199
|
+
optional
|
|
200
|
+
prefix="+34"
|
|
201
|
+
defaultValue="Text"
|
|
202
|
+
action={action}
|
|
203
|
+
/>
|
|
204
|
+
</ExampleContainer>
|
|
205
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
206
|
+
<Title title="Hovered read only" theme="light" level={4} />
|
|
207
|
+
<DxcTextInput
|
|
208
|
+
label="Example label"
|
|
209
|
+
helperText="Help message"
|
|
210
|
+
clearable
|
|
211
|
+
readOnly
|
|
212
|
+
optional
|
|
213
|
+
prefix="+34"
|
|
214
|
+
defaultValue="Text"
|
|
215
|
+
action={action}
|
|
216
|
+
/>
|
|
217
|
+
</ExampleContainer>
|
|
218
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
219
|
+
<Title title="Active read only" theme="light" level={4} />
|
|
220
|
+
<DxcTextInput
|
|
221
|
+
label="Example label"
|
|
222
|
+
helperText="Help message"
|
|
223
|
+
clearable
|
|
224
|
+
readOnly
|
|
225
|
+
optional
|
|
226
|
+
prefix="+34"
|
|
227
|
+
defaultValue="Text"
|
|
228
|
+
action={action}
|
|
229
|
+
/>
|
|
230
|
+
</ExampleContainer>
|
|
269
231
|
<Title title="Margins" theme="light" level={2} />
|
|
270
232
|
<ExampleContainer>
|
|
271
233
|
<Title title="Xxsmall margin" theme="light" level={4} />
|
|
@@ -312,6 +274,66 @@ export const Chromatic = () => (
|
|
|
312
274
|
<Title title="FillParent size" theme="light" level={4} />
|
|
313
275
|
<DxcTextInput label="FillParent" size="fillParent" />
|
|
314
276
|
</ExampleContainer>
|
|
277
|
+
<Title title="Opinionated theme" theme="light" level={2} />
|
|
278
|
+
<ExampleContainer>
|
|
279
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
280
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
281
|
+
<Title title="Hovered input" theme="light" level={4} />
|
|
282
|
+
<DxcTextInput label="Text input" helperText="Help message" />
|
|
283
|
+
</ExampleContainer>
|
|
284
|
+
<ExampleContainer pseudoState="pseudo-focus-within">
|
|
285
|
+
<Title title="Focused input" theme="light" level={4} />
|
|
286
|
+
<DxcTextInput label="Text input" helperText="Help message" />
|
|
287
|
+
</ExampleContainer>
|
|
288
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
289
|
+
<Title title="Hovered action" theme="light" level={4} />
|
|
290
|
+
<DxcTextInput label="Text input" helperText="Help message" defaultValue="Text" clearable />
|
|
291
|
+
</ExampleContainer>
|
|
292
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
293
|
+
<Title title="Actived action" theme="light" level={4} />
|
|
294
|
+
<DxcTextInput label="Text input" helperText="Help message" action={action} clearable />
|
|
295
|
+
</ExampleContainer>
|
|
296
|
+
<ExampleContainer pseudoState="pseudo-focus">
|
|
297
|
+
<Title title="Focused action" theme="light" level={4} />
|
|
298
|
+
<DxcTextInput label="Text input" helperText="Help message" action={action} clearable />
|
|
299
|
+
</ExampleContainer>
|
|
300
|
+
<ExampleContainer>
|
|
301
|
+
<Title title="Prefix" theme="light" level={4} />
|
|
302
|
+
<DxcTextInput label="With prefix" prefix="+34" helperText="Help message" />
|
|
303
|
+
</ExampleContainer>
|
|
304
|
+
<ExampleContainer>
|
|
305
|
+
<Title title="Suffix and action" theme="light" level={4} />
|
|
306
|
+
<DxcTextInput label="With suffix" helperText="Help message" suffix="USD" action={action} />
|
|
307
|
+
</ExampleContainer>
|
|
308
|
+
<ExampleContainer>
|
|
309
|
+
<Title title="Invalid" theme="light" level={4} />
|
|
310
|
+
<DxcTextInput
|
|
311
|
+
label="Error text input"
|
|
312
|
+
helperText="Help message"
|
|
313
|
+
error="Error message."
|
|
314
|
+
defaultValue="Text"
|
|
315
|
+
clearable
|
|
316
|
+
optional
|
|
317
|
+
action={action}
|
|
318
|
+
/>
|
|
319
|
+
</ExampleContainer>
|
|
320
|
+
<ExampleContainer>
|
|
321
|
+
<Title title="Disabled and placeholder" theme="light" level={4} />
|
|
322
|
+
<DxcTextInput label="Disabled text input" disabled placeholder="Placeholder" prefix="+34" suffix="USD" />
|
|
323
|
+
</ExampleContainer>
|
|
324
|
+
<ExampleContainer>
|
|
325
|
+
<Title title="Disabled, helper text, optional, value and action" theme="light" level={4} />
|
|
326
|
+
<DxcTextInput
|
|
327
|
+
label="Disabled text input"
|
|
328
|
+
helperText="Help message"
|
|
329
|
+
disabled
|
|
330
|
+
optional
|
|
331
|
+
defaultValue="Text"
|
|
332
|
+
action={action}
|
|
333
|
+
/>
|
|
334
|
+
</ExampleContainer>
|
|
335
|
+
</HalstackProvider>
|
|
336
|
+
</ExampleContainer>
|
|
315
337
|
</>
|
|
316
338
|
);
|
|
317
339
|
|
|
@@ -358,7 +380,7 @@ const AutosuggestListbox = () => {
|
|
|
358
380
|
<ExampleContainer pseudoState="pseudo-hover">
|
|
359
381
|
<Title title="Hovered suggestion" theme="light" level={4} />
|
|
360
382
|
<Suggestions
|
|
361
|
-
id="
|
|
383
|
+
id="x1"
|
|
362
384
|
value=""
|
|
363
385
|
suggestions={country}
|
|
364
386
|
visualFocusIndex={-1}
|
|
@@ -366,13 +388,13 @@ const AutosuggestListbox = () => {
|
|
|
366
388
|
searchHasErrors={false}
|
|
367
389
|
isSearching={false}
|
|
368
390
|
suggestionOnClick={() => {}}
|
|
369
|
-
|
|
391
|
+
styles={{ width: 350 }}
|
|
370
392
|
/>
|
|
371
393
|
</ExampleContainer>
|
|
372
394
|
<ExampleContainer pseudoState="pseudo-active">
|
|
373
395
|
<Title title="Active suggestion" theme="light" level={4} />
|
|
374
396
|
<Suggestions
|
|
375
|
-
id="
|
|
397
|
+
id="x2"
|
|
376
398
|
value=""
|
|
377
399
|
suggestions={country}
|
|
378
400
|
visualFocusIndex={-1}
|
|
@@ -380,13 +402,13 @@ const AutosuggestListbox = () => {
|
|
|
380
402
|
searchHasErrors={false}
|
|
381
403
|
isSearching={false}
|
|
382
404
|
suggestionOnClick={(suggestion) => {}}
|
|
383
|
-
|
|
405
|
+
styles={{ width: 350 }}
|
|
384
406
|
/>
|
|
385
407
|
</ExampleContainer>
|
|
386
408
|
<ExampleContainer>
|
|
387
409
|
<Title title="Focused suggestion" theme="light" level={4} />
|
|
388
410
|
<Suggestions
|
|
389
|
-
id="
|
|
411
|
+
id="x3"
|
|
390
412
|
value=""
|
|
391
413
|
suggestions={country}
|
|
392
414
|
visualFocusIndex={0}
|
|
@@ -394,13 +416,13 @@ const AutosuggestListbox = () => {
|
|
|
394
416
|
searchHasErrors={false}
|
|
395
417
|
isSearching={false}
|
|
396
418
|
suggestionOnClick={(suggestion) => {}}
|
|
397
|
-
|
|
419
|
+
styles={{ width: 350 }}
|
|
398
420
|
/>
|
|
399
421
|
</ExampleContainer>
|
|
400
422
|
<ExampleContainer>
|
|
401
423
|
<Title title="Highlighted suggestion" theme="light" level={4} />
|
|
402
424
|
<Suggestions
|
|
403
|
-
id="
|
|
425
|
+
id="x4"
|
|
404
426
|
value="Afgh"
|
|
405
427
|
suggestions={country}
|
|
406
428
|
visualFocusIndex={-1}
|
|
@@ -408,14 +430,14 @@ const AutosuggestListbox = () => {
|
|
|
408
430
|
searchHasErrors={false}
|
|
409
431
|
isSearching={false}
|
|
410
432
|
suggestionOnClick={(suggestion) => {}}
|
|
411
|
-
|
|
433
|
+
styles={{ width: 350 }}
|
|
412
434
|
/>
|
|
413
435
|
</ExampleContainer>
|
|
414
436
|
</ExampleContainer>
|
|
415
437
|
<ExampleContainer>
|
|
416
438
|
<Title title="Autosuggest Error" theme="light" level={3} />
|
|
417
439
|
<Suggestions
|
|
418
|
-
id="
|
|
440
|
+
id="x5"
|
|
419
441
|
value=""
|
|
420
442
|
suggestions={country}
|
|
421
443
|
visualFocusIndex={-1}
|
|
@@ -423,13 +445,13 @@ const AutosuggestListbox = () => {
|
|
|
423
445
|
searchHasErrors={true}
|
|
424
446
|
isSearching={false}
|
|
425
447
|
suggestionOnClick={(suggestion) => {}}
|
|
426
|
-
|
|
448
|
+
styles={{ width: 350 }}
|
|
427
449
|
/>
|
|
428
450
|
</ExampleContainer>
|
|
429
451
|
<ExampleContainer>
|
|
430
452
|
<Title title="Autosuggest Searching message" theme="light" level={3} />
|
|
431
453
|
<Suggestions
|
|
432
|
-
id="
|
|
454
|
+
id="x6"
|
|
433
455
|
value=""
|
|
434
456
|
suggestions={country}
|
|
435
457
|
visualFocusIndex={-1}
|
|
@@ -437,65 +459,16 @@ const AutosuggestListbox = () => {
|
|
|
437
459
|
searchHasErrors={false}
|
|
438
460
|
isSearching={true}
|
|
439
461
|
suggestionOnClick={(suggestion) => {}}
|
|
440
|
-
|
|
462
|
+
styles={{ width: 350 }}
|
|
441
463
|
/>
|
|
442
464
|
</ExampleContainer>
|
|
443
465
|
</ThemeProvider>
|
|
444
466
|
);
|
|
445
467
|
};
|
|
446
468
|
|
|
447
|
-
const DarkAutosuggestListbox = () => {
|
|
448
|
-
const colorsTheme: any = useTheme();
|
|
449
|
-
|
|
450
|
-
return (
|
|
451
|
-
<ThemeProvider theme={colorsTheme.textInput}>
|
|
452
|
-
<BackgroundColorProvider color="#333333">
|
|
453
|
-
<DarkContainer>
|
|
454
|
-
<Title title="Dark theme" theme="dark" level={2} />
|
|
455
|
-
<ExampleContainer>
|
|
456
|
-
<Title title="Default with opened suggestions" theme="dark" level={3} />
|
|
457
|
-
<DxcFlex direction="column" gap="80px">
|
|
458
|
-
<DxcTextInput label="Label" suggestions={countries} optional placeholder="Choose an option" />
|
|
459
|
-
<DxcCheckbox
|
|
460
|
-
label="You understand the selection and give your consent"
|
|
461
|
-
onChange={() => {}}
|
|
462
|
-
labelPosition="after"
|
|
463
|
-
/>
|
|
464
|
-
<DxcButton label="Submit" onClick={() => {}} size="medium" margin={{ bottom: "xxlarge" }} />
|
|
465
|
-
</DxcFlex>
|
|
466
|
-
</ExampleContainer>
|
|
467
|
-
<ExampleContainer>
|
|
468
|
-
<Title title="Autosuggest Error" theme="dark" level={3} />
|
|
469
|
-
<div style={{ height: "100px" }}>
|
|
470
|
-
<Suggestions
|
|
471
|
-
id="x"
|
|
472
|
-
value=""
|
|
473
|
-
suggestions={country}
|
|
474
|
-
visualFocusIndex={-1}
|
|
475
|
-
highlightedSuggestions={false}
|
|
476
|
-
searchHasErrors={true}
|
|
477
|
-
isSearching={false}
|
|
478
|
-
suggestionOnClick={(suggestion) => {}}
|
|
479
|
-
getTextInputWidth={() => 350}
|
|
480
|
-
/>
|
|
481
|
-
</div>
|
|
482
|
-
</ExampleContainer>
|
|
483
|
-
</DarkContainer>
|
|
484
|
-
</BackgroundColorProvider>
|
|
485
|
-
</ThemeProvider>
|
|
486
|
-
);
|
|
487
|
-
};
|
|
488
|
-
|
|
489
469
|
export const AutosuggestListboxStates = AutosuggestListbox.bind({});
|
|
490
470
|
AutosuggestListboxStates.play = async ({ canvasElement }) => {
|
|
491
471
|
const canvas = within(canvasElement);
|
|
492
472
|
const select = canvas.getByRole("combobox");
|
|
493
473
|
await userEvent.click(select);
|
|
494
474
|
};
|
|
495
|
-
|
|
496
|
-
export const AutosuggestListboxOnDark = DarkAutosuggestListbox.bind({});
|
|
497
|
-
AutosuggestListboxOnDark.play = async ({ canvasElement }) => {
|
|
498
|
-
const canvas = within(canvasElement);
|
|
499
|
-
const select = canvas.getByRole("combobox");
|
|
500
|
-
await userEvent.click(select);
|
|
501
|
-
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|