@autono/create-open-pages 0.4.0 → 0.5.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 (62) hide show
  1. package/dist/cli.js +1 -1
  2. package/package.json +1 -1
  3. package/template/.agents/skills/create-page/SKILL.md +1 -1
  4. package/template/.agents/skills/page-authoring/SKILL.md +2 -2
  5. package/template/.agents/skills/page-authoring/references/interactivity.md +13 -21
  6. package/template/components.json +19 -3
  7. package/template/package.json +7 -7
  8. package/template/styles/globals.css +83 -66
  9. package/template/ui/accordion.tsx +22 -7
  10. package/template/ui/alert-dialog.tsx +22 -21
  11. package/template/ui/alert.tsx +15 -5
  12. package/template/ui/avatar.tsx +7 -4
  13. package/template/ui/badge.tsx +8 -7
  14. package/template/ui/breadcrumb.tsx +21 -8
  15. package/template/ui/button-group.tsx +5 -5
  16. package/template/ui/button.tsx +18 -15
  17. package/template/ui/calendar.tsx +28 -24
  18. package/template/ui/card.tsx +17 -6
  19. package/template/ui/carousel.tsx +10 -11
  20. package/template/ui/chart.tsx +1 -2
  21. package/template/ui/checkbox.tsx +5 -6
  22. package/template/ui/collapsible.tsx +2 -0
  23. package/template/ui/combobox.tsx +9 -20
  24. package/template/ui/command.tsx +39 -26
  25. package/template/ui/context-menu.tsx +69 -60
  26. package/template/ui/dialog.tsx +26 -14
  27. package/template/ui/drawer.tsx +8 -9
  28. package/template/ui/dropdown-menu.tsx +34 -22
  29. package/template/ui/empty.tsx +8 -8
  30. package/template/ui/field.tsx +15 -25
  31. package/template/ui/hover-card.tsx +1 -1
  32. package/template/ui/input-group.tsx +10 -24
  33. package/template/ui/input-otp.tsx +16 -6
  34. package/template/ui/input.tsx +1 -3
  35. package/template/ui/item.tsx +17 -14
  36. package/template/ui/kbd.tsx +1 -3
  37. package/template/ui/menubar.tsx +28 -24
  38. package/template/ui/message-scroller.tsx +5 -4
  39. package/template/ui/native-select.tsx +13 -14
  40. package/template/ui/navigation-menu.tsx +8 -12
  41. package/template/ui/pagination.tsx +35 -33
  42. package/template/ui/popover.tsx +5 -5
  43. package/template/ui/progress.tsx +2 -2
  44. package/template/ui/radio-group.tsx +4 -5
  45. package/template/ui/resizable.tsx +2 -5
  46. package/template/ui/scroll-area.tsx +2 -5
  47. package/template/ui/select.tsx +26 -24
  48. package/template/ui/separator.tsx +1 -1
  49. package/template/ui/sheet.tsx +20 -16
  50. package/template/ui/sidebar.tsx +39 -63
  51. package/template/ui/skeleton.tsx +1 -1
  52. package/template/ui/slider.tsx +6 -8
  53. package/template/ui/sonner.tsx +21 -14
  54. package/template/ui/spinner.tsx +2 -8
  55. package/template/ui/switch.tsx +4 -4
  56. package/template/ui/table.tsx +2 -4
  57. package/template/ui/tabs.tsx +9 -8
  58. package/template/ui/textarea.tsx +1 -1
  59. package/template/ui/toggle-group.tsx +14 -8
  60. package/template/ui/toggle.tsx +8 -10
  61. package/template/ui/tooltip.tsx +4 -2
  62. package/template/ui/form.tsx +0 -167
@@ -1,10 +1,10 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from "react"
4
- import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
5
4
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
6
5
 
7
6
  import { cn } from "@/lib/utils"
7
+ import { CheckIcon, ChevronRightIcon } from "lucide-react"
8
8
 
9
9
  function DropdownMenu({
10
10
  ...props
@@ -33,6 +33,7 @@ function DropdownMenuTrigger({
33
33
 
34
34
  function DropdownMenuContent({
35
35
  className,
36
+ align = "start",
36
37
  sideOffset = 4,
37
38
  ...props
38
39
  }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
@@ -41,10 +42,8 @@ function DropdownMenuContent({
41
42
  <DropdownMenuPrimitive.Content
42
43
  data-slot="dropdown-menu-content"
43
44
  sideOffset={sideOffset}
44
- className={cn(
45
- "z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
46
- className
47
- )}
45
+ align={align}
46
+ className={cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
48
47
  {...props}
49
48
  />
50
49
  </DropdownMenuPrimitive.Portal>
@@ -74,7 +73,7 @@ function DropdownMenuItem({
74
73
  data-inset={inset}
75
74
  data-variant={variant}
76
75
  className={cn(
77
- "relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
76
+ "group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
78
77
  className
79
78
  )}
80
79
  {...props}
@@ -86,21 +85,29 @@ function DropdownMenuCheckboxItem({
86
85
  className,
87
86
  children,
88
87
  checked,
88
+ inset,
89
89
  ...props
90
- }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
90
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
91
+ inset?: boolean
92
+ }) {
91
93
  return (
92
94
  <DropdownMenuPrimitive.CheckboxItem
93
95
  data-slot="dropdown-menu-checkbox-item"
96
+ data-inset={inset}
94
97
  className={cn(
95
- "relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
98
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
96
99
  className
97
100
  )}
98
101
  checked={checked}
99
102
  {...props}
100
103
  >
101
- <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
104
+ <span
105
+ className="pointer-events-none absolute right-2 flex items-center justify-center"
106
+ data-slot="dropdown-menu-checkbox-item-indicator"
107
+ >
102
108
  <DropdownMenuPrimitive.ItemIndicator>
103
- <CheckIcon className="size-4" />
109
+ <CheckIcon
110
+ />
104
111
  </DropdownMenuPrimitive.ItemIndicator>
105
112
  </span>
106
113
  {children}
@@ -122,20 +129,28 @@ function DropdownMenuRadioGroup({
122
129
  function DropdownMenuRadioItem({
123
130
  className,
124
131
  children,
132
+ inset,
125
133
  ...props
126
- }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
134
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
135
+ inset?: boolean
136
+ }) {
127
137
  return (
128
138
  <DropdownMenuPrimitive.RadioItem
129
139
  data-slot="dropdown-menu-radio-item"
140
+ data-inset={inset}
130
141
  className={cn(
131
- "relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
142
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
132
143
  className
133
144
  )}
134
145
  {...props}
135
146
  >
136
- <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
147
+ <span
148
+ className="pointer-events-none absolute right-2 flex items-center justify-center"
149
+ data-slot="dropdown-menu-radio-item-indicator"
150
+ >
137
151
  <DropdownMenuPrimitive.ItemIndicator>
138
- <CircleIcon className="size-2 fill-current" />
152
+ <CheckIcon
153
+ />
139
154
  </DropdownMenuPrimitive.ItemIndicator>
140
155
  </span>
141
156
  {children}
@@ -155,7 +170,7 @@ function DropdownMenuLabel({
155
170
  data-slot="dropdown-menu-label"
156
171
  data-inset={inset}
157
172
  className={cn(
158
- "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
173
+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
159
174
  className
160
175
  )}
161
176
  {...props}
@@ -184,7 +199,7 @@ function DropdownMenuShortcut({
184
199
  <span
185
200
  data-slot="dropdown-menu-shortcut"
186
201
  className={cn(
187
- "ml-auto text-xs tracking-widest text-muted-foreground",
202
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
188
203
  className
189
204
  )}
190
205
  {...props}
@@ -211,13 +226,13 @@ function DropdownMenuSubTrigger({
211
226
  data-slot="dropdown-menu-sub-trigger"
212
227
  data-inset={inset}
213
228
  className={cn(
214
- "flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
229
+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
215
230
  className
216
231
  )}
217
232
  {...props}
218
233
  >
219
234
  {children}
220
- <ChevronRightIcon className="ml-auto size-4" />
235
+ <ChevronRightIcon className="ml-auto" />
221
236
  </DropdownMenuPrimitive.SubTrigger>
222
237
  )
223
238
  }
@@ -229,10 +244,7 @@ function DropdownMenuSubContent({
229
244
  return (
230
245
  <DropdownMenuPrimitive.SubContent
231
246
  data-slot="dropdown-menu-sub-content"
232
- className={cn(
233
- "z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
234
- className
235
- )}
247
+ className={cn("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
236
248
  {...props}
237
249
  />
238
250
  )
@@ -7,7 +7,7 @@ function Empty({ className, ...props }: React.ComponentProps<"div">) {
7
7
  <div
8
8
  data-slot="empty"
9
9
  className={cn(
10
- "flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",
10
+ "flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
11
11
  className
12
12
  )}
13
13
  {...props}
@@ -19,10 +19,7 @@ function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
19
19
  return (
20
20
  <div
21
21
  data-slot="empty-header"
22
- className={cn(
23
- "flex max-w-sm flex-col items-center gap-2 text-center",
24
- className
25
- )}
22
+ className={cn("flex max-w-sm flex-col items-center gap-2", className)}
26
23
  {...props}
27
24
  />
28
25
  )
@@ -34,7 +31,7 @@ const emptyMediaVariants = cva(
34
31
  variants: {
35
32
  variant: {
36
33
  default: "bg-transparent",
37
- icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6",
34
+ icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
38
35
  },
39
36
  },
40
37
  defaultVariants: {
@@ -62,7 +59,10 @@ function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) {
62
59
  return (
63
60
  <div
64
61
  data-slot="empty-title"
65
- className={cn("text-lg font-medium tracking-tight", className)}
62
+ className={cn(
63
+ "font-heading text-sm font-medium tracking-tight",
64
+ className
65
+ )}
66
66
  {...props}
67
67
  />
68
68
  )
@@ -86,7 +86,7 @@ function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
86
86
  <div
87
87
  data-slot="empty-content"
88
88
  className={cn(
89
- "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
89
+ "flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
90
90
  className
91
91
  )}
92
92
  {...props}
@@ -10,8 +10,7 @@ function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
10
10
  <fieldset
11
11
  data-slot="field-set"
12
12
  className={cn(
13
- "flex flex-col gap-6",
14
- "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
13
+ "flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
15
14
  className
16
15
  )}
17
16
  {...props}
@@ -29,9 +28,7 @@ function FieldLegend({
29
28
  data-slot="field-legend"
30
29
  data-variant={variant}
31
30
  className={cn(
32
- "mb-3 font-medium",
33
- "data-[variant=legend]:text-base",
34
- "data-[variant=label]:text-sm",
31
+ "mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
35
32
  className
36
33
  )}
37
34
  {...props}
@@ -44,7 +41,7 @@ function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {
44
41
  <div
45
42
  data-slot="field-group"
46
43
  className={cn(
47
- "group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
44
+ "group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
48
45
  className
49
46
  )}
50
47
  {...props}
@@ -53,21 +50,15 @@ function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {
53
50
  }
54
51
 
55
52
  const fieldVariants = cva(
56
- "group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
53
+ "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
57
54
  {
58
55
  variants: {
59
56
  orientation: {
60
- vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
61
- horizontal: [
62
- "flex-row items-center",
63
- "[&>[data-slot=field-label]]:flex-auto",
64
- "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
65
- ],
66
- responsive: [
67
- "flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
68
- "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
69
- "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
70
- ],
57
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
58
+ horizontal:
59
+ "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
60
+ responsive:
61
+ "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
71
62
  },
72
63
  },
73
64
  defaultVariants: {
@@ -97,7 +88,7 @@ function FieldContent({ className, ...props }: React.ComponentProps<"div">) {
97
88
  <div
98
89
  data-slot="field-content"
99
90
  className={cn(
100
- "group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
91
+ "group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
101
92
  className
102
93
  )}
103
94
  {...props}
@@ -113,9 +104,8 @@ function FieldLabel({
113
104
  <Label
114
105
  data-slot="field-label"
115
106
  className={cn(
116
- "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
117
- "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
118
- "has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",
107
+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
108
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
119
109
  className
120
110
  )}
121
111
  {...props}
@@ -128,7 +118,7 @@ function FieldTitle({ className, ...props }: React.ComponentProps<"div">) {
128
118
  <div
129
119
  data-slot="field-label"
130
120
  className={cn(
131
- "flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
121
+ "flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
132
122
  className
133
123
  )}
134
124
  {...props}
@@ -141,8 +131,8 @@ function FieldDescription({ className, ...props }: React.ComponentProps<"p">) {
141
131
  <p
142
132
  data-slot="field-description"
143
133
  className={cn(
144
- "text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance",
145
- "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
134
+ "text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
135
+ "last:mt-0 nth-last-2:-mt-1",
146
136
  "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
147
137
  className
148
138
  )}
@@ -30,7 +30,7 @@ function HoverCardContent({
30
30
  align={align}
31
31
  sideOffset={sideOffset}
32
32
  className={cn(
33
- "z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
33
+ "z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
34
34
  className
35
35
  )}
36
36
  {...props}
@@ -14,21 +14,7 @@ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
14
14
  data-slot="input-group"
15
15
  role="group"
16
16
  className={cn(
17
- "group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30",
18
- "h-9 min-w-0 has-[>textarea]:h-auto",
19
-
20
- // Variants based on alignment.
21
- "has-[>[data-align=inline-start]]:[&>input]:pl-2",
22
- "has-[>[data-align=inline-end]]:[&>input]:pr-2",
23
- "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
24
- "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
25
-
26
- // Focus state.
27
- "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50",
28
-
29
- // Error state.
30
- "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
31
-
17
+ "group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
32
18
  className
33
19
  )}
34
20
  {...props}
@@ -42,13 +28,13 @@ const inputGroupAddonVariants = cva(
42
28
  variants: {
43
29
  align: {
44
30
  "inline-start":
45
- "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
31
+ "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
46
32
  "inline-end":
47
- "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
33
+ "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
48
34
  "block-start":
49
- "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3",
35
+ "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
50
36
  "block-end":
51
- "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3",
37
+ "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
52
38
  },
53
39
  },
54
40
  defaultVariants: {
@@ -84,10 +70,10 @@ const inputGroupButtonVariants = cva(
84
70
  {
85
71
  variants: {
86
72
  size: {
87
- xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
88
- sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
73
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
74
+ sm: "",
89
75
  "icon-xs":
90
- "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
76
+ "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
91
77
  "icon-sm": "size-8 p-0 has-[>svg]:p-0",
92
78
  },
93
79
  },
@@ -136,7 +122,7 @@ function InputGroupInput({
136
122
  <Input
137
123
  data-slot="input-group-control"
138
124
  className={cn(
139
- "flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
125
+ "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
140
126
  className
141
127
  )}
142
128
  {...props}
@@ -152,7 +138,7 @@ function InputGroupTextarea({
152
138
  <Textarea
153
139
  data-slot="input-group-control"
154
140
  className={cn(
155
- "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
141
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
156
142
  className
157
143
  )}
158
144
  {...props}
@@ -2,9 +2,9 @@
2
2
 
3
3
  import * as React from "react"
4
4
  import { OTPInput, OTPInputContext } from "input-otp"
5
- import { MinusIcon } from "lucide-react"
6
5
 
7
6
  import { cn } from "@/lib/utils"
7
+ import { MinusIcon } from "lucide-react"
8
8
 
9
9
  function InputOTP({
10
10
  className,
@@ -17,9 +17,10 @@ function InputOTP({
17
17
  <OTPInput
18
18
  data-slot="input-otp"
19
19
  containerClassName={cn(
20
- "flex items-center gap-2 has-disabled:opacity-50",
20
+ "cn-input-otp flex items-center has-disabled:opacity-50",
21
21
  containerClassName
22
22
  )}
23
+ spellCheck={false}
23
24
  className={cn("disabled:cursor-not-allowed", className)}
24
25
  {...props}
25
26
  />
@@ -30,7 +31,10 @@ function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
30
31
  return (
31
32
  <div
32
33
  data-slot="input-otp-group"
33
- className={cn("flex items-center", className)}
34
+ className={cn(
35
+ "flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",
36
+ className
37
+ )}
34
38
  {...props}
35
39
  />
36
40
  )
@@ -51,7 +55,7 @@ function InputOTPSlot({
51
55
  data-slot="input-otp-slot"
52
56
  data-active={isActive}
53
57
  className={cn(
54
- "relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
58
+ "relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
55
59
  className
56
60
  )}
57
61
  {...props}
@@ -68,8 +72,14 @@ function InputOTPSlot({
68
72
 
69
73
  function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
70
74
  return (
71
- <div data-slot="input-otp-separator" role="separator" {...props}>
72
- <MinusIcon />
75
+ <div
76
+ data-slot="input-otp-separator"
77
+ className="flex items-center [&_svg:not([class*='size-'])]:size-4"
78
+ role="separator"
79
+ {...props}
80
+ >
81
+ <MinusIcon
82
+ />
73
83
  </div>
74
84
  )
75
85
  }
@@ -8,9 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
8
8
  type={type}
9
9
  data-slot="input"
10
10
  className={cn(
11
- "h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
12
- "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
13
- "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
11
+ "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
14
12
  className
15
13
  )}
16
14
  {...props}
@@ -10,7 +10,10 @@ function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
10
10
  <div
11
11
  role="list"
12
12
  data-slot="item-group"
13
- className={cn("group/item-group flex flex-col", className)}
13
+ className={cn(
14
+ "group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
15
+ className
16
+ )}
14
17
  {...props}
15
18
  />
16
19
  )
@@ -24,24 +27,25 @@ function ItemSeparator({
24
27
  <Separator
25
28
  data-slot="item-separator"
26
29
  orientation="horizontal"
27
- className={cn("my-0", className)}
30
+ className={cn("my-2", className)}
28
31
  {...props}
29
32
  />
30
33
  )
31
34
  }
32
35
 
33
36
  const itemVariants = cva(
34
- "group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-accent/50",
37
+ "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
35
38
  {
36
39
  variants: {
37
40
  variant: {
38
- default: "bg-transparent",
41
+ default: "border-transparent",
39
42
  outline: "border-border",
40
- muted: "bg-muted/50",
43
+ muted: "border-transparent bg-muted/50",
41
44
  },
42
45
  size: {
43
- default: "gap-4 p-4",
44
- sm: "gap-2.5 px-4 py-3",
46
+ default: "gap-2.5 px-3 py-2.5",
47
+ sm: "gap-2.5 px-3 py-2.5",
48
+ xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0",
45
49
  },
46
50
  },
47
51
  defaultVariants: {
@@ -72,14 +76,14 @@ function Item({
72
76
  }
73
77
 
74
78
  const itemMediaVariants = cva(
75
- "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",
79
+ "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
76
80
  {
77
81
  variants: {
78
82
  variant: {
79
83
  default: "bg-transparent",
80
- icon: "size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4",
84
+ icon: "[&_svg:not([class*='size-'])]:size-4",
81
85
  image:
82
- "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover",
86
+ "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover",
83
87
  },
84
88
  },
85
89
  defaultVariants: {
@@ -108,7 +112,7 @@ function ItemContent({ className, ...props }: React.ComponentProps<"div">) {
108
112
  <div
109
113
  data-slot="item-content"
110
114
  className={cn(
111
- "flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
115
+ "flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
112
116
  className
113
117
  )}
114
118
  {...props}
@@ -121,7 +125,7 @@ function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {
121
125
  <div
122
126
  data-slot="item-title"
123
127
  className={cn(
124
- "flex w-fit items-center gap-2 text-sm leading-snug font-medium",
128
+ "line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
125
129
  className
126
130
  )}
127
131
  {...props}
@@ -134,8 +138,7 @@ function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
134
138
  <p
135
139
  data-slot="item-description"
136
140
  className={cn(
137
- "line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground",
138
- "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
141
+ "line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
139
142
  className
140
143
  )}
141
144
  {...props}
@@ -5,9 +5,7 @@ function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
5
5
  <kbd
6
6
  data-slot="kbd"
7
7
  className={cn(
8
- "pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none",
9
- "[&_svg:not([class*='size-'])]:size-3",
10
- "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
8
+ "pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",
11
9
  className
12
10
  )}
13
11
  {...props}