@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,261 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import TextField from '../../../../lib/components/atoms/TextField/TextField'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Inputs/TextField/Properties',
|
|
7
|
-
component: TextField,
|
|
8
|
-
argTypes: {
|
|
9
|
-
autoComplete: {
|
|
10
|
-
description: "This prop helps users to fill forms faster, especially on mobile devices. The name can be confusing, as it's more like an autofill. You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).",
|
|
11
|
-
control: { type: 'text' },
|
|
12
|
-
table: {
|
|
13
|
-
type: { summary: 'string' }
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
autoFocus: {
|
|
17
|
-
control: { type: 'boolean' },
|
|
18
|
-
table: {
|
|
19
|
-
type: { summary: 'boolean' },
|
|
20
|
-
defaultValue: { summary: 'false' }
|
|
21
|
-
},
|
|
22
|
-
description: 'If true, the input element is focused during the first mount.'
|
|
23
|
-
},
|
|
24
|
-
classes: {
|
|
25
|
-
description: 'Override or extend the styles applied to the component. See CSS API below for more details.',
|
|
26
|
-
control: { type: 'object' },
|
|
27
|
-
table: {
|
|
28
|
-
type: { summary: 'object' }
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
color: {
|
|
32
|
-
options: ['primary', 'secondary', 'error', 'info', 'success', 'warning'],
|
|
33
|
-
description: 'The color of the component. It supports those theme colors that make sense for this component.',
|
|
34
|
-
control: { type: 'radio' },
|
|
35
|
-
table: {
|
|
36
|
-
type: { summary: 'string' },
|
|
37
|
-
defaultValue: { summary: 'primary' }
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
defaultValue: {
|
|
41
|
-
control: { type: 'any' },
|
|
42
|
-
table: {
|
|
43
|
-
type: { summary: 'any' }
|
|
44
|
-
},
|
|
45
|
-
description: 'The default value. Use when the component is not controlled.'
|
|
46
|
-
},
|
|
47
|
-
disabled: {
|
|
48
|
-
control: { type: 'boolean' },
|
|
49
|
-
table: {
|
|
50
|
-
type: { summary: 'boolean' },
|
|
51
|
-
defaultValue: { summary: 'false' }
|
|
52
|
-
},
|
|
53
|
-
description: 'If true, the component is disabled.'
|
|
54
|
-
},
|
|
55
|
-
error: {
|
|
56
|
-
control: { type: 'boolean' },
|
|
57
|
-
table: {
|
|
58
|
-
type: { summary: 'boolean' },
|
|
59
|
-
defaultValue: { summary: 'false' }
|
|
60
|
-
},
|
|
61
|
-
description: 'If true, the label is displayed in an error state.'
|
|
62
|
-
},
|
|
63
|
-
helperText: {
|
|
64
|
-
description: 'The helper text content.',
|
|
65
|
-
control: { type: 'node' },
|
|
66
|
-
table: {
|
|
67
|
-
type: { summary: 'node' }
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
FormHelperTextProps: {
|
|
71
|
-
description: 'Props applied to the FormHelperText element.',
|
|
72
|
-
control: { type: 'object' },
|
|
73
|
-
table: {
|
|
74
|
-
type: { summary: 'object' }
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
fullWidth: {
|
|
78
|
-
control: { type: 'boolean' },
|
|
79
|
-
table: {
|
|
80
|
-
type: { summary: 'boolean' },
|
|
81
|
-
defaultValue: { summary: 'false' }
|
|
82
|
-
},
|
|
83
|
-
description: 'If true, the input will take up the full width of its container.'
|
|
84
|
-
},
|
|
85
|
-
InputLabelProps: {
|
|
86
|
-
description: 'Props applied to the InputLabel element. Pointer events like onClick are enabled if and only if shrink is true.',
|
|
87
|
-
control: { type: 'object' },
|
|
88
|
-
table: {
|
|
89
|
-
type: { summary: 'object' }
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
id: {
|
|
93
|
-
description: 'The id of the input element. Use this prop to make label and helperText accessible for screen readers.',
|
|
94
|
-
control: { type: 'text' },
|
|
95
|
-
table: {
|
|
96
|
-
type: { summary: 'string' }
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
inputProps: {
|
|
100
|
-
description: 'Attributes applied to the input element.',
|
|
101
|
-
control: { type: 'object' },
|
|
102
|
-
table: {
|
|
103
|
-
type: { summary: 'object' }
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
InputProps: {
|
|
107
|
-
description: 'Props applied to the Input element. It will be a FilledInput, OutlinedInput or Input component depending on the variant prop value.',
|
|
108
|
-
control: { type: 'object' },
|
|
109
|
-
table: {
|
|
110
|
-
type: { summary: 'object' }
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
inputRef: {
|
|
114
|
-
description: 'Pass a ref to the input element.',
|
|
115
|
-
control: { type: 'ref' },
|
|
116
|
-
table: {
|
|
117
|
-
type: { summary: 'ref' }
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
label: {
|
|
121
|
-
description: 'The label content.',
|
|
122
|
-
control: { type: 'node' },
|
|
123
|
-
table: {
|
|
124
|
-
type: { summary: 'node' }
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
margin: {
|
|
128
|
-
options: ['dense', 'none', 'normal'],
|
|
129
|
-
description: 'If dense or normal, will adjust vertical spacing of this and contained components.',
|
|
130
|
-
control: { type: 'radio' },
|
|
131
|
-
table: {
|
|
132
|
-
type: { summary: 'string' },
|
|
133
|
-
defaultValue: { summary: 'none' }
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
maxRows: {
|
|
137
|
-
description: 'Maximum number of rows to display when multiline option is set to true.',
|
|
138
|
-
control: { type: 'number' },
|
|
139
|
-
table: {
|
|
140
|
-
type: { summary: 'number' }
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
minRows: {
|
|
144
|
-
description: 'Minimum number of rows to display when multiline option is set to true.',
|
|
145
|
-
control: { type: 'number' },
|
|
146
|
-
table: {
|
|
147
|
-
type: { summary: 'number' }
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
multiline: {
|
|
151
|
-
control: { type: 'boolean' },
|
|
152
|
-
table: {
|
|
153
|
-
type: { summary: 'boolean' },
|
|
154
|
-
defaultValue: { summary: 'false' }
|
|
155
|
-
},
|
|
156
|
-
description: 'If true, a textarea element is rendered instead of an input.'
|
|
157
|
-
},
|
|
158
|
-
name: {
|
|
159
|
-
description: 'Name attribute of the input element.',
|
|
160
|
-
control: { type: 'text' },
|
|
161
|
-
table: {
|
|
162
|
-
type: { summary: 'string' }
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
onChange: {
|
|
166
|
-
description: 'Callback fired when the value is changed.\n\nSignature:`function(event: object) => void` event: The event source of the callback. You can pull out the new value by accessing `event.target.value` (string).',
|
|
167
|
-
control: { type: 'function' },
|
|
168
|
-
table: {
|
|
169
|
-
type: { summary: 'function' }
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
placeholder: {
|
|
173
|
-
description: 'The short hint displayed in the input before the user enters a value.',
|
|
174
|
-
control: { type: 'text' },
|
|
175
|
-
table: {
|
|
176
|
-
type: { summary: 'string' }
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
required: {
|
|
180
|
-
control: { type: 'boolean' },
|
|
181
|
-
table: {
|
|
182
|
-
type: { summary: 'boolean' },
|
|
183
|
-
defaultValue: { summary: 'false' }
|
|
184
|
-
},
|
|
185
|
-
description: 'If true, the label is displayed as required and the input element is required.'
|
|
186
|
-
},
|
|
187
|
-
rows: {
|
|
188
|
-
description: 'Number of rows to display when multiline option is set to true.',
|
|
189
|
-
control: { type: 'number' },
|
|
190
|
-
table: {
|
|
191
|
-
type: { summary: 'number' }
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
SelectProps: {
|
|
195
|
-
description: 'Props applied to the Select element.',
|
|
196
|
-
control: { type: 'object' },
|
|
197
|
-
table: {
|
|
198
|
-
type: { summary: 'object' }
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
select: {
|
|
202
|
-
control: { type: 'boolean' },
|
|
203
|
-
table: {
|
|
204
|
-
type: { summary: 'boolean' },
|
|
205
|
-
defaultValue: { summary: 'false' }
|
|
206
|
-
},
|
|
207
|
-
description: 'Render a Select element while passing the Input element to Select as input parameter. If this option is set you must pass the options of the select as children.'
|
|
208
|
-
},
|
|
209
|
-
size: {
|
|
210
|
-
options: ['medium', 'small'],
|
|
211
|
-
description: 'The size of the component.',
|
|
212
|
-
control: { type: 'radio' },
|
|
213
|
-
table: {
|
|
214
|
-
type: { summary: 'string' }
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
sx: {
|
|
218
|
-
options: ['Array<func | object | bool>', 'func', 'object'],
|
|
219
|
-
description: 'The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.',
|
|
220
|
-
table: {
|
|
221
|
-
type: { summary: 'string' }
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
type: {
|
|
225
|
-
description: 'Type of the input element. It should be a valid HTML5 input type.',
|
|
226
|
-
control: { type: 'text' },
|
|
227
|
-
table: {
|
|
228
|
-
type: { summary: 'string' }
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
value: {
|
|
232
|
-
description: 'The value of the input element, required for a controlled component.',
|
|
233
|
-
table: {
|
|
234
|
-
type: { summary: 'any' }
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
variant: {
|
|
238
|
-
options: ['filled', 'outlined', 'standard'],
|
|
239
|
-
description: 'The variant to use. @TODO: Learning Pool default is outlined, and the TextField component is extending the OutlinedInput variant so we don\'t encourage or support the other variant types for TextField.',
|
|
240
|
-
control: { type: 'radio' },
|
|
241
|
-
table: {
|
|
242
|
-
type: { summary: 'string' },
|
|
243
|
-
defaultValue: { summary: 'outlined' }
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
parameters: {
|
|
248
|
-
controls: {
|
|
249
|
-
sort: 'requiredFirst'
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
// addons: {
|
|
253
|
-
// panelPosition: 'right'
|
|
254
|
-
// }
|
|
255
|
-
} as ComponentMeta<typeof TextField>
|
|
256
|
-
|
|
257
|
-
// 👇 We create a “template” of how args map to rendering
|
|
258
|
-
const Template: ComponentStory<typeof TextField> = (args) => <TextField {...args} />
|
|
259
|
-
|
|
260
|
-
export const Properties = Template.bind({})
|
|
261
|
-
Properties.args = {}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import ToggleButton from '../../../../lib/components/atoms/ToggleButton/ToggleButton';
|
|
3
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
4
|
-
import Chip from '@mui/material/Chip';
|
|
5
|
-
|
|
6
|
-
<Meta title="Components/Inputs/ToggleButton/Accessibility" />
|
|
7
|
-
|
|
8
|
-
[](#ToggleButton-accessibility)ToggleButton Accessibility <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Inputs/ToggleButton/Accessibility.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
9
|
-
=================================================================================
|
|
10
|
-
|
|
11
|
-
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.
|
|
12
|
-
|
|
13
|
-
Please follow the guidance in this section and see [WAI-ARIA](https://www.w3.org/TR/wai-aria-practices/) for more information.
|
|
14
|
-
|
|
15
|
-
## [](#guidelines)Guidelines
|
|
16
|
-
* A ToggleButton should have a clear and concise label provided with `aria-label`, `aria-labelledby` or `<label>`.
|
|
17
|
-
* ToggleButton sets `aria-pressed="<bool>"` according to the button state. You should label each button with `aria-label`.
|
|
18
|
-
|
|
19
|
-
### [](#when-to-use-this-component)When to use this component
|
|
20
|
-
Use a ToggleButton when you want to group or emphasize related options.
|
|
21
|
-
|
|
22
|
-
### [](#screen-readers)Screen readers
|
|
23
|
-
All ToggleButtons should have a label. The easiest way is with an `aria-label`.
|
|
24
|
-
<Canvas isExpanded>
|
|
25
|
-
<ToggleButton aria-label="label">ToggleButton</ToggleButton>
|
|
26
|
-
</Canvas>
|
|
27
|
-
|
|
28
|
-
You can also use a linked description with `aria-labelledby`.
|
|
29
|
-
<Canvas isExpanded>
|
|
30
|
-
<div id="toggle-description">ToggleButton description</div>
|
|
31
|
-
<ToggleButton aria-labelledby="toggle-description">ToggleButton</ToggleButton>
|
|
32
|
-
</Canvas>
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import { Stack } from '@mui/material'
|
|
4
|
-
import ToggleButton from '../../../../lib/components/atoms/ToggleButton/ToggleButton'
|
|
5
|
-
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'
|
|
6
|
-
import FormatAlignLeftIcon from '@mui/icons-material/FormatAlignLeft'
|
|
7
|
-
import FormatAlignCenterIcon from '@mui/icons-material/FormatAlignCenter'
|
|
8
|
-
import FormatAlignRightIcon from '@mui/icons-material/FormatAlignRight'
|
|
9
|
-
import FormatAlignJustifyIcon from '@mui/icons-material/FormatAlignJustify'
|
|
10
|
-
import FormatBoldIcon from '@mui/icons-material/FormatBold'
|
|
11
|
-
import FormatItalicIcon from '@mui/icons-material/FormatItalic'
|
|
12
|
-
import FormatUnderlinedIcon from '@mui/icons-material/FormatUnderlined'
|
|
13
|
-
import FormatColorFillIcon from '@mui/icons-material/FormatColorFill'
|
|
14
|
-
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'
|
|
15
|
-
|
|
16
|
-
const ToggleButtonGrid = (args: any): JSX.Element => {
|
|
17
|
-
const [alignment, setAlignment] = React.useState<string | null>('left')
|
|
18
|
-
|
|
19
|
-
const handleAlignment = (
|
|
20
|
-
event: React.MouseEvent<HTMLElement>,
|
|
21
|
-
newAlignment: string | null
|
|
22
|
-
): void => {
|
|
23
|
-
setAlignment(newAlignment)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const [formats, setFormats] = React.useState(() => ['bold', 'italic'])
|
|
27
|
-
|
|
28
|
-
const handleFormat = (
|
|
29
|
-
event: React.MouseEvent<HTMLElement>,
|
|
30
|
-
newFormats: string[]
|
|
31
|
-
): void => {
|
|
32
|
-
setFormats(newFormats)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<>
|
|
37
|
-
<ToggleButtonGroup
|
|
38
|
-
{...args}
|
|
39
|
-
value={alignment}
|
|
40
|
-
exclusive
|
|
41
|
-
onChange={handleAlignment}
|
|
42
|
-
aria-label="text alignment"
|
|
43
|
-
color="primary"
|
|
44
|
-
>
|
|
45
|
-
<ToggleButton {...args} value="left" aria-label="left aligned">
|
|
46
|
-
<FormatAlignLeftIcon />
|
|
47
|
-
</ToggleButton>
|
|
48
|
-
<ToggleButton {...args} value="center" aria-label="centered">
|
|
49
|
-
<FormatAlignCenterIcon />
|
|
50
|
-
</ToggleButton>
|
|
51
|
-
<ToggleButton {...args} value="right" aria-label="right aligned">
|
|
52
|
-
<FormatAlignRightIcon />
|
|
53
|
-
</ToggleButton>
|
|
54
|
-
<ToggleButton {...args} value="justify" aria-label="justified" disabled>
|
|
55
|
-
<FormatAlignJustifyIcon />
|
|
56
|
-
</ToggleButton>
|
|
57
|
-
</ToggleButtonGroup>
|
|
58
|
-
|
|
59
|
-
<ToggleButtonGroup
|
|
60
|
-
{...args}
|
|
61
|
-
value={formats}
|
|
62
|
-
onChange={handleFormat}
|
|
63
|
-
aria-label="text formatting"
|
|
64
|
-
color="primary"
|
|
65
|
-
>
|
|
66
|
-
<ToggleButton {...args} value="bold" aria-label="bold">
|
|
67
|
-
<FormatBoldIcon />
|
|
68
|
-
</ToggleButton>
|
|
69
|
-
<ToggleButton {...args} value="italic" aria-label="italic">
|
|
70
|
-
<FormatItalicIcon />
|
|
71
|
-
</ToggleButton>
|
|
72
|
-
<ToggleButton {...args} value="underlined" aria-label="underlined">
|
|
73
|
-
<FormatUnderlinedIcon />
|
|
74
|
-
</ToggleButton>
|
|
75
|
-
<ToggleButton {...args} value="color" aria-label="color" disabled>
|
|
76
|
-
<FormatColorFillIcon />
|
|
77
|
-
<ArrowDropDownIcon />
|
|
78
|
-
</ToggleButton>
|
|
79
|
-
</ToggleButtonGroup>
|
|
80
|
-
</>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export default function AllCombinations (): JSX.Element {
|
|
85
|
-
const combinations = [
|
|
86
|
-
{ color: 'primary', size: 'small' },
|
|
87
|
-
{ color: 'primary' },
|
|
88
|
-
{ color: 'primary', size: 'large' },
|
|
89
|
-
{ color: 'secondary', size: 'small' },
|
|
90
|
-
{ color: 'secondary' },
|
|
91
|
-
{ color: 'secondary', size: 'large' },
|
|
92
|
-
{ color: 'error', size: 'small' },
|
|
93
|
-
{ color: 'error' },
|
|
94
|
-
{ color: 'error', size: 'large' },
|
|
95
|
-
{ color: 'success', size: 'small' },
|
|
96
|
-
{ color: 'success' },
|
|
97
|
-
{ color: 'success', size: 'large' },
|
|
98
|
-
{ color: 'info', size: 'small' },
|
|
99
|
-
{ color: 'info' },
|
|
100
|
-
{ color: 'info', size: 'large' },
|
|
101
|
-
{ color: 'warning', size: 'small' },
|
|
102
|
-
{ color: 'warning' },
|
|
103
|
-
{ color: 'warning', size: 'large' }
|
|
104
|
-
]
|
|
105
|
-
|
|
106
|
-
return (
|
|
107
|
-
<Stack sx={{ width: '100%' }} spacing={2}>
|
|
108
|
-
{combinations.map(toggleButtonConfig => (
|
|
109
|
-
<ToggleButtonGrid {...toggleButtonConfig} />
|
|
110
|
-
))}
|
|
111
|
-
</Stack>
|
|
112
|
-
)
|
|
113
|
-
}
|