@12-apps/ui 1.5.0 → 1.5.2

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 +17 -9
  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,607 +0,0 @@
1
- import { Box, Button, Card, CardContent, Typography } from '@mui/material';
2
- import type { Meta, StoryObj } from '@storybook/react-vite';
3
- import React from 'react';
4
-
5
- import { Carousel } from './Carousel';
6
- import type { CarouselItem } from './Carousel.types';
7
-
8
- const meta: Meta<typeof Carousel> = {
9
- title: 'DataDisplay/Carousel',
10
- component: Carousel,
11
- parameters: {
12
- layout: 'padded',
13
- },
14
- tags: ['autodocs'],
15
- argTypes: {
16
- variant: {
17
- control: 'select',
18
- options: ['default', 'glass', 'gradient', 'elevated', 'minimal', 'cards'],
19
- },
20
- size: {
21
- control: 'select',
22
- options: ['xs', 'sm', 'md', 'lg', 'xl'],
23
- },
24
- color: {
25
- control: 'select',
26
- options: ['primary', 'secondary', 'success', 'error', 'warning', 'info'],
27
- },
28
- animation: {
29
- control: 'select',
30
- options: ['slide', 'fade', 'zoom', 'flip'],
31
- },
32
- indicatorPosition: {
33
- control: 'select',
34
- options: ['top', 'bottom', 'left', 'right'],
35
- },
36
- arrowPosition: {
37
- control: 'select',
38
- options: ['inside', 'outside', 'overlay'],
39
- },
40
- },
41
- };
42
-
43
- export default meta;
44
- type Story = StoryObj<typeof Carousel>;
45
-
46
- const imageItems: CarouselItem[] = [
47
- {
48
- id: '1',
49
- title: 'Beautiful Landscape',
50
- description: 'Stunning mountain views at sunset',
51
- image: 'https://picsum.photos/800/400?random=1',
52
- content: null,
53
- },
54
- {
55
- id: '2',
56
- title: 'Urban Architecture',
57
- description: 'Modern city skyline',
58
- image: 'https://picsum.photos/800/400?random=2',
59
- content: null,
60
- },
61
- {
62
- id: '3',
63
- title: 'Nature Photography',
64
- description: 'Peaceful forest scene',
65
- image: 'https://picsum.photos/800/400?random=3',
66
- content: null,
67
- },
68
- {
69
- id: '4',
70
- title: 'Ocean Views',
71
- description: 'Crystal clear waters',
72
- image: 'https://picsum.photos/800/400?random=4',
73
- content: null,
74
- },
75
- ];
76
-
77
- const contentItems: CarouselItem[] = [
78
- {
79
- id: '1',
80
- content: (
81
- <Box sx={{ p: 4, textAlign: 'center' }}>
82
- <Typography variant="h3" gutterBottom>
83
- Welcome to Our Platform
84
- </Typography>
85
- <Typography variant="body1" paragraph>
86
- Discover amazing features and capabilities
87
- </Typography>
88
- <Button variant="contained" color="primary">
89
- Get Started
90
- </Button>
91
- </Box>
92
- ),
93
- },
94
- {
95
- id: '2',
96
- content: (
97
- <Box sx={{ p: 4, textAlign: 'center' }}>
98
- <Typography variant="h3" gutterBottom>
99
- Advanced Features
100
- </Typography>
101
- <Typography variant="body1" paragraph>
102
- Unlock powerful tools for your workflow
103
- </Typography>
104
- <Button variant="outlined" color="secondary">
105
- Learn More
106
- </Button>
107
- </Box>
108
- ),
109
- },
110
- {
111
- id: '3',
112
- content: (
113
- <Box sx={{ p: 4, textAlign: 'center' }}>
114
- <Typography variant="h3" gutterBottom>
115
- Join Our Community
116
- </Typography>
117
- <Typography variant="body1" paragraph>
118
- Connect with thousands of users worldwide
119
- </Typography>
120
- <Button variant="contained" color="success">
121
- Sign Up Now
122
- </Button>
123
- </Box>
124
- ),
125
- },
126
- ];
127
-
128
- const cardItems: CarouselItem[] = [
129
- {
130
- id: '1',
131
- content: (
132
- <Card sx={{ height: '100%' }}>
133
- <CardContent>
134
- <Typography variant="h5" gutterBottom>
135
- Premium Plan
136
- </Typography>
137
- <Typography variant="h3" color="primary" gutterBottom>
138
- $29/mo
139
- </Typography>
140
- <Typography variant="body2" color="text.secondary">
141
- • Unlimited projects • Priority support • Advanced analytics • Custom integrations
142
- </Typography>
143
- </CardContent>
144
- </Card>
145
- ),
146
- },
147
- {
148
- id: '2',
149
- content: (
150
- <Card sx={{ height: '100%' }}>
151
- <CardContent>
152
- <Typography variant="h5" gutterBottom>
153
- Business Plan
154
- </Typography>
155
- <Typography variant="h3" color="secondary" gutterBottom>
156
- $99/mo
157
- </Typography>
158
- <Typography variant="body2" color="text.secondary">
159
- • Everything in Premium • Team collaboration • API access • White-label options
160
- </Typography>
161
- </CardContent>
162
- </Card>
163
- ),
164
- },
165
- {
166
- id: '3',
167
- content: (
168
- <Card sx={{ height: '100%' }}>
169
- <CardContent>
170
- <Typography variant="h5" gutterBottom>
171
- Enterprise
172
- </Typography>
173
- <Typography variant="h3" color="success" gutterBottom>
174
- Custom
175
- </Typography>
176
- <Typography variant="body2" color="text.secondary">
177
- • Custom solutions • Dedicated support • SLA guarantee • On-premise deployment
178
- </Typography>
179
- </CardContent>
180
- </Card>
181
- ),
182
- },
183
- ];
184
-
185
- export const Default: Story = {
186
- args: {
187
- items: imageItems,
188
- height: 400,
189
- showIndicators: true,
190
- showArrows: true,
191
- },
192
- };
193
-
194
- export const AutoPlay: Story = {
195
- args: {
196
- items: imageItems,
197
- autoPlay: true,
198
- autoPlayInterval: 3000,
199
- pauseOnHover: true,
200
- loop: true,
201
- },
202
- };
203
-
204
- export const Glass: Story = {
205
- args: {
206
- items: contentItems,
207
- variant: 'glass',
208
- glass: true,
209
- glow: true,
210
- height: 300,
211
- },
212
- };
213
-
214
- export const Gradient: Story = {
215
- args: {
216
- items: contentItems,
217
- variant: 'gradient',
218
- gradient: true,
219
- color: 'primary',
220
- height: 350,
221
- },
222
- };
223
-
224
- export const Cards: Story = {
225
- args: {
226
- items: cardItems,
227
- variant: 'cards',
228
- height: 300,
229
- showArrows: true,
230
- showIndicators: true,
231
- },
232
- };
233
-
234
- export const WithThumbnails: Story = {
235
- args: {
236
- items: imageItems,
237
- showThumbnails: true,
238
- height: 400,
239
- showIndicators: false,
240
- },
241
- };
242
-
243
- export const Animations: Story = {
244
- render: () => (
245
- <Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
246
- <Box>
247
- <Typography variant="h6" gutterBottom>
248
- Slide Animation
249
- </Typography>
250
- <Carousel items={imageItems} animation="slide" height={250} />
251
- </Box>
252
- <Box>
253
- <Typography variant="h6" gutterBottom>
254
- Fade Animation
255
- </Typography>
256
- <Carousel items={imageItems} animation="fade" height={250} />
257
- </Box>
258
- <Box>
259
- <Typography variant="h6" gutterBottom>
260
- Zoom Animation
261
- </Typography>
262
- <Carousel items={imageItems} animation="zoom" height={250} />
263
- </Box>
264
- </Box>
265
- ),
266
- };
267
-
268
- export const Sizes: Story = {
269
- render: () => (
270
- <Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
271
- {(['xs', 'sm', 'md', 'lg', 'xl'] as const).map((size) => (
272
- <Box key={size}>
273
- <Typography variant="h6" gutterBottom>
274
- Size: {size.toUpperCase()}
275
- </Typography>
276
- <Carousel items={imageItems} size={size} />
277
- </Box>
278
- ))}
279
- </Box>
280
- ),
281
- };
282
-
283
- export const Colors: Story = {
284
- render: () => (
285
- <Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
286
- {(['primary', 'secondary', 'success', 'error', 'warning', 'info'] as const).map((color) => (
287
- <Box key={color}>
288
- <Typography variant="h6" gutterBottom>
289
- Color: {color}
290
- </Typography>
291
- <Carousel items={contentItems} color={color} variant="gradient" gradient height={200} />
292
- </Box>
293
- ))}
294
- </Box>
295
- ),
296
- };
297
-
298
- export const IndicatorPositions: Story = {
299
- render: () => (
300
- <Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
301
- {(['top', 'bottom', 'left', 'right'] as const).map((position) => (
302
- <Box key={position}>
303
- <Typography variant="h6" gutterBottom>
304
- Indicator Position: {position}
305
- </Typography>
306
- <Carousel
307
- items={imageItems}
308
- indicatorPosition={position}
309
- height={300}
310
- showArrows={false}
311
- />
312
- </Box>
313
- ))}
314
- </Box>
315
- ),
316
- };
317
-
318
- export const ArrowPositions: Story = {
319
- render: () => (
320
- <Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
321
- {(['inside', 'outside', 'overlay'] as const).map((position) => (
322
- <Box key={position} sx={{ px: position === 'outside' ? 6 : 0 }}>
323
- <Typography variant="h6" gutterBottom>
324
- Arrow Position: {position}
325
- </Typography>
326
- <Carousel
327
- items={imageItems}
328
- arrowPosition={position}
329
- height={300}
330
- showIndicators={false}
331
- />
332
- </Box>
333
- ))}
334
- </Box>
335
- ),
336
- };
337
-
338
- export const WithEffects: Story = {
339
- args: {
340
- items: imageItems,
341
- variant: 'glass',
342
- glow: true,
343
- pulse: true,
344
- glass: true,
345
- color: 'primary',
346
- height: 400,
347
- },
348
- };
349
-
350
- const InteractiveComponent = () => {
351
- const [clickedItem, setClickedItem] = React.useState<string>('');
352
-
353
- return (
354
- <Box>
355
- <Carousel
356
- items={imageItems}
357
- onClick={(item, index) => {
358
- setClickedItem(`Clicked: ${item.title} (index: ${index})`);
359
- }}
360
- height={400}
361
- />
362
- {clickedItem && (
363
- <Typography variant="body2" sx={{ mt: 2, textAlign: 'center' }}>
364
- {clickedItem}
365
- </Typography>
366
- )}
367
- </Box>
368
- );
369
- };
370
-
371
- export const Interactive: Story = {
372
- render: () => <InteractiveComponent />,
373
- };
374
-
375
- export const Loading: Story = {
376
- args: {
377
- items: [],
378
- loading: true,
379
- height: 400,
380
- },
381
- };
382
-
383
- export const Disabled: Story = {
384
- args: {
385
- items: imageItems,
386
- disabled: true,
387
- height: 400,
388
- },
389
- };
390
-
391
- export const NoLoop: Story = {
392
- args: {
393
- items: imageItems,
394
- loop: false,
395
- height: 400,
396
- showArrows: true,
397
- showIndicators: true,
398
- },
399
- };
400
-
401
- export const CustomContent: Story = {
402
- render: () => {
403
- const testimonials: CarouselItem[] = [
404
- {
405
- id: '1',
406
- content: (
407
- <Box sx={{ p: 4, textAlign: 'center' }}>
408
- <Typography variant="h6" gutterBottom>
409
- &ldquo;Amazing product!&rdquo;
410
- </Typography>
411
- <Typography variant="body2" color="text.secondary" paragraph>
412
- This has completely transformed how we work. The features are intuitive and powerful.
413
- </Typography>
414
- <Typography variant="subtitle2">- John Doe, CEO</Typography>
415
- </Box>
416
- ),
417
- },
418
- {
419
- id: '2',
420
- content: (
421
- <Box sx={{ p: 4, textAlign: 'center' }}>
422
- <Typography variant="h6" gutterBottom>
423
- &ldquo;Excellent support&rdquo;
424
- </Typography>
425
- <Typography variant="body2" color="text.secondary" paragraph>
426
- The team is responsive and helpful. They go above and beyond to ensure success.
427
- </Typography>
428
- <Typography variant="subtitle2">- Jane Smith, CTO</Typography>
429
- </Box>
430
- ),
431
- },
432
- ];
433
-
434
- return (
435
- <Carousel
436
- items={testimonials}
437
- variant="elevated"
438
- autoPlay
439
- autoPlayInterval={5000}
440
- height={250}
441
- animation="fade"
442
- />
443
- );
444
- },
445
- };
446
-
447
- // Required story exports for comprehensive coverage
448
- export const AllVariants: Story = {
449
- render: () => (
450
- <Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
451
- {(['default', 'glass', 'gradient', 'elevated', 'minimal', 'cards'] as const).map(
452
- (variant) => (
453
- <Box key={variant}>
454
- <Typography variant="h6" gutterBottom>
455
- Variant: {variant}
456
- </Typography>
457
- <Carousel
458
- items={imageItems.slice(0, 3)}
459
- variant={variant}
460
- height={250}
461
- showArrows={true}
462
- showIndicators={true}
463
- {...(variant === 'glass' && { glass: true, glow: true })}
464
- {...(variant === 'gradient' && { gradient: true, color: 'primary' })}
465
- />
466
- </Box>
467
- ),
468
- )}
469
- </Box>
470
- ),
471
- };
472
-
473
- export const AllSizes: Story = {
474
- render: () => (
475
- <Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
476
- {(['xs', 'sm', 'md', 'lg', 'xl'] as const).map((size) => (
477
- <Box key={size}>
478
- <Typography variant="h6" gutterBottom>
479
- Size: {size.toUpperCase()}
480
- </Typography>
481
- <Carousel
482
- items={imageItems.slice(0, 3)}
483
- size={size}
484
- showArrows={true}
485
- showIndicators={true}
486
- />
487
- </Box>
488
- ))}
489
- </Box>
490
- ),
491
- };
492
-
493
- export const AllStates: Story = {
494
- render: () => (
495
- <Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
496
- <Box>
497
- <Typography variant="h6" gutterBottom>
498
- Default State
499
- </Typography>
500
- <Carousel items={imageItems.slice(0, 3)} height={250} />
501
- </Box>
502
- <Box>
503
- <Typography variant="h6" gutterBottom>
504
- Loading State
505
- </Typography>
506
- <Carousel items={[]} loading={true} height={250} />
507
- </Box>
508
- <Box>
509
- <Typography variant="h6" gutterBottom>
510
- Disabled State
511
- </Typography>
512
- <Carousel items={imageItems.slice(0, 3)} disabled={true} height={250} />
513
- </Box>
514
- <Box>
515
- <Typography variant="h6" gutterBottom>
516
- AutoPlay State
517
- </Typography>
518
- <Carousel
519
- items={imageItems.slice(0, 3)}
520
- autoPlay={true}
521
- autoPlayInterval={2000}
522
- height={250}
523
- />
524
- </Box>
525
- </Box>
526
- ),
527
- };
528
-
529
- const InteractiveStatesComponent = () => {
530
- const [activeIndex, setActiveIndex] = React.useState(0);
531
- const [clickInfo, setClickInfo] = React.useState('');
532
-
533
- return (
534
- <Box>
535
- <Typography variant="h6" gutterBottom>
536
- Interactive Carousel with Event Handlers
537
- </Typography>
538
- <Carousel
539
- items={imageItems}
540
- activeIndex={activeIndex}
541
- onIndexChange={(index) => setActiveIndex(index)}
542
- onClick={(item, index) => {
543
- setClickInfo(`Clicked: ${item.title} at index ${index}`);
544
- }}
545
- height={400}
546
- showArrows={true}
547
- showIndicators={true}
548
- pauseOnHover={true}
549
- />
550
- <Box sx={{ mt: 2, display: 'flex', gap: 2, alignItems: 'center' }}>
551
- <Typography variant="body2">Current Index: {activeIndex}</Typography>
552
- {clickInfo && (
553
- <Typography variant="body2" color="primary">
554
- {clickInfo}
555
- </Typography>
556
- )}
557
- </Box>
558
- <Box sx={{ mt: 2, display: 'flex', gap: 1 }}>
559
- {imageItems.map((_, index) => (
560
- <Button
561
- key={index}
562
- variant={index === activeIndex ? 'contained' : 'outlined'}
563
- size="small"
564
- onClick={() => setActiveIndex(index)}
565
- >
566
- {index + 1}
567
- </Button>
568
- ))}
569
- </Box>
570
- </Box>
571
- );
572
- };
573
-
574
- export const InteractiveStates: Story = {
575
- render: () => <InteractiveStatesComponent />,
576
- };
577
-
578
- export const Responsive: Story = {
579
- parameters: {
580
- viewport: {
581
- defaultViewport: 'responsive',
582
- },
583
- },
584
- render: () => (
585
- <Box>
586
- <Typography variant="h6" gutterBottom>
587
- Responsive Carousel (resize viewport to test)
588
- </Typography>
589
- <Box sx={{ width: '100%', maxWidth: { xs: '100%', sm: 600, md: 800, lg: 1000 } }}>
590
- <Carousel
591
- items={imageItems}
592
- height={{ xs: 200, sm: 300, md: 400, lg: 500 }}
593
- showArrows={{ xs: false, sm: true }}
594
- showIndicators={true}
595
- showThumbnails={{ xs: false, md: true }}
596
- size={{ xs: 'xs', sm: 'sm', md: 'md', lg: 'lg' }}
597
- />
598
- </Box>
599
- <Typography variant="body2" sx={{ mt: 2 }} color="text.secondary">
600
- • Mobile (xs): Height 200px, no arrows, no thumbnails
601
- <br />
602
- • Tablet (sm): Height 300px, with arrows
603
- <br />• Desktop (md+): Height 400px+, with thumbnails
604
- </Typography>
605
- </Box>
606
- ),
607
- };