@learningpool/ui 1.6.0 → 1.6.1
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/.eslintrc.js +40 -0
- package/.github/pull_request_template.md +23 -0
- package/.github/renovate.json +57 -0
- package/.github/workflows/integration.yml +53 -0
- package/.github/workflows/wss.yml +22 -0
- package/.jest-test-results.json +1 -0
- package/.releaserc +32 -0
- package/.storybook/learningpoolTheme.js +39 -0
- package/.storybook/main.js +21 -0
- package/.storybook/manager-head.html +175 -0
- package/.storybook/manager.js +34 -0
- package/.storybook/preview-head.html +212 -0
- package/.storybook/preview.js +120 -0
- package/.storybook/storybook-sort.js +54 -0
- package/CHANGELOG.md +6 -0
- package/amplify.yml +16 -0
- package/babel.config.json +14 -0
- package/{assets → dist/assets}/Images.d.ts +0 -0
- package/{assets → dist/assets}/Images.js +0 -0
- package/{components → dist/components}/atoms/Autocomplete/Autocomplete.d.ts +0 -0
- package/{components → dist/components}/atoms/Autocomplete/Autocomplete.js +0 -0
- package/{components → dist/components}/atoms/Button/Button.d.ts +0 -0
- package/{components → dist/components}/atoms/Button/Button.js +0 -0
- package/{components → dist/components}/atoms/Checkbox/Checkbox.d.ts +0 -0
- package/{components → dist/components}/atoms/Checkbox/Checkbox.js +0 -0
- package/{components → dist/components}/atoms/IconButton/IconButton.d.ts +0 -0
- package/{components → dist/components}/atoms/IconButton/IconButton.js +0 -0
- package/{components → dist/components}/atoms/Radio/Radio.d.ts +0 -0
- package/{components → dist/components}/atoms/Radio/Radio.js +0 -0
- package/{components → dist/components}/atoms/Select/Select.d.ts +0 -0
- package/{components → dist/components}/atoms/Select/Select.js +0 -0
- package/{components → dist/components}/atoms/Slider/Slider.d.ts +0 -0
- package/{components → dist/components}/atoms/Slider/Slider.js +0 -0
- package/{components → dist/components}/atoms/Switch/Switch.d.ts +0 -0
- package/{components → dist/components}/atoms/Switch/Switch.js +0 -0
- package/{components → dist/components}/atoms/TextField/TextField.d.ts +0 -0
- package/{components → dist/components}/atoms/TextField/TextField.js +0 -0
- package/{components → dist/components}/atoms/ToggleButton/ToggleButton.d.ts +0 -0
- package/{components → dist/components}/atoms/ToggleButton/ToggleButton.js +0 -0
- package/{components → dist/components}/datadisplay/Avatar/Avatar.d.ts +0 -0
- package/{components → dist/components}/datadisplay/Avatar/Avatar.js +0 -0
- package/{components → dist/components}/datadisplay/Chip/Chip.d.ts +0 -0
- package/{components → dist/components}/datadisplay/Chip/Chip.js +0 -0
- package/{components → dist/components}/datadisplay/List/List.d.ts +0 -0
- package/{components → dist/components}/datadisplay/List/List.js +0 -0
- package/{components → dist/components}/datadisplay/Tooltip/Tooltip.d.ts +0 -0
- package/{components → dist/components}/datadisplay/Tooltip/Tooltip.js +0 -0
- package/{components → dist/components}/feedback/Alert/Alert.d.ts +0 -0
- package/{components → dist/components}/feedback/Alert/Alert.js +0 -0
- package/{components → dist/components}/landmarks/Header/Header.d.ts +0 -0
- package/{components → dist/components}/landmarks/Header/Header.js +0 -0
- package/{components → dist/components}/landmarks/Header/HeaderActionButtons.d.ts +0 -0
- package/{components → dist/components}/landmarks/Header/HeaderActionButtons.js +0 -0
- package/{components → dist/components}/landmarks/Header/HeaderStyles.d.ts +0 -0
- package/{components → dist/components}/landmarks/Header/HeaderStyles.js +0 -0
- package/{components → dist/components}/navigation/Drawer/Drawer.d.ts +0 -0
- package/{components → dist/components}/navigation/Drawer/Drawer.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigation.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigation.js +64 -41
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationAvatar.js +23 -19
- package/dist/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +3296 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +4 -4
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +0 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationDrawer.js +71 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +1215 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +2 -2
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationMotion.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationMotion.js +0 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +3 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +19 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearch.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearch.js +8 -6
- package/dist/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +1080 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearchStyles.js +2 -2
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationStyles.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationStyles.js +0 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +3 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +28 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +3 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationToggleX.js +28 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigation.d.ts +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigation.js +18 -16
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationAvatar.js +20 -25
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +3296 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +4 -4
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +5 -1
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationMotion.d.ts +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationMotion.js +0 -0
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +1163 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationStyles.js +3 -2
- package/{components → dist/components}/pages/ErrorPage/ErrorPage.d.ts +0 -0
- package/{components → dist/components}/pages/ErrorPage/ErrorPage.js +0 -0
- package/{components → dist/components}/pages/ErrorPage/ErrorPageStyles.d.ts +0 -0
- package/{components → dist/components}/pages/ErrorPage/ErrorPageStyles.js +0 -0
- package/{components → dist/components}/pages/SideInSide/SideInSide.d.ts +0 -0
- package/{components → dist/components}/pages/SideInSide/SideInSide.js +0 -0
- package/{components → dist/components}/pages/SideInSide/SideInSideStyles.d.ts +0 -0
- package/{components → dist/components}/pages/SideInSide/SideInSideStyles.js +0 -0
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcher.d.ts +0 -0
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcher.js +0 -0
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcherItem.d.ts +0 -0
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcherItem.js +0 -0
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcherStyles.d.ts +0 -0
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcherStyles.js +0 -0
- package/{components → dist/components}/stream/AppSwitcher/constants.d.ts +0 -0
- package/{components → dist/components}/stream/AppSwitcher/constants.js +0 -0
- package/{index.d.ts → dist/index.d.ts} +0 -0
- package/{index.js → dist/index.js} +0 -0
- package/{lang → dist/lang}/en-us.d.ts +0 -0
- package/{lang → dist/lang}/en-us.js +0 -0
- package/dist/package.json +41 -0
- package/{types → dist/types}/components/navigation/VerticalNavigation.d.ts +0 -0
- package/{types → dist/types}/components/navigation/VerticalNavigation.js +0 -0
- package/{types → dist/types}/components/navigation/VerticalNavigationAvatar.d.ts +1 -0
- package/{types → dist/types}/components/navigation/VerticalNavigationAvatar.js +0 -0
- package/{types → dist/types}/components/stream/AppSwitcher.d.ts +0 -0
- package/{types → dist/types}/components/stream/AppSwitcher.js +0 -0
- package/{types → dist/types}/index.d.ts +0 -0
- package/{types → dist/types}/index.js +0 -0
- package/{utils → dist/utils}/constants.d.ts +0 -0
- package/{utils → dist/utils}/constants.js +0 -0
- package/dist/utils/helpers.d.ts +21 -0
- package/dist/utils/helpers.js +64 -0
- package/{utils → dist/utils}/hooks.d.ts +0 -0
- package/{utils → dist/utils}/hooks.js +0 -0
- package/{utils → dist/utils}/index.d.ts +0 -0
- package/{utils → dist/utils}/index.js +0 -0
- package/{utils → dist/utils}/theme.d.ts +0 -0
- package/{utils → dist/utils}/theme.js +0 -0
- package/jest.config.ts +11 -0
- package/jest.setup.ts +5 -0
- package/{LICENSE → license} +0 -0
- package/merge.js +27 -0
- package/package.json +71 -4
- 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 +5 -0
- package/public/assets/automation.svg +1 -0
- 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 +6 -0
- package/public/assets/flux/icon-light.svg +1 -0
- package/public/assets/flux/icon-white.svg +6 -0
- package/public/assets/flux/icon.svg +6 -0
- package/public/assets/flux/logo-dark.svg +22 -0
- package/public/assets/flux/logo-light.svg +1 -0
- package/public/assets/flux/logo-white.svg +22 -0
- package/public/assets/flux/logo.svg +22 -0
- 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 +1 -0
- package/public/assets/molecules.svg +8 -0
- package/public/assets/organisms.svg +21 -0
- package/public/assets/pages.svg +4 -0
- package/public/assets/particles.svg +3 -0
- package/public/assets/stream-dark.png +0 -0
- package/public/assets/stream-suite-logo.svg +38 -0
- package/public/assets/stream-white.png +0 -0
- package/public/assets/stream.png +0 -0
- package/public/assets/templates.svg +3 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/public/site.webmanifest +1 -0
- package/{README.md → readme.md} +0 -0
- package/src/docs.tsx +167 -0
- package/src/lib/assets/Images.tsx +47 -0
- package/src/lib/assets/stream-suite-logo.svg +38 -0
- package/src/lib/components/atoms/Autocomplete/Autocomplete.test.tsx +179 -0
- package/src/lib/components/atoms/Autocomplete/Autocomplete.tsx +14 -0
- package/src/lib/components/atoms/Button/Button.test.tsx +166 -0
- package/src/lib/components/atoms/Button/Button.tsx +16 -0
- package/src/lib/components/atoms/Checkbox/Checkbox.test.tsx +85 -0
- package/src/lib/components/atoms/Checkbox/Checkbox.tsx +10 -0
- package/src/lib/components/atoms/IconButton/IconButton.test.tsx +60 -0
- package/src/lib/components/atoms/IconButton/IconButton.tsx +9 -0
- package/src/lib/components/atoms/Radio/Radio.test.tsx +136 -0
- package/src/lib/components/atoms/Radio/Radio.tsx +10 -0
- package/src/lib/components/atoms/Select/Select.test.tsx +158 -0
- package/src/lib/components/atoms/Select/Select.tsx +12 -0
- package/src/lib/components/atoms/Slider/Slider.test.tsx +103 -0
- package/src/lib/components/atoms/Slider/Slider.tsx +10 -0
- package/src/lib/components/atoms/Switch/Switch.test.tsx +96 -0
- package/src/lib/components/atoms/Switch/Switch.tsx +10 -0
- package/src/lib/components/atoms/TextField/TextField.test.tsx +131 -0
- package/src/lib/components/atoms/TextField/TextField.tsx +31 -0
- package/src/lib/components/atoms/ToggleButton/ToggleButton.test.tsx +122 -0
- package/src/lib/components/atoms/ToggleButton/ToggleButton.tsx +10 -0
- package/src/lib/components/datadisplay/Avatar/Avatar.test.tsx +187 -0
- package/src/lib/components/datadisplay/Avatar/Avatar.tsx +35 -0
- package/src/lib/components/datadisplay/Avatar/avatar-1.jpg +0 -0
- package/src/lib/components/datadisplay/Chip/Chip.test.tsx +82 -0
- package/src/lib/components/datadisplay/Chip/Chip.tsx +11 -0
- package/src/lib/components/datadisplay/List/List.test.tsx +168 -0
- package/src/lib/components/datadisplay/List/List.tsx +8 -0
- package/src/lib/components/datadisplay/Tooltip/Tooltip.test.tsx +98 -0
- package/src/lib/components/datadisplay/Tooltip/Tooltip.tsx +9 -0
- package/src/lib/components/feedback/Alert/Alert.test.tsx +139 -0
- package/src/lib/components/feedback/Alert/Alert.tsx +10 -0
- package/src/lib/components/landmarks/Header/Header.tsx +140 -0
- package/src/lib/components/landmarks/Header/HeaderActionButtons.tsx +117 -0
- package/src/lib/components/landmarks/Header/HeaderStyles.tsx +62 -0
- package/src/lib/components/navigation/Drawer/Drawer.test.tsx +95 -0
- package/src/lib/components/navigation/Drawer/Drawer.tsx +21 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigation.tsx +276 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatar.tsx +334 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.tsx +77 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawer.tsx +197 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.tsx +143 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.tsx +192 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.tsx +67 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.tsx +192 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.tsx +217 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationMotion.tsx +119 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.tsx +35 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearch.tsx +114 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearchStyles.tsx +47 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationStyles.tsx +320 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.tsx +59 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleX.tsx +51 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigation.tsx +467 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatar.tsx +208 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.tsx +75 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.tsx +196 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.tsx +94 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.tsx +212 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.tsx +240 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationMotion.tsx +119 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationStyles.tsx +303 -0
- package/src/lib/components/pages/ErrorPage/ErrorPage.test.tsx +78 -0
- package/src/lib/components/pages/ErrorPage/ErrorPage.tsx +50 -0
- package/src/lib/components/pages/ErrorPage/ErrorPageStyles.tsx +30 -0
- package/src/lib/components/pages/SideInSide/SideInSide.tsx +100 -0
- package/src/lib/components/pages/SideInSide/SideInSideStyles.tsx +62 -0
- package/src/lib/components/stream/AppSwitcher/AppSwitcher.tsx +392 -0
- package/src/lib/components/stream/AppSwitcher/AppSwitcherItem.tsx +83 -0
- package/src/lib/components/stream/AppSwitcher/AppSwitcherStyles.tsx +325 -0
- package/src/lib/components/stream/AppSwitcher/constants.tsx +28 -0
- package/src/lib/index.tsx +148 -0
- package/src/lib/lang/en-us.js +6 -0
- package/src/lib/types/components/navigation/VerticalNavigation.ts +52 -0
- package/src/lib/types/components/navigation/VerticalNavigationAvatar.ts +26 -0
- package/src/lib/types/components/stream/AppSwitcher.ts +10 -0
- package/src/lib/types/index.ts +9 -0
- package/src/lib/utils/constants.tsx +11 -0
- package/src/lib/utils/helpers.tsx +77 -0
- package/src/lib/utils/hooks.tsx +33 -0
- package/src/lib/utils/index.tsx +4 -0
- package/src/lib/utils/theme.tsx +79 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/setupTests.ts +5 -0
- package/src/stories/Components/DataDisplay/Avatar/Accessibility.stories.mdx +34 -0
- package/src/stories/Components/DataDisplay/Avatar/AllCombinations.tsx +56 -0
- package/src/stories/Components/DataDisplay/Avatar/Avatar.stories.tsx +19 -0
- package/src/stories/Components/DataDisplay/Avatar/Examples.stories.tsx +278 -0
- package/src/stories/Components/DataDisplay/Avatar/Overview.stories.mdx +47 -0
- package/src/stories/Components/DataDisplay/Chip/Accessibility.stories.mdx +29 -0
- package/src/stories/Components/DataDisplay/Chip/AllCombinations.tsx +58 -0
- package/src/stories/Components/DataDisplay/Chip/Chip.stories.tsx +21 -0
- package/src/stories/Components/DataDisplay/Chip/Examples.stories.tsx +126 -0
- package/src/stories/Components/DataDisplay/Chip/Overview.stories.mdx +57 -0
- package/src/stories/Components/DataDisplay/List/Accessibility.stories.mdx +54 -0
- package/src/stories/Components/DataDisplay/List/AllCombinations.tsx +396 -0
- package/src/stories/Components/DataDisplay/List/Examples.stories.tsx +501 -0
- package/src/stories/Components/DataDisplay/List/List.stories.tsx +35 -0
- package/src/stories/Components/DataDisplay/List/Overview.stories.mdx +69 -0
- package/src/stories/Components/DataDisplay/Table/Overview.stories.mdx +70 -0
- package/src/stories/Components/DataDisplay/Tooltip/Accessibility.stories.mdx +39 -0
- package/src/stories/Components/DataDisplay/Tooltip/AllCombinations.tsx +134 -0
- package/src/stories/Components/DataDisplay/Tooltip/Examples.stories.tsx +237 -0
- package/src/stories/Components/DataDisplay/Tooltip/Overview.stories.mdx +58 -0
- package/src/stories/Components/DataDisplay/Tooltip/Tooltip.stories.tsx +22 -0
- package/src/stories/Components/Feedback/Alert/Accessibility.stories.mdx +25 -0
- package/src/stories/Components/Feedback/Alert/Alert.stories.tsx +22 -0
- package/src/stories/Components/Feedback/Alert/AllCombinations.tsx +37 -0
- package/src/stories/Components/Feedback/Alert/Examples.stories.tsx +137 -0
- package/src/stories/Components/Feedback/Alert/Overview.stories.mdx +62 -0
- package/src/stories/Components/Inputs/Autocomplete/Accessibility.stories.mdx +31 -0
- package/src/stories/Components/Inputs/Autocomplete/AllCombinations.tsx +182 -0
- package/src/stories/Components/Inputs/Autocomplete/Autocomplete.stories.tsx +31 -0
- package/src/stories/Components/Inputs/Autocomplete/Examples.stories.tsx +233 -0
- package/src/stories/Components/Inputs/Autocomplete/Overview.stories.mdx +52 -0
- package/src/stories/Components/Inputs/Button/Accessibility.stories.mdx +52 -0
- package/src/stories/Components/Inputs/Button/AllCombinations.tsx +53 -0
- package/src/stories/Components/Inputs/Button/Button.stories.tsx +23 -0
- package/src/stories/Components/Inputs/Button/Examples.stories.tsx +190 -0
- package/src/stories/Components/Inputs/Button/Overview.stories.mdx +52 -0
- package/src/stories/Components/Inputs/Checkbox/Accessibility.stories.mdx +38 -0
- package/src/stories/Components/Inputs/Checkbox/AllCombinations.tsx +55 -0
- package/src/stories/Components/Inputs/Checkbox/Checkbox.stories.tsx +22 -0
- package/src/stories/Components/Inputs/Checkbox/Examples.stories.tsx +363 -0
- package/src/stories/Components/Inputs/Checkbox/Overview.stories.mdx +63 -0
- package/src/stories/Components/Inputs/IconButton/Examples.stories.tsx +24 -0
- package/src/stories/Components/Inputs/IconButton/IconButton.stories.tsx +26 -0
- package/src/stories/Components/Inputs/Radio/Accessibility.stories.mdx +61 -0
- package/src/stories/Components/Inputs/Radio/AllCombinations.tsx +75 -0
- package/src/stories/Components/Inputs/Radio/Examples.stories.tsx +333 -0
- package/src/stories/Components/Inputs/Radio/Overview.stories.mdx +74 -0
- package/src/stories/Components/Inputs/Radio/Radio.stories.tsx +22 -0
- package/src/stories/Components/Inputs/Select/Accessibility.stories.mdx +51 -0
- package/src/stories/Components/Inputs/Select/AllCombinations.tsx +63 -0
- package/src/stories/Components/Inputs/Select/Examples.stories.tsx +803 -0
- package/src/stories/Components/Inputs/Select/Overview.stories.mdx +73 -0
- package/src/stories/Components/Inputs/Select/Select.stories.tsx +22 -0
- package/src/stories/Components/Inputs/Slider/Accessibility.stories.mdx +43 -0
- package/src/stories/Components/Inputs/Slider/AllCombinations.tsx +30 -0
- package/src/stories/Components/Inputs/Slider/Examples.stories.tsx +146 -0
- package/src/stories/Components/Inputs/Slider/Overview.stories.mdx +59 -0
- package/src/stories/Components/Inputs/Slider/Slider.stories.tsx +27 -0
- package/src/stories/Components/Inputs/Switch/Accessibility.stories.mdx +34 -0
- package/src/stories/Components/Inputs/Switch/AllCombinations.tsx +45 -0
- package/src/stories/Components/Inputs/Switch/Examples.stories.tsx +213 -0
- package/src/stories/Components/Inputs/Switch/Overview.stories.mdx +62 -0
- package/src/stories/Components/Inputs/Switch/Switch.stories.tsx +22 -0
- package/src/stories/Components/Inputs/TextField/Accessibility.stories.mdx +29 -0
- package/src/stories/Components/Inputs/TextField/AllCombinations.tsx +57 -0
- package/src/stories/Components/Inputs/TextField/Examples.stories.tsx +127 -0
- package/src/stories/Components/Inputs/TextField/Overview.stories.mdx +60 -0
- package/src/stories/Components/Inputs/TextField/TextField.stories.tsx +261 -0
- package/src/stories/Components/Inputs/ToggleButton/Accessibility.stories.mdx +32 -0
- package/src/stories/Components/Inputs/ToggleButton/AllCombinations.tsx +113 -0
- package/src/stories/Components/Inputs/ToggleButton/Examples.stories.tsx +339 -0
- package/src/stories/Components/Inputs/ToggleButton/Overview.stories.mdx +55 -0
- package/src/stories/Components/Inputs/ToggleButton/ToggleButton.stories.tsx +19 -0
- package/src/stories/Components/Landmarks/Header/Examples.stories.tsx +197 -0
- package/src/stories/Components/Landmarks/Header/Header.stories.tsx +34 -0
- package/src/stories/Components/Landmarks/Header/Overview.stories.mdx +44 -0
- package/src/stories/Components/Navigation/Drawer/Accessibility.stories.mdx +13 -0
- package/src/stories/Components/Navigation/Drawer/Drawer.stories.tsx +80 -0
- package/src/stories/Components/Navigation/Drawer/Examples.stories.tsx +440 -0
- package/src/stories/Components/Navigation/Drawer/Overview.stories.mdx +43 -0
- package/src/stories/Components/Navigation/MobileNavigation/Accessibility.stories.mdx +14 -0
- package/src/stories/Components/Navigation/MobileNavigation/Examples.stories.tsx +384 -0
- package/src/stories/Components/Navigation/MobileNavigation/MobileNavigation.stories.tsx +24 -0
- package/src/stories/Components/Navigation/MobileNavigation/Overview.stories.mdx +47 -0
- package/src/stories/Components/Navigation/VerticalNavigation/Accessibility.stories.mdx +14 -0
- package/src/stories/Components/Navigation/VerticalNavigation/Examples.stories.tsx +307 -0
- package/src/stories/Components/Navigation/VerticalNavigation/Overview.stories.mdx +47 -0
- package/src/stories/Components/Navigation/VerticalNavigation/VerticalNavigation.stories.tsx +24 -0
- package/src/stories/ContactUs.stories.mdx +21 -0
- package/src/stories/Experimental/Test.stories.mdx +46 -0
- package/src/stories/GettingStarted/Designer.stories.mdx +86 -0
- package/src/stories/GettingStarted/Developer.stories.mdx +134 -0
- package/src/stories/Guidelines/Accessibility/AssistiveTechnology.stories.mdx +70 -0
- package/src/stories/Guidelines/Accessibility/ColorAndContrast.stories.mdx +109 -0
- package/src/stories/Guidelines/Accessibility/Hierarchy.stories.mdx +119 -0
- package/src/stories/Guidelines/Accessibility/Imagery.stories.mdx +136 -0
- package/src/stories/Guidelines/Accessibility/Overview.stories.mdx +44 -0
- package/src/stories/Guidelines/Accessibility/Principles.stories.mdx +156 -0
- package/src/stories/Guidelines/Accessibility/SoundAndMotion.stories.mdx +59 -0
- package/src/stories/Guidelines/Accessibility/Typography.stories.mdx +69 -0
- package/src/stories/Guidelines/Accessibility/Writing.stories.mdx +188 -0
- package/src/stories/Guidelines/Styleguide/ColorSwatch.tsx +53 -0
- package/src/stories/Guidelines/Styleguide/Colors.stories.mdx +118 -0
- package/src/stories/Guidelines/Styleguide/Typography.stories.mdx +84 -0
- package/src/stories/Introduction.stories.mdx +65 -0
- package/src/stories/Pages/ErrorPage.stories.tsx +30 -0
- package/src/stories/Pages/SideInSide.stories.tsx +195 -0
- package/src/stories/Roadmap.stories.mdx +19 -0
- package/src/stories/Templates/Login.stories.mdx +46 -0
- package/src/stories/assets/Atomic_Design_Icons-Dark.svg +24 -0
- package/src/stories/assets/Atomic_Design_Icons-Light.svg +25 -0
- 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 +6 -0
- 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 +9 -0
- package/src/stories/assets/organisms.svg +22 -0
- package/src/stories/assets/pages.svg +5 -0
- package/src/stories/assets/particles.svg +4 -0
- package/src/stories/assets/templates.svg +4 -0
- package/src/stories/assets/testData.tsx +102 -0
- 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 +44 -0
- package/tsconfig.eslint.json +16 -0
- package/tsconfig.json +50 -0
- package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +0 -827
- package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +0 -147
- package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +0 -392
- package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +0 -3
- package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +0 -31
- package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +0 -257
- package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +0 -3
- package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +0 -33
- package/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +0 -3
- package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +0 -27
- package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.d.ts +0 -36
- package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.js +0 -10
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +0 -827
- package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +0 -88
- package/utils/helpers.d.ts +0 -6
- package/utils/helpers.js +0 -17
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { createTheme, PaletteMode, ThemeProvider, useTheme } from '@mui/material'
|
|
2
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import { DOCS } from '../../../../docs'
|
|
5
|
+
import { MobileNavigation, Typography, Button } from '../../../../lib'
|
|
6
|
+
import { lightTheme, darkTheme } from '../../../../lib/utils'
|
|
7
|
+
import MailIcon from '@mui/icons-material/Mail'
|
|
8
|
+
import GroupIcon from '@mui/icons-material/Group'
|
|
9
|
+
import { Home, LibraryAdd, MenuBook } from '@mui/icons-material'
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: 'Components/Navigation/Mobile Navigation/Examples',
|
|
13
|
+
component: MobileNavigation
|
|
14
|
+
} as ComponentMeta<typeof MobileNavigation>
|
|
15
|
+
|
|
16
|
+
export const Default: ComponentStory<typeof MobileNavigation> = (args) => {
|
|
17
|
+
const theme = useTheme()
|
|
18
|
+
const [themeMode, setThemeMode] = React.useState<PaletteMode>('light')
|
|
19
|
+
const [isPersistent, setPersistentMode] = React.useState(false)
|
|
20
|
+
|
|
21
|
+
const testTheme = createTheme({
|
|
22
|
+
palette: {
|
|
23
|
+
mode: themeMode,
|
|
24
|
+
// ...darkTheme
|
|
25
|
+
...(theme.palette.mode === 'dark' && { ...darkTheme.palette }),
|
|
26
|
+
...(theme.palette.mode === 'light' && { ...lightTheme.palette })
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const items = [
|
|
31
|
+
{ label: 'Lorem ipsum' },
|
|
32
|
+
{
|
|
33
|
+
label: 'Testing',
|
|
34
|
+
icon: <GroupIcon />,
|
|
35
|
+
onClick: () => console.log('Action: Testing item clicked'),
|
|
36
|
+
children: [
|
|
37
|
+
{
|
|
38
|
+
label: 'First Item',
|
|
39
|
+
onClick: () => console.log('Action: First sub item clicked')
|
|
40
|
+
},
|
|
41
|
+
{ label: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do' },
|
|
42
|
+
{ label: 'Third Item' },
|
|
43
|
+
{ label: 'Forth Item' }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{ label: 'Sed do eiusmod tempor incididunt ut labore' }
|
|
47
|
+
]
|
|
48
|
+
const secondaryItems = [
|
|
49
|
+
{ label: 'Lorem ipsum' },
|
|
50
|
+
{ label: 'Dolar sit amet' },
|
|
51
|
+
{ label: 'Sed do eiusmod' },
|
|
52
|
+
{ label: 'Consectetur' }
|
|
53
|
+
]
|
|
54
|
+
const avatarPanelMenuItems = [
|
|
55
|
+
{ label: 'Lorem ipsum', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
56
|
+
{ label: 'Dolar sit amet', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
57
|
+
{ label: 'Sed do eiusmodSed do eiusmodSed do eiusmodSed do eiusmod', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
58
|
+
{ label: 'Lorem ipsum', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') }
|
|
59
|
+
]
|
|
60
|
+
// const avatarPanelSettingItems = [
|
|
61
|
+
// { label: 'Lorem ipsum', onClick: () => console.log('Action: Avatar panel menu item') },
|
|
62
|
+
// { label: 'Dolar sit amet', onClick: () => console.log('Action: Avatar panel menu item') },
|
|
63
|
+
// { label: 'Sed do eiusmodSed do eiusmodSed do eiusmodSed do eiusmod', onClick: () => console.log('Action: Avatar panel menu item') },
|
|
64
|
+
// { label: 'Lorem ipsum', onClick: () => console.log('Action: Avatar panel menu item') }
|
|
65
|
+
// ]
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<ThemeProvider theme={testTheme}>
|
|
69
|
+
<MobileNavigation
|
|
70
|
+
items={items}
|
|
71
|
+
secondaryItems={secondaryItems}
|
|
72
|
+
// logo='assets/automation.svg'
|
|
73
|
+
logoText='Stream Automation'
|
|
74
|
+
isPersistent={isPersistent}
|
|
75
|
+
setIsPersistent={setPersistentMode}
|
|
76
|
+
showNotchIndicator
|
|
77
|
+
|
|
78
|
+
// Search panel props
|
|
79
|
+
hasSearch
|
|
80
|
+
searchPanelPlaceholder='Search for something awesome...'
|
|
81
|
+
searchPanelDefaultValue='Energy switching'
|
|
82
|
+
searchPanelOnClickSearch={() => console.log('Action: Search')}
|
|
83
|
+
|
|
84
|
+
// Avatar panel props
|
|
85
|
+
hasAvatar
|
|
86
|
+
avatarPanelOnClickSwitchDirection={() => console.log('Action: Switch direction of navigation')}
|
|
87
|
+
avatarPanelOnClickLogout={() => console.log('Action: Logout')}
|
|
88
|
+
avatarPanelOnClickViewProfile={() => console.log('Action: View profile')}
|
|
89
|
+
avatarPanelViewProfileString='View profile'
|
|
90
|
+
avatarPanelOnClickEditProfile={() => console.log('Action: Edit profile')}
|
|
91
|
+
avatarPanelEditProfileString='Edit profile'
|
|
92
|
+
avatarPanelMenuItems={avatarPanelMenuItems}
|
|
93
|
+
avatarPanelOnClickMainAction={() => console.log('Action: Main action')}
|
|
94
|
+
avatarPanelMainActionString='Admin panel'
|
|
95
|
+
// avatarPanelSettingItems={avatarPanelSettingItems}
|
|
96
|
+
|
|
97
|
+
{...args}
|
|
98
|
+
/>
|
|
99
|
+
<main style={{
|
|
100
|
+
backgroundAttachment: 'fixed',
|
|
101
|
+
backgroundColor: '#eee',
|
|
102
|
+
// backgroundImage: 'url(assets/iPhone6.jpg)',
|
|
103
|
+
backgroundPosition: 'bottom left',
|
|
104
|
+
backgroundRepeat: 'no-repeat',
|
|
105
|
+
backgroundSize: '100%',
|
|
106
|
+
margin: '-1rem',
|
|
107
|
+
padding: '3rem'
|
|
108
|
+
}}>
|
|
109
|
+
<Button onClick={(): void => setThemeMode(themeMode === 'light' ? 'dark' : 'light')}>Toggle theme mode</Button>
|
|
110
|
+
{/* <button onClick={(): void => setPersistentMode(!isPersistent)}>Toggle persistent</button> */}
|
|
111
|
+
<Typography
|
|
112
|
+
component='h1'
|
|
113
|
+
variant="h4"
|
|
114
|
+
style={{ margin: '1rem 0 .5rem' }}
|
|
115
|
+
>
|
|
116
|
+
Mobile Navigation Demo
|
|
117
|
+
</Typography>
|
|
118
|
+
<Typography paragraph={true}>
|
|
119
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
120
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
121
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
122
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
123
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
124
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
125
|
+
</Typography>
|
|
126
|
+
<Typography paragraph={true}>
|
|
127
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
128
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
129
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
130
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
131
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
132
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
133
|
+
</Typography>
|
|
134
|
+
<Typography paragraph={true}>
|
|
135
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
136
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
137
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
138
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
139
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
140
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
141
|
+
</Typography>
|
|
142
|
+
<Typography paragraph={true}>
|
|
143
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
144
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
145
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
146
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
147
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
148
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
149
|
+
</Typography>
|
|
150
|
+
<Typography paragraph={true}>
|
|
151
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
152
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
153
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
154
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
155
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
156
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
157
|
+
</Typography>
|
|
158
|
+
<Typography paragraph={true}>
|
|
159
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
160
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
161
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
162
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
163
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
164
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
165
|
+
</Typography>
|
|
166
|
+
</main>
|
|
167
|
+
</ThemeProvider>
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
Default.parameters = {
|
|
171
|
+
docs: {
|
|
172
|
+
description: {
|
|
173
|
+
component: DOCS.MobileNavigation.Default
|
|
174
|
+
},
|
|
175
|
+
source: {
|
|
176
|
+
type: 'code'
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export const Overview: ComponentStory<typeof MobileNavigation> = (args): JSX.Element => {
|
|
182
|
+
const customer1 = false
|
|
183
|
+
|
|
184
|
+
const items = [
|
|
185
|
+
{ label: 'Home', icon: <Home /> },
|
|
186
|
+
{ label: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do', icon: <MailIcon />, onClick: () => console.log('hi there') },
|
|
187
|
+
{
|
|
188
|
+
label: 'Testing',
|
|
189
|
+
icon: <GroupIcon />,
|
|
190
|
+
children: [
|
|
191
|
+
{ label: 'Child Link' },
|
|
192
|
+
{ label: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do', onClick: () => console.log('hi there') },
|
|
193
|
+
{ label: 'Child Link Three' },
|
|
194
|
+
{ label: 'Child Link Four' }
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{ label: 'Library', icon: customer1 ? <MenuBook /> : <LibraryAdd /> },
|
|
198
|
+
{ label: 'Menu', icon: <MenuBook /> },
|
|
199
|
+
{
|
|
200
|
+
label: 'Another Test',
|
|
201
|
+
icon: <GroupIcon />,
|
|
202
|
+
children: [
|
|
203
|
+
{ label: 'Child Link' },
|
|
204
|
+
{ label: 'Child Link' }
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
const secondaryItems = [
|
|
209
|
+
{
|
|
210
|
+
label: 'Home',
|
|
211
|
+
icon: <Home />,
|
|
212
|
+
children: [
|
|
213
|
+
{ label: 'Child Link' },
|
|
214
|
+
{ label: 'Child Link' }
|
|
215
|
+
],
|
|
216
|
+
fullHeightFlyout: true
|
|
217
|
+
},
|
|
218
|
+
{ label: 'Home Too', icon: <MenuBook /> }
|
|
219
|
+
]
|
|
220
|
+
|
|
221
|
+
return (
|
|
222
|
+
<MobileNavigation
|
|
223
|
+
items={items}
|
|
224
|
+
secondaryItems={secondaryItems}
|
|
225
|
+
logoText='Stream'
|
|
226
|
+
|
|
227
|
+
{...args}
|
|
228
|
+
/>
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
Overview.parameters = {
|
|
232
|
+
docs: {
|
|
233
|
+
description: {
|
|
234
|
+
component: DOCS.MobileNavigation.Overview
|
|
235
|
+
},
|
|
236
|
+
source: {
|
|
237
|
+
type: 'code'
|
|
238
|
+
},
|
|
239
|
+
iframeHeight: 700,
|
|
240
|
+
inlineStories: false
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export const ReactNativeApp: ComponentStory<typeof MobileNavigation> = (args) => {
|
|
245
|
+
const theme = useTheme()
|
|
246
|
+
const [themeMode, setThemeMode] = React.useState<PaletteMode>('light')
|
|
247
|
+
const [isPersistent, setPersistentMode] = React.useState(false)
|
|
248
|
+
|
|
249
|
+
const testTheme = createTheme({
|
|
250
|
+
palette: {
|
|
251
|
+
mode: themeMode,
|
|
252
|
+
// ...darkTheme
|
|
253
|
+
...(theme.palette.mode === 'dark' && { ...darkTheme.palette }),
|
|
254
|
+
...(theme.palette.mode === 'light' && { ...lightTheme.palette })
|
|
255
|
+
}
|
|
256
|
+
})
|
|
257
|
+
|
|
258
|
+
const items = [
|
|
259
|
+
{ label: 'Dashboard' },
|
|
260
|
+
{ label: 'Discover' }
|
|
261
|
+
]
|
|
262
|
+
const secondaryItems = [
|
|
263
|
+
{ label: 'My Library' },
|
|
264
|
+
{ label: 'Notifications' }
|
|
265
|
+
]
|
|
266
|
+
const avatarPanelMenuItems = [
|
|
267
|
+
{ label: 'Download permissions', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
268
|
+
{ label: 'About this App', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
269
|
+
{ label: 'How it works', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
270
|
+
{ label: 'Privacy policy', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') }
|
|
271
|
+
]
|
|
272
|
+
|
|
273
|
+
return (
|
|
274
|
+
<ThemeProvider theme={testTheme}>
|
|
275
|
+
<MobileNavigation
|
|
276
|
+
items={items}
|
|
277
|
+
secondaryItems={secondaryItems}
|
|
278
|
+
logo='https://uuicdn.learningpool.com/stream/logo/latest/icon.svg'
|
|
279
|
+
logoText='Stream LXP'
|
|
280
|
+
isPersistent={isPersistent}
|
|
281
|
+
setIsPersistent={setPersistentMode}
|
|
282
|
+
showNotchIndicator
|
|
283
|
+
|
|
284
|
+
// Search panel props
|
|
285
|
+
hasSearch
|
|
286
|
+
searchPanelPlaceholder='Search course catalogue'
|
|
287
|
+
searchPanelDefaultValue='Fire and Safety'
|
|
288
|
+
searchPanelOnClickSearch={() => console.log('Action: Search')}
|
|
289
|
+
|
|
290
|
+
// Avatar panel props
|
|
291
|
+
hasAvatar
|
|
292
|
+
avatarPanelOnClickSwitchDirection={() => console.log('Action: Switch direction of navigation')}
|
|
293
|
+
avatarPanelOnClickLogout={() => console.log('Action: Logout')}
|
|
294
|
+
avatarPanelOnClickViewProfile={() => console.log('Action: View profile')}
|
|
295
|
+
avatarPanelViewProfileString='View profile'
|
|
296
|
+
avatarPanelOnClickEditProfile={() => console.log('Action: Edit profile')}
|
|
297
|
+
avatarPanelEditProfileString='Edit profile'
|
|
298
|
+
avatarPanelMenuItems={avatarPanelMenuItems}
|
|
299
|
+
avatarPanelOnClickMainAction={() => console.log('Action: Main action')}
|
|
300
|
+
avatarPanelMainActionString='Archived playlists'
|
|
301
|
+
|
|
302
|
+
{...args}
|
|
303
|
+
/>
|
|
304
|
+
<main style={{
|
|
305
|
+
backgroundAttachment: 'fixed',
|
|
306
|
+
backgroundColor: '#eee',
|
|
307
|
+
// backgroundImage: 'url(assets/iPhone6.jpg)',
|
|
308
|
+
backgroundPosition: 'bottom left',
|
|
309
|
+
backgroundRepeat: 'no-repeat',
|
|
310
|
+
backgroundSize: '100%',
|
|
311
|
+
margin: '-1rem',
|
|
312
|
+
padding: '3rem'
|
|
313
|
+
}}>
|
|
314
|
+
<Button onClick={(): void => setThemeMode(themeMode === 'light' ? 'dark' : 'light')}>Toggle theme mode</Button>
|
|
315
|
+
{/* <button onClick={(): void => setPersistentMode(!isPersistent)}>Toggle persistent</button> */}
|
|
316
|
+
<Typography
|
|
317
|
+
component='h1'
|
|
318
|
+
variant="h4"
|
|
319
|
+
style={{ margin: '1rem 0 .5rem' }}
|
|
320
|
+
>
|
|
321
|
+
Mobile Navigation Demo
|
|
322
|
+
</Typography>
|
|
323
|
+
<Typography paragraph={true}>
|
|
324
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
325
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
326
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
327
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
328
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
329
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
330
|
+
</Typography>
|
|
331
|
+
<Typography paragraph={true}>
|
|
332
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
333
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
334
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
335
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
336
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
337
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
338
|
+
</Typography>
|
|
339
|
+
<Typography paragraph={true}>
|
|
340
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
341
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
342
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
343
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
344
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
345
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
346
|
+
</Typography>
|
|
347
|
+
<Typography paragraph={true}>
|
|
348
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
349
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
350
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
351
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
352
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
353
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
354
|
+
</Typography>
|
|
355
|
+
<Typography paragraph={true}>
|
|
356
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
357
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
358
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
359
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
360
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
361
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
362
|
+
</Typography>
|
|
363
|
+
<Typography paragraph={true}>
|
|
364
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
365
|
+
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
366
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
367
|
+
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
368
|
+
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
369
|
+
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
370
|
+
</Typography>
|
|
371
|
+
</main>
|
|
372
|
+
</ThemeProvider>
|
|
373
|
+
)
|
|
374
|
+
}
|
|
375
|
+
ReactNativeApp.parameters = {
|
|
376
|
+
docs: {
|
|
377
|
+
description: {
|
|
378
|
+
component: DOCS.MobileNavigation.Default
|
|
379
|
+
},
|
|
380
|
+
source: {
|
|
381
|
+
type: 'code'
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
import { MobileNavigation } from '../../../../lib'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Navigation/Mobile Navigation/Properties',
|
|
7
|
+
component: MobileNavigation,
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: {
|
|
10
|
+
sort: 'requiredFirst'
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
addons: {
|
|
14
|
+
panelPosition: 'right'
|
|
15
|
+
}
|
|
16
|
+
} as ComponentMeta<typeof MobileNavigation>
|
|
17
|
+
|
|
18
|
+
// 👇 We create a “template” of how args map to rendering
|
|
19
|
+
const Template: ComponentStory<typeof MobileNavigation> = (args) => (
|
|
20
|
+
<MobileNavigation {...args} />
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
export const Properties = Template.bind({})
|
|
24
|
+
Properties.args = {}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import { MobileNavigation } 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/Mobile Navigation/Overview" component={MobileNavigation} />
|
|
8
|
+
|
|
9
|
+
[](#mobile-navigation-overview)Mobile Navigation 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 Mobile Navigation component provides a navigation bar that displays fixed to the bottom of the browser window. There are 3 buttons displayed in the navbar: a navigation menu, a site search, and a user profile. Each of these buttons toggles a panel that reveals the additional content.
|
|
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 the Mobile Navigation component when you want to provide a clear and consistent method of navigating between pages within an application. Futher information about the reasons for the mobile navigation structure can be found in our [Design System documentation](https://learninglocker.atlassian.net/wiki/spaces/PX/pages/3619029045/Mobile+Navigation#Rational).
|
|
26
|
+
|
|
27
|
+
### [](#how-to-implement-it)How to implement it?
|
|
28
|
+
|
|
29
|
+
You can see a basic example of the Mobile Navigation component below.
|
|
30
|
+
|
|
31
|
+
<Canvas isExpanded>
|
|
32
|
+
<Story id="components-navigation-mobile-navigation-examples--overview" />
|
|
33
|
+
</Canvas>
|
|
34
|
+
|
|
35
|
+
### [](#best-practices)Best practices
|
|
36
|
+
|
|
37
|
+
* Use the Mobile Navigation component to provide a consistent display of top level site navigation elements.
|
|
38
|
+
* Set the primary navigation links using the `items` prop.
|
|
39
|
+
* Set the secondary navigation links using the `secondaryItems` prop.
|
|
40
|
+
* Use the `logoText` prop to provide a clear and concise label for any custom logos added to the component.
|
|
41
|
+
|
|
42
|
+
### [](#future-considerations)Future considerations
|
|
43
|
+
|
|
44
|
+
* none
|
|
45
|
+
|
|
46
|
+
### [](#design-prototype)Design prototype
|
|
47
|
+
TODO: Add design prototype
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import Chip from '@mui/material/Chip';
|
|
3
|
+
|
|
4
|
+
<Meta title="Components/Navigation/Vertical Navigation/Accessibility" />
|
|
5
|
+
|
|
6
|
+
[](#vertical-navigation-accessibility)Vertical 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 Vertical 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 Vertical Navigation component is keyboard accessible and provides a focus trap when open.
|