@augmenting-integrations/ui 0.1.0 → 0.2.2

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 (84) hide show
  1. package/dist/components/ui/avatar.d.ts +5 -5
  2. package/dist/components/ui/avatar.d.ts.map +1 -1
  3. package/dist/components/ui/badge.d.ts +5 -3
  4. package/dist/components/ui/badge.d.ts.map +1 -1
  5. package/dist/components/ui/button.d.ts +5 -3
  6. package/dist/components/ui/button.d.ts.map +1 -1
  7. package/dist/components/ui/card.d.ts +1 -3
  8. package/dist/components/ui/card.d.ts.map +1 -1
  9. package/dist/components/ui/checkbox.d.ts +3 -2
  10. package/dist/components/ui/checkbox.d.ts.map +1 -1
  11. package/dist/components/ui/dialog.d.ts +9 -9
  12. package/dist/components/ui/dialog.d.ts.map +1 -1
  13. package/dist/components/ui/dropdown-menu.d.ts +16 -20
  14. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  15. package/dist/components/ui/input.d.ts.map +1 -1
  16. package/dist/components/ui/label.d.ts +2 -1
  17. package/dist/components/ui/label.d.ts.map +1 -1
  18. package/dist/components/ui/select.d.ts +11 -11
  19. package/dist/components/ui/select.d.ts.map +1 -1
  20. package/dist/components/ui/separator.d.ts +3 -2
  21. package/dist/components/ui/separator.d.ts.map +1 -1
  22. package/dist/components/ui/sheet.d.ts +7 -7
  23. package/dist/components/ui/sheet.d.ts.map +1 -1
  24. package/dist/components/ui/tabs.d.ts +7 -6
  25. package/dist/components/ui/tabs.d.ts.map +1 -1
  26. package/dist/index.cjs +1688 -0
  27. package/dist/index.cjs.map +1 -0
  28. package/dist/index.js +1561 -31
  29. package/dist/index.js.map +1 -1
  30. package/package.json +6 -6
  31. package/dist/components/chrome/Logo.jsx +0 -19
  32. package/dist/components/chrome/Logo.jsx.map +0 -1
  33. package/dist/components/chrome/RoleSwitcher.jsx +0 -32
  34. package/dist/components/chrome/RoleSwitcher.jsx.map +0 -1
  35. package/dist/components/chrome/ThemeSwitcher.jsx +0 -43
  36. package/dist/components/chrome/ThemeSwitcher.jsx.map +0 -1
  37. package/dist/components/shells/AppShell.jsx +0 -67
  38. package/dist/components/shells/AppShell.jsx.map +0 -1
  39. package/dist/components/shells/PublicShell.jsx +0 -42
  40. package/dist/components/shells/PublicShell.jsx.map +0 -1
  41. package/dist/components/shells/StudioShell.jsx +0 -20
  42. package/dist/components/shells/StudioShell.jsx.map +0 -1
  43. package/dist/components/ui/avatar.jsx +0 -24
  44. package/dist/components/ui/avatar.jsx.map +0 -1
  45. package/dist/components/ui/badge.jsx +0 -34
  46. package/dist/components/ui/badge.jsx.map +0 -1
  47. package/dist/components/ui/button.jsx +0 -34
  48. package/dist/components/ui/button.jsx.map +0 -1
  49. package/dist/components/ui/card.jsx +0 -25
  50. package/dist/components/ui/card.jsx.map +0 -1
  51. package/dist/components/ui/checkbox.jsx +0 -13
  52. package/dist/components/ui/checkbox.jsx.map +0 -1
  53. package/dist/components/ui/dialog.jsx +0 -52
  54. package/dist/components/ui/dialog.jsx.map +0 -1
  55. package/dist/components/ui/dropdown-menu.jsx +0 -73
  56. package/dist/components/ui/dropdown-menu.jsx.map +0 -1
  57. package/dist/components/ui/input.jsx +0 -8
  58. package/dist/components/ui/input.jsx.map +0 -1
  59. package/dist/components/ui/label.jsx +0 -8
  60. package/dist/components/ui/label.jsx.map +0 -1
  61. package/dist/components/ui/select.jsx +0 -57
  62. package/dist/components/ui/select.jsx.map +0 -1
  63. package/dist/components/ui/separator.jsx +0 -8
  64. package/dist/components/ui/separator.jsx.map +0 -1
  65. package/dist/components/ui/sheet.jsx +0 -47
  66. package/dist/components/ui/sheet.jsx.map +0 -1
  67. package/dist/components/ui/table.jsx +0 -31
  68. package/dist/components/ui/table.jsx.map +0 -1
  69. package/dist/components/ui/tabs.jsx +0 -29
  70. package/dist/components/ui/tabs.jsx.map +0 -1
  71. package/dist/components/ui/textarea.jsx +0 -7
  72. package/dist/components/ui/textarea.jsx.map +0 -1
  73. package/dist/index.mjs +0 -1585
  74. package/dist/index.mjs.map +0 -1
  75. package/dist/lib/utils.js +0 -6
  76. package/dist/lib/utils.js.map +0 -1
  77. package/dist/providers/MockProvider.jsx +0 -59
  78. package/dist/providers/MockProvider.jsx.map +0 -1
  79. package/dist/providers/QueryProvider.jsx +0 -12
  80. package/dist/providers/QueryProvider.jsx.map +0 -1
  81. package/dist/providers/SessionProvider.jsx +0 -6
  82. package/dist/providers/SessionProvider.jsx.map +0 -1
  83. package/dist/providers/ThemeProvider.jsx +0 -44
  84. package/dist/providers/ThemeProvider.jsx.map +0 -1
package/dist/index.mjs DELETED
@@ -1,1585 +0,0 @@
1
- // src/components/ui/avatar.tsx
2
- import * as React2 from "react";
3
- import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
4
-
5
- // src/lib/utils.ts
6
- import { clsx } from "clsx";
7
- import { twMerge } from "tailwind-merge";
8
- function cn(...inputs) {
9
- return twMerge(clsx(inputs));
10
- }
11
-
12
- // src/components/ui/avatar.tsx
13
- function Avatar({
14
- className,
15
- size = "default",
16
- ...props
17
- }) {
18
- return /* @__PURE__ */ React2.createElement(
19
- AvatarPrimitive.Root,
20
- {
21
- "data-slot": "avatar",
22
- "data-size": size,
23
- className: cn(
24
- "group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
25
- className
26
- ),
27
- ...props
28
- }
29
- );
30
- }
31
- function AvatarImage({ className, ...props }) {
32
- return /* @__PURE__ */ React2.createElement(
33
- AvatarPrimitive.Image,
34
- {
35
- "data-slot": "avatar-image",
36
- className: cn("aspect-square size-full rounded-full object-cover", className),
37
- ...props
38
- }
39
- );
40
- }
41
- function AvatarFallback({ className, ...props }) {
42
- return /* @__PURE__ */ React2.createElement(
43
- AvatarPrimitive.Fallback,
44
- {
45
- "data-slot": "avatar-fallback",
46
- className: cn(
47
- "flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
48
- className
49
- ),
50
- ...props
51
- }
52
- );
53
- }
54
- function AvatarBadge({ className, ...props }) {
55
- return /* @__PURE__ */ React2.createElement(
56
- "span",
57
- {
58
- "data-slot": "avatar-badge",
59
- className: cn(
60
- "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
61
- "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
62
- "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
63
- "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
64
- className
65
- ),
66
- ...props
67
- }
68
- );
69
- }
70
- function AvatarGroup({ className, ...props }) {
71
- return /* @__PURE__ */ React2.createElement(
72
- "div",
73
- {
74
- "data-slot": "avatar-group",
75
- className: cn(
76
- "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
77
- className
78
- ),
79
- ...props
80
- }
81
- );
82
- }
83
- function AvatarGroupCount({ className, ...props }) {
84
- return /* @__PURE__ */ React2.createElement(
85
- "div",
86
- {
87
- "data-slot": "avatar-group-count",
88
- className: cn(
89
- "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
90
- className
91
- ),
92
- ...props
93
- }
94
- );
95
- }
96
-
97
- // src/components/ui/badge.tsx
98
- import { mergeProps } from "@base-ui/react/merge-props";
99
- import { useRender } from "@base-ui/react/use-render";
100
- import { cva } from "class-variance-authority";
101
- var badgeVariants = cva(
102
- "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
103
- {
104
- variants: {
105
- variant: {
106
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
107
- secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
108
- destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
109
- outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
110
- ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
111
- link: "text-primary underline-offset-4 hover:underline"
112
- }
113
- },
114
- defaultVariants: {
115
- variant: "default"
116
- }
117
- }
118
- );
119
- function Badge({
120
- className,
121
- variant = "default",
122
- render,
123
- ...props
124
- }) {
125
- return useRender({
126
- defaultTagName: "span",
127
- props: mergeProps(
128
- {
129
- className: cn(badgeVariants({ variant }), className)
130
- },
131
- props
132
- ),
133
- render,
134
- state: {
135
- slot: "badge",
136
- variant
137
- }
138
- });
139
- }
140
-
141
- // src/components/ui/button.tsx
142
- import { Button as ButtonPrimitive } from "@base-ui/react/button";
143
- import { cva as cva2 } from "class-variance-authority";
144
- var buttonVariants = cva2(
145
- "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
146
- {
147
- variants: {
148
- variant: {
149
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
150
- outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
151
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
152
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
153
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
154
- link: "text-primary underline-offset-4 hover:underline"
155
- },
156
- size: {
157
- default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
158
- xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
159
- sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
160
- lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
161
- icon: "size-8",
162
- "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
163
- "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
164
- "icon-lg": "size-9"
165
- }
166
- },
167
- defaultVariants: {
168
- variant: "default",
169
- size: "default"
170
- }
171
- }
172
- );
173
- function Button({
174
- className,
175
- variant = "default",
176
- size = "default",
177
- ...props
178
- }) {
179
- return /* @__PURE__ */ React.createElement(
180
- ButtonPrimitive,
181
- {
182
- "data-slot": "button",
183
- className: cn(buttonVariants({ variant, size, className })),
184
- ...props
185
- }
186
- );
187
- }
188
-
189
- // src/components/ui/card.tsx
190
- import * as React3 from "react";
191
- function Card({
192
- className,
193
- size = "default",
194
- ...props
195
- }) {
196
- return /* @__PURE__ */ React3.createElement(
197
- "div",
198
- {
199
- "data-slot": "card",
200
- "data-size": size,
201
- className: cn(
202
- "group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
203
- className
204
- ),
205
- ...props
206
- }
207
- );
208
- }
209
- function CardHeader({ className, ...props }) {
210
- return /* @__PURE__ */ React3.createElement(
211
- "div",
212
- {
213
- "data-slot": "card-header",
214
- className: cn(
215
- "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",
216
- className
217
- ),
218
- ...props
219
- }
220
- );
221
- }
222
- function CardTitle({ className, ...props }) {
223
- return /* @__PURE__ */ React3.createElement(
224
- "div",
225
- {
226
- "data-slot": "card-title",
227
- className: cn(
228
- "font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
229
- className
230
- ),
231
- ...props
232
- }
233
- );
234
- }
235
- function CardDescription({ className, ...props }) {
236
- return /* @__PURE__ */ React3.createElement(
237
- "div",
238
- {
239
- "data-slot": "card-description",
240
- className: cn("text-sm text-muted-foreground", className),
241
- ...props
242
- }
243
- );
244
- }
245
- function CardAction({ className, ...props }) {
246
- return /* @__PURE__ */ React3.createElement(
247
- "div",
248
- {
249
- "data-slot": "card-action",
250
- className: cn(
251
- "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
252
- className
253
- ),
254
- ...props
255
- }
256
- );
257
- }
258
- function CardContent({ className, ...props }) {
259
- return /* @__PURE__ */ React3.createElement(
260
- "div",
261
- {
262
- "data-slot": "card-content",
263
- className: cn("px-4 group-data-[size=sm]/card:px-3", className),
264
- ...props
265
- }
266
- );
267
- }
268
- function CardFooter({ className, ...props }) {
269
- return /* @__PURE__ */ React3.createElement(
270
- "div",
271
- {
272
- "data-slot": "card-footer",
273
- className: cn(
274
- "flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",
275
- className
276
- ),
277
- ...props
278
- }
279
- );
280
- }
281
-
282
- // src/components/ui/checkbox.tsx
283
- import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
284
- import { CheckIcon } from "lucide-react";
285
- function Checkbox({ className, ...props }) {
286
- return /* @__PURE__ */ React.createElement(
287
- CheckboxPrimitive.Root,
288
- {
289
- "data-slot": "checkbox",
290
- className: cn(
291
- "peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
292
- className
293
- ),
294
- ...props
295
- },
296
- /* @__PURE__ */ React.createElement(
297
- CheckboxPrimitive.Indicator,
298
- {
299
- "data-slot": "checkbox-indicator",
300
- className: "grid place-content-center text-current transition-none [&>svg]:size-3.5"
301
- },
302
- /* @__PURE__ */ React.createElement(CheckIcon, null)
303
- )
304
- );
305
- }
306
-
307
- // src/components/ui/dialog.tsx
308
- import * as React4 from "react";
309
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
310
- import { XIcon } from "lucide-react";
311
- function Dialog({ ...props }) {
312
- return /* @__PURE__ */ React4.createElement(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
313
- }
314
- function DialogTrigger({ ...props }) {
315
- return /* @__PURE__ */ React4.createElement(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
316
- }
317
- function DialogPortal({ ...props }) {
318
- return /* @__PURE__ */ React4.createElement(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
319
- }
320
- function DialogClose({ ...props }) {
321
- return /* @__PURE__ */ React4.createElement(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
322
- }
323
- function DialogOverlay({ className, ...props }) {
324
- return /* @__PURE__ */ React4.createElement(
325
- DialogPrimitive.Backdrop,
326
- {
327
- "data-slot": "dialog-overlay",
328
- className: cn(
329
- "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",
330
- className
331
- ),
332
- ...props
333
- }
334
- );
335
- }
336
- function DialogContent({
337
- className,
338
- children,
339
- showCloseButton = true,
340
- ...props
341
- }) {
342
- return /* @__PURE__ */ React4.createElement(DialogPortal, null, /* @__PURE__ */ React4.createElement(DialogOverlay, null), /* @__PURE__ */ React4.createElement(
343
- DialogPrimitive.Popup,
344
- {
345
- "data-slot": "dialog-content",
346
- className: cn(
347
- "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",
348
- className
349
- ),
350
- ...props
351
- },
352
- children,
353
- showCloseButton && /* @__PURE__ */ React4.createElement(
354
- DialogPrimitive.Close,
355
- {
356
- "data-slot": "dialog-close",
357
- render: /* @__PURE__ */ React4.createElement(Button, { variant: "ghost", className: "absolute top-2 right-2", size: "icon-sm" })
358
- },
359
- /* @__PURE__ */ React4.createElement(XIcon, null),
360
- /* @__PURE__ */ React4.createElement("span", { className: "sr-only" }, "Close")
361
- )
362
- ));
363
- }
364
- function DialogHeader({ className, ...props }) {
365
- return /* @__PURE__ */ React4.createElement(
366
- "div",
367
- {
368
- "data-slot": "dialog-header",
369
- className: cn("flex flex-col gap-2", className),
370
- ...props
371
- }
372
- );
373
- }
374
- function DialogFooter({
375
- className,
376
- showCloseButton = false,
377
- children,
378
- ...props
379
- }) {
380
- return /* @__PURE__ */ React4.createElement(
381
- "div",
382
- {
383
- "data-slot": "dialog-footer",
384
- className: cn(
385
- "-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",
386
- className
387
- ),
388
- ...props
389
- },
390
- children,
391
- showCloseButton && /* @__PURE__ */ React4.createElement(DialogPrimitive.Close, { render: /* @__PURE__ */ React4.createElement(Button, { variant: "outline" }) }, "Close")
392
- );
393
- }
394
- function DialogTitle({ className, ...props }) {
395
- return /* @__PURE__ */ React4.createElement(
396
- DialogPrimitive.Title,
397
- {
398
- "data-slot": "dialog-title",
399
- className: cn("font-heading text-base leading-none font-medium", className),
400
- ...props
401
- }
402
- );
403
- }
404
- function DialogDescription({ className, ...props }) {
405
- return /* @__PURE__ */ React4.createElement(
406
- DialogPrimitive.Description,
407
- {
408
- "data-slot": "dialog-description",
409
- className: cn(
410
- "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
411
- className
412
- ),
413
- ...props
414
- }
415
- );
416
- }
417
-
418
- // src/components/ui/dropdown-menu.tsx
419
- import * as React5 from "react";
420
- import { Menu as MenuPrimitive } from "@base-ui/react/menu";
421
- import { ChevronRightIcon, CheckIcon as CheckIcon2 } from "lucide-react";
422
- function DropdownMenu({ ...props }) {
423
- return /* @__PURE__ */ React5.createElement(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
424
- }
425
- function DropdownMenuPortal({ ...props }) {
426
- return /* @__PURE__ */ React5.createElement(MenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
427
- }
428
- function DropdownMenuTrigger({ ...props }) {
429
- return /* @__PURE__ */ React5.createElement(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
430
- }
431
- function DropdownMenuContent({
432
- align = "start",
433
- alignOffset = 0,
434
- side = "bottom",
435
- sideOffset = 4,
436
- className,
437
- ...props
438
- }) {
439
- return /* @__PURE__ */ React5.createElement(MenuPrimitive.Portal, null, /* @__PURE__ */ React5.createElement(
440
- MenuPrimitive.Positioner,
441
- {
442
- className: "isolate z-50 outline-none",
443
- align,
444
- alignOffset,
445
- side,
446
- sideOffset
447
- },
448
- /* @__PURE__ */ React5.createElement(
449
- MenuPrimitive.Popup,
450
- {
451
- "data-slot": "dropdown-menu-content",
452
- className: cn(
453
- "z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--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 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",
454
- className
455
- ),
456
- ...props
457
- }
458
- )
459
- ));
460
- }
461
- function DropdownMenuGroup({ ...props }) {
462
- return /* @__PURE__ */ React5.createElement(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
463
- }
464
- function DropdownMenuLabel({
465
- className,
466
- inset,
467
- ...props
468
- }) {
469
- return /* @__PURE__ */ React5.createElement(
470
- MenuPrimitive.GroupLabel,
471
- {
472
- "data-slot": "dropdown-menu-label",
473
- "data-inset": inset,
474
- className: cn(
475
- "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
476
- className
477
- ),
478
- ...props
479
- }
480
- );
481
- }
482
- function DropdownMenuItem({
483
- className,
484
- inset,
485
- variant = "default",
486
- ...props
487
- }) {
488
- return /* @__PURE__ */ React5.createElement(
489
- MenuPrimitive.Item,
490
- {
491
- "data-slot": "dropdown-menu-item",
492
- "data-inset": inset,
493
- "data-variant": variant,
494
- className: cn(
495
- "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",
496
- className
497
- ),
498
- ...props
499
- }
500
- );
501
- }
502
- function DropdownMenuSub({ ...props }) {
503
- return /* @__PURE__ */ React5.createElement(MenuPrimitive.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
504
- }
505
- function DropdownMenuSubTrigger({
506
- className,
507
- inset,
508
- children,
509
- ...props
510
- }) {
511
- return /* @__PURE__ */ React5.createElement(
512
- MenuPrimitive.SubmenuTrigger,
513
- {
514
- "data-slot": "dropdown-menu-sub-trigger",
515
- "data-inset": inset,
516
- className: cn(
517
- "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-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
518
- className
519
- ),
520
- ...props
521
- },
522
- children,
523
- /* @__PURE__ */ React5.createElement(ChevronRightIcon, { className: "ml-auto" })
524
- );
525
- }
526
- function DropdownMenuSubContent({
527
- align = "start",
528
- alignOffset = -3,
529
- side = "right",
530
- sideOffset = 0,
531
- className,
532
- ...props
533
- }) {
534
- return /* @__PURE__ */ React5.createElement(
535
- DropdownMenuContent,
536
- {
537
- "data-slot": "dropdown-menu-sub-content",
538
- className: cn(
539
- "w-auto min-w-[96px] 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",
540
- className
541
- ),
542
- align,
543
- alignOffset,
544
- side,
545
- sideOffset,
546
- ...props
547
- }
548
- );
549
- }
550
- function DropdownMenuCheckboxItem({
551
- className,
552
- children,
553
- checked,
554
- inset,
555
- ...props
556
- }) {
557
- return /* @__PURE__ */ React5.createElement(
558
- MenuPrimitive.CheckboxItem,
559
- {
560
- "data-slot": "dropdown-menu-checkbox-item",
561
- "data-inset": inset,
562
- className: cn(
563
- "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",
564
- className
565
- ),
566
- checked,
567
- ...props
568
- },
569
- /* @__PURE__ */ React5.createElement(
570
- "span",
571
- {
572
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
573
- "data-slot": "dropdown-menu-checkbox-item-indicator"
574
- },
575
- /* @__PURE__ */ React5.createElement(MenuPrimitive.CheckboxItemIndicator, null, /* @__PURE__ */ React5.createElement(CheckIcon2, null))
576
- ),
577
- children
578
- );
579
- }
580
- function DropdownMenuRadioGroup({ ...props }) {
581
- return /* @__PURE__ */ React5.createElement(MenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
582
- }
583
- function DropdownMenuRadioItem({
584
- className,
585
- children,
586
- inset,
587
- ...props
588
- }) {
589
- return /* @__PURE__ */ React5.createElement(
590
- MenuPrimitive.RadioItem,
591
- {
592
- "data-slot": "dropdown-menu-radio-item",
593
- "data-inset": inset,
594
- className: cn(
595
- "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",
596
- className
597
- ),
598
- ...props
599
- },
600
- /* @__PURE__ */ React5.createElement(
601
- "span",
602
- {
603
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
604
- "data-slot": "dropdown-menu-radio-item-indicator"
605
- },
606
- /* @__PURE__ */ React5.createElement(MenuPrimitive.RadioItemIndicator, null, /* @__PURE__ */ React5.createElement(CheckIcon2, null))
607
- ),
608
- children
609
- );
610
- }
611
- function DropdownMenuSeparator({ className, ...props }) {
612
- return /* @__PURE__ */ React5.createElement(
613
- MenuPrimitive.Separator,
614
- {
615
- "data-slot": "dropdown-menu-separator",
616
- className: cn("-mx-1 my-1 h-px bg-border", className),
617
- ...props
618
- }
619
- );
620
- }
621
- function DropdownMenuShortcut({ className, ...props }) {
622
- return /* @__PURE__ */ React5.createElement(
623
- "span",
624
- {
625
- "data-slot": "dropdown-menu-shortcut",
626
- className: cn(
627
- "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
628
- className
629
- ),
630
- ...props
631
- }
632
- );
633
- }
634
-
635
- // src/components/ui/input.tsx
636
- import * as React6 from "react";
637
- import { Input as InputPrimitive } from "@base-ui/react/input";
638
- function Input({ className, type, ...props }) {
639
- return /* @__PURE__ */ React6.createElement(
640
- InputPrimitive,
641
- {
642
- type,
643
- "data-slot": "input",
644
- className: cn(
645
- "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",
646
- className
647
- ),
648
- ...props
649
- }
650
- );
651
- }
652
-
653
- // src/components/ui/label.tsx
654
- import * as React7 from "react";
655
- function Label({ className, ...props }) {
656
- return /* @__PURE__ */ React7.createElement(
657
- "label",
658
- {
659
- "data-slot": "label",
660
- className: cn(
661
- "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
662
- className
663
- ),
664
- ...props
665
- }
666
- );
667
- }
668
-
669
- // src/components/ui/select.tsx
670
- import * as React8 from "react";
671
- import { Select as SelectPrimitive } from "@base-ui/react/select";
672
- import { ChevronDownIcon, CheckIcon as CheckIcon3, ChevronUpIcon } from "lucide-react";
673
- var Select = SelectPrimitive.Root;
674
- function SelectGroup({ className, ...props }) {
675
- return /* @__PURE__ */ React8.createElement(
676
- SelectPrimitive.Group,
677
- {
678
- "data-slot": "select-group",
679
- className: cn("scroll-my-1 p-1", className),
680
- ...props
681
- }
682
- );
683
- }
684
- function SelectValue({ className, ...props }) {
685
- return /* @__PURE__ */ React8.createElement(
686
- SelectPrimitive.Value,
687
- {
688
- "data-slot": "select-value",
689
- className: cn("flex flex-1 text-left", className),
690
- ...props
691
- }
692
- );
693
- }
694
- function SelectTrigger({
695
- className,
696
- size = "default",
697
- children,
698
- ...props
699
- }) {
700
- return /* @__PURE__ */ React8.createElement(
701
- SelectPrimitive.Trigger,
702
- {
703
- "data-slot": "select-trigger",
704
- "data-size": size,
705
- className: cn(
706
- "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
707
- className
708
- ),
709
- ...props
710
- },
711
- children,
712
- /* @__PURE__ */ React8.createElement(
713
- SelectPrimitive.Icon,
714
- {
715
- render: /* @__PURE__ */ React8.createElement(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })
716
- }
717
- )
718
- );
719
- }
720
- function SelectContent({
721
- className,
722
- children,
723
- side = "bottom",
724
- sideOffset = 4,
725
- align = "center",
726
- alignOffset = 0,
727
- alignItemWithTrigger = true,
728
- ...props
729
- }) {
730
- return /* @__PURE__ */ React8.createElement(SelectPrimitive.Portal, null, /* @__PURE__ */ React8.createElement(
731
- SelectPrimitive.Positioner,
732
- {
733
- side,
734
- sideOffset,
735
- align,
736
- alignOffset,
737
- alignItemWithTrigger,
738
- className: "isolate z-50"
739
- },
740
- /* @__PURE__ */ React8.createElement(
741
- SelectPrimitive.Popup,
742
- {
743
- "data-slot": "select-content",
744
- "data-align-trigger": alignItemWithTrigger,
745
- className: cn(
746
- "relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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",
747
- className
748
- ),
749
- ...props
750
- },
751
- /* @__PURE__ */ React8.createElement(SelectScrollUpButton, null),
752
- /* @__PURE__ */ React8.createElement(SelectPrimitive.List, null, children),
753
- /* @__PURE__ */ React8.createElement(SelectScrollDownButton, null)
754
- )
755
- ));
756
- }
757
- function SelectLabel({ className, ...props }) {
758
- return /* @__PURE__ */ React8.createElement(
759
- SelectPrimitive.GroupLabel,
760
- {
761
- "data-slot": "select-label",
762
- className: cn("px-1.5 py-1 text-xs text-muted-foreground", className),
763
- ...props
764
- }
765
- );
766
- }
767
- function SelectItem({ className, children, ...props }) {
768
- return /* @__PURE__ */ React8.createElement(
769
- SelectPrimitive.Item,
770
- {
771
- "data-slot": "select-item",
772
- className: cn(
773
- "relative flex w-full 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 not-data-[variant=destructive]: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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
774
- className
775
- ),
776
- ...props
777
- },
778
- /* @__PURE__ */ React8.createElement(SelectPrimitive.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap" }, children),
779
- /* @__PURE__ */ React8.createElement(
780
- SelectPrimitive.ItemIndicator,
781
- {
782
- render: /* @__PURE__ */ React8.createElement("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" })
783
- },
784
- /* @__PURE__ */ React8.createElement(CheckIcon3, { className: "pointer-events-none" })
785
- )
786
- );
787
- }
788
- function SelectSeparator({ className, ...props }) {
789
- return /* @__PURE__ */ React8.createElement(
790
- SelectPrimitive.Separator,
791
- {
792
- "data-slot": "select-separator",
793
- className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
794
- ...props
795
- }
796
- );
797
- }
798
- function SelectScrollUpButton({
799
- className,
800
- ...props
801
- }) {
802
- return /* @__PURE__ */ React8.createElement(
803
- SelectPrimitive.ScrollUpArrow,
804
- {
805
- "data-slot": "select-scroll-up-button",
806
- className: cn(
807
- "top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
808
- className
809
- ),
810
- ...props
811
- },
812
- /* @__PURE__ */ React8.createElement(ChevronUpIcon, null)
813
- );
814
- }
815
- function SelectScrollDownButton({
816
- className,
817
- ...props
818
- }) {
819
- return /* @__PURE__ */ React8.createElement(
820
- SelectPrimitive.ScrollDownArrow,
821
- {
822
- "data-slot": "select-scroll-down-button",
823
- className: cn(
824
- "bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
825
- className
826
- ),
827
- ...props
828
- },
829
- /* @__PURE__ */ React8.createElement(ChevronDownIcon, null)
830
- );
831
- }
832
-
833
- // src/components/ui/separator.tsx
834
- import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
835
- function Separator({
836
- className,
837
- orientation = "horizontal",
838
- ...props
839
- }) {
840
- return /* @__PURE__ */ React.createElement(
841
- SeparatorPrimitive,
842
- {
843
- "data-slot": "separator",
844
- orientation,
845
- className: cn(
846
- "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
847
- className
848
- ),
849
- ...props
850
- }
851
- );
852
- }
853
-
854
- // src/components/ui/sheet.tsx
855
- import * as React9 from "react";
856
- import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
857
- import { XIcon as XIcon2 } from "lucide-react";
858
- function Sheet({ ...props }) {
859
- return /* @__PURE__ */ React9.createElement(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
860
- }
861
- function SheetTrigger({ ...props }) {
862
- return /* @__PURE__ */ React9.createElement(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
863
- }
864
- function SheetClose({ ...props }) {
865
- return /* @__PURE__ */ React9.createElement(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
866
- }
867
- function SheetPortal({ ...props }) {
868
- return /* @__PURE__ */ React9.createElement(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
869
- }
870
- function SheetOverlay({ className, ...props }) {
871
- return /* @__PURE__ */ React9.createElement(
872
- SheetPrimitive.Backdrop,
873
- {
874
- "data-slot": "sheet-overlay",
875
- className: cn(
876
- "fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
877
- className
878
- ),
879
- ...props
880
- }
881
- );
882
- }
883
- function SheetContent({
884
- className,
885
- children,
886
- side = "right",
887
- showCloseButton = true,
888
- ...props
889
- }) {
890
- return /* @__PURE__ */ React9.createElement(SheetPortal, null, /* @__PURE__ */ React9.createElement(SheetOverlay, null), /* @__PURE__ */ React9.createElement(
891
- SheetPrimitive.Popup,
892
- {
893
- "data-slot": "sheet-content",
894
- "data-side": side,
895
- className: cn(
896
- "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
897
- className
898
- ),
899
- ...props
900
- },
901
- children,
902
- showCloseButton && /* @__PURE__ */ React9.createElement(
903
- SheetPrimitive.Close,
904
- {
905
- "data-slot": "sheet-close",
906
- render: /* @__PURE__ */ React9.createElement(Button, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm" })
907
- },
908
- /* @__PURE__ */ React9.createElement(XIcon2, null),
909
- /* @__PURE__ */ React9.createElement("span", { className: "sr-only" }, "Close")
910
- )
911
- ));
912
- }
913
- function SheetHeader({ className, ...props }) {
914
- return /* @__PURE__ */ React9.createElement(
915
- "div",
916
- {
917
- "data-slot": "sheet-header",
918
- className: cn("flex flex-col gap-0.5 p-4", className),
919
- ...props
920
- }
921
- );
922
- }
923
- function SheetFooter({ className, ...props }) {
924
- return /* @__PURE__ */ React9.createElement(
925
- "div",
926
- {
927
- "data-slot": "sheet-footer",
928
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
929
- ...props
930
- }
931
- );
932
- }
933
- function SheetTitle({ className, ...props }) {
934
- return /* @__PURE__ */ React9.createElement(
935
- SheetPrimitive.Title,
936
- {
937
- "data-slot": "sheet-title",
938
- className: cn("font-heading text-base font-medium text-foreground", className),
939
- ...props
940
- }
941
- );
942
- }
943
- function SheetDescription({ className, ...props }) {
944
- return /* @__PURE__ */ React9.createElement(
945
- SheetPrimitive.Description,
946
- {
947
- "data-slot": "sheet-description",
948
- className: cn("text-sm text-muted-foreground", className),
949
- ...props
950
- }
951
- );
952
- }
953
-
954
- // src/components/ui/table.tsx
955
- import * as React10 from "react";
956
- function Table({ className, ...props }) {
957
- return /* @__PURE__ */ React10.createElement("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto" }, /* @__PURE__ */ React10.createElement(
958
- "table",
959
- {
960
- "data-slot": "table",
961
- className: cn("w-full caption-bottom text-sm", className),
962
- ...props
963
- }
964
- ));
965
- }
966
- function TableHeader({ className, ...props }) {
967
- return /* @__PURE__ */ React10.createElement(
968
- "thead",
969
- {
970
- "data-slot": "table-header",
971
- className: cn("[&_tr]:border-b", className),
972
- ...props
973
- }
974
- );
975
- }
976
- function TableBody({ className, ...props }) {
977
- return /* @__PURE__ */ React10.createElement(
978
- "tbody",
979
- {
980
- "data-slot": "table-body",
981
- className: cn("[&_tr:last-child]:border-0", className),
982
- ...props
983
- }
984
- );
985
- }
986
- function TableFooter({ className, ...props }) {
987
- return /* @__PURE__ */ React10.createElement(
988
- "tfoot",
989
- {
990
- "data-slot": "table-footer",
991
- className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
992
- ...props
993
- }
994
- );
995
- }
996
- function TableRow({ className, ...props }) {
997
- return /* @__PURE__ */ React10.createElement(
998
- "tr",
999
- {
1000
- "data-slot": "table-row",
1001
- className: cn(
1002
- "border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
1003
- className
1004
- ),
1005
- ...props
1006
- }
1007
- );
1008
- }
1009
- function TableHead({ className, ...props }) {
1010
- return /* @__PURE__ */ React10.createElement(
1011
- "th",
1012
- {
1013
- "data-slot": "table-head",
1014
- className: cn(
1015
- "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
1016
- className
1017
- ),
1018
- ...props
1019
- }
1020
- );
1021
- }
1022
- function TableCell({ className, ...props }) {
1023
- return /* @__PURE__ */ React10.createElement(
1024
- "td",
1025
- {
1026
- "data-slot": "table-cell",
1027
- className: cn(
1028
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
1029
- className
1030
- ),
1031
- ...props
1032
- }
1033
- );
1034
- }
1035
- function TableCaption({ className, ...props }) {
1036
- return /* @__PURE__ */ React10.createElement(
1037
- "caption",
1038
- {
1039
- "data-slot": "table-caption",
1040
- className: cn("mt-4 text-sm text-muted-foreground", className),
1041
- ...props
1042
- }
1043
- );
1044
- }
1045
-
1046
- // src/components/ui/tabs.tsx
1047
- import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
1048
- import { cva as cva3 } from "class-variance-authority";
1049
- function Tabs({
1050
- className,
1051
- orientation = "horizontal",
1052
- ...props
1053
- }) {
1054
- return /* @__PURE__ */ React.createElement(
1055
- TabsPrimitive.Root,
1056
- {
1057
- "data-slot": "tabs",
1058
- "data-orientation": orientation,
1059
- className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className),
1060
- ...props
1061
- }
1062
- );
1063
- }
1064
- var tabsListVariants = cva3(
1065
- "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
1066
- {
1067
- variants: {
1068
- variant: {
1069
- default: "bg-muted",
1070
- line: "gap-1 bg-transparent"
1071
- }
1072
- },
1073
- defaultVariants: {
1074
- variant: "default"
1075
- }
1076
- }
1077
- );
1078
- function TabsList({
1079
- className,
1080
- variant = "default",
1081
- ...props
1082
- }) {
1083
- return /* @__PURE__ */ React.createElement(
1084
- TabsPrimitive.List,
1085
- {
1086
- "data-slot": "tabs-list",
1087
- "data-variant": variant,
1088
- className: cn(tabsListVariants({ variant }), className),
1089
- ...props
1090
- }
1091
- );
1092
- }
1093
- function TabsTrigger({ className, ...props }) {
1094
- return /* @__PURE__ */ React.createElement(
1095
- TabsPrimitive.Tab,
1096
- {
1097
- "data-slot": "tabs-trigger",
1098
- className: cn(
1099
- "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1100
- "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
1101
- "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
1102
- "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
1103
- className
1104
- ),
1105
- ...props
1106
- }
1107
- );
1108
- }
1109
- function TabsContent({ className, ...props }) {
1110
- return /* @__PURE__ */ React.createElement(
1111
- TabsPrimitive.Panel,
1112
- {
1113
- "data-slot": "tabs-content",
1114
- className: cn("flex-1 text-sm outline-none", className),
1115
- ...props
1116
- }
1117
- );
1118
- }
1119
-
1120
- // src/components/ui/textarea.tsx
1121
- import * as React11 from "react";
1122
- function Textarea({ className, ...props }) {
1123
- return /* @__PURE__ */ React11.createElement(
1124
- "textarea",
1125
- {
1126
- "data-slot": "textarea",
1127
- className: cn(
1128
- "flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 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",
1129
- className
1130
- ),
1131
- ...props
1132
- }
1133
- );
1134
- }
1135
-
1136
- // src/components/chrome/Logo.tsx
1137
- import { useBrand } from "@augmenting-integrations/brand";
1138
- function Logo({
1139
- className,
1140
- showWordmark = true
1141
- }) {
1142
- const brand = useBrand();
1143
- return /* @__PURE__ */ React.createElement("div", { className: cn("inline-flex items-center gap-2 text-primary", className) }, /* @__PURE__ */ React.createElement("span", { className: "inline-flex h-8 w-8 shrink-0 items-center justify-center text-current" }, /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 32 32", className: "h-full w-full", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("rect", { x: "2", y: "2", width: "28", height: "28", rx: "6", fill: "currentColor" }), /* @__PURE__ */ React.createElement(
1144
- "path",
1145
- {
1146
- d: "M10 22V10h2.6l3.4 6.4L19.4 10H22v12h-2.4v-7.4l-2.8 5.2h-1.6L12.4 14.6V22H10z",
1147
- fill: "var(--primary-foreground)"
1148
- }
1149
- ))), showWordmark ? /* @__PURE__ */ React.createElement("span", { className: "text-base font-semibold tracking-tight text-foreground" }, brand.shortName) : null, /* @__PURE__ */ React.createElement("span", { className: "sr-only" }, brand.name));
1150
- }
1151
-
1152
- // src/components/chrome/ThemeSwitcher.tsx
1153
- import * as React13 from "react";
1154
- import { useTheme } from "next-themes";
1155
- import { Moon, Sun, Palette } from "lucide-react";
1156
- import { BASE_THEMES } from "@augmenting-integrations/themes";
1157
-
1158
- // src/providers/ThemeProvider.tsx
1159
- import * as React12 from "react";
1160
- import { ThemeProvider as NextThemesProvider } from "next-themes";
1161
- import { THEME_COOKIE_KEY } from "@augmenting-integrations/themes";
1162
- var ThemeNameContext = React12.createContext(null);
1163
- function readCookie() {
1164
- if (typeof document === "undefined") return null;
1165
- const match = document.cookie.split("; ").find((row) => row.startsWith(`${THEME_COOKIE_KEY}=`));
1166
- if (!match) return null;
1167
- const value = match.split("=")[1];
1168
- return value && value.length > 0 ? value : null;
1169
- }
1170
- function writeCookie(value) {
1171
- if (typeof document === "undefined") return;
1172
- document.cookie = `${THEME_COOKIE_KEY}=${value}; path=/; max-age=${60 * 60 * 24 * 365}; samesite=lax`;
1173
- }
1174
- function ThemeProvider({
1175
- children,
1176
- defaultTheme,
1177
- defaultVariant
1178
- }) {
1179
- const [themeName, setThemeNameState] = React12.useState(
1180
- () => readCookie() ?? defaultTheme
1181
- );
1182
- React12.useEffect(() => {
1183
- document.documentElement.setAttribute("data-theme", themeName);
1184
- }, [themeName]);
1185
- const setThemeName = React12.useCallback((next) => {
1186
- writeCookie(next);
1187
- setThemeNameState(next);
1188
- }, []);
1189
- const value = React12.useMemo(
1190
- () => ({ themeName, setThemeName }),
1191
- [themeName, setThemeName]
1192
- );
1193
- return /* @__PURE__ */ React12.createElement(ThemeNameContext.Provider, { value }, /* @__PURE__ */ React12.createElement(
1194
- NextThemesProvider,
1195
- {
1196
- attribute: "class",
1197
- defaultTheme: defaultVariant,
1198
- enableSystem: false,
1199
- disableTransitionOnChange: true
1200
- },
1201
- children
1202
- ));
1203
- }
1204
- function useThemeName() {
1205
- const ctx = React12.useContext(ThemeNameContext);
1206
- if (!ctx) throw new Error("useThemeName must be used inside <ThemeProvider />");
1207
- return ctx;
1208
- }
1209
-
1210
- // src/components/chrome/ThemeSwitcher.tsx
1211
- function ThemeSwitcher({ className }) {
1212
- const { themeName, setThemeName } = useThemeName();
1213
- const { resolvedTheme, setTheme } = useTheme();
1214
- const mounted = React13.useSyncExternalStore(
1215
- () => () => {
1216
- },
1217
- () => true,
1218
- () => false
1219
- );
1220
- if (!mounted) {
1221
- return /* @__PURE__ */ React13.createElement(
1222
- "div",
1223
- {
1224
- className: cn(
1225
- "h-9 w-[120px] rounded-md border border-border bg-background",
1226
- className
1227
- )
1228
- }
1229
- );
1230
- }
1231
- const isDark = resolvedTheme === "dark";
1232
- const activeLabel = BASE_THEMES.find((t) => t.id === themeName)?.label ?? "Theme";
1233
- return /* @__PURE__ */ React13.createElement("div", { className: cn("flex items-center gap-2", className) }, /* @__PURE__ */ React13.createElement(
1234
- "button",
1235
- {
1236
- type: "button",
1237
- onClick: () => setTheme(isDark ? "light" : "dark"),
1238
- "aria-label": isDark ? "Switch to light mode" : "Switch to dark mode",
1239
- className: "inline-flex h-9 w-9 items-center justify-center rounded-md border border-border bg-background text-foreground transition hover:bg-muted"
1240
- },
1241
- isDark ? /* @__PURE__ */ React13.createElement(Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ React13.createElement(Moon, { className: "h-4 w-4" })
1242
- ), /* @__PURE__ */ React13.createElement(DropdownMenu, null, /* @__PURE__ */ React13.createElement(
1243
- DropdownMenuTrigger,
1244
- {
1245
- className: "inline-flex h-9 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm text-foreground transition hover:bg-muted",
1246
- "aria-label": "Switch theme palette"
1247
- },
1248
- /* @__PURE__ */ React13.createElement(Palette, { className: "h-4 w-4" }),
1249
- /* @__PURE__ */ React13.createElement("span", { className: "font-medium" }, activeLabel)
1250
- ), /* @__PURE__ */ React13.createElement(DropdownMenuContent, { align: "end", sideOffset: 6, className: "w-72 p-1" }, BASE_THEMES.map((t) => /* @__PURE__ */ React13.createElement(
1251
- DropdownMenuItem,
1252
- {
1253
- key: t.id,
1254
- onClick: () => setThemeName(t.id),
1255
- className: cn(
1256
- "items-start gap-3 px-2 py-2",
1257
- themeName === t.id && "bg-muted"
1258
- )
1259
- },
1260
- /* @__PURE__ */ React13.createElement(
1261
- "span",
1262
- {
1263
- "aria-hidden": true,
1264
- className: "mt-0.5 inline-flex h-6 w-6 shrink-0 overflow-hidden rounded-full ring-1 ring-border"
1265
- },
1266
- /* @__PURE__ */ React13.createElement("span", { className: "h-full w-1/2", style: { background: t.swatch.primary } }),
1267
- /* @__PURE__ */ React13.createElement(
1268
- "span",
1269
- {
1270
- className: "h-full w-1/2",
1271
- style: { background: t.swatch.primaryDark }
1272
- }
1273
- )
1274
- ),
1275
- /* @__PURE__ */ React13.createElement("span", { className: "flex flex-col" }, /* @__PURE__ */ React13.createElement("span", { className: "text-sm font-medium" }, t.label), /* @__PURE__ */ React13.createElement("span", { className: "text-xs text-muted-foreground" }, t.description))
1276
- )))));
1277
- }
1278
-
1279
- // src/components/chrome/RoleSwitcher.tsx
1280
- import * as React14 from "react";
1281
- import { signIn, useSession } from "next-auth/react";
1282
- import { UserCog } from "lucide-react";
1283
- var ROLES = ["visitor", "sales", "agent", "admin"];
1284
- function RoleSwitcher({ className }) {
1285
- const { data: session, update } = useSession();
1286
- const [open, setOpen] = React14.useState(false);
1287
- const current = session?.user?.role ?? "visitor";
1288
- return /* @__PURE__ */ React14.createElement("div", { className: cn("relative", className) }, /* @__PURE__ */ React14.createElement(
1289
- "button",
1290
- {
1291
- type: "button",
1292
- onClick: () => setOpen((o) => !o),
1293
- "aria-haspopup": "menu",
1294
- "aria-expanded": open,
1295
- className: "inline-flex h-9 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm text-foreground transition hover:bg-muted"
1296
- },
1297
- /* @__PURE__ */ React14.createElement(UserCog, { className: "h-4 w-4" }),
1298
- /* @__PURE__ */ React14.createElement("span", { className: "font-medium capitalize" }, current)
1299
- ), open ? /* @__PURE__ */ React14.createElement(
1300
- "div",
1301
- {
1302
- role: "menu",
1303
- className: "absolute right-0 top-full z-50 mt-2 w-56 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg",
1304
- onMouseLeave: () => setOpen(false)
1305
- },
1306
- /* @__PURE__ */ React14.createElement("div", { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground" }, "Switch role (dev)"),
1307
- ROLES.map((r) => /* @__PURE__ */ React14.createElement(
1308
- "button",
1309
- {
1310
- key: r,
1311
- type: "button",
1312
- role: "menuitem",
1313
- onClick: async () => {
1314
- await signIn("credentials", { role: r, redirect: false });
1315
- await update();
1316
- setOpen(false);
1317
- },
1318
- className: cn(
1319
- "flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm capitalize transition hover:bg-muted",
1320
- current === r && "bg-muted"
1321
- )
1322
- },
1323
- /* @__PURE__ */ React14.createElement("span", null, r),
1324
- current === r ? /* @__PURE__ */ React14.createElement("span", { className: "text-xs text-muted-foreground" }, "active") : null
1325
- ))
1326
- ) : null);
1327
- }
1328
-
1329
- // src/components/shells/PublicShell.tsx
1330
- import * as React15 from "react";
1331
- import { useBrand as useBrand2 } from "@augmenting-integrations/brand";
1332
- function PublicShell({
1333
- children,
1334
- navLinks,
1335
- loginHref = "/login",
1336
- footerLinks,
1337
- Link
1338
- }) {
1339
- const brand = useBrand2();
1340
- return /* @__PURE__ */ React15.createElement("div", { className: "flex min-h-svh flex-col bg-background text-foreground" }, /* @__PURE__ */ React15.createElement("header", { className: "border-b border-border bg-background/80 backdrop-blur" }, /* @__PURE__ */ React15.createElement("div", { className: "mx-auto flex max-w-6xl items-center justify-between px-6 py-4" }, /* @__PURE__ */ React15.createElement(Link, { href: "/", "aria-label": "Home" }, /* @__PURE__ */ React15.createElement(Logo, null)), /* @__PURE__ */ React15.createElement("nav", { className: "flex items-center gap-6 text-sm" }, navLinks.map((link) => /* @__PURE__ */ React15.createElement(
1341
- Link,
1342
- {
1343
- key: link.href,
1344
- href: link.href,
1345
- className: "text-muted-foreground transition hover:text-foreground"
1346
- },
1347
- link.label
1348
- )), /* @__PURE__ */ React15.createElement(
1349
- Link,
1350
- {
1351
- href: loginHref,
1352
- className: "text-muted-foreground transition hover:text-foreground"
1353
- },
1354
- "Log in"
1355
- ), /* @__PURE__ */ React15.createElement(ThemeSwitcher, null)))), /* @__PURE__ */ React15.createElement("main", { className: "flex-1" }, children), /* @__PURE__ */ React15.createElement("footer", { className: "border-t border-border" }, /* @__PURE__ */ React15.createElement("div", { className: "mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-3 px-6 py-6 text-sm text-muted-foreground" }, /* @__PURE__ */ React15.createElement("span", null, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", brand.name), /* @__PURE__ */ React15.createElement("div", { className: "flex gap-4" }, (footerLinks ?? []).map((link) => /* @__PURE__ */ React15.createElement(Link, { key: link.href, href: link.href, className: "hover:text-foreground" }, link.label))))));
1356
- }
1357
-
1358
- // src/components/shells/AppShell.tsx
1359
- import * as React16 from "react";
1360
- import { Menu, X } from "lucide-react";
1361
- function NavGroup({
1362
- group,
1363
- pathname,
1364
- Link
1365
- }) {
1366
- if (group.items.length === 0) return null;
1367
- return /* @__PURE__ */ React16.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React16.createElement("p", { className: "px-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground" }, group.label), /* @__PURE__ */ React16.createElement("ul", { className: "space-y-0.5" }, group.items.map((item) => {
1368
- const active = pathname === item.href || pathname.startsWith(`${item.href}/`);
1369
- return /* @__PURE__ */ React16.createElement("li", { key: item.href }, /* @__PURE__ */ React16.createElement(
1370
- Link,
1371
- {
1372
- href: item.href,
1373
- className: cn(
1374
- "flex items-center gap-3 rounded-md px-3 py-2 text-sm transition",
1375
- active ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent/60"
1376
- )
1377
- },
1378
- /* @__PURE__ */ React16.createElement(item.icon, { className: "h-4 w-4 shrink-0" }),
1379
- /* @__PURE__ */ React16.createElement("span", null, item.label)
1380
- ));
1381
- })));
1382
- }
1383
- function AppShell({
1384
- children,
1385
- pathname,
1386
- navGroups,
1387
- Link,
1388
- homeHref = "/",
1389
- showRoleSwitcher = true
1390
- }) {
1391
- const [mobileOpen, setMobileOpen] = React16.useState(false);
1392
- const sidebarContent = /* @__PURE__ */ React16.createElement("div", { className: "flex h-full flex-col gap-6 px-3 py-4" }, /* @__PURE__ */ React16.createElement(Link, { href: homeHref, className: "px-2", "aria-label": "Home" }, /* @__PURE__ */ React16.createElement(Logo, null)), navGroups.map((g) => /* @__PURE__ */ React16.createElement(NavGroup, { key: g.label, group: g, pathname, Link })));
1393
- return /* @__PURE__ */ React16.createElement("div", { className: "flex min-h-svh bg-background text-foreground" }, /* @__PURE__ */ React16.createElement("aside", { className: "hidden w-64 shrink-0 border-r border-sidebar-border bg-sidebar text-sidebar-foreground md:block" }, sidebarContent), mobileOpen ? /* @__PURE__ */ React16.createElement("div", { className: "fixed inset-0 z-50 flex md:hidden" }, /* @__PURE__ */ React16.createElement(
1394
- "div",
1395
- {
1396
- className: "flex-1 bg-foreground/40 backdrop-blur-sm",
1397
- onClick: () => setMobileOpen(false),
1398
- "aria-hidden": true
1399
- }
1400
- ), /* @__PURE__ */ React16.createElement("aside", { className: "relative w-72 border-l border-sidebar-border bg-sidebar text-sidebar-foreground" }, /* @__PURE__ */ React16.createElement(
1401
- "button",
1402
- {
1403
- type: "button",
1404
- onClick: () => setMobileOpen(false),
1405
- "aria-label": "Close menu",
1406
- className: "absolute right-2 top-2 inline-flex h-9 w-9 items-center justify-center rounded-md hover:bg-sidebar-accent"
1407
- },
1408
- /* @__PURE__ */ React16.createElement(X, { className: "h-4 w-4" })
1409
- ), sidebarContent)) : null, /* @__PURE__ */ React16.createElement("div", { className: "flex min-w-0 flex-1 flex-col" }, /* @__PURE__ */ React16.createElement("header", { className: "flex h-14 items-center justify-between gap-3 border-b border-border bg-background/80 px-4 backdrop-blur md:px-6" }, /* @__PURE__ */ React16.createElement(
1410
- "button",
1411
- {
1412
- type: "button",
1413
- onClick: () => setMobileOpen(true),
1414
- "aria-label": "Open menu",
1415
- className: "inline-flex h-9 w-9 items-center justify-center rounded-md border border-border md:hidden"
1416
- },
1417
- /* @__PURE__ */ React16.createElement(Menu, { className: "h-4 w-4" })
1418
- ), /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-3 md:ml-auto" }, showRoleSwitcher ? /* @__PURE__ */ React16.createElement(RoleSwitcher, null) : null, /* @__PURE__ */ React16.createElement(ThemeSwitcher, null))), /* @__PURE__ */ React16.createElement("main", { className: "min-w-0 flex-1 px-4 py-6 md:px-8 md:py-8" }, children)));
1419
- }
1420
-
1421
- // src/components/shells/StudioShell.tsx
1422
- import * as React17 from "react";
1423
- function StudioShell({
1424
- title,
1425
- description,
1426
- actions,
1427
- children,
1428
- className
1429
- }) {
1430
- return /* @__PURE__ */ React17.createElement("section", { className: cn("space-y-6", className) }, /* @__PURE__ */ React17.createElement("header", { className: "flex flex-wrap items-start justify-between gap-3" }, /* @__PURE__ */ React17.createElement("div", null, /* @__PURE__ */ React17.createElement("h1", { className: "text-2xl font-semibold tracking-tight" }, title), description ? /* @__PURE__ */ React17.createElement("p", { className: "mt-1 max-w-2xl text-sm text-muted-foreground" }, description) : null), actions ? /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-2" }, actions) : null), /* @__PURE__ */ React17.createElement("div", { className: "rounded-lg border border-border bg-card p-4 md:p-6" }, children));
1431
- }
1432
-
1433
- // src/providers/SessionProvider.tsx
1434
- import { SessionProvider as NextAuthSessionProvider } from "next-auth/react";
1435
- function SessionProvider({
1436
- children,
1437
- session
1438
- }) {
1439
- return /* @__PURE__ */ React.createElement(NextAuthSessionProvider, { session }, children);
1440
- }
1441
-
1442
- // src/providers/QueryProvider.tsx
1443
- import * as React18 from "react";
1444
- import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
1445
- function QueryProvider({ children }) {
1446
- const [client] = React18.useState(
1447
- () => new QueryClient({
1448
- defaultOptions: {
1449
- queries: { staleTime: 3e4, refetchOnWindowFocus: false }
1450
- }
1451
- })
1452
- );
1453
- return /* @__PURE__ */ React18.createElement(QueryClientProvider, { client }, children);
1454
- }
1455
-
1456
- // src/providers/MockProvider.tsx
1457
- import * as React19 from "react";
1458
- function MockProvider({
1459
- children,
1460
- loadWorker,
1461
- serviceWorkerUrl = "/mockServiceWorker.js"
1462
- }) {
1463
- const [ready, setReady] = React19.useState(() => process.env.NODE_ENV !== "development");
1464
- const [error, setError] = React19.useState(null);
1465
- React19.useEffect(() => {
1466
- if (process.env.NODE_ENV !== "development") return;
1467
- let cancelled = false;
1468
- void (async () => {
1469
- try {
1470
- const worker = await loadWorker();
1471
- await worker.start({
1472
- onUnhandledRequest: "bypass",
1473
- serviceWorker: { url: serviceWorkerUrl }
1474
- });
1475
- if (!cancelled) setReady(true);
1476
- } catch (e) {
1477
- console.error("[MockProvider] MSW failed to start:", e);
1478
- if (!cancelled) {
1479
- setError(e instanceof Error ? e.message : String(e));
1480
- setReady(true);
1481
- }
1482
- }
1483
- })();
1484
- return () => {
1485
- cancelled = true;
1486
- };
1487
- }, [loadWorker, serviceWorkerUrl]);
1488
- if (!ready) {
1489
- return /* @__PURE__ */ React19.createElement("div", { className: "flex min-h-svh items-center justify-center bg-background text-muted-foreground" }, /* @__PURE__ */ React19.createElement("p", { className: "text-sm" }, "Initializing mocks\u2026"));
1490
- }
1491
- return /* @__PURE__ */ React19.createElement(React19.Fragment, null, error ? /* @__PURE__ */ React19.createElement("div", { className: "border-b border-destructive/40 bg-destructive/10 px-4 py-2 text-xs text-destructive" }, "MSW failed to start (", error, "). Mock API calls will return real 404s.") : null, children);
1492
- }
1493
- export {
1494
- AppShell,
1495
- Avatar,
1496
- AvatarBadge,
1497
- AvatarFallback,
1498
- AvatarGroup,
1499
- AvatarGroupCount,
1500
- AvatarImage,
1501
- Badge,
1502
- Button,
1503
- Card,
1504
- CardAction,
1505
- CardContent,
1506
- CardDescription,
1507
- CardFooter,
1508
- CardHeader,
1509
- CardTitle,
1510
- Checkbox,
1511
- Dialog,
1512
- DialogClose,
1513
- DialogContent,
1514
- DialogDescription,
1515
- DialogFooter,
1516
- DialogHeader,
1517
- DialogOverlay,
1518
- DialogPortal,
1519
- DialogTitle,
1520
- DialogTrigger,
1521
- DropdownMenu,
1522
- DropdownMenuCheckboxItem,
1523
- DropdownMenuContent,
1524
- DropdownMenuGroup,
1525
- DropdownMenuItem,
1526
- DropdownMenuLabel,
1527
- DropdownMenuPortal,
1528
- DropdownMenuRadioGroup,
1529
- DropdownMenuRadioItem,
1530
- DropdownMenuSeparator,
1531
- DropdownMenuShortcut,
1532
- DropdownMenuSub,
1533
- DropdownMenuSubContent,
1534
- DropdownMenuSubTrigger,
1535
- DropdownMenuTrigger,
1536
- Input,
1537
- Label,
1538
- Logo,
1539
- MockProvider,
1540
- PublicShell,
1541
- QueryProvider,
1542
- RoleSwitcher,
1543
- Select,
1544
- SelectContent,
1545
- SelectGroup,
1546
- SelectItem,
1547
- SelectLabel,
1548
- SelectScrollDownButton,
1549
- SelectScrollUpButton,
1550
- SelectSeparator,
1551
- SelectTrigger,
1552
- SelectValue,
1553
- Separator,
1554
- SessionProvider,
1555
- Sheet,
1556
- SheetClose,
1557
- SheetContent,
1558
- SheetDescription,
1559
- SheetFooter,
1560
- SheetHeader,
1561
- SheetTitle,
1562
- SheetTrigger,
1563
- StudioShell,
1564
- Table,
1565
- TableBody,
1566
- TableCaption,
1567
- TableCell,
1568
- TableFooter,
1569
- TableHead,
1570
- TableHeader,
1571
- TableRow,
1572
- Tabs,
1573
- TabsContent,
1574
- TabsList,
1575
- TabsTrigger,
1576
- Textarea,
1577
- ThemeProvider,
1578
- ThemeSwitcher,
1579
- badgeVariants,
1580
- buttonVariants,
1581
- cn,
1582
- tabsListVariants,
1583
- useThemeName
1584
- };
1585
- //# sourceMappingURL=index.mjs.map