@autono/create-open-pages 0.3.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 +14 -22
  6. package/template/components.json +19 -3
  7. package/template/package.json +12 -12
  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,6 +1,7 @@
1
+ "use client"
2
+
1
3
  import * as React from "react"
2
4
  import { Command as CommandPrimitive } from "cmdk"
3
- import { SearchIcon } from "lucide-react"
4
5
 
5
6
  import { cn } from "@/lib/utils"
6
7
  import {
@@ -10,6 +11,11 @@ import {
10
11
  DialogHeader,
11
12
  DialogTitle,
12
13
  } from "@/ui/dialog"
14
+ import {
15
+ InputGroup,
16
+ InputGroupAddon,
17
+ } from "@/ui/input-group"
18
+ import { SearchIcon, CheckIcon } from "lucide-react"
13
19
 
14
20
  function Command({
15
21
  className,
@@ -19,7 +25,7 @@ function Command({
19
25
  <CommandPrimitive
20
26
  data-slot="command"
21
27
  className={cn(
22
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
28
+ "flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
23
29
  className
24
30
  )}
25
31
  {...props}
@@ -32,7 +38,7 @@ function CommandDialog({
32
38
  description = "Search for a command to run...",
33
39
  children,
34
40
  className,
35
- showCloseButton = true,
41
+ showCloseButton = false,
36
42
  ...props
37
43
  }: React.ComponentProps<typeof Dialog> & {
38
44
  title?: string
@@ -47,12 +53,13 @@ function CommandDialog({
47
53
  <DialogDescription>{description}</DialogDescription>
48
54
  </DialogHeader>
49
55
  <DialogContent
50
- className={cn("overflow-hidden p-0", className)}
56
+ className={cn(
57
+ "top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
58
+ className
59
+ )}
51
60
  showCloseButton={showCloseButton}
52
61
  >
53
- <Command className="**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
54
- {children}
55
- </Command>
62
+ {children}
56
63
  </DialogContent>
57
64
  </Dialog>
58
65
  )
@@ -63,19 +70,20 @@ function CommandInput({
63
70
  ...props
64
71
  }: React.ComponentProps<typeof CommandPrimitive.Input>) {
65
72
  return (
66
- <div
67
- data-slot="command-input-wrapper"
68
- className="flex h-9 items-center gap-2 border-b px-3"
69
- >
70
- <SearchIcon className="size-4 shrink-0 opacity-50" />
71
- <CommandPrimitive.Input
72
- data-slot="command-input"
73
- className={cn(
74
- "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
75
- className
76
- )}
77
- {...props}
78
- />
73
+ <div data-slot="command-input-wrapper" className="p-1 pb-0">
74
+ <InputGroup className="h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!">
75
+ <CommandPrimitive.Input
76
+ data-slot="command-input"
77
+ className={cn(
78
+ "w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
79
+ className
80
+ )}
81
+ {...props}
82
+ />
83
+ <InputGroupAddon>
84
+ <SearchIcon className="size-4 shrink-0 opacity-50" />
85
+ </InputGroupAddon>
86
+ </InputGroup>
79
87
  </div>
80
88
  )
81
89
  }
@@ -88,7 +96,7 @@ function CommandList({
88
96
  <CommandPrimitive.List
89
97
  data-slot="command-list"
90
98
  className={cn(
91
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
99
+ "no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
92
100
  className
93
101
  )}
94
102
  {...props}
@@ -97,12 +105,13 @@ function CommandList({
97
105
  }
98
106
 
99
107
  function CommandEmpty({
108
+ className,
100
109
  ...props
101
110
  }: React.ComponentProps<typeof CommandPrimitive.Empty>) {
102
111
  return (
103
112
  <CommandPrimitive.Empty
104
113
  data-slot="command-empty"
105
- className="py-6 text-center text-sm"
114
+ className={cn("py-6 text-center text-sm", className)}
106
115
  {...props}
107
116
  />
108
117
  )
@@ -116,7 +125,7 @@ function CommandGroup({
116
125
  <CommandPrimitive.Group
117
126
  data-slot="command-group"
118
127
  className={cn(
119
- "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
128
+ "overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
120
129
  className
121
130
  )}
122
131
  {...props}
@@ -139,17 +148,21 @@ function CommandSeparator({
139
148
 
140
149
  function CommandItem({
141
150
  className,
151
+ children,
142
152
  ...props
143
153
  }: React.ComponentProps<typeof CommandPrimitive.Item>) {
144
154
  return (
145
155
  <CommandPrimitive.Item
146
156
  data-slot="command-item"
147
157
  className={cn(
148
- "relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
158
+ "group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
149
159
  className
150
160
  )}
151
161
  {...props}
152
- />
162
+ >
163
+ {children}
164
+ <CheckIcon className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
165
+ </CommandPrimitive.Item>
153
166
  )
154
167
  }
155
168
 
@@ -161,7 +174,7 @@ function CommandShortcut({
161
174
  <span
162
175
  data-slot="command-shortcut"
163
176
  className={cn(
164
- "ml-auto text-xs tracking-widest text-muted-foreground",
177
+ "ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
165
178
  className
166
179
  )}
167
180
  {...props}
@@ -1,10 +1,8 @@
1
- "use client"
2
-
3
1
  import * as React from "react"
4
- import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
5
2
  import { ContextMenu as ContextMenuPrimitive } from "radix-ui"
6
3
 
7
4
  import { cn } from "@/lib/utils"
5
+ import { ChevronRightIcon, CheckIcon } from "lucide-react"
8
6
 
9
7
  function ContextMenu({
10
8
  ...props
@@ -13,10 +11,15 @@ function ContextMenu({
13
11
  }
14
12
 
15
13
  function ContextMenuTrigger({
14
+ className,
16
15
  ...props
17
16
  }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {
18
17
  return (
19
- <ContextMenuPrimitive.Trigger data-slot="context-menu-trigger" {...props} />
18
+ <ContextMenuPrimitive.Trigger
19
+ data-slot="context-menu-trigger"
20
+ className={cn("select-none", className)}
21
+ {...props}
22
+ />
20
23
  )
21
24
  }
22
25
 
@@ -53,58 +56,17 @@ function ContextMenuRadioGroup({
53
56
  )
54
57
  }
55
58
 
56
- function ContextMenuSubTrigger({
57
- className,
58
- inset,
59
- children,
60
- ...props
61
- }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
62
- inset?: boolean
63
- }) {
64
- return (
65
- <ContextMenuPrimitive.SubTrigger
66
- data-slot="context-menu-sub-trigger"
67
- data-inset={inset}
68
- className={cn(
69
- "flex cursor-default items-center 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",
70
- className
71
- )}
72
- {...props}
73
- >
74
- {children}
75
- <ChevronRightIcon className="ml-auto" />
76
- </ContextMenuPrimitive.SubTrigger>
77
- )
78
- }
79
-
80
- function ContextMenuSubContent({
81
- className,
82
- ...props
83
- }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {
84
- return (
85
- <ContextMenuPrimitive.SubContent
86
- data-slot="context-menu-sub-content"
87
- className={cn(
88
- "z-50 min-w-[8rem] origin-(--radix-context-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",
89
- className
90
- )}
91
- {...props}
92
- />
93
- )
94
- }
95
-
96
59
  function ContextMenuContent({
97
60
  className,
98
61
  ...props
99
- }: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {
62
+ }: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {
63
+ side?: "top" | "right" | "bottom" | "left"
64
+ }) {
100
65
  return (
101
66
  <ContextMenuPrimitive.Portal>
102
67
  <ContextMenuPrimitive.Content
103
68
  data-slot="context-menu-content"
104
- className={cn(
105
- "z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-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",
106
- className
107
- )}
69
+ className={cn("z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-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-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 )}
108
70
  {...props}
109
71
  />
110
72
  </ContextMenuPrimitive.Portal>
@@ -126,7 +88,7 @@ function ContextMenuItem({
126
88
  data-inset={inset}
127
89
  data-variant={variant}
128
90
  className={cn(
129
- "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!",
91
+ "group/context-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 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 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
130
92
  className
131
93
  )}
132
94
  {...props}
@@ -134,25 +96,67 @@ function ContextMenuItem({
134
96
  )
135
97
  }
136
98
 
99
+ function ContextMenuSubTrigger({
100
+ className,
101
+ inset,
102
+ children,
103
+ ...props
104
+ }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
105
+ inset?: boolean
106
+ }) {
107
+ return (
108
+ <ContextMenuPrimitive.SubTrigger
109
+ data-slot="context-menu-sub-trigger"
110
+ data-inset={inset}
111
+ className={cn(
112
+ "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 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",
113
+ className
114
+ )}
115
+ {...props}
116
+ >
117
+ {children}
118
+ <ChevronRightIcon className="ml-auto" />
119
+ </ContextMenuPrimitive.SubTrigger>
120
+ )
121
+ }
122
+
123
+ function ContextMenuSubContent({
124
+ className,
125
+ ...props
126
+ }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {
127
+ return (
128
+ <ContextMenuPrimitive.SubContent
129
+ data-slot="context-menu-sub-content"
130
+ className={cn("z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg 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 )}
131
+ {...props}
132
+ />
133
+ )
134
+ }
135
+
137
136
  function ContextMenuCheckboxItem({
138
137
  className,
139
138
  children,
140
139
  checked,
140
+ inset,
141
141
  ...props
142
- }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>) {
142
+ }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {
143
+ inset?: boolean
144
+ }) {
143
145
  return (
144
146
  <ContextMenuPrimitive.CheckboxItem
145
147
  data-slot="context-menu-checkbox-item"
148
+ data-inset={inset}
146
149
  className={cn(
147
- "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",
150
+ "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 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",
148
151
  className
149
152
  )}
150
153
  checked={checked}
151
154
  {...props}
152
155
  >
153
- <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
156
+ <span className="pointer-events-none absolute right-2">
154
157
  <ContextMenuPrimitive.ItemIndicator>
155
- <CheckIcon className="size-4" />
158
+ <CheckIcon
159
+ />
156
160
  </ContextMenuPrimitive.ItemIndicator>
157
161
  </span>
158
162
  {children}
@@ -163,20 +167,25 @@ function ContextMenuCheckboxItem({
163
167
  function ContextMenuRadioItem({
164
168
  className,
165
169
  children,
170
+ inset,
166
171
  ...props
167
- }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>) {
172
+ }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {
173
+ inset?: boolean
174
+ }) {
168
175
  return (
169
176
  <ContextMenuPrimitive.RadioItem
170
177
  data-slot="context-menu-radio-item"
178
+ data-inset={inset}
171
179
  className={cn(
172
- "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",
180
+ "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 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",
173
181
  className
174
182
  )}
175
183
  {...props}
176
184
  >
177
- <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
185
+ <span className="pointer-events-none absolute right-2">
178
186
  <ContextMenuPrimitive.ItemIndicator>
179
- <CircleIcon className="size-2 fill-current" />
187
+ <CheckIcon
188
+ />
180
189
  </ContextMenuPrimitive.ItemIndicator>
181
190
  </span>
182
191
  {children}
@@ -196,7 +205,7 @@ function ContextMenuLabel({
196
205
  data-slot="context-menu-label"
197
206
  data-inset={inset}
198
207
  className={cn(
199
- "px-2 py-1.5 text-sm font-medium text-foreground data-[inset]:pl-8",
208
+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
200
209
  className
201
210
  )}
202
211
  {...props}
@@ -225,7 +234,7 @@ function ContextMenuShortcut({
225
234
  <span
226
235
  data-slot="context-menu-shortcut"
227
236
  className={cn(
228
- "ml-auto text-xs tracking-widest text-muted-foreground",
237
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
229
238
  className
230
239
  )}
231
240
  {...props}
@@ -1,9 +1,11 @@
1
+ "use client"
2
+
1
3
  import * as React from "react"
2
- import { XIcon } from "lucide-react"
3
4
  import { Dialog as DialogPrimitive } from "radix-ui"
4
5
 
5
6
  import { cn } from "@/lib/utils"
6
7
  import { Button } from "@/ui/button"
8
+ import { XIcon } from "lucide-react"
7
9
 
8
10
  function Dialog({
9
11
  ...props
@@ -37,7 +39,7 @@ function DialogOverlay({
37
39
  <DialogPrimitive.Overlay
38
40
  data-slot="dialog-overlay"
39
41
  className={cn(
40
- "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
42
+ "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
41
43
  className
42
44
  )}
43
45
  {...props}
@@ -54,24 +56,28 @@ function DialogContent({
54
56
  showCloseButton?: boolean
55
57
  }) {
56
58
  return (
57
- <DialogPortal data-slot="dialog-portal">
59
+ <DialogPortal>
58
60
  <DialogOverlay />
59
61
  <DialogPrimitive.Content
60
62
  data-slot="dialog-content"
61
63
  className={cn(
62
- "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none 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 sm:max-w-lg",
64
+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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",
63
65
  className
64
66
  )}
65
67
  {...props}
66
68
  >
67
69
  {children}
68
70
  {showCloseButton && (
69
- <DialogPrimitive.Close
70
- data-slot="dialog-close"
71
- className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
72
- >
73
- <XIcon />
74
- <span className="sr-only">Close</span>
71
+ <DialogPrimitive.Close data-slot="dialog-close" asChild>
72
+ <Button
73
+ variant="ghost"
74
+ className="absolute top-2 right-2"
75
+ size="icon-sm"
76
+ >
77
+ <XIcon
78
+ />
79
+ <span className="sr-only">Close</span>
80
+ </Button>
75
81
  </DialogPrimitive.Close>
76
82
  )}
77
83
  </DialogPrimitive.Content>
@@ -83,7 +89,7 @@ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
83
89
  return (
84
90
  <div
85
91
  data-slot="dialog-header"
86
- className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
92
+ className={cn("flex flex-col gap-2", className)}
87
93
  {...props}
88
94
  />
89
95
  )
@@ -101,7 +107,7 @@ function DialogFooter({
101
107
  <div
102
108
  data-slot="dialog-footer"
103
109
  className={cn(
104
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
110
+ "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
105
111
  className
106
112
  )}
107
113
  {...props}
@@ -123,7 +129,10 @@ function DialogTitle({
123
129
  return (
124
130
  <DialogPrimitive.Title
125
131
  data-slot="dialog-title"
126
- className={cn("text-lg leading-none font-semibold", className)}
132
+ className={cn(
133
+ "font-heading text-base leading-none font-medium",
134
+ className
135
+ )}
127
136
  {...props}
128
137
  />
129
138
  )
@@ -136,7 +145,10 @@ function DialogDescription({
136
145
  return (
137
146
  <DialogPrimitive.Description
138
147
  data-slot="dialog-description"
139
- className={cn("text-sm text-muted-foreground", className)}
148
+ className={cn(
149
+ "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
150
+ className
151
+ )}
140
152
  {...props}
141
153
  />
142
154
  )
@@ -35,7 +35,7 @@ function DrawerOverlay({
35
35
  <DrawerPrimitive.Overlay
36
36
  data-slot="drawer-overlay"
37
37
  className={cn(
38
- "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
38
+ "fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
39
39
  className
40
40
  )}
41
41
  {...props}
@@ -54,16 +54,12 @@ function DrawerContent({
54
54
  <DrawerPrimitive.Content
55
55
  data-slot="drawer-content"
56
56
  className={cn(
57
- "group/drawer-content fixed z-50 flex h-auto flex-col bg-background",
58
- "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
59
- "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
60
- "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
61
- "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
57
+ "group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
62
58
  className
63
59
  )}
64
60
  {...props}
65
61
  >
66
- <div className="mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
62
+ <div className="mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
67
63
  {children}
68
64
  </DrawerPrimitive.Content>
69
65
  </DrawerPortal>
@@ -75,7 +71,7 @@ function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
75
71
  <div
76
72
  data-slot="drawer-header"
77
73
  className={cn(
78
- "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
74
+ "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left",
79
75
  className
80
76
  )}
81
77
  {...props}
@@ -100,7 +96,10 @@ function DrawerTitle({
100
96
  return (
101
97
  <DrawerPrimitive.Title
102
98
  data-slot="drawer-title"
103
- className={cn("font-semibold text-foreground", className)}
99
+ className={cn(
100
+ "font-heading text-base font-medium text-foreground",
101
+ className
102
+ )}
104
103
  {...props}
105
104
  />
106
105
  )