@dinachi/cli 1.0.0 → 1.1.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 +14 -0
- package/package.json +1 -1
- package/templates/accordion/accordion.tsx +5 -1
- 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/autocomplete/autocomplete.tsx +14 -3
- package/templates/avatar/avatar.tsx +3 -0
- package/templates/badge/badge.tsx +1 -0
- package/templates/button/button.tsx +1 -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 -3
- package/templates/compare-slider/compare-slider.tsx +1 -0
- package/templates/context-menu/context-menu.tsx +61 -14
- 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/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 +19 -3
- package/templates/menubar/menubar.tsx +15 -3
- package/templates/meter/meter.tsx +5 -1
- 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/otp-field/otp-field.tsx +4 -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/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/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
|
@@ -28,20 +28,23 @@ const ScrollArea = React.forwardRef<
|
|
|
28
28
|
ref
|
|
29
29
|
) => (
|
|
30
30
|
<ScrollAreaPrimitive.Root
|
|
31
|
+
data-slot="scroll-area"
|
|
31
32
|
ref={ref}
|
|
32
33
|
className={cn("relative overflow-hidden", className)}
|
|
33
34
|
{...props}
|
|
34
35
|
>
|
|
35
36
|
<ScrollAreaPrimitive.Viewport
|
|
37
|
+
data-slot="scroll-area-viewport"
|
|
36
38
|
className={cn("size-full rounded-[inherit]", viewportClassName)}
|
|
37
39
|
>
|
|
38
|
-
<ScrollAreaPrimitive.Content className="min-w-full">
|
|
40
|
+
<ScrollAreaPrimitive.Content data-slot="scroll-area-content" className="min-w-full">
|
|
39
41
|
{children}
|
|
40
42
|
</ScrollAreaPrimitive.Content>
|
|
41
43
|
</ScrollAreaPrimitive.Viewport>
|
|
42
44
|
|
|
43
45
|
{(orientation === "vertical" || orientation === "both") && (
|
|
44
46
|
<ScrollAreaPrimitive.Scrollbar
|
|
47
|
+
data-slot="scroll-area-scrollbar"
|
|
45
48
|
orientation="vertical"
|
|
46
49
|
className={cn(
|
|
47
50
|
"flex touch-none select-none p-0.5 transition-colors",
|
|
@@ -49,12 +52,13 @@ const ScrollArea = React.forwardRef<
|
|
|
49
52
|
scrollbarClassName
|
|
50
53
|
)}
|
|
51
54
|
>
|
|
52
|
-
<ScrollAreaPrimitive.Thumb className="relative flex-1 rounded-full bg-border" />
|
|
55
|
+
<ScrollAreaPrimitive.Thumb data-slot="scroll-area-thumb" className="relative flex-1 rounded-full bg-border" />
|
|
53
56
|
</ScrollAreaPrimitive.Scrollbar>
|
|
54
57
|
)}
|
|
55
58
|
|
|
56
59
|
{(orientation === "horizontal" || orientation === "both") && (
|
|
57
60
|
<ScrollAreaPrimitive.Scrollbar
|
|
61
|
+
data-slot="scroll-area-scrollbar"
|
|
58
62
|
orientation="horizontal"
|
|
59
63
|
className={cn(
|
|
60
64
|
"flex touch-none select-none p-0.5 transition-colors",
|
|
@@ -62,11 +66,11 @@ const ScrollArea = React.forwardRef<
|
|
|
62
66
|
scrollbarClassName
|
|
63
67
|
)}
|
|
64
68
|
>
|
|
65
|
-
<ScrollAreaPrimitive.Thumb className="relative flex-1 rounded-full bg-border" />
|
|
69
|
+
<ScrollAreaPrimitive.Thumb data-slot="scroll-area-thumb" className="relative flex-1 rounded-full bg-border" />
|
|
66
70
|
</ScrollAreaPrimitive.Scrollbar>
|
|
67
71
|
)}
|
|
68
72
|
|
|
69
|
-
{orientation === "both" && <ScrollAreaPrimitive.Corner className="bg-background" />}
|
|
73
|
+
{orientation === "both" && <ScrollAreaPrimitive.Corner data-slot="scroll-area-corner" className="bg-background" />}
|
|
70
74
|
</ScrollAreaPrimitive.Root>
|
|
71
75
|
)
|
|
72
76
|
)
|
|
@@ -81,6 +85,7 @@ const ScrollAreaRoot = React.forwardRef<
|
|
|
81
85
|
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
|
|
82
86
|
>(({ className, ...props }, ref) => (
|
|
83
87
|
<ScrollAreaPrimitive.Root
|
|
88
|
+
data-slot="scroll-area-root"
|
|
84
89
|
ref={ref}
|
|
85
90
|
className={cn("relative overflow-hidden", className)}
|
|
86
91
|
{...props}
|
|
@@ -93,6 +98,7 @@ const ScrollAreaViewport = React.forwardRef<
|
|
|
93
98
|
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Viewport>
|
|
94
99
|
>(({ className, ...props }, ref) => (
|
|
95
100
|
<ScrollAreaPrimitive.Viewport
|
|
101
|
+
data-slot="scroll-area-viewport"
|
|
96
102
|
ref={ref}
|
|
97
103
|
className={cn("size-full rounded-[inherit]", className)}
|
|
98
104
|
{...props}
|
|
@@ -105,6 +111,7 @@ const ScrollAreaContent = React.forwardRef<
|
|
|
105
111
|
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Content>
|
|
106
112
|
>(({ className, ...props }, ref) => (
|
|
107
113
|
<ScrollAreaPrimitive.Content
|
|
114
|
+
data-slot="scroll-area-content"
|
|
108
115
|
ref={ref}
|
|
109
116
|
className={cn("min-w-full", className)}
|
|
110
117
|
{...props}
|
|
@@ -117,6 +124,7 @@ const ScrollAreaScrollbar = React.forwardRef<
|
|
|
117
124
|
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>
|
|
118
125
|
>(({ className, orientation = "vertical", ...props }, ref) => (
|
|
119
126
|
<ScrollAreaPrimitive.Scrollbar
|
|
127
|
+
data-slot="scroll-area-scrollbar"
|
|
120
128
|
ref={ref}
|
|
121
129
|
orientation={orientation}
|
|
122
130
|
className={cn(
|
|
@@ -136,6 +144,7 @@ const ScrollAreaThumb = React.forwardRef<
|
|
|
136
144
|
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Thumb>
|
|
137
145
|
>(({ className, ...props }, ref) => (
|
|
138
146
|
<ScrollAreaPrimitive.Thumb
|
|
147
|
+
data-slot="scroll-area-thumb"
|
|
139
148
|
ref={ref}
|
|
140
149
|
className={cn("relative flex-1 rounded-full bg-border", className)}
|
|
141
150
|
{...props}
|
|
@@ -148,6 +157,7 @@ const ScrollAreaCorner = React.forwardRef<
|
|
|
148
157
|
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Corner>
|
|
149
158
|
>(({ className, ...props }, ref) => (
|
|
150
159
|
<ScrollAreaPrimitive.Corner
|
|
160
|
+
data-slot="scroll-area-corner"
|
|
151
161
|
ref={ref}
|
|
152
162
|
className={cn("bg-background", className)}
|
|
153
163
|
{...props}
|
|
@@ -127,6 +127,7 @@ const ScrollProgress = React.forwardRef<HTMLDivElement, ScrollProgressProps>(
|
|
|
127
127
|
<motion.div
|
|
128
128
|
ref={ref}
|
|
129
129
|
aria-hidden
|
|
130
|
+
data-slot="scroll-progress"
|
|
130
131
|
style={{ scaleX, ...style }}
|
|
131
132
|
// `will-change-transform` stays on permanently, against the usual advice to hint
|
|
132
133
|
// only imminent motion: this element is transformed on essentially every scroll
|
|
@@ -103,8 +103,13 @@ function Select<Value, Multiple extends boolean | undefined = false>({
|
|
|
103
103
|
)
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
function SelectGroup(props: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
107
|
+
return <SelectPrimitive.Group data-slot="select-group" {...props} />
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
111
|
+
return <SelectPrimitive.Value data-slot="select-value" {...props} />
|
|
112
|
+
}
|
|
108
113
|
|
|
109
114
|
const SelectTrigger = React.forwardRef<
|
|
110
115
|
React.ComponentRef<typeof SelectPrimitive.Trigger>,
|
|
@@ -186,6 +191,7 @@ const SelectTrigger = React.forwardRef<
|
|
|
186
191
|
|
|
187
192
|
return (
|
|
188
193
|
<SelectPrimitive.Trigger
|
|
194
|
+
data-slot="select-trigger"
|
|
189
195
|
ref={mergedRef}
|
|
190
196
|
className={cn(
|
|
191
197
|
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
@@ -229,6 +235,7 @@ const SelectContent = React.forwardRef<
|
|
|
229
235
|
className="z-50"
|
|
230
236
|
>
|
|
231
237
|
<SelectPrimitive.Popup
|
|
238
|
+
data-slot="select-content"
|
|
232
239
|
ref={ref}
|
|
233
240
|
className={cn(
|
|
234
241
|
"relative max-h-96 min-w-[var(--anchor-width)] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
@@ -280,6 +287,7 @@ const SelectBackdrop = React.forwardRef<
|
|
|
280
287
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Backdrop>
|
|
281
288
|
>(({ className, ...props }, ref) => (
|
|
282
289
|
<SelectPrimitive.Backdrop
|
|
290
|
+
data-slot="select-backdrop"
|
|
283
291
|
ref={ref}
|
|
284
292
|
className={cn("fixed inset-0 z-40", className)}
|
|
285
293
|
{...props}
|
|
@@ -292,6 +300,7 @@ const SelectScrollUpArrow = React.forwardRef<
|
|
|
292
300
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpArrow>
|
|
293
301
|
>(({ className, ...props }, ref) => (
|
|
294
302
|
<SelectPrimitive.ScrollUpArrow
|
|
303
|
+
data-slot="select-scroll-up-arrow"
|
|
295
304
|
ref={ref}
|
|
296
305
|
className={cn(
|
|
297
306
|
"flex cursor-default items-center justify-center py-1",
|
|
@@ -309,6 +318,7 @@ const SelectScrollDownArrow = React.forwardRef<
|
|
|
309
318
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownArrow>
|
|
310
319
|
>(({ className, ...props }, ref) => (
|
|
311
320
|
<SelectPrimitive.ScrollDownArrow
|
|
321
|
+
data-slot="select-scroll-down-arrow"
|
|
312
322
|
ref={ref}
|
|
313
323
|
className={cn(
|
|
314
324
|
"flex cursor-default items-center justify-center py-1",
|
|
@@ -326,6 +336,7 @@ const SelectFieldLabel = React.forwardRef<
|
|
|
326
336
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
327
337
|
>(({ className, ...props }, ref) => (
|
|
328
338
|
<SelectPrimitive.Label
|
|
339
|
+
data-slot="select-field-label"
|
|
329
340
|
ref={ref}
|
|
330
341
|
className={cn("block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className)}
|
|
331
342
|
{...props}
|
|
@@ -338,6 +349,7 @@ const SelectLabel = React.forwardRef<
|
|
|
338
349
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.GroupLabel>
|
|
339
350
|
>(({ className, ...props }, ref) => (
|
|
340
351
|
<SelectPrimitive.GroupLabel
|
|
352
|
+
data-slot="select-label"
|
|
341
353
|
ref={ref}
|
|
342
354
|
className={cn("py-1.5 pl-2 pr-2 text-sm font-medium", className)}
|
|
343
355
|
{...props}
|
|
@@ -377,6 +389,7 @@ const SelectItem = React.forwardRef<
|
|
|
377
389
|
|
|
378
390
|
return (
|
|
379
391
|
<SelectPrimitive.Item
|
|
392
|
+
data-slot="select-item"
|
|
380
393
|
ref={mergedRef}
|
|
381
394
|
className={cn(
|
|
382
395
|
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 text-sm outline-none",
|
|
@@ -404,6 +417,7 @@ const SelectItemIndicator = React.forwardRef<
|
|
|
404
417
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ItemIndicator>
|
|
405
418
|
>(({ className, children, ...props }, ref) => (
|
|
406
419
|
<SelectPrimitive.ItemIndicator
|
|
420
|
+
data-slot="select-item-indicator"
|
|
407
421
|
ref={ref}
|
|
408
422
|
className={cn("flex h-3.5 w-3.5 items-center justify-center", className)}
|
|
409
423
|
{...props}
|
|
@@ -418,6 +432,7 @@ const SelectArrow = React.forwardRef<
|
|
|
418
432
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Arrow>
|
|
419
433
|
>(({ className, ...props }, ref) => (
|
|
420
434
|
<SelectPrimitive.Arrow
|
|
435
|
+
data-slot="select-arrow"
|
|
421
436
|
ref={ref}
|
|
422
437
|
className={cn("fill-popover stroke-border", className)}
|
|
423
438
|
{...props}
|
|
@@ -430,6 +445,7 @@ const SelectSeparator = React.forwardRef<
|
|
|
430
445
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
431
446
|
>(({ className, ...props }, ref) => (
|
|
432
447
|
<SelectPrimitive.Separator
|
|
448
|
+
data-slot="select-separator"
|
|
433
449
|
ref={ref}
|
|
434
450
|
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
435
451
|
{...props}
|
|
@@ -9,6 +9,7 @@ const Separator = React.forwardRef<
|
|
|
9
9
|
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive>
|
|
10
10
|
>(({ className, orientation = "horizontal", ...props }, ref) => (
|
|
11
11
|
<SeparatorPrimitive
|
|
12
|
+
data-slot="separator"
|
|
12
13
|
ref={ref}
|
|
13
14
|
orientation={orientation}
|
|
14
15
|
className={cn(
|
|
@@ -74,6 +74,7 @@ const Slider = React.forwardRef<
|
|
|
74
74
|
className={cn("relative flex w-full flex-col gap-2", className)}
|
|
75
75
|
value={value}
|
|
76
76
|
onValueChange={changeValue}
|
|
77
|
+
data-slot="slider"
|
|
77
78
|
{...props}
|
|
78
79
|
/>
|
|
79
80
|
);
|
|
@@ -89,6 +90,7 @@ const SliderValue = React.forwardRef<
|
|
|
89
90
|
>(({ className, ...props }, ref) => (
|
|
90
91
|
<BaseSlider.Value
|
|
91
92
|
ref={ref}
|
|
93
|
+
data-slot="slider-value"
|
|
92
94
|
className={cn("text-sm font-medium", className)}
|
|
93
95
|
{...props}
|
|
94
96
|
/>
|
|
@@ -101,6 +103,7 @@ const SliderControl = React.forwardRef<
|
|
|
101
103
|
>(({ className, ...props }, ref) => (
|
|
102
104
|
<BaseSlider.Control
|
|
103
105
|
ref={ref}
|
|
106
|
+
data-slot="slider-control"
|
|
104
107
|
className={cn("relative flex w-full touch-none select-none items-center", className)}
|
|
105
108
|
{...props}
|
|
106
109
|
/>
|
|
@@ -113,6 +116,7 @@ const SliderTrack = React.forwardRef<
|
|
|
113
116
|
>(({ className, ...props }, ref) => (
|
|
114
117
|
<BaseSlider.Track
|
|
115
118
|
ref={ref}
|
|
119
|
+
data-slot="slider-track"
|
|
116
120
|
className={cn(
|
|
117
121
|
"relative h-2 w-full grow rounded-full bg-secondary shadow-[inset_0_0_0_1px] shadow-secondary-foreground/5",
|
|
118
122
|
className
|
|
@@ -128,6 +132,7 @@ const SliderRange = React.forwardRef<
|
|
|
128
132
|
>(({ className, ...props }, ref) => (
|
|
129
133
|
<BaseSlider.Indicator
|
|
130
134
|
ref={ref}
|
|
135
|
+
data-slot="slider-range"
|
|
131
136
|
className={cn("absolute h-full bg-primary rounded-full", className)}
|
|
132
137
|
{...props}
|
|
133
138
|
/>
|
|
@@ -140,6 +145,7 @@ const SliderThumb = React.forwardRef<
|
|
|
140
145
|
>(({ className, inputRef, ...props }, ref) => (
|
|
141
146
|
<BaseSlider.Thumb
|
|
142
147
|
ref={ref}
|
|
148
|
+
data-slot="slider-thumb"
|
|
143
149
|
inputRef={useMergedRef(inputRef, useHasAgent() ? hideFromAgent : undefined)}
|
|
144
150
|
className={cn(
|
|
145
151
|
"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background",
|
|
@@ -160,6 +166,7 @@ const SliderLabel = React.forwardRef<
|
|
|
160
166
|
>(({ className, ...props }, ref) => (
|
|
161
167
|
<BaseSlider.Label
|
|
162
168
|
ref={ref}
|
|
169
|
+
data-slot="slider-label"
|
|
163
170
|
className={cn("block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className)}
|
|
164
171
|
{...props}
|
|
165
172
|
/>
|
|
@@ -208,6 +208,7 @@ const Sortable = React.forwardRef<HTMLUListElement, SortableProps>(
|
|
|
208
208
|
values={value}
|
|
209
209
|
onReorder={(next: string[]) => onValueChange(next, personChange("drag"))}
|
|
210
210
|
data-disabled={disabled ? "" : undefined}
|
|
211
|
+
data-slot="sortable"
|
|
211
212
|
className={cn("list-none space-y-2", className)}
|
|
212
213
|
{...props}
|
|
213
214
|
>
|
|
@@ -278,6 +279,7 @@ const SortableItem = React.forwardRef<HTMLLIElement, SortableItemProps>(
|
|
|
278
279
|
onDragEnd={() => setDragging(false)}
|
|
279
280
|
animate={{ scale: lifted && !list.reducedMotion ? 1.02 : 1 }}
|
|
280
281
|
transition={{ type: "spring", bounce: 0.2, duration: 0.3 }}
|
|
282
|
+
data-slot="sortable-item"
|
|
281
283
|
className={cn(
|
|
282
284
|
"relative flex items-center gap-3 rounded-xl border bg-background px-3 py-3",
|
|
283
285
|
lifted ? "z-10 border-primary/50" : "border-border",
|
|
@@ -370,6 +372,7 @@ const SortableHandle = React.forwardRef<HTMLButtonElement, SortableHandleProps>(
|
|
|
370
372
|
aria-pressed={grabbed}
|
|
371
373
|
disabled={list.disabled}
|
|
372
374
|
data-agent-part={list.labels ? "" : undefined}
|
|
375
|
+
data-slot="sortable-handle"
|
|
373
376
|
onPointerDown={(event) => {
|
|
374
377
|
onPointerDown?.(event)
|
|
375
378
|
if (event.defaultPrevented || list.disabled) return
|
|
@@ -155,6 +155,7 @@ const StaggerList = React.forwardRef<HTMLUListElement, StaggerListProps>(
|
|
|
155
155
|
<StaggerContext.Provider value={contextValue}>
|
|
156
156
|
<motion.ul
|
|
157
157
|
ref={ref}
|
|
158
|
+
data-slot="stagger-list"
|
|
158
159
|
className={cn("list-none", className)}
|
|
159
160
|
variants={containerVariants}
|
|
160
161
|
initial="hidden"
|
|
@@ -190,6 +191,7 @@ const StaggerListItem = React.forwardRef<HTMLLIElement, StaggerListItemProps>(
|
|
|
190
191
|
return (
|
|
191
192
|
<motion.li
|
|
192
193
|
ref={ref}
|
|
194
|
+
data-slot="stagger-list-item"
|
|
193
195
|
className={cn(className)}
|
|
194
196
|
variants={context.itemVariants}
|
|
195
197
|
{...props}
|
|
@@ -45,6 +45,7 @@ const Switch = React.forwardRef<
|
|
|
45
45
|
<span className="relative inline-flex [&>input]:!absolute">
|
|
46
46
|
<SwitchPrimitive.Root
|
|
47
47
|
ref={mergedRef}
|
|
48
|
+
data-slot="switch"
|
|
48
49
|
className={cn(
|
|
49
50
|
"inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-[var(--motion-duration-fast,150ms)]",
|
|
50
51
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
@@ -68,6 +69,7 @@ const SwitchThumb = React.forwardRef<
|
|
|
68
69
|
>(({ className, ...props }, ref) => (
|
|
69
70
|
<SwitchPrimitive.Thumb
|
|
70
71
|
ref={ref}
|
|
72
|
+
data-slot="switch-thumb"
|
|
71
73
|
className={cn(
|
|
72
74
|
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0",
|
|
73
75
|
"transition-transform duration-[var(--motion-duration-fast,150ms)] ease-[var(--motion-ease-out,cubic-bezier(0.23,1,0.32,1))]",
|
package/templates/tabs/tabs.tsx
CHANGED
|
@@ -65,6 +65,7 @@ const Tabs = React.forwardRef<
|
|
|
65
65
|
ref={useMergedRef(ref, element)}
|
|
66
66
|
className={cn("w-full", className)}
|
|
67
67
|
onValueChange={change}
|
|
68
|
+
data-slot="tabs"
|
|
68
69
|
{...props}
|
|
69
70
|
/>
|
|
70
71
|
</TabsAgentContext.Provider>
|
|
@@ -82,6 +83,7 @@ const TabsList = React.forwardRef<
|
|
|
82
83
|
"inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground z-0",
|
|
83
84
|
className
|
|
84
85
|
)}
|
|
86
|
+
data-slot="tabs-list"
|
|
85
87
|
{...props}
|
|
86
88
|
/>
|
|
87
89
|
));
|
|
@@ -107,6 +109,7 @@ const TabsTrigger = React.forwardRef<
|
|
|
107
109
|
"hover:text-foreground",
|
|
108
110
|
className
|
|
109
111
|
)}
|
|
112
|
+
data-slot="tabs-trigger"
|
|
110
113
|
{...props}
|
|
111
114
|
/>
|
|
112
115
|
);
|
|
@@ -124,6 +127,7 @@ const TabsContent = React.forwardRef<
|
|
|
124
127
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
125
128
|
className
|
|
126
129
|
)}
|
|
130
|
+
data-slot="tabs-content"
|
|
127
131
|
{...props}
|
|
128
132
|
/>
|
|
129
133
|
));
|
|
@@ -146,6 +150,7 @@ const TabsIndicator = React.forwardRef<
|
|
|
146
150
|
"motion-reduce:transition-none",
|
|
147
151
|
className
|
|
148
152
|
)}
|
|
153
|
+
data-slot="tabs-indicator"
|
|
149
154
|
{...props}
|
|
150
155
|
/>
|
|
151
156
|
));
|
package/templates/text/text.tsx
CHANGED
|
@@ -186,6 +186,7 @@ const TextMorph = React.forwardRef<HTMLSpanElement, TextMorphProps>(
|
|
|
186
186
|
return (
|
|
187
187
|
<motion.span
|
|
188
188
|
ref={ref}
|
|
189
|
+
data-slot="text-morph"
|
|
189
190
|
className={cn("relative inline-block", className)}
|
|
190
191
|
{...props}
|
|
191
192
|
>
|
|
@@ -210,6 +211,7 @@ const TextMorph = React.forwardRef<HTMLSpanElement, TextMorphProps>(
|
|
|
210
211
|
return (
|
|
211
212
|
<motion.span
|
|
212
213
|
ref={ref}
|
|
214
|
+
data-slot="text-morph"
|
|
213
215
|
layout
|
|
214
216
|
transition={move}
|
|
215
217
|
className={cn(
|
|
@@ -137,6 +137,7 @@ const TextShimmer = React.forwardRef<HTMLSpanElement, TextShimmerProps>(
|
|
|
137
137
|
// as one. It also makes the decorative use of a shimmer feel as wrong in the
|
|
138
138
|
// markup as it is on screen.
|
|
139
139
|
role="status"
|
|
140
|
+
data-slot="text-shimmer"
|
|
140
141
|
className={cn("inline-block", className)}
|
|
141
142
|
style={{ ...shimmerStyle, ...style }}
|
|
142
143
|
{...props}
|
|
@@ -17,6 +17,7 @@ export type ToastViewportProps = React.ComponentProps<
|
|
|
17
17
|
const ToastViewport = React.forwardRef<HTMLDivElement, ToastViewportProps>(
|
|
18
18
|
({ className, ...props }, ref) => (
|
|
19
19
|
<BaseToast.Viewport
|
|
20
|
+
data-slot="toast-viewport"
|
|
20
21
|
ref={ref}
|
|
21
22
|
className={cn(
|
|
22
23
|
"fixed z-10 top-auto right-4 bottom-4 mx-auto flex w-[250px] sm:right-8 sm:bottom-8 sm:w-[300px]",
|
|
@@ -100,6 +101,7 @@ export interface ToastProps
|
|
|
100
101
|
const ToastRoot = React.forwardRef<HTMLDivElement, ToastProps>(
|
|
101
102
|
({ className, variant, ...props }, ref) => (
|
|
102
103
|
<BaseToast.Root
|
|
104
|
+
data-slot="toast-root"
|
|
103
105
|
ref={ref}
|
|
104
106
|
className={cn(toastVariants({ variant }), className)}
|
|
105
107
|
{...props}
|
|
@@ -114,6 +116,7 @@ const ToastTitle = React.forwardRef<
|
|
|
114
116
|
React.ComponentProps<typeof BaseToast.Title>
|
|
115
117
|
>(({ className, ...props }, ref) => (
|
|
116
118
|
<BaseToast.Title
|
|
119
|
+
data-slot="toast-title"
|
|
117
120
|
ref={ref}
|
|
118
121
|
className={cn("text-[0.975rem] leading-5 font-medium", className)}
|
|
119
122
|
{...props}
|
|
@@ -127,6 +130,7 @@ const ToastDescription = React.forwardRef<
|
|
|
127
130
|
React.ComponentProps<typeof BaseToast.Description>
|
|
128
131
|
>(({ className, ...props }, ref) => (
|
|
129
132
|
<BaseToast.Description
|
|
133
|
+
data-slot="toast-description"
|
|
130
134
|
ref={ref}
|
|
131
135
|
className={cn("text-[0.925rem] leading-5 opacity-90", className)}
|
|
132
136
|
{...props}
|
|
@@ -142,6 +146,7 @@ const ToastContent = React.forwardRef<
|
|
|
142
146
|
React.ComponentProps<typeof BaseToast.Content>
|
|
143
147
|
>(({ className, ...props }, ref) => (
|
|
144
148
|
<BaseToast.Content
|
|
149
|
+
data-slot="toast-content"
|
|
145
150
|
ref={ref}
|
|
146
151
|
className={cn(
|
|
147
152
|
"flex items-start gap-3 overflow-hidden pr-6 transition-opacity [transition-duration:250ms]",
|
|
@@ -160,6 +165,7 @@ const ToastAction = React.forwardRef<
|
|
|
160
165
|
React.ComponentProps<typeof BaseToast.Action>
|
|
161
166
|
>(({ className, ...props }, ref) => (
|
|
162
167
|
<BaseToast.Action
|
|
168
|
+
data-slot="toast-action"
|
|
163
169
|
ref={ref}
|
|
164
170
|
className={cn(
|
|
165
171
|
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors",
|
|
@@ -178,6 +184,7 @@ const ToastClose = React.forwardRef<
|
|
|
178
184
|
React.ComponentProps<typeof BaseToast.Close>
|
|
179
185
|
>(({ className, children, ...props }, ref) => (
|
|
180
186
|
<BaseToast.Close
|
|
187
|
+
data-slot="toast-close"
|
|
181
188
|
ref={ref}
|
|
182
189
|
aria-label="Close"
|
|
183
190
|
data-agent-dismiss=""
|
|
@@ -201,6 +208,7 @@ const ToastPositioner = React.forwardRef<
|
|
|
201
208
|
React.ComponentProps<typeof BaseToast.Positioner>
|
|
202
209
|
>(({ className, ...props }, ref) => (
|
|
203
210
|
<BaseToast.Positioner
|
|
211
|
+
data-slot="toast-positioner"
|
|
204
212
|
ref={ref}
|
|
205
213
|
className={cn("z-50", className)}
|
|
206
214
|
{...props}
|
|
@@ -214,6 +222,7 @@ const ToastArrow = React.forwardRef<
|
|
|
214
222
|
React.ComponentProps<typeof BaseToast.Arrow>
|
|
215
223
|
>(({ className, ...props }, ref) => (
|
|
216
224
|
<BaseToast.Arrow
|
|
225
|
+
data-slot="toast-arrow"
|
|
217
226
|
ref={ref}
|
|
218
227
|
className={cn(
|
|
219
228
|
"fill-background [stroke-width:1px] stroke-border",
|
|
@@ -315,7 +324,7 @@ const Toast = React.forwardRef<HTMLDivElement, ToastComponentProps>(
|
|
|
315
324
|
<ToastProvider limit={limit} timeout={timeout} toastManager={toastManager}>
|
|
316
325
|
{children}
|
|
317
326
|
<ToastPortal>
|
|
318
|
-
<ToastViewport ref={ref} className={className} {...props}>
|
|
327
|
+
<ToastViewport data-slot="toast" ref={ref} className={className} {...props}>
|
|
319
328
|
<ToastList renderToast={renderToast} />
|
|
320
329
|
</ToastViewport>
|
|
321
330
|
</ToastPortal>
|
|
@@ -110,6 +110,7 @@ const ToggleGroup = React.forwardRef<
|
|
|
110
110
|
<ToggleAgentContext.Provider value={useHasAgent() ? items : null}>
|
|
111
111
|
<ToggleGroupPrimitive
|
|
112
112
|
ref={mergedRef}
|
|
113
|
+
data-slot="toggle-group"
|
|
113
114
|
className={cn(
|
|
114
115
|
"inline-flex items-center justify-center gap-1",
|
|
115
116
|
"data-[orientation=vertical]:flex-col",
|
|
@@ -138,6 +139,7 @@ const ToggleGroupItem = React.forwardRef<
|
|
|
138
139
|
return (
|
|
139
140
|
<TogglePrimitive
|
|
140
141
|
ref={mergedRef}
|
|
142
|
+
data-slot="toggle-group-item"
|
|
141
143
|
data-agent-part={items ? "" : undefined}
|
|
142
144
|
className={cn(toggleGroupItemVariants({ variant, size }), className)}
|
|
143
145
|
{...props}
|
|
@@ -7,6 +7,7 @@ const ToolbarRoot = React.forwardRef<
|
|
|
7
7
|
React.ComponentProps<typeof BaseToolbar.Root>
|
|
8
8
|
>(({ className, ...props }, ref) => (
|
|
9
9
|
<BaseToolbar.Root
|
|
10
|
+
data-slot="toolbar"
|
|
10
11
|
ref={ref}
|
|
11
12
|
className={cn(
|
|
12
13
|
"flex flex-wrap items-center gap-1 rounded-md border bg-background p-1",
|
|
@@ -23,6 +24,7 @@ const ToolbarButton = React.forwardRef<
|
|
|
23
24
|
React.ComponentProps<typeof BaseToolbar.Button>
|
|
24
25
|
>(({ className, ...props }, ref) => (
|
|
25
26
|
<BaseToolbar.Button
|
|
27
|
+
data-slot="toolbar-button"
|
|
26
28
|
ref={ref}
|
|
27
29
|
className={cn(
|
|
28
30
|
"inline-flex shrink-0 items-center justify-center rounded-sm px-3 py-2 text-sm font-medium transition-colors",
|
|
@@ -42,6 +44,7 @@ const ToolbarLink = React.forwardRef<
|
|
|
42
44
|
React.ComponentProps<typeof BaseToolbar.Link>
|
|
43
45
|
>(({ className, ...props }, ref) => (
|
|
44
46
|
<BaseToolbar.Link
|
|
47
|
+
data-slot="toolbar-link"
|
|
45
48
|
ref={ref}
|
|
46
49
|
className={cn(
|
|
47
50
|
"inline-flex shrink-0 items-center justify-center rounded-sm px-3 py-2 text-sm font-medium transition-colors",
|
|
@@ -60,6 +63,7 @@ const ToolbarSeparator = React.forwardRef<
|
|
|
60
63
|
React.ComponentProps<typeof BaseToolbar.Separator>
|
|
61
64
|
>(({ className, orientation = "vertical", ...props }, ref) => (
|
|
62
65
|
<BaseToolbar.Separator
|
|
66
|
+
data-slot="toolbar-separator"
|
|
63
67
|
ref={ref}
|
|
64
68
|
orientation={orientation}
|
|
65
69
|
className={cn(
|
|
@@ -77,6 +81,7 @@ const ToolbarGroup = React.forwardRef<
|
|
|
77
81
|
React.ComponentProps<typeof BaseToolbar.Group>
|
|
78
82
|
>(({ className, ...props }, ref) => (
|
|
79
83
|
<BaseToolbar.Group
|
|
84
|
+
data-slot="toolbar-group"
|
|
80
85
|
ref={ref}
|
|
81
86
|
className={cn("flex shrink-0 items-center gap-1", className)}
|
|
82
87
|
{...props}
|
|
@@ -89,6 +94,7 @@ const ToolbarInput = React.forwardRef<
|
|
|
89
94
|
React.ComponentProps<typeof BaseToolbar.Input>
|
|
90
95
|
>(({ className, ...props }, ref) => (
|
|
91
96
|
<BaseToolbar.Input
|
|
97
|
+
data-slot="toolbar-input"
|
|
92
98
|
ref={ref}
|
|
93
99
|
className={cn(
|
|
94
100
|
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors",
|
|
@@ -15,12 +15,14 @@ const TooltipTrigger = React.forwardRef<
|
|
|
15
15
|
HTMLButtonElement,
|
|
16
16
|
React.ComponentProps<typeof BaseTooltip.Trigger>
|
|
17
17
|
>(({ className, ...props }, ref) => (
|
|
18
|
-
<BaseTooltip.Trigger ref={ref} className={className} {...props} />
|
|
18
|
+
<BaseTooltip.Trigger ref={ref} className={className} data-slot="tooltip-trigger" {...props} />
|
|
19
19
|
));
|
|
20
20
|
TooltipTrigger.displayName = "TooltipTrigger";
|
|
21
21
|
|
|
22
22
|
// Portal Component
|
|
23
|
-
|
|
23
|
+
function TooltipPortal(props: React.ComponentProps<typeof BaseTooltip.Portal>): React.JSX.Element {
|
|
24
|
+
return <BaseTooltip.Portal data-slot="tooltip-portal" {...props} />;
|
|
25
|
+
}
|
|
24
26
|
|
|
25
27
|
// Positioner Component
|
|
26
28
|
const TooltipPositioner: React.ForwardRefExoticComponent<
|
|
@@ -34,6 +36,7 @@ const TooltipPositioner: React.ForwardRefExoticComponent<
|
|
|
34
36
|
ref={ref}
|
|
35
37
|
sideOffset={sideOffset}
|
|
36
38
|
className={cn("z-50", className)}
|
|
39
|
+
data-slot="tooltip-positioner"
|
|
37
40
|
{...props}
|
|
38
41
|
/>
|
|
39
42
|
));
|
|
@@ -73,6 +76,7 @@ const TooltipPopup: React.ForwardRefExoticComponent<
|
|
|
73
76
|
variantStyles[variant],
|
|
74
77
|
className
|
|
75
78
|
)}
|
|
79
|
+
data-slot="tooltip-popup"
|
|
76
80
|
{...props}
|
|
77
81
|
/>
|
|
78
82
|
);
|
|
@@ -99,6 +103,7 @@ const TooltipArrow: React.ForwardRefExoticComponent<
|
|
|
99
103
|
"data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",
|
|
100
104
|
className
|
|
101
105
|
)}
|
|
106
|
+
data-slot="tooltip-arrow"
|
|
102
107
|
{...props}
|
|
103
108
|
>
|
|
104
109
|
{children || <TooltipArrowSvg variant={variant} />}
|
|
@@ -139,6 +144,7 @@ const TooltipContent: React.ForwardRefExoticComponent<
|
|
|
139
144
|
ref={ref}
|
|
140
145
|
className={className}
|
|
141
146
|
variant={variant}
|
|
147
|
+
data-slot="tooltip-content"
|
|
142
148
|
{...props}
|
|
143
149
|
>
|
|
144
150
|
{showArrow && <TooltipArrow variant={variant} />}
|
|
@@ -164,7 +170,7 @@ const TooltipArrowSvg: React.MemoExoticComponent<
|
|
|
164
170
|
variant === "inverse" ? "fill-primary" : "fill-border";
|
|
165
171
|
|
|
166
172
|
return (
|
|
167
|
-
<svg width="20" height="10" viewBox="0 0 20 10" fill="none" {...props}>
|
|
173
|
+
<svg width="20" height="10" viewBox="0 0 20 10" fill="none" data-slot="tooltip-arrow-svg" {...props}>
|
|
168
174
|
<path
|
|
169
175
|
d="M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z"
|
|
170
176
|
className={fillClasses}
|