@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.
Files changed (65) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/templates/accordion/accordion.tsx +5 -1
  4. package/templates/alert-dialog/alert-dialog.tsx +14 -3
  5. package/templates/animated-icon/animated-icon.tsx +1 -0
  6. package/templates/animated-list/animated-list.tsx +2 -1
  7. package/templates/animated-tabs/animated-tabs.tsx +4 -0
  8. package/templates/autocomplete/autocomplete.tsx +14 -3
  9. package/templates/avatar/avatar.tsx +3 -0
  10. package/templates/badge/badge.tsx +1 -0
  11. package/templates/button/button.tsx +1 -0
  12. package/templates/card/card.tsx +6 -1
  13. package/templates/carousel/carousel.tsx +7 -0
  14. package/templates/checkbox/checkbox.tsx +1 -0
  15. package/templates/checkbox-group/checkbox-group.tsx +1 -0
  16. package/templates/collapsible/collapsible.tsx +3 -1
  17. package/templates/combobox/combobox.tsx +15 -3
  18. package/templates/compare-slider/compare-slider.tsx +1 -0
  19. package/templates/context-menu/context-menu.tsx +61 -14
  20. package/templates/dialog/dialog.tsx +13 -3
  21. package/templates/drawer/drawer.tsx +19 -6
  22. package/templates/expandable-card/expandable-card.tsx +5 -1
  23. package/templates/field/field.tsx +5 -1
  24. package/templates/fieldset/fieldset.tsx +2 -0
  25. package/templates/form/form.tsx +1 -0
  26. package/templates/hold-to-confirm/hold-to-confirm.tsx +1 -0
  27. package/templates/input/input.tsx +1 -0
  28. package/templates/label/label.tsx +1 -0
  29. package/templates/link/link.tsx +1 -0
  30. package/templates/load-transition/load-transition.tsx +1 -0
  31. package/templates/marquee/marquee.tsx +1 -0
  32. package/templates/menu/menu.tsx +19 -3
  33. package/templates/menubar/menubar.tsx +15 -3
  34. package/templates/meter/meter.tsx +5 -1
  35. package/templates/navigation-menu/navigation-menu.tsx +13 -2
  36. package/templates/number-field/number-field.tsx +7 -1
  37. package/templates/number-ticker/number-ticker.tsx +3 -0
  38. package/templates/otp-field/otp-field.tsx +4 -0
  39. package/templates/popover/popover.tsx +19 -5
  40. package/templates/preview-card/preview-card.tsx +11 -3
  41. package/templates/progress/progress.tsx +5 -1
  42. package/templates/progress-ring/progress-ring.tsx +1 -0
  43. package/templates/radio/radio.tsx +3 -0
  44. package/templates/scroll-area/scroll-area.tsx +14 -4
  45. package/templates/scroll-progress/scroll-progress.tsx +1 -0
  46. package/templates/scroll-reveal/scroll-reveal.tsx +1 -0
  47. package/templates/select/select.tsx +18 -2
  48. package/templates/separator/separator.tsx +1 -0
  49. package/templates/skeleton/skeleton.tsx +1 -0
  50. package/templates/slider/slider.tsx +7 -0
  51. package/templates/sortable/sortable.tsx +3 -0
  52. package/templates/stagger-list/stagger-list.tsx +2 -0
  53. package/templates/streaming-text/streaming-text.tsx +1 -0
  54. package/templates/swipeable-row/swipeable-row.tsx +1 -0
  55. package/templates/switch/switch.tsx +2 -0
  56. package/templates/tabs/tabs.tsx +5 -0
  57. package/templates/text/text.tsx +1 -0
  58. package/templates/text-morph/text-morph.tsx +2 -0
  59. package/templates/text-shimmer/text-shimmer.tsx +1 -0
  60. package/templates/textarea/textarea.tsx +1 -0
  61. package/templates/toast/toast.tsx +10 -1
  62. package/templates/toggle/toggle.tsx +1 -0
  63. package/templates/toggle-group/toggle-group.tsx +2 -0
  64. package/templates/toolbar/toolbar.tsx +6 -0
  65. package/templates/tooltip/tooltip.tsx +9 -3
@@ -17,6 +17,7 @@ const Menubar = React.forwardRef<
17
17
  "flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
18
18
  className
19
19
  )}
20
+ data-slot="menubar"
20
21
  {...props}
21
22
  />
22
23
  ))
@@ -58,6 +59,7 @@ const MenubarTrigger = React.forwardRef<
58
59
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
59
60
  className
60
61
  )}
62
+ data-slot="menubar-trigger"
61
63
  {...props}
62
64
  />
63
65
  ))
@@ -65,7 +67,7 @@ MenubarTrigger.displayName = "MenubarTrigger"
65
67
 
66
68
  const MenubarPortal: React.FC<
67
69
  React.ComponentProps<typeof Menu.Portal>
68
- > = (props) => <Menu.Portal {...props} />
70
+ > = (props) => <Menu.Portal data-slot="menubar-portal" {...props} />
69
71
  MenubarPortal.displayName = "MenubarPortal"
70
72
 
71
73
  const MenubarPositioner = React.forwardRef<
@@ -76,6 +78,7 @@ const MenubarPositioner = React.forwardRef<
76
78
  ref={ref}
77
79
  className={cn("z-50 outline-none", className)}
78
80
  sideOffset={4}
81
+ data-slot="menubar-positioner"
79
82
  {...props}
80
83
  />
81
84
  ))
@@ -97,6 +100,7 @@ const MenubarContent = React.forwardRef<
97
100
  "motion-reduce:data-[starting-style]:scale-100 motion-reduce:data-[ending-style]:scale-100",
98
101
  className
99
102
  )}
103
+ data-slot="menubar-content"
100
104
  {...props}
101
105
  />
102
106
  ))
@@ -118,6 +122,7 @@ const MenubarItem = React.forwardRef<
118
122
  inset && "pl-8",
119
123
  className
120
124
  )}
125
+ data-slot="menubar-item"
121
126
  {...props}
122
127
  />
123
128
  ))
@@ -136,6 +141,7 @@ const MenubarCheckboxItem = React.forwardRef<
136
141
  "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
137
142
  className
138
143
  )}
144
+ data-slot="menubar-checkbox-item"
139
145
  {...props}
140
146
  >
141
147
  <Menu.CheckboxItemIndicator className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
@@ -150,7 +156,7 @@ const MenubarRadioGroup = React.forwardRef<
150
156
  React.ComponentRef<typeof Menu.RadioGroup>,
151
157
  React.ComponentProps<typeof Menu.RadioGroup>
152
158
  >(({ className, ...props }, ref) => (
153
- <Menu.RadioGroup ref={ref} className={className} {...props} />
159
+ <Menu.RadioGroup ref={ref} className={className} data-slot="menubar-radio-group" {...props} />
154
160
  ))
155
161
  MenubarRadioGroup.displayName = "MenubarRadioGroup"
156
162
 
@@ -167,6 +173,7 @@ const MenubarRadioItem = React.forwardRef<
167
173
  "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
168
174
  className
169
175
  )}
176
+ data-slot="menubar-radio-item"
170
177
  {...props}
171
178
  >
172
179
  <Menu.RadioItemIndicator className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
@@ -181,7 +188,7 @@ const MenubarGroup = React.forwardRef<
181
188
  React.ComponentRef<typeof Menu.Group>,
182
189
  React.ComponentProps<typeof Menu.Group>
183
190
  >(({ className, ...props }, ref) => (
184
- <Menu.Group ref={ref} className={className} {...props} />
191
+ <Menu.Group ref={ref} className={className} data-slot="menubar-group" {...props} />
185
192
  ))
186
193
  MenubarGroup.displayName = "MenubarGroup"
187
194
 
@@ -198,6 +205,7 @@ const MenubarLabel = React.forwardRef<
198
205
  inset && "pl-8",
199
206
  className
200
207
  )}
208
+ data-slot="menubar-label"
201
209
  {...props}
202
210
  />
203
211
  ))
@@ -210,6 +218,7 @@ const MenubarSeparator = React.forwardRef<
210
218
  <Menu.Separator
211
219
  ref={ref}
212
220
  className={cn("-mx-1 my-1 h-px bg-border", className)}
221
+ data-slot="menubar-separator"
213
222
  {...props}
214
223
  />
215
224
  ))
@@ -224,6 +233,7 @@ const MenubarShortcut = ({
224
233
  "ml-auto text-xs tracking-widest text-muted-foreground",
225
234
  className
226
235
  )}
236
+ data-slot="menubar-shortcut"
227
237
  {...props}
228
238
  />
229
239
  )
@@ -251,6 +261,7 @@ const MenubarSubTrigger = React.forwardRef<
251
261
  inset && "pl-8",
252
262
  className
253
263
  )}
264
+ data-slot="menubar-sub-trigger"
254
265
  {...props}
255
266
  >
256
267
  {children}
@@ -277,6 +288,7 @@ const MenubarSubContent = React.forwardRef<
277
288
  "motion-reduce:data-[starting-style]:scale-100 motion-reduce:data-[ending-style]:scale-100",
278
289
  className
279
290
  )}
291
+ data-slot="menubar-sub-content"
280
292
  {...props}
281
293
  />
282
294
  </Menu.Positioner>
@@ -8,7 +8,7 @@ const Meter = React.forwardRef<
8
8
  React.ComponentRef<typeof MeterPrimitive.Root>,
9
9
  React.ComponentPropsWithoutRef<typeof MeterPrimitive.Root>
10
10
  >(({ className, ...props }, ref) => (
11
- <MeterPrimitive.Root ref={ref} className={cn("grid gap-2", className)} {...props} />
11
+ <MeterPrimitive.Root data-slot="meter" ref={ref} className={cn("grid gap-2", className)} {...props} />
12
12
  ))
13
13
  Meter.displayName = "Meter"
14
14
 
@@ -17,6 +17,7 @@ const MeterTrack = React.forwardRef<
17
17
  React.ComponentPropsWithoutRef<typeof MeterPrimitive.Track>
18
18
  >(({ className, ...props }, ref) => (
19
19
  <MeterPrimitive.Track
20
+ data-slot="meter-track"
20
21
  ref={ref}
21
22
  className={cn("relative h-2 w-full overflow-hidden rounded-full bg-secondary", className)}
22
23
  {...props}
@@ -29,6 +30,7 @@ const MeterIndicator = React.forwardRef<
29
30
  React.ComponentPropsWithoutRef<typeof MeterPrimitive.Indicator>
30
31
  >(({ className, ...props }, ref) => (
31
32
  <MeterPrimitive.Indicator
33
+ data-slot="meter-indicator"
32
34
  ref={ref}
33
35
  className={cn("h-full rounded-full bg-primary transition-[width] duration-[var(--motion-duration-base,200ms)] ease-[var(--motion-ease-out,cubic-bezier(0.23,1,0.32,1))] motion-reduce:transition-none", className)}
34
36
  {...props}
@@ -41,6 +43,7 @@ const MeterLabel = React.forwardRef<
41
43
  React.ComponentPropsWithoutRef<typeof MeterPrimitive.Label>
42
44
  >(({ className, ...props }, ref) => (
43
45
  <MeterPrimitive.Label
46
+ data-slot="meter-label"
44
47
  ref={ref}
45
48
  className={cn("text-sm font-medium leading-none", className)}
46
49
  {...props}
@@ -53,6 +56,7 @@ const MeterValue = React.forwardRef<
53
56
  React.ComponentPropsWithoutRef<typeof MeterPrimitive.Value>
54
57
  >(({ className, ...props }, ref) => (
55
58
  <MeterPrimitive.Value
59
+ data-slot="meter-value"
56
60
  ref={ref}
57
61
  className={cn("text-xs text-muted-foreground", className)}
58
62
  {...props}
@@ -36,6 +36,7 @@ const NavigationMenu = React.forwardRef<
36
36
  )}
37
37
  value={value}
38
38
  onValueChange={change}
39
+ data-slot="navigation-menu"
39
40
  {...props}
40
41
  >
41
42
  {children}
@@ -55,6 +56,7 @@ const NavigationMenuList = React.forwardRef<
55
56
  "group flex flex-1 list-none items-center justify-center space-x-1",
56
57
  className
57
58
  )}
59
+ data-slot="navigation-menu-list"
58
60
  {...props}
59
61
  />
60
62
  ))
@@ -83,7 +85,7 @@ const NavigationMenuItem = React.forwardRef<
83
85
 
84
86
  return (
85
87
  <NavigationMenuItemAgentContext.Provider value={root ? trigger : null}>
86
- <BaseNavigationMenu.Item ref={ref} className={className} value={value} {...props} />
88
+ <BaseNavigationMenu.Item ref={ref} className={className} value={value} data-slot="navigation-menu-item" {...props} />
87
89
  </NavigationMenuItemAgentContext.Provider>
88
90
  )
89
91
  })
@@ -103,6 +105,7 @@ const NavigationMenuTrigger = React.forwardRef<
103
105
  "data-[popup-open]:bg-accent/50",
104
106
  className
105
107
  )}
108
+ data-slot="navigation-menu-trigger"
106
109
  {...props}
107
110
  >
108
111
  {children}{" "}
@@ -127,6 +130,7 @@ const NavigationMenuContent = React.forwardRef<
127
130
  "data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",
128
131
  className
129
132
  )}
133
+ data-slot="navigation-menu-content"
130
134
  {...props}
131
135
  />
132
136
  ))
@@ -147,6 +151,7 @@ const NavigationMenuLink = React.forwardRef<
147
151
  "focus:bg-accent focus:text-accent-foreground",
148
152
  className
149
153
  )}
154
+ data-slot="navigation-menu-link"
150
155
  {...props}
151
156
  />
152
157
  )
@@ -155,7 +160,7 @@ NavigationMenuLink.displayName = "NavigationMenuLink"
155
160
 
156
161
  const NavigationMenuPortal: React.FC<
157
162
  React.ComponentProps<typeof BaseNavigationMenu.Portal>
158
- > = (props) => <BaseNavigationMenu.Portal {...props} />
163
+ > = (props) => <BaseNavigationMenu.Portal data-slot="navigation-menu-portal" {...props} />
159
164
  NavigationMenuPortal.displayName = "NavigationMenuPortal"
160
165
 
161
166
  const NavigationMenuPositioner = React.forwardRef<
@@ -165,6 +170,7 @@ const NavigationMenuPositioner = React.forwardRef<
165
170
  <BaseNavigationMenu.Positioner
166
171
  ref={ref}
167
172
  className={cn("absolute left-0 top-full z-50 flex justify-center", className)}
173
+ data-slot="navigation-menu-positioner"
168
174
  {...props}
169
175
  />
170
176
  ))
@@ -184,6 +190,7 @@ const NavigationMenuPopup = React.forwardRef<
184
190
  "motion-reduce:data-[starting-style]:scale-100 motion-reduce:data-[ending-style]:scale-100",
185
191
  className
186
192
  )}
193
+ data-slot="navigation-menu-popup"
187
194
  {...props}
188
195
  />
189
196
  ))
@@ -202,6 +209,7 @@ const NavigationMenuViewport = React.forwardRef<
202
209
  style={{
203
210
  perspective: "2000px",
204
211
  }}
212
+ data-slot="navigation-menu-viewport"
205
213
  {...props}
206
214
  />
207
215
  ))
@@ -220,6 +228,7 @@ const NavigationMenuArrow = React.forwardRef<
220
228
  "data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",
221
229
  className
222
230
  )}
231
+ data-slot="navigation-menu-arrow"
223
232
  {...props}
224
233
  >
225
234
  {children || (
@@ -254,6 +263,7 @@ const NavigationMenuBackdrop = React.forwardRef<
254
263
  "transition-opacity duration-[var(--motion-duration-fast,150ms)] ease-[var(--motion-ease-out,cubic-bezier(0.23,1,0.32,1))]",
255
264
  className
256
265
  )}
266
+ data-slot="navigation-menu-backdrop"
257
267
  {...props}
258
268
  />
259
269
  ))
@@ -269,6 +279,7 @@ const NavigationMenuIndicator = React.forwardRef<
269
279
  "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
270
280
  className
271
281
  )}
282
+ data-slot="navigation-menu-indicator"
272
283
  {...props}
273
284
  >
274
285
  <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
@@ -65,7 +65,7 @@ const NumberField = React.forwardRef<HTMLDivElement, NumberFieldProps>(
65
65
 
66
66
  return (
67
67
  <NumberFieldAgentContext.Provider value={useHasAgent() ? input : null}>
68
- <NumberFieldPrimitive.Root ref={ref} {...props} value={value} onValueChange={changeValue} />
68
+ <NumberFieldPrimitive.Root ref={ref} data-slot="number-field" {...props} value={value} onValueChange={changeValue} />
69
69
  </NumberFieldAgentContext.Provider>
70
70
  )
71
71
  }
@@ -78,6 +78,7 @@ const NumberFieldGroup = React.forwardRef<
78
78
  >(({ className, ...props }, ref) => (
79
79
  <NumberFieldPrimitive.Group
80
80
  ref={ref}
81
+ data-slot="number-field-group"
81
82
  className={cn(
82
83
  "inline-flex h-10 w-full items-stretch overflow-hidden rounded-md border border-input bg-background",
83
84
  className
@@ -93,6 +94,7 @@ const NumberFieldInput = React.forwardRef<
93
94
  >(({ className, ...props }, ref) => (
94
95
  <NumberFieldPrimitive.Input
95
96
  ref={useMergedRef(ref, React.useContext(NumberFieldAgentContext))}
97
+ data-slot="number-field-input"
96
98
  className={cn(
97
99
  "w-full bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground",
98
100
  "disabled:cursor-not-allowed disabled:opacity-50",
@@ -109,6 +111,7 @@ const NumberFieldIncrement = React.forwardRef<
109
111
  >(({ className, children, ...props }, ref) => (
110
112
  <NumberFieldPrimitive.Increment
111
113
  ref={ref}
114
+ data-slot="number-field-increment"
112
115
  data-agent-part={useHasAgent() ? "" : undefined}
113
116
  className={cn(
114
117
  "inline-flex h-full items-center justify-center border-l border-input px-3 text-muted-foreground transition-colors",
@@ -130,6 +133,7 @@ const NumberFieldDecrement = React.forwardRef<
130
133
  >(({ className, children, ...props }, ref) => (
131
134
  <NumberFieldPrimitive.Decrement
132
135
  ref={ref}
136
+ data-slot="number-field-decrement"
133
137
  data-agent-part={useHasAgent() ? "" : undefined}
134
138
  className={cn(
135
139
  "inline-flex h-full items-center justify-center border-r border-input px-3 text-muted-foreground transition-colors",
@@ -151,6 +155,7 @@ const NumberFieldScrubArea = React.forwardRef<
151
155
  >(({ className, ...props }, ref) => (
152
156
  <NumberFieldPrimitive.ScrubArea
153
157
  ref={ref}
158
+ data-slot="number-field-scrub-area"
154
159
  className={cn("cursor-ew-resize", className)}
155
160
  {...props}
156
161
  />
@@ -163,6 +168,7 @@ const NumberFieldScrubAreaCursor = React.forwardRef<
163
168
  >(({ className, ...props }, ref) => (
164
169
  <NumberFieldPrimitive.ScrubAreaCursor
165
170
  ref={ref}
171
+ data-slot="number-field-scrub-area-cursor"
166
172
  className={cn("text-muted-foreground", className)}
167
173
  {...props}
168
174
  />
@@ -396,6 +396,7 @@ const NumberTicker = React.forwardRef<HTMLSpanElement, NumberTickerProps>(
396
396
  <span
397
397
  ref={innerRef}
398
398
  className={cn("inline-block tabular-nums tracking-tight", className)}
399
+ data-slot="number-ticker"
399
400
  {...props}
400
401
  >
401
402
  {formatted}
@@ -408,6 +409,7 @@ const NumberTicker = React.forwardRef<HTMLSpanElement, NumberTickerProps>(
408
409
  <span
409
410
  ref={innerRef}
410
411
  className={cn("inline-block tabular-nums tracking-tight", className)}
412
+ data-slot="number-ticker"
411
413
  {...props}
412
414
  >
413
415
  <CounterValue
@@ -430,6 +432,7 @@ const NumberTicker = React.forwardRef<HTMLSpanElement, NumberTickerProps>(
430
432
  "inline-flex items-baseline tabular-nums tracking-tight",
431
433
  className
432
434
  )}
435
+ data-slot="number-ticker"
433
436
  {...props}
434
437
  >
435
438
  {cells.map((cell, i) => {
@@ -51,6 +51,7 @@ const OTPField = React.forwardRef<
51
51
  return (
52
52
  <OTPFieldPrimitive.Root
53
53
  ref={mergedRef}
54
+ data-slot="otp-field"
54
55
  className={cn(
55
56
  "flex items-center gap-2",
56
57
  "data-[disabled]:opacity-50",
@@ -70,6 +71,7 @@ const OTPFieldGroup = React.forwardRef<
70
71
  >(({ className, ...props }, ref) => (
71
72
  <div
72
73
  ref={ref}
74
+ data-slot="otp-field-group"
73
75
  className={cn("flex items-center", className)}
74
76
  {...props}
75
77
  />
@@ -82,6 +84,7 @@ const OTPFieldInput = React.forwardRef<
82
84
  >(({ className, ...props }, ref) => (
83
85
  <OTPFieldPrimitive.Input
84
86
  ref={ref}
87
+ data-slot="otp-field-input"
85
88
  // The root reports the whole code, so a slot is part of it rather than a control.
86
89
  data-agent-part={useHasAgent() ? "" : undefined}
87
90
  className={cn(
@@ -104,6 +107,7 @@ const OTPFieldSeparator = React.forwardRef<
104
107
  >(({ className, ...props }, ref) => (
105
108
  <OTPFieldPrimitive.Separator
106
109
  ref={ref}
110
+ data-slot="otp-field-separator"
107
111
  role="separator"
108
112
  className={cn("text-muted-foreground", className)}
109
113
  {...props}
@@ -19,10 +19,17 @@ function Popover<Payload>({ open, defaultOpen, onOpenChange, ...props }: Popover
19
19
 
20
20
  function PopoverTrigger<Payload>({ ref, ...props }: PopoverPrimitive.Trigger.Props<Payload> & React.RefAttributes<HTMLElement>) {
21
21
  const parts = React.useContext(PopoverAgentContext)
22
- return <PopoverPrimitive.Trigger<Payload> ref={useMergedRef(ref, parts?.trigger)} {...props} />
22
+ return <PopoverPrimitive.Trigger<Payload> ref={useMergedRef(ref, parts?.trigger)} data-slot="popover-trigger" {...props} />
23
23
  }
24
- const PopoverPortal = PopoverPrimitive.Portal
25
- const PopoverClose = PopoverPrimitive.Close
24
+
25
+ function PopoverPortal(props: React.ComponentProps<typeof PopoverPrimitive.Portal>) {
26
+ return <PopoverPrimitive.Portal data-slot="popover-portal" {...props} />
27
+ }
28
+
29
+ function PopoverClose(props: React.ComponentProps<typeof PopoverPrimitive.Close>) {
30
+ return <PopoverPrimitive.Close data-slot="popover-close" {...props} />
31
+ }
32
+
26
33
  const createPopoverHandle = PopoverPrimitive.createHandle
27
34
 
28
35
  const PopoverPositioner = React.forwardRef<
@@ -33,6 +40,7 @@ const PopoverPositioner = React.forwardRef<
33
40
  ref={ref}
34
41
  sideOffset={sideOffset}
35
42
  className={cn("z-50", className)}
43
+ data-slot="popover-positioner"
36
44
  {...props}
37
45
  />
38
46
  ))
@@ -53,6 +61,7 @@ const PopoverPopup = React.forwardRef<
53
61
  "motion-reduce:data-[starting-style]:scale-100 motion-reduce:data-[ending-style]:scale-100",
54
62
  className
55
63
  )}
64
+ data-slot="popover-popup"
56
65
  {...props}
57
66
  />
58
67
  ))
@@ -92,13 +101,13 @@ const PopoverContent = React.forwardRef<
92
101
  collisionPadding={collisionPadding}
93
102
  sticky={sticky}
94
103
  >
95
- <PopoverPopup ref={ref} className={className} {...props} />
104
+ <PopoverPopup ref={ref} className={className} data-slot="popover-content" {...props} />
96
105
  </PopoverPositioner>
97
106
  )
98
107
 
99
108
  if (!portal) return content
100
109
 
101
- return <PopoverPrimitive.Portal>{content}</PopoverPrimitive.Portal>
110
+ return <PopoverPortal>{content}</PopoverPortal>
102
111
  })
103
112
  PopoverContent.displayName = "PopoverContent"
104
113
 
@@ -115,6 +124,7 @@ const PopoverArrow = React.forwardRef<
115
124
  "data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",
116
125
  className
117
126
  )}
127
+ data-slot="popover-arrow"
118
128
  {...props}
119
129
  >
120
130
  {children || (
@@ -144,6 +154,7 @@ const PopoverViewport = React.forwardRef<
144
154
  <PopoverPrimitive.Viewport
145
155
  ref={ref}
146
156
  className={cn("flex flex-col gap-2", className)}
157
+ data-slot="popover-viewport"
147
158
  {...props}
148
159
  />
149
160
  ))
@@ -156,6 +167,7 @@ const PopoverTitle = React.forwardRef<
156
167
  <PopoverPrimitive.Title
157
168
  ref={ref}
158
169
  className={cn("mb-2 text-base font-medium leading-none", className)}
170
+ data-slot="popover-title"
159
171
  {...props}
160
172
  />
161
173
  ))
@@ -168,6 +180,7 @@ const PopoverDescription = React.forwardRef<
168
180
  <PopoverPrimitive.Description
169
181
  ref={ref}
170
182
  className={cn("text-base text-muted-foreground", className)}
183
+ data-slot="popover-description"
171
184
  {...props}
172
185
  />
173
186
  ))
@@ -185,6 +198,7 @@ const PopoverBackdrop = React.forwardRef<
185
198
  "transition-opacity duration-[var(--motion-duration-fast,150ms)] ease-[var(--motion-ease-out,cubic-bezier(0.23,1,0.32,1))]",
186
199
  className
187
200
  )}
201
+ data-slot="popover-backdrop"
188
202
  {...props}
189
203
  />
190
204
  ))
@@ -33,12 +33,15 @@ const PreviewCardTrigger = React.forwardRef<
33
33
  "dark:text-blue-400 dark:decoration-blue-400/60 dark:focus-visible:outline-blue-400",
34
34
  className
35
35
  )}
36
+ data-slot="preview-card-trigger"
36
37
  {...props}
37
38
  />
38
39
  ))
39
40
  PreviewCardTrigger.displayName = "PreviewCardTrigger"
40
41
 
41
- const PreviewCardPortal = BasePreviewCard.Portal
42
+ function PreviewCardPortal(props: React.ComponentProps<typeof BasePreviewCard.Portal>) {
43
+ return <BasePreviewCard.Portal data-slot="preview-card-portal" {...props} />
44
+ }
42
45
 
43
46
  const PreviewCardBackdrop = React.forwardRef<
44
47
  React.ComponentRef<typeof BasePreviewCard.Backdrop>,
@@ -51,6 +54,7 @@ const PreviewCardBackdrop = React.forwardRef<
51
54
  "data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",
52
55
  className
53
56
  )}
57
+ data-slot="preview-card-backdrop"
54
58
  {...props}
55
59
  />
56
60
  ))
@@ -64,6 +68,7 @@ const PreviewCardPositioner = React.forwardRef<
64
68
  ref={ref}
65
69
  sideOffset={sideOffset}
66
70
  className={cn("z-50", className)}
71
+ data-slot="preview-card-positioner"
67
72
  {...props}
68
73
  />
69
74
  ))
@@ -85,6 +90,7 @@ const PreviewCardPopup = React.forwardRef<
85
90
  "backdrop-blur-sm dark:shadow-none dark:-outline-offset-1",
86
91
  className
87
92
  )}
93
+ data-slot="preview-card-popup"
88
94
  {...props}
89
95
  />
90
96
  ))
@@ -102,6 +108,7 @@ const PreviewCardArrow = React.forwardRef<
102
108
  "data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",
103
109
  className
104
110
  )}
111
+ data-slot="preview-card-arrow"
105
112
  {...props}
106
113
  >
107
114
  {children || <PreviewCardArrowSvg />}
@@ -115,7 +122,7 @@ const PreviewCardContent = React.forwardRef<
115
122
  >(({ className, children, ...props }, ref) => (
116
123
  <PreviewCardPortal>
117
124
  <PreviewCardPositioner>
118
- <PreviewCardPopup ref={ref} className={className} {...props}>
125
+ <PreviewCardPopup ref={ref} className={className} data-slot="preview-card-content" {...props}>
119
126
  <PreviewCardArrow />
120
127
  {children}
121
128
  </PreviewCardPopup>
@@ -131,6 +138,7 @@ const PreviewCardViewport = React.forwardRef<
131
138
  <BasePreviewCard.Viewport
132
139
  ref={ref}
133
140
  className={cn("flex flex-col gap-3", className)}
141
+ data-slot="preview-card-viewport"
134
142
  {...props}
135
143
  />
136
144
  ))
@@ -140,7 +148,7 @@ const createPreviewCardHandle = BasePreviewCard.createHandle
140
148
 
141
149
  function PreviewCardArrowSvg(props: React.ComponentProps<'svg'>) {
142
150
  return (
143
- <svg width="20" height="10" viewBox="0 0 20 10" fill="none" {...props}>
151
+ <svg width="20" height="10" viewBox="0 0 20 10" fill="none" data-slot="preview-card-arrow-svg" {...props}>
144
152
  <path
145
153
  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"
146
154
  className="fill-secondary"
@@ -8,7 +8,7 @@ const Progress = React.forwardRef<
8
8
  React.ComponentRef<typeof ProgressPrimitive.Root>,
9
9
  React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
10
10
  >(({ className, ...props }, ref) => (
11
- <ProgressPrimitive.Root ref={ref} className={cn("grid gap-2", className)} {...props} />
11
+ <ProgressPrimitive.Root data-slot="progress" ref={ref} className={cn("grid gap-2", className)} {...props} />
12
12
  ))
13
13
  Progress.displayName = "Progress"
14
14
 
@@ -17,6 +17,7 @@ const ProgressTrack = React.forwardRef<
17
17
  React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Track>
18
18
  >(({ className, ...props }, ref) => (
19
19
  <ProgressPrimitive.Track
20
+ data-slot="progress-track"
20
21
  ref={ref}
21
22
  className={cn("relative h-2 w-full overflow-hidden rounded-full bg-secondary", className)}
22
23
  {...props}
@@ -29,6 +30,7 @@ const ProgressIndicator = React.forwardRef<
29
30
  React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Indicator>
30
31
  >(({ className, ...props }, ref) => (
31
32
  <ProgressPrimitive.Indicator
33
+ data-slot="progress-indicator"
32
34
  ref={ref}
33
35
  className={cn("h-full rounded-full bg-primary transition-[width] duration-[var(--motion-duration-base,200ms)] ease-[var(--motion-ease-out,cubic-bezier(0.23,1,0.32,1))] motion-reduce:transition-none", className)}
34
36
  {...props}
@@ -41,6 +43,7 @@ const ProgressLabel = React.forwardRef<
41
43
  React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Label>
42
44
  >(({ className, ...props }, ref) => (
43
45
  <ProgressPrimitive.Label
46
+ data-slot="progress-label"
44
47
  ref={ref}
45
48
  className={cn("text-sm font-medium leading-none", className)}
46
49
  {...props}
@@ -53,6 +56,7 @@ const ProgressValue = React.forwardRef<
53
56
  React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Value>
54
57
  >(({ className, ...props }, ref) => (
55
58
  <ProgressPrimitive.Value
59
+ data-slot="progress-value"
56
60
  ref={ref}
57
61
  className={cn("text-xs text-muted-foreground", className)}
58
62
  {...props}
@@ -126,6 +126,7 @@ const ProgressRing = React.forwardRef<HTMLDivElement, ProgressRingProps>(
126
126
  return (
127
127
  <div
128
128
  ref={ref}
129
+ data-slot="progress-ring"
129
130
  className={cn("relative", className)}
130
131
  style={{ width: size, height: size }}
131
132
  {...props}
@@ -61,6 +61,7 @@ const RadioGroup = React.forwardRef<
61
61
  <RadioAgentContext.Provider value={useHasAgent() ? items : null}>
62
62
  <RadioGroupPrimitive
63
63
  ref={mergedRef}
64
+ data-slot="radio-group"
64
65
  className={cn("grid gap-2", className)}
65
66
  {...props}
66
67
  value={value}
@@ -77,6 +78,7 @@ const RadioIndicator = React.forwardRef<
77
78
  >(({ className, ...props }, ref) => (
78
79
  <RadioPrimitive.Indicator
79
80
  ref={ref}
81
+ data-slot="radio-indicator"
80
82
  className={cn(
81
83
  "flex items-center justify-center",
82
84
  "after:h-2.5 after:w-2.5 after:rounded-full after:bg-current",
@@ -100,6 +102,7 @@ const Radio = React.forwardRef<
100
102
  <span className="relative inline-flex [&>input]:!absolute">
101
103
  <RadioPrimitive.Root
102
104
  ref={mergedRef}
105
+ data-slot="radio"
103
106
  className={cn(
104
107
  "flex items-center justify-center aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background",
105
108
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",