@learningpool/ui 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/assets → assets}/Images.d.ts +0 -0
- package/{dist/assets → assets}/Images.js +0 -0
- package/{dist/components → components}/atoms/Autocomplete/Autocomplete.d.ts +0 -0
- package/{dist/components → components}/atoms/Autocomplete/Autocomplete.js +0 -0
- package/{dist/components → components}/atoms/Button/Button.d.ts +0 -0
- package/{dist/components → components}/atoms/Button/Button.js +0 -0
- package/{dist/components → components}/atoms/Checkbox/Checkbox.d.ts +0 -0
- package/{dist/components → components}/atoms/Checkbox/Checkbox.js +0 -0
- package/{dist/components → components}/atoms/IconButton/IconButton.d.ts +0 -0
- package/{dist/components → components}/atoms/IconButton/IconButton.js +0 -0
- package/{dist/components → components}/atoms/Radio/Radio.d.ts +0 -0
- package/{dist/components → components}/atoms/Radio/Radio.js +0 -0
- package/{dist/components → components}/atoms/Select/Select.d.ts +0 -0
- package/{dist/components → components}/atoms/Select/Select.js +0 -0
- package/{dist/components → components}/atoms/Slider/Slider.d.ts +0 -0
- package/{dist/components → components}/atoms/Slider/Slider.js +0 -0
- package/{dist/components → components}/atoms/Switch/Switch.d.ts +0 -0
- package/{dist/components → components}/atoms/Switch/Switch.js +0 -0
- package/{dist/components → components}/atoms/TextField/TextField.d.ts +0 -0
- package/{dist/components → components}/atoms/TextField/TextField.js +0 -0
- package/{dist/components → components}/atoms/ToggleButton/ToggleButton.d.ts +0 -0
- package/{dist/components → components}/atoms/ToggleButton/ToggleButton.js +0 -0
- package/{dist/components → components}/datadisplay/Avatar/Avatar.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Avatar/Avatar.js +0 -0
- package/{dist/components → components}/datadisplay/Chip/Chip.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Chip/Chip.js +0 -0
- package/{dist/components → components}/datadisplay/List/List.d.ts +0 -0
- package/{dist/components → components}/datadisplay/List/List.js +0 -0
- package/{dist/components → components}/datadisplay/Tooltip/Tooltip.d.ts +0 -0
- package/{dist/components → components}/datadisplay/Tooltip/Tooltip.js +0 -0
- package/{dist/components → components}/feedback/Alert/Alert.d.ts +0 -0
- package/{dist/components → components}/feedback/Alert/Alert.js +0 -0
- package/{dist/components → components}/landmarks/Header/Header.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/Header.js +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderActionButtons.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderActionButtons.js +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderStyles.d.ts +0 -0
- package/{dist/components → components}/landmarks/Header/HeaderStyles.js +0 -0
- package/{dist/components → components}/navigation/Drawer/Drawer.d.ts +0 -0
- package/{dist/components → components}/navigation/Drawer/Drawer.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigation.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigation.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatar.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawer.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationMotion.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationMotion.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearch.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearch.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationSearchStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationStyles.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +0 -0
- package/{dist/components → components}/navigation/MobileNavigation/MobileNavigationToggleX.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigation.d.ts +1 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigation.js +12 -10
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatar.js +11 -7
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +49 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +33 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +3 -3
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +1 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +16 -15
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +3 -3
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationMotion.d.ts +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationMotion.js +0 -0
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +6 -1
- package/{dist/components → components}/navigation/VerticalNavigation/VerticalNavigationStyles.js +14 -15
- package/{dist/components → components}/pages/ErrorPage/ErrorPage.d.ts +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPage.js +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPageStyles.d.ts +0 -0
- package/{dist/components → components}/pages/ErrorPage/ErrorPageStyles.js +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSide.d.ts +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSide.js +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSideStyles.d.ts +0 -0
- package/{dist/components → components}/pages/SideInSide/SideInSideStyles.js +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcher.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcher.js +1 -1
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherItem.js +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherStyles.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/AppSwitcherStyles.js +8 -6
- package/{dist/components → components}/stream/AppSwitcher/constants.d.ts +0 -0
- package/{dist/components → components}/stream/AppSwitcher/constants.js +0 -0
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/index.js → index.js} +0 -0
- package/lang/en-us.d.ts +15 -0
- package/lang/en-us.js +18 -0
- package/package.json +3 -70
- package/{dist/types → types}/components/navigation/VerticalNavigation.d.ts +0 -0
- package/{dist/types → types}/components/navigation/VerticalNavigation.js +0 -0
- package/{dist/types → types}/components/navigation/VerticalNavigationAvatar.d.ts +1 -0
- package/{dist/types → types}/components/navigation/VerticalNavigationAvatar.js +0 -0
- package/{dist/types → types}/components/stream/AppSwitcher.d.ts +0 -0
- package/{dist/types → types}/components/stream/AppSwitcher.js +0 -0
- package/{dist/types → types}/index.d.ts +0 -0
- package/{dist/types → types}/index.js +0 -0
- package/{dist/utils → utils}/constants.d.ts +0 -0
- package/{dist/utils → utils}/constants.js +0 -0
- package/{dist/utils → utils}/helpers.d.ts +0 -0
- package/{dist/utils → utils}/helpers.js +0 -0
- package/{dist/utils → utils}/hooks.d.ts +0 -0
- package/{dist/utils → utils}/hooks.js +0 -0
- package/{dist/utils → utils}/index.d.ts +0 -0
- package/{dist/utils → utils}/index.js +0 -0
- package/{dist/utils → utils}/theme.d.ts +0 -0
- package/{dist/utils → utils}/theme.js +0 -0
- package/.eslintrc.js +0 -40
- package/.github/pull_request_template.md +0 -23
- package/.github/renovate.json +0 -57
- package/.github/workflows/integration.yml +0 -53
- package/.github/workflows/wss.yml +0 -22
- package/.jest-test-results.json +0 -1
- package/.releaserc +0 -32
- package/.storybook/learningpoolTheme.js +0 -39
- package/.storybook/main.js +0 -21
- package/.storybook/manager-head.html +0 -175
- package/.storybook/manager.js +0 -34
- package/.storybook/preview-head.html +0 -212
- package/.storybook/preview.js +0 -120
- package/.storybook/storybook-sort.js +0 -54
- package/CHANGELOG.md +0 -20
- package/amplify.yml +0 -16
- package/babel.config.json +0 -14
- package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +0 -31
- package/dist/lang/en-us.d.ts +0 -6
- package/dist/lang/en-us.js +0 -6
- package/dist/package.json +0 -41
- package/jest.config.ts +0 -11
- package/jest.setup.ts +0 -5
- package/license +0 -7
- package/merge.js +0 -27
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/assets/atoms.svg +0 -5
- package/public/assets/automation.svg +0 -1
- package/public/assets/avatar-1.jpg +0 -0
- package/public/assets/avatar-2.jpg +0 -0
- package/public/assets/avatar-3.jpg +0 -0
- package/public/assets/flux/icon-dark.svg +0 -6
- package/public/assets/flux/icon-light.svg +0 -1
- package/public/assets/flux/icon-white.svg +0 -6
- package/public/assets/flux/icon.svg +0 -6
- package/public/assets/flux/logo-dark.svg +0 -22
- package/public/assets/flux/logo-light.svg +0 -1
- package/public/assets/flux/logo-white.svg +0 -22
- package/public/assets/flux/logo.svg +0 -22
- package/public/assets/iPhone6.jpg +0 -0
- package/public/assets/iPhone6Plus.jpg +0 -0
- package/public/assets/lp-logo.png +0 -0
- package/public/assets/lplogo.svg +0 -1
- package/public/assets/molecules.svg +0 -8
- package/public/assets/organisms.svg +0 -21
- package/public/assets/pages.svg +0 -4
- package/public/assets/particles.svg +0 -3
- package/public/assets/stream-dark.png +0 -0
- package/public/assets/stream-suite-logo.svg +0 -38
- package/public/assets/stream-white.png +0 -0
- package/public/assets/stream.png +0 -0
- package/public/assets/templates.svg +0 -3
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/public/site.webmanifest +0 -1
- package/readme.md +0 -132
- package/src/docs.tsx +0 -167
- package/src/lib/assets/Images.tsx +0 -47
- package/src/lib/assets/stream-suite-logo.svg +0 -38
- package/src/lib/components/atoms/Autocomplete/Autocomplete.test.tsx +0 -179
- package/src/lib/components/atoms/Autocomplete/Autocomplete.tsx +0 -14
- package/src/lib/components/atoms/Button/Button.test.tsx +0 -166
- package/src/lib/components/atoms/Button/Button.tsx +0 -16
- package/src/lib/components/atoms/Checkbox/Checkbox.test.tsx +0 -85
- package/src/lib/components/atoms/Checkbox/Checkbox.tsx +0 -10
- package/src/lib/components/atoms/IconButton/IconButton.test.tsx +0 -60
- package/src/lib/components/atoms/IconButton/IconButton.tsx +0 -9
- package/src/lib/components/atoms/Radio/Radio.test.tsx +0 -136
- package/src/lib/components/atoms/Radio/Radio.tsx +0 -10
- package/src/lib/components/atoms/Select/Select.test.tsx +0 -158
- package/src/lib/components/atoms/Select/Select.tsx +0 -12
- package/src/lib/components/atoms/Slider/Slider.test.tsx +0 -103
- package/src/lib/components/atoms/Slider/Slider.tsx +0 -10
- package/src/lib/components/atoms/Switch/Switch.test.tsx +0 -96
- package/src/lib/components/atoms/Switch/Switch.tsx +0 -10
- package/src/lib/components/atoms/TextField/TextField.test.tsx +0 -131
- package/src/lib/components/atoms/TextField/TextField.tsx +0 -31
- package/src/lib/components/atoms/ToggleButton/ToggleButton.test.tsx +0 -122
- package/src/lib/components/atoms/ToggleButton/ToggleButton.tsx +0 -10
- package/src/lib/components/datadisplay/Avatar/Avatar.test.tsx +0 -187
- package/src/lib/components/datadisplay/Avatar/Avatar.tsx +0 -35
- package/src/lib/components/datadisplay/Avatar/avatar-1.jpg +0 -0
- package/src/lib/components/datadisplay/Chip/Chip.test.tsx +0 -82
- package/src/lib/components/datadisplay/Chip/Chip.tsx +0 -11
- package/src/lib/components/datadisplay/List/List.test.tsx +0 -168
- package/src/lib/components/datadisplay/List/List.tsx +0 -8
- package/src/lib/components/datadisplay/Tooltip/Tooltip.test.tsx +0 -98
- package/src/lib/components/datadisplay/Tooltip/Tooltip.tsx +0 -9
- package/src/lib/components/feedback/Alert/Alert.test.tsx +0 -139
- package/src/lib/components/feedback/Alert/Alert.tsx +0 -10
- package/src/lib/components/landmarks/Header/Header.tsx +0 -140
- package/src/lib/components/landmarks/Header/HeaderActionButtons.tsx +0 -117
- package/src/lib/components/landmarks/Header/HeaderStyles.tsx +0 -62
- package/src/lib/components/navigation/Drawer/Drawer.test.tsx +0 -95
- package/src/lib/components/navigation/Drawer/Drawer.tsx +0 -21
- package/src/lib/components/navigation/MobileNavigation/MobileNavigation.tsx +0 -276
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatar.tsx +0 -334
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.tsx +0 -77
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawer.tsx +0 -197
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.tsx +0 -143
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.tsx +0 -192
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.tsx +0 -67
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.tsx +0 -192
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.tsx +0 -217
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationMotion.tsx +0 -119
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.tsx +0 -35
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearch.tsx +0 -114
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearchStyles.tsx +0 -47
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationStyles.tsx +0 -320
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.tsx +0 -59
- package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleX.tsx +0 -51
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigation.tsx +0 -468
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatar.tsx +0 -208
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.tsx +0 -75
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.tsx +0 -196
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.tsx +0 -94
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.tsx +0 -212
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.tsx +0 -240
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationMotion.tsx +0 -119
- package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationStyles.tsx +0 -302
- package/src/lib/components/pages/ErrorPage/ErrorPage.test.tsx +0 -78
- package/src/lib/components/pages/ErrorPage/ErrorPage.tsx +0 -50
- package/src/lib/components/pages/ErrorPage/ErrorPageStyles.tsx +0 -30
- package/src/lib/components/pages/SideInSide/SideInSide.tsx +0 -100
- package/src/lib/components/pages/SideInSide/SideInSideStyles.tsx +0 -62
- package/src/lib/components/stream/AppSwitcher/AppSwitcher.tsx +0 -381
- package/src/lib/components/stream/AppSwitcher/AppSwitcherItem.tsx +0 -84
- package/src/lib/components/stream/AppSwitcher/AppSwitcherStyles.tsx +0 -325
- package/src/lib/components/stream/AppSwitcher/constants.tsx +0 -28
- package/src/lib/index.tsx +0 -148
- package/src/lib/lang/en-us.js +0 -6
- package/src/lib/types/components/navigation/VerticalNavigation.ts +0 -52
- package/src/lib/types/components/navigation/VerticalNavigationAvatar.ts +0 -26
- package/src/lib/types/components/stream/AppSwitcher.ts +0 -10
- package/src/lib/types/index.ts +0 -9
- package/src/lib/utils/constants.tsx +0 -11
- package/src/lib/utils/helpers.tsx +0 -77
- package/src/lib/utils/hooks.tsx +0 -33
- package/src/lib/utils/index.tsx +0 -4
- package/src/lib/utils/theme.tsx +0 -79
- package/src/react-app-env.d.ts +0 -1
- package/src/setupTests.ts +0 -5
- package/src/stories/Components/DataDisplay/Avatar/Accessibility.stories.mdx +0 -34
- package/src/stories/Components/DataDisplay/Avatar/AllCombinations.tsx +0 -56
- package/src/stories/Components/DataDisplay/Avatar/Avatar.stories.tsx +0 -19
- package/src/stories/Components/DataDisplay/Avatar/Examples.stories.tsx +0 -278
- package/src/stories/Components/DataDisplay/Avatar/Overview.stories.mdx +0 -47
- package/src/stories/Components/DataDisplay/Chip/Accessibility.stories.mdx +0 -29
- package/src/stories/Components/DataDisplay/Chip/AllCombinations.tsx +0 -58
- package/src/stories/Components/DataDisplay/Chip/Chip.stories.tsx +0 -21
- package/src/stories/Components/DataDisplay/Chip/Examples.stories.tsx +0 -126
- package/src/stories/Components/DataDisplay/Chip/Overview.stories.mdx +0 -57
- package/src/stories/Components/DataDisplay/List/Accessibility.stories.mdx +0 -54
- package/src/stories/Components/DataDisplay/List/AllCombinations.tsx +0 -396
- package/src/stories/Components/DataDisplay/List/Examples.stories.tsx +0 -501
- package/src/stories/Components/DataDisplay/List/List.stories.tsx +0 -35
- package/src/stories/Components/DataDisplay/List/Overview.stories.mdx +0 -69
- package/src/stories/Components/DataDisplay/Table/Overview.stories.mdx +0 -70
- package/src/stories/Components/DataDisplay/Tooltip/Accessibility.stories.mdx +0 -39
- package/src/stories/Components/DataDisplay/Tooltip/AllCombinations.tsx +0 -134
- package/src/stories/Components/DataDisplay/Tooltip/Examples.stories.tsx +0 -237
- package/src/stories/Components/DataDisplay/Tooltip/Overview.stories.mdx +0 -58
- package/src/stories/Components/DataDisplay/Tooltip/Tooltip.stories.tsx +0 -22
- package/src/stories/Components/Feedback/Alert/Accessibility.stories.mdx +0 -25
- package/src/stories/Components/Feedback/Alert/Alert.stories.tsx +0 -22
- package/src/stories/Components/Feedback/Alert/AllCombinations.tsx +0 -37
- package/src/stories/Components/Feedback/Alert/Examples.stories.tsx +0 -137
- package/src/stories/Components/Feedback/Alert/Overview.stories.mdx +0 -62
- package/src/stories/Components/Inputs/Autocomplete/Accessibility.stories.mdx +0 -31
- package/src/stories/Components/Inputs/Autocomplete/AllCombinations.tsx +0 -182
- package/src/stories/Components/Inputs/Autocomplete/Autocomplete.stories.tsx +0 -31
- package/src/stories/Components/Inputs/Autocomplete/Examples.stories.tsx +0 -233
- package/src/stories/Components/Inputs/Autocomplete/Overview.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Button/Accessibility.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Button/AllCombinations.tsx +0 -53
- package/src/stories/Components/Inputs/Button/Button.stories.tsx +0 -23
- package/src/stories/Components/Inputs/Button/Examples.stories.tsx +0 -190
- package/src/stories/Components/Inputs/Button/Overview.stories.mdx +0 -52
- package/src/stories/Components/Inputs/Checkbox/Accessibility.stories.mdx +0 -38
- package/src/stories/Components/Inputs/Checkbox/AllCombinations.tsx +0 -55
- package/src/stories/Components/Inputs/Checkbox/Checkbox.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Checkbox/Examples.stories.tsx +0 -363
- package/src/stories/Components/Inputs/Checkbox/Overview.stories.mdx +0 -63
- package/src/stories/Components/Inputs/IconButton/Examples.stories.tsx +0 -24
- package/src/stories/Components/Inputs/IconButton/IconButton.stories.tsx +0 -26
- package/src/stories/Components/Inputs/Radio/Accessibility.stories.mdx +0 -61
- package/src/stories/Components/Inputs/Radio/AllCombinations.tsx +0 -75
- package/src/stories/Components/Inputs/Radio/Examples.stories.tsx +0 -333
- package/src/stories/Components/Inputs/Radio/Overview.stories.mdx +0 -74
- package/src/stories/Components/Inputs/Radio/Radio.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Select/Accessibility.stories.mdx +0 -51
- package/src/stories/Components/Inputs/Select/AllCombinations.tsx +0 -63
- package/src/stories/Components/Inputs/Select/Examples.stories.tsx +0 -803
- package/src/stories/Components/Inputs/Select/Overview.stories.mdx +0 -73
- package/src/stories/Components/Inputs/Select/Select.stories.tsx +0 -22
- package/src/stories/Components/Inputs/Slider/Accessibility.stories.mdx +0 -43
- package/src/stories/Components/Inputs/Slider/AllCombinations.tsx +0 -30
- package/src/stories/Components/Inputs/Slider/Examples.stories.tsx +0 -146
- package/src/stories/Components/Inputs/Slider/Overview.stories.mdx +0 -59
- package/src/stories/Components/Inputs/Slider/Slider.stories.tsx +0 -27
- package/src/stories/Components/Inputs/Switch/Accessibility.stories.mdx +0 -34
- package/src/stories/Components/Inputs/Switch/AllCombinations.tsx +0 -45
- package/src/stories/Components/Inputs/Switch/Examples.stories.tsx +0 -213
- package/src/stories/Components/Inputs/Switch/Overview.stories.mdx +0 -62
- package/src/stories/Components/Inputs/Switch/Switch.stories.tsx +0 -22
- package/src/stories/Components/Inputs/TextField/Accessibility.stories.mdx +0 -29
- package/src/stories/Components/Inputs/TextField/AllCombinations.tsx +0 -57
- package/src/stories/Components/Inputs/TextField/Examples.stories.tsx +0 -127
- package/src/stories/Components/Inputs/TextField/Overview.stories.mdx +0 -60
- package/src/stories/Components/Inputs/TextField/TextField.stories.tsx +0 -261
- package/src/stories/Components/Inputs/ToggleButton/Accessibility.stories.mdx +0 -32
- package/src/stories/Components/Inputs/ToggleButton/AllCombinations.tsx +0 -113
- package/src/stories/Components/Inputs/ToggleButton/Examples.stories.tsx +0 -339
- package/src/stories/Components/Inputs/ToggleButton/Overview.stories.mdx +0 -55
- package/src/stories/Components/Inputs/ToggleButton/ToggleButton.stories.tsx +0 -19
- package/src/stories/Components/Landmarks/Header/Examples.stories.tsx +0 -197
- package/src/stories/Components/Landmarks/Header/Header.stories.tsx +0 -34
- package/src/stories/Components/Landmarks/Header/Overview.stories.mdx +0 -44
- package/src/stories/Components/Navigation/Drawer/Accessibility.stories.mdx +0 -13
- package/src/stories/Components/Navigation/Drawer/Drawer.stories.tsx +0 -80
- package/src/stories/Components/Navigation/Drawer/Examples.stories.tsx +0 -440
- package/src/stories/Components/Navigation/Drawer/Overview.stories.mdx +0 -43
- package/src/stories/Components/Navigation/MobileNavigation/Accessibility.stories.mdx +0 -14
- package/src/stories/Components/Navigation/MobileNavigation/Examples.stories.tsx +0 -384
- package/src/stories/Components/Navigation/MobileNavigation/MobileNavigation.stories.tsx +0 -24
- package/src/stories/Components/Navigation/MobileNavigation/Overview.stories.mdx +0 -47
- package/src/stories/Components/Navigation/VerticalNavigation/Accessibility.stories.mdx +0 -14
- package/src/stories/Components/Navigation/VerticalNavigation/Examples.stories.tsx +0 -307
- package/src/stories/Components/Navigation/VerticalNavigation/Overview.stories.mdx +0 -47
- package/src/stories/Components/Navigation/VerticalNavigation/VerticalNavigation.stories.tsx +0 -24
- package/src/stories/ContactUs.stories.mdx +0 -21
- package/src/stories/Experimental/Test.stories.mdx +0 -46
- package/src/stories/GettingStarted/Designer.stories.mdx +0 -86
- package/src/stories/GettingStarted/Developer.stories.mdx +0 -134
- package/src/stories/Guidelines/Accessibility/AssistiveTechnology.stories.mdx +0 -70
- package/src/stories/Guidelines/Accessibility/ColorAndContrast.stories.mdx +0 -109
- package/src/stories/Guidelines/Accessibility/Hierarchy.stories.mdx +0 -119
- package/src/stories/Guidelines/Accessibility/Imagery.stories.mdx +0 -136
- package/src/stories/Guidelines/Accessibility/Overview.stories.mdx +0 -44
- package/src/stories/Guidelines/Accessibility/Principles.stories.mdx +0 -156
- package/src/stories/Guidelines/Accessibility/SoundAndMotion.stories.mdx +0 -59
- package/src/stories/Guidelines/Accessibility/Typography.stories.mdx +0 -69
- package/src/stories/Guidelines/Accessibility/Writing.stories.mdx +0 -188
- package/src/stories/Guidelines/Styleguide/ColorSwatch.tsx +0 -53
- package/src/stories/Guidelines/Styleguide/Colors.stories.mdx +0 -118
- package/src/stories/Guidelines/Styleguide/Typography.stories.mdx +0 -84
- package/src/stories/Introduction.stories.mdx +0 -65
- package/src/stories/Pages/ErrorPage.stories.tsx +0 -30
- package/src/stories/Pages/SideInSide.stories.tsx +0 -195
- package/src/stories/Roadmap.stories.mdx +0 -19
- package/src/stories/Templates/Login.stories.mdx +0 -46
- package/src/stories/assets/Atomic_Design_Icons-Dark.svg +0 -24
- package/src/stories/assets/Atomic_Design_Icons-Light.svg +0 -25
- package/src/stories/assets/accessibility-1.png +0 -0
- package/src/stories/assets/accessibility-2.png +0 -0
- package/src/stories/assets/accessibility-3.png +0 -0
- package/src/stories/assets/accessibility-banner.png +0 -0
- package/src/stories/assets/atoms.svg +0 -6
- package/src/stories/assets/design_system_2022-02-11_12.22pm.png +0 -0
- package/src/stories/assets/figma-tokens.png +0 -0
- package/src/stories/assets/hierarchy-1.jpg +0 -0
- package/src/stories/assets/hierarchy-2.jpg +0 -0
- package/src/stories/assets/hierarchy-3.jpg +0 -0
- package/src/stories/assets/icon-contrast-1.jpg +0 -0
- package/src/stories/assets/icon-contrast-2.jpg +0 -0
- package/src/stories/assets/imagery-1.png +0 -0
- package/src/stories/assets/imagery-2.png +0 -0
- package/src/stories/assets/imagery-3.png +0 -0
- package/src/stories/assets/imagery-4.jpg +0 -0
- package/src/stories/assets/molecules.svg +0 -9
- package/src/stories/assets/organisms.svg +0 -22
- package/src/stories/assets/pages.svg +0 -5
- package/src/stories/assets/particles.svg +0 -4
- package/src/stories/assets/templates.svg +0 -4
- package/src/stories/assets/testData.tsx +0 -102
- package/src/stories/assets/text-contrast-1.jpg +0 -0
- package/src/stories/assets/text-contrast-2.jpg +0 -0
- package/src/stories/assets/typography-1.png +0 -0
- package/src/stories/assets/visual-clues-1.png +0 -0
- package/src/stories/assets/visual-clues-2.png +0 -0
- package/src/stories/assets/writing-1.jpg +0 -0
- package/src/stories/assets/writing-2.png +0 -0
- package/src/stories/assets/writing-3.png +0 -0
- package/src/stories/assets/writing-4.png +0 -0
- package/src/stories/utils/CustomIcons.tsx +0 -44
- package/tsconfig.eslint.json +0 -16
- package/tsconfig.json +0 -50
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import { createTheme, PaletteMode, ThemeProvider, Typography, useTheme } from '@mui/material'
|
|
2
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
3
|
-
import * as React from 'react'
|
|
4
|
-
import { DOCS } from '../../../../docs'
|
|
5
|
-
import { VerticalNavigation } from '../../../../lib'
|
|
6
|
-
import { lightTheme, darkTheme } from '../../../../lib/utils'
|
|
7
|
-
import MailIcon from '@mui/icons-material/Mail'
|
|
8
|
-
import GroupIcon from '@mui/icons-material/Group'
|
|
9
|
-
import { Home, LibraryAdd, MenuBook } from '@mui/icons-material'
|
|
10
|
-
import { applications } from '../../../../lib/components/stream/AppSwitcher/constants'
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
title: 'Components/Navigation/Vertical Navigation/Examples',
|
|
14
|
-
component: VerticalNavigation
|
|
15
|
-
} as ComponentMeta<typeof VerticalNavigation>
|
|
16
|
-
|
|
17
|
-
export const Default: ComponentStory<typeof VerticalNavigation> = (args) => {
|
|
18
|
-
const theme = useTheme()
|
|
19
|
-
const [themeMode, setThemeMode] = React.useState<PaletteMode>('light')
|
|
20
|
-
const [isPersistent, setPersistentMode] = React.useState(false)
|
|
21
|
-
|
|
22
|
-
const testTheme = createTheme({
|
|
23
|
-
palette: {
|
|
24
|
-
mode: themeMode,
|
|
25
|
-
// ...darkTheme
|
|
26
|
-
...(theme.palette.mode === 'dark' && { ...darkTheme.palette }),
|
|
27
|
-
...(theme.palette.mode === 'light' && { ...lightTheme.palette })
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
const customer1 = false
|
|
32
|
-
|
|
33
|
-
const items = [
|
|
34
|
-
{ label: 'Home', icon: <Home /> },
|
|
35
|
-
{ label: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do', icon: <MailIcon />, onClick: () => console.log('hi there') },
|
|
36
|
-
{
|
|
37
|
-
label: 'Testing',
|
|
38
|
-
icon: <GroupIcon />,
|
|
39
|
-
onClick: () => console.log('Action: Testing item clicked'),
|
|
40
|
-
children: [
|
|
41
|
-
{
|
|
42
|
-
label: 'First Item',
|
|
43
|
-
onClick: () => console.log('Action: First sub item clicked')
|
|
44
|
-
},
|
|
45
|
-
{ label: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do' },
|
|
46
|
-
{ label: 'Longstringoftextthatdoesntwrap Item' },
|
|
47
|
-
{ label: 'Forth Item' }
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
{ label: 'Library', icon: customer1 ? <MenuBook /> : <LibraryAdd /> },
|
|
51
|
-
{
|
|
52
|
-
label: 'Another Test',
|
|
53
|
-
icon: <MenuBook />,
|
|
54
|
-
children: [
|
|
55
|
-
{ label: 'Child Link' },
|
|
56
|
-
{ label: 'Child Link' }
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
const secondaryItems = [
|
|
61
|
-
{
|
|
62
|
-
label: 'Home',
|
|
63
|
-
icon: <Home />,
|
|
64
|
-
children: [
|
|
65
|
-
{ label: 'Child Link' },
|
|
66
|
-
{ label: 'Child Link' }
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
{ label: 'Home Too', icon: <MenuBook /> }
|
|
70
|
-
]
|
|
71
|
-
|
|
72
|
-
const avatarPanelMenuItems = [
|
|
73
|
-
{ label: 'Lorem ipsum', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
74
|
-
{ label: 'Dolar sit amet', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
75
|
-
{ label: 'Sed do eiusmodSed do eiusmodSed do eiusmodSed do eiusmod', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
76
|
-
{ label: 'Lorem ipsum', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') }
|
|
77
|
-
]
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<ThemeProvider theme={testTheme}>
|
|
81
|
-
<VerticalNavigation
|
|
82
|
-
items={items}
|
|
83
|
-
secondaryItems={secondaryItems}
|
|
84
|
-
// logo='assets/automation.svg'
|
|
85
|
-
logoText='Stream Automation'
|
|
86
|
-
isPersistent={isPersistent}
|
|
87
|
-
setIsPersistent={setPersistentMode}
|
|
88
|
-
streamHomeApplications={applications}
|
|
89
|
-
{...args}
|
|
90
|
-
|
|
91
|
-
// Avatar panel props
|
|
92
|
-
hasAvatar
|
|
93
|
-
avatarPanelOnClickSwitchDirection={() => console.log('Action: Switch direction of navigation')}
|
|
94
|
-
avatarPanelOnClickLogout={() => console.log('Action: Logout')}
|
|
95
|
-
avatarPanelOnClickViewProfile={() => console.log('Action: View profile')}
|
|
96
|
-
avatarPanelViewProfileString='View profile'
|
|
97
|
-
avatarPanelOnClickEditProfile={() => console.log('Action: Edit profile')}
|
|
98
|
-
avatarPanelEditProfileString='Edit profile'
|
|
99
|
-
avatarPanelMenuItems={avatarPanelMenuItems}
|
|
100
|
-
avatarPanelOnClickMainAction={() => console.log('Action: Main action')}
|
|
101
|
-
avatarPanelMainActionString='Admin panel'
|
|
102
|
-
// avatarPanelSettingItems={avatarPanelSettingItems}
|
|
103
|
-
/>
|
|
104
|
-
<main style={{
|
|
105
|
-
backgroundColor: '#eee',
|
|
106
|
-
margin: '-1rem',
|
|
107
|
-
padding: '3rem',
|
|
108
|
-
paddingLeft: isPersistent ? 340 : 100
|
|
109
|
-
}}>
|
|
110
|
-
<button onClick={(): void => setThemeMode(themeMode === 'light' ? 'dark' : 'light')}>Toggle theme mode</button>
|
|
111
|
-
{/* <button onClick={(): void => setPersistentMode(!isPersistent)}>Toggle persistent</button> */}
|
|
112
|
-
<h1>H1 element for axe testing</h1>
|
|
113
|
-
<p style={{
|
|
114
|
-
width: '100%',
|
|
115
|
-
height: 'auto'
|
|
116
|
-
}}>
|
|
117
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
118
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
119
|
-
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
120
|
-
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
121
|
-
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
122
|
-
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
123
|
-
|
|
124
|
-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
125
|
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
126
|
-
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
127
|
-
laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
128
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
|
|
129
|
-
ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
|
130
|
-
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
|
|
131
|
-
deserunt mollit anim id est laborum.
|
|
132
|
-
</p>
|
|
133
|
-
<p style={{
|
|
134
|
-
width: '100%',
|
|
135
|
-
height: 'auto'
|
|
136
|
-
}}>
|
|
137
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
138
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
139
|
-
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
140
|
-
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
141
|
-
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
142
|
-
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
143
|
-
|
|
144
|
-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
145
|
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
146
|
-
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
147
|
-
laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
148
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
|
|
149
|
-
ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
|
150
|
-
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
|
|
151
|
-
deserunt mollit anim id est laborum.
|
|
152
|
-
</p>
|
|
153
|
-
<p style={{
|
|
154
|
-
width: '100%',
|
|
155
|
-
height: 'auto'
|
|
156
|
-
}}>
|
|
157
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
158
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
159
|
-
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
|
|
160
|
-
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
161
|
-
in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur
|
|
162
|
-
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
163
|
-
|
|
164
|
-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
165
|
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
166
|
-
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
|
|
167
|
-
laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
168
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
|
|
169
|
-
ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
|
170
|
-
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
|
|
171
|
-
deserunt mollit anim id est laborum.
|
|
172
|
-
</p>
|
|
173
|
-
</main>
|
|
174
|
-
</ThemeProvider>
|
|
175
|
-
)
|
|
176
|
-
}
|
|
177
|
-
Default.parameters = {
|
|
178
|
-
docs: {
|
|
179
|
-
description: {
|
|
180
|
-
component: DOCS.VerticalNavigation.Default
|
|
181
|
-
},
|
|
182
|
-
source: {
|
|
183
|
-
type: 'code'
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export const Overview: ComponentStory<typeof VerticalNavigation> = (args): JSX.Element => {
|
|
189
|
-
const customer1 = false
|
|
190
|
-
|
|
191
|
-
const items = [
|
|
192
|
-
{ label: 'Home', icon: <Home /> },
|
|
193
|
-
{ label: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do', icon: <MailIcon />, onClick: () => console.log('hi there') },
|
|
194
|
-
{
|
|
195
|
-
label: 'Testing',
|
|
196
|
-
icon: <GroupIcon />,
|
|
197
|
-
children: [
|
|
198
|
-
{ label: 'Child Link' },
|
|
199
|
-
{ label: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do' },
|
|
200
|
-
{ label: 'Child Link Three' },
|
|
201
|
-
{ label: 'Child Link Four' }
|
|
202
|
-
]
|
|
203
|
-
},
|
|
204
|
-
{ label: 'Library', icon: customer1 ? <MenuBook /> : <LibraryAdd /> },
|
|
205
|
-
{ label: 'Menu', icon: <MenuBook /> },
|
|
206
|
-
{
|
|
207
|
-
label: 'Another Test',
|
|
208
|
-
icon: <GroupIcon />,
|
|
209
|
-
children: [
|
|
210
|
-
{ label: 'Child Link' },
|
|
211
|
-
{ label: 'Child Link' }
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
]
|
|
215
|
-
const secondaryItems = [
|
|
216
|
-
{
|
|
217
|
-
label: 'Home',
|
|
218
|
-
icon: <Home />,
|
|
219
|
-
children: [
|
|
220
|
-
{ label: 'Child Link' },
|
|
221
|
-
{ label: 'Child Link' }
|
|
222
|
-
]
|
|
223
|
-
},
|
|
224
|
-
{ label: 'Home Too', icon: <MenuBook /> }
|
|
225
|
-
]
|
|
226
|
-
|
|
227
|
-
const avatarPanelMenuItems = [
|
|
228
|
-
{ label: 'Lorem ipsum', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
229
|
-
{ label: 'Dolar sit amet', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
230
|
-
{ label: 'Sed do eiusmodSed do eiusmodSed do eiusmodSed do eiusmod', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') },
|
|
231
|
-
{ label: 'Lorem ipsum', icon: <MenuBook />, onClick: () => console.log('Action: Avatar panel menu item') }
|
|
232
|
-
]
|
|
233
|
-
|
|
234
|
-
return (
|
|
235
|
-
<VerticalNavigation
|
|
236
|
-
items={items}
|
|
237
|
-
secondaryItems={secondaryItems}
|
|
238
|
-
logoText='Stream'
|
|
239
|
-
{...args}
|
|
240
|
-
|
|
241
|
-
// Avatar panel props
|
|
242
|
-
hasAvatar
|
|
243
|
-
avatarPanelOnClickSwitchDirection={() => console.log('Action: Switch direction of navigation')}
|
|
244
|
-
avatarPanelOnClickLogout={() => console.log('Action: Logout')}
|
|
245
|
-
avatarPanelOnClickViewProfile={() => console.log('Action: View profile')}
|
|
246
|
-
avatarPanelViewProfileString='View profile'
|
|
247
|
-
avatarPanelOnClickEditProfile={() => console.log('Action: Edit profile')}
|
|
248
|
-
avatarPanelEditProfileString='Edit profile'
|
|
249
|
-
avatarPanelMenuItems={avatarPanelMenuItems}
|
|
250
|
-
avatarPanelOnClickMainAction={() => console.log('Action: Main action')}
|
|
251
|
-
avatarPanelMainActionString='Admin panel'
|
|
252
|
-
avatarPanelFootnote='v1.03'
|
|
253
|
-
/>
|
|
254
|
-
)
|
|
255
|
-
}
|
|
256
|
-
Overview.parameters = {
|
|
257
|
-
docs: {
|
|
258
|
-
description: {
|
|
259
|
-
component: DOCS.VerticalNavigation.Overview
|
|
260
|
-
},
|
|
261
|
-
source: {
|
|
262
|
-
type: 'code'
|
|
263
|
-
},
|
|
264
|
-
iframeHeight: 700,
|
|
265
|
-
inlineStories: false
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
export const Empty: ComponentStory<typeof VerticalNavigation> = (args): JSX.Element => {
|
|
269
|
-
const items = [
|
|
270
|
-
{ label: 'Home', icon: <Home /> }
|
|
271
|
-
]
|
|
272
|
-
const secondaryItems = []
|
|
273
|
-
|
|
274
|
-
const avatarPanelMenuItems = []
|
|
275
|
-
|
|
276
|
-
return (
|
|
277
|
-
<VerticalNavigation
|
|
278
|
-
items={items}
|
|
279
|
-
secondaryItems={secondaryItems}
|
|
280
|
-
logoText='Stream'
|
|
281
|
-
{...args}
|
|
282
|
-
|
|
283
|
-
// Avatar panel props
|
|
284
|
-
hasAvatar
|
|
285
|
-
avatarPanelOnClickSwitchDirection={() => console.log('Action: Switch direction of navigation')}
|
|
286
|
-
avatarPanelOnClickLogout={() => console.log('Action: Logout')}
|
|
287
|
-
avatarPanelOnClickViewProfile={() => console.log('Action: View profile')}
|
|
288
|
-
avatarPanelViewProfileString='View profile'
|
|
289
|
-
avatarPanelOnClickEditProfile={() => console.log('Action: Edit profile')}
|
|
290
|
-
avatarPanelEditProfileString='Edit profile'
|
|
291
|
-
avatarPanelMenuItems={avatarPanelMenuItems}
|
|
292
|
-
avatarPanelFootnote={<Typography>v1.03</Typography>}
|
|
293
|
-
/>
|
|
294
|
-
)
|
|
295
|
-
}
|
|
296
|
-
Empty.parameters = {
|
|
297
|
-
docs: {
|
|
298
|
-
description: {
|
|
299
|
-
component: DOCS.VerticalNavigation.Empty
|
|
300
|
-
},
|
|
301
|
-
source: {
|
|
302
|
-
type: 'code'
|
|
303
|
-
},
|
|
304
|
-
iframeHeight: 700,
|
|
305
|
-
inlineStories: false
|
|
306
|
-
}
|
|
307
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
import { VerticalNavigation } from '../../../../lib/'
|
|
3
|
-
import { MUIIcon, MaterialDesignIcon, W3CIcon, FigmaIcon, GithubIcon } from '../../../utils/CustomIcons';
|
|
4
|
-
import Chip from '@mui/material/Chip';
|
|
5
|
-
import Stack from '@mui/material/Stack';
|
|
6
|
-
|
|
7
|
-
<Meta title="Components/Navigation/Vertical Navigation/Overview" component={VerticalNavigation} />
|
|
8
|
-
|
|
9
|
-
[](#vertical-navigation-overview)Vertical Navigation Overview <span class="sbdocs-edit-link"><Chip clickable component="a" href="https://github.com/ht2-labs/design-system/tree/main/src/stories/Components/Navigation/Drawer/Overview.stories.mdx" size="small" label="Edit" variant="outlined" /></span>
|
|
10
|
-
=================================================================================
|
|
11
|
-
|
|
12
|
-
### [](#what-does-it-do)What does it do?
|
|
13
|
-
|
|
14
|
-
The Vertical Navigation component provides a persistent navigation drawer that can be toggled open or closed. This component appears fixed to the left side of the browser window, or displays on the right side for right-to-left languages. It is primarily used to navigate between pages within an application.
|
|
15
|
-
|
|
16
|
-
<Stack direction="row" spacing={1}>
|
|
17
|
-
<Chip clickable component="a" href="https://mui.com/components/drawers/" size="small" icon={<MUIIcon viewBox="-5 0 40 30" />} label="Material UI" variant="outlined" />
|
|
18
|
-
<Chip clickable component="a" href="https://material.io/components/navigation-drawer" size="small" icon={<MaterialDesignIcon />} label="Material Design" variant="outlined" />
|
|
19
|
-
<Chip clickable component="a" href="https://www.figma.com/proto/mBDuFn79U8wQIIEoCGpMew/DS%3A-Component-Library?node-id=487%3A14431&scaling=min-zoom&page-id=310%3A35254&starting-point-node-id=487%3A14431" size="small" icon={<FigmaIcon />} label="Figma" variant="outlined" />
|
|
20
|
-
<Chip clickable component="a" href="https://github.com/HT2-Labs/design-system/tree/main/src/lib/components/navigation/Drawer" size="small" icon={<GithubIcon />} label="Github" variant="outlined" />
|
|
21
|
-
</Stack>
|
|
22
|
-
|
|
23
|
-
### [](#why-use-it)Why use it?
|
|
24
|
-
|
|
25
|
-
Use the Vertical Navigation component when you want to provide a clear and consistent method of navigating between pages within an application. Futher information about the reasons for the vertical orientation can be found in our [Design System documentation](https://learninglocker.atlassian.net/wiki/spaces/PX/pages/3619029045/Vertical+Navigation#Rational).
|
|
26
|
-
|
|
27
|
-
### [](#how-to-implement-it)How to implement it?
|
|
28
|
-
|
|
29
|
-
You can see a basic example of the Vertical Navigation component below.
|
|
30
|
-
|
|
31
|
-
<Canvas isExpanded>
|
|
32
|
-
<Story id="components-navigation-vertical-navigation-examples--overview" />
|
|
33
|
-
</Canvas>
|
|
34
|
-
|
|
35
|
-
### [](#best-practices)Best practices
|
|
36
|
-
|
|
37
|
-
* Use the Vertical Navigation component to provide a consistent display of top level site navigation elements.
|
|
38
|
-
* Set the primary navigation links using the `items` prop.
|
|
39
|
-
* Set the secondary navigation links using the `secondaryItems` prop.
|
|
40
|
-
* Use the `logoText` prop to provide a clear and concise label for any custom logos added to the component.
|
|
41
|
-
|
|
42
|
-
### [](#future-considerations)Future considerations
|
|
43
|
-
|
|
44
|
-
* *Persistent Display* - The Vertical Navigation component will provide users the ability to "pin" the navigation drawer in a persistent open state. This will allow users some individual control over how they navigate through a site. Persistent display of menu items can give users easy access to the 2nd tier nav elements.
|
|
45
|
-
|
|
46
|
-
### [](#design-prototype)Design prototype
|
|
47
|
-
TODO: Add design prototype
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import { VerticalNavigation } from '../../../../lib'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Navigation/Vertical Navigation/Properties',
|
|
7
|
-
component: VerticalNavigation,
|
|
8
|
-
parameters: {
|
|
9
|
-
controls: {
|
|
10
|
-
sort: 'requiredFirst'
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
addons: {
|
|
14
|
-
panelPosition: 'right'
|
|
15
|
-
}
|
|
16
|
-
} as ComponentMeta<typeof VerticalNavigation>
|
|
17
|
-
|
|
18
|
-
// 👇 We create a “template” of how args map to rendering
|
|
19
|
-
const Template: ComponentStory<typeof VerticalNavigation> = (args) => (
|
|
20
|
-
<VerticalNavigation {...args} />
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
export const Properties = Template.bind({})
|
|
24
|
-
Properties.args = {}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs';
|
|
2
|
-
|
|
3
|
-
<Meta title="Contact Us" />
|
|
4
|
-
|
|
5
|
-
[](#contact-us)Contact Us
|
|
6
|
-
=================================================================================
|
|
7
|
-
|
|
8
|
-
The Design System team is currently building the architecture for the Design System ecosystem.
|
|
9
|
-
|
|
10
|
-
There are a couple of ways to get in contact with the team.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
### [](#contributors)Contributors
|
|
15
|
-
|
|
16
|
-
Contributors to the Component Library on Github.
|
|
17
|
-
|
|
18
|
-
<div class="sbdocs-avatar-list">
|
|
19
|
-
<img class="sbdocs-avatar" src="https://avatars.githubusercontent.com/u/1729773?s=50&v=4" alt="nilslp" />
|
|
20
|
-
<img class="sbdocs-avatar" src="https://avatars.githubusercontent.com/u/20683148?s=50&v=4" alt="rdeber" />
|
|
21
|
-
</div>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
|
|
3
|
-
import Button from '../../lib/components/atoms/Button/Button';
|
|
4
|
-
|
|
5
|
-
<Meta title="Experimental/Test" component={Button} />
|
|
6
|
-
|
|
7
|
-
[](#login)Login
|
|
8
|
-
=================================================================================
|
|
9
|
-
|
|
10
|
-
### [](#what-does-it-do)What does it do?
|
|
11
|
-
|
|
12
|
-
A button helps the user to find the most important actions of a page or within a viewport and enables them to perform these actions. The label is used to clearly indicate to the user what action will be triggered.
|
|
13
|
-
|
|
14
|
-
### [](#why-use-it)Why use it?
|
|
15
|
-
|
|
16
|
-
* Buttons are used to show the user’s choice of options for actions and assign these to a clear hierarchy.
|
|
17
|
-
* Buttons allow users to commit a change, complete steps in a task, or make choices.
|
|
18
|
-
|
|
19
|
-
### [](#how-to-implement-it)How to implement it?
|
|
20
|
-
|
|
21
|
-
Below is an overview of the Contained, Outlined and Text button components.
|
|
22
|
-
|
|
23
|
-
<Canvas>
|
|
24
|
-
<Button variant="text">Text</Button>
|
|
25
|
-
<Button variant="contained">Contained</Button>
|
|
26
|
-
<Button variant="outlined">Outlined</Button>
|
|
27
|
-
</Canvas>
|
|
28
|
-
|
|
29
|
-
Visit the [All Stories](./?path=/docs/components-atoms-button-all-stories--default) page to view all possible variations, states, and sizes for the Button component.
|
|
30
|
-
|
|
31
|
-
### [](#when-to-avoid-it)When to avoid it?
|
|
32
|
-
|
|
33
|
-
### [](#best-practices)Best practices
|
|
34
|
-
|
|
35
|
-
* Text button (low emphasis) - Text buttons are typically used for less important actions.
|
|
36
|
-
* Outlined Button (medium emphasis) - Outlined buttons are used for more emphasis than text buttons due to the stroke.
|
|
37
|
-
* Contained button (high emphasis) - Contained buttons have more emphasis, as they use a color fill and shadow.
|
|
38
|
-
|
|
39
|
-
### [](#design-prototype)Design prototype
|
|
40
|
-
<iframe
|
|
41
|
-
allowfullscreen
|
|
42
|
-
frameborder="0"
|
|
43
|
-
height="350"
|
|
44
|
-
width="100%"
|
|
45
|
-
src="https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/proto/mBDuFn79U8wQIIEoCGpMew/DS%3A-Component-Library?node-id=487%3A14431&scaling=min-zoom&page-id=310%3A35254&starting-point-node-id=487%3A14431"
|
|
46
|
-
/>
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs';
|
|
2
|
-
import AtomicDesign from '../assets/Atomic_Design_Icons-Dark.svg';
|
|
3
|
-
import FigmaTokens from '../assets/figma-tokens.png';
|
|
4
|
-
|
|
5
|
-
<Meta title="Getting Started/Designer" />
|
|
6
|
-
|
|
7
|
-
[](#getting-started-designer)Getting Started - Designer
|
|
8
|
-
=================================================================================
|
|
9
|
-
|
|
10
|
-
## [](#getting-started-designer-pre-requisites)Pre-requisites
|
|
11
|
-
|
|
12
|
-
* [Figma Tokens](https://www.figma.com/community/plugin/843461159747178978/Figma-Tokens) plugin should be installed
|
|
13
|
-
|
|
14
|
-
* Figma Tokens will also need to be authenticated against the [shared repository](https://github.com/Learning Pool/design-tokens) for the Tokens
|
|
15
|
-
|
|
16
|
-
* You will find all the details on how to do this using Github [here](https://docs.tokens.studio/sync/github).
|
|
17
|
-
|
|
18
|
-
* [Stark](https://www.figma.com/community/plugin/732603254453395948/Stark) plugin should be installed
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
This repository is what keeps the design files and dev usage. There is an option to create a pull-request upon pushing changes to the repository which should always be used.
|
|
22
|
-
|
|
23
|
-
As the design tokens are the base level for the Design System any changes to them should always be reviewed and signed off by **at least 2 other members** of the design system team.
|
|
24
|
-
|
|
25
|
-
* * *
|
|
26
|
-
|
|
27
|
-
With the above out of the way, we can cover the process of configuring our design files to utilize the Design Tokens approach of our overall Design System.
|
|
28
|
-
|
|
29
|
-
The below diagram shows where the Figma Tokens fit into our process.
|
|
30
|
-
|
|
31
|
-
1. Figma - DS: Design tokens: _this file is our master and will only be updated when necessary_
|
|
32
|
-
|
|
33
|
-
1. Figma Tokens plugin: _this plugin holds **Global, Light** (theme)**, Dark** (theme) configs_
|
|
34
|
-
|
|
35
|
-
2. It will be used to develop the themes further down the line
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Any changes to the base tokens are done using the plugin - this is crucial as the plugin is what syncs the design file decisions with the dev usage
|
|
39
|
-
|
|
40
|
-
<img src={FigmaTokens} alt="Figma Tokens architecture" />
|
|
41
|
-
|
|
42
|
-
Overall infrastructure map can be seen [here](https://miro.com/app/board/o9J_kxQ6aBM=/)
|
|
43
|
-
|
|
44
|
-
The design tokens are the lowest level and for the most part, the properties have been configured in the correct format. The values however will change when the decisions for the default theme and accessibility issues have been rectified.
|
|
45
|
-
|
|
46
|
-
* * *
|
|
47
|
-
|
|
48
|
-
### Configuring a component to use Design Tokens
|
|
49
|
-
|
|
50
|
-
We are extending the MUI5 library of which we have obtained the official Figma design file. Currently, only @Nils Sanderson has access to this so please reach out to them and they can make a copy of the master component to be extended.
|
|
51
|
-
|
|
52
|
-
To contribute to the [Component Library](https://www.figma.com/file/mBDuFn79U8wQIIEoCGpMew/DS:-Component-Library) design file, consult with the Design System team as to the work required and consult the [Jira roadmap](https://Learning Pool.atlassian.net/jira/software/projects/DS/boards/211/roadmap) to see the upcoming work.
|
|
53
|
-
|
|
54
|
-
1. Create a new page under the Atomic design category you will be creating the component under and name it accordingly e.g. Button, Card
|
|
55
|
-
|
|
56
|
-
1. If you need to make a new section for a category not existing in the design file, create a new blank page and name it in the following format \---- Atoms ---- to act as a divider
|
|
57
|
-
|
|
58
|
-
2. Navigate to the \_\_Template page and copy the layout component that meets the needs of the component, Portrait or Landscape and paste it into your component file. Update the title and if there are any links that are useful follow the convention in the header to add these
|
|
59
|
-
|
|
60
|
-
1. This is not that important as most of the components will have a lot of variations requiring the layout to be custom dimensions
|
|
61
|
-
|
|
62
|
-
3. Copy the master component from MUI5 into the layout and detach from the original (if not automatically done)
|
|
63
|
-
|
|
64
|
-
1. In some cases, there may be multiple components e.g. a base component of which the component is built upon, refer to the Button page on how to structure this
|
|
65
|
-
|
|
66
|
-
2. Make sure to update any of the components to use the local file components
|
|
67
|
-
|
|
68
|
-
4. For the most part, we are extending MUI5’s components so there may be no changes required, however, if there are please refer to the Jira ticket or document stating these changes.
|
|
69
|
-
|
|
70
|
-
5. Hooking up the design tokens from Figma Tokens. It may prove useful to run through some of the [docs on Figma Tokens](https://docs.tokens.studio) to understand its usage.
|
|
71
|
-
|
|
72
|
-
1. Using the tokens will be different for each element. Some elements may require a border to use the divider property or the primary.main background. These should be pretty simple to understand based on how the default MUI5 component has been configured.
|
|
73
|
-
|
|
74
|
-
6. Select the layer and run the [Stark](https://www.figma.com/community/plugin/732603254453395948/Stark) plugin (contrast checker) to make sure it meets the AA standards
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
* * *
|
|
78
|
-
|
|
79
|
-
### Using the Figma Tokens plugin
|
|
80
|
-
|
|
81
|
-
Sorry for the bad video, I will do a better one to replace this as there are a few moments that I am just babbling to myself.
|
|
82
|
-
|
|
83
|
-
Video tutorial showing the Figma Tokens plugin in use for porting over the Badge component from the MUI5 Figma file to the Learning Pool DS: Component Library file.
|
|
84
|
-
|
|
85
|
-
<iframe src="https://player.vimeo.com/video/673198005?h=587da7a4ff" width="640" height="369" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>
|
|
86
|
-
<p><a href="https://vimeo.com/673198005">Figma Tokens - Badge example (terrible tutorial)</a> from <a href="https://vimeo.com/user126793800">Nils Sanderson</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs';
|
|
2
|
-
import AtomicDesign from '../assets/Atomic_Design_Icons-Dark.svg';
|
|
3
|
-
|
|
4
|
-
<Meta title="Getting Started/Developer" />
|
|
5
|
-
|
|
6
|
-
[](#getting-started-developer)Getting Started - Developer
|
|
7
|
-
=================================================================================
|
|
8
|
-
|
|
9
|
-
Learning Pool UI is the Component library for use on Learning Pool projects. There is a long-term vision, for now though, there are only a handful of components to utilize.
|
|
10
|
-
|
|
11
|
-
It is built on top of [MUI](https://mui.com) and bootstrapped with [Create React App](https://github.com/facebook/create-react-app). Our documentation is provided via [Storybook](https://storybook.js.org) and our tests are written using [Jest](https://jestjs.io).
|
|
12
|
-
|
|
13
|
-
Our module uses [semantic versionsing](https://semver.org) and publishes to [NPM](https://www.npmjs.com).
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
First clone the repo then run:
|
|
18
|
-
|
|
19
|
-
### `npm install`
|
|
20
|
-
|
|
21
|
-
## Available Scripts
|
|
22
|
-
|
|
23
|
-
In the project directory, you can run:
|
|
24
|
-
|
|
25
|
-
### `npm run start`
|
|
26
|
-
|
|
27
|
-
Runs the app in the development mode.\
|
|
28
|
-
Open [http://localhost:6006](http://localhost:6006) to view it in the browser.
|
|
29
|
-
|
|
30
|
-
The page will reload if you make edits.\
|
|
31
|
-
You will also see any lint errors in the console.
|
|
32
|
-
|
|
33
|
-
### `npm run start:run-test`
|
|
34
|
-
The same as the `npm run start` command but runs the `npm run test:generate-output` command first, so the test results displayed within Storybook are up-to-date.
|
|
35
|
-
|
|
36
|
-
### `npm run build-storybook`
|
|
37
|
-
Builds the Storybook app for pushing to the public subdomain.
|
|
38
|
-
|
|
39
|
-
### `npm run test`
|
|
40
|
-
Runs the component Jest tests. If its the first run it also takes a snapshot for comparison, on successive runs.
|
|
41
|
-
|
|
42
|
-
### `npm run test:update-snapshot`
|
|
43
|
-
Updates the Jest snapshot.
|
|
44
|
-
|
|
45
|
-
### `npm run test:generate-output`
|
|
46
|
-
Runs the tests and outputs the results to a file `.jest-test-results.json` for use within the [Storybook addon Jest](https://storybook.js.org/addons/@storybook/addon-jest/)
|
|
47
|
-
|
|
48
|
-
## Getting started
|
|
49
|
-
|
|
50
|
-
### Project structure
|
|
51
|
-
|
|
52
|
-
A quick understanding of the architecture of the project is useful before getting started. As this project is used to maintain a Component library it compiles into a module that is hosted on NPM. The `lib` and `stories` directory structure should mirror each other for ease of navigation through the project.
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
src
|
|
56
|
-
│
|
|
57
|
-
└───lib
|
|
58
|
-
│ │
|
|
59
|
-
│ └───atoms
|
|
60
|
-
│ │ │
|
|
61
|
-
│ │ └───Button
|
|
62
|
-
│ │ ...
|
|
63
|
-
│ └───molecules
|
|
64
|
-
│ ...
|
|
65
|
-
└───stories
|
|
66
|
-
│
|
|
67
|
-
└───atoms
|
|
68
|
-
│ │
|
|
69
|
-
│ └───Button
|
|
70
|
-
│ ...
|
|
71
|
-
└───molecules
|
|
72
|
-
...
|
|
73
|
-
```
|
|
74
|
-
---
|
|
75
|
-
### Creating a component
|
|
76
|
-
To get started it is recommended to create a directory for the component in the directory appropriate for your component:
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
src
|
|
80
|
-
│
|
|
81
|
-
└───lib
|
|
82
|
-
│
|
|
83
|
-
└───atoms
|
|
84
|
-
│
|
|
85
|
-
└───Component
|
|
86
|
-
Component.test.tsx
|
|
87
|
-
Component.tsx
|
|
88
|
-
ComponentStyles.tsx
|
|
89
|
-
```
|
|
90
|
-
Once you have created the above structure, it should be mirrored within the `src/stories` directory. It may not require a directory if it is just one file e.g. `src/stories/atoms/Component.stories.tsx`
|
|
91
|
-
|
|
92
|
-
If the component is a bit more complicated and requires extra work for the story, it would be best to create a directory to containing the story and additional files.
|
|
93
|
-
```
|
|
94
|
-
src
|
|
95
|
-
│
|
|
96
|
-
└───stories
|
|
97
|
-
│
|
|
98
|
-
└───atoms
|
|
99
|
-
│
|
|
100
|
-
└───Component
|
|
101
|
-
Component.stories.tsx
|
|
102
|
-
Component.tsx
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Using the library
|
|
106
|
-
|
|
107
|
-
Add the following in the head of the project (if React it's likely to be index.html within the public directory).
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:wght@400;600;700&display=swap" />
|
|
111
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:wght@300;400;500&display=swap" />
|
|
112
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
|
113
|
-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.0/css/all.css" />
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Importing and using components from the library.
|
|
117
|
-
|
|
118
|
-
```javascript
|
|
119
|
-
import { Button } from 'Learning Pool-ui'
|
|
120
|
-
|
|
121
|
-
return <Button />
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
See all the components currently available [components source code](https://bitbucket.org/Learning Pool/Learning Pool-ui/src/master/src/lib/components/).
|
|
125
|
-
|
|
126
|
-
## Contributing
|
|
127
|
-
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
|
128
|
-
|
|
129
|
-
Please make sure to update tests as appropriate.
|
|
130
|
-
|
|
131
|
-
There are related repositories which will be linked in the future.
|
|
132
|
-
|
|
133
|
-
## License
|
|
134
|
-
[MIT](https://choosealicense.com/licenses/mit/)
|