@dxc-technology/halstack-react 12.1.0 → 13.0.0
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/README.md +1 -1
- package/dist/index.d.mts +6439 -0
- package/dist/index.d.ts +6439 -0
- package/dist/index.js +12617 -0
- package/dist/index.mjs +12529 -0
- package/package.json +59 -63
- package/BackgroundColorContext.d.ts +0 -1
- package/BackgroundColorContext.js +0 -30
- package/HalstackContext.d.ts +0 -1246
- package/HalstackContext.js +0 -310
- package/accordion/Accordion.accessibility.test.d.ts +0 -1
- package/accordion/Accordion.accessibility.test.js +0 -71
- package/accordion/Accordion.d.ts +0 -4
- package/accordion/Accordion.js +0 -168
- package/accordion/Accordion.stories.tsx +0 -241
- package/accordion/Accordion.test.d.ts +0 -1
- package/accordion/Accordion.test.js +0 -56
- package/accordion/types.d.ts +0 -57
- package/accordion/types.js +0 -5
- package/accordion-group/AccordionGroup.accessibility.test.d.ts +0 -1
- package/accordion-group/AccordionGroup.accessibility.test.js +0 -82
- package/accordion-group/AccordionGroup.d.ts +0 -7
- package/accordion-group/AccordionGroup.js +0 -101
- package/accordion-group/AccordionGroup.stories.tsx +0 -252
- package/accordion-group/AccordionGroup.test.d.ts +0 -1
- package/accordion-group/AccordionGroup.test.js +0 -94
- package/accordion-group/AccordionGroupAccordion.d.ts +0 -4
- package/accordion-group/AccordionGroupAccordion.js +0 -31
- package/accordion-group/AccordionGroupContext.d.ts +0 -3
- package/accordion-group/AccordionGroupContext.js +0 -8
- package/accordion-group/types.d.ts +0 -67
- package/accordion-group/types.js +0 -5
- package/action-icon/ActionIcon.accessibility.test.d.ts +0 -1
- package/action-icon/ActionIcon.accessibility.test.js +0 -63
- package/action-icon/ActionIcon.d.ts +0 -4
- package/action-icon/ActionIcon.js +0 -48
- package/action-icon/ActionIcon.stories.tsx +0 -41
- package/action-icon/ActionIcon.test.d.ts +0 -1
- package/action-icon/ActionIcon.test.js +0 -64
- package/action-icon/types.d.ts +0 -26
- package/action-icon/types.js +0 -5
- package/alert/Alert.accessibility.test.d.ts +0 -1
- package/alert/Alert.accessibility.test.js +0 -95
- package/alert/Alert.d.ts +0 -4
- package/alert/Alert.js +0 -203
- package/alert/Alert.stories.tsx +0 -198
- package/alert/Alert.test.d.ts +0 -1
- package/alert/Alert.test.js +0 -75
- package/alert/types.d.ts +0 -49
- package/alert/types.js +0 -5
- package/badge/Badge.accessibility.test.d.ts +0 -1
- package/badge/Badge.accessibility.test.js +0 -129
- package/badge/Badge.d.ts +0 -4
- package/badge/Badge.js +0 -161
- package/badge/Badge.stories.tsx +0 -210
- package/badge/Badge.test.d.ts +0 -1
- package/badge/Badge.test.js +0 -30
- package/badge/types.d.ts +0 -54
- package/badge/types.js +0 -5
- package/bleed/Bleed.d.ts +0 -3
- package/bleed/Bleed.js +0 -43
- package/bleed/Bleed.stories.tsx +0 -342
- package/bleed/types.d.ts +0 -37
- package/bleed/types.js +0 -5
- package/box/Box.accessibility.test.d.ts +0 -1
- package/box/Box.accessibility.test.js +0 -33
- package/box/Box.d.ts +0 -4
- package/box/Box.js +0 -75
- package/box/Box.stories.tsx +0 -119
- package/box/Box.test.d.ts +0 -1
- package/box/Box.test.js +0 -13
- package/box/types.d.ts +0 -32
- package/box/types.js +0 -5
- package/breadcrumbs/Breadcrumbs.accessibility.test.d.ts +0 -1
- package/breadcrumbs/Breadcrumbs.accessibility.test.js +0 -96
- package/breadcrumbs/Breadcrumbs.d.ts +0 -4
- package/breadcrumbs/Breadcrumbs.js +0 -79
- package/breadcrumbs/Breadcrumbs.stories.tsx +0 -194
- package/breadcrumbs/Breadcrumbs.test.d.ts +0 -1
- package/breadcrumbs/Breadcrumbs.test.js +0 -168
- package/breadcrumbs/Item.d.ts +0 -4
- package/breadcrumbs/Item.js +0 -52
- package/breadcrumbs/dropdownTheme.d.ts +0 -53
- package/breadcrumbs/dropdownTheme.js +0 -62
- package/breadcrumbs/types.d.ts +0 -16
- package/breadcrumbs/types.js +0 -5
- package/bulleted-list/BulletedList.accessibility.test.d.ts +0 -1
- package/bulleted-list/BulletedList.accessibility.test.js +0 -119
- package/bulleted-list/BulletedList.d.ts +0 -7
- package/bulleted-list/BulletedList.js +0 -92
- package/bulleted-list/BulletedList.stories.tsx +0 -115
- package/bulleted-list/types.d.ts +0 -38
- package/bulleted-list/types.js +0 -5
- package/button/Button.accessibility.test.d.ts +0 -1
- package/button/Button.accessibility.test.js +0 -127
- package/button/Button.d.ts +0 -4
- package/button/Button.js +0 -121
- package/button/Button.stories.tsx +0 -325
- package/button/Button.test.d.ts +0 -1
- package/button/Button.test.js +0 -38
- package/button/types.d.ts +0 -57
- package/button/types.js +0 -5
- package/card/Card.accessibility.test.d.ts +0 -1
- package/card/Card.accessibility.test.js +0 -36
- package/card/Card.d.ts +0 -4
- package/card/Card.js +0 -121
- package/card/Card.stories.tsx +0 -171
- package/card/Card.test.d.ts +0 -1
- package/card/Card.test.js +0 -39
- package/card/types.d.ts +0 -62
- package/card/types.js +0 -5
- package/checkbox/Checkbox.accessibility.test.d.ts +0 -1
- package/checkbox/Checkbox.accessibility.test.js +0 -87
- package/checkbox/Checkbox.d.ts +0 -4
- package/checkbox/Checkbox.js +0 -212
- package/checkbox/Checkbox.stories.tsx +0 -222
- package/checkbox/Checkbox.test.d.ts +0 -1
- package/checkbox/Checkbox.test.js +0 -199
- package/checkbox/types.d.ts +0 -72
- package/checkbox/types.js +0 -5
- package/chip/Chip.accessibility.test.d.ts +0 -1
- package/chip/Chip.accessibility.test.js +0 -67
- package/chip/Chip.d.ts +0 -4
- package/chip/Chip.js +0 -126
- package/chip/Chip.stories.tsx +0 -195
- package/chip/Chip.test.d.ts +0 -1
- package/chip/Chip.test.js +0 -41
- package/chip/types.d.ts +0 -45
- package/chip/types.js +0 -5
- package/common/coreTokens.d.ts +0 -237
- package/common/coreTokens.js +0 -184
- package/common/utils.d.ts +0 -1
- package/common/utils.js +0 -16
- package/common/variables.d.ts +0 -1392
- package/common/variables.js +0 -1264
- package/container/Container.d.ts +0 -4
- package/container/Container.js +0 -194
- package/container/Container.stories.tsx +0 -214
- package/container/types.d.ts +0 -74
- package/container/types.js +0 -5
- package/contextual-menu/ContextualMenu.accessibility.test.d.ts +0 -1
- package/contextual-menu/ContextualMenu.accessibility.test.js +0 -98
- package/contextual-menu/ContextualMenu.d.ts +0 -5
- package/contextual-menu/ContextualMenu.js +0 -108
- package/contextual-menu/ContextualMenu.stories.tsx +0 -223
- package/contextual-menu/ContextualMenu.test.d.ts +0 -1
- package/contextual-menu/ContextualMenu.test.js +0 -247
- package/contextual-menu/GroupItem.d.ts +0 -4
- package/contextual-menu/GroupItem.js +0 -67
- package/contextual-menu/ItemAction.d.ts +0 -4
- package/contextual-menu/ItemAction.js +0 -50
- package/contextual-menu/MenuItem.d.ts +0 -4
- package/contextual-menu/MenuItem.js +0 -29
- package/contextual-menu/SingleItem.d.ts +0 -4
- package/contextual-menu/SingleItem.js +0 -38
- package/contextual-menu/types.d.ts +0 -61
- package/contextual-menu/types.js +0 -5
- package/date-input/Calendar.d.ts +0 -4
- package/date-input/Calendar.js +0 -230
- package/date-input/DateInput.accessibility.test.d.ts +0 -1
- package/date-input/DateInput.accessibility.test.js +0 -229
- package/date-input/DateInput.d.ts +0 -4
- package/date-input/DateInput.js +0 -228
- package/date-input/DateInput.stories.tsx +0 -291
- package/date-input/DateInput.test.d.ts +0 -1
- package/date-input/DateInput.test.js +0 -808
- package/date-input/DatePicker.d.ts +0 -4
- package/date-input/DatePicker.js +0 -121
- package/date-input/YearPicker.d.ts +0 -4
- package/date-input/YearPicker.js +0 -105
- package/date-input/types.d.ts +0 -164
- package/date-input/types.js +0 -5
- package/dialog/Dialog.accessibility.test.d.ts +0 -1
- package/dialog/Dialog.accessibility.test.js +0 -69
- package/dialog/Dialog.d.ts +0 -4
- package/dialog/Dialog.js +0 -93
- package/dialog/Dialog.stories.tsx +0 -369
- package/dialog/Dialog.test.d.ts +0 -1
- package/dialog/Dialog.test.js +0 -370
- package/dialog/types.d.ts +0 -36
- package/dialog/types.js +0 -5
- package/divider/Divider.accessibility.test.d.ts +0 -1
- package/divider/Divider.accessibility.test.js +0 -33
- package/divider/Divider.d.ts +0 -4
- package/divider/Divider.js +0 -36
- package/divider/Divider.stories.tsx +0 -223
- package/divider/Divider.test.d.ts +0 -1
- package/divider/Divider.test.js +0 -38
- package/divider/types.d.ts +0 -21
- package/divider/types.js +0 -5
- package/dropdown/Dropdown.accessibility.test.d.ts +0 -1
- package/dropdown/Dropdown.accessibility.test.js +0 -183
- package/dropdown/Dropdown.d.ts +0 -4
- package/dropdown/Dropdown.js +0 -320
- package/dropdown/Dropdown.stories.tsx +0 -427
- package/dropdown/Dropdown.test.d.ts +0 -1
- package/dropdown/Dropdown.test.js +0 -628
- package/dropdown/DropdownMenu.d.ts +0 -4
- package/dropdown/DropdownMenu.js +0 -63
- package/dropdown/DropdownMenuItem.d.ts +0 -4
- package/dropdown/DropdownMenuItem.js +0 -71
- package/dropdown/types.d.ts +0 -96
- package/dropdown/types.js +0 -5
- package/file-input/FileInput.accessibility.test.d.ts +0 -1
- package/file-input/FileInput.accessibility.test.js +0 -167
- package/file-input/FileInput.d.ts +0 -4
- package/file-input/FileInput.js +0 -438
- package/file-input/FileInput.stories.tsx +0 -618
- package/file-input/FileInput.test.d.ts +0 -1
- package/file-input/FileInput.test.js +0 -404
- package/file-input/FileItem.d.ts +0 -4
- package/file-input/FileItem.js +0 -125
- package/file-input/types.d.ts +0 -125
- package/file-input/types.js +0 -5
- package/flex/Flex.d.ts +0 -4
- package/flex/Flex.js +0 -57
- package/flex/Flex.stories.tsx +0 -112
- package/flex/types.d.ts +0 -97
- package/flex/types.js +0 -5
- package/footer/Footer.accessibility.test.d.ts +0 -1
- package/footer/Footer.accessibility.test.js +0 -125
- package/footer/Footer.d.ts +0 -4
- package/footer/Footer.js +0 -140
- package/footer/Footer.stories.tsx +0 -208
- package/footer/Footer.test.d.ts +0 -1
- package/footer/Footer.test.js +0 -85
- package/footer/Icons.d.ts +0 -3
- package/footer/Icons.js +0 -108
- package/footer/types.d.ts +0 -64
- package/footer/types.js +0 -5
- package/grid/Grid.d.ts +0 -7
- package/grid/Grid.js +0 -76
- package/grid/Grid.stories.tsx +0 -221
- package/grid/types.d.ts +0 -115
- package/grid/types.js +0 -5
- package/header/Header.accessibility.test.d.ts +0 -1
- package/header/Header.accessibility.test.js +0 -94
- package/header/Header.d.ts +0 -8
- package/header/Header.js +0 -210
- package/header/Header.stories.tsx +0 -267
- package/header/Header.test.d.ts +0 -1
- package/header/Header.test.js +0 -66
- package/header/Icons.d.ts +0 -2
- package/header/Icons.js +0 -24
- package/header/types.d.ts +0 -33
- package/header/types.js +0 -5
- package/heading/Heading.accessibility.test.d.ts +0 -1
- package/heading/Heading.accessibility.test.js +0 -33
- package/heading/Heading.d.ts +0 -4
- package/heading/Heading.js +0 -137
- package/heading/Heading.stories.tsx +0 -54
- package/heading/Heading.test.d.ts +0 -1
- package/heading/Heading.test.js +0 -156
- package/heading/types.d.ts +0 -33
- package/heading/types.js +0 -5
- package/icon/Icon.accessibility.test.d.ts +0 -1
- package/icon/Icon.accessibility.test.js +0 -30
- package/icon/Icon.d.ts +0 -4
- package/icon/Icon.js +0 -33
- package/icon/Icon.stories.tsx +0 -28
- package/icon/types.d.ts +0 -4
- package/icon/types.js +0 -5
- package/image/Image.accessibility.test.d.ts +0 -1
- package/image/Image.accessibility.test.js +0 -56
- package/image/Image.d.ts +0 -4
- package/image/Image.js +0 -70
- package/image/Image.stories.tsx +0 -129
- package/image/types.d.ts +0 -72
- package/image/types.js +0 -5
- package/inset/Inset.d.ts +0 -3
- package/inset/Inset.js +0 -43
- package/inset/Inset.stories.tsx +0 -230
- package/inset/types.d.ts +0 -37
- package/inset/types.js +0 -5
- package/layout/ApplicationLayout.d.ts +0 -20
- package/layout/ApplicationLayout.js +0 -137
- package/layout/ApplicationLayout.stories.tsx +0 -162
- package/layout/Icons.d.ts +0 -7
- package/layout/Icons.js +0 -48
- package/layout/types.d.ts +0 -41
- package/layout/types.js +0 -5
- package/link/Link.accessibility.test.d.ts +0 -1
- package/link/Link.accessibility.test.js +0 -108
- package/link/Link.d.ts +0 -4
- package/link/Link.js +0 -117
- package/link/Link.stories.tsx +0 -253
- package/link/Link.test.d.ts +0 -1
- package/link/Link.test.js +0 -63
- package/link/types.d.ts +0 -54
- package/link/types.js +0 -5
- package/main.d.ts +0 -50
- package/main.js +0 -364
- package/nav-tabs/NavTabs.accessibility.test.d.ts +0 -1
- package/nav-tabs/NavTabs.accessibility.test.js +0 -44
- package/nav-tabs/NavTabs.d.ts +0 -7
- package/nav-tabs/NavTabs.js +0 -108
- package/nav-tabs/NavTabs.stories.tsx +0 -294
- package/nav-tabs/NavTabs.test.d.ts +0 -1
- package/nav-tabs/NavTabs.test.js +0 -77
- package/nav-tabs/NavTabsContext.d.ts +0 -3
- package/nav-tabs/NavTabsContext.js +0 -8
- package/nav-tabs/Tab.d.ts +0 -4
- package/nav-tabs/Tab.js +0 -117
- package/nav-tabs/types.d.ts +0 -52
- package/nav-tabs/types.js +0 -5
- package/number-input/NumberInput.accessibility.test.d.ts +0 -1
- package/number-input/NumberInput.accessibility.test.js +0 -227
- package/number-input/NumberInput.d.ts +0 -4
- package/number-input/NumberInput.js +0 -86
- package/number-input/NumberInput.stories.tsx +0 -117
- package/number-input/NumberInput.test.d.ts +0 -1
- package/number-input/NumberInput.test.js +0 -988
- package/number-input/NumberInputContext.d.ts +0 -3
- package/number-input/NumberInputContext.js +0 -8
- package/number-input/types.d.ts +0 -136
- package/number-input/types.js +0 -5
- package/paginator/Paginator.accessibility.test.d.ts +0 -1
- package/paginator/Paginator.accessibility.test.js +0 -78
- package/paginator/Paginator.d.ts +0 -4
- package/paginator/Paginator.js +0 -138
- package/paginator/Paginator.stories.tsx +0 -87
- package/paginator/Paginator.test.d.ts +0 -1
- package/paginator/Paginator.test.js +0 -334
- package/paginator/types.d.ts +0 -38
- package/paginator/types.js +0 -5
- package/paragraph/Paragraph.accessibility.test.d.ts +0 -1
- package/paragraph/Paragraph.accessibility.test.js +0 -28
- package/paragraph/Paragraph.d.ts +0 -5
- package/paragraph/Paragraph.js +0 -22
- package/paragraph/Paragraph.stories.tsx +0 -27
- package/password-input/PasswordInput.accessibility.test.d.ts +0 -1
- package/password-input/PasswordInput.accessibility.test.js +0 -152
- package/password-input/PasswordInput.d.ts +0 -4
- package/password-input/PasswordInput.js +0 -97
- package/password-input/PasswordInput.stories.tsx +0 -99
- package/password-input/PasswordInput.test.d.ts +0 -1
- package/password-input/PasswordInput.test.js +0 -197
- package/password-input/types.d.ts +0 -111
- package/password-input/types.js +0 -5
- package/progress-bar/ProgressBar.accessibility.test.d.ts +0 -1
- package/progress-bar/ProgressBar.accessibility.test.js +0 -35
- package/progress-bar/ProgressBar.d.ts +0 -4
- package/progress-bar/ProgressBar.js +0 -146
- package/progress-bar/ProgressBar.stories.tsx +0 -93
- package/progress-bar/ProgressBar.test.d.ts +0 -1
- package/progress-bar/ProgressBar.test.js +0 -93
- package/progress-bar/types.d.ts +0 -37
- package/progress-bar/types.js +0 -5
- package/quick-nav/QuickNav.accessibility.test.d.ts +0 -1
- package/quick-nav/QuickNav.accessibility.test.js +0 -57
- package/quick-nav/QuickNav.d.ts +0 -4
- package/quick-nav/QuickNav.js +0 -94
- package/quick-nav/QuickNav.stories.tsx +0 -356
- package/quick-nav/types.d.ts +0 -21
- package/quick-nav/types.js +0 -5
- package/radio-group/Radio.d.ts +0 -4
- package/radio-group/Radio.js +0 -121
- package/radio-group/RadioGroup.accessibility.test.d.ts +0 -1
- package/radio-group/RadioGroup.accessibility.test.js +0 -97
- package/radio-group/RadioGroup.d.ts +0 -4
- package/radio-group/RadioGroup.js +0 -233
- package/radio-group/RadioGroup.stories.tsx +0 -214
- package/radio-group/RadioGroup.test.d.ts +0 -1
- package/radio-group/RadioGroup.test.js +0 -754
- package/radio-group/types.d.ts +0 -114
- package/radio-group/types.js +0 -5
- package/resultset-table/Icons.d.ts +0 -7
- package/resultset-table/Icons.js +0 -47
- package/resultset-table/ResultsetTable.accessibility.test.d.ts +0 -1
- package/resultset-table/ResultsetTable.accessibility.test.js +0 -284
- package/resultset-table/ResultsetTable.d.ts +0 -7
- package/resultset-table/ResultsetTable.js +0 -171
- package/resultset-table/ResultsetTable.stories.tsx +0 -413
- package/resultset-table/ResultsetTable.test.d.ts +0 -1
- package/resultset-table/ResultsetTable.test.js +0 -379
- package/resultset-table/types.d.ts +0 -100
- package/resultset-table/types.js +0 -5
- package/select/Listbox.d.ts +0 -4
- package/select/Listbox.js +0 -151
- package/select/Option.d.ts +0 -4
- package/select/Option.js +0 -89
- package/select/Select.accessibility.test.d.ts +0 -1
- package/select/Select.accessibility.test.js +0 -227
- package/select/Select.d.ts +0 -4
- package/select/Select.js +0 -600
- package/select/Select.stories.tsx +0 -919
- package/select/Select.test.d.ts +0 -1
- package/select/Select.test.js +0 -2267
- package/select/types.d.ts +0 -209
- package/select/types.js +0 -5
- package/sidenav/Sidenav.accessibility.test.d.ts +0 -1
- package/sidenav/Sidenav.accessibility.test.js +0 -59
- package/sidenav/Sidenav.d.ts +0 -10
- package/sidenav/Sidenav.js +0 -201
- package/sidenav/Sidenav.stories.tsx +0 -277
- package/sidenav/Sidenav.test.d.ts +0 -1
- package/sidenav/Sidenav.test.js +0 -37
- package/sidenav/SidenavContext.d.ts +0 -5
- package/sidenav/SidenavContext.js +0 -13
- package/sidenav/types.d.ts +0 -76
- package/sidenav/types.js +0 -5
- package/slider/Slider.accessibility.test.d.ts +0 -1
- package/slider/Slider.accessibility.test.js +0 -103
- package/slider/Slider.d.ts +0 -4
- package/slider/Slider.js +0 -283
- package/slider/Slider.stories.tsx +0 -180
- package/slider/Slider.test.d.ts +0 -1
- package/slider/Slider.test.js +0 -256
- package/slider/types.d.ts +0 -86
- package/slider/types.js +0 -5
- package/spinner/Spinner.accessibility.test.d.ts +0 -1
- package/spinner/Spinner.accessibility.test.js +0 -96
- package/spinner/Spinner.d.ts +0 -4
- package/spinner/Spinner.js +0 -210
- package/spinner/Spinner.stories.tsx +0 -129
- package/spinner/Spinner.test.d.ts +0 -1
- package/spinner/Spinner.test.js +0 -55
- package/spinner/types.d.ts +0 -32
- package/spinner/types.js +0 -5
- package/status-light/StatusLight.accessibility.test.d.ts +0 -1
- package/status-light/StatusLight.accessibility.test.js +0 -157
- package/status-light/StatusLight.d.ts +0 -4
- package/status-light/StatusLight.js +0 -51
- package/status-light/StatusLight.stories.tsx +0 -74
- package/status-light/StatusLight.test.d.ts +0 -1
- package/status-light/StatusLight.test.js +0 -25
- package/status-light/types.d.ts +0 -17
- package/status-light/types.js +0 -5
- package/switch/Switch.accessibility.test.d.ts +0 -1
- package/switch/Switch.accessibility.test.js +0 -98
- package/switch/Switch.d.ts +0 -4
- package/switch/Switch.js +0 -211
- package/switch/Switch.stories.tsx +0 -149
- package/switch/Switch.test.d.ts +0 -1
- package/switch/Switch.test.js +0 -180
- package/switch/types.d.ts +0 -66
- package/switch/types.js +0 -5
- package/table/DropdownTheme.js +0 -62
- package/table/Table.accessibility.test.d.ts +0 -1
- package/table/Table.accessibility.test.js +0 -92
- package/table/Table.d.ts +0 -8
- package/table/Table.js +0 -161
- package/table/Table.stories.tsx +0 -663
- package/table/Table.test.d.ts +0 -1
- package/table/Table.test.js +0 -111
- package/table/types.d.ts +0 -49
- package/table/types.js +0 -5
- package/tabs/Tab.d.ts +0 -4
- package/tabs/Tab.js +0 -117
- package/tabs/Tabs.accessibility.test.d.ts +0 -1
- package/tabs/Tabs.accessibility.test.js +0 -56
- package/tabs/Tabs.d.ts +0 -4
- package/tabs/Tabs.js +0 -373
- package/tabs/Tabs.stories.tsx +0 -230
- package/tabs/Tabs.test.d.ts +0 -1
- package/tabs/Tabs.test.js +0 -276
- package/tabs/types.d.ts +0 -92
- package/tabs/types.js +0 -5
- package/tag/Tag.accessibility.test.d.ts +0 -1
- package/tag/Tag.accessibility.test.js +0 -69
- package/tag/Tag.d.ts +0 -4
- package/tag/Tag.js +0 -151
- package/tag/Tag.stories.tsx +0 -152
- package/tag/Tag.test.d.ts +0 -1
- package/tag/Tag.test.js +0 -41
- package/tag/types.d.ts +0 -69
- package/tag/types.js +0 -5
- package/text-input/Suggestion.d.ts +0 -4
- package/text-input/Suggestion.js +0 -67
- package/text-input/Suggestions.d.ts +0 -4
- package/text-input/Suggestions.js +0 -94
- package/text-input/TextInput.accessibility.test.d.ts +0 -1
- package/text-input/TextInput.accessibility.test.js +0 -320
- package/text-input/TextInput.d.ts +0 -4
- package/text-input/TextInput.js +0 -569
- package/text-input/TextInput.stories.tsx +0 -468
- package/text-input/TextInput.test.d.ts +0 -1
- package/text-input/TextInput.test.js +0 -1755
- package/text-input/types.d.ts +0 -205
- package/text-input/types.js +0 -5
- package/textarea/Textarea.accessibility.test.d.ts +0 -1
- package/textarea/Textarea.accessibility.test.js +0 -155
- package/textarea/Textarea.d.ts +0 -4
- package/textarea/Textarea.js +0 -235
- package/textarea/Textarea.stories.tsx +0 -174
- package/textarea/Textarea.test.d.ts +0 -1
- package/textarea/Textarea.test.js +0 -406
- package/textarea/types.d.ts +0 -141
- package/textarea/types.js +0 -5
- package/toggle-group/ToggleGroup.accessibility.test.d.ts +0 -1
- package/toggle-group/ToggleGroup.accessibility.test.js +0 -107
- package/toggle-group/ToggleGroup.d.ts +0 -4
- package/toggle-group/ToggleGroup.js +0 -199
- package/toggle-group/ToggleGroup.stories.tsx +0 -218
- package/toggle-group/ToggleGroup.test.d.ts +0 -1
- package/toggle-group/ToggleGroup.test.js +0 -137
- package/toggle-group/types.d.ts +0 -114
- package/toggle-group/types.js +0 -5
- package/typography/Typography.accessibility.test.d.ts +0 -1
- package/typography/Typography.accessibility.test.js +0 -339
- package/typography/Typography.d.ts +0 -4
- package/typography/Typography.js +0 -23
- package/typography/Typography.stories.tsx +0 -196
- package/typography/types.d.ts +0 -18
- package/typography/types.js +0 -5
- package/useTheme.d.ts +0 -1145
- package/useTheme.js +0 -15
- package/useTranslatedLabels.d.ts +0 -85
- package/useTranslatedLabels.js +0 -14
- package/utils/BaseTypography.d.ts +0 -21
- package/utils/BaseTypography.js +0 -94
- package/utils/FocusLock.d.ts +0 -13
- package/utils/FocusLock.js +0 -125
- package/wizard/Wizard.accessibility.test.d.ts +0 -1
- package/wizard/Wizard.accessibility.test.js +0 -55
- package/wizard/Wizard.d.ts +0 -4
- package/wizard/Wizard.js +0 -239
- package/wizard/Wizard.stories.tsx +0 -272
- package/wizard/Wizard.test.d.ts +0 -1
- package/wizard/Wizard.test.js +0 -114
- package/wizard/types.d.ts +0 -64
- package/wizard/types.js +0 -5
package/card/Card.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
14
|
-
var _variables = require("../common/variables");
|
|
15
|
-
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
16
|
-
var _Box = _interopRequireDefault(require("../box/Box"));
|
|
17
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
18
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
20
|
-
var DxcCard = function DxcCard(_ref) {
|
|
21
|
-
var imageSrc = _ref.imageSrc,
|
|
22
|
-
_ref$imageBgColor = _ref.imageBgColor,
|
|
23
|
-
imageBgColor = _ref$imageBgColor === void 0 ? "black" : _ref$imageBgColor,
|
|
24
|
-
imagePadding = _ref.imagePadding,
|
|
25
|
-
_ref$imagePosition = _ref.imagePosition,
|
|
26
|
-
imagePosition = _ref$imagePosition === void 0 ? "before" : _ref$imagePosition,
|
|
27
|
-
linkHref = _ref.linkHref,
|
|
28
|
-
onClick = _ref.onClick,
|
|
29
|
-
_ref$imageCover = _ref.imageCover,
|
|
30
|
-
imageCover = _ref$imageCover === void 0 ? false : _ref$imageCover,
|
|
31
|
-
margin = _ref.margin,
|
|
32
|
-
_ref$tabIndex = _ref.tabIndex,
|
|
33
|
-
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
|
34
|
-
_ref$outlined = _ref.outlined,
|
|
35
|
-
outlined = _ref$outlined === void 0 ? true : _ref$outlined,
|
|
36
|
-
children = _ref.children;
|
|
37
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
38
|
-
var _useState = (0, _react.useState)(false),
|
|
39
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
40
|
-
isHovered = _useState2[0],
|
|
41
|
-
changeIsHovered = _useState2[1];
|
|
42
|
-
return /*#__PURE__*/_react["default"].createElement(Card, {
|
|
43
|
-
hasAction: onClick || linkHref ? true : false,
|
|
44
|
-
margin: margin,
|
|
45
|
-
onMouseEnter: function onMouseEnter() {
|
|
46
|
-
return changeIsHovered(true);
|
|
47
|
-
},
|
|
48
|
-
onMouseLeave: function onMouseLeave() {
|
|
49
|
-
return changeIsHovered(false);
|
|
50
|
-
},
|
|
51
|
-
onClick: onClick,
|
|
52
|
-
tabIndex: onClick || linkHref ? tabIndex : -1,
|
|
53
|
-
as: linkHref && "a",
|
|
54
|
-
href: linkHref
|
|
55
|
-
}, /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
56
|
-
shadowDepth: !outlined ? 0 : isHovered && (onClick || linkHref) ? 2 : 1
|
|
57
|
-
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
58
|
-
theme: colorsTheme.card
|
|
59
|
-
}, /*#__PURE__*/_react["default"].createElement(CardContainer, {
|
|
60
|
-
hasAction: onClick || linkHref ? true : false,
|
|
61
|
-
imagePosition: imageSrc ? imagePosition : "none"
|
|
62
|
-
}, imageSrc && /*#__PURE__*/_react["default"].createElement(ImageContainer, {
|
|
63
|
-
imageBgColor: imageBgColor
|
|
64
|
-
}, /*#__PURE__*/_react["default"].createElement(TagImage, {
|
|
65
|
-
imagePadding: imagePadding,
|
|
66
|
-
imageCover: imageCover,
|
|
67
|
-
src: imageSrc,
|
|
68
|
-
alt: "Card image"
|
|
69
|
-
})), /*#__PURE__*/_react["default"].createElement(CardContent, null, children)))));
|
|
70
|
-
};
|
|
71
|
-
var Card = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n cursor: ", ";\n outline: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n text-decoration: none;\n ", "\n"])), function (_ref2) {
|
|
72
|
-
var hasAction = _ref2.hasAction;
|
|
73
|
-
return hasAction && "pointer" || "unset";
|
|
74
|
-
}, function (_ref3) {
|
|
75
|
-
var hasAction = _ref3.hasAction;
|
|
76
|
-
return !hasAction && "none";
|
|
77
|
-
}, function (_ref4) {
|
|
78
|
-
var margin = _ref4.margin;
|
|
79
|
-
return margin && (0, _typeof2["default"])(margin) !== "object" ? _variables.spaces[margin] : "0px";
|
|
80
|
-
}, function (_ref5) {
|
|
81
|
-
var margin = _ref5.margin;
|
|
82
|
-
return margin && (0, _typeof2["default"])(margin) === "object" && margin.top ? _variables.spaces[margin.top] : "";
|
|
83
|
-
}, function (_ref6) {
|
|
84
|
-
var margin = _ref6.margin;
|
|
85
|
-
return margin && (0, _typeof2["default"])(margin) === "object" && margin.right ? _variables.spaces[margin.right] : "";
|
|
86
|
-
}, function (_ref7) {
|
|
87
|
-
var margin = _ref7.margin;
|
|
88
|
-
return margin && (0, _typeof2["default"])(margin) === "object" && margin.bottom ? _variables.spaces[margin.bottom] : "";
|
|
89
|
-
}, function (_ref8) {
|
|
90
|
-
var margin = _ref8.margin;
|
|
91
|
-
return margin && (0, _typeof2["default"])(margin) === "object" && margin.left ? _variables.spaces[margin.left] : "";
|
|
92
|
-
}, function (_ref9) {
|
|
93
|
-
var hasAction = _ref9.hasAction;
|
|
94
|
-
return hasAction && ":focus {\n outline: #0095ff auto 1px;\n }";
|
|
95
|
-
});
|
|
96
|
-
var CardContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n flex-direction: ", ";\n height: ", ";\n width: ", ";\n &:hover {\n border-color: ", ";\n }\n"])), function (props) {
|
|
97
|
-
return props.imagePosition === "after" ? "row-reverse" : "row";
|
|
98
|
-
}, function (props) {
|
|
99
|
-
return props.theme.height;
|
|
100
|
-
}, function (props) {
|
|
101
|
-
return props.theme.width;
|
|
102
|
-
}, function (_ref10) {
|
|
103
|
-
var hasAction = _ref10.hasAction;
|
|
104
|
-
return hasAction ? "" : "unset";
|
|
105
|
-
});
|
|
106
|
-
var TagImage = _styledComponents["default"].img(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n object-fit: ", ";\n"])), function (_ref11) {
|
|
107
|
-
var imagePadding = _ref11.imagePadding;
|
|
108
|
-
return !imagePadding ? "100%" : (0, _typeof2["default"])(imagePadding) !== "object" && "calc(100% - ".concat(_variables.spaces[imagePadding], " - ").concat(_variables.spaces[imagePadding], ")");
|
|
109
|
-
}, function (_ref12) {
|
|
110
|
-
var imagePadding = _ref12.imagePadding;
|
|
111
|
-
return !imagePadding ? "100%" : (0, _typeof2["default"])(imagePadding) !== "object" && "calc(100% - ".concat(_variables.spaces[imagePadding], " - ").concat(_variables.spaces[imagePadding], ")");
|
|
112
|
-
}, function (_ref13) {
|
|
113
|
-
var imageCover = _ref13.imageCover;
|
|
114
|
-
return imageCover ? "cover" : "contain";
|
|
115
|
-
});
|
|
116
|
-
var ImageContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n width: 35%;\n height: 100%;\n background-color: ", ";\n"])), function (_ref14) {
|
|
117
|
-
var imageBgColor = _ref14.imageBgColor;
|
|
118
|
-
return imageBgColor;
|
|
119
|
-
});
|
|
120
|
-
var CardContent = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n flex-grow: 1;\n overflow: hidden;\n"])));
|
|
121
|
-
var _default = exports["default"] = DxcCard;
|
package/card/Card.stories.tsx
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Title from "../../.storybook/components/Title";
|
|
3
|
-
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
4
|
-
import DxcCard from "./Card";
|
|
5
|
-
import { userEvent, within } from "@storybook/test";
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: "Card",
|
|
9
|
-
component: DxcCard,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const Card = () => (
|
|
13
|
-
<>
|
|
14
|
-
<Title title="Default" theme="light" level={4} />
|
|
15
|
-
<ExampleContainer>
|
|
16
|
-
<DxcCard>Default</DxcCard>
|
|
17
|
-
</ExampleContainer>
|
|
18
|
-
<Title title="Not outlined" theme="light" level={4} />
|
|
19
|
-
<ExampleContainer>
|
|
20
|
-
<DxcCard outlined={false}>Not outlined</DxcCard>
|
|
21
|
-
</ExampleContainer>
|
|
22
|
-
<Title title="Default with link" theme="light" level={4} />
|
|
23
|
-
<ExampleContainer>
|
|
24
|
-
<DxcCard linkHref="https://www.dxc.com">Default with link</DxcCard>
|
|
25
|
-
</ExampleContainer>
|
|
26
|
-
<Title title="Focused default with link" theme="light" level={4} />
|
|
27
|
-
<ExampleContainer>
|
|
28
|
-
<DxcCard linkHref="https://www.dxc.com">Focused default with link</DxcCard>
|
|
29
|
-
</ExampleContainer>
|
|
30
|
-
<Title title="Hovered default with link" theme="light" level={4} />
|
|
31
|
-
<ExampleContainer>
|
|
32
|
-
<DxcCard linkHref="https://www.dxc.com">Hovered default with link</DxcCard>
|
|
33
|
-
</ExampleContainer>
|
|
34
|
-
<Title title="Default with action" theme="light" level={4} />
|
|
35
|
-
<ExampleContainer>
|
|
36
|
-
<DxcCard onClick={() => {}}>Default with action</DxcCard>
|
|
37
|
-
</ExampleContainer>
|
|
38
|
-
<Title title="Default with image" theme="light" level={4} />
|
|
39
|
-
<ExampleContainer>
|
|
40
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300">Default</DxcCard>
|
|
41
|
-
</ExampleContainer>
|
|
42
|
-
<Title title="Default image with background color" theme="light" level={4} />
|
|
43
|
-
<ExampleContainer>
|
|
44
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imageBgColor="yellow">
|
|
45
|
-
Background color
|
|
46
|
-
</DxcCard>
|
|
47
|
-
</ExampleContainer>
|
|
48
|
-
<Title title="Default image with position after" theme="light" level={4} />
|
|
49
|
-
<ExampleContainer>
|
|
50
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imagePosition="after">
|
|
51
|
-
Position after
|
|
52
|
-
</DxcCard>
|
|
53
|
-
</ExampleContainer>
|
|
54
|
-
<Title title="Image cover" theme="light" level={4} />
|
|
55
|
-
<ExampleContainer>
|
|
56
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imageCover>
|
|
57
|
-
Image cover
|
|
58
|
-
</DxcCard>
|
|
59
|
-
</ExampleContainer>
|
|
60
|
-
<Title title="Image cover with position after" theme="light" level={4} />
|
|
61
|
-
<ExampleContainer>
|
|
62
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imageCover imagePosition="after">
|
|
63
|
-
Image cover with position after
|
|
64
|
-
</DxcCard>
|
|
65
|
-
</ExampleContainer>
|
|
66
|
-
<Title title="Image padding" theme="light" level={2} />
|
|
67
|
-
<ExampleContainer>
|
|
68
|
-
<Title title="Xxsmall" theme="light" level={4} />
|
|
69
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imagePadding="xxsmall" imageCover>
|
|
70
|
-
Xxsmall
|
|
71
|
-
</DxcCard>
|
|
72
|
-
</ExampleContainer>
|
|
73
|
-
<ExampleContainer>
|
|
74
|
-
<Title title="Xsmall" theme="light" level={4} />
|
|
75
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imagePadding="xsmall" imageCover>
|
|
76
|
-
Xsmall
|
|
77
|
-
</DxcCard>
|
|
78
|
-
</ExampleContainer>
|
|
79
|
-
<ExampleContainer>
|
|
80
|
-
<Title title="Small" theme="light" level={4} />
|
|
81
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imagePadding="small" imageCover>
|
|
82
|
-
Small
|
|
83
|
-
</DxcCard>
|
|
84
|
-
</ExampleContainer>
|
|
85
|
-
<ExampleContainer>
|
|
86
|
-
<Title title="Medium" theme="light" level={4} />
|
|
87
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imagePadding="medium" imageCover>
|
|
88
|
-
Medium
|
|
89
|
-
</DxcCard>
|
|
90
|
-
</ExampleContainer>
|
|
91
|
-
<ExampleContainer>
|
|
92
|
-
<Title title="Large" theme="light" level={4} />
|
|
93
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imagePadding="large" imageCover>
|
|
94
|
-
Large
|
|
95
|
-
</DxcCard>
|
|
96
|
-
</ExampleContainer>
|
|
97
|
-
<ExampleContainer>
|
|
98
|
-
<Title title="Xlarge" theme="light" level={4} />
|
|
99
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imagePadding="xlarge" imageCover>
|
|
100
|
-
Xlarge
|
|
101
|
-
</DxcCard>
|
|
102
|
-
</ExampleContainer>
|
|
103
|
-
<ExampleContainer>
|
|
104
|
-
<Title title="Xxlarge" theme="light" level={4} />
|
|
105
|
-
<DxcCard imageSrc="https://picsum.photos/id/1022/200/300" imagePadding="xxlarge" imageCover>
|
|
106
|
-
Xxlarge
|
|
107
|
-
</DxcCard>
|
|
108
|
-
</ExampleContainer>
|
|
109
|
-
<Title title="Margin" theme="light" level={2} />
|
|
110
|
-
<ExampleContainer>
|
|
111
|
-
<Title title="Xxsmall" theme="light" level={4} />
|
|
112
|
-
<DxcCard margin="xxsmall">Xxsmall</DxcCard>
|
|
113
|
-
</ExampleContainer>
|
|
114
|
-
<ExampleContainer>
|
|
115
|
-
<Title title="Xsmall" theme="light" level={4} />
|
|
116
|
-
<DxcCard margin="xsmall">Xsmall</DxcCard>
|
|
117
|
-
</ExampleContainer>
|
|
118
|
-
<ExampleContainer>
|
|
119
|
-
<Title title="Small" theme="light" level={4} />
|
|
120
|
-
<DxcCard margin="small">Small</DxcCard>
|
|
121
|
-
</ExampleContainer>
|
|
122
|
-
<ExampleContainer>
|
|
123
|
-
<Title title="Medium" theme="light" level={4} />
|
|
124
|
-
<DxcCard margin="medium">Medium</DxcCard>
|
|
125
|
-
</ExampleContainer>
|
|
126
|
-
<ExampleContainer>
|
|
127
|
-
<Title title="Large" theme="light" level={4} />
|
|
128
|
-
<DxcCard margin="large">Large</DxcCard>
|
|
129
|
-
</ExampleContainer>
|
|
130
|
-
<ExampleContainer>
|
|
131
|
-
<Title title="Xlarge" theme="light" level={4} />
|
|
132
|
-
<DxcCard margin="xlarge">Xlarge</DxcCard>
|
|
133
|
-
</ExampleContainer>
|
|
134
|
-
<ExampleContainer>
|
|
135
|
-
<Title title="Xxlarge" theme="light" level={4} />
|
|
136
|
-
<DxcCard margin="xxlarge">Xxlarge</DxcCard>
|
|
137
|
-
</ExampleContainer>
|
|
138
|
-
</>
|
|
139
|
-
);
|
|
140
|
-
|
|
141
|
-
const actionCard = () => (
|
|
142
|
-
<>
|
|
143
|
-
<ExampleContainer>
|
|
144
|
-
<Title title="Focused default with action" theme="light" level={4} />
|
|
145
|
-
<DxcCard onClick={() => {}}>Focused default with action</DxcCard>
|
|
146
|
-
</ExampleContainer>
|
|
147
|
-
<ExampleContainer expanded>
|
|
148
|
-
<Title title="Hovered default with action" theme="light" level={4} />
|
|
149
|
-
<DxcCard onClick={() => {}}>Hovered default with action</DxcCard>
|
|
150
|
-
</ExampleContainer>
|
|
151
|
-
</>
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
const linkStates = async (focusCard, hoverCard) => {
|
|
155
|
-
await focusCard.focus();
|
|
156
|
-
await userEvent.hover(hoverCard);
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
export const ActionCardStates = actionCard.bind({});
|
|
160
|
-
ActionCardStates.play = async ({ canvasElement }) => {
|
|
161
|
-
const canvas = within(canvasElement);
|
|
162
|
-
await userEvent.tab();
|
|
163
|
-
await userEvent.hover(canvas.getAllByText("Hovered default with action")[1]);
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
export const Chromatic = Card.bind({});
|
|
167
|
-
Chromatic.play = async ({ canvasElement }) => {
|
|
168
|
-
const canvas = within(canvasElement);
|
|
169
|
-
const linkCards = canvas.getAllByRole("link");
|
|
170
|
-
await linkStates(linkCards[1], linkCards[2]);
|
|
171
|
-
};
|
package/card/Card.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/card/Card.test.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _react = _interopRequireDefault(require("react"));
|
|
5
|
-
var _react2 = require("@testing-library/react");
|
|
6
|
-
var _Card = _interopRequireDefault(require("./Card"));
|
|
7
|
-
describe("Card component tests", function () {
|
|
8
|
-
test("Card renders with correct content", function () {
|
|
9
|
-
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Card["default"], null, "test-card")),
|
|
10
|
-
getByText = _render.getByText;
|
|
11
|
-
expect(getByText("test-card")).toBeTruthy();
|
|
12
|
-
});
|
|
13
|
-
test("Card renders with correct href", function () {
|
|
14
|
-
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
15
|
-
linkHref: "/testPage"
|
|
16
|
-
}, "test-card")),
|
|
17
|
-
getByRole = _render2.getByRole;
|
|
18
|
-
var card = getByRole("link");
|
|
19
|
-
expect(card.getAttribute("href")).toEqual("/testPage");
|
|
20
|
-
});
|
|
21
|
-
test("Card renders with correct image", function () {
|
|
22
|
-
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
23
|
-
imageSrc: "/testImage"
|
|
24
|
-
}, "test-card")),
|
|
25
|
-
getByRole = _render3.getByRole;
|
|
26
|
-
var card = getByRole("img");
|
|
27
|
-
expect(card.getAttribute("src")).toEqual("/testImage");
|
|
28
|
-
});
|
|
29
|
-
test("OnClick function is called", function () {
|
|
30
|
-
var onClick = jest.fn();
|
|
31
|
-
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
32
|
-
onClick: onClick
|
|
33
|
-
}, "test-card")),
|
|
34
|
-
getByText = _render4.getByText;
|
|
35
|
-
var card = getByText("test-card");
|
|
36
|
-
_react2.fireEvent.click(card);
|
|
37
|
-
expect(onClick).toHaveBeenCalled();
|
|
38
|
-
});
|
|
39
|
-
});
|
package/card/types.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
-
type Size = {
|
|
4
|
-
top?: Space;
|
|
5
|
-
bottom?: Space;
|
|
6
|
-
left?: Space;
|
|
7
|
-
right?: Space;
|
|
8
|
-
};
|
|
9
|
-
type Props = {
|
|
10
|
-
/**
|
|
11
|
-
* URL of the image that will be placed in the card component.
|
|
12
|
-
* In case of omission, the image container will not appear and
|
|
13
|
-
* the content will occupy its space.
|
|
14
|
-
*/
|
|
15
|
-
imageSrc?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Color of the image background.
|
|
18
|
-
*/
|
|
19
|
-
imageBgColor?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Size of the padding to be applied to the image section of the
|
|
22
|
-
* component. You can pass an object with 'top', 'bottom', 'left'
|
|
23
|
-
* and 'right' properties in order to specify different padding sizes.
|
|
24
|
-
*/
|
|
25
|
-
imagePadding?: Space | Size;
|
|
26
|
-
/**
|
|
27
|
-
* Whether the image should appear in relation to the content.
|
|
28
|
-
*/
|
|
29
|
-
imagePosition?: "before" | "after";
|
|
30
|
-
/**
|
|
31
|
-
* If defined, the tag will be displayed as an anchor, using this prop
|
|
32
|
-
* as "href". Component will show some visual feedback on hover.
|
|
33
|
-
*/
|
|
34
|
-
linkHref?: string;
|
|
35
|
-
/**
|
|
36
|
-
* This function will be called when the user clicks the card. Component
|
|
37
|
-
* will show some visual feedback on hover.
|
|
38
|
-
*/
|
|
39
|
-
onClick?: () => void;
|
|
40
|
-
/**
|
|
41
|
-
* Whether the image must cover the whole image area of the card.
|
|
42
|
-
*/
|
|
43
|
-
imageCover?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
46
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
47
|
-
*/
|
|
48
|
-
margin?: Space | Size;
|
|
49
|
-
/**
|
|
50
|
-
* Value of the tabindex attribute applied when the component is clickable.
|
|
51
|
-
*/
|
|
52
|
-
tabIndex?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Determines whether or not the component should have an outline.
|
|
55
|
-
*/
|
|
56
|
-
outlined?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Custom content that will be placed inside the component.
|
|
59
|
-
*/
|
|
60
|
-
children?: React.ReactNode;
|
|
61
|
-
};
|
|
62
|
-
export default Props;
|
package/card/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,87 +0,0 @@
|
|
|
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 _Checkbox = _interopRequireDefault(require("./Checkbox"));
|
|
10
|
-
describe("Checkbox 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, container, results;
|
|
13
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
14
|
-
while (1) switch (_context.prev = _context.next) {
|
|
15
|
-
case 0:
|
|
16
|
-
_render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
17
|
-
label: "Checkbox",
|
|
18
|
-
labelPosition: "after",
|
|
19
|
-
name: "name",
|
|
20
|
-
size: "fitContent",
|
|
21
|
-
value: "checkboxValue",
|
|
22
|
-
margin: "small",
|
|
23
|
-
defaultChecked: true,
|
|
24
|
-
optional: true
|
|
25
|
-
})), container = _render.container;
|
|
26
|
-
_context.next = 3;
|
|
27
|
-
return (0, _axeHelper.axe)(container);
|
|
28
|
-
case 3:
|
|
29
|
-
results = _context.sent;
|
|
30
|
-
expect(results).toHaveNoViolations();
|
|
31
|
-
case 5:
|
|
32
|
-
case "end":
|
|
33
|
-
return _context.stop();
|
|
34
|
-
}
|
|
35
|
-
}, _callee);
|
|
36
|
-
})));
|
|
37
|
-
it("Should not have basic accessibility issues for read-only mode", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
38
|
-
var _render2, container, results;
|
|
39
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
40
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
41
|
-
case 0:
|
|
42
|
-
_render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
43
|
-
label: "Checkbox",
|
|
44
|
-
labelPosition: "after",
|
|
45
|
-
name: "name",
|
|
46
|
-
size: "fitContent",
|
|
47
|
-
value: "checkboxValue",
|
|
48
|
-
margin: "small",
|
|
49
|
-
readOnly: true
|
|
50
|
-
})), container = _render2.container;
|
|
51
|
-
_context2.next = 3;
|
|
52
|
-
return (0, _axeHelper.axe)(container);
|
|
53
|
-
case 3:
|
|
54
|
-
results = _context2.sent;
|
|
55
|
-
expect(results).toHaveNoViolations();
|
|
56
|
-
case 5:
|
|
57
|
-
case "end":
|
|
58
|
-
return _context2.stop();
|
|
59
|
-
}
|
|
60
|
-
}, _callee2);
|
|
61
|
-
})));
|
|
62
|
-
it("Should not have basic accessibility issues for disabled mode", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
63
|
-
var _render3, container, results;
|
|
64
|
-
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
65
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
66
|
-
case 0:
|
|
67
|
-
_render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
68
|
-
label: "Checkbox",
|
|
69
|
-
labelPosition: "after",
|
|
70
|
-
name: "name",
|
|
71
|
-
size: "fitContent",
|
|
72
|
-
value: "checkboxValue",
|
|
73
|
-
margin: "small",
|
|
74
|
-
disabled: true
|
|
75
|
-
})), container = _render3.container;
|
|
76
|
-
_context3.next = 3;
|
|
77
|
-
return (0, _axeHelper.axe)(container);
|
|
78
|
-
case 3:
|
|
79
|
-
results = _context3.sent;
|
|
80
|
-
expect(results).toHaveNoViolations();
|
|
81
|
-
case 5:
|
|
82
|
-
case "end":
|
|
83
|
-
return _context3.stop();
|
|
84
|
-
}
|
|
85
|
-
}, _callee3);
|
|
86
|
-
})));
|
|
87
|
-
});
|
package/checkbox/Checkbox.d.ts
DELETED