@shipfox/react-ui 0.25.0 → 0.26.0

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 (53) hide show
  1. package/dist/components/index.d.ts +1 -0
  2. package/dist/components/index.js +1 -0
  3. package/dist/components/slider/index.d.ts +2 -0
  4. package/dist/components/slider/index.js +3 -0
  5. package/dist/components/slider/slider.d.ts +10 -0
  6. package/dist/components/slider/slider.js +38 -0
  7. package/dist/styles.css +1 -1
  8. package/package.json +4 -4
  9. package/dist/colors.stories.js +0 -61
  10. package/dist/components/alert/alert.stories.js +0 -227
  11. package/dist/components/avatar/avatar.stories.js +0 -267
  12. package/dist/components/badge/badge.stories.js +0 -802
  13. package/dist/components/button/button-link.stories.js +0 -127
  14. package/dist/components/button/button.stories.js +0 -187
  15. package/dist/components/button/icon-button.stories.js +0 -344
  16. package/dist/components/button-group/button-group.stories.js +0 -644
  17. package/dist/components/card/card.stories.js +0 -216
  18. package/dist/components/checkbox/checkbox.stories.js +0 -566
  19. package/dist/components/code-block/code-block.stories.js +0 -341
  20. package/dist/components/combobox/combobox.stories.js +0 -191
  21. package/dist/components/command/command.stories.js +0 -228
  22. package/dist/components/confetti/confetti.stories.js +0 -41
  23. package/dist/components/count-up/count-up.stories.js +0 -568
  24. package/dist/components/dashboard/components/charts/bar-chart.stories.js +0 -287
  25. package/dist/components/dashboard/components/charts/line-chart.stories.js +0 -257
  26. package/dist/components/dashboard/dashboard.stories.js +0 -23
  27. package/dist/components/date-picker/date-picker.stories.js +0 -349
  28. package/dist/components/dropdown-input/dropdown-input.stories.js +0 -240
  29. package/dist/components/dropdown-menu/dropdown-menu.stories.js +0 -462
  30. package/dist/components/dynamic-item/dynamic-item.stories.js +0 -385
  31. package/dist/components/empty-state/empty-state.stories.js +0 -74
  32. package/dist/components/form/form.stories.js +0 -587
  33. package/dist/components/icon/icon.stories.js +0 -38
  34. package/dist/components/inline-tips/inline-tips.stories.js +0 -219
  35. package/dist/components/input/input.stories.js +0 -265
  36. package/dist/components/interval-selector/interval-selector.stories.js +0 -232
  37. package/dist/components/item/item.stories.js +0 -239
  38. package/dist/components/kbd/kbd.stories.js +0 -119
  39. package/dist/components/label/label.stories.js +0 -105
  40. package/dist/components/modal/modal.stories.js +0 -566
  41. package/dist/components/search/search.stories.js +0 -630
  42. package/dist/components/select/select.stories.js +0 -393
  43. package/dist/components/sheet/sheet.stories.js +0 -368
  44. package/dist/components/skeleton/skeleton.stories.js +0 -345
  45. package/dist/components/table/table.stories.js +0 -302
  46. package/dist/components/tabs/tabs.stories.js +0 -179
  47. package/dist/components/textarea/textarea.stories.js +0 -339
  48. package/dist/components/toast/toast.stories.js +0 -326
  49. package/dist/components/tooltip/tooltip.stories.js +0 -560
  50. package/dist/components/typography/code.stories.js +0 -54
  51. package/dist/components/typography/header.stories.js +0 -34
  52. package/dist/components/typography/text.stories.js +0 -105
  53. package/dist/onboarding/sign-in.stories.js +0 -101
@@ -1,587 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { argosScreenshot } from '@argos-ci/storybook/vitest';
3
- import { zodResolver } from '@hookform/resolvers/zod';
4
- import { Button } from '../../components/button/index.js';
5
- import { Checkbox, CheckboxLabel, CheckboxLinks } from '../../components/checkbox/index.js';
6
- import { Input } from '../../components/input/index.js';
7
- import { Textarea } from '../../components/textarea/index.js';
8
- import { Code, Header } from '../../components/typography/index.js';
9
- import { useForm } from 'react-hook-form';
10
- import { z } from 'zod';
11
- import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from './form.js';
12
- const meta = {
13
- title: 'Components/Form',
14
- tags: [
15
- 'autodocs'
16
- ]
17
- };
18
- export default meta;
19
- const basicFormSchema = z.object({
20
- username: z.string().min(3, 'Username must be at least 3 characters'),
21
- email: z.string().email('Invalid email address')
22
- });
23
- function BasicFormExample() {
24
- const form = useForm({
25
- resolver: zodResolver(basicFormSchema),
26
- defaultValues: {
27
- username: '',
28
- email: ''
29
- }
30
- });
31
- function onSubmit(data) {
32
- // biome-ignore lint/suspicious/noConsole: <we need to log the data for the story>
33
- console.log(data);
34
- }
35
- return /*#__PURE__*/ _jsx(Form, {
36
- ...form,
37
- children: /*#__PURE__*/ _jsxs("form", {
38
- onSubmit: form.handleSubmit(onSubmit),
39
- className: "space-y-8 w-full max-w-md",
40
- children: [
41
- /*#__PURE__*/ _jsx(FormField, {
42
- control: form.control,
43
- name: "username",
44
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
45
- children: [
46
- /*#__PURE__*/ _jsx(FormLabel, {
47
- children: "Username"
48
- }),
49
- /*#__PURE__*/ _jsx(FormControl, {
50
- children: /*#__PURE__*/ _jsx(Input, {
51
- placeholder: "shadcn",
52
- ...field
53
- })
54
- }),
55
- /*#__PURE__*/ _jsx(FormDescription, {
56
- children: "This is your public display name."
57
- }),
58
- /*#__PURE__*/ _jsx(FormMessage, {})
59
- ]
60
- })
61
- }),
62
- /*#__PURE__*/ _jsx(FormField, {
63
- control: form.control,
64
- name: "email",
65
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
66
- children: [
67
- /*#__PURE__*/ _jsx(FormLabel, {
68
- children: "Email"
69
- }),
70
- /*#__PURE__*/ _jsx(FormControl, {
71
- children: /*#__PURE__*/ _jsx(Input, {
72
- type: "email",
73
- placeholder: "email@example.com",
74
- ...field
75
- })
76
- }),
77
- /*#__PURE__*/ _jsx(FormDescription, {
78
- children: "We'll never share your email."
79
- }),
80
- /*#__PURE__*/ _jsx(FormMessage, {})
81
- ]
82
- })
83
- }),
84
- /*#__PURE__*/ _jsx(Button, {
85
- type: "submit",
86
- children: "Submit"
87
- })
88
- ]
89
- })
90
- });
91
- }
92
- export const Basic = {
93
- render: ()=>/*#__PURE__*/ _jsx(BasicFormExample, {}),
94
- play: async (context)=>{
95
- await new Promise((resolve)=>setTimeout(resolve, 100));
96
- await argosScreenshot(context, 'Form Basic');
97
- }
98
- };
99
- const componentsFormSchema = z.object({
100
- example: z.string().min(1, 'This field is required'),
101
- exampleTextarea: z.string().min(1, 'This field is required')
102
- });
103
- function FormComponentsExample() {
104
- const form = useForm({
105
- resolver: zodResolver(componentsFormSchema),
106
- defaultValues: {
107
- example: '',
108
- exampleTextarea: ''
109
- }
110
- });
111
- return /*#__PURE__*/ _jsx(Form, {
112
- ...form,
113
- children: /*#__PURE__*/ _jsxs("div", {
114
- className: "flex flex-col gap-32 w-full max-w-md",
115
- children: [
116
- /*#__PURE__*/ _jsxs("div", {
117
- className: "flex flex-col gap-16",
118
- children: [
119
- /*#__PURE__*/ _jsx(Header, {
120
- variant: "h3",
121
- children: "Form Components"
122
- }),
123
- /*#__PURE__*/ _jsx(Code, {
124
- variant: "label",
125
- className: "text-foreground-neutral-subtle",
126
- children: "Individual form components work together within FormField"
127
- })
128
- ]
129
- }),
130
- /*#__PURE__*/ _jsxs("form", {
131
- className: "space-y-8",
132
- children: [
133
- /*#__PURE__*/ _jsx(FormField, {
134
- control: form.control,
135
- name: "example",
136
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
137
- children: [
138
- /*#__PURE__*/ _jsx(FormLabel, {
139
- children: "Form Label"
140
- }),
141
- /*#__PURE__*/ _jsx(FormControl, {
142
- children: /*#__PURE__*/ _jsx(Input, {
143
- placeholder: "Form Control with Input",
144
- ...field
145
- })
146
- }),
147
- /*#__PURE__*/ _jsx(FormDescription, {
148
- children: "This is a form description."
149
- }),
150
- /*#__PURE__*/ _jsx(FormMessage, {})
151
- ]
152
- })
153
- }),
154
- /*#__PURE__*/ _jsx(FormField, {
155
- control: form.control,
156
- name: "exampleTextarea",
157
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
158
- children: [
159
- /*#__PURE__*/ _jsx(FormLabel, {
160
- children: "Form Label"
161
- }),
162
- /*#__PURE__*/ _jsx(FormControl, {
163
- children: /*#__PURE__*/ _jsx(Textarea, {
164
- placeholder: "Form Control with Textarea",
165
- ...field
166
- })
167
- }),
168
- /*#__PURE__*/ _jsx(FormDescription, {
169
- children: "This is a form description."
170
- }),
171
- /*#__PURE__*/ _jsx(FormMessage, {})
172
- ]
173
- })
174
- })
175
- ]
176
- })
177
- ]
178
- })
179
- });
180
- }
181
- export const Components = {
182
- render: ()=>/*#__PURE__*/ _jsx(FormComponentsExample, {})
183
- };
184
- const checkboxFormSchema = z.object({
185
- username: z.string().min(3, 'Username must be at least 3 characters'),
186
- email: z.string().email('Invalid email address'),
187
- newsletter: z.boolean(),
188
- notifications: z.boolean()
189
- });
190
- function FormWithCheckboxExample() {
191
- const form = useForm({
192
- resolver: zodResolver(checkboxFormSchema),
193
- defaultValues: {
194
- username: '',
195
- email: '',
196
- newsletter: false,
197
- notifications: false
198
- }
199
- });
200
- function onSubmit(data) {
201
- // biome-ignore lint/suspicious/noConsole: <we need to log the data for the story>
202
- console.log(data);
203
- }
204
- return /*#__PURE__*/ _jsx(Form, {
205
- ...form,
206
- children: /*#__PURE__*/ _jsxs("form", {
207
- onSubmit: form.handleSubmit(onSubmit),
208
- className: "space-y-8 w-full max-w-md",
209
- children: [
210
- /*#__PURE__*/ _jsx(FormField, {
211
- control: form.control,
212
- name: "username",
213
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
214
- children: [
215
- /*#__PURE__*/ _jsx(FormLabel, {
216
- children: "Username"
217
- }),
218
- /*#__PURE__*/ _jsx(FormControl, {
219
- children: /*#__PURE__*/ _jsx(Input, {
220
- placeholder: "shadcn",
221
- ...field
222
- })
223
- }),
224
- /*#__PURE__*/ _jsx(FormDescription, {
225
- children: "This is your public display name."
226
- }),
227
- /*#__PURE__*/ _jsx(FormMessage, {})
228
- ]
229
- })
230
- }),
231
- /*#__PURE__*/ _jsx(FormField, {
232
- control: form.control,
233
- name: "email",
234
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
235
- children: [
236
- /*#__PURE__*/ _jsx(FormLabel, {
237
- children: "Email"
238
- }),
239
- /*#__PURE__*/ _jsx(FormControl, {
240
- children: /*#__PURE__*/ _jsx(Input, {
241
- type: "email",
242
- placeholder: "email@example.com",
243
- ...field
244
- })
245
- }),
246
- /*#__PURE__*/ _jsx(FormDescription, {
247
- children: "We'll never share your email."
248
- }),
249
- /*#__PURE__*/ _jsx(FormMessage, {})
250
- ]
251
- })
252
- }),
253
- /*#__PURE__*/ _jsx(FormField, {
254
- control: form.control,
255
- name: "newsletter",
256
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
257
- className: "flex flex-row items-center gap-8 pt-4",
258
- children: [
259
- /*#__PURE__*/ _jsx(FormControl, {
260
- children: /*#__PURE__*/ _jsx(Checkbox, {
261
- checked: field.value,
262
- onCheckedChange: field.onChange
263
- })
264
- }),
265
- /*#__PURE__*/ _jsx(FormLabel, {
266
- children: "Subscribe to newsletter"
267
- })
268
- ]
269
- })
270
- }),
271
- /*#__PURE__*/ _jsx(FormField, {
272
- control: form.control,
273
- name: "notifications",
274
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
275
- className: "flex flex-row items-center gap-8 pt-4 pb-8",
276
- children: [
277
- /*#__PURE__*/ _jsx(FormControl, {
278
- children: /*#__PURE__*/ _jsx(Checkbox, {
279
- checked: field.value,
280
- onCheckedChange: field.onChange
281
- })
282
- }),
283
- /*#__PURE__*/ _jsx(FormLabel, {
284
- children: "Enable notifications"
285
- })
286
- ]
287
- })
288
- }),
289
- /*#__PURE__*/ _jsx(Button, {
290
- type: "submit",
291
- children: "Submit"
292
- })
293
- ]
294
- })
295
- });
296
- }
297
- export const WithCheckbox = {
298
- render: ()=>/*#__PURE__*/ _jsx(FormWithCheckboxExample, {})
299
- };
300
- const checkboxLabelSchema = z.object({
301
- username: z.string().min(1, 'Username is required'),
302
- email: z.string().email('Invalid email address'),
303
- terms: z.boolean().refine((val)=>val === true, {
304
- message: 'You must accept the terms and conditions'
305
- }),
306
- marketing: z.boolean()
307
- });
308
- function FormWithCheckboxLabelExample() {
309
- const form = useForm({
310
- resolver: zodResolver(checkboxLabelSchema),
311
- defaultValues: {
312
- username: '',
313
- email: '',
314
- terms: false,
315
- marketing: false
316
- }
317
- });
318
- function onSubmit(data) {
319
- // biome-ignore lint/suspicious/noConsole: <we need to log the data for the story>
320
- console.log(data);
321
- }
322
- return /*#__PURE__*/ _jsx(Form, {
323
- ...form,
324
- children: /*#__PURE__*/ _jsxs("form", {
325
- onSubmit: form.handleSubmit(onSubmit),
326
- className: "space-y-8 w-full max-w-md",
327
- children: [
328
- /*#__PURE__*/ _jsx(FormField, {
329
- control: form.control,
330
- name: "username",
331
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
332
- children: [
333
- /*#__PURE__*/ _jsx(FormLabel, {
334
- children: "Username"
335
- }),
336
- /*#__PURE__*/ _jsx(FormControl, {
337
- children: /*#__PURE__*/ _jsx(Input, {
338
- placeholder: "shadcn",
339
- ...field
340
- })
341
- }),
342
- /*#__PURE__*/ _jsx(FormMessage, {})
343
- ]
344
- })
345
- }),
346
- /*#__PURE__*/ _jsx(FormField, {
347
- control: form.control,
348
- name: "email",
349
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
350
- children: [
351
- /*#__PURE__*/ _jsx(FormLabel, {
352
- children: "Email"
353
- }),
354
- /*#__PURE__*/ _jsx(FormControl, {
355
- children: /*#__PURE__*/ _jsx(Input, {
356
- type: "email",
357
- placeholder: "email@example.com",
358
- ...field
359
- })
360
- }),
361
- /*#__PURE__*/ _jsx(FormMessage, {})
362
- ]
363
- })
364
- }),
365
- /*#__PURE__*/ _jsx(FormField, {
366
- control: form.control,
367
- name: "terms",
368
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
369
- children: [
370
- /*#__PURE__*/ _jsx(FormControl, {
371
- children: /*#__PURE__*/ _jsx(CheckboxLabel, {
372
- label: "I agree to the terms and conditions",
373
- description: "By checking this box, you agree to our terms of service and privacy policy.",
374
- checked: field.value,
375
- onCheckedChange: field.onChange
376
- })
377
- }),
378
- /*#__PURE__*/ _jsx(FormMessage, {})
379
- ]
380
- })
381
- }),
382
- /*#__PURE__*/ _jsx(FormField, {
383
- control: form.control,
384
- name: "marketing",
385
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
386
- children: [
387
- /*#__PURE__*/ _jsx(FormControl, {
388
- children: /*#__PURE__*/ _jsx(CheckboxLabel, {
389
- label: "I want to receive marketing emails",
390
- description: "Stay updated with our latest products and offers.",
391
- optional: true,
392
- checked: field.value,
393
- onCheckedChange: field.onChange
394
- })
395
- }),
396
- /*#__PURE__*/ _jsx(FormMessage, {})
397
- ]
398
- })
399
- }),
400
- /*#__PURE__*/ _jsx(Button, {
401
- type: "submit",
402
- children: "Submit"
403
- })
404
- ]
405
- })
406
- });
407
- }
408
- export const WithCheckboxLabel = {
409
- render: ()=>/*#__PURE__*/ _jsx(FormWithCheckboxLabelExample, {})
410
- };
411
- const checkboxLinksSchema = z.object({
412
- username: z.string().min(1, 'Username is required'),
413
- email: z.string().email('Invalid email address'),
414
- acceptPolicies: z.boolean().refine((val)=>val === true, {
415
- message: 'You must accept the policies to continue'
416
- })
417
- });
418
- function FormWithCheckboxLinksExample() {
419
- const form = useForm({
420
- resolver: zodResolver(checkboxLinksSchema),
421
- defaultValues: {
422
- username: '',
423
- email: '',
424
- acceptPolicies: false
425
- }
426
- });
427
- function onSubmit(data) {
428
- // biome-ignore lint/suspicious/noConsole: <we need to log the data for the story>
429
- console.log(data);
430
- }
431
- return /*#__PURE__*/ _jsx(Form, {
432
- ...form,
433
- children: /*#__PURE__*/ _jsxs("form", {
434
- onSubmit: form.handleSubmit(onSubmit),
435
- className: "space-y-8 w-full max-w-md",
436
- children: [
437
- /*#__PURE__*/ _jsx(FormField, {
438
- control: form.control,
439
- name: "username",
440
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
441
- children: [
442
- /*#__PURE__*/ _jsx(FormLabel, {
443
- children: "Username"
444
- }),
445
- /*#__PURE__*/ _jsx(FormControl, {
446
- children: /*#__PURE__*/ _jsx(Input, {
447
- placeholder: "shadcn",
448
- ...field
449
- })
450
- }),
451
- /*#__PURE__*/ _jsx(FormMessage, {})
452
- ]
453
- })
454
- }),
455
- /*#__PURE__*/ _jsx(FormField, {
456
- control: form.control,
457
- name: "email",
458
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
459
- children: [
460
- /*#__PURE__*/ _jsx(FormLabel, {
461
- children: "Email"
462
- }),
463
- /*#__PURE__*/ _jsx(FormControl, {
464
- children: /*#__PURE__*/ _jsx(Input, {
465
- type: "email",
466
- placeholder: "email@example.com",
467
- ...field
468
- })
469
- }),
470
- /*#__PURE__*/ _jsx(FormMessage, {})
471
- ]
472
- })
473
- }),
474
- /*#__PURE__*/ _jsx(FormField, {
475
- control: form.control,
476
- name: "acceptPolicies",
477
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
478
- children: [
479
- /*#__PURE__*/ _jsx(FormControl, {
480
- children: /*#__PURE__*/ _jsx(CheckboxLinks, {
481
- label: "Accept policies",
482
- links: [
483
- {
484
- label: 'Terms of use',
485
- href: '#'
486
- },
487
- {
488
- label: 'Privacy Policy',
489
- href: '#'
490
- }
491
- ],
492
- checked: field.value,
493
- onCheckedChange: field.onChange
494
- })
495
- }),
496
- /*#__PURE__*/ _jsx(FormMessage, {})
497
- ]
498
- })
499
- }),
500
- /*#__PURE__*/ _jsx(Button, {
501
- type: "submit",
502
- children: "Submit"
503
- })
504
- ]
505
- })
506
- });
507
- }
508
- export const WithCheckboxLinks = {
509
- render: ()=>/*#__PURE__*/ _jsx(FormWithCheckboxLinksExample, {})
510
- };
511
- const checkboxLabelBorderSchema = z.object({
512
- plan: z.string().min(1, 'Plan name is required'),
513
- newsletter: z.boolean()
514
- });
515
- function FormWithCheckboxLabelBorderExample() {
516
- const form = useForm({
517
- resolver: zodResolver(checkboxLabelBorderSchema),
518
- defaultValues: {
519
- plan: '',
520
- newsletter: false
521
- }
522
- });
523
- function onSubmit(data) {
524
- // biome-ignore lint/suspicious/noConsole: <we need to log the data for the story>
525
- console.log(data);
526
- }
527
- return /*#__PURE__*/ _jsx(Form, {
528
- ...form,
529
- children: /*#__PURE__*/ _jsxs("form", {
530
- onSubmit: form.handleSubmit(onSubmit),
531
- className: "space-y-8 w-full max-w-md",
532
- children: [
533
- /*#__PURE__*/ _jsx(FormField, {
534
- control: form.control,
535
- name: "plan",
536
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
537
- children: [
538
- /*#__PURE__*/ _jsx(FormLabel, {
539
- children: "Select a plan"
540
- }),
541
- /*#__PURE__*/ _jsx(FormControl, {
542
- children: /*#__PURE__*/ _jsx(Input, {
543
- placeholder: "Enter plan name",
544
- ...field
545
- })
546
- }),
547
- /*#__PURE__*/ _jsx(FormDescription, {
548
- children: "Choose the plan that best fits your needs."
549
- }),
550
- /*#__PURE__*/ _jsx(FormMessage, {})
551
- ]
552
- })
553
- }),
554
- /*#__PURE__*/ _jsx(FormField, {
555
- control: form.control,
556
- name: "newsletter",
557
- render: ({ field })=>/*#__PURE__*/ _jsxs(FormItem, {
558
- children: [
559
- /*#__PURE__*/ _jsx(FormControl, {
560
- children: /*#__PURE__*/ _jsx(CheckboxLabel, {
561
- label: "Subscribe to our newsletter",
562
- description: "Get weekly updates, tips, and exclusive content delivered to your inbox.",
563
- optional: true,
564
- showInfoIcon: true,
565
- border: true,
566
- checked: field.value,
567
- onCheckedChange: field.onChange
568
- })
569
- }),
570
- /*#__PURE__*/ _jsx(FormMessage, {})
571
- ]
572
- })
573
- }),
574
- /*#__PURE__*/ _jsx(Button, {
575
- type: "submit",
576
- className: "mt-4",
577
- children: "Submit"
578
- })
579
- ]
580
- })
581
- });
582
- }
583
- export const WithCheckboxLabelBorder = {
584
- render: ()=>/*#__PURE__*/ _jsx(FormWithCheckboxLabelBorderExample, {})
585
- };
586
-
587
- //# sourceMappingURL=form.stories.js.map
@@ -1,38 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Code } from '../../components/typography/index.js';
3
- import { Icon, iconNames } from './icon.js';
4
- const meta = {
5
- title: 'Components/Icon',
6
- component: Icon
7
- };
8
- export default meta;
9
- export const Gallery = {
10
- args: {
11
- name: 'google'
12
- },
13
- render: (args)=>/*#__PURE__*/ _jsx("div", {
14
- className: "flex flex-col gap-16",
15
- children: /*#__PURE__*/ _jsx("div", {
16
- className: "grid grid-cols-8 gap-16",
17
- children: iconNames.toSorted().map((name)=>/*#__PURE__*/ _jsxs("div", {
18
- className: "flex flex-col items-center gap-4",
19
- children: [
20
- /*#__PURE__*/ _jsx("div", {
21
- className: "flex items-center justify-center w-20 h-20",
22
- children: /*#__PURE__*/ _jsx(Icon, {
23
- ...args,
24
- name: name
25
- })
26
- }),
27
- /*#__PURE__*/ _jsx(Code, {
28
- variant: "label",
29
- className: "text-foreground-neutral-subtle",
30
- children: name
31
- })
32
- ]
33
- }, name))
34
- })
35
- })
36
- };
37
-
38
- //# sourceMappingURL=icon.stories.js.map