@dinachi/cli 1.0.0 → 1.3.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 (105) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/index.js +244 -72
  3. package/package.json +5 -1
  4. package/templates/accordion/accordion.tsx +5 -1
  5. package/templates/agent/agent.tsx +35 -18
  6. package/templates/alert/alert.tsx +345 -0
  7. package/templates/alert/index.ts +16 -0
  8. package/templates/alert-dialog/alert-dialog.tsx +14 -3
  9. package/templates/animated-icon/animated-icon.tsx +1 -0
  10. package/templates/animated-list/animated-list.tsx +2 -1
  11. package/templates/animated-tabs/animated-tabs.tsx +4 -0
  12. package/templates/ask-bar/ask-bar.tsx +1061 -0
  13. package/templates/ask-bar/index.ts +1 -0
  14. package/templates/autocomplete/autocomplete.tsx +14 -4
  15. package/templates/avatar/avatar.tsx +3 -0
  16. package/templates/badge/badge.tsx +1 -0
  17. package/templates/breadcrumb/breadcrumb.tsx +606 -0
  18. package/templates/breadcrumb/index.ts +9 -0
  19. package/templates/button/button.tsx +1 -0
  20. package/templates/calendar/calendar.tsx +1155 -0
  21. package/templates/calendar/index.ts +15 -0
  22. package/templates/card/card.tsx +6 -1
  23. package/templates/carousel/carousel.tsx +7 -0
  24. package/templates/checkbox/checkbox.tsx +1 -0
  25. package/templates/checkbox-group/checkbox-group.tsx +1 -0
  26. package/templates/collapsible/collapsible.tsx +3 -1
  27. package/templates/combobox/combobox.tsx +15 -4
  28. package/templates/command-items/command-items.tsx +69 -0
  29. package/templates/command-items/index.ts +1 -0
  30. package/templates/command-palette/command-palette.tsx +954 -0
  31. package/templates/command-palette/index.ts +1 -0
  32. package/templates/compare-slider/compare-slider.tsx +1 -0
  33. package/templates/comparison-table/comparison-table.tsx +540 -0
  34. package/templates/comparison-table/index.ts +15 -0
  35. package/templates/context-menu/context-menu.tsx +61 -14
  36. package/templates/data-table/data-table.tsx +2077 -0
  37. package/templates/data-table/index.ts +14 -0
  38. package/templates/date-picker/date-picker.tsx +527 -0
  39. package/templates/date-picker/index.ts +2 -0
  40. package/templates/date-range-picker/date-range-picker.tsx +504 -0
  41. package/templates/date-range-picker/index.ts +2 -0
  42. package/templates/detail-list/detail-list.tsx +419 -0
  43. package/templates/detail-list/index.ts +12 -0
  44. package/templates/dialog/dialog.tsx +13 -3
  45. package/templates/drawer/drawer.tsx +19 -6
  46. package/templates/expandable-card/expandable-card.tsx +5 -1
  47. package/templates/field/field.tsx +5 -1
  48. package/templates/fieldset/fieldset.tsx +2 -0
  49. package/templates/form/form.tsx +1 -0
  50. package/templates/heat-table/heat-table.tsx +613 -0
  51. package/templates/heat-table/index.ts +9 -0
  52. package/templates/hold-to-confirm/hold-to-confirm.tsx +1 -0
  53. package/templates/input/input.tsx +1 -0
  54. package/templates/label/label.tsx +1 -0
  55. package/templates/link/link.tsx +1 -0
  56. package/templates/load-transition/load-transition.tsx +1 -0
  57. package/templates/marquee/marquee.tsx +1 -0
  58. package/templates/menu/menu.tsx +27 -6
  59. package/templates/menubar/menubar.tsx +15 -3
  60. package/templates/meter/meter.tsx +5 -1
  61. package/templates/month-picker/index.ts +1 -0
  62. package/templates/month-picker/month-picker.tsx +351 -0
  63. package/templates/navigation-menu/navigation-menu.tsx +13 -2
  64. package/templates/number-field/number-field.tsx +7 -1
  65. package/templates/number-ticker/number-ticker.tsx +3 -0
  66. package/templates/omnibar/index.ts +1 -0
  67. package/templates/omnibar/omnibar.tsx +1009 -0
  68. package/templates/otp-field/otp-field.tsx +4 -0
  69. package/templates/pagination/index.ts +8 -0
  70. package/templates/pagination/pagination.tsx +389 -0
  71. package/templates/popover/popover.tsx +19 -5
  72. package/templates/preview-card/preview-card.tsx +11 -3
  73. package/templates/progress/progress.tsx +5 -1
  74. package/templates/progress-ring/progress-ring.tsx +1 -0
  75. package/templates/radio/radio.tsx +3 -0
  76. package/templates/scroll-area/scroll-area.tsx +14 -4
  77. package/templates/scroll-progress/scroll-progress.tsx +1 -0
  78. package/templates/scroll-reveal/scroll-reveal.tsx +1 -0
  79. package/templates/select/select.tsx +18 -2
  80. package/templates/separator/separator.tsx +1 -0
  81. package/templates/skeleton/skeleton.tsx +1 -0
  82. package/templates/slider/slider.tsx +7 -0
  83. package/templates/sortable/sortable.tsx +3 -0
  84. package/templates/stagger-list/stagger-list.tsx +2 -0
  85. package/templates/streaming-text/streaming-text.tsx +1 -0
  86. package/templates/swipeable-row/swipeable-row.tsx +1 -0
  87. package/templates/switch/switch.tsx +2 -0
  88. package/templates/table/index.ts +13 -0
  89. package/templates/table/table.tsx +265 -0
  90. package/templates/tabs/tabs.tsx +5 -0
  91. package/templates/text/text.tsx +1 -0
  92. package/templates/text-morph/text-morph.tsx +2 -0
  93. package/templates/text-shimmer/text-shimmer.tsx +1 -0
  94. package/templates/textarea/textarea.tsx +1 -0
  95. package/templates/time-slots/index.ts +1 -0
  96. package/templates/time-slots/time-slots.tsx +589 -0
  97. package/templates/toast/toast.tsx +10 -1
  98. package/templates/toggle/toggle.tsx +1 -0
  99. package/templates/toggle-group/toggle-group.tsx +2 -0
  100. package/templates/toolbar/toolbar.tsx +6 -0
  101. package/templates/tooltip/tooltip.tsx +9 -3
  102. package/templates/week-strip/index.ts +1 -0
  103. package/templates/week-strip/week-strip.tsx +329 -0
  104. package/templates/year-view/index.ts +1 -0
  105. package/templates/year-view/year-view.tsx +362 -0
@@ -0,0 +1 @@
1
+ export * from "./ask-bar"
@@ -42,7 +42,6 @@ const liveOf = (items: Set<HTMLElement>) => Array.from(items, (el) => agentNodeT
42
42
 
43
43
  /** Waits a turn for React to filter, then for the list to be open with every item registered. */
44
44
  async function settled({ list, items }: AutocompleteAgent) {
45
- await new Promise((resolve) => setTimeout(resolve))
46
45
  await waitForAgent(
47
46
  () => list.current?.isConnected && list.current.querySelectorAll('[role="option"]').length === items.size
48
47
  )
@@ -151,13 +150,16 @@ const Autocomplete = AutocompleteRoot as unknown as typeof AutocompletePrimitive
151
150
  const AutocompleteValue = AutocompletePrimitive.Value
152
151
  const AutocompleteCollection = AutocompletePrimitive.Collection
153
152
  const AutocompletePortal = AutocompletePrimitive.Portal
154
- const AutocompleteInputGroup = AutocompletePrimitive.InputGroup
153
+ function AutocompleteInputGroup(props: React.ComponentProps<typeof AutocompletePrimitive.InputGroup>) {
154
+ return <AutocompletePrimitive.InputGroup data-slot="autocomplete-input-group" {...props} />
155
+ }
155
156
 
156
157
  const AutocompleteInput = React.forwardRef<
157
158
  React.ComponentRef<typeof AutocompletePrimitive.Input>,
158
159
  React.ComponentPropsWithoutRef<typeof AutocompletePrimitive.Input>
159
160
  >(({ className, ...props }, ref) => (
160
161
  <AutocompletePrimitive.Input
162
+ data-slot="autocomplete-input"
161
163
  ref={useMergedRef(ref, React.useContext(AutocompleteAgentContext)?.input)}
162
164
  className={cn(
163
165
  "flex h-10 w-full bg-transparent px-3 py-2 text-sm",
@@ -176,6 +178,7 @@ const AutocompleteTrigger = React.forwardRef<
176
178
  React.ComponentPropsWithoutRef<typeof AutocompletePrimitive.Trigger>
177
179
  >(({ className, children, ...props }, ref) => (
178
180
  <AutocompletePrimitive.Trigger
181
+ data-slot="autocomplete-trigger"
179
182
  ref={ref}
180
183
  className={cn(
181
184
  "inline-flex h-10 items-center justify-center px-3",
@@ -199,6 +202,7 @@ const AutocompleteClear = React.forwardRef<
199
202
  React.ComponentPropsWithoutRef<typeof AutocompletePrimitive.Clear>
200
203
  >(({ className, children, ...props }, ref) => (
201
204
  <AutocompletePrimitive.Clear
205
+ data-slot="autocomplete-clear"
202
206
  ref={ref}
203
207
  className={cn(
204
208
  "inline-flex h-8 w-8 items-center justify-center rounded-sm text-muted-foreground",
@@ -221,6 +225,7 @@ const AutocompleteContent = React.forwardRef<
221
225
  const content = (
222
226
  <AutocompletePrimitive.Positioner sideOffset={4}>
223
227
  <AutocompletePrimitive.Popup
228
+ data-slot="autocomplete-content"
224
229
  ref={ref}
225
230
  className={cn(
226
231
  "relative z-50 min-w-[var(--anchor-width)] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
@@ -247,6 +252,7 @@ const AutocompleteList = React.forwardRef<
247
252
  React.ComponentPropsWithoutRef<typeof AutocompletePrimitive.List>
248
253
  >(({ className, ...props }, ref) => (
249
254
  <AutocompletePrimitive.List
255
+ data-slot="autocomplete-list"
250
256
  ref={useMergedRef(ref, React.useContext(AutocompleteAgentContext)?.list)}
251
257
  className={cn("max-h-80 overflow-y-auto p-1", className)}
252
258
  {...props}
@@ -274,6 +280,7 @@ const AutocompleteItem = React.forwardRef<
274
280
 
275
281
  return (
276
282
  <AutocompletePrimitive.Item
283
+ data-slot="autocomplete-item"
277
284
  ref={useMergedRef(ref, element)}
278
285
  className={cn(
279
286
  "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm lg:text-base outline-none",
@@ -294,7 +301,7 @@ const AutocompleteGroup = React.forwardRef<
294
301
  React.ComponentRef<typeof AutocompletePrimitive.Group>,
295
302
  React.ComponentPropsWithoutRef<typeof AutocompletePrimitive.Group>
296
303
  >(({ className, ...props }, ref) => (
297
- <AutocompletePrimitive.Group ref={ref} className={cn(className)} {...props} />
304
+ <AutocompletePrimitive.Group data-slot="autocomplete-group" ref={ref} className={cn(className)} {...props} />
298
305
  ))
299
306
  AutocompleteGroup.displayName = "AutocompleteGroup"
300
307
 
@@ -303,6 +310,7 @@ const AutocompleteGroupLabel = React.forwardRef<
303
310
  React.ComponentPropsWithoutRef<typeof AutocompletePrimitive.GroupLabel>
304
311
  >(({ className, ...props }, ref) => (
305
312
  <AutocompletePrimitive.GroupLabel
313
+ data-slot="autocomplete-group-label"
306
314
  ref={ref}
307
315
  className={cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className)}
308
316
  {...props}
@@ -315,6 +323,7 @@ const AutocompleteEmpty = React.forwardRef<
315
323
  React.ComponentPropsWithoutRef<typeof AutocompletePrimitive.Empty>
316
324
  >(({ className, ...props }, ref) => (
317
325
  <AutocompletePrimitive.Empty
326
+ data-slot="autocomplete-empty"
318
327
  ref={ref}
319
328
  className={cn("p-2 text-center text-sm text-muted-foreground", className)}
320
329
  {...props}
@@ -326,7 +335,7 @@ const AutocompleteStatus = React.forwardRef<
326
335
  React.ComponentRef<typeof AutocompletePrimitive.Status>,
327
336
  React.ComponentPropsWithoutRef<typeof AutocompletePrimitive.Status>
328
337
  >(({ className, ...props }, ref) => (
329
- <AutocompletePrimitive.Status ref={ref} className={cn("sr-only", className)} {...props} />
338
+ <AutocompletePrimitive.Status data-slot="autocomplete-status" ref={ref} className={cn("sr-only", className)} {...props} />
330
339
  ))
331
340
  AutocompleteStatus.displayName = "AutocompleteStatus"
332
341
 
@@ -335,6 +344,7 @@ const AutocompleteSeparator = React.forwardRef<
335
344
  React.ComponentPropsWithoutRef<typeof AutocompletePrimitive.Separator>
336
345
  >(({ className, ...props }, ref) => (
337
346
  <AutocompletePrimitive.Separator
347
+ data-slot="autocomplete-separator"
338
348
  ref={ref}
339
349
  className={cn("-mx-1 my-1 h-px bg-border", className)}
340
350
  {...props}
@@ -25,6 +25,7 @@ const Avatar = React.forwardRef<
25
25
  VariantProps<typeof avatarVariants>
26
26
  >(({ className, size, ...props }, ref) => (
27
27
  <BaseAvatar.Root
28
+ data-slot="avatar"
28
29
  ref={ref}
29
30
  className={cn(avatarVariants({ size }), className)}
30
31
  {...props}
@@ -37,6 +38,7 @@ const AvatarImage = React.forwardRef<
37
38
  React.ComponentPropsWithoutRef<typeof BaseAvatar.Image>
38
39
  >(({ className, ...props }, ref) => (
39
40
  <BaseAvatar.Image
41
+ data-slot="avatar-image"
40
42
  ref={ref}
41
43
  className={cn(
42
44
  "absolute inset-0 z-[1] aspect-square h-full w-full object-cover data-[error]:invisible data-[loading]:invisible",
@@ -52,6 +54,7 @@ const AvatarFallback = React.forwardRef<
52
54
  React.ComponentPropsWithoutRef<typeof BaseAvatar.Fallback>
53
55
  >(({ className, ...props }, ref) => (
54
56
  <BaseAvatar.Fallback
57
+ data-slot="avatar-fallback"
55
58
  ref={ref}
56
59
  className={cn(
57
60
  "absolute inset-0 flex h-full w-full items-center justify-center rounded-full bg-muted",
@@ -68,6 +68,7 @@ const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(
68
68
  ref
69
69
  ) => (
70
70
  <div
71
+ data-slot="badge"
71
72
  ref={ref}
72
73
  className={cn(badgeVariants({ variant, size, rounded }), className)}
73
74
  {...props}