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