@learningpool/ui 1.6.2 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/assets → assets}/Images.d.ts +0 -0
- package/{dist/assets → assets}/Images.js +0 -0
- package/{dist/components → components}/atoms/Autocomplete/Autocomplete.d.ts +0 -0
- package/{dist/components → components}/atoms/Autocomplete/Autocomplete.js +0 -0
- package/{dist/components → components}/atoms/Button/Button.d.ts +0 -0
- package/{dist/components → components}/atoms/Button/Button.js +0 -0
- package/{dist/components → components}/atoms/Checkbox/Checkbox.d.ts +0 -0
- package/{dist/components → components}/atoms/Checkbox/Checkbox.js +0 -0
- package/{dist/components → components}/atoms/IconButton/IconButton.d.ts +0 -0
- package/{dist/components → components}/atoms/IconButton/IconButton.js +0 -0
- package/{dist/components → components}/atoms/Radio/Radio.d.ts +0 -0
- package/{dist/components → components}/atoms/Radio/Radio.js +0 -0
- package/{dist/components → components}/atoms/Select/Select.d.ts +0 -0
- package/{dist/components → components}/atoms/Select/Select.js +0 -0
- package/{dist/components → components}/atoms/Slider/Slider.d.ts +0 -0
- package/{dist/components → components}/atoms/Slider/Slider.js +0 -0
- package/{dist/components → components}/atoms/Switch/Switch.d.ts +0 -0
- package/{dist/components → components}/atoms/Switch/Switch.js +0 -0
- package/{dist/components → components}/atoms/TextField/TextField.d.ts +0 -0
- package/{dist/components → components}/atoms/TextField/TextField.js +0 -0
- package/{dist/components → components}/atoms/ToggleButton/ToggleButton.d.ts +0 -0
- package/{dist/components → components}/atoms/ToggleButton/ToggleButton.js +0 -0
- package/{dist/components → components}/datadisplay/Avatar/Avatar.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Avatar/Avatar.js +0 -0
- package/{dist/components → components}/datadisplay/Chip/Chip.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Chip/Chip.js +0 -0
- package/{dist/components → components}/datadisplay/List/List.d.ts +0 -0
- package/{dist/components → components}/datadisplay/List/List.js +0 -0
- package/{dist/components → components}/datadisplay/Tooltip/Tooltip.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Tooltip/Tooltip.js +0 -0
- package/{dist/components → components}/feedback/Alert/Alert.d.ts +0 -0
- package/{dist/components → components}/feedback/Alert/Alert.js +0 -0
- package/{dist/components → components}/landmarks/Header/Header.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/Header.js +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderActionButtons.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderActionButtons.js +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderStyles.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderStyles.js +0 -0
- package/{dist/components → components}/navigation/Drawer/Drawer.d.ts +0 -0
- package/{dist/components → components}/navigation/Drawer/Drawer.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigation.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigation.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatar.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawer.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationMotion.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationMotion.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearch.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearch.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearchStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleX.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigation.d.ts +1 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigation.js +12 -10
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatar.js +11 -7
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +49 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +33 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +3 -3
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +1 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +16 -15
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +3 -3
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationMotion.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationMotion.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +6 -1
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationStyles.js +14 -15
- package/{dist/components → components}/pages/ErrorPage/ErrorPage.d.ts +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPage.js +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPageStyles.d.ts +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPageStyles.js +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSide.d.ts +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSide.js +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSideStyles.d.ts +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSideStyles.js +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcher.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcher.js +1 -11
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.d.ts +1 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.js +14 -14
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherStyles.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherStyles.js +8 -6
- package/{dist/components → components}/stream/AppSwitcher/constants.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/constants.js +0 -0
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/index.js → index.js} +0 -0
- package/lang/en-us.d.ts +15 -0
- package/lang/en-us.js +18 -0
- package/package.json +3 -70
- package/{dist/types → types}/components/navigation/VerticalNavigation.d.ts +0 -0
- package/{dist/types → types}/components/navigation/VerticalNavigation.js +0 -0
- package/{dist/types → types}/components/navigation/VerticalNavigationAvatar.d.ts +1 -0
- package/{dist/types → types}/components/navigation/VerticalNavigationAvatar.js +0 -0
- package/{dist/types → types}/components/stream/AppSwitcher.d.ts +0 -0
- package/{dist/types → types}/components/stream/AppSwitcher.js +0 -0
- package/{dist/types → types}/index.d.ts +0 -0
- package/{dist/types → types}/index.js +0 -0
- package/{dist/utils → utils}/constants.d.ts +0 -0
- package/{dist/utils → utils}/constants.js +0 -0
- package/{dist/utils → utils}/helpers.d.ts +0 -0
- package/{dist/utils → utils}/helpers.js +0 -0
- package/{dist/utils → utils}/hooks.d.ts +0 -0
- package/{dist/utils → utils}/hooks.js +0 -0
- package/{dist/utils → utils}/index.d.ts +0 -0
- package/{dist/utils → utils}/index.js +0 -0
- package/{dist/utils → utils}/theme.d.ts +0 -0
- package/{dist/utils → utils}/theme.js +0 -0
- package/.eslintrc.js +0 -40
- package/.github/pull_request_template.md +0 -23
- package/.github/renovate.json +0 -57
- package/.github/workflows/integration.yml +0 -53
- package/.github/workflows/wss.yml +0 -22
- package/.jest-test-results.json +0 -1
- package/.releaserc +0 -32
- package/.storybook/learningpoolTheme.js +0 -39
- package/.storybook/main.js +0 -21
- package/.storybook/manager-head.html +0 -175
- package/.storybook/manager.js +0 -34
- package/.storybook/preview-head.html +0 -212
- package/.storybook/preview.js +0 -120
- package/.storybook/storybook-sort.js +0 -54
- package/CHANGELOG.md +0 -13
- package/amplify.yml +0 -16
- package/babel.config.json +0 -14
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +0 -31
- package/dist/lang/en-us.d.ts +0 -6
- package/dist/lang/en-us.js +0 -6
- package/dist/package.json +0 -41
- package/jest.config.ts +0 -11
- package/jest.setup.ts +0 -5
- package/license +0 -7
- package/merge.js +0 -27
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/assets/atoms.svg +0 -5
- package/public/assets/automation.svg +0 -1
- package/public/assets/avatar-1.jpg +0 -0
- package/public/assets/avatar-2.jpg +0 -0
- package/public/assets/avatar-3.jpg +0 -0
- package/public/assets/flux/icon-dark.svg +0 -6
- package/public/assets/flux/icon-light.svg +0 -1
- package/public/assets/flux/icon-white.svg +0 -6
- package/public/assets/flux/icon.svg +0 -6
- package/public/assets/flux/logo-dark.svg +0 -22
- package/public/assets/flux/logo-light.svg +0 -1
- package/public/assets/flux/logo-white.svg +0 -22
- package/public/assets/flux/logo.svg +0 -22
- package/public/assets/iPhone6.jpg +0 -0
- package/public/assets/iPhone6Plus.jpg +0 -0
- package/public/assets/lp-logo.png +0 -0
- package/public/assets/lplogo.svg +0 -1
- package/public/assets/molecules.svg +0 -8
- package/public/assets/organisms.svg +0 -21
- package/public/assets/pages.svg +0 -4
- package/public/assets/particles.svg +0 -3
- package/public/assets/stream-dark.png +0 -0
- package/public/assets/stream-suite-logo.svg +0 -38
- package/public/assets/stream-white.png +0 -0
- package/public/assets/stream.png +0 -0
- package/public/assets/templates.svg +0 -3
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/public/site.webmanifest +0 -1
- package/readme.md +0 -132
- package/src/docs.tsx +0 -167
- package/src/lib/assets/Images.tsx +0 -47
- package/src/lib/assets/stream-suite-logo.svg +0 -38
- package/src/lib/components/atoms/Autocomplete/Autocomplete.test.tsx +0 -179
- package/src/lib/components/atoms/Autocomplete/Autocomplete.tsx +0 -14
- package/src/lib/components/atoms/Button/Button.test.tsx +0 -166
- package/src/lib/components/atoms/Button/Button.tsx +0 -16
- package/src/lib/components/atoms/Checkbox/Checkbox.test.tsx +0 -85
- package/src/lib/components/atoms/Checkbox/Checkbox.tsx +0 -10
- package/src/lib/components/atoms/IconButton/IconButton.test.tsx +0 -60
- package/src/lib/components/atoms/IconButton/IconButton.tsx +0 -9
- package/src/lib/components/atoms/Radio/Radio.test.tsx +0 -136
- package/src/lib/components/atoms/Radio/Radio.tsx +0 -10
- package/src/lib/components/atoms/Select/Select.test.tsx +0 -158
- package/src/lib/components/atoms/Select/Select.tsx +0 -12
- package/src/lib/components/atoms/Slider/Slider.test.tsx +0 -103
- package/src/lib/components/atoms/Slider/Slider.tsx +0 -10
- package/src/lib/components/atoms/Switch/Switch.test.tsx +0 -96
- package/src/lib/components/atoms/Switch/Switch.tsx +0 -10
- package/src/lib/components/atoms/TextField/TextField.test.tsx +0 -131
- package/src/lib/components/atoms/TextField/TextField.tsx +0 -31
- package/src/lib/components/atoms/ToggleButton/ToggleButton.test.tsx +0 -122
- package/src/lib/components/atoms/ToggleButton/ToggleButton.tsx +0 -10
- package/src/lib/components/datadisplay/Avatar/Avatar.test.tsx +0 -187
- package/src/lib/components/datadisplay/Avatar/Avatar.tsx +0 -35
- package/src/lib/components/datadisplay/Avatar/avatar-1.jpg +0 -0
- package/src/lib/components/datadisplay/Chip/Chip.test.tsx +0 -82
- package/src/lib/components/datadisplay/Chip/Chip.tsx +0 -11
- package/src/lib/components/datadisplay/List/List.test.tsx +0 -168
- package/src/lib/components/datadisplay/List/List.tsx +0 -8
- package/src/lib/components/datadisplay/Tooltip/Tooltip.test.tsx +0 -98
- package/src/lib/components/datadisplay/Tooltip/Tooltip.tsx +0 -9
- package/src/lib/components/feedback/Alert/Alert.test.tsx +0 -139
- package/src/lib/components/feedback/Alert/Alert.tsx +0 -10
- package/src/lib/components/landmarks/Header/Header.tsx +0 -140
- package/src/lib/components/landmarks/Header/HeaderActionButtons.tsx +0 -117
- package/src/lib/components/landmarks/Header/HeaderStyles.tsx +0 -62
- package/src/lib/components/navigation/Drawer/Drawer.test.tsx +0 -95
- package/src/lib/components/navigation/Drawer/Drawer.tsx +0 -21
- package/src/lib/components/navigation/MobileNavigation/MobileNavigation.tsx +0 -276
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatar.tsx +0 -334
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.tsx +0 -77
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawer.tsx +0 -197
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.tsx +0 -143
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.tsx +0 -192
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.tsx +0 -67
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.tsx +0 -192
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.tsx +0 -217
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationMotion.tsx +0 -119
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.tsx +0 -35
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearch.tsx +0 -114
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearchStyles.tsx +0 -47
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationStyles.tsx +0 -320
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.tsx +0 -59
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleX.tsx +0 -51
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigation.tsx +0 -468
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatar.tsx +0 -208
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.tsx +0 -75
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.tsx +0 -196
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.tsx +0 -94
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.tsx +0 -212
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.tsx +0 -240
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationMotion.tsx +0 -119
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationStyles.tsx +0 -302
- package/src/lib/components/pages/ErrorPage/ErrorPage.test.tsx +0 -78
- package/src/lib/components/pages/ErrorPage/ErrorPage.tsx +0 -50
- package/src/lib/components/pages/ErrorPage/ErrorPageStyles.tsx +0 -30
- package/src/lib/components/pages/SideInSide/SideInSide.tsx +0 -100
- package/src/lib/components/pages/SideInSide/SideInSideStyles.tsx +0 -62
- package/src/lib/components/stream/AppSwitcher/AppSwitcher.tsx +0 -392
- package/src/lib/components/stream/AppSwitcher/AppSwitcherItem.tsx +0 -83
- package/src/lib/components/stream/AppSwitcher/AppSwitcherStyles.tsx +0 -325
- package/src/lib/components/stream/AppSwitcher/constants.tsx +0 -28
- package/src/lib/index.tsx +0 -148
- package/src/lib/lang/en-us.js +0 -6
- package/src/lib/types/components/navigation/VerticalNavigation.ts +0 -52
- package/src/lib/types/components/navigation/VerticalNavigationAvatar.ts +0 -26
- package/src/lib/types/components/stream/AppSwitcher.ts +0 -10
- package/src/lib/types/index.ts +0 -9
- package/src/lib/utils/constants.tsx +0 -11
- package/src/lib/utils/helpers.tsx +0 -77
- package/src/lib/utils/hooks.tsx +0 -33
- package/src/lib/utils/index.tsx +0 -4
- package/src/lib/utils/theme.tsx +0 -79
- package/src/react-app-env.d.ts +0 -1
- package/src/setupTests.ts +0 -5
- package/src/stories/Components/DataDisplay/Avatar/Accessibility.stories.mdx +0 -34
- package/src/stories/Components/DataDisplay/Avatar/AllCombinations.tsx +0 -56
- package/src/stories/Components/DataDisplay/Avatar/Avatar.stories.tsx +0 -19
- package/src/stories/Components/DataDisplay/Avatar/Examples.stories.tsx +0 -278
- package/src/stories/Components/DataDisplay/Avatar/Overview.stories.mdx +0 -47
- package/src/stories/Components/DataDisplay/Chip/Accessibility.stories.mdx +0 -29
- package/src/stories/Components/DataDisplay/Chip/AllCombinations.tsx +0 -58
- package/src/stories/Components/DataDisplay/Chip/Chip.stories.tsx +0 -21
- package/src/stories/Components/DataDisplay/Chip/Examples.stories.tsx +0 -126
- package/src/stories/Components/DataDisplay/Chip/Overview.stories.mdx +0 -57
- package/src/stories/Components/DataDisplay/List/Accessibility.stories.mdx +0 -54
- package/src/stories/Components/DataDisplay/List/AllCombinations.tsx +0 -396
- package/src/stories/Components/DataDisplay/List/Examples.stories.tsx +0 -501
- package/src/stories/Components/DataDisplay/List/List.stories.tsx +0 -35
- package/src/stories/Components/DataDisplay/List/Overview.stories.mdx +0 -69
- package/src/stories/Components/DataDisplay/Table/Overview.stories.mdx +0 -70
- package/src/stories/Components/DataDisplay/Tooltip/Accessibility.stories.mdx +0 -39
- package/src/stories/Components/DataDisplay/Tooltip/AllCombinations.tsx +0 -134
- package/src/stories/Components/DataDisplay/Tooltip/Examples.stories.tsx +0 -237
- package/src/stories/Components/DataDisplay/Tooltip/Overview.stories.mdx +0 -58
- package/src/stories/Components/DataDisplay/Tooltip/Tooltip.stories.tsx +0 -22
- package/src/stories/Components/Feedback/Alert/Accessibility.stories.mdx +0 -25
- package/src/stories/Components/Feedback/Alert/Alert.stories.tsx +0 -22
- package/src/stories/Components/Feedback/Alert/AllCombinations.tsx +0 -37
- package/src/stories/Components/Feedback/Alert/Examples.stories.tsx +0 -137
- package/src/stories/Components/Feedback/Alert/Overview.stories.mdx +0 -62
- package/src/stories/Components/Inputs/Autocomplete/Accessibility.stories.mdx +0 -31
- package/src/stories/Components/Inputs/Autocomplete/AllCombinations.tsx +0 -182
- package/src/stories/Components/Inputs/Autocomplete/Autocomplete.stories.tsx +0 -31
- package/src/stories/Components/Inputs/Autocomplete/Examples.stories.tsx +0 -233
- package/src/stories/Components/Inputs/Autocomplete/Overview.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Button/Accessibility.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Button/AllCombinations.tsx +0 -53
- package/src/stories/Components/Inputs/Button/Button.stories.tsx +0 -23
- package/src/stories/Components/Inputs/Button/Examples.stories.tsx +0 -190
- package/src/stories/Components/Inputs/Button/Overview.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Checkbox/Accessibility.stories.mdx +0 -38
- package/src/stories/Components/Inputs/Checkbox/AllCombinations.tsx +0 -55
- package/src/stories/Components/Inputs/Checkbox/Checkbox.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Checkbox/Examples.stories.tsx +0 -363
- package/src/stories/Components/Inputs/Checkbox/Overview.stories.mdx +0 -63
- package/src/stories/Components/Inputs/IconButton/Examples.stories.tsx +0 -24
- package/src/stories/Components/Inputs/IconButton/IconButton.stories.tsx +0 -26
- package/src/stories/Components/Inputs/Radio/Accessibility.stories.mdx +0 -61
- package/src/stories/Components/Inputs/Radio/AllCombinations.tsx +0 -75
- package/src/stories/Components/Inputs/Radio/Examples.stories.tsx +0 -333
- package/src/stories/Components/Inputs/Radio/Overview.stories.mdx +0 -74
- package/src/stories/Components/Inputs/Radio/Radio.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Select/Accessibility.stories.mdx +0 -51
- package/src/stories/Components/Inputs/Select/AllCombinations.tsx +0 -63
- package/src/stories/Components/Inputs/Select/Examples.stories.tsx +0 -803
- package/src/stories/Components/Inputs/Select/Overview.stories.mdx +0 -73
- package/src/stories/Components/Inputs/Select/Select.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Slider/Accessibility.stories.mdx +0 -43
- package/src/stories/Components/Inputs/Slider/AllCombinations.tsx +0 -30
- package/src/stories/Components/Inputs/Slider/Examples.stories.tsx +0 -146
- package/src/stories/Components/Inputs/Slider/Overview.stories.mdx +0 -59
- package/src/stories/Components/Inputs/Slider/Slider.stories.tsx +0 -27
- package/src/stories/Components/Inputs/Switch/Accessibility.stories.mdx +0 -34
- package/src/stories/Components/Inputs/Switch/AllCombinations.tsx +0 -45
- package/src/stories/Components/Inputs/Switch/Examples.stories.tsx +0 -213
- package/src/stories/Components/Inputs/Switch/Overview.stories.mdx +0 -62
- package/src/stories/Components/Inputs/Switch/Switch.stories.tsx +0 -22
- package/src/stories/Components/Inputs/TextField/Accessibility.stories.mdx +0 -29
- package/src/stories/Components/Inputs/TextField/AllCombinations.tsx +0 -57
- package/src/stories/Components/Inputs/TextField/Examples.stories.tsx +0 -127
- package/src/stories/Components/Inputs/TextField/Overview.stories.mdx +0 -60
- package/src/stories/Components/Inputs/TextField/TextField.stories.tsx +0 -261
- package/src/stories/Components/Inputs/ToggleButton/Accessibility.stories.mdx +0 -32
- package/src/stories/Components/Inputs/ToggleButton/AllCombinations.tsx +0 -113
- package/src/stories/Components/Inputs/ToggleButton/Examples.stories.tsx +0 -339
- package/src/stories/Components/Inputs/ToggleButton/Overview.stories.mdx +0 -55
- package/src/stories/Components/Inputs/ToggleButton/ToggleButton.stories.tsx +0 -19
- package/src/stories/Components/Landmarks/Header/Examples.stories.tsx +0 -197
- package/src/stories/Components/Landmarks/Header/Header.stories.tsx +0 -34
- package/src/stories/Components/Landmarks/Header/Overview.stories.mdx +0 -44
- package/src/stories/Components/Navigation/Drawer/Accessibility.stories.mdx +0 -13
- package/src/stories/Components/Navigation/Drawer/Drawer.stories.tsx +0 -80
- package/src/stories/Components/Navigation/Drawer/Examples.stories.tsx +0 -440
- package/src/stories/Components/Navigation/Drawer/Overview.stories.mdx +0 -43
- package/src/stories/Components/Navigation/MobileNavigation/Accessibility.stories.mdx +0 -14
- package/src/stories/Components/Navigation/MobileNavigation/Examples.stories.tsx +0 -384
- package/src/stories/Components/Navigation/MobileNavigation/MobileNavigation.stories.tsx +0 -24
- package/src/stories/Components/Navigation/MobileNavigation/Overview.stories.mdx +0 -47
- package/src/stories/Components/Navigation/VerticalNavigation/Accessibility.stories.mdx +0 -14
- package/src/stories/Components/Navigation/VerticalNavigation/Examples.stories.tsx +0 -307
- package/src/stories/Components/Navigation/VerticalNavigation/Overview.stories.mdx +0 -47
- package/src/stories/Components/Navigation/VerticalNavigation/VerticalNavigation.stories.tsx +0 -24
- package/src/stories/ContactUs.stories.mdx +0 -21
- package/src/stories/Experimental/Test.stories.mdx +0 -46
- package/src/stories/GettingStarted/Designer.stories.mdx +0 -86
- package/src/stories/GettingStarted/Developer.stories.mdx +0 -134
- package/src/stories/Guidelines/Accessibility/AssistiveTechnology.stories.mdx +0 -70
- package/src/stories/Guidelines/Accessibility/ColorAndContrast.stories.mdx +0 -109
- package/src/stories/Guidelines/Accessibility/Hierarchy.stories.mdx +0 -119
- package/src/stories/Guidelines/Accessibility/Imagery.stories.mdx +0 -136
- package/src/stories/Guidelines/Accessibility/Overview.stories.mdx +0 -44
- package/src/stories/Guidelines/Accessibility/Principles.stories.mdx +0 -156
- package/src/stories/Guidelines/Accessibility/SoundAndMotion.stories.mdx +0 -59
- package/src/stories/Guidelines/Accessibility/Typography.stories.mdx +0 -69
- package/src/stories/Guidelines/Accessibility/Writing.stories.mdx +0 -188
- package/src/stories/Guidelines/Styleguide/ColorSwatch.tsx +0 -53
- package/src/stories/Guidelines/Styleguide/Colors.stories.mdx +0 -118
- package/src/stories/Guidelines/Styleguide/Typography.stories.mdx +0 -84
- package/src/stories/Introduction.stories.mdx +0 -65
- package/src/stories/Pages/ErrorPage.stories.tsx +0 -30
- package/src/stories/Pages/SideInSide.stories.tsx +0 -195
- package/src/stories/Roadmap.stories.mdx +0 -19
- package/src/stories/Templates/Login.stories.mdx +0 -46
- package/src/stories/assets/Atomic_Design_Icons-Dark.svg +0 -24
- package/src/stories/assets/Atomic_Design_Icons-Light.svg +0 -25
- package/src/stories/assets/accessibility-1.png +0 -0
- package/src/stories/assets/accessibility-2.png +0 -0
- package/src/stories/assets/accessibility-3.png +0 -0
- package/src/stories/assets/accessibility-banner.png +0 -0
- package/src/stories/assets/atoms.svg +0 -6
- package/src/stories/assets/design_system_2022-02-11_12.22pm.png +0 -0
- package/src/stories/assets/figma-tokens.png +0 -0
- package/src/stories/assets/hierarchy-1.jpg +0 -0
- package/src/stories/assets/hierarchy-2.jpg +0 -0
- package/src/stories/assets/hierarchy-3.jpg +0 -0
- package/src/stories/assets/icon-contrast-1.jpg +0 -0
- package/src/stories/assets/icon-contrast-2.jpg +0 -0
- package/src/stories/assets/imagery-1.png +0 -0
- package/src/stories/assets/imagery-2.png +0 -0
- package/src/stories/assets/imagery-3.png +0 -0
- package/src/stories/assets/imagery-4.jpg +0 -0
- package/src/stories/assets/molecules.svg +0 -9
- package/src/stories/assets/organisms.svg +0 -22
- package/src/stories/assets/pages.svg +0 -5
- package/src/stories/assets/particles.svg +0 -4
- package/src/stories/assets/templates.svg +0 -4
- package/src/stories/assets/testData.tsx +0 -102
- package/src/stories/assets/text-contrast-1.jpg +0 -0
- package/src/stories/assets/text-contrast-2.jpg +0 -0
- package/src/stories/assets/typography-1.png +0 -0
- package/src/stories/assets/visual-clues-1.png +0 -0
- package/src/stories/assets/visual-clues-2.png +0 -0
- package/src/stories/assets/writing-1.jpg +0 -0
- package/src/stories/assets/writing-2.png +0 -0
- package/src/stories/assets/writing-3.png +0 -0
- package/src/stories/assets/writing-4.png +0 -0
- package/src/stories/utils/CustomIcons.tsx +0 -44
- package/tsconfig.eslint.json +0 -16
- package/tsconfig.json +0 -50
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react'
|
|
2
|
-
import { useTheme } from '@mui/material/styles'
|
|
3
|
-
import {
|
|
4
|
-
Avatar, List, Tooltip
|
|
5
|
-
} from '../../../index'
|
|
6
|
-
import { Box, Modal } from '@mui/material'
|
|
7
|
-
import { StreamSuiteLogo, NotchSVG, NotchExtendSVG } from '../../../assets/Images'
|
|
8
|
-
import AppSwitcher from '../../stream/AppSwitcher/AppSwitcher'
|
|
9
|
-
import { Apps, ChevronLeft, ChevronRight, PushPin } from '@mui/icons-material'
|
|
10
|
-
import VerticalNavigationItem from './VerticalNavigationItem/VerticalNavigationItem'
|
|
11
|
-
import {
|
|
12
|
-
DRAWER_WIDTH, DrawerHeader, DrawerToggle, DrawerToggleHitboxContent,
|
|
13
|
-
StyledDivider, StyledNav, StyledNavSecondary, DrawerShadow, StyledAside,
|
|
14
|
-
NotchContainer, NotchBackground, NotchBackgroundClip, NotchSeemMask,
|
|
15
|
-
StyledDrawer
|
|
16
|
-
} from './VerticalNavigationStyles'
|
|
17
|
-
import { ListItemText } from './VerticalNavigationItem/VerticalNavigationItemStyles'
|
|
18
|
-
import AvatarPanel from './VerticalNavigationAvatar'
|
|
19
|
-
import { motion } from '../../../utils/theme'
|
|
20
|
-
import { handleAvatarInitials, useFadeIn } from '../../../utils/helpers'
|
|
21
|
-
import { DEFAULT_REACT_APP_ID } from '../../../utils/constants'
|
|
22
|
-
import { IApplication, IAvatarMenuItemProps, IVerticalNavigationItemProps } from '../../../types'
|
|
23
|
-
import { animated } from '@react-spring/web'
|
|
24
|
-
|
|
25
|
-
interface VerticalNavigationProps {
|
|
26
|
-
logo?: string
|
|
27
|
-
logoText?: string
|
|
28
|
-
logoOnClick?: any
|
|
29
|
-
items?: IVerticalNavigationItemProps[]
|
|
30
|
-
secondaryItems?: IVerticalNavigationItemProps[]
|
|
31
|
-
hasStreamHome?: boolean
|
|
32
|
-
streamHomeAccessToken?: string
|
|
33
|
-
streamHomeBaseUrl?: string
|
|
34
|
-
streamHomeApiKey?: string
|
|
35
|
-
streamHomeApplications?: IApplication[]
|
|
36
|
-
avatarName?: string
|
|
37
|
-
isDrawerOpen?: boolean
|
|
38
|
-
isPersistent?: boolean
|
|
39
|
-
setIsPersistent?: any
|
|
40
|
-
appRootID?: string
|
|
41
|
-
|
|
42
|
-
// Avatar panel props
|
|
43
|
-
hasAvatar?: boolean
|
|
44
|
-
avatarPanelLogoutString?: string
|
|
45
|
-
avatarPanelOnClickSwitchDirection?: any
|
|
46
|
-
avatarPanelOnClickLogout?: any
|
|
47
|
-
avatarPanelOnClickViewProfile?: any
|
|
48
|
-
avatarPanelViewProfileString?: string
|
|
49
|
-
avatarPanelOnClickEditProfile?: any
|
|
50
|
-
avatarPanelEditProfileString?: string
|
|
51
|
-
avatarPanelMenuItems?: Array<IAvatarMenuItemProps>
|
|
52
|
-
avatarPanelOnClickMainAction?: any
|
|
53
|
-
avatarPanelMainActionString?: string
|
|
54
|
-
avatarPanelSettingItems?: Array<IAvatarMenuItemProps>
|
|
55
|
-
avatarPanelFootnote?: any
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const VerticalNavigation = (
|
|
59
|
-
props: VerticalNavigationProps
|
|
60
|
-
): React.ReactElement => {
|
|
61
|
-
const theme = useTheme()
|
|
62
|
-
const {
|
|
63
|
-
items, secondaryItems, logo, logoText, logoOnClick, appRootID,
|
|
64
|
-
hasStreamHome, streamHomeApiKey, streamHomeBaseUrl,
|
|
65
|
-
streamHomeAccessToken, streamHomeApplications, ...rest
|
|
66
|
-
} = props
|
|
67
|
-
const propIsDrawerOpen = typeof props?.isDrawerOpen === 'boolean' ? props.isDrawerOpen : undefined
|
|
68
|
-
const propIsPersistent = typeof props?.isPersistent === 'boolean' ? props.isPersistent : undefined
|
|
69
|
-
const avatarName = props?.avatarName ?? 'Avatar name'
|
|
70
|
-
|
|
71
|
-
const [isDrawerOpen, setIsDrawerOpen] = React.useState(propIsDrawerOpen ?? false)
|
|
72
|
-
const [isAvatarOpen, setIsAvatarOpen] = React.useState(false)
|
|
73
|
-
const [isPersistent, setIsPersistent] = React.useState(propIsPersistent ?? false)
|
|
74
|
-
|
|
75
|
-
// Controls whether the application panel is open or not.
|
|
76
|
-
const [isAppSwitcherOpen, setIsAppSwitcherOpen] = React.useState(false)
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Toggles display of the Stream suite application dialog.
|
|
80
|
-
*/
|
|
81
|
-
const handleToggleAppsClick = (): void => {
|
|
82
|
-
setIsAppSwitcherOpen(!isAppSwitcherOpen)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const logoHeight = 38
|
|
86
|
-
const logoWidth = 38
|
|
87
|
-
|
|
88
|
-
useEffect(() => setIsDrawerOpen(propIsDrawerOpen ?? false), [propIsDrawerOpen])
|
|
89
|
-
useEffect(() => setIsDrawerOpen(propIsPersistent ?? false), [propIsPersistent])
|
|
90
|
-
useEffect(() => setAvatarInitials(handleAvatarInitials(avatarName)), [avatarName])
|
|
91
|
-
|
|
92
|
-
// This fixes an issue with how MUI handles the modal and aria-hidden.
|
|
93
|
-
// When open, the Modal adds aria-hidden="true" to a top-level element,
|
|
94
|
-
// which causes some screen readers to annouce the elements as "blank".
|
|
95
|
-
// This fix just overrides the default aria-hidden attribute.
|
|
96
|
-
//
|
|
97
|
-
// https://github.com/mui/material-ui/issues/19450
|
|
98
|
-
useEffect(() => {
|
|
99
|
-
if (isDrawerOpen) {
|
|
100
|
-
const root = window.document.getElementById(appRootID ?? DEFAULT_REACT_APP_ID)
|
|
101
|
-
root?.removeAttribute('aria-hidden')
|
|
102
|
-
}
|
|
103
|
-
}, [isDrawerOpen])
|
|
104
|
-
|
|
105
|
-
const handleIsPersistent = (): void => {
|
|
106
|
-
if (props?.setIsPersistent) {
|
|
107
|
-
props.setIsPersistent(!propIsPersistent ?? false)
|
|
108
|
-
setIsPersistent(!propIsPersistent ?? false)
|
|
109
|
-
return
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
setIsPersistent(propIsPersistent ?? false)
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const [avatarInitials, setAvatarInitials] = React.useState(handleAvatarInitials(avatarName) ?? 'AN')
|
|
116
|
-
|
|
117
|
-
const toggleDrawer = (open: boolean) => (event: React.KeyboardEvent | React.MouseEvent) => {
|
|
118
|
-
event?.stopPropagation()
|
|
119
|
-
|
|
120
|
-
if (event.type === 'keydown') {
|
|
121
|
-
if ((event as React.KeyboardEvent).key === 'Tab' || (event as React.KeyboardEvent).key === 'Shift') {
|
|
122
|
-
return
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
setIsAppSwitcherOpen(false)
|
|
127
|
-
setIsDrawerOpen(open ?? !isDrawerOpen)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// First item starts at 70ms
|
|
131
|
-
// see STAGGER_ITEMS_DELAY in helpers.js
|
|
132
|
-
let animationCount = 1
|
|
133
|
-
const incrementAnimationCount = () => animationCount++
|
|
134
|
-
|
|
135
|
-
const listContent = (): React.ReactElement => (
|
|
136
|
-
<Box
|
|
137
|
-
sx={{
|
|
138
|
-
display: 'flex',
|
|
139
|
-
flex: '1 auto',
|
|
140
|
-
flexDirection: 'column',
|
|
141
|
-
justifyContent: 'flex-start',
|
|
142
|
-
'.wrapper': {
|
|
143
|
-
display: 'flex',
|
|
144
|
-
position: 'relative'
|
|
145
|
-
},
|
|
146
|
-
'.wrapper > :not(:first-child)': {
|
|
147
|
-
position: 'absolute',
|
|
148
|
-
right: 0,
|
|
149
|
-
background: 'transparent',
|
|
150
|
-
fontSize: 0
|
|
151
|
-
}
|
|
152
|
-
}}
|
|
153
|
-
className='grid-container'
|
|
154
|
-
>
|
|
155
|
-
<div
|
|
156
|
-
className='wrapper'
|
|
157
|
-
style={{
|
|
158
|
-
backgroundColor: theme.palette.mode === 'dark'
|
|
159
|
-
? theme.palette.primary.main
|
|
160
|
-
: theme.palette.background.paper
|
|
161
|
-
}}
|
|
162
|
-
>
|
|
163
|
-
<DrawerHeader
|
|
164
|
-
onClick={logoOnClick ?? null}
|
|
165
|
-
isDrawerOpen={isDrawerOpen || isPersistent}
|
|
166
|
-
style={useFadeIn(animationCount, incrementAnimationCount)}
|
|
167
|
-
>
|
|
168
|
-
<Tooltip
|
|
169
|
-
disableHoverListener={isDrawerOpen || isPersistent}
|
|
170
|
-
disableFocusListener={isDrawerOpen || isPersistent}
|
|
171
|
-
disableTouchListener={isDrawerOpen || isPersistent}
|
|
172
|
-
title={logoText ?? ''}
|
|
173
|
-
placement={theme.direction === 'rtl' ? 'left' : 'right'}
|
|
174
|
-
>
|
|
175
|
-
{logo
|
|
176
|
-
? typeof logo === 'string'
|
|
177
|
-
? (
|
|
178
|
-
<img
|
|
179
|
-
src={logo}
|
|
180
|
-
height={`${logoHeight}px`}
|
|
181
|
-
width={`${logoWidth}px`}
|
|
182
|
-
style={{
|
|
183
|
-
marginRight: '16px'
|
|
184
|
-
}}
|
|
185
|
-
alt="Site Logo"
|
|
186
|
-
/>)
|
|
187
|
-
: logo
|
|
188
|
-
: (
|
|
189
|
-
<StreamSuiteLogo style={{
|
|
190
|
-
height: `${logoHeight}px`,
|
|
191
|
-
width: `${logoWidth}px`,
|
|
192
|
-
marginRight: '16px',
|
|
193
|
-
fill: theme.palette.mode === 'dark'
|
|
194
|
-
? theme.palette.primary.contrastText
|
|
195
|
-
: theme.palette.primary.main
|
|
196
|
-
}} />)}
|
|
197
|
-
</Tooltip>
|
|
198
|
-
<ListItemText primary={logoText ?? ''} isDrawerOpen={isDrawerOpen || isPersistent} />
|
|
199
|
-
</DrawerHeader>
|
|
200
|
-
</div>
|
|
201
|
-
|
|
202
|
-
<div className='wrapper'>
|
|
203
|
-
<NotchContainer sx={{ height: '85px', position: 'relative !important' }}>
|
|
204
|
-
<NotchBackground />
|
|
205
|
-
{!isPersistent && <NotchBackgroundClip />}
|
|
206
|
-
<NotchSeemMask />
|
|
207
|
-
</NotchContainer>
|
|
208
|
-
{!isPersistent && <DrawerToggle
|
|
209
|
-
onClick={toggleDrawer(!isDrawerOpen)}
|
|
210
|
-
aria-label={isDrawerOpen ? 'Close Navigation' : 'Open Navigation'}
|
|
211
|
-
aria-expanded={isDrawerOpen ? 'true' : 'false'}
|
|
212
|
-
aria-controls="vertical-navigation"
|
|
213
|
-
// @ts-expect-error
|
|
214
|
-
component={animated.button}
|
|
215
|
-
style={{
|
|
216
|
-
...useFadeIn(animationCount, incrementAnimationCount),
|
|
217
|
-
transform: 'translate(22px, calc(50% - 5.5px))'
|
|
218
|
-
}}
|
|
219
|
-
>
|
|
220
|
-
<DrawerToggleHitboxContent>
|
|
221
|
-
{isDrawerOpen
|
|
222
|
-
? (
|
|
223
|
-
<ChevronLeft style={{
|
|
224
|
-
fontSize: '1.75rem',
|
|
225
|
-
height: '1.75rem',
|
|
226
|
-
width: '1.75rem'
|
|
227
|
-
}} />)
|
|
228
|
-
: (
|
|
229
|
-
<ChevronRight style={{
|
|
230
|
-
fontSize: '1.75rem',
|
|
231
|
-
height: '1.75rem',
|
|
232
|
-
width: '1.75rem'
|
|
233
|
-
}} />)}
|
|
234
|
-
</DrawerToggleHitboxContent>
|
|
235
|
-
</DrawerToggle>}
|
|
236
|
-
|
|
237
|
-
<Box style={{
|
|
238
|
-
borderRadius: '50%',
|
|
239
|
-
boxShadow: '5px 0 15px 0 rgb(0 0 0 / 10%)',
|
|
240
|
-
display: 'none',
|
|
241
|
-
height: '50px',
|
|
242
|
-
left: '12px',
|
|
243
|
-
position: 'fixed',
|
|
244
|
-
right: 'auto !important',
|
|
245
|
-
top: '50%',
|
|
246
|
-
transform: 'translate(50%, -50%)',
|
|
247
|
-
width: '50px'
|
|
248
|
-
}} />
|
|
249
|
-
<DrawerToggle
|
|
250
|
-
onClick={handleIsPersistent}
|
|
251
|
-
aria-label={isDrawerOpen ? 'Close Navigation' : 'Open Navigation'}
|
|
252
|
-
aria-expanded={isDrawerOpen ? 'true' : 'false'}
|
|
253
|
-
aria-controls="vertical-navigation"
|
|
254
|
-
style={{
|
|
255
|
-
display: 'none',
|
|
256
|
-
position: 'fixed',
|
|
257
|
-
top: '50%',
|
|
258
|
-
transform: 'translate(50%, -50%)',
|
|
259
|
-
zIndex: 10
|
|
260
|
-
}}
|
|
261
|
-
>
|
|
262
|
-
<NotchExtendSVG style={{
|
|
263
|
-
display: 'block',
|
|
264
|
-
fill: theme.palette.mode === 'dark'
|
|
265
|
-
? theme.palette.primary.main
|
|
266
|
-
: theme.palette.background.paper,
|
|
267
|
-
height: '165px',
|
|
268
|
-
left: '-12px',
|
|
269
|
-
padding: '0',
|
|
270
|
-
position: 'absolute',
|
|
271
|
-
top: '-61px',
|
|
272
|
-
transition: 'none',
|
|
273
|
-
width: '90px',
|
|
274
|
-
zIndex: '-1'
|
|
275
|
-
}} />
|
|
276
|
-
<DrawerToggleHitboxContent style={{
|
|
277
|
-
background: 'transparent',
|
|
278
|
-
boxShadow: 'none',
|
|
279
|
-
fontSize: '1.3rem',
|
|
280
|
-
height: '1.3rem',
|
|
281
|
-
padding: theme.spacing(1),
|
|
282
|
-
width: '1.3rem'
|
|
283
|
-
}}>
|
|
284
|
-
{isPersistent
|
|
285
|
-
? (
|
|
286
|
-
<PushPin style={{
|
|
287
|
-
fontSize: '1.3rem',
|
|
288
|
-
height: '1.3rem',
|
|
289
|
-
width: '1.3rem'
|
|
290
|
-
}} />)
|
|
291
|
-
: (
|
|
292
|
-
<PushPin style={{
|
|
293
|
-
fontSize: '1.3rem',
|
|
294
|
-
height: '1.3rem',
|
|
295
|
-
width: '1.3rem'
|
|
296
|
-
}} />)}
|
|
297
|
-
</DrawerToggleHitboxContent>
|
|
298
|
-
</DrawerToggle>
|
|
299
|
-
</div>
|
|
300
|
-
|
|
301
|
-
<NotchSVG style={{ height: '0', position: 'absolute', width: '0' }} />
|
|
302
|
-
|
|
303
|
-
<div
|
|
304
|
-
className='wrapper'
|
|
305
|
-
style={{
|
|
306
|
-
backgroundColor: theme.palette.mode === 'dark'
|
|
307
|
-
? theme.palette.primary.main
|
|
308
|
-
: theme.palette.background.paper,
|
|
309
|
-
flex: '1 1px',
|
|
310
|
-
marginTop: '-1px',
|
|
311
|
-
overflow: 'auto',
|
|
312
|
-
position: 'relative'
|
|
313
|
-
}}
|
|
314
|
-
>
|
|
315
|
-
<StyledNav tabIndex={-1} aria-label='Primary'>
|
|
316
|
-
<List
|
|
317
|
-
style={{
|
|
318
|
-
height: '100%',
|
|
319
|
-
width: DRAWER_WIDTH.Expanded,
|
|
320
|
-
marginTop: `-${theme.spacing(0.5)} !important`
|
|
321
|
-
}}
|
|
322
|
-
>
|
|
323
|
-
{items && items.length > 0 && items.map((item, index) => (
|
|
324
|
-
<VerticalNavigationItem
|
|
325
|
-
{...item}
|
|
326
|
-
index={index}
|
|
327
|
-
isDrawerOpen={isDrawerOpen || isPersistent}
|
|
328
|
-
style={useFadeIn(animationCount, incrementAnimationCount)}
|
|
329
|
-
/>
|
|
330
|
-
))}
|
|
331
|
-
</List>
|
|
332
|
-
</StyledNav>
|
|
333
|
-
</div>
|
|
334
|
-
|
|
335
|
-
<div
|
|
336
|
-
className='wrapper'
|
|
337
|
-
style={{
|
|
338
|
-
backgroundColor: theme.palette.mode === 'dark'
|
|
339
|
-
? theme.palette.primary.main
|
|
340
|
-
: theme.palette.background.paper
|
|
341
|
-
}}
|
|
342
|
-
>
|
|
343
|
-
<StyledNavSecondary
|
|
344
|
-
aria-label='Secondary'
|
|
345
|
-
// style={{ height: secondaryItems && secondaryItems.length > 0 ? `${logoHeight * (secondaryItems.length + 1)}px` : logoHeight }}
|
|
346
|
-
>
|
|
347
|
-
<StyledDivider isDrawerOpen={isDrawerOpen || isPersistent}/>
|
|
348
|
-
<List
|
|
349
|
-
style={{
|
|
350
|
-
width: DRAWER_WIDTH.Expanded,
|
|
351
|
-
backgroundColor: theme.palette.mode === 'dark'
|
|
352
|
-
? theme.palette.primary.main
|
|
353
|
-
: theme.palette.background.paper
|
|
354
|
-
}}
|
|
355
|
-
>
|
|
356
|
-
{hasStreamHome
|
|
357
|
-
? (
|
|
358
|
-
<VerticalNavigationItem
|
|
359
|
-
label='App Switcher'
|
|
360
|
-
icon={<Apps />}
|
|
361
|
-
onClick={handleToggleAppsClick}
|
|
362
|
-
content={(
|
|
363
|
-
<AppSwitcher
|
|
364
|
-
isAppSwitcherOpen={isAppSwitcherOpen}
|
|
365
|
-
setIsAppSwitcherOpen={setIsAppSwitcherOpen}
|
|
366
|
-
applications={streamHomeApplications}
|
|
367
|
-
apiKey={streamHomeApiKey ?? ''}
|
|
368
|
-
baseUrl={streamHomeBaseUrl ?? ''}
|
|
369
|
-
token={streamHomeAccessToken ?? ''}
|
|
370
|
-
isDrawerOpen={isDrawerOpen}
|
|
371
|
-
/>
|
|
372
|
-
)}
|
|
373
|
-
isDrawerOpen={isDrawerOpen || isPersistent}
|
|
374
|
-
isSecondary
|
|
375
|
-
hasCustomContent
|
|
376
|
-
style={useFadeIn(animationCount, incrementAnimationCount)}
|
|
377
|
-
/>
|
|
378
|
-
)
|
|
379
|
-
: null}
|
|
380
|
-
|
|
381
|
-
{secondaryItems && secondaryItems.length > 0 && secondaryItems.map((item, index) => (
|
|
382
|
-
<VerticalNavigationItem
|
|
383
|
-
{...item}
|
|
384
|
-
index={index}
|
|
385
|
-
isDrawerOpen={isDrawerOpen || isPersistent}
|
|
386
|
-
isSecondary
|
|
387
|
-
style={useFadeIn(animationCount, incrementAnimationCount)}
|
|
388
|
-
/>
|
|
389
|
-
))}
|
|
390
|
-
|
|
391
|
-
{avatarName
|
|
392
|
-
? (
|
|
393
|
-
<VerticalNavigationItem
|
|
394
|
-
label={avatarName}
|
|
395
|
-
aria-controls='avatar-panel'
|
|
396
|
-
icon={<Avatar
|
|
397
|
-
style={{
|
|
398
|
-
// backgroundColor: mainTheme.colorButtonText,
|
|
399
|
-
// color: mainTheme.colorButton,
|
|
400
|
-
fontSize: '0.75rem',
|
|
401
|
-
height: 32,
|
|
402
|
-
width: 32
|
|
403
|
-
}}
|
|
404
|
-
>
|
|
405
|
-
{avatarInitials}
|
|
406
|
-
</Avatar>}
|
|
407
|
-
style={{
|
|
408
|
-
maxHeight: isDrawerOpen ? '200px' : '48px',
|
|
409
|
-
overflow: 'hidden',
|
|
410
|
-
padding: 0,
|
|
411
|
-
minHeight: 52,
|
|
412
|
-
transition: `max-height 225ms ${motion.easeInOut} 0ms !important`,
|
|
413
|
-
...useFadeIn(animationCount, incrementAnimationCount)
|
|
414
|
-
}}
|
|
415
|
-
onClick={() => setIsAvatarOpen(!isAvatarOpen)}
|
|
416
|
-
hasFlyout
|
|
417
|
-
fullHeightFlyout
|
|
418
|
-
content={<AvatarPanel
|
|
419
|
-
avatarName={avatarName}
|
|
420
|
-
isAvatarOpen={isAvatarOpen}
|
|
421
|
-
{...rest}
|
|
422
|
-
/>}
|
|
423
|
-
isDrawerOpen={isDrawerOpen}
|
|
424
|
-
/>)
|
|
425
|
-
: null}
|
|
426
|
-
</List>
|
|
427
|
-
</StyledNavSecondary>
|
|
428
|
-
</div>
|
|
429
|
-
{/* <NotchBackgroundSVG style={{ height: '0', position: 'absolute', width: '0' }} />
|
|
430
|
-
|
|
431
|
-
<svg id='notch-background-svg' viewBox="0 0 25 865" xmlns="http://www.w3.org/2000/svg" style={{ height: '0', position: 'absolute', width: '0' }}>
|
|
432
|
-
<path fill={theme.palette.mode === 'dark' ? theme.palette.primary.main : theme.palette.background.paper} fill-rule="evenodd" clip-rule="evenodd" d="M25 0H0V865H25V468.5V466.451C24.6432 460.704 21.3624 455.984 18.6792 453.948C9.58731 451.059 3 442.549 3 432.5C3 422.927 8.97844 414.75 17.4054 411.5H17C19.7393 410.587 24.563 405.088 25 398.049V396V0Z" />
|
|
433
|
-
</svg> */}
|
|
434
|
-
</Box>
|
|
435
|
-
)
|
|
436
|
-
|
|
437
|
-
return (
|
|
438
|
-
<StyledAside aria-label="Site navigation">
|
|
439
|
-
<DrawerShadow
|
|
440
|
-
className='drawerShadow'
|
|
441
|
-
aria-hidden='true'
|
|
442
|
-
isDrawerOpen={isDrawerOpen || isPersistent}
|
|
443
|
-
style={{
|
|
444
|
-
display: isPersistent ? 'none' : 'block'
|
|
445
|
-
}}
|
|
446
|
-
/>
|
|
447
|
-
<Modal
|
|
448
|
-
aria-hidden={false}
|
|
449
|
-
keepMounted={true}
|
|
450
|
-
disablePortal={true}
|
|
451
|
-
open={isDrawerOpen}
|
|
452
|
-
onClose={toggleDrawer(false)}
|
|
453
|
-
>
|
|
454
|
-
<StyledDrawer
|
|
455
|
-
id='vertical-navigation'
|
|
456
|
-
anchor='left'
|
|
457
|
-
open={isDrawerOpen || isPersistent}
|
|
458
|
-
onClose={toggleDrawer(false)}
|
|
459
|
-
variant='permanent'
|
|
460
|
-
>
|
|
461
|
-
{listContent()}
|
|
462
|
-
</StyledDrawer>
|
|
463
|
-
</Modal>
|
|
464
|
-
</StyledAside>
|
|
465
|
-
)
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
export default VerticalNavigation
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Box, ButtonGroup, Button, Link,
|
|
4
|
-
List, ListItem, ListItemIcon, ListItemText
|
|
5
|
-
} from '../../../index'
|
|
6
|
-
import {
|
|
7
|
-
StyledBox, StyledBoxProfile,
|
|
8
|
-
StyledAvatarName, StyledAvatar, StyledOutlineButton,
|
|
9
|
-
StyledBoxProfileEdit, StyledListItemButton
|
|
10
|
-
} from './VerticalNavigationAvatarStyles'
|
|
11
|
-
import { useTheme } from '@mui/material/styles'
|
|
12
|
-
import EditIcon from '@mui/icons-material/Edit'
|
|
13
|
-
import LogoutIcon from '@mui/icons-material/Logout'
|
|
14
|
-
import { handleAvatarInitials, useStaggerAnimation } from '../../../utils/helpers'
|
|
15
|
-
import { Person, Settings } from '@mui/icons-material'
|
|
16
|
-
import { IAvatarMenuItemProps, IAvatarPanelProps } from '../../../types'
|
|
17
|
-
import { animated } from '@react-spring/web'
|
|
18
|
-
|
|
19
|
-
const AvatarPanel = (
|
|
20
|
-
props: IAvatarPanelProps
|
|
21
|
-
): React.ReactElement => {
|
|
22
|
-
const theme = useTheme()
|
|
23
|
-
const {
|
|
24
|
-
avatarName, avatarPanelOnClickLogout, avatarPanelLogoutString,
|
|
25
|
-
avatarPanelOnClickViewProfile, avatarPanelViewProfileString,
|
|
26
|
-
avatarPanelOnClickEditProfile, avatarPanelEditProfileString,
|
|
27
|
-
avatarPanelMenuItems, avatarPanelOnClickMainAction,
|
|
28
|
-
avatarPanelMainActionString, avatarPanelSettingItems,
|
|
29
|
-
avatarPanelFootnote, isAvatarOpen
|
|
30
|
-
} = props
|
|
31
|
-
|
|
32
|
-
useEffect(() => setAvatarInitials(handleAvatarInitials(avatarName)), [
|
|
33
|
-
avatarName
|
|
34
|
-
])
|
|
35
|
-
|
|
36
|
-
const [avatarInitials, setAvatarInitials] = React.useState(
|
|
37
|
-
handleAvatarInitials(avatarName) ?? 'AN'
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
// First item starts at 70ms
|
|
41
|
-
// see STAGGER_ITEMS_DELAY in helpers.js
|
|
42
|
-
let animationCount = 1
|
|
43
|
-
const incrementAnimationCount = () => animationCount++
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<StyledBox>
|
|
47
|
-
{avatarPanelOnClickLogout && (
|
|
48
|
-
<Button
|
|
49
|
-
// @ts-expect-error
|
|
50
|
-
component={animated.button}
|
|
51
|
-
style={{
|
|
52
|
-
left: theme.direction === 'rtl' ? theme.spacing(1) : 'auto',
|
|
53
|
-
position: 'absolute',
|
|
54
|
-
right: theme.direction === 'rtl' ? 'auto' : theme.spacing(1),
|
|
55
|
-
top: theme.spacing(1),
|
|
56
|
-
...useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount)
|
|
57
|
-
}}
|
|
58
|
-
onClick={avatarPanelOnClickLogout}
|
|
59
|
-
startIcon={<LogoutIcon />}
|
|
60
|
-
variant='text'
|
|
61
|
-
color='inherit'
|
|
62
|
-
>
|
|
63
|
-
{avatarPanelLogoutString ?? 'Logout'}
|
|
64
|
-
</Button>
|
|
65
|
-
)}
|
|
66
|
-
|
|
67
|
-
<Box
|
|
68
|
-
style={{
|
|
69
|
-
alignItems: 'center',
|
|
70
|
-
display: 'flex',
|
|
71
|
-
flexDirection: 'column'
|
|
72
|
-
}}
|
|
73
|
-
>
|
|
74
|
-
<StyledBoxProfile style={useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount)}>
|
|
75
|
-
<StyledAvatar style={{ marginRight: '0.5rem' }}>
|
|
76
|
-
{avatarInitials}
|
|
77
|
-
</StyledAvatar>
|
|
78
|
-
<StyledAvatarName>
|
|
79
|
-
<span style={{ fontWeight: 300 }}>
|
|
80
|
-
Hi,</span> <strong>{avatarName.split(' ')[0]}
|
|
81
|
-
</strong>
|
|
82
|
-
</StyledAvatarName>
|
|
83
|
-
</StyledBoxProfile>
|
|
84
|
-
|
|
85
|
-
{avatarPanelOnClickViewProfile && (
|
|
86
|
-
<StyledBoxProfileEdit
|
|
87
|
-
style={{
|
|
88
|
-
flexDirection: 'row',
|
|
89
|
-
marginBottom: theme.spacing(2),
|
|
90
|
-
...useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount)
|
|
91
|
-
}}>
|
|
92
|
-
<ButtonGroup variant="contained" aria-label="split button">
|
|
93
|
-
<Button
|
|
94
|
-
variant='contained'
|
|
95
|
-
color='primary'
|
|
96
|
-
size='medium'
|
|
97
|
-
onClick={avatarPanelOnClickViewProfile}
|
|
98
|
-
startIcon={<Person />}
|
|
99
|
-
>{avatarPanelViewProfileString ?? 'View Profile'}</Button>
|
|
100
|
-
{avatarPanelOnClickEditProfile && (
|
|
101
|
-
<Button
|
|
102
|
-
size='medium'
|
|
103
|
-
aria-label={avatarPanelEditProfileString ?? 'Edit Profile'}
|
|
104
|
-
onClick={avatarPanelOnClickEditProfile}
|
|
105
|
-
>
|
|
106
|
-
<EditIcon />
|
|
107
|
-
</Button>
|
|
108
|
-
)}
|
|
109
|
-
</ButtonGroup>
|
|
110
|
-
</StyledBoxProfileEdit>
|
|
111
|
-
)}
|
|
112
|
-
</Box>
|
|
113
|
-
|
|
114
|
-
<Box
|
|
115
|
-
style={{
|
|
116
|
-
alignItems: 'center',
|
|
117
|
-
display: 'flex',
|
|
118
|
-
flexDirection: 'column'
|
|
119
|
-
}}
|
|
120
|
-
>
|
|
121
|
-
{avatarPanelMenuItems && avatarPanelMenuItems.length > 0 && (
|
|
122
|
-
<List style={{
|
|
123
|
-
marginBottom: theme.spacing(2),
|
|
124
|
-
maxWidth: '14rem'
|
|
125
|
-
}}>
|
|
126
|
-
{avatarPanelMenuItems.map((avatarMenuItem: IAvatarMenuItemProps) => (
|
|
127
|
-
<ListItem
|
|
128
|
-
component={animated.div}
|
|
129
|
-
style={useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount)}
|
|
130
|
-
// whileHover={motionWhileHover}
|
|
131
|
-
// whileTap={motionWhileTap}
|
|
132
|
-
disablePadding
|
|
133
|
-
>
|
|
134
|
-
<StyledListItemButton
|
|
135
|
-
// TODO: figure out if these are links or buttons
|
|
136
|
-
// @ts-expect-error
|
|
137
|
-
component={Link}
|
|
138
|
-
role='link'
|
|
139
|
-
onClick={avatarMenuItem.onClick}
|
|
140
|
-
>
|
|
141
|
-
<ListItemIcon
|
|
142
|
-
aria-hidden={true}
|
|
143
|
-
style={{
|
|
144
|
-
minWidth: theme.spacing(5)
|
|
145
|
-
}}
|
|
146
|
-
>
|
|
147
|
-
{avatarMenuItem.icon}
|
|
148
|
-
</ListItemIcon>
|
|
149
|
-
<ListItemText primary={avatarMenuItem.label} />
|
|
150
|
-
</StyledListItemButton>
|
|
151
|
-
</ListItem>
|
|
152
|
-
))}
|
|
153
|
-
</List>
|
|
154
|
-
)}
|
|
155
|
-
|
|
156
|
-
{avatarPanelOnClickMainAction && <StyledOutlineButton
|
|
157
|
-
// @ts-expect-error
|
|
158
|
-
component={animated.button}
|
|
159
|
-
style={useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount)}
|
|
160
|
-
disablePadding
|
|
161
|
-
variant='outlined'
|
|
162
|
-
color='primary'
|
|
163
|
-
size='medium'
|
|
164
|
-
onClick={avatarPanelOnClickMainAction}
|
|
165
|
-
startIcon={<Settings />}
|
|
166
|
-
>{avatarPanelMainActionString}</StyledOutlineButton>}
|
|
167
|
-
|
|
168
|
-
<List style={{ marginBottom: theme.spacing(2) }}>
|
|
169
|
-
{avatarPanelSettingItems &&
|
|
170
|
-
avatarPanelSettingItems.length > 0 &&
|
|
171
|
-
avatarPanelSettingItems.map((avatarMenuItem: IAvatarMenuItemProps) => (
|
|
172
|
-
<ListItem
|
|
173
|
-
component={animated.div}
|
|
174
|
-
style={useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount)}
|
|
175
|
-
// whileHover={motionWhileHover}
|
|
176
|
-
// whileTap={motionWhileTap}
|
|
177
|
-
disablePadding
|
|
178
|
-
>
|
|
179
|
-
<StyledListItemButton
|
|
180
|
-
// TODO: figure out if these are links or buttons
|
|
181
|
-
// @ts-expect-error
|
|
182
|
-
component={Link}
|
|
183
|
-
role='link'
|
|
184
|
-
onClick={avatarMenuItem.onClick}
|
|
185
|
-
>
|
|
186
|
-
<ListItemIcon
|
|
187
|
-
aria-hidden={true}
|
|
188
|
-
style={{
|
|
189
|
-
minWidth: theme.spacing(5)
|
|
190
|
-
}}
|
|
191
|
-
>
|
|
192
|
-
{avatarMenuItem.icon}
|
|
193
|
-
</ListItemIcon>
|
|
194
|
-
<ListItemText primary={avatarMenuItem.label} />
|
|
195
|
-
</StyledListItemButton>
|
|
196
|
-
</ListItem>
|
|
197
|
-
))}
|
|
198
|
-
</List>
|
|
199
|
-
</Box>
|
|
200
|
-
|
|
201
|
-
<Box className='avatar-panel-footnote'>
|
|
202
|
-
{avatarPanelFootnote && avatarPanelFootnote}
|
|
203
|
-
</Box>
|
|
204
|
-
</StyledBox>
|
|
205
|
-
)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export default AvatarPanel
|