@12-apps/ui 1.5.0 → 1.5.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.
Files changed (229) hide show
  1. package/package.json +16 -8
  2. package/src/button/index.ts +1 -0
  3. package/src/social-login-button/index.ts +1 -0
  4. package/src/{social-login-button.tsx → social-login-button/social-login-button.tsx} +5 -5
  5. package/src/user-avatar/index.ts +1 -0
  6. package/src/{user-avatar.tsx → user-avatar/user-avatar.tsx} +4 -4
  7. package/eslint.config.js +0 -89
  8. package/src/__tests__/data-grid.test.tsx +0 -125
  9. package/src/__tests__/package-wiring.test.ts +0 -41
  10. package/src/__tests__/setup.ts +0 -1
  11. package/src/__tests__/social-login-button.test.tsx +0 -186
  12. package/src/__tests__/user-avatar.test.tsx +0 -195
  13. package/src/__tests__/viewport.test.ts +0 -50
  14. package/src/components/command/__tests__/command.test.tsx +0 -112
  15. package/src/components/data-display/Alert/Alert.stories.tsx +0 -559
  16. package/src/components/data-display/Alert/Alert.test.stories.tsx +0 -707
  17. package/src/components/data-display/AlertDialog/AlertDialog.stories.tsx +0 -362
  18. package/src/components/data-display/AlertDialog/AlertDialog.test.stories.tsx +0 -763
  19. package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.stories.tsx +0 -230
  20. package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.test.stories.tsx +0 -270
  21. package/src/components/data-display/Avatar/Avatar.stories.tsx +0 -721
  22. package/src/components/data-display/Avatar/Avatar.test.stories.tsx +0 -822
  23. package/src/components/data-display/Badge/Badge.stories.tsx +0 -1134
  24. package/src/components/data-display/Badge/Badge.test.stories.tsx +0 -1194
  25. package/src/components/data-display/Banner/Banner.stories.tsx +0 -528
  26. package/src/components/data-display/Banner/Banner.test.stories.tsx +0 -511
  27. package/src/components/data-display/Carousel/Carousel.stories.tsx +0 -607
  28. package/src/components/data-display/Carousel/Carousel.test.stories.tsx +0 -701
  29. package/src/components/data-display/Chart/Chart.stories.tsx +0 -568
  30. package/src/components/data-display/Chart/Chart.test.stories.tsx +0 -174
  31. package/src/components/data-display/Chart/SpecChart.stories.tsx +0 -150
  32. package/src/components/data-display/Chart/SpecChart.test.stories.tsx +0 -56
  33. package/src/components/data-display/Chart/__tests__/SpecChart.test.tsx +0 -60
  34. package/src/components/data-display/Chart/__tests__/chart-format.test.ts +0 -43
  35. package/src/components/data-display/Chart/__tests__/chart-spec.test.ts +0 -119
  36. package/src/components/data-display/Chip/Chip.stories.tsx +0 -252
  37. package/src/components/data-display/Chip/Chip.test.stories.tsx +0 -266
  38. package/src/components/data-display/DataGrid/DataGrid.stories.tsx +0 -515
  39. package/src/components/data-display/DataGrid/DataGrid.test.stories.tsx +0 -653
  40. package/src/components/data-display/DataViews/__tests__/DataViewsGrid.test.tsx +0 -271
  41. package/src/components/data-display/DataViews/__tests__/DataViewsTableBase.test.tsx +0 -134
  42. package/src/components/data-display/DataViews/__tests__/SaveViewModal.test.tsx +0 -83
  43. package/src/components/data-display/DataViews/__tests__/data-views-filter.test.ts +0 -115
  44. package/src/components/data-display/DataViews/__tests__/data-views-preview.test.ts +0 -53
  45. package/src/components/data-display/DataViews/__tests__/range-pill.test.tsx +0 -114
  46. package/src/components/data-display/DataViews/base-card.stories.tsx +0 -136
  47. package/src/components/data-display/DescriptionItem/DescriptionItem.stories.tsx +0 -254
  48. package/src/components/data-display/EmptyState/EmptyState.stories.tsx +0 -282
  49. package/src/components/data-display/EmptyState/EmptyState.test.stories.tsx +0 -441
  50. package/src/components/data-display/ErrorState/ErrorState.stories.tsx +0 -110
  51. package/src/components/data-display/ErrorState/ErrorState.test.stories.tsx +0 -133
  52. package/src/components/data-display/HoverCard/HoverCard.stories.tsx +0 -650
  53. package/src/components/data-display/HoverCard/HoverCard.test.stories.tsx +0 -929
  54. package/src/components/data-display/InteractiveTooltip/InteractiveTooltip.stories.tsx +0 -411
  55. package/src/components/data-display/LazyImage/LazyImage.stories.tsx +0 -387
  56. package/src/components/data-display/Lightbox/Lightbox.stories.tsx +0 -315
  57. package/src/components/data-display/Lightbox/Lightbox.test.stories.tsx +0 -598
  58. package/src/components/data-display/LoadingState/LoadingState.stories.tsx +0 -124
  59. package/src/components/data-display/LoadingState/LoadingState.test.stories.tsx +0 -99
  60. package/src/components/data-display/MapPreview/MapPreview.stories.tsx +0 -458
  61. package/src/components/data-display/MapPreview/MapPreview.test.stories.tsx +0 -394
  62. package/src/components/data-display/Popover/Popover.stories.tsx +0 -295
  63. package/src/components/data-display/Popover/Popover.test.stories.tsx +0 -1162
  64. package/src/components/data-display/Progress/Progress.stories.tsx +0 -481
  65. package/src/components/data-display/Progress/Progress.test.stories.tsx +0 -2070
  66. package/src/components/data-display/SectionOnboarding/SectionOnboarding.stories.tsx +0 -160
  67. package/src/components/data-display/SectionOnboarding/SectionOnboarding.test.stories.tsx +0 -190
  68. package/src/components/data-display/Sheet/Sheet.stories.tsx +0 -883
  69. package/src/components/data-display/Sheet/Sheet.test.stories.tsx +0 -1105
  70. package/src/components/data-display/StatCard/StatCard.stories.tsx +0 -167
  71. package/src/components/data-display/StatCard/StatCard.test.stories.tsx +0 -240
  72. package/src/components/data-display/Stepper/Stepper.stories.tsx +0 -540
  73. package/src/components/data-display/Stepper/Stepper.test.stories.tsx +0 -600
  74. package/src/components/data-display/Table/Table.stories.tsx +0 -803
  75. package/src/components/data-display/Table/Table.test.stories.tsx +0 -369
  76. package/src/components/data-display/Timeline/Timeline.stories.tsx +0 -442
  77. package/src/components/data-display/Timeline/Timeline.test.stories.tsx +0 -930
  78. package/src/components/data-display/TimingDiagram/TimingDiagram.stories.tsx +0 -475
  79. package/src/components/data-display/TimingDiagram/TimingDiagram.test.stories.tsx +0 -734
  80. package/src/components/data-display/Tooltip/Tooltip.stories.tsx +0 -468
  81. package/src/components/data-display/Tooltip/Tooltip.test.stories.tsx +0 -1154
  82. package/src/components/feedback/ConfirmAction/ConfirmAction.stories.tsx +0 -146
  83. package/src/components/feedback/ConfirmAction/ConfirmAction.test.stories.tsx +0 -114
  84. package/src/components/feedback/ConfirmAction/__tests__/confirm-action.test.tsx +0 -288
  85. package/src/components/feedback/Dialog/Dialog.stories.tsx +0 -833
  86. package/src/components/feedback/Dialog/Dialog.test.stories.tsx +0 -964
  87. package/src/components/feedback/Dialog/__tests__/dialog-content-spacing.test.tsx +0 -66
  88. package/src/components/feedback/Modal/Modal.stories.tsx +0 -765
  89. package/src/components/feedback/Modal/Modal.test.stories.tsx +0 -251
  90. package/src/components/feedback/Sonner/Sonner.stories.tsx +0 -698
  91. package/src/components/feedback/Sonner/Sonner.test.stories.tsx +0 -896
  92. package/src/components/feedback/StackedModal/StackedModal.stories.tsx +0 -1783
  93. package/src/components/feedback/StackedModal/StackedModal.test.stories.tsx +0 -973
  94. package/src/components/feedback/StackedModal/__tests__/stacked-modal-viewport.test.tsx +0 -104
  95. package/src/components/feedback/Toast/Toast.stories.tsx +0 -548
  96. package/src/components/feedback/Toast/Toast.test.stories.tsx +0 -834
  97. package/src/components/feedback/TutorialOverlay/TutorialOverlay.stories.tsx +0 -691
  98. package/src/components/feedback/TutorialOverlay/TutorialOverlay.test.stories.tsx +0 -634
  99. package/src/components/form/AddressAutocomplete/AddressAutocomplete.stories.tsx +0 -665
  100. package/src/components/form/AddressAutocomplete/AddressAutocomplete.test.stories.tsx +0 -727
  101. package/src/components/form/Autocomplete/Autocomplete.stories.tsx +0 -715
  102. package/src/components/form/Autocomplete/Autocomplete.test.stories.tsx +0 -825
  103. package/src/components/form/Button/Button.stories.tsx +0 -365
  104. package/src/components/form/Button/Button.test.stories.tsx +0 -607
  105. package/src/components/form/Calendar/Calendar.stories.tsx +0 -349
  106. package/src/components/form/Calendar/Calendar.test.stories.tsx +0 -464
  107. package/src/components/form/CepField/CepField.stories.tsx +0 -138
  108. package/src/components/form/CepField/CepField.test.stories.tsx +0 -281
  109. package/src/components/form/Checkbox/Checkbox.stories.tsx +0 -265
  110. package/src/components/form/Checkbox/Checkbox.test.stories.tsx +0 -181
  111. package/src/components/form/CodeEditor/CodeEditor.stories.tsx +0 -871
  112. package/src/components/form/CodeEditor/CodeEditor.test.stories.tsx +0 -574
  113. package/src/components/form/Command/Command.stories.tsx +0 -580
  114. package/src/components/form/Command/Command.test.stories.tsx +0 -215
  115. package/src/components/form/CreatableSelect/CreatableSelect.stories.tsx +0 -112
  116. package/src/components/form/CreatableSelect/CreatableSelect.test.stories.tsx +0 -134
  117. package/src/components/form/Form/Form.stories.tsx +0 -687
  118. package/src/components/form/Form/Form.test.stories.tsx +0 -601
  119. package/src/components/form/Input/Input.stories.tsx +0 -260
  120. package/src/components/form/Input/Input.test.stories.tsx +0 -1191
  121. package/src/components/form/InputOTP/InputOTP.stories.tsx +0 -774
  122. package/src/components/form/InputOTP/InputOTP.test.stories.tsx +0 -588
  123. package/src/components/form/Label/Label.stories.tsx +0 -473
  124. package/src/components/form/Label/Label.test.stories.tsx +0 -915
  125. package/src/components/form/Menubar/Menubar.stories.tsx +0 -472
  126. package/src/components/form/Menubar/Menubar.test.stories.tsx +0 -584
  127. package/src/components/form/PasswordStrength/PasswordStrength.stories.tsx +0 -562
  128. package/src/components/form/PasswordStrength/PasswordStrength.test.stories.tsx +0 -327
  129. package/src/components/form/PhoneInput/PhoneInput.stories.tsx +0 -495
  130. package/src/components/form/PhoneInput/PhoneInput.test.stories.tsx +0 -666
  131. package/src/components/form/RadioGroup/RadioGroup.stories.tsx +0 -518
  132. package/src/components/form/RadioGroup/RadioGroup.test.stories.tsx +0 -685
  133. package/src/components/form/RichTextEditor/RichTextEditor.stories.tsx +0 -261
  134. package/src/components/form/RichTextEditor/RichTextEditor.test.stories.tsx +0 -491
  135. package/src/components/form/SearchPalette/SearchPalette.stories.tsx +0 -135
  136. package/src/components/form/Select/Select.stories.tsx +0 -364
  137. package/src/components/form/Select/Select.test.stories.tsx +0 -985
  138. package/src/components/form/Slider/Slider.stories.tsx +0 -418
  139. package/src/components/form/Slider/Slider.test.stories.tsx +0 -1042
  140. package/src/components/form/Switch/Switch.stories.tsx +0 -697
  141. package/src/components/form/Switch/Switch.test.stories.tsx +0 -597
  142. package/src/components/form/Textarea/Textarea.stories.tsx +0 -473
  143. package/src/components/form/Textarea/Textarea.test.stories.tsx +0 -702
  144. package/src/components/form/Toggle/Toggle.stories.tsx +0 -638
  145. package/src/components/form/Toggle/Toggle.test.stories.tsx +0 -1159
  146. package/src/components/form/ToggleGroup/ToggleGroup.stories.tsx +0 -617
  147. package/src/components/form/ToggleGroup/ToggleGroup.test.stories.tsx +0 -915
  148. package/src/components/form/UploadButton/UploadButton.stories.tsx +0 -367
  149. package/src/components/form/UploadButton/UploadButton.test.stories.tsx +0 -573
  150. package/src/components/form/total-form/total-form.test.tsx +0 -214
  151. package/src/components/layout/Accordion/Accordion.stories.tsx +0 -694
  152. package/src/components/layout/Accordion/Accordion.test.stories.tsx +0 -1344
  153. package/src/components/layout/Card/Card.stories.tsx +0 -591
  154. package/src/components/layout/Card/Card.test.stories.tsx +0 -1134
  155. package/src/components/layout/CardGrid/__tests__/CardGrid.test.tsx +0 -92
  156. package/src/components/layout/Collapsible/Collapsible.stories.tsx +0 -180
  157. package/src/components/layout/Collapsible/Collapsible.test.stories.tsx +0 -308
  158. package/src/components/layout/Container/Container.stories.tsx +0 -557
  159. package/src/components/layout/Container/Container.test.stories.tsx +0 -745
  160. package/src/components/layout/ContentToolbar/ContentToolbar.stories.tsx +0 -129
  161. package/src/components/layout/ContentToolbar/ContentToolbar.test.stories.tsx +0 -251
  162. package/src/components/layout/ContentToolbar/__tests__/ColumnsMenu.test.tsx +0 -39
  163. package/src/components/layout/ContentToolbar/__tests__/MultiSelectDropdown.test.tsx +0 -131
  164. package/src/components/layout/ContentToolbar/__tests__/SavedViewsMenu.test.tsx +0 -99
  165. package/src/components/layout/Dashboard/Dashboard.stories.tsx +0 -104
  166. package/src/components/layout/Dashboard/Dashboard.test.stories.tsx +0 -190
  167. package/src/components/layout/Drawer/Drawer.stories.tsx +0 -658
  168. package/src/components/layout/Drawer/Drawer.test.stories.tsx +0 -1343
  169. package/src/components/layout/Resizable/Resizable.stories.tsx +0 -1039
  170. package/src/components/layout/Resizable/Resizable.test.stories.tsx +0 -754
  171. package/src/components/layout/ScrollArea/ScrollArea.stories.tsx +0 -651
  172. package/src/components/layout/ScrollArea/ScrollArea.test.stories.tsx +0 -619
  173. package/src/components/layout/Separator/Separator.stories.tsx +0 -563
  174. package/src/components/layout/Separator/Separator.test.stories.tsx +0 -518
  175. package/src/components/layout/SettingsLayout/SettingsLayout.stories.tsx +0 -192
  176. package/src/components/layout/SettingsLayout/SettingsLayout.test.stories.tsx +0 -175
  177. package/src/components/layout/Sidebar/Sidebar.stories.tsx +0 -609
  178. package/src/components/layout/Sidebar/Sidebar.test.stories.tsx +0 -1324
  179. package/src/components/layout/Skeleton/Skeleton.stories.tsx +0 -689
  180. package/src/components/layout/Skeleton/Skeleton.test.stories.tsx +0 -521
  181. package/src/components/layout/Spacer/Spacer.stories.tsx +0 -502
  182. package/src/components/layout/Spacer/Spacer.test.stories.tsx +0 -474
  183. package/src/components/layout/TableFilter/TableFilter.stories.tsx +0 -82
  184. package/src/components/layout/TableFilter/TableFilter.test.stories.tsx +0 -87
  185. package/src/components/navigation/Breadcrumbs/Breadcrumbs.stories.tsx +0 -638
  186. package/src/components/navigation/Breadcrumbs/Breadcrumbs.test.stories.tsx +0 -1008
  187. package/src/components/navigation/CommandPalette/CommandPalette.stories.tsx +0 -386
  188. package/src/components/navigation/CommandPalette/CommandPalette.test.stories.tsx +0 -435
  189. package/src/components/navigation/ContextMenu/ContextMenu.stories.tsx +0 -614
  190. package/src/components/navigation/ContextMenu/ContextMenu.test.stories.tsx +0 -845
  191. package/src/components/navigation/DropdownMenu/DropdownMenu.stories.tsx +0 -578
  192. package/src/components/navigation/DropdownMenu/DropdownMenu.test.stories.tsx +0 -660
  193. package/src/components/navigation/NavigationMenu/stories/NavigationMenu.stories.tsx +0 -516
  194. package/src/components/navigation/NavigationMenu/stories/NavigationMenu.test.stories.tsx +0 -935
  195. package/src/components/navigation/NavigationMenu/stories/NavigationMenuHorizontal.stories.tsx +0 -501
  196. package/src/components/navigation/NavigationMenu/stories/NavigationMenuVertical.stories.tsx +0 -453
  197. package/src/components/navigation/Pagination/Pagination.stories.tsx +0 -602
  198. package/src/components/navigation/Pagination/Pagination.test.stories.tsx +0 -520
  199. package/src/components/navigation/Tabs/Tabs.stories.tsx +0 -1004
  200. package/src/components/navigation/Tabs/Tabs.test.stories.tsx +0 -1225
  201. package/src/components/typography/Blockquote/Blockquote.stories.tsx +0 -359
  202. package/src/components/typography/Blockquote/Blockquote.test.stories.tsx +0 -432
  203. package/src/components/typography/Code/Code.stories.tsx +0 -686
  204. package/src/components/typography/Code/Code.test.stories.tsx +0 -703
  205. package/src/components/typography/Heading/Heading.stories.tsx +0 -451
  206. package/src/components/typography/Heading/Heading.test.stories.tsx +0 -830
  207. package/src/components/typography/Paragraph/Paragraph.stories.tsx +0 -280
  208. package/src/components/typography/Paragraph/Paragraph.test.stories.tsx +0 -231
  209. package/src/components/typography/Text/Text.stories.tsx +0 -359
  210. package/src/components/typography/Text/Text.test.stories.tsx +0 -759
  211. package/src/components/utility/AnimatedIcon/AnimatedIcon.stories.tsx +0 -945
  212. package/src/components/utility/AnimatedIcon/AnimatedIcon.test.stories.tsx +0 -603
  213. package/src/components/utility/AspectRatio/AspectRatio.stories.tsx +0 -414
  214. package/src/components/utility/AspectRatio/AspectRatio.test.stories.tsx +0 -859
  215. package/src/components/utility/InfiniteScroll/InfiniteScroll.stories.tsx +0 -620
  216. package/src/components/utility/InfiniteScroll/InfiniteScroll.test.stories.tsx +0 -361
  217. package/src/components/utility/InstallPrompt/InstallPrompt.stories.tsx +0 -118
  218. package/src/components/utility/InstallPrompt/InstallPrompt.test.stories.tsx +0 -83
  219. package/src/components/utility/InstallPrompt/__tests__/InstallPrompt.ios.test.tsx +0 -65
  220. package/src/components/utility/InstallPrompt/__tests__/usePwaInstall.test.tsx +0 -271
  221. package/src/components/utility/Portal/Portal.stories.tsx +0 -340
  222. package/src/components/utility/Portal/Portal.test.stories.tsx +0 -2086
  223. package/src/components/utility/Transition/Transition.stories.tsx +0 -493
  224. package/src/components/utility/Transition/Transition.test.stories.tsx +0 -854
  225. package/src/components/utility/VirtualList/VirtualList.stories.tsx +0 -1073
  226. package/src/components/utility/VirtualList/VirtualList.test.stories.tsx +0 -1085
  227. package/src/components/utility/WorkflowStep/WorkflowStep.stories.tsx +0 -431
  228. package/src/components/utility/WorkflowStep/WorkflowStep.test.stories.tsx +0 -364
  229. /package/src/{button.tsx → button/button.tsx} +0 -0
@@ -1,638 +0,0 @@
1
- import AccountTree from '@mui/icons-material/AccountTree';
2
- import Analytics from '@mui/icons-material/Analytics';
3
- import Article from '@mui/icons-material/Article';
4
- import Category from '@mui/icons-material/Category';
5
- import CloudUpload from '@mui/icons-material/CloudUpload';
6
- import Code from '@mui/icons-material/Code';
7
- import Dashboard from '@mui/icons-material/Dashboard';
8
- import Folder from '@mui/icons-material/Folder';
9
- import Home from '@mui/icons-material/Home';
10
- import Security from '@mui/icons-material/Security';
11
- import Settings from '@mui/icons-material/Settings';
12
- import Storage from '@mui/icons-material/Storage';
13
- import { Box, createTheme, CssBaseline, Paper, Stack,ThemeProvider } from '@mui/material';
14
- import { Button, Typography } from '@mui/material';
15
- import type { Meta, StoryObj } from '@storybook/react-vite';
16
- import { useState } from 'react';
17
-
18
- import { Breadcrumbs } from './Breadcrumbs';
19
- import type { BreadcrumbItem } from './Breadcrumbs.types';
20
-
21
- const meta: Meta<typeof Breadcrumbs> = {
22
- title: 'Navigation/Breadcrumbs',
23
- component: Breadcrumbs,
24
- parameters: {
25
- layout: 'padded',
26
- docs: {
27
- description: {
28
- component: `
29
- A sophisticated breadcrumb navigation component with glass morphism effects, smooth animations, and comprehensive accessibility features.
30
-
31
- ## Features
32
- - **Glass Morphism**: Beautiful frosted glass effect with backdrop blur
33
- - **Multiple Variants**: Default, glass, elevated, and outlined styles
34
- - **Separator Types**: Arrow, chevron, slash, dot, and pipe separators
35
- - **Responsive Design**: Intelligent collapsing on mobile devices
36
- - **Dark Mode Support**: Seamless adaptation to light and dark themes
37
- - **Accessibility**: WCAG 2.1 AA compliant with ARIA labels and keyboard navigation
38
- - **Smooth Animations**: Elegant hover and transition effects
39
- - **Mobile Optimized**: Touch-friendly with collapsible menu options
40
- `,
41
- },
42
- },
43
- backgrounds: {
44
- default: 'light',
45
- values: [
46
- { name: 'light', value: '#f5f5f5' },
47
- { name: 'dark', value: '#1a1a1a' },
48
- { name: 'gradient', value: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)' },
49
- ],
50
- },
51
- },
52
- tags: ['autodocs', 'component:Breadcrumbs', 'checked'],
53
- argTypes: {
54
- variant: {
55
- control: 'select',
56
- options: ['default', 'glass', 'elevated', 'outlined'],
57
- description: 'Visual style of the breadcrumb container',
58
- table: {
59
- category: 'Appearance',
60
- },
61
- },
62
- separatorType: {
63
- control: 'select',
64
- options: ['default', 'slash', 'arrow', 'chevron', 'dot', 'pipe'],
65
- description: 'Type of separator between breadcrumb items',
66
- table: {
67
- category: 'Appearance',
68
- },
69
- },
70
- size: {
71
- control: 'select',
72
- options: ['sm', 'md', 'lg'],
73
- description: 'Size of the breadcrumb text and icons',
74
- table: {
75
- category: 'Appearance',
76
- },
77
- },
78
- color: {
79
- control: 'select',
80
- options: ['default', 'primary', 'secondary'],
81
- description: 'Color scheme for separators and accents',
82
- table: {
83
- category: 'Appearance',
84
- },
85
- },
86
- elevation: {
87
- control: { type: 'range', min: 0, max: 5, step: 1 },
88
- description: 'Shadow elevation for glass and elevated variants',
89
- table: {
90
- category: 'Appearance',
91
- },
92
- },
93
- showHomeIcon: {
94
- control: 'boolean',
95
- description: 'Whether to show a home icon for the first item',
96
- table: {
97
- category: 'Behavior',
98
- },
99
- },
100
- maxItems: {
101
- control: 'number',
102
- description: 'Maximum number of items to display before collapsing',
103
- table: {
104
- category: 'Behavior',
105
- },
106
- },
107
- mobileMaxItems: {
108
- control: 'number',
109
- description: 'Maximum number of items to display on mobile',
110
- table: {
111
- category: 'Behavior',
112
- },
113
- },
114
- collapseBehavior: {
115
- control: 'select',
116
- options: ['menu', 'ellipsis'],
117
- description: 'How to handle collapsed items',
118
- table: {
119
- category: 'Behavior',
120
- },
121
- },
122
- },
123
- decorators: [
124
- (Story) => (
125
- <Box sx={{ minWidth: 400, p: 2 }}>
126
- <Story />
127
- </Box>
128
- ),
129
- ],
130
- };
131
-
132
- export default meta;
133
- type Story = StoryObj<typeof meta>;
134
-
135
- const basicItems = [
136
- { label: 'Home', href: '#' },
137
- { label: 'Products', href: '#' },
138
- { label: 'Electronics', href: '#' },
139
- { label: 'Laptops' },
140
- ];
141
-
142
- const itemsWithIcons = [
143
- { label: 'Dashboard', href: '#', icon: <Dashboard fontSize="small" /> },
144
- { label: 'Projects', href: '#', icon: <Folder fontSize="small" /> },
145
- { label: 'Settings', href: '#', icon: <Settings fontSize="small" /> },
146
- { label: 'Profile' },
147
- ];
148
-
149
- // Default variant showcase
150
- export const Default: Story = {
151
- args: {
152
- items: basicItems,
153
- variant: 'default',
154
- separatorType: 'default',
155
- size: 'md',
156
- },
157
- };
158
-
159
- // Glass morphism showcase - the star of the show
160
- export const GlassMorphism: Story = {
161
- args: {
162
- items: itemsWithIcons,
163
- variant: 'glass',
164
- separatorType: 'chevron',
165
- size: 'md',
166
- elevation: 2,
167
- },
168
- parameters: {
169
- backgrounds: { default: 'gradient' },
170
- },
171
- decorators: [
172
- (Story) => (
173
- <Box
174
- sx={{
175
- minHeight: 200,
176
- display: 'flex',
177
- alignItems: 'center',
178
- justifyContent: 'center',
179
- background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
180
- p: 4,
181
- }}
182
- >
183
- <Story />
184
- </Box>
185
- ),
186
- ],
187
- };
188
-
189
- // Elevated card-like appearance
190
- export const Elevated: Story = {
191
- args: {
192
- items: basicItems,
193
- variant: 'elevated',
194
- separatorType: 'arrow',
195
- size: 'md',
196
- elevation: 3,
197
- },
198
- };
199
-
200
- // Outlined variant
201
- export const Outlined: Story = {
202
- args: {
203
- items: basicItems,
204
- variant: 'outlined',
205
- separatorType: 'slash',
206
- size: 'md',
207
- },
208
- };
209
-
210
- // Separator types showcase
211
- export const SeparatorTypes: Story = {
212
- args: {
213
- items: basicItems,
214
- },
215
- render: ({ items }) => (
216
- <Stack spacing={3}>
217
- <Box>
218
- <Typography variant="caption" color="text.secondary" gutterBottom>
219
- Default Separator
220
- </Typography>
221
- <Breadcrumbs items={items} separatorType="arrow" />
222
- </Box>
223
- <Box>
224
- <Typography variant="caption" color="text.secondary" gutterBottom>
225
- Chevron Separator
226
- </Typography>
227
- <Breadcrumbs items={items} separatorType="chevron" />
228
- </Box>
229
- <Box>
230
- <Typography variant="caption" color="text.secondary" gutterBottom>
231
- Slash Separator
232
- </Typography>
233
- <Breadcrumbs items={items} separatorType="slash" />
234
- </Box>
235
- <Box>
236
- <Typography variant="caption" color="text.secondary" gutterBottom>
237
- Dot Separator
238
- </Typography>
239
- <Breadcrumbs items={items} separatorType="dot" />
240
- </Box>
241
- <Box>
242
- <Typography variant="caption" color="text.secondary" gutterBottom>
243
- Pipe Separator
244
- </Typography>
245
- <Breadcrumbs items={items} separatorType="pipe" />
246
- </Box>
247
- </Stack>
248
- ),
249
- };
250
-
251
- // Size variations - Required story export
252
- export const AllSizes: Story = {
253
- args: {
254
- items: basicItems,
255
- },
256
- render: ({ items }) => (
257
- <Stack spacing={3}>
258
- <Box>
259
- <Typography variant="caption" color="text.secondary" gutterBottom>
260
- Small Size
261
- </Typography>
262
- <Breadcrumbs items={items} size="sm" variant="glass" />
263
- </Box>
264
- <Box>
265
- <Typography variant="caption" color="text.secondary" gutterBottom>
266
- Medium Size (Default)
267
- </Typography>
268
- <Breadcrumbs items={items} size="md" variant="glass" />
269
- </Box>
270
- <Box>
271
- <Typography variant="caption" color="text.secondary" gutterBottom>
272
- Large Size
273
- </Typography>
274
- <Breadcrumbs items={items} size="lg" variant="glass" />
275
- </Box>
276
- </Stack>
277
- ),
278
- };
279
-
280
- // Color variations
281
- export const ColorVariations: Story = {
282
- args: {
283
- items: basicItems,
284
- },
285
- render: ({ items }) => (
286
- <Stack spacing={3}>
287
- <Box>
288
- <Typography variant="caption" color="text.secondary" gutterBottom>
289
- Default Color
290
- </Typography>
291
- <Breadcrumbs items={items} color="default" variant="elevated" />
292
- </Box>
293
- <Box>
294
- <Typography variant="caption" color="text.secondary" gutterBottom>
295
- Primary Color
296
- </Typography>
297
- <Breadcrumbs items={items} color="primary" variant="elevated" />
298
- </Box>
299
- <Box>
300
- <Typography variant="caption" color="text.secondary" gutterBottom>
301
- Secondary Color
302
- </Typography>
303
- <Breadcrumbs items={items} color="secondary" variant="elevated" />
304
- </Box>
305
- </Stack>
306
- ),
307
- };
308
-
309
- // Import needed for the interactive example
310
-
311
- // Interactive example with click handlers
312
- export const Interactive: Story = {
313
- args: {
314
- items: basicItems,
315
- },
316
- render: ({ items }) => {
317
- const InteractiveBreadcrumbs = () => {
318
- const [path, setPath] = useState(items.map((item) => item.label));
319
-
320
- const mappedItems: BreadcrumbItem[] = path.map((label, index) => ({
321
- label,
322
- href: '#',
323
- onClick: (e) => {
324
- e.preventDefault();
325
- if (index < path.length - 1) {
326
- setPath(path.slice(0, index + 1));
327
- }
328
- },
329
- tooltip: index < path.length - 1 ? `Navigate to ${label}` : undefined,
330
- }));
331
-
332
- return (
333
- <Stack spacing={3}>
334
- <Breadcrumbs items={mappedItems} variant="glass" separatorType="chevron" showHomeIcon />
335
- <Box sx={{ display: 'flex', gap: 1, flexWrap: 'wrap' }}>
336
- <Button
337
- size="small"
338
- variant="outlined"
339
- onClick={() => setPath([...path, 'Gaming'])}
340
- disabled={path.length >= 6}
341
- >
342
- Add Level
343
- </Button>
344
- <Button
345
- size="small"
346
- variant="outlined"
347
- onClick={() => setPath(path.slice(0, -1))}
348
- disabled={path.length <= 1}
349
- >
350
- Remove Level
351
- </Button>
352
- <Button
353
- size="small"
354
- variant="outlined"
355
- onClick={() => setPath(['Home', 'Products', 'Electronics', 'Laptops'])}
356
- >
357
- Reset
358
- </Button>
359
- </Box>
360
- </Stack>
361
- );
362
- };
363
-
364
- return <InteractiveBreadcrumbs />;
365
- },
366
- };
367
-
368
- // Dark mode showcase
369
- export const DarkMode: Story = {
370
- args: {
371
- items: itemsWithIcons,
372
- variant: 'glass',
373
- separatorType: 'arrow',
374
- size: 'md',
375
- elevation: 2,
376
- },
377
- decorators: [
378
- (Story) => {
379
- const darkTheme = createTheme({
380
- palette: {
381
- mode: 'dark',
382
- },
383
- });
384
-
385
- return (
386
- <ThemeProvider theme={darkTheme}>
387
- <CssBaseline />
388
- <Box sx={{ p: 3, bgcolor: 'background.default', minHeight: 150 }}>
389
- <Story />
390
- </Box>
391
- </ThemeProvider>
392
- );
393
- },
394
- ],
395
- };
396
-
397
- // Responsive behavior - Required story export
398
- export const Responsive: Story = {
399
- args: {
400
- items: [
401
- { label: 'Home', href: '#', icon: <Home fontSize="small" /> },
402
- { label: 'Documents', href: '#', icon: <Article fontSize="small" /> },
403
- { label: 'Projects', href: '#', icon: <AccountTree fontSize="small" /> },
404
- { label: 'Development', href: '#', icon: <Code fontSize="small" /> },
405
- { label: 'Cloud', href: '#', icon: <CloudUpload fontSize="small" /> },
406
- { label: 'Analytics', href: '#', icon: <Analytics fontSize="small" /> },
407
- { label: 'Security', href: '#', icon: <Security fontSize="small" /> },
408
- { label: 'Current Page' },
409
- ],
410
- variant: 'glass',
411
- separatorType: 'chevron',
412
- mobileMaxItems: 3,
413
- collapseBehavior: 'menu',
414
- elevation: 2,
415
- },
416
- parameters: {
417
- viewport: {
418
- defaultViewport: 'mobile1',
419
- },
420
- },
421
- };
422
-
423
- // Accessibility showcase
424
- export const Accessibility: Story = {
425
- args: {
426
- items: basicItems.map((item, index) => ({
427
- ...item,
428
- ariaLabel: `Navigate to ${item.label}`,
429
- tooltip:
430
- index < basicItems.length - 1
431
- ? `Go to ${item.label} section`
432
- : `Currently viewing ${item.label}`,
433
- })),
434
- variant: 'elevated',
435
- separatorType: 'arrow',
436
- size: 'lg',
437
- ariaLabel: 'Main navigation breadcrumb',
438
- },
439
- };
440
-
441
- // Complex navigation path
442
- export const ComplexPath: Story = {
443
- args: {
444
- items: [
445
- { label: 'Organization', href: '#', icon: <Storage fontSize="small" /> },
446
- { label: 'Departments', href: '#', icon: <Category fontSize="small" /> },
447
- { label: 'Engineering', href: '#', icon: <Code fontSize="small" /> },
448
- { label: 'Frontend', href: '#' },
449
- { label: 'Components', href: '#' },
450
- { label: 'Navigation', href: '#' },
451
- { label: 'Breadcrumbs', href: '#' },
452
- { label: 'Documentation' },
453
- ],
454
- variant: 'glass',
455
- separatorType: 'chevron',
456
- maxItems: 5,
457
- collapseBehavior: 'menu',
458
- elevation: 2,
459
- },
460
- };
461
-
462
- // All variants showcase
463
- export const AllVariants: Story = {
464
- args: {
465
- items: basicItems,
466
- },
467
- render: ({ items }) => (
468
- <Stack spacing={4}>
469
- <Paper sx={{ p: 2 }}>
470
- <Typography variant="subtitle2" gutterBottom>
471
- Default Variant
472
- </Typography>
473
- <Breadcrumbs items={items} variant="default" />
474
- </Paper>
475
-
476
- <Paper
477
- sx={{
478
- p: 2,
479
- background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
480
- }}
481
- >
482
- <Typography variant="subtitle2" gutterBottom sx={{ color: 'white' }}>
483
- Glass Morphism Variant
484
- </Typography>
485
- <Breadcrumbs items={itemsWithIcons} variant="glass" elevation={2} />
486
- </Paper>
487
-
488
- <Paper sx={{ p: 2 }}>
489
- <Typography variant="subtitle2" gutterBottom>
490
- Elevated Variant
491
- </Typography>
492
- <Breadcrumbs items={items} variant="elevated" elevation={3} />
493
- </Paper>
494
-
495
- <Paper sx={{ p: 2 }}>
496
- <Typography variant="subtitle2" gutterBottom>
497
- Outlined Variant
498
- </Typography>
499
- <Breadcrumbs items={items} variant="outlined" />
500
- </Paper>
501
- </Stack>
502
- ),
503
- };
504
-
505
- // All interactive states - Required story export
506
- export const AllStates: Story = {
507
- args: {
508
- items: basicItems,
509
- },
510
- render: ({ items }) => (
511
- <Stack spacing={3}>
512
- <Box>
513
- <Typography variant="caption" color="text.secondary" gutterBottom>
514
- Default State
515
- </Typography>
516
- <Breadcrumbs items={items} variant="glass" />
517
- </Box>
518
- <Box>
519
- <Typography variant="caption" color="text.secondary" gutterBottom>
520
- Hover State (simulate)
521
- </Typography>
522
- <Breadcrumbs
523
- items={items.map((item) => ({
524
- ...item,
525
- sx: { '&:hover': { backgroundColor: 'action.hover' } },
526
- }))}
527
- variant="glass"
528
- />
529
- </Box>
530
- <Box>
531
- <Typography variant="caption" color="text.secondary" gutterBottom>
532
- Focus State
533
- </Typography>
534
- <Breadcrumbs
535
- items={items}
536
- variant="elevated"
537
- sx={{
538
- '& .MuiBreadcrumbs-ol > li:first-of-type a': { outline: '2px solid primary.main' },
539
- }}
540
- />
541
- </Box>
542
- <Box>
543
- <Typography variant="caption" color="text.secondary" gutterBottom>
544
- Collapsed State
545
- </Typography>
546
- <Breadcrumbs
547
- items={[
548
- { label: 'Home', href: '#' },
549
- { label: 'Products', href: '#' },
550
- { label: 'Electronics', href: '#' },
551
- { label: 'Computers', href: '#' },
552
- { label: 'Laptops', href: '#' },
553
- { label: 'Gaming', href: '#' },
554
- { label: 'Current' },
555
- ]}
556
- variant="glass"
557
- maxItems={3}
558
- collapseBehavior="menu"
559
- />
560
- </Box>
561
- </Stack>
562
- ),
563
- };
564
-
565
- // Interactive states - Required story export
566
- export const InteractiveStates: Story = {
567
- args: {
568
- items: basicItems,
569
- },
570
- render: ({ items }) => {
571
- const InteractiveDemo = () => {
572
- const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
573
- const [focusedIndex, setFocusedIndex] = useState<number | null>(null);
574
- const [activeIndex, setActiveIndex] = useState<number | null>(null);
575
-
576
- const interactiveItems = items.map((item, index) => ({
577
- ...item,
578
- onClick: (e: React.MouseEvent) => {
579
- e.preventDefault();
580
- setActiveIndex(index);
581
- window.setTimeout(() => setActiveIndex(null), 200);
582
- },
583
- onMouseEnter: () => setHoveredIndex(index),
584
- onMouseLeave: () => setHoveredIndex(null),
585
- onFocus: () => setFocusedIndex(index),
586
- onBlur: () => setFocusedIndex(null),
587
- sx: {
588
- transition: 'all 0.2s ease-in-out',
589
- ...(hoveredIndex === index && {
590
- backgroundColor: 'action.hover',
591
- transform: 'scale(1.02)',
592
- }),
593
- ...(focusedIndex === index && {
594
- outline: '2px solid',
595
- outlineColor: 'primary.main',
596
- outlineOffset: 2,
597
- }),
598
- ...(activeIndex === index && {
599
- backgroundColor: 'action.selected',
600
- transform: 'scale(0.98)',
601
- }),
602
- },
603
- }));
604
-
605
- return (
606
- <Stack spacing={2}>
607
- <Typography variant="body2" color="text.secondary">
608
- Hover, focus, and click on breadcrumb items to see interactive states
609
- </Typography>
610
- <Breadcrumbs
611
- items={interactiveItems}
612
- variant="glass"
613
- separatorType="chevron"
614
- elevation={2}
615
- />
616
- </Stack>
617
- );
618
- };
619
-
620
- return <InteractiveDemo />;
621
- },
622
- };
623
-
624
- // Performance test with many items
625
- export const StressTest: Story = {
626
- args: {
627
- items: Array.from({ length: 20 }, (_, i) => ({
628
- label: `Level ${i + 1}`,
629
- href: '#',
630
- tooltip: `This is level ${i + 1} of the navigation`,
631
- })),
632
- variant: 'glass',
633
- separatorType: 'chevron',
634
- maxItems: 5,
635
- collapseBehavior: 'menu',
636
- elevation: 2,
637
- },
638
- };