@learningpool/ui 1.6.0-beta.9 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +40 -0
- package/.github/pull_request_template.md +23 -0
- package/.github/renovate.json +57 -0
- package/.github/workflows/integration.yml +53 -0
- package/.github/workflows/wss.yml +22 -0
- package/.jest-test-results.json +1 -0
- package/.releaserc +32 -0
- package/.storybook/learningpoolTheme.js +39 -0
- package/.storybook/main.js +21 -0
- package/.storybook/manager-head.html +175 -0
- package/.storybook/manager.js +34 -0
- package/.storybook/preview-head.html +212 -0
- package/.storybook/preview.js +120 -0
- package/.storybook/storybook-sort.js +54 -0
- package/CHANGELOG.md +6 -0
- package/amplify.yml +16 -0
- package/babel.config.json +14 -0
- package/{assets → dist/assets}/Images.d.ts +0 -0
- package/{assets → dist/assets}/Images.js +0 -0
- package/{components → dist/components}/atoms/Autocomplete/Autocomplete.d.ts +0 -0
- package/{components → dist/components}/atoms/Autocomplete/Autocomplete.js +0 -0
- package/{components → dist/components}/atoms/Button/Button.d.ts +0 -0
- package/{components → dist/components}/atoms/Button/Button.js +0 -0
- package/{components → dist/components}/atoms/Checkbox/Checkbox.d.ts +0 -0
- package/{components → dist/components}/atoms/Checkbox/Checkbox.js +0 -0
- package/{components → dist/components}/atoms/IconButton/IconButton.d.ts +0 -0
- package/{components → dist/components}/atoms/IconButton/IconButton.js +0 -0
- package/{components → dist/components}/atoms/Radio/Radio.d.ts +0 -0
- package/{components → dist/components}/atoms/Radio/Radio.js +0 -0
- package/{components → dist/components}/atoms/Select/Select.d.ts +0 -0
- package/{components → dist/components}/atoms/Select/Select.js +0 -0
- package/{components → dist/components}/atoms/Slider/Slider.d.ts +0 -0
- package/{components → dist/components}/atoms/Slider/Slider.js +0 -0
- package/{components → dist/components}/atoms/Switch/Switch.d.ts +0 -0
- package/{components → dist/components}/atoms/Switch/Switch.js +0 -0
- package/{components → dist/components}/atoms/TextField/TextField.d.ts +0 -0
- package/{components → dist/components}/atoms/TextField/TextField.js +0 -0
- package/{components → dist/components}/atoms/ToggleButton/ToggleButton.d.ts +0 -0
- package/{components → dist/components}/atoms/ToggleButton/ToggleButton.js +0 -0
- package/{components → dist/components}/datadisplay/Avatar/Avatar.d.ts +0 -0
- package/{components → dist/components}/datadisplay/Avatar/Avatar.js +0 -0
- package/{components → dist/components}/datadisplay/Chip/Chip.d.ts +0 -0
- package/{components → dist/components}/datadisplay/Chip/Chip.js +0 -0
- package/{components → dist/components}/datadisplay/List/List.d.ts +0 -0
- package/{components → dist/components}/datadisplay/List/List.js +0 -0
- package/{components → dist/components}/datadisplay/Tooltip/Tooltip.d.ts +0 -0
- package/{components → dist/components}/datadisplay/Tooltip/Tooltip.js +0 -0
- package/{components → dist/components}/feedback/Alert/Alert.d.ts +0 -0
- package/{components → dist/components}/feedback/Alert/Alert.js +0 -0
- package/dist/components/landmarks/Header/Header.d.ts +26 -0
- package/dist/components/landmarks/Header/Header.js +75 -0
- package/dist/components/landmarks/Header/HeaderActionButtons.d.ts +3 -0
- package/dist/components/landmarks/Header/HeaderActionButtons.js +66 -0
- package/dist/components/landmarks/Header/HeaderStyles.d.ts +55 -0
- package/dist/components/landmarks/Header/HeaderStyles.js +13 -0
- package/{components → dist/components}/navigation/Drawer/Drawer.d.ts +0 -0
- package/{components → dist/components}/navigation/Drawer/Drawer.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigation.d.ts +1 -2
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigation.js +56 -86
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +1 -1
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationAvatar.js +45 -23
- package/dist/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +3296 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +4 -4
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +0 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationDrawer.js +71 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +1215 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +2 -2
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +1 -1
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +1 -1
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationMotion.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationMotion.js +0 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +3 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +19 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearch.d.ts +0 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearch.js +8 -6
- package/dist/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +1080 -0
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearchStyles.js +2 -2
- package/{components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts → dist/components/navigation/MobileNavigation/MobileNavigationStyles.d.ts} +66 -3
- package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationStyles.js +19 -24
- package/dist/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +3 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +28 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +3 -0
- package/dist/components/navigation/MobileNavigation/MobileNavigationToggleX.js +28 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigation.d.ts +3 -3
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigation.js +22 -25
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +4 -0
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +79 -0
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +3296 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +5 -5
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +4 -0
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +99 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +1 -1
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +1 -1
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +1 -1
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +1 -3
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +3 -5
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationMotion.d.ts +0 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationMotion.js +0 -0
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +1163 -0
- package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationStyles.js +5 -4
- package/{components → dist/components}/pages/ErrorPage/ErrorPage.d.ts +0 -0
- package/{components → dist/components}/pages/ErrorPage/ErrorPage.js +0 -0
- package/{components → dist/components}/pages/ErrorPage/ErrorPageStyles.d.ts +0 -0
- package/{components → dist/components}/pages/ErrorPage/ErrorPageStyles.js +0 -0
- package/{components → dist/components}/pages/SideInSide/SideInSide.d.ts +0 -0
- package/{components → dist/components}/pages/SideInSide/SideInSide.js +0 -0
- package/{components → dist/components}/pages/SideInSide/SideInSideStyles.d.ts +0 -0
- package/{components → dist/components}/pages/SideInSide/SideInSideStyles.js +0 -0
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcher.d.ts +1 -9
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcher.js +6 -6
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcherItem.d.ts +0 -0
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcherItem.js +0 -0
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcherStyles.d.ts +2 -2
- package/{components → dist/components}/stream/AppSwitcher/AppSwitcherStyles.js +16 -16
- package/{components → dist/components}/stream/AppSwitcher/constants.d.ts +0 -0
- package/{components → dist/components}/stream/AppSwitcher/constants.js +2 -2
- package/{index.d.ts → dist/index.d.ts} +1 -0
- package/{index.js → dist/index.js} +1 -0
- package/{lang → dist/lang}/en-us.d.ts +0 -0
- package/{lang → dist/lang}/en-us.js +0 -0
- package/dist/package.json +41 -0
- package/dist/types/components/navigation/VerticalNavigation.d.ts +49 -0
- package/dist/types/components/navigation/VerticalNavigation.js +1 -0
- package/{components/navigation/VerticalNavigation → dist/types/components/navigation}/VerticalNavigationAvatar.d.ts +3 -4
- package/dist/types/components/navigation/VerticalNavigationAvatar.js +1 -0
- package/dist/types/components/stream/AppSwitcher.d.ts +9 -0
- package/dist/types/components/stream/AppSwitcher.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/{utils → dist/utils}/constants.d.ts +1 -0
- package/dist/utils/constants.js +9 -0
- package/dist/utils/helpers.d.ts +21 -0
- package/dist/utils/helpers.js +64 -0
- package/{utils → dist/utils}/hooks.d.ts +0 -0
- package/{utils → dist/utils}/hooks.js +0 -0
- package/{utils → dist/utils}/index.d.ts +0 -0
- package/{utils → dist/utils}/index.js +0 -0
- package/{utils → dist/utils}/theme.d.ts +2 -2
- package/{utils → dist/utils}/theme.js +3 -3
- package/jest.config.ts +11 -0
- package/jest.setup.ts +5 -0
- package/{LICENSE → license} +0 -0
- package/merge.js +27 -0
- package/package.json +72 -5
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/assets/atoms.svg +5 -0
- package/public/assets/automation.svg +1 -0
- package/public/assets/avatar-1.jpg +0 -0
- package/public/assets/avatar-2.jpg +0 -0
- package/public/assets/avatar-3.jpg +0 -0
- package/public/assets/flux/icon-dark.svg +6 -0
- package/public/assets/flux/icon-light.svg +1 -0
- package/public/assets/flux/icon-white.svg +6 -0
- package/public/assets/flux/icon.svg +6 -0
- package/public/assets/flux/logo-dark.svg +22 -0
- package/public/assets/flux/logo-light.svg +1 -0
- package/public/assets/flux/logo-white.svg +22 -0
- package/public/assets/flux/logo.svg +22 -0
- package/public/assets/iPhone6.jpg +0 -0
- package/public/assets/iPhone6Plus.jpg +0 -0
- package/public/assets/lp-logo.png +0 -0
- package/public/assets/lplogo.svg +1 -0
- package/public/assets/molecules.svg +8 -0
- package/public/assets/organisms.svg +21 -0
- package/public/assets/pages.svg +4 -0
- package/public/assets/particles.svg +3 -0
- package/public/assets/stream-dark.png +0 -0
- package/public/assets/stream-suite-logo.svg +38 -0
- package/public/assets/stream-white.png +0 -0
- package/public/assets/stream.png +0 -0
- package/public/assets/templates.svg +3 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/public/site.webmanifest +1 -0
- package/{README.md → readme.md} +0 -0
- package/src/docs.tsx +167 -0
- package/src/lib/assets/Images.tsx +47 -0
- package/src/lib/assets/stream-suite-logo.svg +38 -0
- package/src/lib/components/atoms/Autocomplete/Autocomplete.test.tsx +179 -0
- package/src/lib/components/atoms/Autocomplete/Autocomplete.tsx +14 -0
- package/src/lib/components/atoms/Button/Button.test.tsx +166 -0
- package/src/lib/components/atoms/Button/Button.tsx +16 -0
- package/src/lib/components/atoms/Checkbox/Checkbox.test.tsx +85 -0
- package/src/lib/components/atoms/Checkbox/Checkbox.tsx +10 -0
- package/src/lib/components/atoms/IconButton/IconButton.test.tsx +60 -0
- package/src/lib/components/atoms/IconButton/IconButton.tsx +9 -0
- package/src/lib/components/atoms/Radio/Radio.test.tsx +136 -0
- package/src/lib/components/atoms/Radio/Radio.tsx +10 -0
- package/src/lib/components/atoms/Select/Select.test.tsx +158 -0
- package/src/lib/components/atoms/Select/Select.tsx +12 -0
- package/src/lib/components/atoms/Slider/Slider.test.tsx +103 -0
- package/src/lib/components/atoms/Slider/Slider.tsx +10 -0
- package/src/lib/components/atoms/Switch/Switch.test.tsx +96 -0
- package/src/lib/components/atoms/Switch/Switch.tsx +10 -0
- package/src/lib/components/atoms/TextField/TextField.test.tsx +131 -0
- package/src/lib/components/atoms/TextField/TextField.tsx +31 -0
- package/src/lib/components/atoms/ToggleButton/ToggleButton.test.tsx +122 -0
- package/src/lib/components/atoms/ToggleButton/ToggleButton.tsx +10 -0
- package/src/lib/components/datadisplay/Avatar/Avatar.test.tsx +187 -0
- package/src/lib/components/datadisplay/Avatar/Avatar.tsx +35 -0
- package/src/lib/components/datadisplay/Avatar/avatar-1.jpg +0 -0
- package/src/lib/components/datadisplay/Chip/Chip.test.tsx +82 -0
- package/src/lib/components/datadisplay/Chip/Chip.tsx +11 -0
- package/src/lib/components/datadisplay/List/List.test.tsx +168 -0
- package/src/lib/components/datadisplay/List/List.tsx +8 -0
- package/src/lib/components/datadisplay/Tooltip/Tooltip.test.tsx +98 -0
- package/src/lib/components/datadisplay/Tooltip/Tooltip.tsx +9 -0
- package/src/lib/components/feedback/Alert/Alert.test.tsx +139 -0
- package/src/lib/components/feedback/Alert/Alert.tsx +10 -0
- package/src/lib/components/landmarks/Header/Header.tsx +140 -0
- package/src/lib/components/landmarks/Header/HeaderActionButtons.tsx +117 -0
- package/src/lib/components/landmarks/Header/HeaderStyles.tsx +62 -0
- package/src/lib/components/navigation/Drawer/Drawer.test.tsx +95 -0
- package/src/lib/components/navigation/Drawer/Drawer.tsx +21 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigation.tsx +276 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatar.tsx +334 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.tsx +77 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawer.tsx +197 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.tsx +143 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.tsx +192 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.tsx +67 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.tsx +192 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.tsx +217 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationMotion.tsx +119 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.tsx +35 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearch.tsx +114 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearchStyles.tsx +47 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationStyles.tsx +320 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.tsx +59 -0
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleX.tsx +51 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigation.tsx +467 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatar.tsx +208 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.tsx +75 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.tsx +196 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.tsx +94 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.tsx +212 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.tsx +240 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationMotion.tsx +119 -0
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationStyles.tsx +303 -0
- package/src/lib/components/pages/ErrorPage/ErrorPage.test.tsx +78 -0
- package/src/lib/components/pages/ErrorPage/ErrorPage.tsx +50 -0
- package/src/lib/components/pages/ErrorPage/ErrorPageStyles.tsx +30 -0
- package/src/lib/components/pages/SideInSide/SideInSide.tsx +100 -0
- package/src/lib/components/pages/SideInSide/SideInSideStyles.tsx +62 -0
- package/src/lib/components/stream/AppSwitcher/AppSwitcher.tsx +392 -0
- package/src/lib/components/stream/AppSwitcher/AppSwitcherItem.tsx +83 -0
- package/src/lib/components/stream/AppSwitcher/AppSwitcherStyles.tsx +325 -0
- package/src/lib/components/stream/AppSwitcher/constants.tsx +28 -0
- package/src/lib/index.tsx +148 -0
- package/src/lib/lang/en-us.js +6 -0
- package/src/lib/types/components/navigation/VerticalNavigation.ts +52 -0
- package/src/lib/types/components/navigation/VerticalNavigationAvatar.ts +26 -0
- package/src/lib/types/components/stream/AppSwitcher.ts +10 -0
- package/src/lib/types/index.ts +9 -0
- package/src/lib/utils/constants.tsx +11 -0
- package/src/lib/utils/helpers.tsx +77 -0
- package/src/lib/utils/hooks.tsx +33 -0
- package/src/lib/utils/index.tsx +4 -0
- package/src/lib/utils/theme.tsx +79 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/setupTests.ts +5 -0
- package/src/stories/Components/DataDisplay/Avatar/Accessibility.stories.mdx +34 -0
- package/src/stories/Components/DataDisplay/Avatar/AllCombinations.tsx +56 -0
- package/src/stories/Components/DataDisplay/Avatar/Avatar.stories.tsx +19 -0
- package/src/stories/Components/DataDisplay/Avatar/Examples.stories.tsx +278 -0
- package/src/stories/Components/DataDisplay/Avatar/Overview.stories.mdx +47 -0
- package/src/stories/Components/DataDisplay/Chip/Accessibility.stories.mdx +29 -0
- package/src/stories/Components/DataDisplay/Chip/AllCombinations.tsx +58 -0
- package/src/stories/Components/DataDisplay/Chip/Chip.stories.tsx +21 -0
- package/src/stories/Components/DataDisplay/Chip/Examples.stories.tsx +126 -0
- package/src/stories/Components/DataDisplay/Chip/Overview.stories.mdx +57 -0
- package/src/stories/Components/DataDisplay/List/Accessibility.stories.mdx +54 -0
- package/src/stories/Components/DataDisplay/List/AllCombinations.tsx +396 -0
- package/src/stories/Components/DataDisplay/List/Examples.stories.tsx +501 -0
- package/src/stories/Components/DataDisplay/List/List.stories.tsx +35 -0
- package/src/stories/Components/DataDisplay/List/Overview.stories.mdx +69 -0
- package/src/stories/Components/DataDisplay/Table/Overview.stories.mdx +70 -0
- package/src/stories/Components/DataDisplay/Tooltip/Accessibility.stories.mdx +39 -0
- package/src/stories/Components/DataDisplay/Tooltip/AllCombinations.tsx +134 -0
- package/src/stories/Components/DataDisplay/Tooltip/Examples.stories.tsx +237 -0
- package/src/stories/Components/DataDisplay/Tooltip/Overview.stories.mdx +58 -0
- package/src/stories/Components/DataDisplay/Tooltip/Tooltip.stories.tsx +22 -0
- package/src/stories/Components/Feedback/Alert/Accessibility.stories.mdx +25 -0
- package/src/stories/Components/Feedback/Alert/Alert.stories.tsx +22 -0
- package/src/stories/Components/Feedback/Alert/AllCombinations.tsx +37 -0
- package/src/stories/Components/Feedback/Alert/Examples.stories.tsx +137 -0
- package/src/stories/Components/Feedback/Alert/Overview.stories.mdx +62 -0
- package/src/stories/Components/Inputs/Autocomplete/Accessibility.stories.mdx +31 -0
- package/src/stories/Components/Inputs/Autocomplete/AllCombinations.tsx +182 -0
- package/src/stories/Components/Inputs/Autocomplete/Autocomplete.stories.tsx +31 -0
- package/src/stories/Components/Inputs/Autocomplete/Examples.stories.tsx +233 -0
- package/src/stories/Components/Inputs/Autocomplete/Overview.stories.mdx +52 -0
- package/src/stories/Components/Inputs/Button/Accessibility.stories.mdx +52 -0
- package/src/stories/Components/Inputs/Button/AllCombinations.tsx +53 -0
- package/src/stories/Components/Inputs/Button/Button.stories.tsx +23 -0
- package/src/stories/Components/Inputs/Button/Examples.stories.tsx +190 -0
- package/src/stories/Components/Inputs/Button/Overview.stories.mdx +52 -0
- package/src/stories/Components/Inputs/Checkbox/Accessibility.stories.mdx +38 -0
- package/src/stories/Components/Inputs/Checkbox/AllCombinations.tsx +55 -0
- package/src/stories/Components/Inputs/Checkbox/Checkbox.stories.tsx +22 -0
- package/src/stories/Components/Inputs/Checkbox/Examples.stories.tsx +363 -0
- package/src/stories/Components/Inputs/Checkbox/Overview.stories.mdx +63 -0
- package/src/stories/Components/Inputs/IconButton/Examples.stories.tsx +24 -0
- package/src/stories/Components/Inputs/IconButton/IconButton.stories.tsx +26 -0
- package/src/stories/Components/Inputs/Radio/Accessibility.stories.mdx +61 -0
- package/src/stories/Components/Inputs/Radio/AllCombinations.tsx +75 -0
- package/src/stories/Components/Inputs/Radio/Examples.stories.tsx +333 -0
- package/src/stories/Components/Inputs/Radio/Overview.stories.mdx +74 -0
- package/src/stories/Components/Inputs/Radio/Radio.stories.tsx +22 -0
- package/src/stories/Components/Inputs/Select/Accessibility.stories.mdx +51 -0
- package/src/stories/Components/Inputs/Select/AllCombinations.tsx +63 -0
- package/src/stories/Components/Inputs/Select/Examples.stories.tsx +803 -0
- package/src/stories/Components/Inputs/Select/Overview.stories.mdx +73 -0
- package/src/stories/Components/Inputs/Select/Select.stories.tsx +22 -0
- package/src/stories/Components/Inputs/Slider/Accessibility.stories.mdx +43 -0
- package/src/stories/Components/Inputs/Slider/AllCombinations.tsx +30 -0
- package/src/stories/Components/Inputs/Slider/Examples.stories.tsx +146 -0
- package/src/stories/Components/Inputs/Slider/Overview.stories.mdx +59 -0
- package/src/stories/Components/Inputs/Slider/Slider.stories.tsx +27 -0
- package/src/stories/Components/Inputs/Switch/Accessibility.stories.mdx +34 -0
- package/src/stories/Components/Inputs/Switch/AllCombinations.tsx +45 -0
- package/src/stories/Components/Inputs/Switch/Examples.stories.tsx +213 -0
- package/src/stories/Components/Inputs/Switch/Overview.stories.mdx +62 -0
- package/src/stories/Components/Inputs/Switch/Switch.stories.tsx +22 -0
- package/src/stories/Components/Inputs/TextField/Accessibility.stories.mdx +29 -0
- package/src/stories/Components/Inputs/TextField/AllCombinations.tsx +57 -0
- package/src/stories/Components/Inputs/TextField/Examples.stories.tsx +127 -0
- package/src/stories/Components/Inputs/TextField/Overview.stories.mdx +60 -0
- package/src/stories/Components/Inputs/TextField/TextField.stories.tsx +261 -0
- package/src/stories/Components/Inputs/ToggleButton/Accessibility.stories.mdx +32 -0
- package/src/stories/Components/Inputs/ToggleButton/AllCombinations.tsx +113 -0
- package/src/stories/Components/Inputs/ToggleButton/Examples.stories.tsx +339 -0
- package/src/stories/Components/Inputs/ToggleButton/Overview.stories.mdx +55 -0
- package/src/stories/Components/Inputs/ToggleButton/ToggleButton.stories.tsx +19 -0
- package/src/stories/Components/Landmarks/Header/Examples.stories.tsx +197 -0
- package/src/stories/Components/Landmarks/Header/Header.stories.tsx +34 -0
- package/src/stories/Components/Landmarks/Header/Overview.stories.mdx +44 -0
- package/src/stories/Components/Navigation/Drawer/Accessibility.stories.mdx +13 -0
- package/src/stories/Components/Navigation/Drawer/Drawer.stories.tsx +80 -0
- package/src/stories/Components/Navigation/Drawer/Examples.stories.tsx +440 -0
- package/src/stories/Components/Navigation/Drawer/Overview.stories.mdx +43 -0
- package/src/stories/Components/Navigation/MobileNavigation/Accessibility.stories.mdx +14 -0
- package/src/stories/Components/Navigation/MobileNavigation/Examples.stories.tsx +384 -0
- package/src/stories/Components/Navigation/MobileNavigation/MobileNavigation.stories.tsx +24 -0
- package/src/stories/Components/Navigation/MobileNavigation/Overview.stories.mdx +47 -0
- package/src/stories/Components/Navigation/VerticalNavigation/Accessibility.stories.mdx +14 -0
- package/src/stories/Components/Navigation/VerticalNavigation/Examples.stories.tsx +307 -0
- package/src/stories/Components/Navigation/VerticalNavigation/Overview.stories.mdx +47 -0
- package/src/stories/Components/Navigation/VerticalNavigation/VerticalNavigation.stories.tsx +24 -0
- package/src/stories/ContactUs.stories.mdx +21 -0
- package/src/stories/Experimental/Test.stories.mdx +46 -0
- package/src/stories/GettingStarted/Designer.stories.mdx +86 -0
- package/src/stories/GettingStarted/Developer.stories.mdx +134 -0
- package/src/stories/Guidelines/Accessibility/AssistiveTechnology.stories.mdx +70 -0
- package/src/stories/Guidelines/Accessibility/ColorAndContrast.stories.mdx +109 -0
- package/src/stories/Guidelines/Accessibility/Hierarchy.stories.mdx +119 -0
- package/src/stories/Guidelines/Accessibility/Imagery.stories.mdx +136 -0
- package/src/stories/Guidelines/Accessibility/Overview.stories.mdx +44 -0
- package/src/stories/Guidelines/Accessibility/Principles.stories.mdx +156 -0
- package/src/stories/Guidelines/Accessibility/SoundAndMotion.stories.mdx +59 -0
- package/src/stories/Guidelines/Accessibility/Typography.stories.mdx +69 -0
- package/src/stories/Guidelines/Accessibility/Writing.stories.mdx +188 -0
- package/src/stories/Guidelines/Styleguide/ColorSwatch.tsx +53 -0
- package/src/stories/Guidelines/Styleguide/Colors.stories.mdx +118 -0
- package/src/stories/Guidelines/Styleguide/Typography.stories.mdx +84 -0
- package/src/stories/Introduction.stories.mdx +65 -0
- package/src/stories/Pages/ErrorPage.stories.tsx +30 -0
- package/src/stories/Pages/SideInSide.stories.tsx +195 -0
- package/src/stories/Roadmap.stories.mdx +19 -0
- package/src/stories/Templates/Login.stories.mdx +46 -0
- package/src/stories/assets/Atomic_Design_Icons-Dark.svg +24 -0
- package/src/stories/assets/Atomic_Design_Icons-Light.svg +25 -0
- package/src/stories/assets/accessibility-1.png +0 -0
- package/src/stories/assets/accessibility-2.png +0 -0
- package/src/stories/assets/accessibility-3.png +0 -0
- package/src/stories/assets/accessibility-banner.png +0 -0
- package/src/stories/assets/atoms.svg +6 -0
- package/src/stories/assets/design_system_2022-02-11_12.22pm.png +0 -0
- package/src/stories/assets/figma-tokens.png +0 -0
- package/src/stories/assets/hierarchy-1.jpg +0 -0
- package/src/stories/assets/hierarchy-2.jpg +0 -0
- package/src/stories/assets/hierarchy-3.jpg +0 -0
- package/src/stories/assets/icon-contrast-1.jpg +0 -0
- package/src/stories/assets/icon-contrast-2.jpg +0 -0
- package/src/stories/assets/imagery-1.png +0 -0
- package/src/stories/assets/imagery-2.png +0 -0
- package/src/stories/assets/imagery-3.png +0 -0
- package/src/stories/assets/imagery-4.jpg +0 -0
- package/src/stories/assets/molecules.svg +9 -0
- package/src/stories/assets/organisms.svg +22 -0
- package/src/stories/assets/pages.svg +5 -0
- package/src/stories/assets/particles.svg +4 -0
- package/src/stories/assets/templates.svg +4 -0
- package/src/stories/assets/testData.tsx +102 -0
- package/src/stories/assets/text-contrast-1.jpg +0 -0
- package/src/stories/assets/text-contrast-2.jpg +0 -0
- package/src/stories/assets/typography-1.png +0 -0
- package/src/stories/assets/visual-clues-1.png +0 -0
- package/src/stories/assets/visual-clues-2.png +0 -0
- package/src/stories/assets/writing-1.jpg +0 -0
- package/src/stories/assets/writing-2.png +0 -0
- package/src/stories/assets/writing-3.png +0 -0
- package/src/stories/assets/writing-4.png +0 -0
- package/src/stories/utils/CustomIcons.tsx +44 -0
- package/tsconfig.eslint.json +16 -0
- package/tsconfig.json +50 -0
- package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +0 -827
- package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +0 -148
- package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +0 -392
- package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +0 -257
- package/components/navigation/MobileNavigation/MobileNavigationStyles.d.ts +0 -405
- package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +0 -2
- package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +0 -32
- package/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +0 -2
- package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +0 -26
- package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.d.ts +0 -36
- package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.js +0 -10
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +0 -84
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +0 -827
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +0 -19
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +0 -91
- package/utils/constants.js +0 -6
- package/utils/helpers.d.ts +0 -6
- package/utils/helpers.js +0 -17
package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearchStyles.js
RENAMED
|
@@ -4,9 +4,9 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
};
|
|
5
5
|
import { SwipeableDrawer, OutlinedInput, InputLabel } from '../../../index';
|
|
6
6
|
import { styled } from '@mui/material/styles';
|
|
7
|
-
import {
|
|
7
|
+
import { animated } from '@react-spring/web';
|
|
8
8
|
export var StyledSwipeableSearch = styled(SwipeableDrawer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .MuiPaper-root {\n box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 5px 8px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 14px 0px rgba(0, 0, 0, 0.12);\n border: none;\n border-radius: 20px 20px 0 0;\n z-index: 1;\n }\n"], ["\n .MuiPaper-root {\n box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 5px 8px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 14px 0px rgba(0, 0, 0, 0.12);\n border: none;\n border-radius: 20px 20px 0 0;\n z-index: 1;\n }\n"])));
|
|
9
|
-
export var StyledBox = styled(
|
|
9
|
+
export var StyledBox = styled(animated.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n background-image: ", ";\n padding: ", ";\n height: 100%;\n"], ["\n background-color: ", ";\n background-image: ", ";\n padding: ", ";\n height: 100%;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
10
10
|
? '#003366'
|
|
11
11
|
: props.theme.palette.background.paper; }, function (props) { return props.theme.palette.mode === 'dark'
|
|
12
12
|
? 'none'
|
|
@@ -3,6 +3,56 @@ export declare const DRAWER_WIDTH: {
|
|
|
3
3
|
Collapsed: number;
|
|
4
4
|
Expanded: number;
|
|
5
5
|
};
|
|
6
|
+
export declare const StyledPaper: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
classes?: Partial<import("@mui/material").PaperClasses> | undefined;
|
|
9
|
+
elevation?: number | undefined;
|
|
10
|
+
square?: boolean | undefined;
|
|
11
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
12
|
+
variant?: "outlined" | "elevation" | undefined;
|
|
13
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
14
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
15
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "square" | "elevation"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
16
|
+
export declare const StyledNotchSVG: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
17
|
+
mobileNotchPosition?: number | undefined;
|
|
18
|
+
}, import("react").SVGProps<SVGSVGElement>, {}>;
|
|
19
|
+
export declare const StyledBottomNavigation: import("@emotion/styled").StyledComponent<{
|
|
20
|
+
children?: import("react").ReactNode;
|
|
21
|
+
classes?: Partial<import("@mui/material").BottomNavigationClasses> | undefined;
|
|
22
|
+
onChange?: ((event: import("react").SyntheticEvent<Element, Event>, value: any) => void) | undefined;
|
|
23
|
+
showLabels?: boolean | undefined;
|
|
24
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
25
|
+
value?: any;
|
|
26
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
27
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
28
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "onChange" | "sx" | "value" | "showLabels"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
29
|
+
export declare const StyledBottomNavigationAction: import("@emotion/styled").StyledComponent<{
|
|
30
|
+
children?: import("react").ReactNode;
|
|
31
|
+
classes?: Partial<import("@mui/material").BottomNavigationActionClasses> | undefined;
|
|
32
|
+
icon?: import("react").ReactNode;
|
|
33
|
+
label?: import("react").ReactNode;
|
|
34
|
+
showLabel?: boolean | undefined;
|
|
35
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
36
|
+
value?: any;
|
|
37
|
+
} & Omit<{
|
|
38
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
39
|
+
centerRipple?: boolean | undefined;
|
|
40
|
+
children?: import("react").ReactNode;
|
|
41
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
42
|
+
disabled?: boolean | undefined;
|
|
43
|
+
disableRipple?: boolean | undefined;
|
|
44
|
+
disableTouchRipple?: boolean | undefined;
|
|
45
|
+
focusRipple?: boolean | undefined;
|
|
46
|
+
focusVisibleClassName?: string | undefined;
|
|
47
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
48
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
49
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
50
|
+
tabIndex?: number | undefined;
|
|
51
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
52
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
53
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
54
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
55
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "tabIndex" | "children" | "sx" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "value" | "icon" | "showLabel"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
6
56
|
export declare const DrawerHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
7
57
|
isDrawerOpen?: any;
|
|
8
58
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -38,9 +88,6 @@ export declare const DrawerToggleHitboxContent: import("@emotion/styled").Styled
|
|
|
38
88
|
export declare const StyledAside: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
39
89
|
export declare const StyledNav: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
40
90
|
export declare const StyledNavSecondary: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
41
|
-
export declare const StyledDivider: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
42
|
-
isDrawerOpen?: boolean | undefined;
|
|
43
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
44
91
|
export declare const DrawerShadow: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
45
92
|
children?: import("react").ReactNode;
|
|
46
93
|
component?: import("react").ElementType<any> | undefined;
|
|
@@ -86,3 +133,19 @@ export declare const NotchSeemMask: import("@emotion/styled").StyledComponent<im
|
|
|
86
133
|
export declare const StyledDrawer: import("@emotion/styled").StyledComponent<import("@mui/material/Drawer").DrawerProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
87
134
|
open?: boolean | undefined;
|
|
88
135
|
}, {}, {}>;
|
|
136
|
+
export declare const StyledNotchShadow: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
137
|
+
children?: import("react").ReactNode;
|
|
138
|
+
component?: import("react").ElementType<any> | undefined;
|
|
139
|
+
ref?: import("react").Ref<unknown> | undefined;
|
|
140
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
141
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
142
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
143
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "children" | "sx" | "component" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
144
|
+
export declare const StyledNotchShadowMask: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
145
|
+
children?: import("react").ReactNode;
|
|
146
|
+
component?: import("react").ElementType<any> | undefined;
|
|
147
|
+
ref?: import("react").Ref<unknown> | undefined;
|
|
148
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
149
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
150
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
151
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "children" | "sx" | "component" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationStyles.js
RENAMED
|
@@ -6,27 +6,22 @@ import Drawer from '@mui/material/Drawer';
|
|
|
6
6
|
import { Box, IconButton, BottomNavigation, BottomNavigationAction, Paper } from '../../../index';
|
|
7
7
|
import { styled } from '@mui/material/styles';
|
|
8
8
|
import { motion } from '../../../utils/theme';
|
|
9
|
-
import { motion as Motion } from 'framer-motion';
|
|
10
9
|
export var DRAWER_WIDTH = {
|
|
11
10
|
Collapsed: 60,
|
|
12
11
|
Expanded: 300
|
|
13
12
|
};
|
|
14
|
-
export var StyledPaper = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n
|
|
15
|
-
? props.theme.palette.primary.main
|
|
16
|
-
: props.theme.palette.background.paper; });
|
|
17
|
-
export var StyledCircle = styled('div')(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: ", ";\n position: absolute;\n left: 0px;\n bottom: 0;\n width: 300px;\n background: rgb(255, 255, 255);\n"], ["\n background: ", ";\n position: absolute;\n left: 0px;\n bottom: 0;\n width: 300px;\n background: rgb(255, 255, 255);\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
13
|
+
export var StyledPaper = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n background-image: none;\n border-radius: 0;\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n z-index: 1000000000;\n"], ["\n background-color: ", ";\n background-image: none;\n border-radius: 0;\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n z-index: 1000000000;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
18
14
|
? props.theme.palette.primary.main
|
|
19
15
|
: props.theme.palette.background.paper; });
|
|
20
16
|
export var StyledNotchSVG = styled('svg', {
|
|
21
17
|
shouldForwardProp: function (prop) { return prop !== 'mobileNotchPosition'; }
|
|
22
|
-
})(
|
|
18
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n fill: ", ";\n height: 50px;\n left: 0;\n padding: 0;\n position: absolute;\n stroke: transparent;\n top: -29px;\n transform: rotate(270deg);\n width: 50px;\n z-index: -1;\n"], ["\n display: block;\n fill: ", ";\n height: 50px;\n left: 0;\n padding: 0;\n position: absolute;\n stroke: transparent;\n top: -29px;\n transform: rotate(270deg);\n width: 50px;\n z-index: -1;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
23
19
|
? props.theme.palette.primary.main
|
|
24
20
|
: props.theme.palette.background.paper; });
|
|
25
|
-
export var
|
|
26
|
-
export var StyledBottomNavigation = styled(BottomNavigation)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n position: relative;\n"], ["\n background-color: ", ";\n position: relative;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
21
|
+
export var StyledBottomNavigation = styled(BottomNavigation)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n position: relative;\n"], ["\n background-color: ", ";\n position: relative;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
27
22
|
? props.theme.palette.primary.main
|
|
28
23
|
: props.theme.palette.background.paper; });
|
|
29
|
-
export var StyledBottomNavigationAction = styled(BottomNavigationAction)(
|
|
24
|
+
export var StyledBottomNavigationAction = styled(BottomNavigationAction)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n backgroundColor: ", ";\n color: ", ";\n flex: none;\n height: 56px;\n max-width: 168px;\n min-width: 80px;\n overflow: hidden;\n padding: 0;\n stroke: ", ";\n\n .MuiBottomNavigationAction-label {\n color: inherit;\n font-size: 0.65rem;\n\n // Handle long text string overflow\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n\n &.Mui-selected {\n color: ", ";\n font-size: 0.75rem;\n }\n }\n\n .MuiSvgIcon-root {\n fill: ", ";\n }\n"], ["\n backgroundColor: ", ";\n color: ", ";\n flex: none;\n height: 56px;\n max-width: 168px;\n min-width: 80px;\n overflow: hidden;\n padding: 0;\n stroke: ", ";\n\n .MuiBottomNavigationAction-label {\n color: inherit;\n font-size: 0.65rem;\n\n // Handle long text string overflow\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n\n &.Mui-selected {\n color: ", ";\n font-size: 0.75rem;\n }\n }\n\n .MuiSvgIcon-root {\n fill: ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
30
25
|
? props.theme.palette.primary.main
|
|
31
26
|
: props.theme.palette.background.paper; }, function (props) { return props.theme.palette.mode === 'dark'
|
|
32
27
|
? props.theme.palette.primary.contrastText
|
|
@@ -43,13 +38,13 @@ export var StyledBottomNavigationAction = styled(BottomNavigationAction)(templat
|
|
|
43
38
|
});
|
|
44
39
|
export var DrawerHeader = styled('div', {
|
|
45
40
|
shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
|
|
46
|
-
})(
|
|
47
|
-
export var DrawerToggle = styled(IconButton)(
|
|
48
|
-
export var DrawerToggleHitboxContent = styled('span')(
|
|
41
|
+
})(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n"], ["\n"])));
|
|
42
|
+
export var DrawerToggle = styled(IconButton)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: transparent;\n height: 44px;\n padding: 0 ", " !important;\n position: absolute;\n transform: translate(22px, calc(50% - 5.5px));\n transition: all 225ms ", " 0ms !important;\n width: 44px;\n z-index: 10;\n\n @media (min-width: ", ") {\n padding: 0 ", " !important;\n }\n"], ["\n background: transparent;\n height: 44px;\n padding: 0 ", " !important;\n position: absolute;\n transform: translate(22px, calc(50% - 5.5px));\n transition: all 225ms ", " 0ms !important;\n width: 44px;\n z-index: 10;\n\n @media (min-width: ", ") {\n padding: 0 ", " !important;\n }\n"])), function (props) { return props.theme.spacing(2); }, motion.easeInOut, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return props.theme.spacing(2.5); });
|
|
43
|
+
export var DrawerToggleHitboxContent = styled('span')(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 50%;\n box-shadow: 5px 0 15px 0 rgb(0 0 0 / 10%);\n box-sizing: content-box;\n height: 1.75rem;\n padding: ", ";\n width: 1.75rem;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n box-shadow: 5px 0 15px 0 rgb(0 0 0 / 10%);\n box-sizing: content-box;\n height: 1.75rem;\n padding: ", ";\n width: 1.75rem;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
49
44
|
? props.theme.palette.primary.main
|
|
50
45
|
: props.theme.palette.background.paper; }, function (props) { return props.theme.spacing(0.5); });
|
|
51
|
-
export var StyledAside = styled('aside')(
|
|
52
|
-
export var StyledNav = styled('nav')(
|
|
46
|
+
export var StyledAside = styled('aside')(templateObject_8 || (templateObject_8 = __makeTemplateObject([""], [""])));
|
|
47
|
+
export var StyledNav = styled('nav')(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n flex-direction: column;\n justify-content: flex-start;\n margin-top: -1px;\n overflow-x: hidden;\n overflow-y: auto;\n\n // Firefox and future scrollbars\n * & {\n scrollbar-width: thin;\n scrollbar-color: ", ";\n transition: backgroundColor 225ms ", ";\n }\n\n * &:hover {\n scrollbar-color: ", ";\n }\n\n // Webkit and fall back scrollbars\n ::-webkit-scrollbar {\n width: 8px;\n }\n\n ::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 55px;\n transition: background-color 225ms ", ";\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background-color: ", ";\n }\n"], ["\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n flex-direction: column;\n justify-content: flex-start;\n margin-top: -1px;\n overflow-x: hidden;\n overflow-y: auto;\n\n // Firefox and future scrollbars\n * & {\n scrollbar-width: thin;\n scrollbar-color: ", ";\n transition: backgroundColor 225ms ", ";\n }\n\n * &:hover {\n scrollbar-color: ", ";\n }\n\n // Webkit and fall back scrollbars\n ::-webkit-scrollbar {\n width: 8px;\n }\n\n ::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 55px;\n transition: background-color 225ms ", ";\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background-color: ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
53
48
|
? props.theme.palette.primary.main
|
|
54
49
|
: props.theme.palette.background.paper; }, function (props) {
|
|
55
50
|
return props.theme.palette.mode === 'dark'
|
|
@@ -68,37 +63,37 @@ export var StyledNav = styled('nav')(templateObject_11 || (templateObject_11 = _
|
|
|
68
63
|
? 'rgba(255, 255, 255, 0.24)'
|
|
69
64
|
: 'rgba(0, 0, 0, 0.24)';
|
|
70
65
|
});
|
|
71
|
-
export var StyledNavSecondary = styled('nav')(
|
|
66
|
+
export var StyledNavSecondary = styled('nav')(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n flex-direction: column;\n justify-content: flex-end;\n margin-top: auto;\n overflow: hidden;\n"], ["\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n flex-direction: column;\n justify-content: flex-end;\n margin-top: auto;\n overflow: hidden;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
72
67
|
? props.theme.palette.primary.main
|
|
73
68
|
: props.theme.palette.background.paper; });
|
|
74
69
|
export var DrawerShadow = styled(Box, {
|
|
75
70
|
shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
|
|
76
|
-
})(
|
|
71
|
+
})(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background: rgba(0,0,0,0.125);\n content: '';\n display: block;\n filter: blur(13px);\n height: 100%;\n left: ", ";\n position: fixed;\n top: 0;\n transition: left 225ms ", " 0ms;\n visibility: visible;\n width: 40px;\n\n @media (min-width: ", ") {\n left: ", ";\n }\n"], ["\n background: rgba(0,0,0,0.125);\n content: '';\n display: block;\n filter: blur(13px);\n height: 100%;\n left: ", ";\n position: fixed;\n top: 0;\n transition: left 225ms ", " 0ms;\n visibility: visible;\n width: 40px;\n\n @media (min-width: ", ") {\n left: ", ";\n }\n"])), function (props) { return props.isDrawerOpen
|
|
77
72
|
? "".concat(DRAWER_WIDTH.Expanded - 38, "px")
|
|
78
73
|
: "".concat(DRAWER_WIDTH.Collapsed - 41, "px"); }, motion.easeInOut, function (props) { return props.theme.breakpoints.values.sm; }, function (props) {
|
|
79
74
|
return props.isDrawerOpen
|
|
80
75
|
? "".concat(DRAWER_WIDTH.Expanded - 38, "px")
|
|
81
76
|
: "".concat(DRAWER_WIDTH.Collapsed - 33, "px");
|
|
82
77
|
});
|
|
83
|
-
export var NotchContainer = styled(Box)(
|
|
84
|
-
export var NotchBackground = styled(Box)(
|
|
78
|
+
export var NotchContainer = styled(Box)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: flex;\n justify-content: flex-end;\n height: auto;\n margin-top: -", ";\n position: relative;\n transition: width 225ms ", " 0ms !important;\n width: 100%;\n z-index: 9;\n"], ["\n display: flex;\n justify-content: flex-end;\n height: auto;\n margin-top: -", ";\n position: relative;\n transition: width 225ms ", " 0ms !important;\n width: 100%;\n z-index: 9;\n"])), function (props) { return props.theme.spacing(0.5); }, motion.easeInOut);
|
|
79
|
+
export var NotchBackground = styled(Box)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n background-color: ", ";\n flex: 1;\n height: auto;\n width: auto;\n"], ["\n background-color: ", ";\n flex: 1;\n height: auto;\n width: auto;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
85
80
|
? props.theme.palette.primary.main
|
|
86
81
|
: props.theme.palette.background.paper; });
|
|
87
|
-
export var NotchBackgroundClip = styled(Box)(
|
|
82
|
+
export var NotchBackgroundClip = styled(Box)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n width: 45px;\n"], ["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n width: 45px;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
88
83
|
? props.theme.palette.primary.main
|
|
89
84
|
: props.theme.palette.background.paper; });
|
|
90
|
-
export var NotchSeemMask = styled(Box)(
|
|
85
|
+
export var NotchSeemMask = styled(Box)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n background-color: ", ";\n height: 90px;\n position: absolute;\n right: 25px;\n top: -2px;\n width: calc(100% - 25px);\n"], ["\n background-color: ", ";\n height: 90px;\n position: absolute;\n right: 25px;\n top: -2px;\n width: calc(100% - 25px);\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
91
86
|
? props.theme.palette.primary.main
|
|
92
87
|
: props.theme.palette.background.paper; });
|
|
93
88
|
export var StyledDrawer = styled(Drawer, {
|
|
94
89
|
shouldForwardProp: function (prop) { return prop !== 'open'; }
|
|
95
|
-
})(
|
|
90
|
+
})(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width 225ms ", " 0ms !important;\n white-space: nowrap;\n width: ", ";\n\n @media (min-width: ", ") {\n width: ", ";\n }\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width 225ms ", " 0ms !important;\n visibility: visible;\n width: ", ";\n\n [theme.breakpoints.up('sm')] {\n width: ", ";\n }\n }\n"], ["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width 225ms ", " 0ms !important;\n white-space: nowrap;\n width: ", ";\n\n @media (min-width: ", ") {\n width: ", ";\n }\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width 225ms ", " 0ms !important;\n visibility: visible;\n width: ", ";\n\n [theme.breakpoints.up('sm')] {\n width: ", ";\n }\n }\n"])), motion.easeInOut, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(8), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) {
|
|
96
91
|
return props.theme.palette.mode === 'dark'
|
|
97
92
|
? props.theme.palette.primary.contrastText
|
|
98
93
|
: props.theme.palette.getContrastText(props.theme.palette.background.paper);
|
|
99
94
|
}, motion.easeInOut, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(8), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); });
|
|
100
|
-
export var StyledNotchShadow = styled(Box)(
|
|
101
|
-
export var StyledNotchShadowMask = styled(Box)(
|
|
95
|
+
export var StyledNotchShadow = styled(Box)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n border-radius: 50%;\n box-shadow: 0px -7px 10px -5px rgb(0 0 0 / 20%), 0px 2px 10px 0px rgb(0 0 0 / 14%), 0px 0px 8px 0px rgb(0 0 0 / 12%);\n height: 13px;\n left: 13px;\n position: absolute;\n top: -7px;\n width: 25px;\n z-index: -2;\n"], ["\n border-radius: 50%;\n box-shadow: 0px -7px 10px -5px rgb(0 0 0 / 20%), 0px 2px 10px 0px rgb(0 0 0 / 14%), 0px 0px 8px 0px rgb(0 0 0 / 12%);\n height: 13px;\n left: 13px;\n position: absolute;\n top: -7px;\n width: 25px;\n z-index: -2;\n"])));
|
|
96
|
+
export var StyledNotchShadowMask = styled(Box)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 50%;\n height: 13px;\n left: 13px;\n position: absolute;\n top: -1px;\n width: 25px;\n z-index: -1;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n height: 13px;\n left: 13px;\n position: absolute;\n top: -1px;\n width: 25px;\n z-index: -1;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
102
97
|
? props.theme.palette.primary.main
|
|
103
98
|
: props.theme.palette.background.paper; });
|
|
104
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18
|
|
99
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useSpring, animated, easings } from '@react-spring/web';
|
|
14
|
+
var Path = function (props) { return (_jsx(animated.path, __assign({ fill: 'transparent', strokeWidth: '3', stroke: 'inherit', strokeLinecap: 'round' }, props))); };
|
|
15
|
+
var ToggleSearchX = function (props) {
|
|
16
|
+
var animationDefaults = {
|
|
17
|
+
reverse: props === null || props === void 0 ? void 0 : props.isOpen,
|
|
18
|
+
config: {
|
|
19
|
+
duration: 150,
|
|
20
|
+
easing: easings.easeInOutQuad
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var handle = useSpring(__assign(__assign({}, animationDefaults), { from: { d: 'M 15 15 L 35 35' }, to: { d: 'M 26 26 L 35 35' } }));
|
|
24
|
+
var closeBar = useSpring(__assign(__assign({}, animationDefaults), { from: { d: 'M 15 35 L 35 15', opacity: 1, scale: 1 }, to: { d: 'M 26 26 L 35 35', opacity: 0, scale: 0 } }));
|
|
25
|
+
var circle = useSpring(__assign(__assign({}, animationDefaults), { from: { opacity: 0, scale: 0 }, to: { opacity: 1, scale: 1 } }));
|
|
26
|
+
return (_jsxs("svg", __assign({ width: '40', height: '40', viewBox: '0 0 50 50', stroke: 'inherit' }, { children: [_jsx(Path, __assign({}, handle)), _jsx(Path, __assign({}, closeBar)), _jsx(animated.circle, __assign({}, circle, { cx: '20', cy: '20', r: '8', fill: 'transparent', strokeWidth: '3', stroke: 'inherit' }))] })));
|
|
27
|
+
};
|
|
28
|
+
export default ToggleSearchX;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useSpring, animated, easings } from '@react-spring/web';
|
|
14
|
+
var Path = function (props) { return (_jsx(animated.path, __assign({ fill: 'transparent', strokeWidth: '3', stroke: 'inherit', strokeLinecap: 'round' }, props))); };
|
|
15
|
+
var ToggleX = function (props) {
|
|
16
|
+
var animationDefaults = {
|
|
17
|
+
reverse: props === null || props === void 0 ? void 0 : props.isOpen,
|
|
18
|
+
config: {
|
|
19
|
+
duration: 150,
|
|
20
|
+
easing: easings.easeInOutQuad
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var topBar = useSpring(__assign(__assign({}, animationDefaults), { from: { d: 'M 15 15 L 35 35' }, to: { d: 'M 10 15 L 40 15' } }));
|
|
24
|
+
var middleBar = useSpring(__assign(__assign({}, animationDefaults), { from: { opacity: 0, scale: 0 }, to: { opacity: 1, scale: 1 } }));
|
|
25
|
+
var bottomBar = useSpring(__assign(__assign({}, animationDefaults), { from: { d: 'M 15 35 L 35 15' }, to: { d: 'M 10 35 L 40 35' } }));
|
|
26
|
+
return (_jsxs("svg", __assign({ width: "40", height: "40", viewBox: "0 0 50 50" }, { children: [_jsx(Path, __assign({}, topBar)), _jsx(Path, __assign({ d: 'M 10 25 L 40 25' }, middleBar)), _jsx(Path, __assign({}, bottomBar))] })));
|
|
27
|
+
};
|
|
28
|
+
export default ToggleX;
|
package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigation.d.ts
RENAMED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IApplication } from '
|
|
3
|
-
import { IVerticalNavigationItemProps } from './VerticalNavigationItem/VerticalNavigationItem';
|
|
4
|
-
import { IAvatarMenuItemProps } from './VerticalNavigationAvatar';
|
|
2
|
+
import { IApplication, IAvatarMenuItemProps, IVerticalNavigationItemProps } from '../../../types';
|
|
5
3
|
interface VerticalNavigationProps {
|
|
6
4
|
logo?: string;
|
|
7
5
|
logoText?: string;
|
|
@@ -19,6 +17,7 @@ interface VerticalNavigationProps {
|
|
|
19
17
|
setIsPersistent?: any;
|
|
20
18
|
appRootID?: string;
|
|
21
19
|
hasAvatar?: boolean;
|
|
20
|
+
avatarPanelLogoutString?: string;
|
|
22
21
|
avatarPanelOnClickSwitchDirection?: any;
|
|
23
22
|
avatarPanelOnClickLogout?: any;
|
|
24
23
|
avatarPanelOnClickViewProfile?: any;
|
|
@@ -29,6 +28,7 @@ interface VerticalNavigationProps {
|
|
|
29
28
|
avatarPanelOnClickMainAction?: any;
|
|
30
29
|
avatarPanelMainActionString?: string;
|
|
31
30
|
avatarPanelSettingItems?: Array<IAvatarMenuItemProps>;
|
|
31
|
+
avatarPanelFootnote?: any;
|
|
32
32
|
}
|
|
33
33
|
declare const VerticalNavigation: (props: VerticalNavigationProps) => React.ReactElement;
|
|
34
34
|
export default VerticalNavigation;
|
|
@@ -24,7 +24,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
24
24
|
import React, { useEffect } from 'react';
|
|
25
25
|
import { useTheme } from '@mui/material/styles';
|
|
26
26
|
import { Avatar, List, Tooltip } from '../../../index';
|
|
27
|
-
import { Box } from '@mui/material';
|
|
27
|
+
import { Box, Modal } from '@mui/material';
|
|
28
28
|
import { StreamSuiteLogo, NotchSVG, NotchExtendSVG } from '../../../assets/Images';
|
|
29
29
|
import AppSwitcher from '../../stream/AppSwitcher/AppSwitcher';
|
|
30
30
|
import { Apps, ChevronLeft, ChevronRight, PushPin } from '@mui/icons-material';
|
|
@@ -33,8 +33,9 @@ import { DRAWER_WIDTH, DrawerHeader, DrawerToggle, DrawerToggleHitboxContent, St
|
|
|
33
33
|
import { ListItemText } from './VerticalNavigationItem/VerticalNavigationItemStyles';
|
|
34
34
|
import AvatarPanel from './VerticalNavigationAvatar';
|
|
35
35
|
import { motion } from '../../../utils/theme';
|
|
36
|
-
import { handleAvatarInitials } from '../../../utils/helpers';
|
|
36
|
+
import { handleAvatarInitials, useFadeIn } from '../../../utils/helpers';
|
|
37
37
|
import { DEFAULT_REACT_APP_ID } from '../../../utils/constants';
|
|
38
|
+
import { animated } from '@react-spring/web';
|
|
38
39
|
var VerticalNavigation = function (props) {
|
|
39
40
|
var _a, _b;
|
|
40
41
|
var theme = useTheme();
|
|
@@ -43,9 +44,10 @@ var VerticalNavigation = function (props) {
|
|
|
43
44
|
var propIsPersistent = typeof (props === null || props === void 0 ? void 0 : props.isPersistent) === 'boolean' ? props.isPersistent : undefined;
|
|
44
45
|
var avatarName = (_a = props === null || props === void 0 ? void 0 : props.avatarName) !== null && _a !== void 0 ? _a : 'Avatar name';
|
|
45
46
|
var _c = React.useState(propIsDrawerOpen !== null && propIsDrawerOpen !== void 0 ? propIsDrawerOpen : false), isDrawerOpen = _c[0], setIsDrawerOpen = _c[1];
|
|
46
|
-
var _d = React.useState(
|
|
47
|
+
var _d = React.useState(false), isAvatarOpen = _d[0], setIsAvatarOpen = _d[1];
|
|
48
|
+
var _e = React.useState(propIsPersistent !== null && propIsPersistent !== void 0 ? propIsPersistent : false), isPersistent = _e[0], setIsPersistent = _e[1];
|
|
47
49
|
// Controls whether the application panel is open or not.
|
|
48
|
-
var
|
|
50
|
+
var _f = React.useState(false), isAppSwitcherOpen = _f[0], setIsAppSwitcherOpen = _f[1];
|
|
49
51
|
/**
|
|
50
52
|
* Toggles display of the Stream suite application dialog.
|
|
51
53
|
*/
|
|
@@ -78,7 +80,7 @@ var VerticalNavigation = function (props) {
|
|
|
78
80
|
}
|
|
79
81
|
setIsPersistent(propIsPersistent !== null && propIsPersistent !== void 0 ? propIsPersistent : false);
|
|
80
82
|
};
|
|
81
|
-
var
|
|
83
|
+
var _g = React.useState((_b = handleAvatarInitials(avatarName)) !== null && _b !== void 0 ? _b : 'AN'), avatarInitials = _g[0], setAvatarInitials = _g[1];
|
|
82
84
|
var toggleDrawer = function (open) { return function (event) {
|
|
83
85
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
84
86
|
if (event.type === 'keydown') {
|
|
@@ -89,6 +91,10 @@ var VerticalNavigation = function (props) {
|
|
|
89
91
|
setIsAppSwitcherOpen(false);
|
|
90
92
|
setIsDrawerOpen(open !== null && open !== void 0 ? open : !isDrawerOpen);
|
|
91
93
|
}; };
|
|
94
|
+
// First item starts at 70ms
|
|
95
|
+
// see STAGGER_ITEMS_DELAY in helpers.js
|
|
96
|
+
var animationCount = 1;
|
|
97
|
+
var incrementAnimationCount = function () { return animationCount++; };
|
|
92
98
|
var listContent = function () { return (_jsxs(Box, __assign({ sx: {
|
|
93
99
|
display: 'flex',
|
|
94
100
|
flex: '1 auto',
|
|
@@ -108,7 +114,7 @@ var VerticalNavigation = function (props) {
|
|
|
108
114
|
backgroundColor: theme.palette.mode === 'dark'
|
|
109
115
|
? theme.palette.primary.main
|
|
110
116
|
: theme.palette.background.paper
|
|
111
|
-
} }, { children: _jsxs(DrawerHeader, __assign({ onClick: logoOnClick !== null && logoOnClick !== void 0 ? logoOnClick : null, isDrawerOpen: isDrawerOpen || isPersistent }, { children: [_jsx(Tooltip, __assign({ disableHoverListener: isDrawerOpen || isPersistent, disableFocusListener: isDrawerOpen || isPersistent, disableTouchListener: isDrawerOpen || isPersistent, title: logoText !== null && logoText !== void 0 ? logoText : '', placement: theme.direction === 'rtl' ? 'left' : 'right' }, { children: logo
|
|
117
|
+
} }, { children: _jsxs(DrawerHeader, __assign({ onClick: logoOnClick !== null && logoOnClick !== void 0 ? logoOnClick : null, isDrawerOpen: isDrawerOpen || isPersistent, style: useFadeIn(animationCount, incrementAnimationCount) }, { children: [_jsx(Tooltip, __assign({ disableHoverListener: isDrawerOpen || isPersistent, disableFocusListener: isDrawerOpen || isPersistent, disableTouchListener: isDrawerOpen || isPersistent, title: logoText !== null && logoText !== void 0 ? logoText : '', placement: theme.direction === 'rtl' ? 'left' : 'right' }, { children: logo
|
|
112
118
|
? typeof logo === 'string'
|
|
113
119
|
? (_jsx("img", { src: logo, height: "".concat(logoHeight, "px"), width: "".concat(logoWidth, "px"), style: {
|
|
114
120
|
marginRight: '16px'
|
|
@@ -121,7 +127,9 @@ var VerticalNavigation = function (props) {
|
|
|
121
127
|
fill: theme.palette.mode === 'dark'
|
|
122
128
|
? theme.palette.primary.contrastText
|
|
123
129
|
: theme.palette.primary.main
|
|
124
|
-
} })) })), _jsx(ListItemText, { primary: logoText !== null && logoText !== void 0 ? logoText : '', isDrawerOpen: isDrawerOpen || isPersistent })] })) })), _jsxs("div", __assign({ className: 'wrapper' }, { children: [_jsxs(NotchContainer, __assign({ sx: { height: '85px', position: 'relative !important' } }, { children: [_jsx(NotchBackground, {}), !isPersistent && _jsx(NotchBackgroundClip, {}), _jsx(NotchSeemMask, {})] })), !isPersistent && _jsx(DrawerToggle, __assign({ onClick: toggleDrawer(!isDrawerOpen), "aria-label": isDrawerOpen ? 'Close Navigation' : 'Open Navigation', "aria-expanded": isDrawerOpen ? 'true' : 'false', "aria-controls": "vertical-navigation"
|
|
130
|
+
} })) })), _jsx(ListItemText, { primary: logoText !== null && logoText !== void 0 ? logoText : '', isDrawerOpen: isDrawerOpen || isPersistent })] })) })), _jsxs("div", __assign({ className: 'wrapper' }, { children: [_jsxs(NotchContainer, __assign({ sx: { height: '85px', position: 'relative !important' } }, { children: [_jsx(NotchBackground, {}), !isPersistent && _jsx(NotchBackgroundClip, {}), _jsx(NotchSeemMask, {})] })), !isPersistent && _jsx(DrawerToggle, __assign({ onClick: toggleDrawer(!isDrawerOpen), "aria-label": isDrawerOpen ? 'Close Navigation' : 'Open Navigation', "aria-expanded": isDrawerOpen ? 'true' : 'false', "aria-controls": "vertical-navigation",
|
|
131
|
+
// @ts-expect-error
|
|
132
|
+
component: animated.button, style: __assign(__assign({}, useFadeIn(animationCount, incrementAnimationCount)), { transform: 'translate(22px, calc(50% - 5.5px))' }) }, { children: _jsx(DrawerToggleHitboxContent, { children: isDrawerOpen
|
|
125
133
|
? (_jsx(ChevronLeft, { style: {
|
|
126
134
|
fontSize: '1.75rem',
|
|
127
135
|
height: '1.75rem',
|
|
@@ -189,7 +197,7 @@ var VerticalNavigation = function (props) {
|
|
|
189
197
|
height: '100%',
|
|
190
198
|
width: DRAWER_WIDTH.Expanded,
|
|
191
199
|
marginTop: "-".concat(theme.spacing(0.5), " !important")
|
|
192
|
-
} }, { children: items && items.length > 0 && items.map(function (item, index) { return (_jsx(VerticalNavigationItem, __assign({}, item, { index: index, isDrawerOpen: isDrawerOpen || isPersistent }))); }) })) })) })), _jsx("div", __assign({ className: 'wrapper', style: {
|
|
200
|
+
} }, { children: items && items.length > 0 && items.map(function (item, index) { return (_jsx(VerticalNavigationItem, __assign({}, item, { index: index, isDrawerOpen: isDrawerOpen || isPersistent, style: useFadeIn(animationCount, incrementAnimationCount) }))); }) })) })) })), _jsx("div", __assign({ className: 'wrapper', style: {
|
|
193
201
|
backgroundColor: theme.palette.mode === 'dark'
|
|
194
202
|
? theme.palette.primary.main
|
|
195
203
|
: theme.palette.background.paper
|
|
@@ -199,29 +207,18 @@ var VerticalNavigation = function (props) {
|
|
|
199
207
|
? theme.palette.primary.main
|
|
200
208
|
: theme.palette.background.paper
|
|
201
209
|
} }, { children: [hasStreamHome
|
|
202
|
-
? (_jsx(VerticalNavigationItem, { label: 'App Switcher', icon: _jsx(Apps, {}), onClick: handleToggleAppsClick, content: (_jsx(AppSwitcher, { isAppSwitcherOpen: isAppSwitcherOpen, setIsAppSwitcherOpen: setIsAppSwitcherOpen, applications: streamHomeApplications
|
|
203
|
-
: null, secondaryItems && secondaryItems.length > 0 && secondaryItems.map(function (item, index) { return (_jsx(VerticalNavigationItem, __assign({}, item, { index: index, isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true }))); }), avatarName
|
|
210
|
+
? (_jsx(VerticalNavigationItem, { label: 'App Switcher', icon: _jsx(Apps, {}), onClick: handleToggleAppsClick, content: (_jsx(AppSwitcher, { isAppSwitcherOpen: isAppSwitcherOpen, setIsAppSwitcherOpen: setIsAppSwitcherOpen, applications: streamHomeApplications, apiKey: streamHomeApiKey !== null && streamHomeApiKey !== void 0 ? streamHomeApiKey : '', baseUrl: streamHomeBaseUrl !== null && streamHomeBaseUrl !== void 0 ? streamHomeBaseUrl : '', token: streamHomeAccessToken !== null && streamHomeAccessToken !== void 0 ? streamHomeAccessToken : '', isDrawerOpen: isDrawerOpen })), isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, hasCustomContent: true, style: useFadeIn(animationCount, incrementAnimationCount) }))
|
|
211
|
+
: null, secondaryItems && secondaryItems.length > 0 && secondaryItems.map(function (item, index) { return (_jsx(VerticalNavigationItem, __assign({}, item, { index: index, isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, style: useFadeIn(animationCount, incrementAnimationCount) }))); }), avatarName
|
|
204
212
|
? (_jsx(VerticalNavigationItem, { label: avatarName, "aria-controls": 'avatar-panel', icon: _jsx(Avatar, __assign({ style: {
|
|
205
213
|
// backgroundColor: mainTheme.colorButtonText,
|
|
206
214
|
// color: mainTheme.colorButton,
|
|
207
215
|
fontSize: '0.75rem',
|
|
208
|
-
height:
|
|
209
|
-
width:
|
|
210
|
-
} }, { children: avatarInitials })), style: {
|
|
211
|
-
maxHeight: isDrawerOpen ? '200px' : '48px',
|
|
212
|
-
overflow: 'hidden',
|
|
213
|
-
padding: 0,
|
|
214
|
-
minHeight: 52,
|
|
215
|
-
transition: "max-height 225ms ".concat(motion.easeInOut, " 0ms !important")
|
|
216
|
-
}, hasFlyout: true, fullHeightFlyout: true, content: _jsx(AvatarPanel, __assign({ avatarName: avatarName }, rest)), isDrawerOpen: isDrawerOpen }))
|
|
216
|
+
height: 32,
|
|
217
|
+
width: 32
|
|
218
|
+
} }, { children: avatarInitials })), style: __assign({ maxHeight: isDrawerOpen ? '200px' : '48px', overflow: 'hidden', padding: 0, minHeight: 52, transition: "max-height 225ms ".concat(motion.easeInOut, " 0ms !important") }, useFadeIn(animationCount, incrementAnimationCount)), onClick: function () { return setIsAvatarOpen(!isAvatarOpen); }, hasFlyout: true, fullHeightFlyout: true, content: _jsx(AvatarPanel, __assign({ avatarName: avatarName, isAvatarOpen: isAvatarOpen }, rest)), isDrawerOpen: isDrawerOpen }))
|
|
217
219
|
: null] }))] })) }))] }))); };
|
|
218
220
|
return (_jsxs(StyledAside, __assign({ "aria-label": "Site navigation" }, { children: [_jsx(DrawerShadow, { className: 'drawerShadow', "aria-hidden": 'true', isDrawerOpen: isDrawerOpen || isPersistent, style: {
|
|
219
221
|
display: isPersistent ? 'none' : 'block'
|
|
220
|
-
} }), _jsx(StyledDrawer, __assign({ id: 'vertical-navigation', anchor: 'left', open: isDrawerOpen || isPersistent, onClose: toggleDrawer(false), variant:
|
|
221
|
-
keepMounted: true,
|
|
222
|
-
disablePortal: true,
|
|
223
|
-
open: isDrawerOpen,
|
|
224
|
-
onClose: toggleDrawer(false)
|
|
225
|
-
} }, { children: listContent() }))] })));
|
|
222
|
+
} }), _jsx(Modal, __assign({ "aria-hidden": false, keepMounted: true, disablePortal: true, open: isDrawerOpen, onClose: toggleDrawer(false) }, { children: _jsx(StyledDrawer, __assign({ id: 'vertical-navigation', anchor: 'left', open: isDrawerOpen || isPersistent, onClose: toggleDrawer(false), variant: 'permanent' }, { children: listContent() })) }))] })));
|
|
226
223
|
};
|
|
227
224
|
export default VerticalNavigation;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import React, { useEffect } from 'react';
|
|
14
|
+
import { Box, ButtonGroup, Button, Link, List, ListItem, ListItemIcon, ListItemText } from '../../../index';
|
|
15
|
+
import { StyledBox, StyledBoxProfile, StyledAvatarName, StyledAvatar, StyledOutlineButton, StyledBoxProfileEdit, StyledListItemButton } from './VerticalNavigationAvatarStyles';
|
|
16
|
+
import { useTheme } from '@mui/material/styles';
|
|
17
|
+
import EditIcon from '@mui/icons-material/Edit';
|
|
18
|
+
import LogoutIcon from '@mui/icons-material/Logout';
|
|
19
|
+
import { handleAvatarInitials, useStaggerAnimation } from '../../../utils/helpers';
|
|
20
|
+
import { Person, Settings } from '@mui/icons-material';
|
|
21
|
+
import { animated } from '@react-spring/web';
|
|
22
|
+
var AvatarPanel = function (props) {
|
|
23
|
+
var _a;
|
|
24
|
+
var theme = useTheme();
|
|
25
|
+
var avatarName = props.avatarName, avatarPanelOnClickLogout = props.avatarPanelOnClickLogout, avatarPanelLogoutString = props.avatarPanelLogoutString, avatarPanelOnClickViewProfile = props.avatarPanelOnClickViewProfile, avatarPanelViewProfileString = props.avatarPanelViewProfileString, avatarPanelOnClickEditProfile = props.avatarPanelOnClickEditProfile, avatarPanelEditProfileString = props.avatarPanelEditProfileString, avatarPanelMenuItems = props.avatarPanelMenuItems, avatarPanelOnClickMainAction = props.avatarPanelOnClickMainAction, avatarPanelMainActionString = props.avatarPanelMainActionString, avatarPanelSettingItems = props.avatarPanelSettingItems, avatarPanelFootnote = props.avatarPanelFootnote, isAvatarOpen = props.isAvatarOpen;
|
|
26
|
+
useEffect(function () { return setAvatarInitials(handleAvatarInitials(avatarName)); }, [
|
|
27
|
+
avatarName
|
|
28
|
+
]);
|
|
29
|
+
var _b = React.useState((_a = handleAvatarInitials(avatarName)) !== null && _a !== void 0 ? _a : 'AN'), avatarInitials = _b[0], setAvatarInitials = _b[1];
|
|
30
|
+
// First item starts at 70ms
|
|
31
|
+
// see STAGGER_ITEMS_DELAY in helpers.js
|
|
32
|
+
var animationCount = 1;
|
|
33
|
+
var incrementAnimationCount = function () { return animationCount++; };
|
|
34
|
+
return (_jsxs(StyledBox, { children: [avatarPanelOnClickLogout && (_jsx(Button
|
|
35
|
+
// @ts-expect-error
|
|
36
|
+
, __assign({
|
|
37
|
+
// @ts-expect-error
|
|
38
|
+
component: animated.button, style: __assign({ left: theme.direction === 'rtl' ? theme.spacing(1) : 'auto', position: 'absolute', right: theme.direction === 'rtl' ? 'auto' : theme.spacing(1), top: theme.spacing(1) }, useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount)), onClick: avatarPanelOnClickLogout, startIcon: _jsx(LogoutIcon, {}), variant: 'text', color: 'inherit' }, { children: avatarPanelLogoutString !== null && avatarPanelLogoutString !== void 0 ? avatarPanelLogoutString : 'Logout' }))), _jsxs(Box, __assign({ style: {
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
display: 'flex',
|
|
41
|
+
flexDirection: 'column'
|
|
42
|
+
} }, { children: [_jsxs(StyledBoxProfile, __assign({ style: useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount) }, { children: [_jsx(StyledAvatar, __assign({ style: { marginRight: '0.5rem' } }, { children: avatarInitials })), _jsxs(StyledAvatarName, { children: [_jsx("span", __assign({ style: { fontWeight: 300 } }, { children: "Hi," })), " ", _jsx("strong", { children: avatarName.split(' ')[0] })] })] })), avatarPanelOnClickViewProfile && (_jsx(StyledBoxProfileEdit, __assign({ style: __assign({ flexDirection: 'row', marginBottom: theme.spacing(2) }, useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount)) }, { children: _jsxs(ButtonGroup, __assign({ variant: "contained", "aria-label": "split button" }, { children: [_jsx(Button, __assign({ variant: 'contained', color: 'primary', size: 'medium', onClick: avatarPanelOnClickViewProfile, startIcon: _jsx(Person, {}) }, { children: avatarPanelViewProfileString !== null && avatarPanelViewProfileString !== void 0 ? avatarPanelViewProfileString : 'View Profile' })), avatarPanelOnClickEditProfile && (_jsx(Button, __assign({ size: 'medium', "aria-label": avatarPanelEditProfileString !== null && avatarPanelEditProfileString !== void 0 ? avatarPanelEditProfileString : 'Edit Profile', onClick: avatarPanelOnClickEditProfile }, { children: _jsx(EditIcon, {}) })))] })) })))] })), _jsxs(Box, __assign({ style: {
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
display: 'flex',
|
|
45
|
+
flexDirection: 'column'
|
|
46
|
+
} }, { children: [avatarPanelMenuItems && avatarPanelMenuItems.length > 0 && (_jsx(List, __assign({ style: {
|
|
47
|
+
marginBottom: theme.spacing(2),
|
|
48
|
+
maxWidth: '14rem'
|
|
49
|
+
} }, { children: avatarPanelMenuItems.map(function (avatarMenuItem) { return (_jsx(ListItem, __assign({ component: animated.div, style: useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount),
|
|
50
|
+
// whileHover={motionWhileHover}
|
|
51
|
+
// whileTap={motionWhileTap}
|
|
52
|
+
disablePadding: true }, { children: _jsxs(StyledListItemButton
|
|
53
|
+
// TODO: figure out if these are links or buttons
|
|
54
|
+
// @ts-expect-error
|
|
55
|
+
, __assign({
|
|
56
|
+
// TODO: figure out if these are links or buttons
|
|
57
|
+
// @ts-expect-error
|
|
58
|
+
component: Link, role: 'link', onClick: avatarMenuItem.onClick }, { children: [_jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
|
|
59
|
+
minWidth: theme.spacing(5)
|
|
60
|
+
} }, { children: avatarMenuItem.icon })), _jsx(ListItemText, { primary: avatarMenuItem.label })] })) }))); }) }))), avatarPanelOnClickMainAction && _jsx(StyledOutlineButton
|
|
61
|
+
// @ts-expect-error
|
|
62
|
+
, __assign({
|
|
63
|
+
// @ts-expect-error
|
|
64
|
+
component: animated.button, style: useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount), disablePadding: true, variant: 'outlined', color: 'primary', size: 'medium', onClick: avatarPanelOnClickMainAction, startIcon: _jsx(Settings, {}) }, { children: avatarPanelMainActionString })), _jsx(List, __assign({ style: { marginBottom: theme.spacing(2) } }, { children: avatarPanelSettingItems &&
|
|
65
|
+
avatarPanelSettingItems.length > 0 &&
|
|
66
|
+
avatarPanelSettingItems.map(function (avatarMenuItem) { return (_jsx(ListItem, __assign({ component: animated.div, style: useStaggerAnimation(isAvatarOpen, animationCount, incrementAnimationCount),
|
|
67
|
+
// whileHover={motionWhileHover}
|
|
68
|
+
// whileTap={motionWhileTap}
|
|
69
|
+
disablePadding: true }, { children: _jsxs(StyledListItemButton
|
|
70
|
+
// TODO: figure out if these are links or buttons
|
|
71
|
+
// @ts-expect-error
|
|
72
|
+
, __assign({
|
|
73
|
+
// TODO: figure out if these are links or buttons
|
|
74
|
+
// @ts-expect-error
|
|
75
|
+
component: Link, role: 'link', onClick: avatarMenuItem.onClick }, { children: [_jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
|
|
76
|
+
minWidth: theme.spacing(5)
|
|
77
|
+
} }, { children: avatarMenuItem.icon })), _jsx(ListItemText, { primary: avatarMenuItem.label })] })) }))); }) }))] })), _jsx(Box, __assign({ className: 'avatar-panel-footnote' }, { children: avatarPanelFootnote && avatarPanelFootnote }))] }));
|
|
78
|
+
};
|
|
79
|
+
export default AvatarPanel;
|