@autono/open-pages 0.5.0 → 0.6.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 (80) hide show
  1. package/dist/{build-L50pau9v.js → build-6hM9Ga2d.js} +2 -2
  2. package/dist/cli/bin.js +14 -5
  3. package/dist/{config-C9or4m4J.d.ts → config-C-sasGou.d.ts} +1 -1
  4. package/dist/{config-CDUdFE8N.js → config-CBbwLHOo.js} +1 -1
  5. package/dist/{dev-CzJYXFOO.js → dev-BO0cHiYy.js} +2 -2
  6. package/dist/index.d.ts +2 -2
  7. package/dist/locale/index.d.ts +1 -1
  8. package/dist/{preview-CPufRmuj.js → preview-sOKhzyWB.js} +2 -2
  9. package/dist/sync-ui-CDydLpY4.js +134 -0
  10. package/dist/{update-CV62NhBT.js → update-D1U8TVwd.js} +13 -1
  11. package/dist/{update-package-Cxt57pz7.js → update-package-D9zws9nc.js} +7 -1
  12. package/dist/vite/index.d.ts +2 -2
  13. package/dist/vite/index.js +2 -2
  14. package/package.json +3 -2
  15. package/workspace/components.json +25 -0
  16. package/workspace/deps.json +24 -0
  17. package/workspace/hooks/use-mobile.ts +19 -0
  18. package/workspace/lib/utils.ts +6 -0
  19. package/workspace/styles/globals.css +135 -0
  20. package/workspace/ui/accordion.tsx +79 -0
  21. package/workspace/ui/alert-dialog.tsx +197 -0
  22. package/workspace/ui/alert.tsx +76 -0
  23. package/workspace/ui/aspect-ratio.tsx +11 -0
  24. package/workspace/ui/attachment.tsx +204 -0
  25. package/workspace/ui/avatar.tsx +110 -0
  26. package/workspace/ui/badge.tsx +49 -0
  27. package/workspace/ui/breadcrumb.tsx +122 -0
  28. package/workspace/ui/bubble.tsx +125 -0
  29. package/workspace/ui/button-group.tsx +83 -0
  30. package/workspace/ui/button.tsx +67 -0
  31. package/workspace/ui/calendar.tsx +222 -0
  32. package/workspace/ui/card.tsx +103 -0
  33. package/workspace/ui/carousel.tsx +240 -0
  34. package/workspace/ui/chart.tsx +373 -0
  35. package/workspace/ui/checkbox.tsx +31 -0
  36. package/workspace/ui/collapsible.tsx +33 -0
  37. package/workspace/ui/combobox.tsx +297 -0
  38. package/workspace/ui/command.tsx +195 -0
  39. package/workspace/ui/context-menu.tsx +261 -0
  40. package/workspace/ui/dialog.tsx +168 -0
  41. package/workspace/ui/direction.tsx +22 -0
  42. package/workspace/ui/drawer.tsx +132 -0
  43. package/workspace/ui/dropdown-menu.tsx +269 -0
  44. package/workspace/ui/empty.tsx +104 -0
  45. package/workspace/ui/field.tsx +236 -0
  46. package/workspace/ui/hover-card.tsx +42 -0
  47. package/workspace/ui/input-group.tsx +156 -0
  48. package/workspace/ui/input-otp.tsx +87 -0
  49. package/workspace/ui/input.tsx +19 -0
  50. package/workspace/ui/item.tsx +196 -0
  51. package/workspace/ui/kbd.tsx +26 -0
  52. package/workspace/ui/label.tsx +22 -0
  53. package/workspace/ui/marker.tsx +69 -0
  54. package/workspace/ui/menubar.tsx +280 -0
  55. package/workspace/ui/message-scroller.tsx +129 -0
  56. package/workspace/ui/message.tsx +92 -0
  57. package/workspace/ui/native-select.tsx +61 -0
  58. package/workspace/ui/navigation-menu.tsx +164 -0
  59. package/workspace/ui/pagination.tsx +129 -0
  60. package/workspace/ui/popover.tsx +87 -0
  61. package/workspace/ui/progress.tsx +31 -0
  62. package/workspace/ui/radio-group.tsx +42 -0
  63. package/workspace/ui/resizable.tsx +50 -0
  64. package/workspace/ui/scroll-area.tsx +53 -0
  65. package/workspace/ui/select.tsx +192 -0
  66. package/workspace/ui/separator.tsx +26 -0
  67. package/workspace/ui/sheet.tsx +147 -0
  68. package/workspace/ui/sidebar.tsx +702 -0
  69. package/workspace/ui/skeleton.tsx +13 -0
  70. package/workspace/ui/slider.tsx +59 -0
  71. package/workspace/ui/sonner.tsx +47 -0
  72. package/workspace/ui/spinner.tsx +10 -0
  73. package/workspace/ui/switch.tsx +33 -0
  74. package/workspace/ui/table.tsx +114 -0
  75. package/workspace/ui/tabs.tsx +90 -0
  76. package/workspace/ui/textarea.tsx +18 -0
  77. package/workspace/ui/toggle-group.tsx +87 -0
  78. package/workspace/ui/toggle.tsx +45 -0
  79. package/workspace/ui/tooltip.tsx +57 -0
  80. /package/dist/{types-C5NCdDT-.d.ts → types-BzxkFHhd.d.ts} +0 -0
@@ -0,0 +1,280 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Menubar as MenubarPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+ import { CheckIcon, ChevronRightIcon } from "lucide-react"
8
+
9
+ function Menubar({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<typeof MenubarPrimitive.Root>) {
13
+ return (
14
+ <MenubarPrimitive.Root
15
+ data-slot="menubar"
16
+ className={cn(
17
+ "flex h-8 items-center gap-0.5 rounded-lg border p-[3px]",
18
+ className
19
+ )}
20
+ {...props}
21
+ />
22
+ )
23
+ }
24
+
25
+ function MenubarMenu({
26
+ ...props
27
+ }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {
28
+ return <MenubarPrimitive.Menu data-slot="menubar-menu" {...props} />
29
+ }
30
+
31
+ function MenubarGroup({
32
+ ...props
33
+ }: React.ComponentProps<typeof MenubarPrimitive.Group>) {
34
+ return <MenubarPrimitive.Group data-slot="menubar-group" {...props} />
35
+ }
36
+
37
+ function MenubarPortal({
38
+ ...props
39
+ }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {
40
+ return <MenubarPrimitive.Portal data-slot="menubar-portal" {...props} />
41
+ }
42
+
43
+ function MenubarRadioGroup({
44
+ ...props
45
+ }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {
46
+ return (
47
+ <MenubarPrimitive.RadioGroup data-slot="menubar-radio-group" {...props} />
48
+ )
49
+ }
50
+
51
+ function MenubarTrigger({
52
+ className,
53
+ ...props
54
+ }: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {
55
+ return (
56
+ <MenubarPrimitive.Trigger
57
+ data-slot="menubar-trigger"
58
+ className={cn(
59
+ "flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",
60
+ className
61
+ )}
62
+ {...props}
63
+ />
64
+ )
65
+ }
66
+
67
+ function MenubarContent({
68
+ className,
69
+ align = "start",
70
+ alignOffset = -4,
71
+ sideOffset = 8,
72
+ ...props
73
+ }: React.ComponentProps<typeof MenubarPrimitive.Content>) {
74
+ return (
75
+ <MenubarPortal>
76
+ <MenubarPrimitive.Content
77
+ data-slot="menubar-content"
78
+ align={align}
79
+ alignOffset={alignOffset}
80
+ sideOffset={sideOffset}
81
+ className={cn("z-50 min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-hidden 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", className )}
82
+ {...props}
83
+ />
84
+ </MenubarPortal>
85
+ )
86
+ }
87
+
88
+ function MenubarItem({
89
+ className,
90
+ inset,
91
+ variant = "default",
92
+ ...props
93
+ }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
94
+ inset?: boolean
95
+ variant?: "default" | "destructive"
96
+ }) {
97
+ return (
98
+ <MenubarPrimitive.Item
99
+ data-slot="menubar-item"
100
+ data-inset={inset}
101
+ data-variant={variant}
102
+ className={cn(
103
+ "group/menubar-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!",
104
+ className
105
+ )}
106
+ {...props}
107
+ />
108
+ )
109
+ }
110
+
111
+ function MenubarCheckboxItem({
112
+ className,
113
+ children,
114
+ checked,
115
+ inset,
116
+ ...props
117
+ }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem> & {
118
+ inset?: boolean
119
+ }) {
120
+ return (
121
+ <MenubarPrimitive.CheckboxItem
122
+ data-slot="menubar-checkbox-item"
123
+ data-inset={inset}
124
+ className={cn(
125
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 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 [&_svg]:pointer-events-none [&_svg]:shrink-0",
126
+ className
127
+ )}
128
+ checked={checked}
129
+ {...props}
130
+ >
131
+ <span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
132
+ <MenubarPrimitive.ItemIndicator>
133
+ <CheckIcon
134
+ />
135
+ </MenubarPrimitive.ItemIndicator>
136
+ </span>
137
+ {children}
138
+ </MenubarPrimitive.CheckboxItem>
139
+ )
140
+ }
141
+
142
+ function MenubarRadioItem({
143
+ className,
144
+ children,
145
+ inset,
146
+ ...props
147
+ }: React.ComponentProps<typeof MenubarPrimitive.RadioItem> & {
148
+ inset?: boolean
149
+ }) {
150
+ return (
151
+ <MenubarPrimitive.RadioItem
152
+ data-slot="menubar-radio-item"
153
+ data-inset={inset}
154
+ className={cn(
155
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 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",
156
+ className
157
+ )}
158
+ {...props}
159
+ >
160
+ <span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
161
+ <MenubarPrimitive.ItemIndicator>
162
+ <CheckIcon
163
+ />
164
+ </MenubarPrimitive.ItemIndicator>
165
+ </span>
166
+ {children}
167
+ </MenubarPrimitive.RadioItem>
168
+ )
169
+ }
170
+
171
+ function MenubarLabel({
172
+ className,
173
+ inset,
174
+ ...props
175
+ }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
176
+ inset?: boolean
177
+ }) {
178
+ return (
179
+ <MenubarPrimitive.Label
180
+ data-slot="menubar-label"
181
+ data-inset={inset}
182
+ className={cn(
183
+ "px-1.5 py-1 text-sm font-medium data-inset:pl-7",
184
+ className
185
+ )}
186
+ {...props}
187
+ />
188
+ )
189
+ }
190
+
191
+ function MenubarSeparator({
192
+ className,
193
+ ...props
194
+ }: React.ComponentProps<typeof MenubarPrimitive.Separator>) {
195
+ return (
196
+ <MenubarPrimitive.Separator
197
+ data-slot="menubar-separator"
198
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
199
+ {...props}
200
+ />
201
+ )
202
+ }
203
+
204
+ function MenubarShortcut({
205
+ className,
206
+ ...props
207
+ }: React.ComponentProps<"span">) {
208
+ return (
209
+ <span
210
+ data-slot="menubar-shortcut"
211
+ className={cn(
212
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
213
+ className
214
+ )}
215
+ {...props}
216
+ />
217
+ )
218
+ }
219
+
220
+ function MenubarSub({
221
+ ...props
222
+ }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {
223
+ return <MenubarPrimitive.Sub data-slot="menubar-sub" {...props} />
224
+ }
225
+
226
+ function MenubarSubTrigger({
227
+ className,
228
+ inset,
229
+ children,
230
+ ...props
231
+ }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
232
+ inset?: boolean
233
+ }) {
234
+ return (
235
+ <MenubarPrimitive.SubTrigger
236
+ data-slot="menubar-sub-trigger"
237
+ data-inset={inset}
238
+ className={cn(
239
+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
240
+ className
241
+ )}
242
+ {...props}
243
+ >
244
+ {children}
245
+ <ChevronRightIcon className="ml-auto size-4" />
246
+ </MenubarPrimitive.SubTrigger>
247
+ )
248
+ }
249
+
250
+ function MenubarSubContent({
251
+ className,
252
+ ...props
253
+ }: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {
254
+ return (
255
+ <MenubarPrimitive.SubContent
256
+ data-slot="menubar-sub-content"
257
+ className={cn("z-50 min-w-32 origin-(--radix-menubar-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 )}
258
+ {...props}
259
+ />
260
+ )
261
+ }
262
+
263
+ export {
264
+ Menubar,
265
+ MenubarPortal,
266
+ MenubarMenu,
267
+ MenubarTrigger,
268
+ MenubarContent,
269
+ MenubarGroup,
270
+ MenubarSeparator,
271
+ MenubarLabel,
272
+ MenubarItem,
273
+ MenubarShortcut,
274
+ MenubarCheckboxItem,
275
+ MenubarRadioGroup,
276
+ MenubarRadioItem,
277
+ MenubarSub,
278
+ MenubarSubTrigger,
279
+ MenubarSubContent,
280
+ }
@@ -0,0 +1,129 @@
1
+ import * as React from "react"
2
+ import {
3
+ MessageScroller as MessageScrollerPrimitive,
4
+ useMessageScroller,
5
+ useMessageScrollerScrollable,
6
+ useMessageScrollerVisibility,
7
+ } from "@shadcn/react/message-scroller"
8
+
9
+ import { cn } from "@/lib/utils"
10
+ import { Button } from "@/ui/button"
11
+ import { ArrowDownIcon } from "lucide-react"
12
+
13
+ function MessageScrollerProvider(
14
+ props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>
15
+ ) {
16
+ return <MessageScrollerPrimitive.Provider {...props} />
17
+ }
18
+
19
+ function MessageScroller({
20
+ className,
21
+ ...props
22
+ }: React.ComponentProps<typeof MessageScrollerPrimitive.Root>) {
23
+ return (
24
+ <MessageScrollerPrimitive.Root
25
+ data-slot="message-scroller"
26
+ className={cn(
27
+ "group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden",
28
+ className
29
+ )}
30
+ {...props}
31
+ />
32
+ )
33
+ }
34
+
35
+ function MessageScrollerViewport({
36
+ className,
37
+ ...props
38
+ }: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>) {
39
+ return (
40
+ <MessageScrollerPrimitive.Viewport
41
+ data-slot="message-scroller-viewport"
42
+ className={cn(
43
+ "size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent",
44
+ className
45
+ )}
46
+ {...props}
47
+ />
48
+ )
49
+ }
50
+
51
+ function MessageScrollerContent({
52
+ className,
53
+ ...props
54
+ }: React.ComponentProps<typeof MessageScrollerPrimitive.Content>) {
55
+ return (
56
+ <MessageScrollerPrimitive.Content
57
+ data-slot="message-scroller-content"
58
+ className={cn("flex h-max min-h-full flex-col gap-6", className)}
59
+ {...props}
60
+ />
61
+ )
62
+ }
63
+
64
+ function MessageScrollerItem({
65
+ className,
66
+ scrollAnchor = false,
67
+ ...props
68
+ }: React.ComponentProps<typeof MessageScrollerPrimitive.Item>) {
69
+ return (
70
+ <MessageScrollerPrimitive.Item
71
+ data-slot="message-scroller-item"
72
+ scrollAnchor={scrollAnchor}
73
+ className={cn(
74
+ "min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]",
75
+ className
76
+ )}
77
+ {...props}
78
+ />
79
+ )
80
+ }
81
+
82
+ function MessageScrollerButton({
83
+ direction = "end",
84
+ className,
85
+ children,
86
+ render,
87
+ variant = "secondary",
88
+ size = "icon-sm",
89
+ ...props
90
+ }: React.ComponentProps<typeof MessageScrollerPrimitive.Button> &
91
+ Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
92
+ return (
93
+ <MessageScrollerPrimitive.Button
94
+ data-slot="message-scroller-button"
95
+ data-direction={direction}
96
+ data-variant={variant}
97
+ data-size={size}
98
+ direction={direction}
99
+ className={cn(
100
+ "absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180",
101
+ className
102
+ )}
103
+ render={render ?? <Button variant={variant} size={size} />}
104
+ {...props}
105
+ >
106
+ {children ?? (
107
+ <>
108
+ <ArrowDownIcon
109
+ />
110
+ <span className="sr-only">
111
+ {direction === "end" ? "Scroll to end" : "Scroll to start"}
112
+ </span>
113
+ </>
114
+ )}
115
+ </MessageScrollerPrimitive.Button>
116
+ )
117
+ }
118
+
119
+ export {
120
+ MessageScrollerProvider,
121
+ MessageScroller,
122
+ MessageScrollerViewport,
123
+ MessageScrollerContent,
124
+ MessageScrollerItem,
125
+ MessageScrollerButton,
126
+ useMessageScroller,
127
+ useMessageScrollerScrollable,
128
+ useMessageScrollerVisibility,
129
+ }
@@ -0,0 +1,92 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function MessageGroup({ className, ...props }: React.ComponentProps<"div">) {
6
+ return (
7
+ <div
8
+ data-slot="message-group"
9
+ className={cn("flex min-w-0 flex-col gap-2", className)}
10
+ {...props}
11
+ />
12
+ )
13
+ }
14
+
15
+ function Message({
16
+ className,
17
+ align = "start",
18
+ ...props
19
+ }: React.ComponentProps<"div"> & { align?: "start" | "end" }) {
20
+ return (
21
+ <div
22
+ data-slot="message"
23
+ data-align={align}
24
+ className={cn(
25
+ "group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse",
26
+ className
27
+ )}
28
+ {...props}
29
+ />
30
+ )
31
+ }
32
+
33
+ function MessageAvatar({ className, ...props }: React.ComponentProps<"div">) {
34
+ return (
35
+ <div
36
+ data-slot="message-avatar"
37
+ className={cn(
38
+ "flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8",
39
+ className
40
+ )}
41
+ {...props}
42
+ />
43
+ )
44
+ }
45
+
46
+ function MessageContent({ className, ...props }: React.ComponentProps<"div">) {
47
+ return (
48
+ <div
49
+ data-slot="message-content"
50
+ className={cn(
51
+ "flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end",
52
+ className
53
+ )}
54
+ {...props}
55
+ />
56
+ )
57
+ }
58
+
59
+ function MessageHeader({ className, ...props }: React.ComponentProps<"div">) {
60
+ return (
61
+ <div
62
+ data-slot="message-header"
63
+ className={cn(
64
+ "flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0",
65
+ className
66
+ )}
67
+ {...props}
68
+ />
69
+ )
70
+ }
71
+
72
+ function MessageFooter({ className, ...props }: React.ComponentProps<"div">) {
73
+ return (
74
+ <div
75
+ data-slot="message-footer"
76
+ className={cn(
77
+ "flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end",
78
+ className
79
+ )}
80
+ {...props}
81
+ />
82
+ )
83
+ }
84
+
85
+ export {
86
+ MessageGroup,
87
+ Message,
88
+ MessageAvatar,
89
+ MessageContent,
90
+ MessageFooter,
91
+ MessageHeader,
92
+ }
@@ -0,0 +1,61 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+ import { ChevronDownIcon } from "lucide-react"
5
+
6
+ type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
7
+ size?: "sm" | "default"
8
+ }
9
+
10
+ function NativeSelect({
11
+ className,
12
+ size = "default",
13
+ ...props
14
+ }: NativeSelectProps) {
15
+ return (
16
+ <div
17
+ className={cn(
18
+ "group/native-select relative w-fit has-[select:disabled]:opacity-50",
19
+ className
20
+ )}
21
+ data-slot="native-select-wrapper"
22
+ data-size={size}
23
+ >
24
+ <select
25
+ data-slot="native-select"
26
+ data-size={size}
27
+ className="h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-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 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"
28
+ {...props}
29
+ />
30
+ <ChevronDownIcon className="pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none" aria-hidden="true" data-slot="native-select-icon" />
31
+ </div>
32
+ )
33
+ }
34
+
35
+ function NativeSelectOption({
36
+ className,
37
+ ...props
38
+ }: React.ComponentProps<"option">) {
39
+ return (
40
+ <option
41
+ data-slot="native-select-option"
42
+ className={cn("bg-[Canvas] text-[CanvasText]", className)}
43
+ {...props}
44
+ />
45
+ )
46
+ }
47
+
48
+ function NativeSelectOptGroup({
49
+ className,
50
+ ...props
51
+ }: React.ComponentProps<"optgroup">) {
52
+ return (
53
+ <optgroup
54
+ data-slot="native-select-optgroup"
55
+ className={cn("bg-[Canvas] text-[CanvasText]", className)}
56
+ {...props}
57
+ />
58
+ )
59
+ }
60
+
61
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption }