@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.
- package/CHANGELOG.md +69 -0
- package/dist/index.js +244 -72
- package/package.json +5 -1
- package/templates/accordion/accordion.tsx +5 -1
- package/templates/agent/agent.tsx +35 -18
- package/templates/alert/alert.tsx +345 -0
- package/templates/alert/index.ts +16 -0
- package/templates/alert-dialog/alert-dialog.tsx +14 -3
- package/templates/animated-icon/animated-icon.tsx +1 -0
- package/templates/animated-list/animated-list.tsx +2 -1
- package/templates/animated-tabs/animated-tabs.tsx +4 -0
- package/templates/ask-bar/ask-bar.tsx +1061 -0
- package/templates/ask-bar/index.ts +1 -0
- package/templates/autocomplete/autocomplete.tsx +14 -4
- package/templates/avatar/avatar.tsx +3 -0
- package/templates/badge/badge.tsx +1 -0
- package/templates/breadcrumb/breadcrumb.tsx +606 -0
- package/templates/breadcrumb/index.ts +9 -0
- package/templates/button/button.tsx +1 -0
- package/templates/calendar/calendar.tsx +1155 -0
- package/templates/calendar/index.ts +15 -0
- package/templates/card/card.tsx +6 -1
- package/templates/carousel/carousel.tsx +7 -0
- package/templates/checkbox/checkbox.tsx +1 -0
- package/templates/checkbox-group/checkbox-group.tsx +1 -0
- package/templates/collapsible/collapsible.tsx +3 -1
- package/templates/combobox/combobox.tsx +15 -4
- package/templates/command-items/command-items.tsx +69 -0
- package/templates/command-items/index.ts +1 -0
- package/templates/command-palette/command-palette.tsx +954 -0
- package/templates/command-palette/index.ts +1 -0
- package/templates/compare-slider/compare-slider.tsx +1 -0
- package/templates/comparison-table/comparison-table.tsx +540 -0
- package/templates/comparison-table/index.ts +15 -0
- package/templates/context-menu/context-menu.tsx +61 -14
- package/templates/data-table/data-table.tsx +2077 -0
- package/templates/data-table/index.ts +14 -0
- package/templates/date-picker/date-picker.tsx +527 -0
- package/templates/date-picker/index.ts +2 -0
- package/templates/date-range-picker/date-range-picker.tsx +504 -0
- package/templates/date-range-picker/index.ts +2 -0
- package/templates/detail-list/detail-list.tsx +419 -0
- package/templates/detail-list/index.ts +12 -0
- package/templates/dialog/dialog.tsx +13 -3
- package/templates/drawer/drawer.tsx +19 -6
- package/templates/expandable-card/expandable-card.tsx +5 -1
- package/templates/field/field.tsx +5 -1
- package/templates/fieldset/fieldset.tsx +2 -0
- package/templates/form/form.tsx +1 -0
- package/templates/heat-table/heat-table.tsx +613 -0
- package/templates/heat-table/index.ts +9 -0
- package/templates/hold-to-confirm/hold-to-confirm.tsx +1 -0
- package/templates/input/input.tsx +1 -0
- package/templates/label/label.tsx +1 -0
- package/templates/link/link.tsx +1 -0
- package/templates/load-transition/load-transition.tsx +1 -0
- package/templates/marquee/marquee.tsx +1 -0
- package/templates/menu/menu.tsx +27 -6
- package/templates/menubar/menubar.tsx +15 -3
- package/templates/meter/meter.tsx +5 -1
- package/templates/month-picker/index.ts +1 -0
- package/templates/month-picker/month-picker.tsx +351 -0
- package/templates/navigation-menu/navigation-menu.tsx +13 -2
- package/templates/number-field/number-field.tsx +7 -1
- package/templates/number-ticker/number-ticker.tsx +3 -0
- package/templates/omnibar/index.ts +1 -0
- package/templates/omnibar/omnibar.tsx +1009 -0
- package/templates/otp-field/otp-field.tsx +4 -0
- package/templates/pagination/index.ts +8 -0
- package/templates/pagination/pagination.tsx +389 -0
- package/templates/popover/popover.tsx +19 -5
- package/templates/preview-card/preview-card.tsx +11 -3
- package/templates/progress/progress.tsx +5 -1
- package/templates/progress-ring/progress-ring.tsx +1 -0
- package/templates/radio/radio.tsx +3 -0
- package/templates/scroll-area/scroll-area.tsx +14 -4
- package/templates/scroll-progress/scroll-progress.tsx +1 -0
- package/templates/scroll-reveal/scroll-reveal.tsx +1 -0
- package/templates/select/select.tsx +18 -2
- package/templates/separator/separator.tsx +1 -0
- package/templates/skeleton/skeleton.tsx +1 -0
- package/templates/slider/slider.tsx +7 -0
- package/templates/sortable/sortable.tsx +3 -0
- package/templates/stagger-list/stagger-list.tsx +2 -0
- package/templates/streaming-text/streaming-text.tsx +1 -0
- package/templates/swipeable-row/swipeable-row.tsx +1 -0
- package/templates/switch/switch.tsx +2 -0
- package/templates/table/index.ts +13 -0
- package/templates/table/table.tsx +265 -0
- package/templates/tabs/tabs.tsx +5 -0
- package/templates/text/text.tsx +1 -0
- package/templates/text-morph/text-morph.tsx +2 -0
- package/templates/text-shimmer/text-shimmer.tsx +1 -0
- package/templates/textarea/textarea.tsx +1 -0
- package/templates/time-slots/index.ts +1 -0
- package/templates/time-slots/time-slots.tsx +589 -0
- package/templates/toast/toast.tsx +10 -1
- package/templates/toggle/toggle.tsx +1 -0
- package/templates/toggle-group/toggle-group.tsx +2 -0
- package/templates/toolbar/toolbar.tsx +6 -0
- package/templates/tooltip/tooltip.tsx +9 -3
- package/templates/week-strip/index.ts +1 -0
- package/templates/week-strip/week-strip.tsx +329 -0
- package/templates/year-view/index.ts +1 -0
- 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
|
-
|
|
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",
|