@multicomma/arkcn 0.1.2 → 0.1.3

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 (148) hide show
  1. package/package.json +1 -1
  2. package/registry/index.json +1 -1
  3. package/registry/items/accordion.json +302 -0
  4. package/registry/items/activity-feed.json +408 -0
  5. package/registry/items/alert-dialog.json +676 -0
  6. package/registry/items/alert.json +113 -0
  7. package/registry/items/angle-slider.json +378 -0
  8. package/registry/items/app-shell.json +2654 -1
  9. package/registry/items/aspect-ratio.json +36 -0
  10. package/registry/items/attachment.json +299 -1
  11. package/registry/items/avatar.json +213 -0
  12. package/registry/items/badge.json +44 -0
  13. package/registry/items/breadcrumb.json +191 -0
  14. package/registry/items/bubble.json +146 -0
  15. package/registry/items/button-group.json +110 -0
  16. package/registry/items/button.json +52 -0
  17. package/registry/items/calendar.json +499 -1
  18. package/registry/items/canvas.json +446 -1
  19. package/registry/items/card.json +192 -0
  20. package/registry/items/carousel.json +208 -1
  21. package/registry/items/cascader.json +797 -1
  22. package/registry/items/chart.json +1764 -1
  23. package/registry/items/chat.json +993 -0
  24. package/registry/items/checkbox.json +503 -0
  25. package/registry/items/clipboard.json +308 -0
  26. package/registry/items/collapsible.json +226 -0
  27. package/registry/items/color-picker.json +1261 -0
  28. package/registry/items/combobox.json +1123 -1
  29. package/registry/items/command.json +837 -1
  30. package/registry/items/comment-thread.json +952 -1
  31. package/registry/items/context-menu.json +1344 -1
  32. package/registry/items/data-grid.json +449 -1
  33. package/registry/items/data-table.json +1310 -1
  34. package/registry/items/date-input.json +476 -0
  35. package/registry/items/dialog.json +592 -0
  36. package/registry/items/direction.json +29 -1
  37. package/registry/items/drawer.json +797 -0
  38. package/registry/items/dropdown-menu.json +1311 -1
  39. package/registry/items/editable.json +503 -0
  40. package/registry/items/empty.json +166 -0
  41. package/registry/items/field.json +286 -1
  42. package/registry/items/file-upload.json +638 -0
  43. package/registry/items/floating-panel.json +720 -0
  44. package/registry/items/floating-toolbar.json +43 -0
  45. package/registry/items/format.json +109 -0
  46. package/registry/items/gantt.json +773 -1
  47. package/registry/items/hooks/use-mobile.json +1 -0
  48. package/registry/items/hotkeys.json +99 -1
  49. package/registry/items/hover-card.json +357 -0
  50. package/registry/items/image-cropper.json +431 -0
  51. package/registry/items/input-group.json +189 -0
  52. package/registry/items/input-otp.json +181 -0
  53. package/registry/items/input.json +28 -0
  54. package/registry/items/item.json +308 -0
  55. package/registry/items/json-tree-view.json +336 -0
  56. package/registry/items/kanban.json +624 -1
  57. package/registry/items/kbd.json +54 -0
  58. package/registry/items/label.json +28 -0
  59. package/registry/items/lib/controllable.json +1 -0
  60. package/registry/items/lib/data-table-adapter.json +1 -0
  61. package/registry/items/lib/drag-preview.json +1 -0
  62. package/registry/items/lib/form.json +1 -0
  63. package/registry/items/lib/history.json +1 -0
  64. package/registry/items/lib/row-layout.json +1 -0
  65. package/registry/items/lib/table.json +1 -0
  66. package/registry/items/lib/time.json +1 -0
  67. package/registry/items/lib/utils.json +1 -0
  68. package/registry/items/live-region.json +43 -0
  69. package/registry/items/marker.json +96 -0
  70. package/registry/items/marquee.json +300 -0
  71. package/registry/items/menubar.json +1282 -1
  72. package/registry/items/message.json +166 -0
  73. package/registry/items/navigation-menu.json +561 -1
  74. package/registry/items/node-graph.json +1037 -1
  75. package/registry/items/number-input.json +519 -0
  76. package/registry/items/pagination.json +244 -1
  77. package/registry/items/password-input.json +311 -0
  78. package/registry/items/popconfirm.json +566 -0
  79. package/registry/items/popover.json +615 -0
  80. package/registry/items/progress.json +516 -0
  81. package/registry/items/qr-code.json +249 -0
  82. package/registry/items/query-builder.json +1368 -1
  83. package/registry/items/radio-group.json +362 -0
  84. package/registry/items/rating-group.json +304 -0
  85. package/registry/items/resizable.json +242 -1
  86. package/registry/items/rich-text-editor.json +934 -1
  87. package/registry/items/scheduler.json +1013 -1
  88. package/registry/items/scroll-area.json +227 -0
  89. package/registry/items/segment-group.json +363 -0
  90. package/registry/items/select.json +956 -0
  91. package/registry/items/separator.json +45 -1
  92. package/registry/items/sheet.json +592 -0
  93. package/registry/items/sidebar.json +785 -1
  94. package/registry/items/signature-pad.json +330 -0
  95. package/registry/items/skeleton.json +28 -0
  96. package/registry/items/slider.json +799 -0
  97. package/registry/items/sonner.json +135 -0
  98. package/registry/items/spinner.json +28 -0
  99. package/registry/items/steps.json +483 -0
  100. package/registry/items/swap.json +107 -0
  101. package/registry/items/switch.json +362 -0
  102. package/registry/items/table.json +210 -0
  103. package/registry/items/tabs.json +326 -0
  104. package/registry/items/tags-input.json +640 -0
  105. package/registry/items/textarea.json +28 -0
  106. package/registry/items/timer.json +289 -0
  107. package/registry/items/toc.json +372 -0
  108. package/registry/items/toggle-group.json +214 -1
  109. package/registry/items/toggle.json +124 -0
  110. package/registry/items/tooltip.json +417 -0
  111. package/registry/items/tour.json +498 -0
  112. package/registry/items/transfer-list.json +609 -1
  113. package/registry/items/tree-select.json +742 -1
  114. package/registry/items/tree-view.json +794 -0
  115. package/registry/items/virtual-list.json +214 -1
  116. package/src/components/ui/app-shell.tsx +11 -0
  117. package/src/components/ui/attachment.tsx +1 -0
  118. package/src/components/ui/calendar.tsx +1 -0
  119. package/src/components/ui/canvas.tsx +8 -0
  120. package/src/components/ui/carousel.tsx +3 -0
  121. package/src/components/ui/cascader.tsx +1 -0
  122. package/src/components/ui/chart.tsx +10 -0
  123. package/src/components/ui/combobox.tsx +3 -0
  124. package/src/components/ui/command.tsx +1 -0
  125. package/src/components/ui/comment-thread.tsx +11 -0
  126. package/src/components/ui/context-menu.tsx +6 -0
  127. package/src/components/ui/data-grid.tsx +8 -0
  128. package/src/components/ui/data-table.tsx +6 -0
  129. package/src/components/ui/direction.tsx +2 -0
  130. package/src/components/ui/dropdown-menu.tsx +6 -0
  131. package/src/components/ui/field.tsx +1 -0
  132. package/src/components/ui/gantt.tsx +15 -0
  133. package/src/components/ui/hotkeys.tsx +3 -0
  134. package/src/components/ui/kanban.tsx +3 -0
  135. package/src/components/ui/menubar.tsx +6 -0
  136. package/src/components/ui/navigation-menu.tsx +1 -0
  137. package/src/components/ui/node-graph.tsx +23 -0
  138. package/src/components/ui/pagination.tsx +1 -0
  139. package/src/components/ui/query-builder.tsx +7 -0
  140. package/src/components/ui/resizable.tsx +1 -0
  141. package/src/components/ui/rich-text-editor.tsx +54 -0
  142. package/src/components/ui/scheduler.tsx +26 -0
  143. package/src/components/ui/separator.tsx +1 -0
  144. package/src/components/ui/sidebar.tsx +5 -0
  145. package/src/components/ui/toggle-group.tsx +3 -0
  146. package/src/components/ui/transfer-list.tsx +11 -0
  147. package/src/components/ui/tree-select.tsx +5 -0
  148. package/src/components/ui/virtual-list.tsx +7 -0
@@ -5,6 +5,42 @@
5
5
  "exports": [
6
6
  "AspectRatio"
7
7
  ],
8
+ "parts": [
9
+ {
10
+ "name": "AspectRatio",
11
+ "props": [
12
+ {
13
+ "name": "ratio",
14
+ "type": "number",
15
+ "required": false,
16
+ "default": "1 / 1",
17
+ "description": "Width divided by height, e.g. `16 / 9`.",
18
+ "from": "arkcn"
19
+ },
20
+ {
21
+ "name": "children",
22
+ "type": "ReactNode",
23
+ "required": false,
24
+ "description": "Content rendered inside the part.",
25
+ "from": "@types/react"
26
+ },
27
+ {
28
+ "name": "className",
29
+ "type": "string",
30
+ "required": false,
31
+ "description": "Extra classes merged into the part's own classes with `cn`.",
32
+ "from": "@types/react"
33
+ },
34
+ {
35
+ "name": "style",
36
+ "type": "CSSProperties",
37
+ "required": false,
38
+ "description": "Inline styles applied to the rendered element.",
39
+ "from": "@types/react"
40
+ }
41
+ ]
42
+ }
43
+ ],
8
44
  "dependencies": {},
9
45
  "registryDependencies": [],
10
46
  "files": [
@@ -13,6 +13,304 @@
13
13
  "AttachmentActionTrigger",
14
14
  "AttachmentTrigger"
15
15
  ],
16
+ "parts": [
17
+ {
18
+ "name": "Attachment",
19
+ "props": [
20
+ {
21
+ "name": "orientation",
22
+ "type": "\"horizontal\" | \"vertical\" | null",
23
+ "required": false,
24
+ "default": "\"horizontal\"",
25
+ "description": "Layout direction of the part.",
26
+ "from": "arkcn"
27
+ },
28
+ {
29
+ "name": "size",
30
+ "type": "\"default\" | \"xs\" | \"sm\" | null",
31
+ "required": false,
32
+ "default": "\"default\"",
33
+ "description": "Size variant; sets a `data-size` attribute.",
34
+ "from": "arkcn"
35
+ },
36
+ {
37
+ "name": "state",
38
+ "type": "\"done\" | \"idle\" | \"uploading\" | \"processing\" | \"error\"",
39
+ "required": false,
40
+ "default": "\"done\"",
41
+ "description": "Upload state: `idle`, `uploading`, `processing`, `error`, or `done`; sets `data-state`.",
42
+ "from": "arkcn"
43
+ },
44
+ {
45
+ "name": "children",
46
+ "type": "ReactNode",
47
+ "required": false,
48
+ "description": "Content rendered inside the part.",
49
+ "from": "@types/react"
50
+ },
51
+ {
52
+ "name": "className",
53
+ "type": "string",
54
+ "required": false,
55
+ "description": "Extra classes merged into the part's own classes with `cn`.",
56
+ "from": "@types/react"
57
+ },
58
+ {
59
+ "name": "style",
60
+ "type": "CSSProperties",
61
+ "required": false,
62
+ "description": "Inline styles applied to the rendered element.",
63
+ "from": "@types/react"
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "name": "AttachmentGroup",
69
+ "props": [
70
+ {
71
+ "name": "children",
72
+ "type": "ReactNode",
73
+ "required": false,
74
+ "description": "Content rendered inside the part.",
75
+ "from": "@types/react"
76
+ },
77
+ {
78
+ "name": "className",
79
+ "type": "string",
80
+ "required": false,
81
+ "description": "Extra classes merged into the part's own classes with `cn`.",
82
+ "from": "@types/react"
83
+ },
84
+ {
85
+ "name": "style",
86
+ "type": "CSSProperties",
87
+ "required": false,
88
+ "description": "Inline styles applied to the rendered element.",
89
+ "from": "@types/react"
90
+ }
91
+ ]
92
+ },
93
+ {
94
+ "name": "AttachmentMedia",
95
+ "props": [
96
+ {
97
+ "name": "variant",
98
+ "type": "\"image\" | \"icon\" | null",
99
+ "required": false,
100
+ "default": "\"icon\"",
101
+ "description": "Visual variant, styled with `cva`; sets a `data-variant` attribute.",
102
+ "from": "arkcn"
103
+ },
104
+ {
105
+ "name": "children",
106
+ "type": "ReactNode",
107
+ "required": false,
108
+ "description": "Content rendered inside the part.",
109
+ "from": "@types/react"
110
+ },
111
+ {
112
+ "name": "className",
113
+ "type": "string",
114
+ "required": false,
115
+ "description": "Extra classes merged into the part's own classes with `cn`.",
116
+ "from": "@types/react"
117
+ },
118
+ {
119
+ "name": "style",
120
+ "type": "CSSProperties",
121
+ "required": false,
122
+ "description": "Inline styles applied to the rendered element.",
123
+ "from": "@types/react"
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "name": "AttachmentContent",
129
+ "props": [
130
+ {
131
+ "name": "children",
132
+ "type": "ReactNode",
133
+ "required": false,
134
+ "description": "Content rendered inside the part.",
135
+ "from": "@types/react"
136
+ },
137
+ {
138
+ "name": "className",
139
+ "type": "string",
140
+ "required": false,
141
+ "description": "Extra classes merged into the part's own classes with `cn`.",
142
+ "from": "@types/react"
143
+ },
144
+ {
145
+ "name": "style",
146
+ "type": "CSSProperties",
147
+ "required": false,
148
+ "description": "Inline styles applied to the rendered element.",
149
+ "from": "@types/react"
150
+ }
151
+ ]
152
+ },
153
+ {
154
+ "name": "AttachmentTitle",
155
+ "props": [
156
+ {
157
+ "name": "children",
158
+ "type": "ReactNode",
159
+ "required": false,
160
+ "description": "Content rendered inside the part.",
161
+ "from": "@types/react"
162
+ },
163
+ {
164
+ "name": "className",
165
+ "type": "string",
166
+ "required": false,
167
+ "description": "Extra classes merged into the part's own classes with `cn`.",
168
+ "from": "@types/react"
169
+ },
170
+ {
171
+ "name": "style",
172
+ "type": "CSSProperties",
173
+ "required": false,
174
+ "description": "Inline styles applied to the rendered element.",
175
+ "from": "@types/react"
176
+ }
177
+ ]
178
+ },
179
+ {
180
+ "name": "AttachmentDescription",
181
+ "props": [
182
+ {
183
+ "name": "children",
184
+ "type": "ReactNode",
185
+ "required": false,
186
+ "description": "Content rendered inside the part.",
187
+ "from": "@types/react"
188
+ },
189
+ {
190
+ "name": "className",
191
+ "type": "string",
192
+ "required": false,
193
+ "description": "Extra classes merged into the part's own classes with `cn`.",
194
+ "from": "@types/react"
195
+ },
196
+ {
197
+ "name": "style",
198
+ "type": "CSSProperties",
199
+ "required": false,
200
+ "description": "Inline styles applied to the rendered element.",
201
+ "from": "@types/react"
202
+ }
203
+ ]
204
+ },
205
+ {
206
+ "name": "AttachmentActions",
207
+ "props": [
208
+ {
209
+ "name": "children",
210
+ "type": "ReactNode",
211
+ "required": false,
212
+ "description": "Content rendered inside the part.",
213
+ "from": "@types/react"
214
+ },
215
+ {
216
+ "name": "className",
217
+ "type": "string",
218
+ "required": false,
219
+ "description": "Extra classes merged into the part's own classes with `cn`.",
220
+ "from": "@types/react"
221
+ },
222
+ {
223
+ "name": "style",
224
+ "type": "CSSProperties",
225
+ "required": false,
226
+ "description": "Inline styles applied to the rendered element.",
227
+ "from": "@types/react"
228
+ }
229
+ ]
230
+ },
231
+ {
232
+ "name": "AttachmentActionTrigger",
233
+ "props": [
234
+ {
235
+ "name": "asChild",
236
+ "type": "boolean",
237
+ "required": false,
238
+ "description": "Render the child element instead of the default one, merging props and behaviour onto it.",
239
+ "from": "arkcn"
240
+ },
241
+ {
242
+ "name": "size",
243
+ "type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\" | null",
244
+ "required": false,
245
+ "default": "\"icon-xs\"",
246
+ "description": "Size variant; sets a `data-size` attribute.",
247
+ "from": "arkcn"
248
+ },
249
+ {
250
+ "name": "variant",
251
+ "type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | null",
252
+ "required": false,
253
+ "description": "Visual variant, styled with `cva`; sets a `data-variant` attribute.",
254
+ "from": "arkcn"
255
+ },
256
+ {
257
+ "name": "children",
258
+ "type": "ReactNode",
259
+ "required": false,
260
+ "description": "Content rendered inside the part.",
261
+ "from": "@types/react"
262
+ },
263
+ {
264
+ "name": "className",
265
+ "type": "string",
266
+ "required": false,
267
+ "description": "Extra classes merged into the part's own classes with `cn`.",
268
+ "from": "@types/react"
269
+ },
270
+ {
271
+ "name": "style",
272
+ "type": "CSSProperties",
273
+ "required": false,
274
+ "description": "Inline styles applied to the rendered element.",
275
+ "from": "@types/react"
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "name": "AttachmentTrigger",
281
+ "props": [
282
+ {
283
+ "name": "asChild",
284
+ "type": "boolean",
285
+ "required": false,
286
+ "default": "false",
287
+ "description": "Render the child element instead of the default one, merging props and behaviour onto it.",
288
+ "from": "arkcn"
289
+ },
290
+ {
291
+ "name": "children",
292
+ "type": "ReactNode",
293
+ "required": false,
294
+ "description": "Content rendered inside the part.",
295
+ "from": "@types/react"
296
+ },
297
+ {
298
+ "name": "className",
299
+ "type": "string",
300
+ "required": false,
301
+ "description": "Extra classes merged into the part's own classes with `cn`.",
302
+ "from": "@types/react"
303
+ },
304
+ {
305
+ "name": "style",
306
+ "type": "CSSProperties",
307
+ "required": false,
308
+ "description": "Inline styles applied to the rendered element.",
309
+ "from": "@types/react"
310
+ }
311
+ ]
312
+ }
313
+ ],
16
314
  "dependencies": {
17
315
  "@ark-ui/react": "^5.39.1",
18
316
  "class-variance-authority": "^0.7.1"
@@ -24,7 +322,7 @@
24
322
  "files": [
25
323
  {
26
324
  "path": "components/ui/attachment.tsx",
27
- "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@/lib/utils\"\nimport { ark } from \"@ark-ui/react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nconst attachmentVariants = cva(\n \"group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors has-focus-visible:ring-1 has-focus-visible:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed\",\n {\n variants: {\n size: {\n default:\n \"gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2\",\n sm: \"gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5\",\n xs: \"gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1\",\n },\n orientation: {\n horizontal: \"min-w-40 items-center\",\n vertical: \"w-24 flex-col has-data-[slot=attachment-content]:w-30\",\n },\n },\n }\n)\n\nfunction Attachment({\n className,\n state = \"done\",\n size = \"default\",\n orientation = \"horizontal\",\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof attachmentVariants> & {\n state?: \"idle\" | \"uploading\" | \"processing\" | \"error\" | \"done\"\n }) {\n return (\n <div\n data-slot=\"attachment\"\n data-state={state}\n data-size={size}\n data-orientation={orientation}\n className={cn(attachmentVariants({ size, orientation }), className)}\n {...props}\n />\n )\n}\n\nconst attachmentMediaVariants = cva(\n \"relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n variant: {\n icon: \"\",\n image:\n \"opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"icon\",\n },\n }\n)\n\nfunction AttachmentMedia({\n className,\n variant = \"icon\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof attachmentMediaVariants>) {\n return (\n <div\n data-slot=\"attachment-media\"\n data-variant={variant}\n className={cn(attachmentMediaVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction AttachmentContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"attachment-content\"\n className={cn(\n \"max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentTitle({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"attachment-title\"\n className={cn(\n \"block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentDescription({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"attachment-description\"\n className={cn(\n \"mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80\",\n \"max-w-full\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentActions({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"attachment-actions\"\n className={cn(\n \"relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentActionTrigger({\n className,\n variant,\n size = \"icon-xs\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"attachment-action-trigger\"\n variant={variant ?? \"ghost\"}\n size={size}\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AttachmentTrigger({\n className,\n asChild = false,\n type,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n}) {\n const Comp = ark.button\n\n return (\n <Comp\n asChild={asChild}\n data-slot=\"attachment-trigger\"\n type={asChild ? undefined : (type ?? \"button\")}\n className={cn(\"absolute inset-0 z-10 outline-none\", className)}\n {...props}\n />\n )\n}\n\nfunction AttachmentGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"attachment-group\"\n className={cn(\n \"flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Attachment,\n AttachmentGroup,\n AttachmentMedia,\n AttachmentContent,\n AttachmentTitle,\n AttachmentDescription,\n AttachmentActions,\n AttachmentActionTrigger,\n AttachmentTrigger,\n}\n"
325
+ "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@/lib/utils\"\nimport { ark } from \"@ark-ui/react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nconst attachmentVariants = cva(\n \"group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors has-focus-visible:ring-1 has-focus-visible:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed\",\n {\n variants: {\n size: {\n default:\n \"gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2\",\n sm: \"gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5\",\n xs: \"gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1\",\n },\n orientation: {\n horizontal: \"min-w-40 items-center\",\n vertical: \"w-24 flex-col has-data-[slot=attachment-content]:w-30\",\n },\n },\n }\n)\n\nfunction Attachment({\n className,\n state = \"done\",\n size = \"default\",\n orientation = \"horizontal\",\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof attachmentVariants> & {\n /** Upload state: `idle`, `uploading`, `processing`, `error`, or `done`; sets `data-state`. */\n state?: \"idle\" | \"uploading\" | \"processing\" | \"error\" | \"done\"\n }) {\n return (\n <div\n data-slot=\"attachment\"\n data-state={state}\n data-size={size}\n data-orientation={orientation}\n className={cn(attachmentVariants({ size, orientation }), className)}\n {...props}\n />\n )\n}\n\nconst attachmentMediaVariants = cva(\n \"relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n variant: {\n icon: \"\",\n image:\n \"opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"icon\",\n },\n }\n)\n\nfunction AttachmentMedia({\n className,\n variant = \"icon\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof attachmentMediaVariants>) {\n return (\n <div\n data-slot=\"attachment-media\"\n data-variant={variant}\n className={cn(attachmentMediaVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction AttachmentContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"attachment-content\"\n className={cn(\n \"max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentTitle({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"attachment-title\"\n className={cn(\n \"block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentDescription({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"attachment-description\"\n className={cn(\n \"mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80\",\n \"max-w-full\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentActions({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"attachment-actions\"\n className={cn(\n \"relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AttachmentActionTrigger({\n className,\n variant,\n size = \"icon-xs\",\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"attachment-action-trigger\"\n variant={variant ?? \"ghost\"}\n size={size}\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AttachmentTrigger({\n className,\n asChild = false,\n type,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n}) {\n const Comp = ark.button\n\n return (\n <Comp\n asChild={asChild}\n data-slot=\"attachment-trigger\"\n type={asChild ? undefined : (type ?? \"button\")}\n className={cn(\"absolute inset-0 z-10 outline-none\", className)}\n {...props}\n />\n )\n}\n\nfunction AttachmentGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"attachment-group\"\n className={cn(\n \"flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Attachment,\n AttachmentGroup,\n AttachmentMedia,\n AttachmentContent,\n AttachmentTitle,\n AttachmentDescription,\n AttachmentActions,\n AttachmentActionTrigger,\n AttachmentTrigger,\n}\n"
28
326
  }
29
327
  ]
30
328
  }
@@ -12,6 +12,219 @@
12
12
  "AvatarGroupCount",
13
13
  "AvatarImage"
14
14
  ],
15
+ "parts": [
16
+ {
17
+ "name": "Avatar",
18
+ "props": [
19
+ {
20
+ "name": "size",
21
+ "type": "\"default\" | \"sm\" | \"lg\"",
22
+ "required": false,
23
+ "default": "\"default\"",
24
+ "description": "Size variant; sets a `data-size` attribute.",
25
+ "from": "arkcn"
26
+ },
27
+ {
28
+ "name": "asChild",
29
+ "type": "boolean",
30
+ "required": false,
31
+ "description": "Use the provided child element as the default rendered element, combining their props and behavior.",
32
+ "from": "@ark-ui/react"
33
+ },
34
+ {
35
+ "name": "children",
36
+ "type": "ReactNode",
37
+ "required": false,
38
+ "description": "Content rendered inside the part.",
39
+ "from": "@types/react"
40
+ },
41
+ {
42
+ "name": "className",
43
+ "type": "string",
44
+ "required": false,
45
+ "description": "Extra classes merged into the part's own classes with `cn`.",
46
+ "from": "@types/react"
47
+ },
48
+ {
49
+ "name": "ids",
50
+ "type": "ElementIds",
51
+ "required": false,
52
+ "description": "The ids of the elements in the avatar. Useful for composition.",
53
+ "from": "@zag-js/avatar"
54
+ },
55
+ {
56
+ "name": "onStatusChange",
57
+ "type": "((details: StatusChangeDetails) => void)",
58
+ "required": false,
59
+ "description": "Functional called when the image loading status changes.",
60
+ "from": "@zag-js/avatar"
61
+ },
62
+ {
63
+ "name": "style",
64
+ "type": "CSSProperties",
65
+ "required": false,
66
+ "description": "Inline styles applied to the rendered element.",
67
+ "from": "@types/react"
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "name": "AvatarBadge",
73
+ "props": [
74
+ {
75
+ "name": "children",
76
+ "type": "ReactNode",
77
+ "required": false,
78
+ "description": "Content rendered inside the part.",
79
+ "from": "@types/react"
80
+ },
81
+ {
82
+ "name": "className",
83
+ "type": "string",
84
+ "required": false,
85
+ "description": "Extra classes merged into the part's own classes with `cn`.",
86
+ "from": "@types/react"
87
+ },
88
+ {
89
+ "name": "style",
90
+ "type": "CSSProperties",
91
+ "required": false,
92
+ "description": "Inline styles applied to the rendered element.",
93
+ "from": "@types/react"
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "name": "AvatarContext",
99
+ "props": [
100
+ {
101
+ "name": "children",
102
+ "type": "(context: UseAvatarContext) => ReactNode",
103
+ "required": true,
104
+ "description": "Content rendered inside the part.",
105
+ "from": "@ark-ui/react"
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "name": "AvatarFallback",
111
+ "props": [
112
+ {
113
+ "name": "asChild",
114
+ "type": "boolean",
115
+ "required": false,
116
+ "description": "Use the provided child element as the default rendered element, combining their props and behavior.",
117
+ "from": "@ark-ui/react"
118
+ },
119
+ {
120
+ "name": "children",
121
+ "type": "ReactNode",
122
+ "required": false,
123
+ "description": "Content rendered inside the part.",
124
+ "from": "@types/react"
125
+ },
126
+ {
127
+ "name": "className",
128
+ "type": "string",
129
+ "required": false,
130
+ "description": "Extra classes merged into the part's own classes with `cn`.",
131
+ "from": "@types/react"
132
+ },
133
+ {
134
+ "name": "style",
135
+ "type": "CSSProperties",
136
+ "required": false,
137
+ "description": "Inline styles applied to the rendered element.",
138
+ "from": "@types/react"
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "name": "AvatarGroup",
144
+ "props": [
145
+ {
146
+ "name": "children",
147
+ "type": "ReactNode",
148
+ "required": false,
149
+ "description": "Content rendered inside the part.",
150
+ "from": "@types/react"
151
+ },
152
+ {
153
+ "name": "className",
154
+ "type": "string",
155
+ "required": false,
156
+ "description": "Extra classes merged into the part's own classes with `cn`.",
157
+ "from": "@types/react"
158
+ },
159
+ {
160
+ "name": "style",
161
+ "type": "CSSProperties",
162
+ "required": false,
163
+ "description": "Inline styles applied to the rendered element.",
164
+ "from": "@types/react"
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "name": "AvatarGroupCount",
170
+ "props": [
171
+ {
172
+ "name": "children",
173
+ "type": "ReactNode",
174
+ "required": false,
175
+ "description": "Content rendered inside the part.",
176
+ "from": "@types/react"
177
+ },
178
+ {
179
+ "name": "className",
180
+ "type": "string",
181
+ "required": false,
182
+ "description": "Extra classes merged into the part's own classes with `cn`.",
183
+ "from": "@types/react"
184
+ },
185
+ {
186
+ "name": "style",
187
+ "type": "CSSProperties",
188
+ "required": false,
189
+ "description": "Inline styles applied to the rendered element.",
190
+ "from": "@types/react"
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "name": "AvatarImage",
196
+ "props": [
197
+ {
198
+ "name": "asChild",
199
+ "type": "boolean",
200
+ "required": false,
201
+ "description": "Use the provided child element as the default rendered element, combining their props and behavior.",
202
+ "from": "@ark-ui/react"
203
+ },
204
+ {
205
+ "name": "children",
206
+ "type": "ReactNode",
207
+ "required": false,
208
+ "description": "Content rendered inside the part.",
209
+ "from": "@types/react"
210
+ },
211
+ {
212
+ "name": "className",
213
+ "type": "string",
214
+ "required": false,
215
+ "description": "Extra classes merged into the part's own classes with `cn`.",
216
+ "from": "@types/react"
217
+ },
218
+ {
219
+ "name": "style",
220
+ "type": "CSSProperties",
221
+ "required": false,
222
+ "description": "Inline styles applied to the rendered element.",
223
+ "from": "@types/react"
224
+ }
225
+ ]
226
+ }
227
+ ],
15
228
  "dependencies": {
16
229
  "@ark-ui/react": "^5.39.1"
17
230
  },
@@ -6,6 +6,50 @@
6
6
  "Badge",
7
7
  "badgeVariants"
8
8
  ],
9
+ "parts": [
10
+ {
11
+ "name": "Badge",
12
+ "props": [
13
+ {
14
+ "name": "asChild",
15
+ "type": "boolean",
16
+ "required": false,
17
+ "default": "false",
18
+ "description": "Render the child element instead of the default one, merging props and behaviour onto it.",
19
+ "from": "arkcn"
20
+ },
21
+ {
22
+ "name": "variant",
23
+ "type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | null",
24
+ "required": false,
25
+ "default": "\"default\"",
26
+ "description": "Visual variant, styled with `cva`; sets a `data-variant` attribute.",
27
+ "from": "arkcn"
28
+ },
29
+ {
30
+ "name": "children",
31
+ "type": "ReactNode",
32
+ "required": false,
33
+ "description": "Content rendered inside the part.",
34
+ "from": "@types/react"
35
+ },
36
+ {
37
+ "name": "className",
38
+ "type": "string",
39
+ "required": false,
40
+ "description": "Extra classes merged into the part's own classes with `cn`.",
41
+ "from": "@types/react"
42
+ },
43
+ {
44
+ "name": "style",
45
+ "type": "CSSProperties",
46
+ "required": false,
47
+ "description": "Inline styles applied to the rendered element.",
48
+ "from": "@types/react"
49
+ }
50
+ ]
51
+ }
52
+ ],
9
53
  "dependencies": {
10
54
  "@ark-ui/react": "^5.39.1",
11
55
  "class-variance-authority": "^0.7.1"