@learningpool/ui 1.6.2 → 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 -11
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.d.ts +1 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.js +14 -14
- 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 -13
- 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 -392
- package/src/lib/components/stream/AppSwitcher/AppSwitcherItem.tsx +0 -83
- 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,213 +0,0 @@
|
|
|
1
|
-
import { Box, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@mui/material'
|
|
2
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
3
|
-
import * as React from 'react'
|
|
4
|
-
import { DOCS } from '../../../../docs'
|
|
5
|
-
import Switch from '../../../../lib/components/atoms/Switch/Switch'
|
|
6
|
-
import AllCombinations from './AllCombinations'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Components/Inputs/Switch/Examples',
|
|
10
|
-
component: Switch
|
|
11
|
-
} as ComponentMeta<typeof Switch>
|
|
12
|
-
|
|
13
|
-
export const Default: ComponentStory<typeof Switch> = (args): JSX.Element => {
|
|
14
|
-
const label = { inputProps: { 'aria-label': 'Switch description here' } }
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<>
|
|
18
|
-
<Switch {...label} defaultChecked />
|
|
19
|
-
<Switch {...label} />
|
|
20
|
-
<Switch {...label} disabled defaultChecked />
|
|
21
|
-
<Switch {...label} disabled />
|
|
22
|
-
</>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
Default.parameters = {
|
|
26
|
-
docs: {
|
|
27
|
-
description: {
|
|
28
|
-
component: DOCS.Switch.Default
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export const Label: ComponentStory<typeof Switch> = (args): JSX.Element => {
|
|
34
|
-
return (
|
|
35
|
-
<FormGroup>
|
|
36
|
-
<FormControlLabel control={<Switch defaultChecked />} label="Default switch description" />
|
|
37
|
-
<FormControlLabel disabled control={<Switch />} label="Disabled switch description" />
|
|
38
|
-
</FormGroup>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
Label.parameters = {
|
|
42
|
-
docs: {
|
|
43
|
-
description: {
|
|
44
|
-
story: DOCS.Switch.Label
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const Sizes: ComponentStory<typeof Switch> = (args): JSX.Element => {
|
|
50
|
-
const label = { inputProps: { 'aria-label': 'Switch description here' } }
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<Box>
|
|
54
|
-
<Switch {...label} defaultChecked size="small" />
|
|
55
|
-
<Switch {...label} defaultChecked />
|
|
56
|
-
<Switch
|
|
57
|
-
{...label}
|
|
58
|
-
defaultChecked
|
|
59
|
-
sx={{ '& .MuiSvgIcon-root': { fontSize: 28 } }}
|
|
60
|
-
/>
|
|
61
|
-
</Box>
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
Sizes.parameters = {
|
|
65
|
-
docs: {
|
|
66
|
-
description: {
|
|
67
|
-
story: DOCS.Switch.Sizes
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export const Colors: ComponentStory<typeof Switch> = (args): JSX.Element => {
|
|
73
|
-
const label = { inputProps: { 'aria-label': 'Switch description here' } }
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<Box>
|
|
77
|
-
<Switch {...label} defaultChecked color="default" />
|
|
78
|
-
<Switch {...label} defaultChecked />
|
|
79
|
-
<Switch {...label} defaultChecked color="secondary" />
|
|
80
|
-
<Switch {...label} defaultChecked color="warning" />
|
|
81
|
-
<Switch {...label} defaultChecked color="success" />
|
|
82
|
-
</Box>
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
Colors.parameters = {
|
|
86
|
-
docs: {
|
|
87
|
-
description: {
|
|
88
|
-
story: DOCS.Switch.Colors
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export const Controlled: ComponentStory<typeof Switch> = (args): JSX.Element => {
|
|
94
|
-
const [checked, setChecked] = React.useState(true)
|
|
95
|
-
|
|
96
|
-
const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
97
|
-
setChecked(event.target.checked)
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<Switch
|
|
102
|
-
checked={checked}
|
|
103
|
-
onChange={handleChange}
|
|
104
|
-
inputProps={{ 'aria-label': 'Controlled switch description' }}
|
|
105
|
-
/>
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
Controlled.parameters = {
|
|
109
|
-
docs: {
|
|
110
|
-
description: {
|
|
111
|
-
story: DOCS.Switch.Controlled
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export const SwitchesGroup: ComponentStory<typeof Switch> = (args): JSX.Element => {
|
|
117
|
-
const [state, setState] = React.useState({
|
|
118
|
-
gilad: true,
|
|
119
|
-
jason: false,
|
|
120
|
-
antoine: true
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
124
|
-
setState({
|
|
125
|
-
...state,
|
|
126
|
-
[event.target.name]: event.target.checked
|
|
127
|
-
})
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return (
|
|
131
|
-
<FormControl component="fieldset" variant="standard">
|
|
132
|
-
<FormLabel component="legend">Assign responsibility</FormLabel>
|
|
133
|
-
<FormGroup>
|
|
134
|
-
<FormControlLabel
|
|
135
|
-
control={
|
|
136
|
-
<Switch checked={state.gilad} onChange={handleChange} name="gilad" />
|
|
137
|
-
}
|
|
138
|
-
label="Gilad Gray"
|
|
139
|
-
/>
|
|
140
|
-
<FormControlLabel
|
|
141
|
-
control={
|
|
142
|
-
<Switch checked={state.jason} onChange={handleChange} name="jason" />
|
|
143
|
-
}
|
|
144
|
-
label="Jason Killian"
|
|
145
|
-
/>
|
|
146
|
-
<FormControlLabel
|
|
147
|
-
control={
|
|
148
|
-
<Switch checked={state.antoine} onChange={handleChange} name="antoine" />
|
|
149
|
-
}
|
|
150
|
-
label="Antoine Llorca"
|
|
151
|
-
/>
|
|
152
|
-
</FormGroup>
|
|
153
|
-
<FormHelperText>Be careful</FormHelperText>
|
|
154
|
-
</FormControl>
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
SwitchesGroup.parameters = {
|
|
158
|
-
docs: {
|
|
159
|
-
description: {
|
|
160
|
-
story: DOCS.Switch.SwitchesGroup
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export const LabelPosition: ComponentStory<typeof Switch> = (args): JSX.Element => (
|
|
166
|
-
<FormControl component="fieldset">
|
|
167
|
-
<FormLabel component="legend">Label placement</FormLabel>
|
|
168
|
-
<FormGroup aria-label="position" row>
|
|
169
|
-
<FormControlLabel
|
|
170
|
-
value="top"
|
|
171
|
-
control={<Switch color="primary" />}
|
|
172
|
-
label="Top"
|
|
173
|
-
labelPlacement="top"
|
|
174
|
-
/>
|
|
175
|
-
<FormControlLabel
|
|
176
|
-
value="start"
|
|
177
|
-
control={<Switch color="primary" />}
|
|
178
|
-
label="Start"
|
|
179
|
-
labelPlacement="start"
|
|
180
|
-
/>
|
|
181
|
-
<FormControlLabel
|
|
182
|
-
value="bottom"
|
|
183
|
-
control={<Switch color="primary" />}
|
|
184
|
-
label="Bottom"
|
|
185
|
-
labelPlacement="bottom"
|
|
186
|
-
/>
|
|
187
|
-
<FormControlLabel
|
|
188
|
-
value="end"
|
|
189
|
-
control={<Switch color="primary" />}
|
|
190
|
-
label="End"
|
|
191
|
-
labelPlacement="end"
|
|
192
|
-
/>
|
|
193
|
-
</FormGroup>
|
|
194
|
-
</FormControl>
|
|
195
|
-
)
|
|
196
|
-
LabelPosition.parameters = {
|
|
197
|
-
docs: {
|
|
198
|
-
description: {
|
|
199
|
-
story: DOCS.Switch.LabelPosition
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export const All: ComponentStory<typeof AllCombinations> = (args): JSX.Element => (
|
|
205
|
-
<AllCombinations />
|
|
206
|
-
)
|
|
207
|
-
All.parameters = {
|
|
208
|
-
docs: {
|
|
209
|
-
description: {
|
|
210
|
-
story: DOCS.Switch.All
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import Switch from '../../../../lib/components/atoms/Switch/Switch';
|
|
3
|
-
import { MUIIcon, MaterialDesignIcon, W3CIcon, FigmaIcon, GithubIcon } from '../../../utils/CustomIcons';
|
|
4
|
-
import Chip from '@mui/material/Chip';
|
|
5
|
-
import Stack from '@mui/material/Stack';
|
|
6
|
-
|
|
7
|
-
<Meta title="Components/Inputs/Switch/Overview" component={Switch} />
|
|
8
|
-
|
|
9
|
-
[](#switch-overview)Switch Overview <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Inputs/Switch/Overview.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
10
|
-
=================================================================================
|
|
11
|
-
|
|
12
|
-
### [](#what-does-it-do)What does it do?
|
|
13
|
-
|
|
14
|
-
A toggle switch is used to quickly change between two possible states, such as on/off. A switch has an associated label that should clearly describe the option.
|
|
15
|
-
|
|
16
|
-
<Stack direction="row" spacing={1}>
|
|
17
|
-
<Chip clickable component="a" href="https://mui.com/components/switches/" size="small" icon={<MUIIcon viewBox="-5 0 40 30" />} label="Material UI" variant="outlined" />
|
|
18
|
-
<Chip clickable component="a" href="https://material.io/components/selection-controls#switches" size="small" icon={<MaterialDesignIcon />} label="Material Design" variant="outlined" />
|
|
19
|
-
<Chip clickable component="a" href="https://www.figma.com/proto/mBDuFn79U8wQIIEoCGpMew/DS%3A-Component-Library?node-id=1059%3A17697&scaling=min-zoom&page-id=1059%3A17118&starting-point-node-id=1059%3A17697" size="small" icon={<FigmaIcon />} label="Figma" variant="outlined" />
|
|
20
|
-
<Chip clickable component="a" href="https://github.com/HT2-Labs/design-system/tree/main/src/lib/components/atoms/Switch" size="small" icon={<GithubIcon />} label="Github" variant="outlined" />
|
|
21
|
-
</Stack>
|
|
22
|
-
|
|
23
|
-
### [](#why-use-it)Why use it?
|
|
24
|
-
|
|
25
|
-
* A switch represents a physical switch that allows users to toggle things on or off, like a light switch.
|
|
26
|
-
* Use a switch when an instant response of applied settings is required without an explicit action.
|
|
27
|
-
* Use a switch when a user is toggling independent features or behaviors.
|
|
28
|
-
* Switches are the preferred way to adjust settings on mobile.
|
|
29
|
-
|
|
30
|
-
Understanding [Switch vs Checkbox](https://uxplanet.org/checkbox-vs-toggle-switch-7fc6e83f10b8)
|
|
31
|
-
|
|
32
|
-
### [](#how-to-implement-it)How to implement it?
|
|
33
|
-
|
|
34
|
-
Below is an overview of the basic Switch component:
|
|
35
|
-
|
|
36
|
-
<Canvas isExpanded>
|
|
37
|
-
<Switch label="Default Checked" defaultChecked />
|
|
38
|
-
<Switch label="Default" />
|
|
39
|
-
<Switch label="Disabled" disabled defaultChecked />
|
|
40
|
-
<Switch label="Disabled Checked" disabled />
|
|
41
|
-
</Canvas>
|
|
42
|
-
|
|
43
|
-
### [](#when-to-avoid-it)When to avoid it?
|
|
44
|
-
|
|
45
|
-
* Do not use a switch when multiple options are available and the user has to select one or more options.
|
|
46
|
-
* Do not use a switch when a user has to selected option(s) from a list of related items.
|
|
47
|
-
* Do not use a switch when requiring a user's consent (such as accepting terms and conditions); use a Checkbox instead.
|
|
48
|
-
|
|
49
|
-
### [](#best-practices)Best practices
|
|
50
|
-
|
|
51
|
-
* Ensure that switches have a clear and concise label that describes the option.
|
|
52
|
-
* Switches should not require a review or confirmation following a change.
|
|
53
|
-
* You can easily provide a label to the Switch with the `FormControlLabel` component.
|
|
54
|
-
|
|
55
|
-
### [](#design-prototype)Design prototype
|
|
56
|
-
<iframe
|
|
57
|
-
allowfullscreen
|
|
58
|
-
frameborder="0"
|
|
59
|
-
height="350"
|
|
60
|
-
width="100%"
|
|
61
|
-
src="https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/proto/mBDuFn79U8wQIIEoCGpMew/DS%3A-Component-Library?node-id=1059%3A17697&scaling=min-zoom&page-id=1059%3A17118&starting-point-node-id=1059%3A17697"
|
|
62
|
-
/>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import Switch from '../../../../lib/components/atoms/Switch/Switch'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Inputs/Switch/Properties',
|
|
7
|
-
component: Switch,
|
|
8
|
-
parameters: {
|
|
9
|
-
controls: {
|
|
10
|
-
sort: 'requiredFirst'
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
addons: {
|
|
14
|
-
panelPosition: 'right'
|
|
15
|
-
}
|
|
16
|
-
} as ComponentMeta<typeof Switch>
|
|
17
|
-
|
|
18
|
-
// 👇 We create a “template” of how args map to rendering
|
|
19
|
-
const Template: ComponentStory<typeof Switch> = (args) => <Switch {...args} />
|
|
20
|
-
|
|
21
|
-
export const Properties = Template.bind({})
|
|
22
|
-
Properties.args = {}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import TextField from '../../../../lib/components/atoms/TextField/TextField';
|
|
3
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
4
|
-
import Chip from '@mui/material/Chip';
|
|
5
|
-
|
|
6
|
-
<Meta title="Components/Inputs/TextField/Accessibility" />
|
|
7
|
-
|
|
8
|
-
[](#textfield-accessibility)TextField Accessibility <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Inputs/TextField/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 [[ADD RESOURCE HERE]](https://www.w3.org/TR/wai-aria-practices/) for more information.
|
|
14
|
-
|
|
15
|
-
## [](#guidelines)Guidelines
|
|
16
|
-
* Labels should be visible when an input gets focus.
|
|
17
|
-
* Labels must be announced by screen reader on focus.
|
|
18
|
-
* Text fields must have a clear and concise description provided by it's associated `<label>` element.
|
|
19
|
-
* If the text field is required, include the `aria-required` property to indicate that it'a a required field.
|
|
20
|
-
* Use a clear validation message for input errors.
|
|
21
|
-
|
|
22
|
-
### [](#screen-readers)Screen readers
|
|
23
|
-
The TextField wrapper component is a complete form control including a label, input, and help text. In order for the text field to be accessible, the input is automatically linked to the label and the helper text.
|
|
24
|
-
|
|
25
|
-
*Be sure to provide a unique ID and label for the input.*
|
|
26
|
-
|
|
27
|
-
<Canvas>
|
|
28
|
-
<TextField id="unique-id-here" label="Input description"/>
|
|
29
|
-
</Canvas>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { Box } from '@mui/material'
|
|
3
|
-
import TextField from '../../../../lib/components/atoms/TextField/TextField'
|
|
4
|
-
|
|
5
|
-
const TextFieldGrid = (args: any): JSX.Element => {
|
|
6
|
-
return (
|
|
7
|
-
<Box
|
|
8
|
-
component="form"
|
|
9
|
-
sx={{
|
|
10
|
-
'& > :not(style)': { m: 1, width: '25ch' }
|
|
11
|
-
}}
|
|
12
|
-
noValidate
|
|
13
|
-
autoComplete="off"
|
|
14
|
-
>
|
|
15
|
-
{[
|
|
16
|
-
{ focused: true },
|
|
17
|
-
{ helperText: 'Enter some text', focused: true },
|
|
18
|
-
{ value: 'Hello world', helperText: 'Valid entry', focused: true }
|
|
19
|
-
].map((selectItem, index) => {
|
|
20
|
-
return (
|
|
21
|
-
<TextField
|
|
22
|
-
{...selectItem}
|
|
23
|
-
{...args}
|
|
24
|
-
id={`outlined-basic-${index}`}
|
|
25
|
-
label="Outlined"
|
|
26
|
-
variant="outlined"
|
|
27
|
-
/>
|
|
28
|
-
)
|
|
29
|
-
})}
|
|
30
|
-
</Box>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default function AllCombinations (): JSX.Element {
|
|
35
|
-
const combinations = [
|
|
36
|
-
{ color: 'primary' },
|
|
37
|
-
{ color: 'primary', size: 'small' },
|
|
38
|
-
{ color: 'secondary' },
|
|
39
|
-
{ color: 'secondary', size: 'small' },
|
|
40
|
-
{ color: 'error' },
|
|
41
|
-
{ color: 'error', size: 'small' },
|
|
42
|
-
{ color: 'success' },
|
|
43
|
-
{ color: 'success', size: 'small' },
|
|
44
|
-
{ color: 'info' },
|
|
45
|
-
{ color: 'info', size: 'small' },
|
|
46
|
-
{ color: 'warning' },
|
|
47
|
-
{ color: 'warning', size: 'small' }
|
|
48
|
-
]
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<Box>
|
|
52
|
-
{combinations.map(textFieldConfig => (
|
|
53
|
-
<TextFieldGrid {...textFieldConfig} />
|
|
54
|
-
))}
|
|
55
|
-
</Box>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import { DOCS } from '../../../../docs'
|
|
4
|
-
import TextField from '../../../../lib/components/atoms/TextField/TextField'
|
|
5
|
-
import AllCombinations from './AllCombinations'
|
|
6
|
-
import Box from '@mui/material/Box'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Components/Inputs/TextField/Examples',
|
|
10
|
-
component: TextField
|
|
11
|
-
} as ComponentMeta<typeof TextField>
|
|
12
|
-
|
|
13
|
-
export const Basic: ComponentStory<typeof TextField> = (args) => (
|
|
14
|
-
<TextField id="outlined-basic" label="Outlined" variant="outlined" />
|
|
15
|
-
)
|
|
16
|
-
Basic.parameters = {
|
|
17
|
-
docs: {
|
|
18
|
-
description: {
|
|
19
|
-
component: DOCS.TextField.Basic
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
controls: {
|
|
23
|
-
// exclude: /[a-zA-Z0-9]*/,
|
|
24
|
-
// hideNoControlsWarning: true
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const Validation: ComponentStory<typeof TextField> = (args) => (
|
|
29
|
-
<Box
|
|
30
|
-
component="form"
|
|
31
|
-
sx={{
|
|
32
|
-
'& .MuiTextField-root': { m: 1, width: '25ch' }
|
|
33
|
-
}}
|
|
34
|
-
noValidate
|
|
35
|
-
autoComplete="off"
|
|
36
|
-
>
|
|
37
|
-
<div>
|
|
38
|
-
<TextField
|
|
39
|
-
variant="outlined"
|
|
40
|
-
error
|
|
41
|
-
id="outlined-error"
|
|
42
|
-
label="Error"
|
|
43
|
-
defaultValue="Hello World"
|
|
44
|
-
/>
|
|
45
|
-
<TextField
|
|
46
|
-
variant="outlined"
|
|
47
|
-
error
|
|
48
|
-
id="outlined-error-helper-text"
|
|
49
|
-
label="Error"
|
|
50
|
-
defaultValue="Hello World"
|
|
51
|
-
helperText="Incorrect entry."
|
|
52
|
-
/>
|
|
53
|
-
</div>
|
|
54
|
-
</Box>
|
|
55
|
-
)
|
|
56
|
-
Validation.parameters = {
|
|
57
|
-
docs: {
|
|
58
|
-
description: {
|
|
59
|
-
story: DOCS.TextField.Validation
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export const Sizes: ComponentStory<typeof TextField> = (args) => (
|
|
65
|
-
<Box
|
|
66
|
-
component="form"
|
|
67
|
-
sx={{
|
|
68
|
-
'& .MuiTextField-root': { m: 1, width: '25ch' }
|
|
69
|
-
}}
|
|
70
|
-
noValidate
|
|
71
|
-
autoComplete="off"
|
|
72
|
-
>
|
|
73
|
-
<div>
|
|
74
|
-
<TextField
|
|
75
|
-
variant="outlined"
|
|
76
|
-
label="Size"
|
|
77
|
-
id="outlined-size-small"
|
|
78
|
-
defaultValue="Small"
|
|
79
|
-
size="small"
|
|
80
|
-
/>
|
|
81
|
-
<TextField variant="outlined" label="Size" id="outlined-size-normal" defaultValue="Normal" />
|
|
82
|
-
</div>
|
|
83
|
-
</Box>
|
|
84
|
-
)
|
|
85
|
-
Sizes.parameters = {
|
|
86
|
-
docs: {
|
|
87
|
-
description: {
|
|
88
|
-
story: DOCS.TextField.Sizes
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export const Colors: ComponentStory<typeof TextField> = (args) => (
|
|
94
|
-
<Box
|
|
95
|
-
component="form"
|
|
96
|
-
sx={{
|
|
97
|
-
'& > :not(style)': { m: 1, width: '25ch' }
|
|
98
|
-
}}
|
|
99
|
-
noValidate
|
|
100
|
-
autoComplete="off"
|
|
101
|
-
>
|
|
102
|
-
<TextField variant="outlined" label="Outlined primary" color="primary" focused />
|
|
103
|
-
<TextField variant="outlined" label="Outlined secondary" color="secondary" focused />
|
|
104
|
-
<TextField variant="outlined" label="Outlined error" color="error" focused />
|
|
105
|
-
<TextField variant="outlined" label="Outlined success" color="success" focused />
|
|
106
|
-
<TextField variant="outlined" label="Outlined info" color="info" focused />
|
|
107
|
-
<TextField variant="outlined" label="Outlined warning" color="warning" focused />
|
|
108
|
-
</Box>
|
|
109
|
-
)
|
|
110
|
-
Colors.parameters = {
|
|
111
|
-
docs: {
|
|
112
|
-
description: {
|
|
113
|
-
story: DOCS.TextField.Colors
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export const All: ComponentStory<typeof AllCombinations> = (args) => (
|
|
119
|
-
<AllCombinations />
|
|
120
|
-
)
|
|
121
|
-
All.parameters = {
|
|
122
|
-
docs: {
|
|
123
|
-
description: {
|
|
124
|
-
story: DOCS.TextField.All
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import TextField from '../../../../lib/components/atoms/TextField/TextField';
|
|
3
|
-
import { MUIIcon, MaterialDesignIcon, W3CIcon, FigmaIcon, GithubIcon } from '../../../utils/CustomIcons';
|
|
4
|
-
import Box from '@mui/material/Box';
|
|
5
|
-
import Chip from '@mui/material/Chip';
|
|
6
|
-
import Stack from '@mui/material/Stack';
|
|
7
|
-
|
|
8
|
-
<Meta title="Components/Inputs/TextField/Overview" component={TextField} />
|
|
9
|
-
|
|
10
|
-
[](#textfield-overview)TextField Overview <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Inputs/TextField/Overview.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
11
|
-
=================================================================================
|
|
12
|
-
|
|
13
|
-
### [](#what-does-it-do)What does it do?
|
|
14
|
-
|
|
15
|
-
Text fields let users enter and edit text.
|
|
16
|
-
Switches toggle the state of a single setting on or off. A switch has an associated label that should clearly describe the option.
|
|
17
|
-
|
|
18
|
-
<Stack direction="row" spacing={1}>
|
|
19
|
-
<Chip clickable component="a" href="https://mui.com/components/text-fields/" size="small" icon={<MUIIcon viewBox="-5 0 40 30" />} label="Material UI" variant="outlined" />
|
|
20
|
-
<Chip clickable component="a" href="https://material.io/components/text-fields" size="small" icon={<MaterialDesignIcon />} label="Material Design" variant="outlined" />
|
|
21
|
-
<Chip clickable component="a" href="https://www.figma.com/proto/mBDuFn79U8wQIIEoCGpMew/DS%3A-Component-Library?node-id=1059%3A17697&scaling=min-zoom&page-id=1059%3A17118&starting-point-node-id=1059%3A17697" size="small" icon={<FigmaIcon />} label="Figma" variant="outlined" />
|
|
22
|
-
<Chip clickable component="a" href="https://github.com/HT2-Labs/design-system/tree/main/src/lib/components/atoms/TextField" size="small" icon={<GithubIcon />} label="Github" variant="outlined" />
|
|
23
|
-
</Stack>
|
|
24
|
-
|
|
25
|
-
### [](#why-use-it)Why use it?
|
|
26
|
-
|
|
27
|
-
* Use text fields to allow users to enter text into a UI.
|
|
28
|
-
* Text fields are typically used in forms and dialogs.
|
|
29
|
-
* Use a text field for collecting information such as name, email address, phone number, and address.
|
|
30
|
-
|
|
31
|
-
### [](#how-to-implement-it)How to implement it?
|
|
32
|
-
|
|
33
|
-
The TextField wrapper component is a complete form control including a label, input, and help text. It comes with three variants: outlined (default), filled, and standard.
|
|
34
|
-
|
|
35
|
-
<Canvas isExpanded>
|
|
36
|
-
<TextField id="outlined-basic" label="Outlined" variant="outlined" />
|
|
37
|
-
<TextField id="filled-basic" label="Filled" variant="filled" />
|
|
38
|
-
<TextField id="standard-basic" label="Standard" variant="standard" />
|
|
39
|
-
</Canvas>
|
|
40
|
-
|
|
41
|
-
*The standard variant of the TextField is no longer documented in the Material Design guidelines ([here's why](https://medium.com/google-design/the-evolution-of-material-designs-text-fields-603688b3fe03)), but MUI will continue to support it.*
|
|
42
|
-
|
|
43
|
-
### [](#when-to-avoid-it)When to avoid it?
|
|
44
|
-
|
|
45
|
-
* Do not use a text field for multiple lines inputs; use the Text Area component instead.
|
|
46
|
-
|
|
47
|
-
### [](#best-practices)Best practices
|
|
48
|
-
|
|
49
|
-
* Radio buttons should have the most commonly used option selected by default.
|
|
50
|
-
* When grouping multiple radio buttons, use the [RadioGroup](https://mui.com/api/radio-group/) component.
|
|
51
|
-
* Ensure that all radio buttons have a clear and concise label description.
|
|
52
|
-
|
|
53
|
-
### [](#design-prototype)Design prototype
|
|
54
|
-
<iframe
|
|
55
|
-
allowfullscreen
|
|
56
|
-
frameborder="0"
|
|
57
|
-
height="350"
|
|
58
|
-
width="100%"
|
|
59
|
-
src="https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/proto/mBDuFn79U8wQIIEoCGpMew/DS%3A-Component-Library?node-id=1198%3A19066&scaling=contain&page-id=465%3A11747&starting-point-node-id=1198%3A19066"
|
|
60
|
-
/>
|