@learningpool/ui 1.6.3 → 1.6.6
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 +2 -2
- 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 +1 -1
- 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 +13 -11
- 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 +1 -1
- 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,44 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import { Header } from '../../../../lib/'
|
|
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/Landmarks/Header/Overview" component={Header} />
|
|
8
|
-
|
|
9
|
-
[](#mobile-navigation-overview)Header Overview <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Navigation/Drawer/Overview.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
10
|
-
=================================================================================
|
|
11
|
-
|
|
12
|
-
### [](#what-does-it-do)What does it do?
|
|
13
|
-
|
|
14
|
-
The Header component provides a simple consistent landmark for each page. It supports a title and breadcrumbs to provide location information. It also supports additional information via the subtitle and can allow interactions with the call to action and additional quick actions.
|
|
15
|
-
|
|
16
|
-
<Stack direction="row" spacing={1}>
|
|
17
|
-
<Chip clickable component="a" href="https://www.figma.com/proto/mBDuFn79U8wQIIEoCGpMew/DS%3A-Component-Library?node-id=487%3A14431&scaling=min-zoom&page-id=310%3A35254&starting-point-node-id=487%3A14431" size="small" icon={<FigmaIcon />} label="Figma" variant="outlined" />
|
|
18
|
-
<Chip clickable component="a" href="https://github.com/HT2-Labs/design-system/tree/main/src/lib/components/landmarks/Header" size="small" icon={<GithubIcon />} label="Github" variant="outlined" />
|
|
19
|
-
</Stack>
|
|
20
|
-
|
|
21
|
-
### [](#why-use-it)Why use it?
|
|
22
|
-
|
|
23
|
-
Most websites contain a Header as its a standard landmark, usually containing a Header 1 which is required on each page to meet accessibility standards. The component provided has very litte bells and whistles but tried to provide the basics required in almost all instances. The main reason is consistency across various products, in combination with a consistent navigation each product will feel familiar to our end users. Futher information about the reasons for the header structure can be found in our [Design System documentation](https://learninglocker.atlassian.net/wiki/spaces/PX/pages/3619029045/Header#Rational).
|
|
24
|
-
|
|
25
|
-
### [](#how-to-implement-it)How to implement it?
|
|
26
|
-
|
|
27
|
-
You can see a basic example of the Header component below.
|
|
28
|
-
|
|
29
|
-
<Canvas isExpanded>
|
|
30
|
-
<Story id="components-landmarks-header-examples--overview" />
|
|
31
|
-
</Canvas>
|
|
32
|
-
|
|
33
|
-
### [](#best-practices)Best practices
|
|
34
|
-
|
|
35
|
-
* Use the Header component to provide a consistent and required landmark.
|
|
36
|
-
* Set the title using the `title` prop (required).
|
|
37
|
-
* Optional props for `breadcrumbs`, `subtitle`, `callToAction` and `additionalButtons`.
|
|
38
|
-
|
|
39
|
-
### [](#future-considerations)Future considerations
|
|
40
|
-
|
|
41
|
-
* none
|
|
42
|
-
|
|
43
|
-
### [](#design-prototype)Design prototype
|
|
44
|
-
TODO: Add design prototype
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import Chip from '@mui/material/Chip';
|
|
3
|
-
|
|
4
|
-
<Meta title="Components/Navigation/Drawer/Accessibility" />
|
|
5
|
-
|
|
6
|
-
[](#drawer-accessibility)Drawer Accessibility <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Navigation/Drawer/Accessibility.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
7
|
-
=================================================================================
|
|
8
|
-
|
|
9
|
-
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.
|
|
10
|
-
|
|
11
|
-
## [](#accessibility-guidelines)Guidelines
|
|
12
|
-
* The Drawer component automatically handles the work necessary to make it accessible.
|
|
13
|
-
* Be sure to follow all accessibility guidelines for the elements used within the Drawer.
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import { Drawer, Button } from '../../../../lib/'
|
|
4
|
-
import { Box, List, ListItem, ListItemText, ListItemButton } from '@mui/material'
|
|
5
|
-
import AppsIcon from '@mui/icons-material/Apps'
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Components/Navigation/Drawer/Properties',
|
|
9
|
-
component: Drawer,
|
|
10
|
-
parameters: {
|
|
11
|
-
controls: {
|
|
12
|
-
sort: 'requiredFirst'
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
addons: {
|
|
16
|
-
panelPosition: 'right'
|
|
17
|
-
}
|
|
18
|
-
} as ComponentMeta<typeof Drawer>
|
|
19
|
-
|
|
20
|
-
// 👇 We create a “template” of how args map to rendering
|
|
21
|
-
const Template: ComponentStory<typeof Drawer> = (args) => {
|
|
22
|
-
type Anchor = 'left'
|
|
23
|
-
|
|
24
|
-
const [state, setState] = React.useState({ left: false })
|
|
25
|
-
|
|
26
|
-
const toggleDrawer =
|
|
27
|
-
(anchor: Anchor, open: boolean) =>
|
|
28
|
-
(event: React.KeyboardEvent | React.MouseEvent) => {
|
|
29
|
-
if (
|
|
30
|
-
event.type === 'keydown' &&
|
|
31
|
-
((event as React.KeyboardEvent).key === 'Tab' ||
|
|
32
|
-
(event as React.KeyboardEvent).key === 'Shift')
|
|
33
|
-
) {
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
setState({ ...state, [anchor]: open })
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<>
|
|
42
|
-
<Button aria-label="Toggle Drawer" onClick={toggleDrawer('left', true)}>
|
|
43
|
-
<AppsIcon />
|
|
44
|
-
</Button>
|
|
45
|
-
<Drawer
|
|
46
|
-
anchor={'left'}
|
|
47
|
-
open={state.left}
|
|
48
|
-
onClose={toggleDrawer('left', false)}
|
|
49
|
-
>
|
|
50
|
-
<Box
|
|
51
|
-
sx={{ width: 250 }}
|
|
52
|
-
role="presentation"
|
|
53
|
-
onClick={toggleDrawer('left', false)}
|
|
54
|
-
onKeyDown={toggleDrawer('left', false)}
|
|
55
|
-
>
|
|
56
|
-
<List>
|
|
57
|
-
<ListItem>
|
|
58
|
-
<ListItemButton>
|
|
59
|
-
<ListItemText primary="One" />
|
|
60
|
-
</ListItemButton>
|
|
61
|
-
</ListItem>
|
|
62
|
-
<ListItem>
|
|
63
|
-
<ListItemButton>
|
|
64
|
-
<ListItemText primary="Two" />
|
|
65
|
-
</ListItemButton>
|
|
66
|
-
</ListItem>
|
|
67
|
-
<ListItem>
|
|
68
|
-
<ListItemButton>
|
|
69
|
-
<ListItemText primary="Three" />
|
|
70
|
-
</ListItemButton>
|
|
71
|
-
</ListItem>
|
|
72
|
-
</List>
|
|
73
|
-
</Box>
|
|
74
|
-
</Drawer>
|
|
75
|
-
</>
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export const Properties = Template.bind({})
|
|
80
|
-
Properties.args = {}
|
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import { DOCS } from '../../../../docs'
|
|
4
|
-
import { styled, useTheme } from '@mui/material/styles'
|
|
5
|
-
import { Drawer, Button } from '../../../../lib/'
|
|
6
|
-
import {
|
|
7
|
-
Box, List, ListItem, ListItemButton, Stack,
|
|
8
|
-
ListItemIcon, ListItemText, Divider, CssBaseline,
|
|
9
|
-
Toolbar, Typography, IconButton, AppBar
|
|
10
|
-
} from '@mui/material'
|
|
11
|
-
import MuiAppBar, { AppBarProps as MuiAppBarProps } from '@mui/material/AppBar'
|
|
12
|
-
import InboxIcon from '@mui/icons-material/MoveToInbox'
|
|
13
|
-
import MailIcon from '@mui/icons-material/Mail'
|
|
14
|
-
import AppsIcon from '@mui/icons-material/Apps'
|
|
15
|
-
import MenuIcon from '@mui/icons-material/Menu'
|
|
16
|
-
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'
|
|
17
|
-
import ChevronRightIcon from '@mui/icons-material/ChevronRight'
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
title: 'Components/Navigation/Drawer/Examples',
|
|
21
|
-
component: Drawer
|
|
22
|
-
} as ComponentMeta<typeof Drawer>
|
|
23
|
-
|
|
24
|
-
export const Default: ComponentStory<typeof Drawer> = (args) => {
|
|
25
|
-
type Anchor = 'left'
|
|
26
|
-
|
|
27
|
-
const [state, setState] = React.useState({ left: false })
|
|
28
|
-
|
|
29
|
-
const toggleDrawer =
|
|
30
|
-
(anchor: Anchor, open: boolean) =>
|
|
31
|
-
(event: React.KeyboardEvent | React.MouseEvent) => {
|
|
32
|
-
if (
|
|
33
|
-
event.type === 'keydown' &&
|
|
34
|
-
((event as React.KeyboardEvent).key === 'Tab' ||
|
|
35
|
-
(event as React.KeyboardEvent).key === 'Shift')
|
|
36
|
-
) {
|
|
37
|
-
return
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
setState({ ...state, [anchor]: open })
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<>
|
|
45
|
-
<Button aria-label="Toggle Drawer" onClick={toggleDrawer('left', true)}>
|
|
46
|
-
<AppsIcon />
|
|
47
|
-
</Button>
|
|
48
|
-
<Drawer
|
|
49
|
-
anchor={'left'}
|
|
50
|
-
open={state.left}
|
|
51
|
-
onClose={toggleDrawer('left', false)}
|
|
52
|
-
>
|
|
53
|
-
<Box
|
|
54
|
-
sx={{ width: 250 }}
|
|
55
|
-
role="presentation"
|
|
56
|
-
onClick={toggleDrawer('left', false)}
|
|
57
|
-
onKeyDown={toggleDrawer('left', false)}
|
|
58
|
-
>
|
|
59
|
-
<List>
|
|
60
|
-
<ListItem>
|
|
61
|
-
<ListItemButton>
|
|
62
|
-
<ListItemText primary="One" />
|
|
63
|
-
</ListItemButton>
|
|
64
|
-
</ListItem>
|
|
65
|
-
<ListItem>
|
|
66
|
-
<ListItemButton>
|
|
67
|
-
<ListItemText primary="Two" />
|
|
68
|
-
</ListItemButton>
|
|
69
|
-
</ListItem>
|
|
70
|
-
<ListItem>
|
|
71
|
-
<ListItemButton>
|
|
72
|
-
<ListItemText primary="Three" />
|
|
73
|
-
</ListItemButton>
|
|
74
|
-
</ListItem>
|
|
75
|
-
</List>
|
|
76
|
-
</Box>
|
|
77
|
-
</Drawer>
|
|
78
|
-
</>
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
Default.parameters = {
|
|
82
|
-
docs: {
|
|
83
|
-
description: {
|
|
84
|
-
component: DOCS.Drawer.Default
|
|
85
|
-
},
|
|
86
|
-
source: {
|
|
87
|
-
type: 'code'
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// eslint-disable-next-line no-undef
|
|
93
|
-
export const TemporaryDrawer: ComponentStory<typeof AllCombinations> = (args) => {
|
|
94
|
-
type Anchor = 'top' | 'left' | 'bottom' | 'right'
|
|
95
|
-
|
|
96
|
-
const [state, setState] = React.useState({
|
|
97
|
-
top: false,
|
|
98
|
-
left: false,
|
|
99
|
-
bottom: false,
|
|
100
|
-
right: false
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
const toggleDrawer =
|
|
104
|
-
(anchor: Anchor, open: boolean) =>
|
|
105
|
-
(event: React.KeyboardEvent | React.MouseEvent) => {
|
|
106
|
-
if (
|
|
107
|
-
event.type === 'keydown' &&
|
|
108
|
-
((event as React.KeyboardEvent).key === 'Tab' ||
|
|
109
|
-
(event as React.KeyboardEvent).key === 'Shift')
|
|
110
|
-
) {
|
|
111
|
-
return
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
setState({ ...state, [anchor]: open })
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const list: any = (anchor: Anchor) => (
|
|
118
|
-
<Box
|
|
119
|
-
sx={{ width: anchor === 'top' || anchor === 'bottom' ? 'auto' : 250 }}
|
|
120
|
-
role="presentation"
|
|
121
|
-
onClick={toggleDrawer(anchor, false)}
|
|
122
|
-
onKeyDown={toggleDrawer(anchor, false)}
|
|
123
|
-
>
|
|
124
|
-
<List>
|
|
125
|
-
{['Inbox', 'Starred', 'Send email', 'Drafts'].map((text, index) => (
|
|
126
|
-
<ListItem button key={text}>
|
|
127
|
-
<ListItemIcon>
|
|
128
|
-
{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
|
|
129
|
-
</ListItemIcon>
|
|
130
|
-
<ListItemText primary={text} />
|
|
131
|
-
</ListItem>
|
|
132
|
-
))}
|
|
133
|
-
</List>
|
|
134
|
-
<Divider />
|
|
135
|
-
<List>
|
|
136
|
-
{['All mail', 'Trash', 'Spam'].map((text, index) => (
|
|
137
|
-
<ListItem button key={text}>
|
|
138
|
-
<ListItemIcon>
|
|
139
|
-
{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
|
|
140
|
-
</ListItemIcon>
|
|
141
|
-
<ListItemText primary={text} />
|
|
142
|
-
</ListItem>
|
|
143
|
-
))}
|
|
144
|
-
</List>
|
|
145
|
-
</Box>
|
|
146
|
-
)
|
|
147
|
-
|
|
148
|
-
return (
|
|
149
|
-
<Stack direction={'row'} spacing={2}>
|
|
150
|
-
{(['left', 'right', 'top', 'bottom'] as const).map((anchor) => (
|
|
151
|
-
<React.Fragment key={anchor}>
|
|
152
|
-
<Button aria-label="Toggle Drawer" onClick={toggleDrawer(anchor, true)}>{anchor}</Button>
|
|
153
|
-
<Drawer
|
|
154
|
-
anchor={anchor}
|
|
155
|
-
open={state[anchor]}
|
|
156
|
-
onClose={toggleDrawer(anchor, false)}
|
|
157
|
-
>
|
|
158
|
-
{list(anchor)}
|
|
159
|
-
</Drawer>
|
|
160
|
-
</React.Fragment>
|
|
161
|
-
))}
|
|
162
|
-
</Stack>
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
TemporaryDrawer.parameters = {
|
|
166
|
-
docs: {
|
|
167
|
-
description: {
|
|
168
|
-
story: DOCS.Drawer.TemporaryDrawer
|
|
169
|
-
},
|
|
170
|
-
source: {
|
|
171
|
-
type: 'code'
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export const PersistentDrawer: ComponentStory<typeof Drawer> = (args) => {
|
|
177
|
-
const drawerWidth = 240
|
|
178
|
-
|
|
179
|
-
const Main = styled('main', { shouldForwardProp: (prop) => prop !== 'open' })<{
|
|
180
|
-
open?: boolean
|
|
181
|
-
}>(({ theme, open }) => ({
|
|
182
|
-
flexGrow: 1,
|
|
183
|
-
padding: theme.spacing(3),
|
|
184
|
-
transition: theme.transitions.create('margin', {
|
|
185
|
-
easing: theme.transitions.easing.sharp,
|
|
186
|
-
duration: theme.transitions.duration.leavingScreen
|
|
187
|
-
}),
|
|
188
|
-
marginLeft: `-${drawerWidth}px`,
|
|
189
|
-
...(open && {
|
|
190
|
-
transition: theme.transitions.create('margin', {
|
|
191
|
-
easing: theme.transitions.easing.easeOut,
|
|
192
|
-
duration: theme.transitions.duration.enteringScreen
|
|
193
|
-
}),
|
|
194
|
-
marginLeft: 0
|
|
195
|
-
})
|
|
196
|
-
}))
|
|
197
|
-
|
|
198
|
-
interface AppBarProps extends MuiAppBarProps {
|
|
199
|
-
open?: boolean
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
const AppBar = styled(MuiAppBar, {
|
|
203
|
-
shouldForwardProp: (prop) => prop !== 'open'
|
|
204
|
-
})<AppBarProps>(({ theme, open }) => ({
|
|
205
|
-
transition: theme.transitions.create(['margin', 'width'], {
|
|
206
|
-
easing: theme.transitions.easing.sharp,
|
|
207
|
-
duration: theme.transitions.duration.leavingScreen
|
|
208
|
-
}),
|
|
209
|
-
...(open && {
|
|
210
|
-
width: `calc(100% - ${drawerWidth}px)`,
|
|
211
|
-
marginLeft: `${drawerWidth}px`,
|
|
212
|
-
transition: theme.transitions.create(['margin', 'width'], {
|
|
213
|
-
easing: theme.transitions.easing.easeOut,
|
|
214
|
-
duration: theme.transitions.duration.enteringScreen
|
|
215
|
-
})
|
|
216
|
-
})
|
|
217
|
-
}))
|
|
218
|
-
|
|
219
|
-
const DrawerHeader = styled('div')(({ theme }) => ({
|
|
220
|
-
display: 'flex',
|
|
221
|
-
alignItems: 'center',
|
|
222
|
-
padding: theme.spacing(0, 1),
|
|
223
|
-
// necessary for content to be below app bar
|
|
224
|
-
...theme.mixins.toolbar,
|
|
225
|
-
justifyContent: 'flex-end'
|
|
226
|
-
}))
|
|
227
|
-
|
|
228
|
-
const theme = useTheme()
|
|
229
|
-
const [open, setOpen] = React.useState(false)
|
|
230
|
-
|
|
231
|
-
const handleDrawerOpen = (): void => {
|
|
232
|
-
setOpen(true)
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
const handleDrawerClose = (): void => {
|
|
236
|
-
setOpen(false)
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
return (
|
|
240
|
-
<Box sx={{ display: 'flex' }}>
|
|
241
|
-
<CssBaseline />
|
|
242
|
-
<AppBar position="fixed" open={open}>
|
|
243
|
-
<Toolbar>
|
|
244
|
-
<IconButton
|
|
245
|
-
color="inherit"
|
|
246
|
-
aria-label="open drawer"
|
|
247
|
-
onClick={handleDrawerOpen}
|
|
248
|
-
edge="start"
|
|
249
|
-
sx={{ mr: 2, ...(open && { display: 'none' }) }}
|
|
250
|
-
>
|
|
251
|
-
<MenuIcon />
|
|
252
|
-
</IconButton>
|
|
253
|
-
<Typography variant="h6" noWrap component="div">
|
|
254
|
-
Persistent drawer
|
|
255
|
-
</Typography>
|
|
256
|
-
</Toolbar>
|
|
257
|
-
</AppBar>
|
|
258
|
-
<Drawer
|
|
259
|
-
sx={{
|
|
260
|
-
width: drawerWidth,
|
|
261
|
-
flexShrink: 0,
|
|
262
|
-
'& .MuiDrawer-paper': {
|
|
263
|
-
width: drawerWidth,
|
|
264
|
-
boxSizing: 'border-box'
|
|
265
|
-
}
|
|
266
|
-
}}
|
|
267
|
-
variant="persistent"
|
|
268
|
-
anchor="left"
|
|
269
|
-
open={open}
|
|
270
|
-
>
|
|
271
|
-
<DrawerHeader>
|
|
272
|
-
<IconButton onClick={handleDrawerClose}>
|
|
273
|
-
{theme.direction === 'ltr' ? <ChevronLeftIcon /> : <ChevronRightIcon />}
|
|
274
|
-
</IconButton>
|
|
275
|
-
</DrawerHeader>
|
|
276
|
-
<Divider />
|
|
277
|
-
<List>
|
|
278
|
-
{['Inbox', 'Starred', 'Send email', 'Drafts'].map((text, index) => (
|
|
279
|
-
<ListItem button key={text}>
|
|
280
|
-
<ListItemIcon>
|
|
281
|
-
{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
|
|
282
|
-
</ListItemIcon>
|
|
283
|
-
<ListItemText primary={text} />
|
|
284
|
-
</ListItem>
|
|
285
|
-
))}
|
|
286
|
-
</List>
|
|
287
|
-
<Divider />
|
|
288
|
-
<List>
|
|
289
|
-
{['All mail', 'Trash', 'Spam'].map((text, index) => (
|
|
290
|
-
<ListItem button key={text}>
|
|
291
|
-
<ListItemIcon>
|
|
292
|
-
{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
|
|
293
|
-
</ListItemIcon>
|
|
294
|
-
<ListItemText primary={text} />
|
|
295
|
-
</ListItem>
|
|
296
|
-
))}
|
|
297
|
-
</List>
|
|
298
|
-
</Drawer>
|
|
299
|
-
<Main open={open}>
|
|
300
|
-
<DrawerHeader />
|
|
301
|
-
<Typography paragraph>
|
|
302
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
303
|
-
tempor incididunt ut labore et dolore magna aliqua. Rhoncus dolor purus non
|
|
304
|
-
enim praesent elementum facilisis leo vel. Risus at ultrices mi tempus
|
|
305
|
-
imperdiet. Semper risus in hendrerit gravida rutrum quisque non tellus.
|
|
306
|
-
Convallis convallis tellus id interdum velit laoreet id donec ultrices.
|
|
307
|
-
Odio morbi quis commodo odio aenean sed adipiscing. Amet nisl suscipit
|
|
308
|
-
adipiscing bibendum est ultricies integer quis. Cursus euismod quis viverra
|
|
309
|
-
nibh cras. Metus vulputate eu scelerisque felis imperdiet proin fermentum
|
|
310
|
-
leo. Mauris commodo quis imperdiet massa tincidunt. Cras tincidunt lobortis
|
|
311
|
-
feugiat vivamus at augue. At augue eget arcu dictum varius duis at
|
|
312
|
-
consectetur lorem. Velit sed ullamcorper morbi tincidunt. Lorem donec massa
|
|
313
|
-
sapien faucibus et molestie ac.
|
|
314
|
-
</Typography>
|
|
315
|
-
<Typography paragraph>
|
|
316
|
-
Consequat mauris nunc congue nisi vitae suscipit. Fringilla est ullamcorper
|
|
317
|
-
eget nulla facilisi etiam dignissim diam. Pulvinar elementum integer enim
|
|
318
|
-
neque volutpat ac tincidunt. Ornare suspendisse sed nisi lacus sed viverra
|
|
319
|
-
tellus. Purus sit amet volutpat consequat mauris. Elementum eu facilisis
|
|
320
|
-
sed odio morbi. Euismod lacinia at quis risus sed vulputate odio. Morbi
|
|
321
|
-
tincidunt ornare massa eget egestas purus viverra accumsan in. In hendrerit
|
|
322
|
-
gravida rutrum quisque non tellus orci ac. Pellentesque nec nam aliquam sem
|
|
323
|
-
et tortor. Habitant morbi tristique senectus et. Adipiscing elit duis
|
|
324
|
-
tristique sollicitudin nibh sit. Ornare aenean euismod elementum nisi quis
|
|
325
|
-
eleifend. Commodo viverra maecenas accumsan lacus vel facilisis. Nulla
|
|
326
|
-
posuere sollicitudin aliquam ultrices sagittis orci a.
|
|
327
|
-
</Typography>
|
|
328
|
-
</Main>
|
|
329
|
-
</Box>
|
|
330
|
-
)
|
|
331
|
-
}
|
|
332
|
-
PersistentDrawer.parameters = {
|
|
333
|
-
docs: {
|
|
334
|
-
description: {
|
|
335
|
-
story: DOCS.Drawer.PersistentDrawer
|
|
336
|
-
},
|
|
337
|
-
source: {
|
|
338
|
-
type: 'code'
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
export const PermanentDrawer: ComponentStory<typeof Drawer> = (args) => {
|
|
344
|
-
const drawerWidth = 240
|
|
345
|
-
|
|
346
|
-
return (
|
|
347
|
-
<Box sx={{ display: 'flex' }}>
|
|
348
|
-
<CssBaseline />
|
|
349
|
-
<AppBar
|
|
350
|
-
position="fixed"
|
|
351
|
-
sx={{ width: `calc(100% - ${drawerWidth}px)`, ml: `${drawerWidth}px` }}
|
|
352
|
-
>
|
|
353
|
-
<Toolbar>
|
|
354
|
-
<Typography variant="h6" noWrap component="div">
|
|
355
|
-
Permanent drawer
|
|
356
|
-
</Typography>
|
|
357
|
-
</Toolbar>
|
|
358
|
-
</AppBar>
|
|
359
|
-
<Drawer
|
|
360
|
-
sx={{
|
|
361
|
-
width: drawerWidth,
|
|
362
|
-
flexShrink: 0,
|
|
363
|
-
'& .MuiDrawer-paper': {
|
|
364
|
-
width: drawerWidth,
|
|
365
|
-
boxSizing: 'border-box'
|
|
366
|
-
}
|
|
367
|
-
}}
|
|
368
|
-
variant="permanent"
|
|
369
|
-
anchor="left"
|
|
370
|
-
>
|
|
371
|
-
<Toolbar />
|
|
372
|
-
<Divider />
|
|
373
|
-
<List>
|
|
374
|
-
{['Inbox', 'Starred', 'Send email', 'Drafts'].map((text, index) => (
|
|
375
|
-
<ListItem button key={text}>
|
|
376
|
-
<ListItemIcon>
|
|
377
|
-
{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
|
|
378
|
-
</ListItemIcon>
|
|
379
|
-
<ListItemText primary={text} />
|
|
380
|
-
</ListItem>
|
|
381
|
-
))}
|
|
382
|
-
</List>
|
|
383
|
-
<Divider />
|
|
384
|
-
<List>
|
|
385
|
-
{['All mail', 'Trash', 'Spam'].map((text, index) => (
|
|
386
|
-
<ListItem button key={text}>
|
|
387
|
-
<ListItemIcon>
|
|
388
|
-
{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
|
|
389
|
-
</ListItemIcon>
|
|
390
|
-
<ListItemText primary={text} />
|
|
391
|
-
</ListItem>
|
|
392
|
-
))}
|
|
393
|
-
</List>
|
|
394
|
-
</Drawer>
|
|
395
|
-
<Box
|
|
396
|
-
component="main"
|
|
397
|
-
sx={{ flexGrow: 1, bgcolor: 'background.default', p: 3 }}
|
|
398
|
-
>
|
|
399
|
-
<Toolbar />
|
|
400
|
-
<Typography paragraph>
|
|
401
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
402
|
-
tempor incididunt ut labore et dolore magna aliqua. Rhoncus dolor purus non
|
|
403
|
-
enim praesent elementum facilisis leo vel. Risus at ultrices mi tempus
|
|
404
|
-
imperdiet. Semper risus in hendrerit gravida rutrum quisque non tellus.
|
|
405
|
-
Convallis convallis tellus id interdum velit laoreet id donec ultrices.
|
|
406
|
-
Odio morbi quis commodo odio aenean sed adipiscing. Amet nisl suscipit
|
|
407
|
-
adipiscing bibendum est ultricies integer quis. Cursus euismod quis viverra
|
|
408
|
-
nibh cras. Metus vulputate eu scelerisque felis imperdiet proin fermentum
|
|
409
|
-
leo. Mauris commodo quis imperdiet massa tincidunt. Cras tincidunt lobortis
|
|
410
|
-
feugiat vivamus at augue. At augue eget arcu dictum varius duis at
|
|
411
|
-
consectetur lorem. Velit sed ullamcorper morbi tincidunt. Lorem donec massa
|
|
412
|
-
sapien faucibus et molestie ac.
|
|
413
|
-
</Typography>
|
|
414
|
-
<Typography paragraph>
|
|
415
|
-
Consequat mauris nunc congue nisi vitae suscipit. Fringilla est ullamcorper
|
|
416
|
-
eget nulla facilisi etiam dignissim diam. Pulvinar elementum integer enim
|
|
417
|
-
neque volutpat ac tincidunt. Ornare suspendisse sed nisi lacus sed viverra
|
|
418
|
-
tellus. Purus sit amet volutpat consequat mauris. Elementum eu facilisis
|
|
419
|
-
sed odio morbi. Euismod lacinia at quis risus sed vulputate odio. Morbi
|
|
420
|
-
tincidunt ornare massa eget egestas purus viverra accumsan in. In hendrerit
|
|
421
|
-
gravida rutrum quisque non tellus orci ac. Pellentesque nec nam aliquam sem
|
|
422
|
-
et tortor. Habitant morbi tristique senectus et. Adipiscing elit duis
|
|
423
|
-
tristique sollicitudin nibh sit. Ornare aenean euismod elementum nisi quis
|
|
424
|
-
eleifend. Commodo viverra maecenas accumsan lacus vel facilisis. Nulla
|
|
425
|
-
posuere sollicitudin aliquam ultrices sagittis orci a.
|
|
426
|
-
</Typography>
|
|
427
|
-
</Box>
|
|
428
|
-
</Box>
|
|
429
|
-
)
|
|
430
|
-
}
|
|
431
|
-
PermanentDrawer.parameters = {
|
|
432
|
-
docs: {
|
|
433
|
-
description: {
|
|
434
|
-
story: DOCS.Drawer.PermanentDrawer
|
|
435
|
-
},
|
|
436
|
-
source: {
|
|
437
|
-
type: 'code'
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import { Drawer } from '../../../../lib/'
|
|
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/Navigation/Drawer/Overview" component={Drawer} />
|
|
8
|
-
|
|
9
|
-
[](#drawer-overview)Drawer Overview <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Navigation/Drawer/Overview.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
10
|
-
=================================================================================
|
|
11
|
-
|
|
12
|
-
### [](#what-does-it-do)What does it do?
|
|
13
|
-
|
|
14
|
-
Navigation drawers provide access to destinations in your app.
|
|
15
|
-
|
|
16
|
-
<Stack direction="row" spacing={1}>
|
|
17
|
-
<Chip clickable component="a" href="https://mui.com/components/drawers/" size="small" icon={<MUIIcon viewBox="-5 0 40 30" />} label="Material UI" variant="outlined" />
|
|
18
|
-
<Chip clickable component="a" href="https://material.io/components/navigation-drawer" 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=487%3A14431&scaling=min-zoom&page-id=310%3A35254&starting-point-node-id=487%3A14431" 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/navigation/Drawer" size="small" icon={<GithubIcon />} label="Github" variant="outlined" />
|
|
21
|
-
</Stack>
|
|
22
|
-
|
|
23
|
-
### [](#why-use-it)Why use it?
|
|
24
|
-
|
|
25
|
-
* Use a Drawer component when you want to provide a user with easy access to destinations and app functionality.
|
|
26
|
-
|
|
27
|
-
### [](#how-to-implement-it)How to implement it?
|
|
28
|
-
|
|
29
|
-
Below is a basic example of the Drawer component.
|
|
30
|
-
|
|
31
|
-
<Canvas isExpanded>
|
|
32
|
-
<Story id="components-navigation-drawer-examples--default" />
|
|
33
|
-
</Canvas>
|
|
34
|
-
|
|
35
|
-
### [](#best-practices)Best practices
|
|
36
|
-
|
|
37
|
-
* You can use the `temporary` variant to display a drawer for small screens and `permanent` for a drawer for wider screens.
|
|
38
|
-
* Persistent navigation drawers are acceptable for all sizes larger than mobile.
|
|
39
|
-
* Permanent navigation drawers are the recommended default for desktop.
|
|
40
|
-
* The mini variant is recommended for apps sections that need quick selection access alongside content.
|
|
41
|
-
|
|
42
|
-
### [](#design-prototype)Design prototype
|
|
43
|
-
TODO: Add design prototype
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import Chip from '@mui/material/Chip';
|
|
3
|
-
|
|
4
|
-
<Meta title="Components/Navigation/Mobile Navigation/Accessibility" />
|
|
5
|
-
|
|
6
|
-
[](#mobile-navigation-accessibility)Mobile Navigation Accessibility <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Navigation/Drawer/Accessibility.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
7
|
-
=================================================================================
|
|
8
|
-
|
|
9
|
-
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.
|
|
10
|
-
|
|
11
|
-
## [](#accessibility-guidelines)Guidelines
|
|
12
|
-
* The Mobile Navigation component automatically handles the work necessary to make it accessible.
|
|
13
|
-
* Be sure to follow all accessibility guidelines for the elements used within the component.
|
|
14
|
-
* The Mobile Navigation component is keyboard accessible and provides a focus trap when open.
|