@learningpool/ui 1.6.3 → 1.6.5
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/{dist/assets → assets}/Images.d.ts +0 -0
- package/{dist/assets → assets}/Images.js +0 -0
- package/{dist/components → components}/atoms/Autocomplete/Autocomplete.d.ts +0 -0
- package/{dist/components → components}/atoms/Autocomplete/Autocomplete.js +0 -0
- package/{dist/components → components}/atoms/Button/Button.d.ts +0 -0
- package/{dist/components → components}/atoms/Button/Button.js +0 -0
- package/{dist/components → components}/atoms/Checkbox/Checkbox.d.ts +0 -0
- package/{dist/components → components}/atoms/Checkbox/Checkbox.js +0 -0
- package/{dist/components → components}/atoms/IconButton/IconButton.d.ts +0 -0
- package/{dist/components → components}/atoms/IconButton/IconButton.js +0 -0
- package/{dist/components → components}/atoms/Radio/Radio.d.ts +0 -0
- package/{dist/components → components}/atoms/Radio/Radio.js +0 -0
- package/{dist/components → components}/atoms/Select/Select.d.ts +0 -0
- package/{dist/components → components}/atoms/Select/Select.js +0 -0
- package/{dist/components → components}/atoms/Slider/Slider.d.ts +0 -0
- package/{dist/components → components}/atoms/Slider/Slider.js +0 -0
- package/{dist/components → components}/atoms/Switch/Switch.d.ts +0 -0
- package/{dist/components → components}/atoms/Switch/Switch.js +0 -0
- package/{dist/components → components}/atoms/TextField/TextField.d.ts +0 -0
- package/{dist/components → components}/atoms/TextField/TextField.js +0 -0
- package/{dist/components → components}/atoms/ToggleButton/ToggleButton.d.ts +0 -0
- package/{dist/components → components}/atoms/ToggleButton/ToggleButton.js +0 -0
- package/{dist/components → components}/datadisplay/Avatar/Avatar.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Avatar/Avatar.js +0 -0
- package/{dist/components → components}/datadisplay/Chip/Chip.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Chip/Chip.js +0 -0
- package/{dist/components → components}/datadisplay/List/List.d.ts +0 -0
- package/{dist/components → components}/datadisplay/List/List.js +0 -0
- package/{dist/components → components}/datadisplay/Tooltip/Tooltip.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Tooltip/Tooltip.js +0 -0
- package/{dist/components → components}/feedback/Alert/Alert.d.ts +0 -0
- package/{dist/components → components}/feedback/Alert/Alert.js +0 -0
- package/{dist/components → components}/landmarks/Header/Header.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/Header.js +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderActionButtons.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderActionButtons.js +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderStyles.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderStyles.js +0 -0
- package/{dist/components → components}/navigation/Drawer/Drawer.d.ts +0 -0
- package/{dist/components → components}/navigation/Drawer/Drawer.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigation.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigation.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatar.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawer.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationMotion.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationMotion.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearch.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearch.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearchStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleX.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigation.d.ts +1 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigation.js +12 -10
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatar.js +11 -7
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +49 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +33 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +3 -3
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +1 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +16 -15
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +3 -3
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationMotion.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationMotion.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +6 -1
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationStyles.js +14 -15
- package/{dist/components → components}/pages/ErrorPage/ErrorPage.d.ts +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPage.js +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPageStyles.d.ts +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPageStyles.js +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSide.d.ts +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSide.js +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSideStyles.d.ts +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSideStyles.js +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcher.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcher.js +1 -1
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.js +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherStyles.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherStyles.js +8 -6
- package/{dist/components → components}/stream/AppSwitcher/constants.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/constants.js +0 -0
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/index.js → index.js} +0 -0
- package/lang/en-us.d.ts +15 -0
- package/lang/en-us.js +18 -0
- package/package.json +3 -70
- package/{dist/types → types}/components/navigation/VerticalNavigation.d.ts +0 -0
- package/{dist/types → types}/components/navigation/VerticalNavigation.js +0 -0
- package/{dist/types → types}/components/navigation/VerticalNavigationAvatar.d.ts +1 -0
- package/{dist/types → types}/components/navigation/VerticalNavigationAvatar.js +0 -0
- package/{dist/types → types}/components/stream/AppSwitcher.d.ts +0 -0
- package/{dist/types → types}/components/stream/AppSwitcher.js +0 -0
- package/{dist/types → types}/index.d.ts +0 -0
- package/{dist/types → types}/index.js +0 -0
- package/{dist/utils → utils}/constants.d.ts +0 -0
- package/{dist/utils → utils}/constants.js +0 -0
- package/{dist/utils → utils}/helpers.d.ts +0 -0
- package/{dist/utils → utils}/helpers.js +0 -0
- package/{dist/utils → utils}/hooks.d.ts +0 -0
- package/{dist/utils → utils}/hooks.js +0 -0
- package/{dist/utils → utils}/index.d.ts +0 -0
- package/{dist/utils → utils}/index.js +0 -0
- package/{dist/utils → utils}/theme.d.ts +0 -0
- package/{dist/utils → utils}/theme.js +0 -0
- package/.eslintrc.js +0 -40
- package/.github/pull_request_template.md +0 -23
- package/.github/renovate.json +0 -57
- package/.github/workflows/integration.yml +0 -53
- package/.github/workflows/wss.yml +0 -22
- package/.jest-test-results.json +0 -1
- package/.releaserc +0 -32
- package/.storybook/learningpoolTheme.js +0 -39
- package/.storybook/main.js +0 -21
- package/.storybook/manager-head.html +0 -175
- package/.storybook/manager.js +0 -34
- package/.storybook/preview-head.html +0 -212
- package/.storybook/preview.js +0 -120
- package/.storybook/storybook-sort.js +0 -54
- package/CHANGELOG.md +0 -20
- package/amplify.yml +0 -16
- package/babel.config.json +0 -14
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +0 -31
- package/dist/lang/en-us.d.ts +0 -6
- package/dist/lang/en-us.js +0 -6
- package/dist/package.json +0 -41
- package/jest.config.ts +0 -11
- package/jest.setup.ts +0 -5
- package/license +0 -7
- package/merge.js +0 -27
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/assets/atoms.svg +0 -5
- package/public/assets/automation.svg +0 -1
- package/public/assets/avatar-1.jpg +0 -0
- package/public/assets/avatar-2.jpg +0 -0
- package/public/assets/avatar-3.jpg +0 -0
- package/public/assets/flux/icon-dark.svg +0 -6
- package/public/assets/flux/icon-light.svg +0 -1
- package/public/assets/flux/icon-white.svg +0 -6
- package/public/assets/flux/icon.svg +0 -6
- package/public/assets/flux/logo-dark.svg +0 -22
- package/public/assets/flux/logo-light.svg +0 -1
- package/public/assets/flux/logo-white.svg +0 -22
- package/public/assets/flux/logo.svg +0 -22
- package/public/assets/iPhone6.jpg +0 -0
- package/public/assets/iPhone6Plus.jpg +0 -0
- package/public/assets/lp-logo.png +0 -0
- package/public/assets/lplogo.svg +0 -1
- package/public/assets/molecules.svg +0 -8
- package/public/assets/organisms.svg +0 -21
- package/public/assets/pages.svg +0 -4
- package/public/assets/particles.svg +0 -3
- package/public/assets/stream-dark.png +0 -0
- package/public/assets/stream-suite-logo.svg +0 -38
- package/public/assets/stream-white.png +0 -0
- package/public/assets/stream.png +0 -0
- package/public/assets/templates.svg +0 -3
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/public/site.webmanifest +0 -1
- package/readme.md +0 -132
- package/src/docs.tsx +0 -167
- package/src/lib/assets/Images.tsx +0 -47
- package/src/lib/assets/stream-suite-logo.svg +0 -38
- package/src/lib/components/atoms/Autocomplete/Autocomplete.test.tsx +0 -179
- package/src/lib/components/atoms/Autocomplete/Autocomplete.tsx +0 -14
- package/src/lib/components/atoms/Button/Button.test.tsx +0 -166
- package/src/lib/components/atoms/Button/Button.tsx +0 -16
- package/src/lib/components/atoms/Checkbox/Checkbox.test.tsx +0 -85
- package/src/lib/components/atoms/Checkbox/Checkbox.tsx +0 -10
- package/src/lib/components/atoms/IconButton/IconButton.test.tsx +0 -60
- package/src/lib/components/atoms/IconButton/IconButton.tsx +0 -9
- package/src/lib/components/atoms/Radio/Radio.test.tsx +0 -136
- package/src/lib/components/atoms/Radio/Radio.tsx +0 -10
- package/src/lib/components/atoms/Select/Select.test.tsx +0 -158
- package/src/lib/components/atoms/Select/Select.tsx +0 -12
- package/src/lib/components/atoms/Slider/Slider.test.tsx +0 -103
- package/src/lib/components/atoms/Slider/Slider.tsx +0 -10
- package/src/lib/components/atoms/Switch/Switch.test.tsx +0 -96
- package/src/lib/components/atoms/Switch/Switch.tsx +0 -10
- package/src/lib/components/atoms/TextField/TextField.test.tsx +0 -131
- package/src/lib/components/atoms/TextField/TextField.tsx +0 -31
- package/src/lib/components/atoms/ToggleButton/ToggleButton.test.tsx +0 -122
- package/src/lib/components/atoms/ToggleButton/ToggleButton.tsx +0 -10
- package/src/lib/components/datadisplay/Avatar/Avatar.test.tsx +0 -187
- package/src/lib/components/datadisplay/Avatar/Avatar.tsx +0 -35
- package/src/lib/components/datadisplay/Avatar/avatar-1.jpg +0 -0
- package/src/lib/components/datadisplay/Chip/Chip.test.tsx +0 -82
- package/src/lib/components/datadisplay/Chip/Chip.tsx +0 -11
- package/src/lib/components/datadisplay/List/List.test.tsx +0 -168
- package/src/lib/components/datadisplay/List/List.tsx +0 -8
- package/src/lib/components/datadisplay/Tooltip/Tooltip.test.tsx +0 -98
- package/src/lib/components/datadisplay/Tooltip/Tooltip.tsx +0 -9
- package/src/lib/components/feedback/Alert/Alert.test.tsx +0 -139
- package/src/lib/components/feedback/Alert/Alert.tsx +0 -10
- package/src/lib/components/landmarks/Header/Header.tsx +0 -140
- package/src/lib/components/landmarks/Header/HeaderActionButtons.tsx +0 -117
- package/src/lib/components/landmarks/Header/HeaderStyles.tsx +0 -62
- package/src/lib/components/navigation/Drawer/Drawer.test.tsx +0 -95
- package/src/lib/components/navigation/Drawer/Drawer.tsx +0 -21
- package/src/lib/components/navigation/MobileNavigation/MobileNavigation.tsx +0 -276
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatar.tsx +0 -334
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.tsx +0 -77
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawer.tsx +0 -197
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.tsx +0 -143
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.tsx +0 -192
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.tsx +0 -67
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.tsx +0 -192
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.tsx +0 -217
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationMotion.tsx +0 -119
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.tsx +0 -35
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearch.tsx +0 -114
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearchStyles.tsx +0 -47
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationStyles.tsx +0 -320
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.tsx +0 -59
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleX.tsx +0 -51
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigation.tsx +0 -468
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatar.tsx +0 -208
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.tsx +0 -75
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.tsx +0 -196
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.tsx +0 -94
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.tsx +0 -212
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.tsx +0 -240
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationMotion.tsx +0 -119
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationStyles.tsx +0 -302
- package/src/lib/components/pages/ErrorPage/ErrorPage.test.tsx +0 -78
- package/src/lib/components/pages/ErrorPage/ErrorPage.tsx +0 -50
- package/src/lib/components/pages/ErrorPage/ErrorPageStyles.tsx +0 -30
- package/src/lib/components/pages/SideInSide/SideInSide.tsx +0 -100
- package/src/lib/components/pages/SideInSide/SideInSideStyles.tsx +0 -62
- package/src/lib/components/stream/AppSwitcher/AppSwitcher.tsx +0 -381
- package/src/lib/components/stream/AppSwitcher/AppSwitcherItem.tsx +0 -84
- package/src/lib/components/stream/AppSwitcher/AppSwitcherStyles.tsx +0 -325
- package/src/lib/components/stream/AppSwitcher/constants.tsx +0 -28
- package/src/lib/index.tsx +0 -148
- package/src/lib/lang/en-us.js +0 -6
- package/src/lib/types/components/navigation/VerticalNavigation.ts +0 -52
- package/src/lib/types/components/navigation/VerticalNavigationAvatar.ts +0 -26
- package/src/lib/types/components/stream/AppSwitcher.ts +0 -10
- package/src/lib/types/index.ts +0 -9
- package/src/lib/utils/constants.tsx +0 -11
- package/src/lib/utils/helpers.tsx +0 -77
- package/src/lib/utils/hooks.tsx +0 -33
- package/src/lib/utils/index.tsx +0 -4
- package/src/lib/utils/theme.tsx +0 -79
- package/src/react-app-env.d.ts +0 -1
- package/src/setupTests.ts +0 -5
- package/src/stories/Components/DataDisplay/Avatar/Accessibility.stories.mdx +0 -34
- package/src/stories/Components/DataDisplay/Avatar/AllCombinations.tsx +0 -56
- package/src/stories/Components/DataDisplay/Avatar/Avatar.stories.tsx +0 -19
- package/src/stories/Components/DataDisplay/Avatar/Examples.stories.tsx +0 -278
- package/src/stories/Components/DataDisplay/Avatar/Overview.stories.mdx +0 -47
- package/src/stories/Components/DataDisplay/Chip/Accessibility.stories.mdx +0 -29
- package/src/stories/Components/DataDisplay/Chip/AllCombinations.tsx +0 -58
- package/src/stories/Components/DataDisplay/Chip/Chip.stories.tsx +0 -21
- package/src/stories/Components/DataDisplay/Chip/Examples.stories.tsx +0 -126
- package/src/stories/Components/DataDisplay/Chip/Overview.stories.mdx +0 -57
- package/src/stories/Components/DataDisplay/List/Accessibility.stories.mdx +0 -54
- package/src/stories/Components/DataDisplay/List/AllCombinations.tsx +0 -396
- package/src/stories/Components/DataDisplay/List/Examples.stories.tsx +0 -501
- package/src/stories/Components/DataDisplay/List/List.stories.tsx +0 -35
- package/src/stories/Components/DataDisplay/List/Overview.stories.mdx +0 -69
- package/src/stories/Components/DataDisplay/Table/Overview.stories.mdx +0 -70
- package/src/stories/Components/DataDisplay/Tooltip/Accessibility.stories.mdx +0 -39
- package/src/stories/Components/DataDisplay/Tooltip/AllCombinations.tsx +0 -134
- package/src/stories/Components/DataDisplay/Tooltip/Examples.stories.tsx +0 -237
- package/src/stories/Components/DataDisplay/Tooltip/Overview.stories.mdx +0 -58
- package/src/stories/Components/DataDisplay/Tooltip/Tooltip.stories.tsx +0 -22
- package/src/stories/Components/Feedback/Alert/Accessibility.stories.mdx +0 -25
- package/src/stories/Components/Feedback/Alert/Alert.stories.tsx +0 -22
- package/src/stories/Components/Feedback/Alert/AllCombinations.tsx +0 -37
- package/src/stories/Components/Feedback/Alert/Examples.stories.tsx +0 -137
- package/src/stories/Components/Feedback/Alert/Overview.stories.mdx +0 -62
- package/src/stories/Components/Inputs/Autocomplete/Accessibility.stories.mdx +0 -31
- package/src/stories/Components/Inputs/Autocomplete/AllCombinations.tsx +0 -182
- package/src/stories/Components/Inputs/Autocomplete/Autocomplete.stories.tsx +0 -31
- package/src/stories/Components/Inputs/Autocomplete/Examples.stories.tsx +0 -233
- package/src/stories/Components/Inputs/Autocomplete/Overview.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Button/Accessibility.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Button/AllCombinations.tsx +0 -53
- package/src/stories/Components/Inputs/Button/Button.stories.tsx +0 -23
- package/src/stories/Components/Inputs/Button/Examples.stories.tsx +0 -190
- package/src/stories/Components/Inputs/Button/Overview.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Checkbox/Accessibility.stories.mdx +0 -38
- package/src/stories/Components/Inputs/Checkbox/AllCombinations.tsx +0 -55
- package/src/stories/Components/Inputs/Checkbox/Checkbox.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Checkbox/Examples.stories.tsx +0 -363
- package/src/stories/Components/Inputs/Checkbox/Overview.stories.mdx +0 -63
- package/src/stories/Components/Inputs/IconButton/Examples.stories.tsx +0 -24
- package/src/stories/Components/Inputs/IconButton/IconButton.stories.tsx +0 -26
- package/src/stories/Components/Inputs/Radio/Accessibility.stories.mdx +0 -61
- package/src/stories/Components/Inputs/Radio/AllCombinations.tsx +0 -75
- package/src/stories/Components/Inputs/Radio/Examples.stories.tsx +0 -333
- package/src/stories/Components/Inputs/Radio/Overview.stories.mdx +0 -74
- package/src/stories/Components/Inputs/Radio/Radio.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Select/Accessibility.stories.mdx +0 -51
- package/src/stories/Components/Inputs/Select/AllCombinations.tsx +0 -63
- package/src/stories/Components/Inputs/Select/Examples.stories.tsx +0 -803
- package/src/stories/Components/Inputs/Select/Overview.stories.mdx +0 -73
- package/src/stories/Components/Inputs/Select/Select.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Slider/Accessibility.stories.mdx +0 -43
- package/src/stories/Components/Inputs/Slider/AllCombinations.tsx +0 -30
- package/src/stories/Components/Inputs/Slider/Examples.stories.tsx +0 -146
- package/src/stories/Components/Inputs/Slider/Overview.stories.mdx +0 -59
- package/src/stories/Components/Inputs/Slider/Slider.stories.tsx +0 -27
- package/src/stories/Components/Inputs/Switch/Accessibility.stories.mdx +0 -34
- package/src/stories/Components/Inputs/Switch/AllCombinations.tsx +0 -45
- package/src/stories/Components/Inputs/Switch/Examples.stories.tsx +0 -213
- package/src/stories/Components/Inputs/Switch/Overview.stories.mdx +0 -62
- package/src/stories/Components/Inputs/Switch/Switch.stories.tsx +0 -22
- package/src/stories/Components/Inputs/TextField/Accessibility.stories.mdx +0 -29
- package/src/stories/Components/Inputs/TextField/AllCombinations.tsx +0 -57
- package/src/stories/Components/Inputs/TextField/Examples.stories.tsx +0 -127
- package/src/stories/Components/Inputs/TextField/Overview.stories.mdx +0 -60
- package/src/stories/Components/Inputs/TextField/TextField.stories.tsx +0 -261
- package/src/stories/Components/Inputs/ToggleButton/Accessibility.stories.mdx +0 -32
- package/src/stories/Components/Inputs/ToggleButton/AllCombinations.tsx +0 -113
- package/src/stories/Components/Inputs/ToggleButton/Examples.stories.tsx +0 -339
- package/src/stories/Components/Inputs/ToggleButton/Overview.stories.mdx +0 -55
- package/src/stories/Components/Inputs/ToggleButton/ToggleButton.stories.tsx +0 -19
- package/src/stories/Components/Landmarks/Header/Examples.stories.tsx +0 -197
- package/src/stories/Components/Landmarks/Header/Header.stories.tsx +0 -34
- package/src/stories/Components/Landmarks/Header/Overview.stories.mdx +0 -44
- package/src/stories/Components/Navigation/Drawer/Accessibility.stories.mdx +0 -13
- package/src/stories/Components/Navigation/Drawer/Drawer.stories.tsx +0 -80
- package/src/stories/Components/Navigation/Drawer/Examples.stories.tsx +0 -440
- package/src/stories/Components/Navigation/Drawer/Overview.stories.mdx +0 -43
- package/src/stories/Components/Navigation/MobileNavigation/Accessibility.stories.mdx +0 -14
- package/src/stories/Components/Navigation/MobileNavigation/Examples.stories.tsx +0 -384
- package/src/stories/Components/Navigation/MobileNavigation/MobileNavigation.stories.tsx +0 -24
- package/src/stories/Components/Navigation/MobileNavigation/Overview.stories.mdx +0 -47
- package/src/stories/Components/Navigation/VerticalNavigation/Accessibility.stories.mdx +0 -14
- package/src/stories/Components/Navigation/VerticalNavigation/Examples.stories.tsx +0 -307
- package/src/stories/Components/Navigation/VerticalNavigation/Overview.stories.mdx +0 -47
- package/src/stories/Components/Navigation/VerticalNavigation/VerticalNavigation.stories.tsx +0 -24
- package/src/stories/ContactUs.stories.mdx +0 -21
- package/src/stories/Experimental/Test.stories.mdx +0 -46
- package/src/stories/GettingStarted/Designer.stories.mdx +0 -86
- package/src/stories/GettingStarted/Developer.stories.mdx +0 -134
- package/src/stories/Guidelines/Accessibility/AssistiveTechnology.stories.mdx +0 -70
- package/src/stories/Guidelines/Accessibility/ColorAndContrast.stories.mdx +0 -109
- package/src/stories/Guidelines/Accessibility/Hierarchy.stories.mdx +0 -119
- package/src/stories/Guidelines/Accessibility/Imagery.stories.mdx +0 -136
- package/src/stories/Guidelines/Accessibility/Overview.stories.mdx +0 -44
- package/src/stories/Guidelines/Accessibility/Principles.stories.mdx +0 -156
- package/src/stories/Guidelines/Accessibility/SoundAndMotion.stories.mdx +0 -59
- package/src/stories/Guidelines/Accessibility/Typography.stories.mdx +0 -69
- package/src/stories/Guidelines/Accessibility/Writing.stories.mdx +0 -188
- package/src/stories/Guidelines/Styleguide/ColorSwatch.tsx +0 -53
- package/src/stories/Guidelines/Styleguide/Colors.stories.mdx +0 -118
- package/src/stories/Guidelines/Styleguide/Typography.stories.mdx +0 -84
- package/src/stories/Introduction.stories.mdx +0 -65
- package/src/stories/Pages/ErrorPage.stories.tsx +0 -30
- package/src/stories/Pages/SideInSide.stories.tsx +0 -195
- package/src/stories/Roadmap.stories.mdx +0 -19
- package/src/stories/Templates/Login.stories.mdx +0 -46
- package/src/stories/assets/Atomic_Design_Icons-Dark.svg +0 -24
- package/src/stories/assets/Atomic_Design_Icons-Light.svg +0 -25
- package/src/stories/assets/accessibility-1.png +0 -0
- package/src/stories/assets/accessibility-2.png +0 -0
- package/src/stories/assets/accessibility-3.png +0 -0
- package/src/stories/assets/accessibility-banner.png +0 -0
- package/src/stories/assets/atoms.svg +0 -6
- package/src/stories/assets/design_system_2022-02-11_12.22pm.png +0 -0
- package/src/stories/assets/figma-tokens.png +0 -0
- package/src/stories/assets/hierarchy-1.jpg +0 -0
- package/src/stories/assets/hierarchy-2.jpg +0 -0
- package/src/stories/assets/hierarchy-3.jpg +0 -0
- package/src/stories/assets/icon-contrast-1.jpg +0 -0
- package/src/stories/assets/icon-contrast-2.jpg +0 -0
- package/src/stories/assets/imagery-1.png +0 -0
- package/src/stories/assets/imagery-2.png +0 -0
- package/src/stories/assets/imagery-3.png +0 -0
- package/src/stories/assets/imagery-4.jpg +0 -0
- package/src/stories/assets/molecules.svg +0 -9
- package/src/stories/assets/organisms.svg +0 -22
- package/src/stories/assets/pages.svg +0 -5
- package/src/stories/assets/particles.svg +0 -4
- package/src/stories/assets/templates.svg +0 -4
- package/src/stories/assets/testData.tsx +0 -102
- package/src/stories/assets/text-contrast-1.jpg +0 -0
- package/src/stories/assets/text-contrast-2.jpg +0 -0
- package/src/stories/assets/typography-1.png +0 -0
- package/src/stories/assets/visual-clues-1.png +0 -0
- package/src/stories/assets/visual-clues-2.png +0 -0
- package/src/stories/assets/writing-1.jpg +0 -0
- package/src/stories/assets/writing-2.png +0 -0
- package/src/stories/assets/writing-3.png +0 -0
- package/src/stories/assets/writing-4.png +0 -0
- package/src/stories/utils/CustomIcons.tsx +0 -44
- package/tsconfig.eslint.json +0 -16
- package/tsconfig.json +0 -50
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import { FormControl, FormControlLabel, FormHelperText, FormLabel, RadioGroup } from '@mui/material'
|
|
2
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
3
|
-
import * as React from 'react'
|
|
4
|
-
import { DOCS } from '../../../../docs'
|
|
5
|
-
import Radio from '../../../../lib/components/atoms/Radio/Radio'
|
|
6
|
-
import Button from '../../../../lib/components/atoms/Button/Button'
|
|
7
|
-
import AllCombinations from './AllCombinations'
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'Components/Inputs/Radio/Examples',
|
|
11
|
-
component: Radio
|
|
12
|
-
} as ComponentMeta<typeof Radio>
|
|
13
|
-
|
|
14
|
-
export const Default: ComponentStory<typeof Radio> = (args): JSX.Element => (
|
|
15
|
-
<FormControl>
|
|
16
|
-
<FormLabel id="demo-radio-buttons-group-label">Gender</FormLabel>
|
|
17
|
-
<RadioGroup
|
|
18
|
-
aria-labelledby="demo-radio-buttons-group-label"
|
|
19
|
-
defaultValue="female"
|
|
20
|
-
name="radio-buttons-group"
|
|
21
|
-
>
|
|
22
|
-
<FormControlLabel value="female" control={<Radio />} label="Female" />
|
|
23
|
-
<FormControlLabel value="male" control={<Radio />} label="Male" />
|
|
24
|
-
<FormControlLabel value="other" control={<Radio />} label="Other" />
|
|
25
|
-
</RadioGroup>
|
|
26
|
-
</FormControl>
|
|
27
|
-
)
|
|
28
|
-
Default.parameters = {
|
|
29
|
-
docs: {
|
|
30
|
-
description: {
|
|
31
|
-
component: DOCS.Radio.Default
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
controls: {
|
|
35
|
-
// exclude: /[a-zA-Z0-9]*/,
|
|
36
|
-
// hideNoControlsWarning: true
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const Direction: ComponentStory<typeof Radio> = (args): JSX.Element => {
|
|
41
|
-
return (
|
|
42
|
-
<FormControl>
|
|
43
|
-
<FormLabel id="demo-row-radio-buttons-direction">Gender</FormLabel>
|
|
44
|
-
<RadioGroup
|
|
45
|
-
row
|
|
46
|
-
aria-labelledby="demo-row-radio-buttons-direction"
|
|
47
|
-
name="row-radio-buttons-direction"
|
|
48
|
-
>
|
|
49
|
-
<FormControlLabel value="female" control={<Radio />} label="Female" />
|
|
50
|
-
<FormControlLabel value="male" control={<Radio />} label="Male" />
|
|
51
|
-
<FormControlLabel value="other" control={<Radio />} label="Other" />
|
|
52
|
-
<FormControlLabel
|
|
53
|
-
value="disabled"
|
|
54
|
-
disabled
|
|
55
|
-
control={<Radio />}
|
|
56
|
-
label="other"
|
|
57
|
-
/>
|
|
58
|
-
</RadioGroup>
|
|
59
|
-
</FormControl>
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
Direction.parameters = {
|
|
63
|
-
docs: {
|
|
64
|
-
description: {
|
|
65
|
-
story: DOCS.Radio.Direction
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export const Controlled: ComponentStory<typeof Radio> = (args): JSX.Element => {
|
|
71
|
-
const [value, setValue] = React.useState('female')
|
|
72
|
-
|
|
73
|
-
const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
74
|
-
setValue((event.target as HTMLInputElement).value)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return (
|
|
78
|
-
<FormControl>
|
|
79
|
-
<FormLabel id="demo-controlled-radio-buttons-controlled">Gender</FormLabel>
|
|
80
|
-
<RadioGroup
|
|
81
|
-
aria-labelledby="demo-controlled-radio-buttons-controlled"
|
|
82
|
-
name="controlled-radio-buttons-controlled"
|
|
83
|
-
value={value}
|
|
84
|
-
onChange={handleChange}
|
|
85
|
-
>
|
|
86
|
-
<FormControlLabel value="female" control={<Radio />} label="Female" />
|
|
87
|
-
<FormControlLabel value="male" control={<Radio />} label="Male" />
|
|
88
|
-
</RadioGroup>
|
|
89
|
-
</FormControl>
|
|
90
|
-
)
|
|
91
|
-
}
|
|
92
|
-
Controlled.parameters = {
|
|
93
|
-
docs: {
|
|
94
|
-
description: {
|
|
95
|
-
story: DOCS.Radio.Controlled
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
controls: {
|
|
99
|
-
// exclude: /[a-zA-Z0-9]*/,
|
|
100
|
-
// hideNoControlsWarning: true
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export const Standalone: ComponentStory<typeof Radio> = (args): JSX.Element => {
|
|
105
|
-
const [selectedValue, setSelectedValue] = React.useState('a')
|
|
106
|
-
|
|
107
|
-
const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
108
|
-
setSelectedValue(event.target.value)
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return (
|
|
112
|
-
<div>
|
|
113
|
-
<Radio
|
|
114
|
-
checked={selectedValue === 'a'}
|
|
115
|
-
onChange={handleChange}
|
|
116
|
-
value="a"
|
|
117
|
-
name="radio-buttons"
|
|
118
|
-
inputProps={{ 'aria-label': 'A' }}
|
|
119
|
-
/>
|
|
120
|
-
<Radio
|
|
121
|
-
checked={selectedValue === 'b'}
|
|
122
|
-
onChange={handleChange}
|
|
123
|
-
value="b"
|
|
124
|
-
name="radio-buttons"
|
|
125
|
-
inputProps={{ 'aria-label': 'B' }}
|
|
126
|
-
/>
|
|
127
|
-
</div>
|
|
128
|
-
)
|
|
129
|
-
}
|
|
130
|
-
Standalone.parameters = {
|
|
131
|
-
docs: {
|
|
132
|
-
description: {
|
|
133
|
-
story: DOCS.Radio.Standalone
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
controls: {
|
|
137
|
-
// exclude: /[a-zA-Z0-9]*/,
|
|
138
|
-
// hideNoControlsWarning: true
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export const Sizes: ComponentStory<typeof Radio> = (args): JSX.Element => {
|
|
143
|
-
const [selectedValue, setSelectedValue] = React.useState('a')
|
|
144
|
-
const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
145
|
-
setSelectedValue(event.target.value)
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const controlProps = (item: string): object => ({
|
|
149
|
-
checked: selectedValue === item,
|
|
150
|
-
onChange: handleChange,
|
|
151
|
-
value: item,
|
|
152
|
-
name: 'size-radio-button-demo',
|
|
153
|
-
inputProps: { 'aria-label': item }
|
|
154
|
-
})
|
|
155
|
-
|
|
156
|
-
return (
|
|
157
|
-
<div>
|
|
158
|
-
<Radio {...controlProps('a')} size="small" />
|
|
159
|
-
<Radio {...controlProps('b')} />
|
|
160
|
-
<Radio
|
|
161
|
-
{...controlProps('c')}
|
|
162
|
-
sx={{
|
|
163
|
-
'& .MuiSvgIcon-root': {
|
|
164
|
-
fontSize: 28
|
|
165
|
-
}
|
|
166
|
-
}}
|
|
167
|
-
/>
|
|
168
|
-
</div>
|
|
169
|
-
)
|
|
170
|
-
}
|
|
171
|
-
Sizes.parameters = {
|
|
172
|
-
docs: {
|
|
173
|
-
description: {
|
|
174
|
-
story: DOCS.Radio.Sizes
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
controls: {
|
|
178
|
-
// exclude: /[a-zA-Z0-9]*/,
|
|
179
|
-
// hideNoControlsWarning: true
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export const Colors: ComponentStory<typeof Radio> = (args): JSX.Element => {
|
|
184
|
-
const [selectedValue, setSelectedValue] = React.useState('a')
|
|
185
|
-
|
|
186
|
-
const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
187
|
-
setSelectedValue(event.target.value)
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
const controlProps = (item: string): object => ({
|
|
191
|
-
checked: selectedValue === item,
|
|
192
|
-
onChange: handleChange,
|
|
193
|
-
value: item,
|
|
194
|
-
name: 'color-radio-button-demo',
|
|
195
|
-
inputProps: { 'aria-label': item }
|
|
196
|
-
})
|
|
197
|
-
|
|
198
|
-
return (
|
|
199
|
-
<div>
|
|
200
|
-
<Radio {...controlProps('a')} color="default" />
|
|
201
|
-
<Radio {...controlProps('b')} />
|
|
202
|
-
<Radio {...controlProps('d')} color="secondary" />
|
|
203
|
-
<Radio {...controlProps('e')} color="error" />
|
|
204
|
-
<Radio {...controlProps('f')} color="success" />
|
|
205
|
-
<Radio {...controlProps('g')} color="info" />
|
|
206
|
-
<Radio {...controlProps('h')} color="warning" />
|
|
207
|
-
</div>
|
|
208
|
-
)
|
|
209
|
-
}
|
|
210
|
-
Colors.parameters = {
|
|
211
|
-
docs: {
|
|
212
|
-
description: {
|
|
213
|
-
story: DOCS.Radio.Colors
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
controls: {
|
|
217
|
-
// exclude: /[a-zA-Z0-9]*/,
|
|
218
|
-
// hideNoControlsWarning: true
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export const LabelPosition: ComponentStory<typeof Radio> = (args): JSX.Element => (
|
|
223
|
-
<FormControl>
|
|
224
|
-
<FormLabel id="demo-form-control-label-placement">labelPlacement</FormLabel>
|
|
225
|
-
<RadioGroup
|
|
226
|
-
row
|
|
227
|
-
aria-labelledby="demo-form-control-label-placement"
|
|
228
|
-
name="position"
|
|
229
|
-
defaultValue="top"
|
|
230
|
-
>
|
|
231
|
-
<FormControlLabel
|
|
232
|
-
value="top"
|
|
233
|
-
control={<Radio />}
|
|
234
|
-
label="Top"
|
|
235
|
-
labelPlacement="top"
|
|
236
|
-
/>
|
|
237
|
-
<FormControlLabel
|
|
238
|
-
value="start"
|
|
239
|
-
control={<Radio />}
|
|
240
|
-
label="Start"
|
|
241
|
-
labelPlacement="start"
|
|
242
|
-
/>
|
|
243
|
-
<FormControlLabel
|
|
244
|
-
value="bottom"
|
|
245
|
-
control={<Radio />}
|
|
246
|
-
label="Bottom"
|
|
247
|
-
labelPlacement="bottom"
|
|
248
|
-
/>
|
|
249
|
-
<FormControlLabel value="end" control={<Radio />} label="End" />
|
|
250
|
-
</RadioGroup>
|
|
251
|
-
</FormControl>
|
|
252
|
-
)
|
|
253
|
-
LabelPosition.parameters = {
|
|
254
|
-
docs: {
|
|
255
|
-
description: {
|
|
256
|
-
story: DOCS.Radio.LabelPosition
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
controls: {
|
|
260
|
-
// exclude: /[a-zA-Z0-9]*/,
|
|
261
|
-
// hideNoControlsWarning: true
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export const ShowError: ComponentStory<typeof Radio> = (args): JSX.Element => {
|
|
266
|
-
const [value, setValue] = React.useState('')
|
|
267
|
-
const [error, setError] = React.useState(false)
|
|
268
|
-
const [helperText, setHelperText] = React.useState('Choose wisely')
|
|
269
|
-
|
|
270
|
-
const handleRadioChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
271
|
-
setValue((event.target as HTMLInputElement).value)
|
|
272
|
-
setHelperText(' ')
|
|
273
|
-
setError(false)
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
const handleSubmit = (event: React.FormEvent<HTMLFormElement>): void => {
|
|
277
|
-
event.preventDefault()
|
|
278
|
-
|
|
279
|
-
if (value === 'best') {
|
|
280
|
-
setHelperText('You got it!')
|
|
281
|
-
setError(false)
|
|
282
|
-
} else if (value === 'worst') {
|
|
283
|
-
setHelperText('Sorry, wrong answer!')
|
|
284
|
-
setError(true)
|
|
285
|
-
} else {
|
|
286
|
-
setHelperText('Please select an option.')
|
|
287
|
-
setError(true)
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
return (
|
|
292
|
-
<form onSubmit={handleSubmit}>
|
|
293
|
-
<FormControl sx={{ m: 3 }} error={error} variant="standard">
|
|
294
|
-
<FormLabel id="demo-error-radios">Pop quiz: MUI is...</FormLabel>
|
|
295
|
-
<RadioGroup
|
|
296
|
-
aria-labelledby="demo-error-radios"
|
|
297
|
-
name="quiz"
|
|
298
|
-
value={value}
|
|
299
|
-
onChange={handleRadioChange}
|
|
300
|
-
>
|
|
301
|
-
<FormControlLabel value="best" control={<Radio />} label="The best!" />
|
|
302
|
-
<FormControlLabel value="worst" control={<Radio />} label="The worst." />
|
|
303
|
-
</RadioGroup>
|
|
304
|
-
<FormHelperText>{helperText}</FormHelperText>
|
|
305
|
-
<Button sx={{ mt: 1, mr: 1 }} type="submit" variant="outlined">
|
|
306
|
-
Check Answer
|
|
307
|
-
</Button>
|
|
308
|
-
</FormControl>
|
|
309
|
-
</form>
|
|
310
|
-
)
|
|
311
|
-
}
|
|
312
|
-
ShowError.parameters = {
|
|
313
|
-
docs: {
|
|
314
|
-
description: {
|
|
315
|
-
story: DOCS.Radio.ShowError
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
controls: {
|
|
319
|
-
// exclude: /[a-zA-Z0-9]*/,
|
|
320
|
-
// hideNoControlsWarning: true
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
export const All: ComponentStory<typeof AllCombinations> = (args) => (
|
|
325
|
-
<AllCombinations />
|
|
326
|
-
)
|
|
327
|
-
All.parameters = {
|
|
328
|
-
docs: {
|
|
329
|
-
description: {
|
|
330
|
-
story: DOCS.Radio.All
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import Radio from '../../../../lib/components/atoms/Radio/Radio';
|
|
3
|
-
import { MUIIcon, MaterialDesignIcon, W3CIcon, FigmaIcon, GithubIcon } from '../../../utils/CustomIcons';
|
|
4
|
-
import RadioGroup from '@mui/material/RadioGroup';
|
|
5
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
6
|
-
import FormControl from '@mui/material/FormControl';
|
|
7
|
-
import FormLabel from '@mui/material/FormLabel';
|
|
8
|
-
import Chip from '@mui/material/Chip';
|
|
9
|
-
import Stack from '@mui/material/Stack';
|
|
10
|
-
|
|
11
|
-
<Meta title="Components/Inputs/Radio/Overview" component={Radio} />
|
|
12
|
-
|
|
13
|
-
[](#radio-overview)Radio Overview <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Inputs/Radio/Overview.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
14
|
-
=================================================================================
|
|
15
|
-
|
|
16
|
-
### [](#what-does-it-do)What does it do?
|
|
17
|
-
|
|
18
|
-
Radio buttons allow the user to select one item from a set of options. A radio button has an associated label that should clearly describe the option.
|
|
19
|
-
|
|
20
|
-
<Stack direction="row" spacing={1}>
|
|
21
|
-
<Chip clickable component="a" href="https://mui.com/components/radio-buttons/" size="small" icon={<MUIIcon viewBox="-5 0 40 30" />} label="Material UI" variant="outlined" />
|
|
22
|
-
<Chip clickable component="a" href="https://material.io/components/selection-controls#radio-buttons" size="small" icon={<MaterialDesignIcon />} label="Material Design" variant="outlined" />
|
|
23
|
-
<Chip clickable component="a" href="https://www.w3.org/TR/wai-aria-practices/#radiobutton" size="small" icon={<W3CIcon />} label="WAI-ARIA" variant="outlined" />
|
|
24
|
-
<Chip clickable component="a" href="https://www.figma.com/proto/mBDuFn79U8wQIIEoCGpMew/DS%3A-Component-Library?node-id=1065%3A17356&scaling=min-zoom&page-id=1059%3A17709&starting-point-node-id=1065%3A17356" size="small" icon={<FigmaIcon />} label="Figma" variant="outlined" />
|
|
25
|
-
<Chip clickable component="a" href="https://github.com/HT2-Labs/design-system/tree/main/src/lib/components/atoms/Radio" size="small" icon={<GithubIcon />} label="Github" variant="outlined" />
|
|
26
|
-
</Stack>
|
|
27
|
-
|
|
28
|
-
### [](#why-use-it)Why use it?
|
|
29
|
-
|
|
30
|
-
* Radio buttons are used for mutually exclusive choices, not for multiple choices.
|
|
31
|
-
* Use radio buttons when the user needs to see all available options.
|
|
32
|
-
* A radio button can also be used for changing settings in a menu or selecting a singular item in a data table.
|
|
33
|
-
|
|
34
|
-
Understanding [Checkboxes vs Radio Buttons](https://www.nngroup.com/articles/checkboxes-vs-radio-buttons/)
|
|
35
|
-
|
|
36
|
-
### [](#how-to-implement-it)How to implement it?
|
|
37
|
-
|
|
38
|
-
Below is an overview of the baisc Radio button component that uses the `RadioGroup`, `FormControl` and `FormControlLabel` components. Thid makes it easy to group Radio components and provides an easier API with proper keyboard accessibility to the group.
|
|
39
|
-
|
|
40
|
-
<Canvas isExpanded>
|
|
41
|
-
<FormControl>
|
|
42
|
-
<FormLabel id="demo-radio-buttons-group-label">How many items?</FormLabel>
|
|
43
|
-
<RadioGroup
|
|
44
|
-
aria-labelledby="demo-radio-buttons-group-label"
|
|
45
|
-
defaultValue="none"
|
|
46
|
-
name="radio-buttons-group"
|
|
47
|
-
>
|
|
48
|
-
<FormControlLabel value="none" control={<Radio />} label="None" />
|
|
49
|
-
<FormControlLabel value="one" control={<Radio />} label="One" />
|
|
50
|
-
<FormControlLabel value="two" control={<Radio />} label="Two" />
|
|
51
|
-
<FormControlLabel value="three" control={<Radio />} label="Three" />
|
|
52
|
-
</RadioGroup>
|
|
53
|
-
</FormControl>
|
|
54
|
-
</Canvas>
|
|
55
|
-
|
|
56
|
-
### [](#when-to-avoid-it)When to avoid it?
|
|
57
|
-
|
|
58
|
-
* Do not use a radio button when a user can select more than one option from a list; use a checkbox instead.
|
|
59
|
-
* Do not use a radio button to trigger an action based on a user's selection.
|
|
60
|
-
|
|
61
|
-
### [](#best-practices)Best practices
|
|
62
|
-
|
|
63
|
-
* Radio buttons should have the most commonly used option selected by default.
|
|
64
|
-
* When grouping multiple radio buttons, use the [RadioGroup](https://mui.com/api/radio-group/) component.
|
|
65
|
-
* Ensure that all radio buttons have a clear and concise label description.
|
|
66
|
-
|
|
67
|
-
### [](#design-prototype)Design prototype
|
|
68
|
-
<iframe
|
|
69
|
-
allowfullscreen
|
|
70
|
-
frameborder="0"
|
|
71
|
-
height="350"
|
|
72
|
-
width="100%"
|
|
73
|
-
src="https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/proto/mBDuFn79U8wQIIEoCGpMew/DS%3A-Component-Library?node-id=1065%3A17356&scaling=min-zoom&page-id=1059%3A17709&starting-point-node-id=1065%3A17356"
|
|
74
|
-
/>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import Radio from '../../../../lib/components/atoms/Radio/Radio'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Inputs/Radio/Properties',
|
|
7
|
-
component: Radio,
|
|
8
|
-
parameters: {
|
|
9
|
-
controls: {
|
|
10
|
-
sort: 'requiredFirst'
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
addons: {
|
|
14
|
-
panelPosition: 'right'
|
|
15
|
-
}
|
|
16
|
-
} as ComponentMeta<typeof Radio>
|
|
17
|
-
|
|
18
|
-
// 👇 We create a “template” of how args map to rendering
|
|
19
|
-
const Template: ComponentStory<typeof Radio> = (args) => <Radio {...args} />
|
|
20
|
-
|
|
21
|
-
export const Properties = Template.bind({})
|
|
22
|
-
Properties.args = {}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story, Preview } from '@storybook/addon-docs';
|
|
2
|
-
import Select from '../../../../lib/components/atoms/Select/Select';
|
|
3
|
-
import NativeSelect from '@mui/material/NativeSelect';
|
|
4
|
-
import InputLabel from '@mui/material/InputLabel';
|
|
5
|
-
import MenuItem from '@mui/material/MenuItem';
|
|
6
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
7
|
-
import Chip from '@mui/material/Chip';
|
|
8
|
-
|
|
9
|
-
<Meta title="Components/Inputs/Select/Accessibility" />
|
|
10
|
-
|
|
11
|
-
[](#select-accessibility)Select Accessibility <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Inputs/Select/Accessibility.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
12
|
-
=================================================================================
|
|
13
|
-
|
|
14
|
-
This component has been validated to meet the WCAG 2.1 AA and Section 508 accessibility guidelines; however, changes made by the developer can affect accessibility compliance.
|
|
15
|
-
|
|
16
|
-
Please follow the guidance in this section and see [WAI-ARIA Select](https://www.w3.org/TR/wai-aria-practices/#switch) for more information.
|
|
17
|
-
|
|
18
|
-
## [](#guidelines)Guidelines
|
|
19
|
-
* Use the label to provide a clear and concise description of the Select options.
|
|
20
|
-
* Avoid long option names to make it easier to understand and increase usability.
|
|
21
|
-
* If the select field is required include the `aria-required` property and clearly indicate that it is a required field.
|
|
22
|
-
|
|
23
|
-
### [](#when-to-use-this-component)When to use this component
|
|
24
|
-
Use the select component inside a form where users are selecting from a list of options and submitting data.
|
|
25
|
-
|
|
26
|
-
### [](#screen-readers)Screen readers
|
|
27
|
-
To properly label your `Select` input you need an extra element with an `id` that contains a `label`. That `id` needs to match the `labelId` of the `Select` e.g.
|
|
28
|
-
<Canvas isExpanded>
|
|
29
|
-
<InputLabel id="label">Age</InputLabel>
|
|
30
|
-
<Select labelId="label" id="select" value="20">
|
|
31
|
-
<MenuItem value="10">Ten</MenuItem>
|
|
32
|
-
<MenuItem value="20">Twenty</MenuItem>
|
|
33
|
-
</Select>
|
|
34
|
-
</Canvas>
|
|
35
|
-
|
|
36
|
-
Alternatively a `TextField` with an `id` and `label` creates the proper markup and ids for you:
|
|
37
|
-
<Preview isExpanded>
|
|
38
|
-
<TextField id="select" label="Age" value="20" select>
|
|
39
|
-
<MenuItem value="10">Ten</MenuItem>
|
|
40
|
-
<MenuItem value="20">Twenty</MenuItem>
|
|
41
|
-
</TextField>
|
|
42
|
-
</Preview>
|
|
43
|
-
|
|
44
|
-
For a [native select](https://mui.com/components/selects/#native-select), you should mention a label by giving the value of the `id` attribute of the select element to the `InputLabel`'s `htmlFor` attribute:
|
|
45
|
-
<Canvas isExpanded>
|
|
46
|
-
<InputLabel htmlFor="select">Age</InputLabel>
|
|
47
|
-
<NativeSelect id="select">
|
|
48
|
-
<option value="10">Ten</option>
|
|
49
|
-
<option value="20">Twenty</option>
|
|
50
|
-
</NativeSelect>
|
|
51
|
-
</Canvas>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { Box, FormControl, FormHelperText, InputLabel, MenuItem } from '@mui/material'
|
|
3
|
-
import Select, { SelectChangeEvent } from '../../../../lib/components/atoms/Select/Select'
|
|
4
|
-
|
|
5
|
-
const SelectGrid = (args: any): JSX.Element => {
|
|
6
|
-
const [age, setAge] = React.useState('')
|
|
7
|
-
|
|
8
|
-
const handleChange = (event: SelectChangeEvent): void => {
|
|
9
|
-
setAge(event.target.value)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<Box>
|
|
14
|
-
{[
|
|
15
|
-
{ },
|
|
16
|
-
{ error: true },
|
|
17
|
-
{ disabled: true },
|
|
18
|
-
{ withLabel: true },
|
|
19
|
-
{ withoutLabel: true }
|
|
20
|
-
].map(selectItem => {
|
|
21
|
-
const { error, disabled, withLabel, withoutLabel } = selectItem
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<FormControl sx={{ m: 1, minWidth: 120 }} error={error}>
|
|
25
|
-
{withoutLabel ? null : <InputLabel id="demo-simple-select-label">Age</InputLabel>}
|
|
26
|
-
<Select
|
|
27
|
-
labelId="demo-simple-select-label"
|
|
28
|
-
id="demo-simple-select"
|
|
29
|
-
value={age}
|
|
30
|
-
label="Age"
|
|
31
|
-
onChange={handleChange}
|
|
32
|
-
disabled={disabled}
|
|
33
|
-
displayEmpty={withoutLabel}
|
|
34
|
-
{...args}
|
|
35
|
-
>
|
|
36
|
-
<MenuItem value={10}>Ten</MenuItem>
|
|
37
|
-
<MenuItem value={20}>Twenty</MenuItem>
|
|
38
|
-
<MenuItem value={30}>Thirty</MenuItem>
|
|
39
|
-
</Select>
|
|
40
|
-
{withLabel ? <FormHelperText>With label + helper text</FormHelperText> : null}
|
|
41
|
-
{withoutLabel ? <FormHelperText>Without label</FormHelperText> : null}
|
|
42
|
-
</FormControl>
|
|
43
|
-
)
|
|
44
|
-
})}
|
|
45
|
-
</Box>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default function AllCombinations (): JSX.Element {
|
|
50
|
-
const combinations = [
|
|
51
|
-
{ variant: 'standard' },
|
|
52
|
-
{ variant: 'outlined' },
|
|
53
|
-
{ variant: 'filled' }
|
|
54
|
-
]
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<Box>
|
|
58
|
-
{combinations.map(selectConfig => (
|
|
59
|
-
<SelectGrid {...selectConfig} />
|
|
60
|
-
))}
|
|
61
|
-
</Box>
|
|
62
|
-
)
|
|
63
|
-
}
|