@syscore/ui-library 1.1.10 → 1.1.11

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 (100) hide show
  1. package/client/App.tsx +47 -0
  2. package/client/components/icons/ConceptIcons.tsx +667 -0
  3. package/client/components/icons/NavAccount.tsx +31 -0
  4. package/client/components/icons/NavBullet.tsx +19 -0
  5. package/client/components/icons/NavLogo.tsx +36 -0
  6. package/client/components/icons/ProviderBadges.tsx +295 -0
  7. package/client/components/icons/ProviderSeals.tsx +319 -0
  8. package/client/components/icons/SealHealthSafetyRating.tsx +65 -0
  9. package/client/components/icons/SealIwbiMember.tsx +86 -0
  10. package/client/components/icons/SealWell.tsx +84 -0
  11. package/client/components/icons/SealWellCertification.tsx +138 -0
  12. package/client/components/icons/SealWellCommunity.tsx +122 -0
  13. package/client/components/icons/SealWellResidence.tsx +122 -0
  14. package/client/components/icons/SealWorksWithWell.tsx +140 -0
  15. package/client/components/icons/UtilityAccordion.tsx +21 -0
  16. package/client/components/icons/UtilityChevronDown.tsx +36 -0
  17. package/client/components/icons/UtilityClassification.tsx +45 -0
  18. package/client/components/icons/UtilityClose.tsx +41 -0
  19. package/client/components/icons/UtilityDrag.tsx +69 -0
  20. package/client/components/icons/UtilityEdit.tsx +42 -0
  21. package/client/components/icons/UtilityOptions.tsx +45 -0
  22. package/client/components/icons/UtilityPortfolio.tsx +87 -0
  23. package/client/components/icons/UtilityReset.tsx +41 -0
  24. package/client/components/icons/UtilityScoring.tsx +43 -0
  25. package/client/components/icons/UtilitySearch.tsx +38 -0
  26. package/client/components/icons/UtilitySort.tsx +52 -0
  27. package/client/components/icons/UtilityText.tsx +34 -0
  28. package/client/components/icons/WaterMarkWWWProducts.tsx +26 -0
  29. package/client/components/icons/WaterMarkWellProjects.tsx +30 -0
  30. package/client/components/icons/WatermarkMemberOrg.tsx +59 -0
  31. package/client/components/icons/WellSeal.tsx +79 -0
  32. package/client/components/icons/X.tsx +35 -0
  33. package/client/hooks/UseTabs.tsx +35 -0
  34. package/client/hooks/use-mobile.tsx +21 -0
  35. package/client/hooks/use-segmented-control.ts +42 -0
  36. package/client/hooks/use-toast.ts +188 -0
  37. package/client/pages/Index.tsx +88 -0
  38. package/client/pages/NotFound.tsx +29 -0
  39. package/client/ui/Accordion/Accordion.stories.tsx +74 -0
  40. package/client/ui/Alert/Alert.stories.tsx +82 -0
  41. package/client/ui/AlertDialog/AlertDialog.stories.tsx +106 -0
  42. package/client/ui/AspectRatio.stories.tsx +78 -0
  43. package/client/ui/Avatar/Avatar.stories.tsx +94 -0
  44. package/client/ui/Badge/Badge.stories.tsx +60 -0
  45. package/client/ui/Breadcrumb/Breadcrumb.stories.tsx +97 -0
  46. package/client/ui/Button.stories.tsx +429 -0
  47. package/client/ui/Calendar/Calendar.stories.tsx +99 -0
  48. package/client/ui/Card.stories.tsx +84 -0
  49. package/client/ui/Carousel/Carousel.stories.tsx +85 -0
  50. package/client/ui/Chart/Chart.stories.tsx +58 -0
  51. package/client/ui/Checkbox/Checkbox.stories.tsx +112 -0
  52. package/client/ui/Collapsible/Collapsible.stories.tsx +101 -0
  53. package/client/ui/Colors.stories.tsx +1041 -0
  54. package/client/ui/Command/Command.stories.tsx +97 -0
  55. package/client/ui/ContextMenu/ContextMenu.stories.tsx +74 -0
  56. package/client/ui/Dialog.stories.tsx +69 -0
  57. package/client/ui/Drawer/Drawer.stories.tsx +87 -0
  58. package/client/ui/DropdownMenu/DropdownMenu.stories.tsx +139 -0
  59. package/client/ui/Form/Form.stories.tsx +74 -0
  60. package/client/ui/HoverCard/HoverCard.stories.tsx +94 -0
  61. package/client/ui/Icons.stories.tsx +328 -0
  62. package/client/ui/Input/Input.stories.tsx +69 -0
  63. package/client/ui/InputOTP/InputOTP.stories.tsx +85 -0
  64. package/client/ui/Label.stories.tsx +66 -0
  65. package/client/ui/Menubar/Menubar.stories.tsx +88 -0
  66. package/client/ui/Navigation.stories.tsx +57 -0
  67. package/client/ui/NavigationMenu/NavigationMenu.stories.tsx +106 -0
  68. package/client/ui/Pagination/Pagination.stories.tsx +115 -0
  69. package/client/ui/Popover/Popover.stories.tsx +99 -0
  70. package/client/ui/Progress/Progress.stories.tsx +63 -0
  71. package/client/ui/RadioGroup/RadioGroup.stories.tsx +110 -0
  72. package/client/ui/Resizable/Resizable.stories.tsx +88 -0
  73. package/client/ui/ScrollArea/ScrollArea.stories.tsx +64 -0
  74. package/client/ui/SearchField.stories.tsx +63 -0
  75. package/client/ui/Select/Select.stories.tsx +111 -0
  76. package/client/ui/Separator/Separator.stories.tsx +67 -0
  77. package/client/ui/Sheet/Sheet.stories.tsx +138 -0
  78. package/client/ui/Sidebar/Sidebar.stories.tsx +92 -0
  79. package/client/ui/Skeleton/Skeleton.stories.tsx +65 -0
  80. package/client/ui/Slider/Slider.stories.tsx +101 -0
  81. package/client/ui/Sonner/Sonner.stories.tsx +48 -0
  82. package/client/ui/StrategyTable.stories.tsx +138 -0
  83. package/client/ui/Switch/Switch.stories.tsx +96 -0
  84. package/client/ui/Table/Table.stories.tsx +135 -0
  85. package/client/ui/Tabs.stories.tsx +33 -0
  86. package/client/ui/Tag.stories.tsx +190 -0
  87. package/client/ui/Textarea/Textarea.stories.tsx +56 -0
  88. package/client/ui/Toast/Toast.stories.tsx +76 -0
  89. package/client/ui/Toaster/Toaster.stories.tsx +52 -0
  90. package/client/ui/Toggle.stories.tsx +248 -0
  91. package/client/ui/ToggleGroup/ToggleGroup.stories.tsx +88 -0
  92. package/client/ui/Tooltip.stories.tsx +72 -0
  93. package/client/ui/Typography.stories.tsx +421 -0
  94. package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +115 -0
  95. package/client/ui/WELLDashboard/index.tsx +221 -0
  96. package/client/vite-env.d.ts +1 -0
  97. package/dist/ui/index.cjs.js +1 -1
  98. package/dist/ui/index.d.ts +1 -0
  99. package/dist/ui/index.es.js +163 -1
  100. package/package.json +2 -1
@@ -0,0 +1,429 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Button } from "@/components/ui/Button";
3
+ import { UtilityReset } from "@/components/icons/UtilityReset";
4
+ import { UtilityClose } from "@/components/icons/UtilityClose";
5
+ import { UtilityChevronDown } from "@/components/icons/UtilityChevronDown";
6
+ import { NavAccount } from "@/components/icons/NavAccount";
7
+
8
+ const meta = {
9
+ title: "Review/Button",
10
+ component: Button,
11
+ tags: ["autodocs"],
12
+ parameters: {
13
+ layout: "padded",
14
+ },
15
+ argTypes: {
16
+ variant: {
17
+ control: { type: "select" },
18
+ },
19
+ size: {
20
+ control: { type: "select" },
21
+ options: ["xlarge", "large", "utility", "icon"],
22
+ },
23
+ },
24
+ } satisfies Meta<typeof Button>;
25
+
26
+ export default meta;
27
+
28
+ type Story = StoryObj<typeof meta>;
29
+
30
+ // CTA Buttons Stories
31
+ export const CTAPrimaryGradient: Story = {
32
+ render: () => (
33
+ <div className="space-y-6">
34
+ <div>
35
+ <p className="text-sm text-gray-600 mb-2">Xlarge, primary, gradient</p>
36
+ <Button variant="primary-gradient" size="xlarge">
37
+ Call to action
38
+ </Button>
39
+ </div>
40
+ <div>
41
+ <p className="text-sm text-gray-600 mb-2">Large, primary, gradient</p>
42
+ <Button variant="primary-gradient" size="large">
43
+ Call to action
44
+ </Button>
45
+ </div>
46
+ </div>
47
+ ),
48
+ };
49
+
50
+ export const CTAPrimaryDark: Story = {
51
+ render: () => (
52
+ <div className="space-y-6">
53
+ <div>
54
+ <p className="text-sm text-gray-600 mb-2">Xlarge, primary, dark</p>
55
+ <Button variant="primary-dark" size="xlarge">
56
+ Call to action
57
+ </Button>
58
+ </div>
59
+ <div>
60
+ <p className="text-sm text-gray-600 mb-2">Large, primary, dark</p>
61
+ <Button variant="primary-dark" size="large">
62
+ Call to action
63
+ </Button>
64
+ </div>
65
+ </div>
66
+ ),
67
+ };
68
+
69
+ export const CTASecondaryLight: Story = {
70
+ render: () => (
71
+ <div className="space-y-6">
72
+ <div>
73
+ <p className="text-sm text-gray-600 mb-2">Xlarge, secondary, light</p>
74
+ <Button variant="secondary-light" size="xlarge">
75
+ Call to action
76
+ </Button>
77
+ </div>
78
+ <div>
79
+ <p className="text-sm text-gray-600 mb-2">Large, secondary, light</p>
80
+ <Button variant="secondary-light" size="large">
81
+ Call to action
82
+ </Button>
83
+ </div>
84
+ </div>
85
+ ),
86
+ };
87
+
88
+ export const CTATertiaryLight: Story = {
89
+ render: () => (
90
+ <div className="space-y-6">
91
+ <div>
92
+ <p className="text-sm text-gray-600 mb-2">Large, tertiary, light</p>
93
+ <Button variant="tertiary-light" size="large">
94
+ Call to action
95
+ </Button>
96
+ </div>
97
+ </div>
98
+ ),
99
+ };
100
+
101
+ // Utility Buttons Stories
102
+ export const UtilityGeneralPrimary: Story = {
103
+ render: () => (
104
+ <div className="space-y-6">
105
+ <div>
106
+ <p className="text-sm text-gray-600 mb-2">General, primary</p>
107
+ <Button variant="general-primary" size="utility">
108
+ Label
109
+ </Button>
110
+ </div>
111
+ </div>
112
+ ),
113
+ };
114
+
115
+ export const UtilityGeneralSecondary: Story = {
116
+ render: () => (
117
+ <div className="space-y-6">
118
+ <div>
119
+ <p className="text-sm text-gray-600 mb-2">General, secondary</p>
120
+ <Button variant="general-secondary" size="utility">
121
+ Label
122
+ </Button>
123
+ </div>
124
+ </div>
125
+ ),
126
+ };
127
+
128
+ export const UtilityGeneralTertiary: Story = {
129
+ render: () => (
130
+ <div className="space-y-6">
131
+ <div>
132
+ <p className="text-sm text-gray-600 mb-2">General, tertiary</p>
133
+ <Button variant="general-tertiary" size="utility">
134
+ Label
135
+ </Button>
136
+ </div>
137
+ </div>
138
+ ),
139
+ };
140
+
141
+ export const UtilityTooltipPrimary: Story = {
142
+ render: () => (
143
+ <div className="space-y-6">
144
+ <div>
145
+ <p className="text-sm text-gray-600 mb-2">Tooltip, primary</p>
146
+ <Button variant="tooltip-primary" size="utility">
147
+ Label
148
+ </Button>
149
+ </div>
150
+ </div>
151
+ ),
152
+ };
153
+
154
+ export const UtilityTooltipSecondary: Story = {
155
+ render: () => (
156
+ <div className="space-y-6">
157
+ <div>
158
+ <p className="text-sm text-gray-600 mb-2">Tooltip, secondary</p>
159
+ <Button variant="tooltip-secondary" size="utility">
160
+ Label
161
+ </Button>
162
+ </div>
163
+ </div>
164
+ ),
165
+ };
166
+
167
+ // Icon Buttons Stories
168
+ export const IconReset: Story = {
169
+ render: () => (
170
+ <div className="space-y-6">
171
+ <div>
172
+ <Button size="icon" className="hover:bg-btn-hover">
173
+ <UtilityReset className="group-hover:text-white" />
174
+ </Button>
175
+ </div>
176
+ </div>
177
+ ),
178
+ };
179
+
180
+ export const IconClose: Story = {
181
+ render: () => (
182
+ <div className="space-y-6">
183
+ <div>
184
+ <Button size="icon" className="hover:bg-btn-hover">
185
+ <UtilityClose className="group-hover:text-white" />
186
+ </Button>
187
+ </div>
188
+ </div>
189
+ ),
190
+ };
191
+
192
+ export const IconContract: Story = {
193
+ render: () => (
194
+ <div className="space-y-6">
195
+ <div>
196
+ <p className="text-sm text-gray-600 mb-2">Contract</p>
197
+ <Button size="icon" className="hover:bg-btn-hover">
198
+ <UtilityChevronDown className="group-hover:text-white rotate-180" />
199
+ </Button>
200
+ </div>
201
+ </div>
202
+ ),
203
+ };
204
+
205
+ export const IconExpand: Story = {
206
+ render: () => (
207
+ <div className="space-y-6">
208
+ <div>
209
+ <p className="text-sm text-gray-600 mb-2">Expand</p>
210
+ <Button size="icon" className="hover:bg-btn-hover">
211
+ <UtilityChevronDown className="group-hover:text-white" />
212
+ </Button>
213
+ </div>
214
+ </div>
215
+ ),
216
+ };
217
+
218
+ export const IconAccount: Story = {
219
+ render: () => (
220
+ <div className="space-y-6">
221
+ <div>
222
+ <p className="text-sm text-gray-600 mb-2">Account</p>
223
+ <div className="flex gap-6">
224
+ <Button size="icon" className="hover:bg-btn-hover">
225
+ <NavAccount className="group-hover:text-white" />
226
+ </Button>
227
+ <Button size="icon" className="bg-btn-hover">
228
+ <NavAccount className="group-hover:text-white text-bronze-100" />
229
+ </Button>
230
+ </div>
231
+ </div>
232
+ </div>
233
+ ),
234
+ };
235
+
236
+ // All Variants Overview
237
+ export const AllVariants: Story = {
238
+ render: () => (
239
+ <div className="space-y-12">
240
+ {/* CTA Buttons */}
241
+ <div className="space-y-6">
242
+ <h3 className="text-base font-semibold text-gray-700">CTA buttons</h3>
243
+ <div className="space-y-6">
244
+ <div>
245
+ <p className="text-sm text-gray-600 mb-2">
246
+ Xlarge, primary, gradient
247
+ </p>
248
+ <Button variant="primary-gradient" size="xlarge">
249
+ Call to action
250
+ </Button>
251
+ </div>
252
+ <div>
253
+ <p className="text-sm text-gray-600 mb-2">Xlarge, primary, dark</p>
254
+ <Button variant="primary-dark" size="xlarge">
255
+ Call to action
256
+ </Button>
257
+ </div>
258
+ <div>
259
+ <p className="text-sm text-gray-600 mb-2">
260
+ Xlarge, secondary, light
261
+ </p>
262
+ <Button variant="secondary-light" size="xlarge">
263
+ Call to action
264
+ </Button>
265
+ </div>
266
+ <div>
267
+ <p className="text-sm text-gray-600 mb-2">
268
+ Large, primary, gradient
269
+ </p>
270
+ <Button variant="primary-gradient" size="large">
271
+ Call to action
272
+ </Button>
273
+ </div>
274
+ <div>
275
+ <p className="text-sm text-gray-600 mb-2">Large, primary, dark</p>
276
+ <Button variant="primary-dark" size="large">
277
+ Call to action
278
+ </Button>
279
+ </div>
280
+ <div>
281
+ <p className="text-sm text-gray-600 mb-2">
282
+ Large, secondary, light
283
+ </p>
284
+ <Button variant="secondary-light" size="large">
285
+ Call to action
286
+ </Button>
287
+ </div>
288
+ <div>
289
+ <p className="text-sm text-gray-600 mb-2">Large, tertiary, light</p>
290
+ <Button variant="tertiary-light" size="large">
291
+ Call to action
292
+ </Button>
293
+ </div>
294
+ </div>
295
+ </div>
296
+
297
+ {/* Utility Buttons */}
298
+ <div className="space-y-6">
299
+ <h3 className="text-base font-semibold text-gray-700">
300
+ Utility buttons
301
+ </h3>
302
+ <div className="space-y-6">
303
+ <div>
304
+ <p className="text-sm text-gray-600 mb-2">General, primary</p>
305
+ <Button variant="general-primary" size="utility">
306
+ Label
307
+ </Button>
308
+ </div>
309
+ <div>
310
+ <p className="text-sm text-gray-600 mb-2">General, secondary</p>
311
+ <Button variant="general-secondary" size="utility">
312
+ Label
313
+ </Button>
314
+ </div>
315
+ <div>
316
+ <p className="text-sm text-gray-600 mb-2">General, tertiary</p>
317
+ <Button variant="general-tertiary" size="utility">
318
+ Label
319
+ </Button>
320
+ </div>
321
+ <div>
322
+ <p className="text-sm text-gray-600 mb-2">Tooltip, primary</p>
323
+ <Button variant="tooltip-primary" size="utility">
324
+ Label
325
+ </Button>
326
+ </div>
327
+ <div>
328
+ <p className="text-sm text-gray-600 mb-2">Tooltip, secondary</p>
329
+ <Button variant="tooltip-secondary" size="utility">
330
+ Label
331
+ </Button>
332
+ </div>
333
+ </div>
334
+ </div>
335
+
336
+ {/* Icon Buttons */}
337
+ <div className="space-y-6">
338
+ <h3 className="text-base font-semibold text-gray-700">Icon buttons</h3>
339
+ <div className="space-y-6">
340
+ <div>
341
+ <p className="text-sm text-gray-600 mb-2">Reset</p>
342
+ <Button size="icon">
343
+ <div className="size-4 flex items-center justify-center">
344
+ <UtilityReset />
345
+ </div>
346
+ </Button>
347
+ </div>
348
+ <div>
349
+ <p className="text-sm text-gray-600 mb-2">Close</p>
350
+ <div className="flex gap-6">
351
+ <Button size="icon">
352
+ <div className="size-4 flex items-center justify-center">
353
+ <UtilityClose />
354
+ </div>
355
+ </Button>
356
+ <Button size="icon">
357
+ <div className="size-4 flex items-center justify-center">
358
+ <UtilityClose />
359
+ </div>
360
+ </Button>
361
+ </div>
362
+ </div>
363
+ <div>
364
+ <p className="text-sm text-gray-600 mb-2">Contract</p>
365
+ <Button size="icon">
366
+ <div className="size-4 flex items-center justify-center pb-0.5 pt-0 px-0">
367
+ <div className="rotate-180 scale-y-[-1]">
368
+ <UtilityChevronDown />
369
+ </div>
370
+ </div>
371
+ </Button>
372
+ </div>
373
+ <div>
374
+ <p className="text-sm text-gray-600 mb-2">Expand</p>
375
+ <Button size="icon">
376
+ <div className="size-4 flex items-center justify-center pb-0 pt-0.5 px-0">
377
+ <div className="rotate-180 scale-y-[-1]">
378
+ <UtilityChevronDown />
379
+ </div>
380
+ </div>
381
+ </Button>
382
+ </div>
383
+ <div>
384
+ <p className="text-sm text-gray-600 mb-2">Account</p>
385
+ <div className="flex gap-6">
386
+ <Button size="icon">
387
+ <div className="size-4 flex items-center justify-center">
388
+ <NavAccount color="#E8D2B5" />
389
+ </div>
390
+ </Button>
391
+ <Button size="icon">
392
+ <div className="size-4 flex items-center justify-center">
393
+ <NavAccount color="#FBF8F3" />
394
+ </div>
395
+ </Button>
396
+ </div>
397
+ </div>
398
+ </div>
399
+ </div>
400
+ </div>
401
+ ),
402
+ };
403
+
404
+ export const Disabled: Story = {
405
+ render: () => (
406
+ <div className="space-y-6">
407
+ <div>
408
+ <p className="text-sm text-gray-600 mb-2">Disabled CTA Button</p>
409
+ <Button variant="primary-dark" size="large" disabled>
410
+ Call to action
411
+ </Button>
412
+ </div>
413
+ <div>
414
+ <p className="text-sm text-gray-600 mb-2">Disabled Utility Button</p>
415
+ <Button variant="general-primary" size="utility" disabled>
416
+ Label
417
+ </Button>
418
+ </div>
419
+ <div>
420
+ <p className="text-sm text-gray-600 mb-2">Disabled Icon Button</p>
421
+ <Button size="icon" disabled>
422
+ <div className="size-4 flex items-center justify-center">
423
+ <UtilityReset />
424
+ </div>
425
+ </Button>
426
+ </div>
427
+ </div>
428
+ ),
429
+ };
@@ -0,0 +1,99 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Calendar } from "../../components/ui/calendar";
3
+ import { useState } from "react";
4
+
5
+ const meta = {
6
+ title: "UI/Calendar",
7
+ component: Calendar,
8
+ tags: ["autodocs"],
9
+ parameters: {
10
+ layout: "centered",
11
+ },
12
+ } satisfies Meta<typeof Calendar>;
13
+
14
+ export default meta;
15
+
16
+ type Story = StoryObj<typeof meta>;
17
+
18
+ export const Default: Story = {
19
+ render: () => {
20
+ const [date, setDate] = useState<Date | undefined>(new Date());
21
+
22
+ return (
23
+ <Calendar
24
+ mode="single"
25
+ selected={date}
26
+ onSelect={setDate}
27
+ className="rounded-md border"
28
+ />
29
+ );
30
+ },
31
+ };
32
+
33
+ export const Multiple: Story = {
34
+ render: () => {
35
+ const [dates, setDates] = useState<Date[] | undefined>();
36
+
37
+ return (
38
+ <Calendar
39
+ mode="multiple"
40
+ selected={dates}
41
+ onSelect={setDates}
42
+ className="rounded-md border"
43
+ />
44
+ );
45
+ },
46
+ };
47
+
48
+ export const Range: Story = {
49
+ render: () => {
50
+ const [range, setRange] = useState<
51
+ { from?: Date; to?: Date } | undefined
52
+ >();
53
+
54
+ return (
55
+ <Calendar
56
+ mode="range"
57
+ selected={range}
58
+ onSelect={setRange}
59
+ className="rounded-md border"
60
+ />
61
+ );
62
+ },
63
+ };
64
+
65
+ export const Disabled: Story = {
66
+ render: () => {
67
+ const [date, setDate] = useState<Date | undefined>(new Date());
68
+ const today = new Date();
69
+ const yesterday = new Date(today.getTime() - 24 * 60 * 60 * 1000);
70
+
71
+ return (
72
+ <Calendar
73
+ mode="single"
74
+ selected={date}
75
+ onSelect={setDate}
76
+ disabled={(date) => date < yesterday}
77
+ className="rounded-md border"
78
+ />
79
+ );
80
+ },
81
+ };
82
+
83
+ export const WithFooter: Story = {
84
+ render: () => {
85
+ const [date, setDate] = useState<Date | undefined>(new Date());
86
+
87
+ return (
88
+ <div className="border rounded-lg p-4 space-y-4 max-w-sm">
89
+ <Calendar mode="single" selected={date} onSelect={setDate} />
90
+ {date && (
91
+ <div className="space-y-2 border-t pt-4">
92
+ <p className="text-sm font-medium">Selected date</p>
93
+ <p className="text-sm text-gray-600">{date.toLocaleDateString()}</p>
94
+ </div>
95
+ )}
96
+ </div>
97
+ );
98
+ },
99
+ };
@@ -0,0 +1,84 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Card,
4
+ CardHeader,
5
+ CardFooter,
6
+ CardTitle,
7
+ CardDescription,
8
+ CardContent,
9
+ } from "../components/ui/Card";
10
+ import { Button } from "@/components/ui/button";
11
+
12
+ const meta = {
13
+ title: "Review/Card",
14
+ component: Card,
15
+ tags: ["autodocs"],
16
+ parameters: {
17
+ layout: "padded",
18
+ },
19
+ } satisfies Meta<typeof Card>;
20
+
21
+ export default meta;
22
+
23
+ type Story = StoryObj<typeof meta>;
24
+
25
+ export const Default: Story = {
26
+ render: () => (
27
+ <Card className="w-full max-w-sm">
28
+ <CardHeader>
29
+ <CardTitle>Card Title</CardTitle>
30
+ <CardDescription>Card description goes here</CardDescription>
31
+ </CardHeader>
32
+ <CardContent>This is the main content area of the card.</CardContent>
33
+ <CardFooter>
34
+ <p className="body-base text-gray-600">Footer information</p>
35
+ </CardFooter>
36
+ </Card>
37
+ ),
38
+ };
39
+
40
+ export const WithButton: Story = {
41
+ render: () => (
42
+ <Card className="w-full max-w-sm">
43
+ <CardHeader>
44
+ <CardTitle>Product</CardTitle>
45
+ <CardDescription>Limited offer available now</CardDescription>
46
+ </CardHeader>
47
+ <CardContent>
48
+ <p className="body-base text-gray-600 mb-4">
49
+ Experience the best features with our new product.
50
+ </p>
51
+ </CardContent>
52
+ <CardFooter>
53
+ <Button size="large" variant="primary-dark">
54
+ Call to action
55
+ </Button>
56
+ </CardFooter>
57
+ </Card>
58
+ ),
59
+ };
60
+
61
+ export const Multiple: Story = {
62
+ render: () => (
63
+ <div className="grid grid-cols-1 gap-4 max-w-2xl">
64
+ <Card>
65
+ <CardHeader>
66
+ <CardTitle className="heading-xsmall">Card One</CardTitle>
67
+ </CardHeader>
68
+ <CardContent>Content for the first card</CardContent>
69
+ </Card>
70
+ <Card>
71
+ <CardHeader>
72
+ <CardTitle className="heading-xsmall">Card Two</CardTitle>
73
+ </CardHeader>
74
+ <CardContent>Content for the second card</CardContent>
75
+ </Card>
76
+ <Card>
77
+ <CardHeader>
78
+ <CardTitle className="heading-xsmall">Card Three</CardTitle>
79
+ </CardHeader>
80
+ <CardContent>Content for the third card</CardContent>
81
+ </Card>
82
+ </div>
83
+ ),
84
+ };
@@ -0,0 +1,85 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Carousel,
4
+ CarouselContent,
5
+ CarouselItem,
6
+ CarouselNext,
7
+ CarouselPrevious,
8
+ } from "../../components/ui/carousel";
9
+
10
+ const meta = {
11
+ title: "UI/Carousel",
12
+ component: Carousel,
13
+ tags: ["autodocs"],
14
+ parameters: {
15
+ layout: "padded",
16
+ },
17
+ } satisfies Meta<typeof Carousel>;
18
+
19
+ export default meta;
20
+
21
+ type Story = StoryObj<typeof meta>;
22
+
23
+ export const Default: Story = {
24
+ render: () => (
25
+ <Carousel className="w-full max-w-xs">
26
+ <CarouselContent>
27
+ {[1, 2, 3, 4, 5].map((index) => (
28
+ <CarouselItem key={index}>
29
+ <div className="p-1">
30
+ <div className="flex aspect-square items-center justify-center rounded-lg bg-gray-200">
31
+ <span className="text-4xl font-semibold">{index}</span>
32
+ </div>
33
+ </div>
34
+ </CarouselItem>
35
+ ))}
36
+ </CarouselContent>
37
+ <CarouselPrevious />
38
+ <CarouselNext />
39
+ </Carousel>
40
+ ),
41
+ };
42
+
43
+ export const Images: Story = {
44
+ render: () => (
45
+ <Carousel className="w-full max-w-md">
46
+ <CarouselContent>
47
+ {[1, 2, 3].map((index) => (
48
+ <CarouselItem key={index}>
49
+ <div className="p-1">
50
+ <div className="relative aspect-video overflow-hidden rounded-lg bg-gray-200">
51
+ <img
52
+ src={`https://images.unsplash.com/photo-${150 + index}?w=400`}
53
+ alt={`Slide ${index}`}
54
+ className="h-full w-full object-cover"
55
+ />
56
+ </div>
57
+ </div>
58
+ </CarouselItem>
59
+ ))}
60
+ </CarouselContent>
61
+ <CarouselPrevious />
62
+ <CarouselNext />
63
+ </Carousel>
64
+ ),
65
+ };
66
+
67
+ export const WithSize: Story = {
68
+ render: () => (
69
+ <Carousel className="w-full max-w-2xl">
70
+ <CarouselContent>
71
+ {Array.from({ length: 5 }).map((_, index) => (
72
+ <CarouselItem key={index} className="md:basis-1/2 lg:basis-1/3">
73
+ <div className="p-1">
74
+ <div className="flex aspect-square items-center justify-center rounded-lg bg-linear-to-br from-blue-400 to-blue-600 text-white">
75
+ <span className="text-2xl font-semibold">Item {index + 1}</span>
76
+ </div>
77
+ </div>
78
+ </CarouselItem>
79
+ ))}
80
+ </CarouselContent>
81
+ <CarouselPrevious />
82
+ <CarouselNext />
83
+ </Carousel>
84
+ ),
85
+ };