@foundrykit/primitives 2.0.9 → 2.0.10

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 (131) hide show
  1. package/dist/chunk-3NQR7JZR.js +128 -0
  2. package/dist/chunk-B5YCE3UP.js +57 -0
  3. package/dist/chunk-F2TEA6ER.js +138 -0
  4. package/dist/chunk-SIQHWNPH.js +45 -0
  5. package/dist/components/dialog/index.cjs +182 -0
  6. package/dist/components/dialog/index.d.cts +38 -0
  7. package/dist/components/dialog/index.d.ts +38 -0
  8. package/dist/components/dialog/index.js +25 -0
  9. package/dist/components/input-group/index.cjs +270 -0
  10. package/dist/components/input-group/index.d.cts +44 -0
  11. package/dist/components/input-group/index.d.ts +44 -0
  12. package/dist/components/input-group/index.js +153 -0
  13. package/dist/components/sheet/index.cjs +170 -0
  14. package/dist/components/sheet/index.d.cts +31 -0
  15. package/dist/components/sheet/index.d.ts +31 -0
  16. package/dist/components/sheet/index.js +21 -0
  17. package/dist/components/toggle/index.cjs +81 -0
  18. package/dist/components/toggle/index.d.cts +26 -0
  19. package/dist/components/toggle/index.d.ts +26 -0
  20. package/dist/components/toggle/index.js +9 -0
  21. package/dist/components/tooltip/index.cjs +95 -0
  22. package/dist/components/tooltip/index.d.cts +25 -0
  23. package/dist/components/tooltip/index.d.ts +25 -0
  24. package/dist/components/tooltip/index.js +13 -0
  25. package/dist/index.d.cts +11 -105
  26. package/dist/index.d.ts +11 -105
  27. package/dist/index.js +93 -399
  28. package/package.json +200 -8
  29. package/CHANGELOG.md +0 -230
  30. package/postcss.config.mjs +0 -6
  31. package/registry.json +0 -64
  32. package/src/components/accordion/config.ts +0 -28
  33. package/src/components/accordion/index.tsx +0 -80
  34. package/src/components/alert/config.ts +0 -40
  35. package/src/components/alert/index.tsx +0 -80
  36. package/src/components/alert-dialog/config.ts +0 -28
  37. package/src/components/alert-dialog/index.tsx +0 -188
  38. package/src/components/aspect-ratio/config.ts +0 -27
  39. package/src/components/aspect-ratio/index.tsx +0 -24
  40. package/src/components/avatar/config.ts +0 -46
  41. package/src/components/avatar/index.tsx +0 -67
  42. package/src/components/badge/config.ts +0 -56
  43. package/src/components/badge/index.tsx +0 -56
  44. package/src/components/breadcrumb/config.ts +0 -121
  45. package/src/components/breadcrumb/index.tsx +0 -127
  46. package/src/components/button/config.ts +0 -97
  47. package/src/components/button/index.tsx +0 -86
  48. package/src/components/button-group/config.ts +0 -39
  49. package/src/components/button-group/index.tsx +0 -99
  50. package/src/components/card/config.ts +0 -89
  51. package/src/components/card/index.tsx +0 -90
  52. package/src/components/checkbox/config.ts +0 -46
  53. package/src/components/checkbox/index.tsx +0 -41
  54. package/src/components/collapsible/config.ts +0 -27
  55. package/src/components/collapsible/index.tsx +0 -47
  56. package/src/components/context-menu/config.ts +0 -28
  57. package/src/components/context-menu/index.tsx +0 -271
  58. package/src/components/dialog/config.ts +0 -582
  59. package/src/components/dialog/index.tsx +0 -162
  60. package/src/components/direction/config.ts +0 -28
  61. package/src/components/direction/index.tsx +0 -27
  62. package/src/components/drawer/config.ts +0 -28
  63. package/src/components/drawer/index.tsx +0 -153
  64. package/src/components/dropdown/config.ts +0 -262
  65. package/src/components/dropdown/index.tsx +0 -280
  66. package/src/components/empty/config.ts +0 -38
  67. package/src/components/empty/index.tsx +0 -127
  68. package/src/components/field/config.ts +0 -40
  69. package/src/components/field/index.tsx +0 -252
  70. package/src/components/hover-card/config.ts +0 -27
  71. package/src/components/hover-card/index.tsx +0 -56
  72. package/src/components/input/config.ts +0 -64
  73. package/src/components/input/index.tsx +0 -32
  74. package/src/components/input-group/config.ts +0 -209
  75. package/src/components/input-group/index.tsx +0 -177
  76. package/src/components/item/config.ts +0 -52
  77. package/src/components/item/index.tsx +0 -215
  78. package/src/components/kbd/config.ts +0 -38
  79. package/src/components/kbd/index.tsx +0 -40
  80. package/src/components/label/config.ts +0 -72
  81. package/src/components/label/index.tsx +0 -32
  82. package/src/components/menubar/config.ts +0 -28
  83. package/src/components/menubar/index.tsx +0 -295
  84. package/src/components/native-select/config.ts +0 -40
  85. package/src/components/native-select/index.tsx +0 -40
  86. package/src/components/navigation-menu/config.ts +0 -32
  87. package/src/components/navigation-menu/index.tsx +0 -188
  88. package/src/components/popover/config.ts +0 -222
  89. package/src/components/popover/index.tsx +0 -60
  90. package/src/components/progress/config.ts +0 -42
  91. package/src/components/progress/index.tsx +0 -39
  92. package/src/components/radio-group/config.ts +0 -303
  93. package/src/components/radio-group/index.tsx +0 -58
  94. package/src/components/resizable/config.ts +0 -28
  95. package/src/components/resizable/index.tsx +0 -67
  96. package/src/components/scroll-area/config.ts +0 -17
  97. package/src/components/scroll-area/index.tsx +0 -70
  98. package/src/components/select/config.ts +0 -277
  99. package/src/components/select/index.tsx +0 -202
  100. package/src/components/separator/config.ts +0 -63
  101. package/src/components/separator/index.tsx +0 -38
  102. package/src/components/sheet/config.ts +0 -16
  103. package/src/components/sheet/index.tsx +0 -153
  104. package/src/components/skeleton/config.ts +0 -77
  105. package/src/components/skeleton/index.tsx +0 -22
  106. package/src/components/slider/config.ts +0 -46
  107. package/src/components/slider/index.tsx +0 -76
  108. package/src/components/sonner/config.ts +0 -27
  109. package/src/components/sonner/index.tsx +0 -37
  110. package/src/components/spinner/config.ts +0 -40
  111. package/src/components/spinner/index.tsx +0 -30
  112. package/src/components/switch/config.ts +0 -171
  113. package/src/components/switch/index.tsx +0 -40
  114. package/src/components/table/config.ts +0 -38
  115. package/src/components/table/index.tsx +0 -135
  116. package/src/components/tabs/config.ts +0 -335
  117. package/src/components/tabs/index.tsx +0 -82
  118. package/src/components/textarea/config.ts +0 -117
  119. package/src/components/textarea/index.tsx +0 -26
  120. package/src/components/toggle/config.ts +0 -67
  121. package/src/components/toggle/index.tsx +0 -59
  122. package/src/components/toggle-group/config.ts +0 -46
  123. package/src/components/toggle-group/index.tsx +0 -106
  124. package/src/components/tooltip/config.ts +0 -16
  125. package/src/components/tooltip/index.tsx +0 -75
  126. package/src/components/typography/config.ts +0 -38
  127. package/src/components/typography/index.tsx +0 -172
  128. package/src/index.ts +0 -291
  129. package/tsconfig.json +0 -9
  130. package/tsconfig.lint.json +0 -8
  131. package/tsup.config.ts +0 -55
@@ -1,582 +0,0 @@
1
- import type { ComponentConfig } from '@foundrykit/types';
2
-
3
- export const dialogConfig: ComponentConfig = {
4
- name: 'Dialog',
5
- description: 'A modal dialog component for displaying content in an overlay',
6
- category: 'primitives',
7
- tags: ['overlay', 'modal', 'interactive', 'accessible'],
8
- preview: {
9
- type: 'static',
10
- html: '<div class="flex h-12 w-full items-center justify-center rounded-md bg-gray-200"><div class="flex h-9 items-center justify-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm">Open Dialog</div></div>',
11
- },
12
- variants: [
13
- {
14
- name: 'Basic',
15
- description: 'Basic dialog with title and description',
16
- code: `<Dialog>
17
- <DialogTrigger asChild>
18
- <Button variant="outline">Open Dialog</Button>
19
- </DialogTrigger>
20
- <DialogContent>
21
- <DialogHeader>
22
- <DialogTitle>Dialog Title</DialogTitle>
23
- <DialogDescription>
24
- This is a basic dialog example with a title and description.
25
- </DialogDescription>
26
- </DialogHeader>
27
- <DialogFooter>
28
- <Button type="submit">Save changes</Button>
29
- </DialogFooter>
30
- </DialogContent>
31
- </Dialog>`,
32
- preview: {
33
- type: 'component',
34
- component: 'Dialog',
35
- props: {
36
- children: [
37
- {
38
- type: 'DialogTrigger',
39
- props: {
40
- asChild: true,
41
- children: {
42
- type: 'Button',
43
- props: {
44
- variant: 'outline',
45
- children: 'Open Dialog',
46
- },
47
- },
48
- },
49
- },
50
- {
51
- type: 'DialogContent',
52
- props: {
53
- children: [
54
- {
55
- type: 'DialogHeader',
56
- props: {
57
- children: [
58
- {
59
- type: 'DialogTitle',
60
- props: { children: 'Dialog Title' },
61
- },
62
- {
63
- type: 'DialogDescription',
64
- props: {
65
- children:
66
- 'This is a basic dialog example with a title and description.',
67
- },
68
- },
69
- ],
70
- },
71
- },
72
- {
73
- type: 'DialogFooter',
74
- props: {
75
- children: {
76
- type: 'Button',
77
- props: {
78
- type: 'submit',
79
- children: 'Save changes',
80
- },
81
- },
82
- },
83
- },
84
- ],
85
- },
86
- },
87
- ],
88
- },
89
- },
90
- },
91
- {
92
- name: 'Form Dialog',
93
- description: 'Dialog containing a form with input fields',
94
- code: `<Dialog>
95
- <DialogTrigger asChild>
96
- <Button>Edit Profile</Button>
97
- </DialogTrigger>
98
- <DialogContent className="sm:max-w-[425px]">
99
- <DialogHeader>
100
- <DialogTitle>Edit Profile</DialogTitle>
101
- <DialogDescription>
102
- Make changes to your profile here. Click save when you're done.
103
- </DialogDescription>
104
- </DialogHeader>
105
- <div className="grid gap-4 py-4">
106
- <div className="grid grid-cols-4 items-center gap-4">
107
- <Label htmlFor="name" className="text-right">
108
- Name
109
- </Label>
110
- <Input id="name" defaultValue="John Doe" className="col-span-3" />
111
- </div>
112
- <div className="grid grid-cols-4 items-center gap-4">
113
- <Label htmlFor="email" className="text-right">
114
- Email
115
- </Label>
116
- <Input
117
- id="email"
118
- type="email"
119
- defaultValue="john@example.com"
120
- className="col-span-3"
121
- />
122
- </div>
123
- </div>
124
- <DialogFooter>
125
- <Button type="submit">Save changes</Button>
126
- </DialogFooter>
127
- </DialogContent>
128
- </Dialog>`,
129
- preview: {
130
- type: 'component',
131
- component: 'Dialog',
132
- props: {
133
- children: [
134
- {
135
- type: 'DialogTrigger',
136
- props: {
137
- asChild: true,
138
- children: {
139
- type: 'Button',
140
- props: { children: 'Edit Profile' },
141
- },
142
- },
143
- },
144
- {
145
- type: 'DialogContent',
146
- props: {
147
- className: 'sm:max-w-[425px]',
148
- children: [
149
- {
150
- type: 'DialogHeader',
151
- props: {
152
- children: [
153
- {
154
- type: 'DialogTitle',
155
- props: { children: 'Edit Profile' },
156
- },
157
- {
158
- type: 'DialogDescription',
159
- props: {
160
- children:
161
- "Make changes to your profile here. Click save when you're done.",
162
- },
163
- },
164
- ],
165
- },
166
- },
167
- {
168
- type: 'div',
169
- props: {
170
- className: 'grid gap-4 py-4',
171
- children: [
172
- {
173
- type: 'div',
174
- props: {
175
- className: 'grid grid-cols-4 items-center gap-4',
176
- children: [
177
- {
178
- type: 'Label',
179
- props: {
180
- htmlFor: 'name',
181
- className: 'text-right',
182
- children: 'Name',
183
- },
184
- },
185
- {
186
- type: 'Input',
187
- props: {
188
- id: 'name',
189
- defaultValue: 'John Doe',
190
- className: 'col-span-3',
191
- },
192
- },
193
- ],
194
- },
195
- },
196
- {
197
- type: 'div',
198
- props: {
199
- className: 'grid grid-cols-4 items-center gap-4',
200
- children: [
201
- {
202
- type: 'Label',
203
- props: {
204
- htmlFor: 'email',
205
- className: 'text-right',
206
- children: 'Email',
207
- },
208
- },
209
- {
210
- type: 'Input',
211
- props: {
212
- id: 'email',
213
- type: 'email',
214
- defaultValue: 'john@example.com',
215
- className: 'col-span-3',
216
- },
217
- },
218
- ],
219
- },
220
- },
221
- ],
222
- },
223
- },
224
- {
225
- type: 'DialogFooter',
226
- props: {
227
- children: {
228
- type: 'Button',
229
- props: {
230
- type: 'submit',
231
- children: 'Save changes',
232
- },
233
- },
234
- },
235
- },
236
- ],
237
- },
238
- },
239
- ],
240
- },
241
- },
242
- },
243
- {
244
- name: 'Confirmation Dialog',
245
- description: 'Dialog for confirming destructive actions',
246
- code: `<Dialog>
247
- <DialogTrigger asChild>
248
- <Button variant="destructive">Delete Account</Button>
249
- </DialogTrigger>
250
- <DialogContent>
251
- <DialogHeader>
252
- <DialogTitle>Are you absolutely sure?</DialogTitle>
253
- <DialogDescription>
254
- This action cannot be undone. This will permanently delete your
255
- account and remove your data from our servers.
256
- </DialogDescription>
257
- </DialogHeader>
258
- <DialogFooter>
259
- <Button variant="outline">Cancel</Button>
260
- <Button variant="destructive">Delete Account</Button>
261
- </DialogFooter>
262
- </DialogContent>
263
- </Dialog>`,
264
- preview: {
265
- type: 'component',
266
- component: 'Dialog',
267
- props: {
268
- children: [
269
- {
270
- type: 'DialogTrigger',
271
- props: {
272
- asChild: true,
273
- children: {
274
- type: 'Button',
275
- props: {
276
- variant: 'destructive',
277
- children: 'Delete Account',
278
- },
279
- },
280
- },
281
- },
282
- {
283
- type: 'DialogContent',
284
- props: {
285
- children: [
286
- {
287
- type: 'DialogHeader',
288
- props: {
289
- children: [
290
- {
291
- type: 'DialogTitle',
292
- props: { children: 'Are you absolutely sure?' },
293
- },
294
- {
295
- type: 'DialogDescription',
296
- props: {
297
- children:
298
- 'This action cannot be undone. This will permanently delete your account and remove your data from our servers.',
299
- },
300
- },
301
- ],
302
- },
303
- },
304
- {
305
- type: 'DialogFooter',
306
- props: {
307
- children: [
308
- {
309
- type: 'Button',
310
- props: {
311
- variant: 'outline',
312
- children: 'Cancel',
313
- },
314
- },
315
- {
316
- type: 'Button',
317
- props: {
318
- variant: 'destructive',
319
- children: 'Delete Account',
320
- },
321
- },
322
- ],
323
- },
324
- },
325
- ],
326
- },
327
- },
328
- ],
329
- },
330
- },
331
- },
332
- {
333
- name: 'No Close Button',
334
- description: 'Dialog without the default close button',
335
- code: `<Dialog>
336
- <DialogTrigger asChild>
337
- <Button variant="outline">Open Custom Dialog</Button>
338
- </DialogTrigger>
339
- <DialogContent showCloseButton={false}>
340
- <DialogHeader>
341
- <DialogTitle>Custom Dialog</DialogTitle>
342
- <DialogDescription>
343
- This dialog doesn't have the default close button. You must use the footer buttons.
344
- </DialogDescription>
345
- </DialogHeader>
346
- <DialogFooter>
347
- <DialogClose asChild>
348
- <Button variant="outline">Close</Button>
349
- </DialogClose>
350
- <Button>Continue</Button>
351
- </DialogFooter>
352
- </DialogContent>
353
- </Dialog>`,
354
- preview: {
355
- type: 'component',
356
- component: 'Dialog',
357
- props: {
358
- children: [
359
- {
360
- type: 'DialogTrigger',
361
- props: {
362
- asChild: true,
363
- children: {
364
- type: 'Button',
365
- props: {
366
- variant: 'outline',
367
- children: 'Open Custom Dialog',
368
- },
369
- },
370
- },
371
- },
372
- {
373
- type: 'DialogContent',
374
- props: {
375
- showCloseButton: false,
376
- children: [
377
- {
378
- type: 'DialogHeader',
379
- props: {
380
- children: [
381
- {
382
- type: 'DialogTitle',
383
- props: { children: 'Custom Dialog' },
384
- },
385
- {
386
- type: 'DialogDescription',
387
- props: {
388
- children:
389
- "This dialog doesn't have the default close button. You must use the footer buttons.",
390
- },
391
- },
392
- ],
393
- },
394
- },
395
- {
396
- type: 'DialogFooter',
397
- props: {
398
- children: [
399
- {
400
- type: 'DialogClose',
401
- props: {
402
- asChild: true,
403
- children: {
404
- type: 'Button',
405
- props: {
406
- variant: 'outline',
407
- children: 'Close',
408
- },
409
- },
410
- },
411
- },
412
- {
413
- type: 'Button',
414
- props: { children: 'Continue' },
415
- },
416
- ],
417
- },
418
- },
419
- ],
420
- },
421
- },
422
- ],
423
- },
424
- },
425
- },
426
- {
427
- name: 'Large Dialog',
428
- description: 'Dialog with custom size and scrollable content',
429
- code: `<Dialog>
430
- <DialogTrigger asChild>
431
- <Button>View Details</Button>
432
- </DialogTrigger>
433
- <DialogContent className="sm:max-w-[625px] max-h-[80vh] overflow-y-auto">
434
- <DialogHeader>
435
- <DialogTitle>Detailed Information</DialogTitle>
436
- <DialogDescription>
437
- This dialog contains a lot of content and is scrollable.
438
- </DialogDescription>
439
- </DialogHeader>
440
- <div className="space-y-4">
441
- <div>
442
- <h3 className="text-lg font-medium">Section 1</h3>
443
- <p className="text-sm text-muted-foreground">
444
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
445
- tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
446
- veniam, quis nostrud exercitation ullamco laboris.
447
- </p>
448
- </div>
449
- <div>
450
- <h3 className="text-lg font-medium">Section 2</h3>
451
- <p className="text-sm text-muted-foreground">
452
- Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
453
- dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
454
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
455
- </p>
456
- </div>
457
- </div>
458
- <DialogFooter>
459
- <Button variant="outline">Cancel</Button>
460
- <Button>Accept</Button>
461
- </DialogFooter>
462
- </DialogContent>
463
- </Dialog>`,
464
- preview: {
465
- type: 'component',
466
- component: 'Dialog',
467
- props: {
468
- children: [
469
- {
470
- type: 'DialogTrigger',
471
- props: {
472
- asChild: true,
473
- children: {
474
- type: 'Button',
475
- props: { children: 'View Details' },
476
- },
477
- },
478
- },
479
- {
480
- type: 'DialogContent',
481
- props: {
482
- className: 'sm:max-w-[625px] max-h-[80vh] overflow-y-auto',
483
- children: [
484
- {
485
- type: 'DialogHeader',
486
- props: {
487
- children: [
488
- {
489
- type: 'DialogTitle',
490
- props: { children: 'Detailed Information' },
491
- },
492
- {
493
- type: 'DialogDescription',
494
- props: {
495
- children:
496
- 'This dialog contains a lot of content and is scrollable.',
497
- },
498
- },
499
- ],
500
- },
501
- },
502
- {
503
- type: 'div',
504
- props: {
505
- className: 'space-y-4',
506
- children: [
507
- {
508
- type: 'div',
509
- props: {
510
- children: [
511
- {
512
- type: 'h3',
513
- props: {
514
- className: 'text-lg font-medium',
515
- children: 'Section 1',
516
- },
517
- },
518
- {
519
- type: 'p',
520
- props: {
521
- className: 'text-sm text-muted-foreground',
522
- children:
523
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
524
- },
525
- },
526
- ],
527
- },
528
- },
529
- {
530
- type: 'div',
531
- props: {
532
- children: [
533
- {
534
- type: 'h3',
535
- props: {
536
- className: 'text-lg font-medium',
537
- children: 'Section 2',
538
- },
539
- },
540
- {
541
- type: 'p',
542
- props: {
543
- className: 'text-sm text-muted-foreground',
544
- children:
545
- 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.',
546
- },
547
- },
548
- ],
549
- },
550
- },
551
- ],
552
- },
553
- },
554
- {
555
- type: 'DialogFooter',
556
- props: {
557
- children: [
558
- {
559
- type: 'Button',
560
- props: {
561
- variant: 'outline',
562
- children: 'Cancel',
563
- },
564
- },
565
- {
566
- type: 'Button',
567
- props: { children: 'Accept' },
568
- },
569
- ],
570
- },
571
- },
572
- ],
573
- },
574
- },
575
- ],
576
- },
577
- },
578
- },
579
- ],
580
- dependencies: ['utils'],
581
- files: ['components/primitives/dialog/index.tsx'],
582
- };