@learningpool/ui 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/assets → assets}/Images.d.ts +0 -0
- package/{dist/assets → assets}/Images.js +0 -0
- package/{dist/components → components}/atoms/Autocomplete/Autocomplete.d.ts +0 -0
- package/{dist/components → components}/atoms/Autocomplete/Autocomplete.js +0 -0
- package/{dist/components → components}/atoms/Button/Button.d.ts +0 -0
- package/{dist/components → components}/atoms/Button/Button.js +0 -0
- package/{dist/components → components}/atoms/Checkbox/Checkbox.d.ts +0 -0
- package/{dist/components → components}/atoms/Checkbox/Checkbox.js +0 -0
- package/{dist/components → components}/atoms/IconButton/IconButton.d.ts +0 -0
- package/{dist/components → components}/atoms/IconButton/IconButton.js +0 -0
- package/{dist/components → components}/atoms/Radio/Radio.d.ts +0 -0
- package/{dist/components → components}/atoms/Radio/Radio.js +0 -0
- package/{dist/components → components}/atoms/Select/Select.d.ts +0 -0
- package/{dist/components → components}/atoms/Select/Select.js +0 -0
- package/{dist/components → components}/atoms/Slider/Slider.d.ts +0 -0
- package/{dist/components → components}/atoms/Slider/Slider.js +0 -0
- package/{dist/components → components}/atoms/Switch/Switch.d.ts +0 -0
- package/{dist/components → components}/atoms/Switch/Switch.js +0 -0
- package/{dist/components → components}/atoms/TextField/TextField.d.ts +0 -0
- package/{dist/components → components}/atoms/TextField/TextField.js +0 -0
- package/{dist/components → components}/atoms/ToggleButton/ToggleButton.d.ts +0 -0
- package/{dist/components → components}/atoms/ToggleButton/ToggleButton.js +0 -0
- package/{dist/components → components}/datadisplay/Avatar/Avatar.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Avatar/Avatar.js +0 -0
- package/{dist/components → components}/datadisplay/Chip/Chip.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Chip/Chip.js +0 -0
- package/{dist/components → components}/datadisplay/List/List.d.ts +0 -0
- package/{dist/components → components}/datadisplay/List/List.js +0 -0
- package/{dist/components → components}/datadisplay/Tooltip/Tooltip.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Tooltip/Tooltip.js +0 -0
- package/{dist/components → components}/feedback/Alert/Alert.d.ts +0 -0
- package/{dist/components → components}/feedback/Alert/Alert.js +0 -0
- package/{dist/components → components}/landmarks/Header/Header.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/Header.js +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderActionButtons.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderActionButtons.js +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderStyles.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderStyles.js +0 -0
- package/{dist/components → components}/navigation/Drawer/Drawer.d.ts +0 -0
- package/{dist/components → components}/navigation/Drawer/Drawer.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigation.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigation.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatar.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawer.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationMotion.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationMotion.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearch.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearch.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearchStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleX.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigation.d.ts +1 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigation.js +12 -10
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatar.js +11 -7
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +49 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +33 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +3 -3
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +1 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +16 -15
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +3 -3
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationMotion.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationMotion.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +6 -1
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationStyles.js +14 -15
- package/{dist/components → components}/pages/ErrorPage/ErrorPage.d.ts +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPage.js +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPageStyles.d.ts +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPageStyles.js +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSide.d.ts +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSide.js +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSideStyles.d.ts +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSideStyles.js +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcher.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcher.js +1 -1
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.js +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherStyles.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherStyles.js +8 -6
- package/{dist/components → components}/stream/AppSwitcher/constants.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/constants.js +0 -0
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/index.js → index.js} +0 -0
- package/lang/en-us.d.ts +15 -0
- package/lang/en-us.js +18 -0
- package/package.json +3 -70
- package/{dist/types → types}/components/navigation/VerticalNavigation.d.ts +0 -0
- package/{dist/types → types}/components/navigation/VerticalNavigation.js +0 -0
- package/{dist/types → types}/components/navigation/VerticalNavigationAvatar.d.ts +1 -0
- package/{dist/types → types}/components/navigation/VerticalNavigationAvatar.js +0 -0
- package/{dist/types → types}/components/stream/AppSwitcher.d.ts +0 -0
- package/{dist/types → types}/components/stream/AppSwitcher.js +0 -0
- package/{dist/types → types}/index.d.ts +0 -0
- package/{dist/types → types}/index.js +0 -0
- package/{dist/utils → utils}/constants.d.ts +0 -0
- package/{dist/utils → utils}/constants.js +0 -0
- package/{dist/utils → utils}/helpers.d.ts +0 -0
- package/{dist/utils → utils}/helpers.js +0 -0
- package/{dist/utils → utils}/hooks.d.ts +0 -0
- package/{dist/utils → utils}/hooks.js +0 -0
- package/{dist/utils → utils}/index.d.ts +0 -0
- package/{dist/utils → utils}/index.js +0 -0
- package/{dist/utils → utils}/theme.d.ts +0 -0
- package/{dist/utils → utils}/theme.js +0 -0
- package/.eslintrc.js +0 -40
- package/.github/pull_request_template.md +0 -23
- package/.github/renovate.json +0 -57
- package/.github/workflows/integration.yml +0 -53
- package/.github/workflows/wss.yml +0 -22
- package/.jest-test-results.json +0 -1
- package/.releaserc +0 -32
- package/.storybook/learningpoolTheme.js +0 -39
- package/.storybook/main.js +0 -21
- package/.storybook/manager-head.html +0 -175
- package/.storybook/manager.js +0 -34
- package/.storybook/preview-head.html +0 -212
- package/.storybook/preview.js +0 -120
- package/.storybook/storybook-sort.js +0 -54
- package/CHANGELOG.md +0 -20
- package/amplify.yml +0 -16
- package/babel.config.json +0 -14
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +0 -31
- package/dist/lang/en-us.d.ts +0 -6
- package/dist/lang/en-us.js +0 -6
- package/dist/package.json +0 -41
- package/jest.config.ts +0 -11
- package/jest.setup.ts +0 -5
- package/license +0 -7
- package/merge.js +0 -27
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/assets/atoms.svg +0 -5
- package/public/assets/automation.svg +0 -1
- package/public/assets/avatar-1.jpg +0 -0
- package/public/assets/avatar-2.jpg +0 -0
- package/public/assets/avatar-3.jpg +0 -0
- package/public/assets/flux/icon-dark.svg +0 -6
- package/public/assets/flux/icon-light.svg +0 -1
- package/public/assets/flux/icon-white.svg +0 -6
- package/public/assets/flux/icon.svg +0 -6
- package/public/assets/flux/logo-dark.svg +0 -22
- package/public/assets/flux/logo-light.svg +0 -1
- package/public/assets/flux/logo-white.svg +0 -22
- package/public/assets/flux/logo.svg +0 -22
- package/public/assets/iPhone6.jpg +0 -0
- package/public/assets/iPhone6Plus.jpg +0 -0
- package/public/assets/lp-logo.png +0 -0
- package/public/assets/lplogo.svg +0 -1
- package/public/assets/molecules.svg +0 -8
- package/public/assets/organisms.svg +0 -21
- package/public/assets/pages.svg +0 -4
- package/public/assets/particles.svg +0 -3
- package/public/assets/stream-dark.png +0 -0
- package/public/assets/stream-suite-logo.svg +0 -38
- package/public/assets/stream-white.png +0 -0
- package/public/assets/stream.png +0 -0
- package/public/assets/templates.svg +0 -3
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/public/site.webmanifest +0 -1
- package/readme.md +0 -132
- package/src/docs.tsx +0 -167
- package/src/lib/assets/Images.tsx +0 -47
- package/src/lib/assets/stream-suite-logo.svg +0 -38
- package/src/lib/components/atoms/Autocomplete/Autocomplete.test.tsx +0 -179
- package/src/lib/components/atoms/Autocomplete/Autocomplete.tsx +0 -14
- package/src/lib/components/atoms/Button/Button.test.tsx +0 -166
- package/src/lib/components/atoms/Button/Button.tsx +0 -16
- package/src/lib/components/atoms/Checkbox/Checkbox.test.tsx +0 -85
- package/src/lib/components/atoms/Checkbox/Checkbox.tsx +0 -10
- package/src/lib/components/atoms/IconButton/IconButton.test.tsx +0 -60
- package/src/lib/components/atoms/IconButton/IconButton.tsx +0 -9
- package/src/lib/components/atoms/Radio/Radio.test.tsx +0 -136
- package/src/lib/components/atoms/Radio/Radio.tsx +0 -10
- package/src/lib/components/atoms/Select/Select.test.tsx +0 -158
- package/src/lib/components/atoms/Select/Select.tsx +0 -12
- package/src/lib/components/atoms/Slider/Slider.test.tsx +0 -103
- package/src/lib/components/atoms/Slider/Slider.tsx +0 -10
- package/src/lib/components/atoms/Switch/Switch.test.tsx +0 -96
- package/src/lib/components/atoms/Switch/Switch.tsx +0 -10
- package/src/lib/components/atoms/TextField/TextField.test.tsx +0 -131
- package/src/lib/components/atoms/TextField/TextField.tsx +0 -31
- package/src/lib/components/atoms/ToggleButton/ToggleButton.test.tsx +0 -122
- package/src/lib/components/atoms/ToggleButton/ToggleButton.tsx +0 -10
- package/src/lib/components/datadisplay/Avatar/Avatar.test.tsx +0 -187
- package/src/lib/components/datadisplay/Avatar/Avatar.tsx +0 -35
- package/src/lib/components/datadisplay/Avatar/avatar-1.jpg +0 -0
- package/src/lib/components/datadisplay/Chip/Chip.test.tsx +0 -82
- package/src/lib/components/datadisplay/Chip/Chip.tsx +0 -11
- package/src/lib/components/datadisplay/List/List.test.tsx +0 -168
- package/src/lib/components/datadisplay/List/List.tsx +0 -8
- package/src/lib/components/datadisplay/Tooltip/Tooltip.test.tsx +0 -98
- package/src/lib/components/datadisplay/Tooltip/Tooltip.tsx +0 -9
- package/src/lib/components/feedback/Alert/Alert.test.tsx +0 -139
- package/src/lib/components/feedback/Alert/Alert.tsx +0 -10
- package/src/lib/components/landmarks/Header/Header.tsx +0 -140
- package/src/lib/components/landmarks/Header/HeaderActionButtons.tsx +0 -117
- package/src/lib/components/landmarks/Header/HeaderStyles.tsx +0 -62
- package/src/lib/components/navigation/Drawer/Drawer.test.tsx +0 -95
- package/src/lib/components/navigation/Drawer/Drawer.tsx +0 -21
- package/src/lib/components/navigation/MobileNavigation/MobileNavigation.tsx +0 -276
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatar.tsx +0 -334
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.tsx +0 -77
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawer.tsx +0 -197
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.tsx +0 -143
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.tsx +0 -192
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.tsx +0 -67
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.tsx +0 -192
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.tsx +0 -217
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationMotion.tsx +0 -119
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.tsx +0 -35
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearch.tsx +0 -114
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearchStyles.tsx +0 -47
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationStyles.tsx +0 -320
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.tsx +0 -59
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleX.tsx +0 -51
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigation.tsx +0 -468
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatar.tsx +0 -208
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.tsx +0 -75
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.tsx +0 -196
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.tsx +0 -94
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.tsx +0 -212
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.tsx +0 -240
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationMotion.tsx +0 -119
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationStyles.tsx +0 -302
- package/src/lib/components/pages/ErrorPage/ErrorPage.test.tsx +0 -78
- package/src/lib/components/pages/ErrorPage/ErrorPage.tsx +0 -50
- package/src/lib/components/pages/ErrorPage/ErrorPageStyles.tsx +0 -30
- package/src/lib/components/pages/SideInSide/SideInSide.tsx +0 -100
- package/src/lib/components/pages/SideInSide/SideInSideStyles.tsx +0 -62
- package/src/lib/components/stream/AppSwitcher/AppSwitcher.tsx +0 -381
- package/src/lib/components/stream/AppSwitcher/AppSwitcherItem.tsx +0 -84
- package/src/lib/components/stream/AppSwitcher/AppSwitcherStyles.tsx +0 -325
- package/src/lib/components/stream/AppSwitcher/constants.tsx +0 -28
- package/src/lib/index.tsx +0 -148
- package/src/lib/lang/en-us.js +0 -6
- package/src/lib/types/components/navigation/VerticalNavigation.ts +0 -52
- package/src/lib/types/components/navigation/VerticalNavigationAvatar.ts +0 -26
- package/src/lib/types/components/stream/AppSwitcher.ts +0 -10
- package/src/lib/types/index.ts +0 -9
- package/src/lib/utils/constants.tsx +0 -11
- package/src/lib/utils/helpers.tsx +0 -77
- package/src/lib/utils/hooks.tsx +0 -33
- package/src/lib/utils/index.tsx +0 -4
- package/src/lib/utils/theme.tsx +0 -79
- package/src/react-app-env.d.ts +0 -1
- package/src/setupTests.ts +0 -5
- package/src/stories/Components/DataDisplay/Avatar/Accessibility.stories.mdx +0 -34
- package/src/stories/Components/DataDisplay/Avatar/AllCombinations.tsx +0 -56
- package/src/stories/Components/DataDisplay/Avatar/Avatar.stories.tsx +0 -19
- package/src/stories/Components/DataDisplay/Avatar/Examples.stories.tsx +0 -278
- package/src/stories/Components/DataDisplay/Avatar/Overview.stories.mdx +0 -47
- package/src/stories/Components/DataDisplay/Chip/Accessibility.stories.mdx +0 -29
- package/src/stories/Components/DataDisplay/Chip/AllCombinations.tsx +0 -58
- package/src/stories/Components/DataDisplay/Chip/Chip.stories.tsx +0 -21
- package/src/stories/Components/DataDisplay/Chip/Examples.stories.tsx +0 -126
- package/src/stories/Components/DataDisplay/Chip/Overview.stories.mdx +0 -57
- package/src/stories/Components/DataDisplay/List/Accessibility.stories.mdx +0 -54
- package/src/stories/Components/DataDisplay/List/AllCombinations.tsx +0 -396
- package/src/stories/Components/DataDisplay/List/Examples.stories.tsx +0 -501
- package/src/stories/Components/DataDisplay/List/List.stories.tsx +0 -35
- package/src/stories/Components/DataDisplay/List/Overview.stories.mdx +0 -69
- package/src/stories/Components/DataDisplay/Table/Overview.stories.mdx +0 -70
- package/src/stories/Components/DataDisplay/Tooltip/Accessibility.stories.mdx +0 -39
- package/src/stories/Components/DataDisplay/Tooltip/AllCombinations.tsx +0 -134
- package/src/stories/Components/DataDisplay/Tooltip/Examples.stories.tsx +0 -237
- package/src/stories/Components/DataDisplay/Tooltip/Overview.stories.mdx +0 -58
- package/src/stories/Components/DataDisplay/Tooltip/Tooltip.stories.tsx +0 -22
- package/src/stories/Components/Feedback/Alert/Accessibility.stories.mdx +0 -25
- package/src/stories/Components/Feedback/Alert/Alert.stories.tsx +0 -22
- package/src/stories/Components/Feedback/Alert/AllCombinations.tsx +0 -37
- package/src/stories/Components/Feedback/Alert/Examples.stories.tsx +0 -137
- package/src/stories/Components/Feedback/Alert/Overview.stories.mdx +0 -62
- package/src/stories/Components/Inputs/Autocomplete/Accessibility.stories.mdx +0 -31
- package/src/stories/Components/Inputs/Autocomplete/AllCombinations.tsx +0 -182
- package/src/stories/Components/Inputs/Autocomplete/Autocomplete.stories.tsx +0 -31
- package/src/stories/Components/Inputs/Autocomplete/Examples.stories.tsx +0 -233
- package/src/stories/Components/Inputs/Autocomplete/Overview.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Button/Accessibility.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Button/AllCombinations.tsx +0 -53
- package/src/stories/Components/Inputs/Button/Button.stories.tsx +0 -23
- package/src/stories/Components/Inputs/Button/Examples.stories.tsx +0 -190
- package/src/stories/Components/Inputs/Button/Overview.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Checkbox/Accessibility.stories.mdx +0 -38
- package/src/stories/Components/Inputs/Checkbox/AllCombinations.tsx +0 -55
- package/src/stories/Components/Inputs/Checkbox/Checkbox.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Checkbox/Examples.stories.tsx +0 -363
- package/src/stories/Components/Inputs/Checkbox/Overview.stories.mdx +0 -63
- package/src/stories/Components/Inputs/IconButton/Examples.stories.tsx +0 -24
- package/src/stories/Components/Inputs/IconButton/IconButton.stories.tsx +0 -26
- package/src/stories/Components/Inputs/Radio/Accessibility.stories.mdx +0 -61
- package/src/stories/Components/Inputs/Radio/AllCombinations.tsx +0 -75
- package/src/stories/Components/Inputs/Radio/Examples.stories.tsx +0 -333
- package/src/stories/Components/Inputs/Radio/Overview.stories.mdx +0 -74
- package/src/stories/Components/Inputs/Radio/Radio.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Select/Accessibility.stories.mdx +0 -51
- package/src/stories/Components/Inputs/Select/AllCombinations.tsx +0 -63
- package/src/stories/Components/Inputs/Select/Examples.stories.tsx +0 -803
- package/src/stories/Components/Inputs/Select/Overview.stories.mdx +0 -73
- package/src/stories/Components/Inputs/Select/Select.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Slider/Accessibility.stories.mdx +0 -43
- package/src/stories/Components/Inputs/Slider/AllCombinations.tsx +0 -30
- package/src/stories/Components/Inputs/Slider/Examples.stories.tsx +0 -146
- package/src/stories/Components/Inputs/Slider/Overview.stories.mdx +0 -59
- package/src/stories/Components/Inputs/Slider/Slider.stories.tsx +0 -27
- package/src/stories/Components/Inputs/Switch/Accessibility.stories.mdx +0 -34
- package/src/stories/Components/Inputs/Switch/AllCombinations.tsx +0 -45
- package/src/stories/Components/Inputs/Switch/Examples.stories.tsx +0 -213
- package/src/stories/Components/Inputs/Switch/Overview.stories.mdx +0 -62
- package/src/stories/Components/Inputs/Switch/Switch.stories.tsx +0 -22
- package/src/stories/Components/Inputs/TextField/Accessibility.stories.mdx +0 -29
- package/src/stories/Components/Inputs/TextField/AllCombinations.tsx +0 -57
- package/src/stories/Components/Inputs/TextField/Examples.stories.tsx +0 -127
- package/src/stories/Components/Inputs/TextField/Overview.stories.mdx +0 -60
- package/src/stories/Components/Inputs/TextField/TextField.stories.tsx +0 -261
- package/src/stories/Components/Inputs/ToggleButton/Accessibility.stories.mdx +0 -32
- package/src/stories/Components/Inputs/ToggleButton/AllCombinations.tsx +0 -113
- package/src/stories/Components/Inputs/ToggleButton/Examples.stories.tsx +0 -339
- package/src/stories/Components/Inputs/ToggleButton/Overview.stories.mdx +0 -55
- package/src/stories/Components/Inputs/ToggleButton/ToggleButton.stories.tsx +0 -19
- package/src/stories/Components/Landmarks/Header/Examples.stories.tsx +0 -197
- package/src/stories/Components/Landmarks/Header/Header.stories.tsx +0 -34
- package/src/stories/Components/Landmarks/Header/Overview.stories.mdx +0 -44
- package/src/stories/Components/Navigation/Drawer/Accessibility.stories.mdx +0 -13
- package/src/stories/Components/Navigation/Drawer/Drawer.stories.tsx +0 -80
- package/src/stories/Components/Navigation/Drawer/Examples.stories.tsx +0 -440
- package/src/stories/Components/Navigation/Drawer/Overview.stories.mdx +0 -43
- package/src/stories/Components/Navigation/MobileNavigation/Accessibility.stories.mdx +0 -14
- package/src/stories/Components/Navigation/MobileNavigation/Examples.stories.tsx +0 -384
- package/src/stories/Components/Navigation/MobileNavigation/MobileNavigation.stories.tsx +0 -24
- package/src/stories/Components/Navigation/MobileNavigation/Overview.stories.mdx +0 -47
- package/src/stories/Components/Navigation/VerticalNavigation/Accessibility.stories.mdx +0 -14
- package/src/stories/Components/Navigation/VerticalNavigation/Examples.stories.tsx +0 -307
- package/src/stories/Components/Navigation/VerticalNavigation/Overview.stories.mdx +0 -47
- package/src/stories/Components/Navigation/VerticalNavigation/VerticalNavigation.stories.tsx +0 -24
- package/src/stories/ContactUs.stories.mdx +0 -21
- package/src/stories/Experimental/Test.stories.mdx +0 -46
- package/src/stories/GettingStarted/Designer.stories.mdx +0 -86
- package/src/stories/GettingStarted/Developer.stories.mdx +0 -134
- package/src/stories/Guidelines/Accessibility/AssistiveTechnology.stories.mdx +0 -70
- package/src/stories/Guidelines/Accessibility/ColorAndContrast.stories.mdx +0 -109
- package/src/stories/Guidelines/Accessibility/Hierarchy.stories.mdx +0 -119
- package/src/stories/Guidelines/Accessibility/Imagery.stories.mdx +0 -136
- package/src/stories/Guidelines/Accessibility/Overview.stories.mdx +0 -44
- package/src/stories/Guidelines/Accessibility/Principles.stories.mdx +0 -156
- package/src/stories/Guidelines/Accessibility/SoundAndMotion.stories.mdx +0 -59
- package/src/stories/Guidelines/Accessibility/Typography.stories.mdx +0 -69
- package/src/stories/Guidelines/Accessibility/Writing.stories.mdx +0 -188
- package/src/stories/Guidelines/Styleguide/ColorSwatch.tsx +0 -53
- package/src/stories/Guidelines/Styleguide/Colors.stories.mdx +0 -118
- package/src/stories/Guidelines/Styleguide/Typography.stories.mdx +0 -84
- package/src/stories/Introduction.stories.mdx +0 -65
- package/src/stories/Pages/ErrorPage.stories.tsx +0 -30
- package/src/stories/Pages/SideInSide.stories.tsx +0 -195
- package/src/stories/Roadmap.stories.mdx +0 -19
- package/src/stories/Templates/Login.stories.mdx +0 -46
- package/src/stories/assets/Atomic_Design_Icons-Dark.svg +0 -24
- package/src/stories/assets/Atomic_Design_Icons-Light.svg +0 -25
- package/src/stories/assets/accessibility-1.png +0 -0
- package/src/stories/assets/accessibility-2.png +0 -0
- package/src/stories/assets/accessibility-3.png +0 -0
- package/src/stories/assets/accessibility-banner.png +0 -0
- package/src/stories/assets/atoms.svg +0 -6
- package/src/stories/assets/design_system_2022-02-11_12.22pm.png +0 -0
- package/src/stories/assets/figma-tokens.png +0 -0
- package/src/stories/assets/hierarchy-1.jpg +0 -0
- package/src/stories/assets/hierarchy-2.jpg +0 -0
- package/src/stories/assets/hierarchy-3.jpg +0 -0
- package/src/stories/assets/icon-contrast-1.jpg +0 -0
- package/src/stories/assets/icon-contrast-2.jpg +0 -0
- package/src/stories/assets/imagery-1.png +0 -0
- package/src/stories/assets/imagery-2.png +0 -0
- package/src/stories/assets/imagery-3.png +0 -0
- package/src/stories/assets/imagery-4.jpg +0 -0
- package/src/stories/assets/molecules.svg +0 -9
- package/src/stories/assets/organisms.svg +0 -22
- package/src/stories/assets/pages.svg +0 -5
- package/src/stories/assets/particles.svg +0 -4
- package/src/stories/assets/templates.svg +0 -4
- package/src/stories/assets/testData.tsx +0 -102
- package/src/stories/assets/text-contrast-1.jpg +0 -0
- package/src/stories/assets/text-contrast-2.jpg +0 -0
- package/src/stories/assets/typography-1.png +0 -0
- package/src/stories/assets/visual-clues-1.png +0 -0
- package/src/stories/assets/visual-clues-2.png +0 -0
- package/src/stories/assets/writing-1.jpg +0 -0
- package/src/stories/assets/writing-2.png +0 -0
- package/src/stories/assets/writing-3.png +0 -0
- package/src/stories/assets/writing-4.png +0 -0
- package/src/stories/utils/CustomIcons.tsx +0 -44
- package/tsconfig.eslint.json +0 -16
- package/tsconfig.json +0 -50
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Box, ButtonGroup, Button, Link,
|
|
4
|
-
List, ListItem, ListItemIcon,
|
|
5
|
-
ListItemText
|
|
6
|
-
} from '../../../index'
|
|
7
|
-
import {
|
|
8
|
-
StyledSwipeableAvatar, StyledBox, StyledBoxProfile,
|
|
9
|
-
StyledAvatarName, StyledAvatar, StyledOutlineButton,
|
|
10
|
-
StyledBoxProfileEdit, StyledListItemButton
|
|
11
|
-
} from './MobileNavigationAvatarStyles'
|
|
12
|
-
import { useTheme } from '@mui/material/styles'
|
|
13
|
-
import EditIcon from '@mui/icons-material/Edit'
|
|
14
|
-
import LogoutIcon from '@mui/icons-material/Logout'
|
|
15
|
-
import ToggleOffIcon from '@mui/icons-material/ToggleOff'
|
|
16
|
-
import ToggleOnIcon from '@mui/icons-material/ToggleOn'
|
|
17
|
-
import { handleAvatarInitials, useStaggerAnimation } from '../../../utils/helpers'
|
|
18
|
-
import { animated } from '@react-spring/web'
|
|
19
|
-
|
|
20
|
-
export interface IAvatarMenuItemProps {
|
|
21
|
-
label: string
|
|
22
|
-
icon: any
|
|
23
|
-
onClick: any
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface ISwipeableTemporaryAvatarProps {
|
|
27
|
-
avatarName: string
|
|
28
|
-
editProfileText?: string
|
|
29
|
-
isAvatarOpen: boolean
|
|
30
|
-
setIsAvatarOpen?: any
|
|
31
|
-
mobileNavDirection?: string
|
|
32
|
-
setMobileNavDirection?: any
|
|
33
|
-
|
|
34
|
-
avatarPanelLogoutString?: string
|
|
35
|
-
avatarPanelOnClickSwitchDirection?: any
|
|
36
|
-
avatarPanelOnClickLogout?: any
|
|
37
|
-
avatarPanelOnClickViewProfile?: any
|
|
38
|
-
avatarPanelViewProfileString?: string
|
|
39
|
-
avatarPanelOnClickEditProfile?: any
|
|
40
|
-
avatarPanelEditProfileString?: string
|
|
41
|
-
avatarPanelMenuItems?: Array<IAvatarMenuItemProps>
|
|
42
|
-
avatarPanelOnClickMainAction?: any
|
|
43
|
-
avatarPanelMainActionString?: string
|
|
44
|
-
avatarPanelSettingItems?: Array<IAvatarMenuItemProps>
|
|
45
|
-
avatarPanelInvertNavString?: string
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const SwipeableTemporaryAvatar = (
|
|
49
|
-
props: ISwipeableTemporaryAvatarProps
|
|
50
|
-
): React.ReactElement => {
|
|
51
|
-
const theme = useTheme()
|
|
52
|
-
const {
|
|
53
|
-
avatarName, mobileNavDirection, avatarPanelLogoutString,
|
|
54
|
-
isAvatarOpen, setIsAvatarOpen, setMobileNavDirection,
|
|
55
|
-
avatarPanelOnClickSwitchDirection, avatarPanelOnClickLogout,
|
|
56
|
-
avatarPanelOnClickViewProfile, avatarPanelViewProfileString,
|
|
57
|
-
avatarPanelOnClickEditProfile, avatarPanelEditProfileString,
|
|
58
|
-
avatarPanelMenuItems, avatarPanelOnClickMainAction,
|
|
59
|
-
avatarPanelMainActionString, avatarPanelSettingItems,
|
|
60
|
-
avatarPanelInvertNavString
|
|
61
|
-
} = props
|
|
62
|
-
|
|
63
|
-
const [isOpen, setIsOpen] = React.useState(isAvatarOpen ?? false)
|
|
64
|
-
|
|
65
|
-
React.useEffect(() => handleOpenState(isAvatarOpen), [isAvatarOpen])
|
|
66
|
-
|
|
67
|
-
const handleOpenState = (open: boolean): void => {
|
|
68
|
-
setIsOpen(open)
|
|
69
|
-
setIsAvatarOpen(open)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const toggleAvatar =
|
|
73
|
-
(open: boolean) =>
|
|
74
|
-
(event: React.KeyboardEvent | React.MouseEvent) => {
|
|
75
|
-
if (event && event.type === 'keydown' &&
|
|
76
|
-
((event as React.KeyboardEvent).key === 'Tab' ||
|
|
77
|
-
(event as React.KeyboardEvent).key === 'Shift')
|
|
78
|
-
) {
|
|
79
|
-
return
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
handleOpenState(open)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const [avatarInitials, setAvatarInitials] = React.useState(handleAvatarInitials(avatarName) ?? 'AN')
|
|
86
|
-
useEffect(() => setAvatarInitials(handleAvatarInitials(avatarName)), [avatarName])
|
|
87
|
-
|
|
88
|
-
const handleOnClickSwitchDirection = () => {
|
|
89
|
-
setMobileNavDirection(mobileNavDirection === 'rtl' ? 'ltr' : 'rtl')
|
|
90
|
-
avatarPanelOnClickSwitchDirection && avatarPanelOnClickSwitchDirection()
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// First item starts at 70ms
|
|
94
|
-
// see STAGGER_ITEMS_DELAY in helpers.js
|
|
95
|
-
let animationCount = 1
|
|
96
|
-
const incrementAnimationCount = () => animationCount++
|
|
97
|
-
|
|
98
|
-
return (
|
|
99
|
-
<StyledSwipeableAvatar
|
|
100
|
-
anchor='bottom'
|
|
101
|
-
open={isOpen}
|
|
102
|
-
onClose={toggleAvatar(false)}
|
|
103
|
-
hideBackdrop
|
|
104
|
-
ModalProps={{
|
|
105
|
-
keepMounted: true
|
|
106
|
-
}}
|
|
107
|
-
>
|
|
108
|
-
<StyledBox>
|
|
109
|
-
{avatarPanelOnClickLogout && (
|
|
110
|
-
<Button
|
|
111
|
-
// @ts-expect-error
|
|
112
|
-
component={animated.button}
|
|
113
|
-
style={{
|
|
114
|
-
left: theme.direction === 'rtl' ? theme.spacing(1) : 'auto',
|
|
115
|
-
position: 'absolute',
|
|
116
|
-
right: theme.direction === 'rtl' ? 'auto' : theme.spacing(1),
|
|
117
|
-
top: theme.spacing(1),
|
|
118
|
-
...useStaggerAnimation(isOpen, animationCount, incrementAnimationCount)
|
|
119
|
-
}}
|
|
120
|
-
onClick={() => {
|
|
121
|
-
handleOpenState(false)
|
|
122
|
-
avatarPanelOnClickLogout()
|
|
123
|
-
}}
|
|
124
|
-
startIcon={<LogoutIcon />}
|
|
125
|
-
variant='text'
|
|
126
|
-
color='inherit'
|
|
127
|
-
>
|
|
128
|
-
{avatarPanelLogoutString ?? 'Logout'}
|
|
129
|
-
</Button>
|
|
130
|
-
)}
|
|
131
|
-
|
|
132
|
-
<Box
|
|
133
|
-
style={{
|
|
134
|
-
alignItems: 'center',
|
|
135
|
-
display: 'flex',
|
|
136
|
-
flexDirection: 'column'
|
|
137
|
-
}}
|
|
138
|
-
>
|
|
139
|
-
<StyledBoxProfile
|
|
140
|
-
style={useStaggerAnimation(isOpen, animationCount, incrementAnimationCount)}
|
|
141
|
-
>
|
|
142
|
-
<StyledAvatar style={{ marginRight: '0.5rem' }}>
|
|
143
|
-
{avatarInitials}
|
|
144
|
-
</StyledAvatar>
|
|
145
|
-
<StyledAvatarName>
|
|
146
|
-
<span style={{ fontWeight: 300 }}>
|
|
147
|
-
Hi,</span> <strong>{avatarName.split(' ')[0]}
|
|
148
|
-
</strong>
|
|
149
|
-
</StyledAvatarName>
|
|
150
|
-
</StyledBoxProfile>
|
|
151
|
-
|
|
152
|
-
{avatarPanelOnClickViewProfile && (
|
|
153
|
-
<StyledBoxProfileEdit
|
|
154
|
-
style={{
|
|
155
|
-
flexDirection: 'row',
|
|
156
|
-
marginBottom: theme.spacing(1),
|
|
157
|
-
...useStaggerAnimation(isOpen, animationCount, incrementAnimationCount)
|
|
158
|
-
}}>
|
|
159
|
-
<ButtonGroup variant="contained" aria-label="split button">
|
|
160
|
-
<Button
|
|
161
|
-
variant='contained'
|
|
162
|
-
color='primary'
|
|
163
|
-
size='medium'
|
|
164
|
-
onClick={() => {
|
|
165
|
-
handleOpenState(false)
|
|
166
|
-
avatarPanelOnClickViewProfile()
|
|
167
|
-
}}
|
|
168
|
-
>{avatarPanelViewProfileString ?? 'View Profile'}</Button>
|
|
169
|
-
{avatarPanelOnClickEditProfile && (
|
|
170
|
-
<Button
|
|
171
|
-
size='medium'
|
|
172
|
-
aria-label={avatarPanelEditProfileString ?? 'Edit Profile'}
|
|
173
|
-
onClick={() => {
|
|
174
|
-
handleOpenState(false)
|
|
175
|
-
avatarPanelOnClickEditProfile()
|
|
176
|
-
}}
|
|
177
|
-
>
|
|
178
|
-
<EditIcon />
|
|
179
|
-
</Button>
|
|
180
|
-
)}
|
|
181
|
-
</ButtonGroup>
|
|
182
|
-
</StyledBoxProfileEdit>
|
|
183
|
-
)}
|
|
184
|
-
</Box>
|
|
185
|
-
|
|
186
|
-
<Box
|
|
187
|
-
style={{
|
|
188
|
-
alignItems: 'center',
|
|
189
|
-
display: 'flex',
|
|
190
|
-
flexDirection: 'column'
|
|
191
|
-
}}
|
|
192
|
-
>
|
|
193
|
-
{avatarPanelMenuItems && avatarPanelMenuItems.length > 0 && (
|
|
194
|
-
<List style={{
|
|
195
|
-
marginInlineStart: '3rem',
|
|
196
|
-
marginBottom: theme.spacing(2),
|
|
197
|
-
maxWidth: '18rem'
|
|
198
|
-
}}>
|
|
199
|
-
{avatarPanelMenuItems.map((avatarMenuItem: IAvatarMenuItemProps) => (
|
|
200
|
-
<ListItem
|
|
201
|
-
component={animated.div}
|
|
202
|
-
style={useStaggerAnimation(isOpen, animationCount, incrementAnimationCount)}
|
|
203
|
-
// whileHover={motionWhileHover}
|
|
204
|
-
// whileTap={motionWhileTap}
|
|
205
|
-
disablePadding
|
|
206
|
-
>
|
|
207
|
-
<StyledListItemButton
|
|
208
|
-
// TODO: figure out if these are links or buttons
|
|
209
|
-
// @ts-expect-error
|
|
210
|
-
component={Link}
|
|
211
|
-
role='link'
|
|
212
|
-
onClick={() => {
|
|
213
|
-
handleOpenState(false)
|
|
214
|
-
avatarMenuItem.onClick()
|
|
215
|
-
}}
|
|
216
|
-
>
|
|
217
|
-
<ListItemIcon
|
|
218
|
-
aria-hidden={true}
|
|
219
|
-
style={{
|
|
220
|
-
minWidth: theme.spacing(5)
|
|
221
|
-
}}
|
|
222
|
-
>
|
|
223
|
-
{avatarMenuItem.icon}
|
|
224
|
-
</ListItemIcon>
|
|
225
|
-
<ListItemText primary={avatarMenuItem.label} />
|
|
226
|
-
</StyledListItemButton>
|
|
227
|
-
</ListItem>
|
|
228
|
-
))}
|
|
229
|
-
</List>
|
|
230
|
-
)}
|
|
231
|
-
|
|
232
|
-
{avatarPanelOnClickMainAction && <StyledOutlineButton
|
|
233
|
-
// @ts-expect-error
|
|
234
|
-
component={animated.button}
|
|
235
|
-
style={useStaggerAnimation(isOpen, animationCount, incrementAnimationCount)}
|
|
236
|
-
disablePadding
|
|
237
|
-
variant='outlined'
|
|
238
|
-
color='primary'
|
|
239
|
-
size='medium'
|
|
240
|
-
onClick={() => {
|
|
241
|
-
handleOpenState(false)
|
|
242
|
-
avatarPanelOnClickMainAction()
|
|
243
|
-
}}
|
|
244
|
-
>{avatarPanelMainActionString}</StyledOutlineButton>}
|
|
245
|
-
|
|
246
|
-
<List style={{ marginBottom: theme.spacing(2) }}>
|
|
247
|
-
{avatarPanelSettingItems &&
|
|
248
|
-
avatarPanelSettingItems.length > 0 &&
|
|
249
|
-
avatarPanelSettingItems.map((avatarMenuItem: IAvatarMenuItemProps) => (
|
|
250
|
-
<ListItem
|
|
251
|
-
component={animated.div}
|
|
252
|
-
style={useStaggerAnimation(isOpen, animationCount, incrementAnimationCount)}
|
|
253
|
-
// whileHover={motionWhileHover}
|
|
254
|
-
// whileTap={motionWhileTap}
|
|
255
|
-
disablePadding
|
|
256
|
-
>
|
|
257
|
-
<StyledListItemButton
|
|
258
|
-
// TODO: figure out if these are links or buttons
|
|
259
|
-
// @ts-expect-error
|
|
260
|
-
component={Link}
|
|
261
|
-
role='link'
|
|
262
|
-
onClick={() => {
|
|
263
|
-
handleOpenState(false)
|
|
264
|
-
avatarMenuItem.onClick()
|
|
265
|
-
}}
|
|
266
|
-
>
|
|
267
|
-
<ListItemIcon
|
|
268
|
-
aria-hidden={true}
|
|
269
|
-
style={{
|
|
270
|
-
minWidth: theme.spacing(5)
|
|
271
|
-
}}
|
|
272
|
-
>
|
|
273
|
-
{avatarMenuItem.icon}
|
|
274
|
-
</ListItemIcon>
|
|
275
|
-
<ListItemText primary={avatarMenuItem.label} />
|
|
276
|
-
</StyledListItemButton>
|
|
277
|
-
</ListItem>
|
|
278
|
-
))}
|
|
279
|
-
|
|
280
|
-
{avatarPanelOnClickSwitchDirection && (
|
|
281
|
-
<ListItem
|
|
282
|
-
component={animated.div}
|
|
283
|
-
style={useStaggerAnimation(isOpen, animationCount, incrementAnimationCount)}
|
|
284
|
-
// whileHover={motionWhileHover}
|
|
285
|
-
// whileTap={motionWhileTap}
|
|
286
|
-
disablePadding
|
|
287
|
-
>
|
|
288
|
-
<StyledListItemButton
|
|
289
|
-
// TODO: figure out if these are links or buttons
|
|
290
|
-
// @ts-expect-error
|
|
291
|
-
component={Link}
|
|
292
|
-
role='link'
|
|
293
|
-
onClick={handleOnClickSwitchDirection}
|
|
294
|
-
>
|
|
295
|
-
<ListItemText primary={avatarPanelInvertNavString ?? 'Invert navigation bar'} />
|
|
296
|
-
<ListItemIcon
|
|
297
|
-
aria-hidden={true}
|
|
298
|
-
style={{
|
|
299
|
-
minWidth: theme.spacing(5),
|
|
300
|
-
marginInlineStart: '0.5rem'
|
|
301
|
-
}}
|
|
302
|
-
>
|
|
303
|
-
{mobileNavDirection === 'ltr'
|
|
304
|
-
? (
|
|
305
|
-
<ToggleOffIcon
|
|
306
|
-
style={{
|
|
307
|
-
boxSizing: 'border-box',
|
|
308
|
-
height: '2em',
|
|
309
|
-
padding: '0.15em',
|
|
310
|
-
width: '2em'
|
|
311
|
-
}}
|
|
312
|
-
/>)
|
|
313
|
-
: (
|
|
314
|
-
<ToggleOnIcon
|
|
315
|
-
style={{
|
|
316
|
-
boxSizing: 'border-box',
|
|
317
|
-
color: 'green',
|
|
318
|
-
height: '2em',
|
|
319
|
-
padding: '0.15em',
|
|
320
|
-
width: '2em'
|
|
321
|
-
}}
|
|
322
|
-
/>)}
|
|
323
|
-
</ListItemIcon>
|
|
324
|
-
</StyledListItemButton>
|
|
325
|
-
</ListItem>
|
|
326
|
-
)}
|
|
327
|
-
</List>
|
|
328
|
-
</Box>
|
|
329
|
-
</StyledBox>
|
|
330
|
-
</StyledSwipeableAvatar>
|
|
331
|
-
)
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export default SwipeableTemporaryAvatar
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Avatar, Button,
|
|
3
|
-
ListItemButton, Typography
|
|
4
|
-
} from '../../../index'
|
|
5
|
-
import { Drawer } from '@mui/material'
|
|
6
|
-
import { styled } from '@mui/material/styles'
|
|
7
|
-
import { animated } from '@react-spring/web'
|
|
8
|
-
|
|
9
|
-
export const StyledSwipeableAvatar = styled(Drawer)`
|
|
10
|
-
.MuiPaper-root {
|
|
11
|
-
color: ${props => props.theme.palette.mode === 'dark'
|
|
12
|
-
? props.theme.palette.primary.contrastText
|
|
13
|
-
: props.theme.palette.text.primary};
|
|
14
|
-
height: 100vh;
|
|
15
|
-
border: none;
|
|
16
|
-
z-index: 1;
|
|
17
|
-
}
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
export const StyledBox = styled(animated.div)`
|
|
21
|
-
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
22
|
-
? '#003366'
|
|
23
|
-
: props.theme.palette.background.paper};
|
|
24
|
-
background-image: ${props => props.theme.palette.mode === 'dark'
|
|
25
|
-
? 'none'
|
|
26
|
-
: 'radial-gradient( circle farthest-corner at 10% 20%, #fdfbfb 0.1%, #ebedee 99.8% )'};
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
align-items: center;
|
|
30
|
-
justify-content: flex-start;
|
|
31
|
-
height: 100%;
|
|
32
|
-
overflow: auto;
|
|
33
|
-
padding: 15vh ${props => props.theme.spacing(2)};
|
|
34
|
-
position: relative;
|
|
35
|
-
`
|
|
36
|
-
|
|
37
|
-
export const StyledBoxProfile = styled(animated.div)`
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: row;
|
|
40
|
-
align-items: center;
|
|
41
|
-
margin-bottom: 2rem
|
|
42
|
-
`
|
|
43
|
-
|
|
44
|
-
export const StyledBoxProfileEdit = styled(animated.div)`
|
|
45
|
-
display: flex;
|
|
46
|
-
`
|
|
47
|
-
|
|
48
|
-
export const StyledAvatarName = styled(Typography)`
|
|
49
|
-
color: ${props => props.theme.palette.mode === 'dark'
|
|
50
|
-
? props.theme.palette.primary.contrastText
|
|
51
|
-
: props.theme.palette.text.primary};
|
|
52
|
-
font-size: 1.75rem;
|
|
53
|
-
`
|
|
54
|
-
|
|
55
|
-
export const StyledOutlineButton = styled(Button)`
|
|
56
|
-
border-color: ${props => props.theme.palette.mode === 'dark'
|
|
57
|
-
? props.theme.palette.primary.contrastText
|
|
58
|
-
: props.theme.palette.primary.main};
|
|
59
|
-
color: ${props => props.theme.palette.mode === 'dark'
|
|
60
|
-
? props.theme.palette.primary.contrastText
|
|
61
|
-
: props.theme.palette.primary.main};
|
|
62
|
-
`
|
|
63
|
-
|
|
64
|
-
export const StyledAvatar = styled(Avatar)`
|
|
65
|
-
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
66
|
-
? props.theme.palette.primary.contrastText
|
|
67
|
-
: props.theme.palette.primary.main};
|
|
68
|
-
color: ${props => props.theme.palette.mode === 'dark'
|
|
69
|
-
? props.theme.palette.primary.main
|
|
70
|
-
: props.theme.palette.primary.contrastText};
|
|
71
|
-
font-size: 0.85rem;
|
|
72
|
-
`
|
|
73
|
-
|
|
74
|
-
export const StyledListItemButton = styled(ListItemButton)`
|
|
75
|
-
border-radius: 50px;
|
|
76
|
-
margin-inline-end: 2rem;
|
|
77
|
-
`
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { useTheme } from '@mui/material/styles'
|
|
3
|
-
import { List, ListItemText } from '../../../index'
|
|
4
|
-
import {
|
|
5
|
-
StyledSwipeableDrawer, StyledBox, StyledListItem, StyledDivider,
|
|
6
|
-
StyledListSecondaryItem, StyledDrawerLogo, StyledDrawerLogoText,
|
|
7
|
-
StyledListSecondaryList, StyledListItemText, StyledListSecondaryButton,
|
|
8
|
-
StyledChildList, StyledChildListItem, StyledChildListItemText,
|
|
9
|
-
StyledListItemButton, StyledChildListItemButton
|
|
10
|
-
} from './MobileNavigationDrawerStyles'
|
|
11
|
-
import { StreamSuiteLogo } from '../../../assets/Images'
|
|
12
|
-
import { animated } from '@react-spring/web'
|
|
13
|
-
import { useStaggerAnimation } from '../../../utils/helpers'
|
|
14
|
-
|
|
15
|
-
export interface IMobileNavigationItemProps {
|
|
16
|
-
label: string
|
|
17
|
-
onClick?: any
|
|
18
|
-
isActive?: boolean
|
|
19
|
-
children?: IMobileNavigationItemProps[]
|
|
20
|
-
isDrawerOpen?: boolean
|
|
21
|
-
index?: number
|
|
22
|
-
content?: React.ReactElement
|
|
23
|
-
style?: any
|
|
24
|
-
open?: boolean
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface ISwipeableTemporaryDrawerProps {
|
|
28
|
-
isDrawerOpen: boolean
|
|
29
|
-
setIsDrawerOpen?: any
|
|
30
|
-
items?: IMobileNavigationItemProps[]
|
|
31
|
-
secondaryItems?: IMobileNavigationItemProps[]
|
|
32
|
-
logo?: string
|
|
33
|
-
logoText?: string
|
|
34
|
-
logoOnClick?: any
|
|
35
|
-
label: string
|
|
36
|
-
children?: ISwipeableTemporaryDrawerProps[]
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default function SwipeableTemporaryDrawer (props: ISwipeableTemporaryDrawerProps) {
|
|
40
|
-
const {
|
|
41
|
-
isDrawerOpen, setIsDrawerOpen, items, secondaryItems,
|
|
42
|
-
logo, logoText, logoOnClick
|
|
43
|
-
} = props
|
|
44
|
-
const theme = useTheme()
|
|
45
|
-
const [isOpen, setIsOpen] = React.useState(isDrawerOpen ?? false)
|
|
46
|
-
|
|
47
|
-
React.useEffect(() => handleOpenState(isDrawerOpen), [isDrawerOpen])
|
|
48
|
-
|
|
49
|
-
const handleOpenState = (open: boolean): void => {
|
|
50
|
-
setIsOpen(open)
|
|
51
|
-
setIsDrawerOpen(open)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const toggleDrawer =
|
|
55
|
-
(open: boolean) =>
|
|
56
|
-
(event: React.KeyboardEvent | React.MouseEvent) => {
|
|
57
|
-
if (event && event.type === 'keydown' &&
|
|
58
|
-
((event as React.KeyboardEvent).key === 'Tab' ||
|
|
59
|
-
(event as React.KeyboardEvent).key === 'Shift')
|
|
60
|
-
) {
|
|
61
|
-
return
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
handleOpenState(open)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// First item starts at 70ms
|
|
68
|
-
// see STAGGER_ITEMS_DELAY in helpers.js
|
|
69
|
-
let animationCount = 1
|
|
70
|
-
const incrementAnimationCount = () => animationCount++
|
|
71
|
-
|
|
72
|
-
const list = () => (
|
|
73
|
-
<StyledBox
|
|
74
|
-
onClick={toggleDrawer(false)}
|
|
75
|
-
onKeyDown={toggleDrawer(false)}
|
|
76
|
-
>
|
|
77
|
-
<StyledDrawerLogo
|
|
78
|
-
onClick={logoOnClick ?? null}
|
|
79
|
-
style={useStaggerAnimation(isDrawerOpen, animationCount, incrementAnimationCount)}
|
|
80
|
-
// whileHover={{ scale: 1.02 }}
|
|
81
|
-
// whileTap={{ scale: 0.95 }}
|
|
82
|
-
>
|
|
83
|
-
{logo
|
|
84
|
-
? typeof logo === 'string'
|
|
85
|
-
? (
|
|
86
|
-
<img
|
|
87
|
-
height={38}
|
|
88
|
-
width={38}
|
|
89
|
-
src={logo}
|
|
90
|
-
alt={logoText ?? 'Site Logo'}
|
|
91
|
-
/>)
|
|
92
|
-
: logo
|
|
93
|
-
: (
|
|
94
|
-
<StreamSuiteLogo style={{
|
|
95
|
-
fill: theme.palette.mode === 'dark'
|
|
96
|
-
? theme.palette.primary.main
|
|
97
|
-
: theme.palette.primary.main
|
|
98
|
-
}} />)}
|
|
99
|
-
<StyledDrawerLogoText variant='body1'>
|
|
100
|
-
{logoText ?? 'Site Logo'}
|
|
101
|
-
</StyledDrawerLogoText>
|
|
102
|
-
</StyledDrawerLogo>
|
|
103
|
-
<List>
|
|
104
|
-
{items && items.length > 0 && items.map((item, index) => {
|
|
105
|
-
const { label, children } = item
|
|
106
|
-
|
|
107
|
-
return (
|
|
108
|
-
<StyledListItem
|
|
109
|
-
key={label}
|
|
110
|
-
disablePadding
|
|
111
|
-
// @ts-expect-error
|
|
112
|
-
component={animated.li}
|
|
113
|
-
style={useStaggerAnimation(isDrawerOpen, animationCount, incrementAnimationCount)}
|
|
114
|
-
>
|
|
115
|
-
<StyledListItemButton
|
|
116
|
-
// whileHover={{ scale: 1.02 }}
|
|
117
|
-
// whileTap={{ scale: 0.95 }}
|
|
118
|
-
{...item}
|
|
119
|
-
// component={animated.button}
|
|
120
|
-
// onMouseEnter={() => set({ y: 0, color: '#000' })}
|
|
121
|
-
// onMouseLeave={() => set({ y: 100, color: '#fff' })}
|
|
122
|
-
// style={{
|
|
123
|
-
// y,
|
|
124
|
-
// color
|
|
125
|
-
// }}
|
|
126
|
-
>
|
|
127
|
-
<StyledListItemText primary={label} />
|
|
128
|
-
</StyledListItemButton>
|
|
129
|
-
|
|
130
|
-
{children && children.length > 0 && (
|
|
131
|
-
<StyledChildList aria-label={label}>
|
|
132
|
-
{children.map(childItem => (
|
|
133
|
-
<StyledChildListItem
|
|
134
|
-
key={childItem.label}
|
|
135
|
-
// whileHover={{ scale: 1.02 }}
|
|
136
|
-
// whileTap={{ scale: 0.95 }}
|
|
137
|
-
>
|
|
138
|
-
<StyledChildListItemButton
|
|
139
|
-
// whileHover={{ scale: 1.02 }}
|
|
140
|
-
// whileTap={{ scale: 0.95 }}
|
|
141
|
-
{...childItem}
|
|
142
|
-
>
|
|
143
|
-
<StyledChildListItemText key={childItem.label} primary={childItem.label} />
|
|
144
|
-
</StyledChildListItemButton>
|
|
145
|
-
</StyledChildListItem>
|
|
146
|
-
))}
|
|
147
|
-
</StyledChildList>
|
|
148
|
-
)}
|
|
149
|
-
</StyledListItem>
|
|
150
|
-
)
|
|
151
|
-
})}
|
|
152
|
-
</List>
|
|
153
|
-
{secondaryItems && secondaryItems.length > 0 && (
|
|
154
|
-
<>
|
|
155
|
-
<animated.div style={useStaggerAnimation(isDrawerOpen, animationCount, incrementAnimationCount)}>
|
|
156
|
-
<StyledDivider/>
|
|
157
|
-
</animated.div>
|
|
158
|
-
<StyledListSecondaryList>
|
|
159
|
-
{secondaryItems && secondaryItems.length > 0 && secondaryItems.map((item, index) => (
|
|
160
|
-
<StyledListSecondaryItem
|
|
161
|
-
key={item.label}
|
|
162
|
-
disablePadding
|
|
163
|
-
// @ts-expect-error
|
|
164
|
-
component={animated.li}
|
|
165
|
-
style={useStaggerAnimation(isDrawerOpen, animationCount, incrementAnimationCount)}
|
|
166
|
-
>
|
|
167
|
-
<StyledListSecondaryButton
|
|
168
|
-
// whileHover={{ scale: 1.02 }}
|
|
169
|
-
// whileTap={{ scale: 0.95, boxShadow: '0 6px 15px rgb(36 37 38 / 0%);' }}
|
|
170
|
-
{...item}
|
|
171
|
-
>
|
|
172
|
-
<ListItemText primary={item.label} />
|
|
173
|
-
</StyledListSecondaryButton>
|
|
174
|
-
</StyledListSecondaryItem>
|
|
175
|
-
))}
|
|
176
|
-
</StyledListSecondaryList>
|
|
177
|
-
</>
|
|
178
|
-
)}
|
|
179
|
-
</StyledBox>
|
|
180
|
-
)
|
|
181
|
-
|
|
182
|
-
return (
|
|
183
|
-
<aside>
|
|
184
|
-
<StyledSwipeableDrawer
|
|
185
|
-
anchor='bottom'
|
|
186
|
-
open={isOpen}
|
|
187
|
-
onClose={toggleDrawer(false)}
|
|
188
|
-
hideBackdrop
|
|
189
|
-
ModalProps={{
|
|
190
|
-
keepMounted: true
|
|
191
|
-
}}
|
|
192
|
-
>
|
|
193
|
-
{list()}
|
|
194
|
-
</StyledSwipeableDrawer>
|
|
195
|
-
</aside>
|
|
196
|
-
)
|
|
197
|
-
}
|