@ai-matrx/design-system 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -0
- package/README.md +8 -4
- package/dist/index.cjs +1110 -413
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +379 -3
- package/dist/index.d.ts +379 -3
- package/dist/index.js +1110 -413
- package/dist/index.js.map +1 -1
- package/dist/styles.css +9 -0
- package/package.json +9 -1
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
// src/index.ts
|
|
32
32
|
var src_exports = {};
|
|
33
33
|
__export(src_exports, {
|
|
34
|
+
Alert: () => Alert,
|
|
35
|
+
AlertDescription: () => AlertDescription,
|
|
36
|
+
AlertDialog: () => AlertDialog,
|
|
37
|
+
AlertDialogAction: () => AlertDialogAction,
|
|
38
|
+
AlertDialogCancel: () => AlertDialogCancel,
|
|
39
|
+
AlertDialogContent: () => AlertDialogContent,
|
|
40
|
+
AlertDialogContentPrimitive: () => AlertDialogContentPrimitive,
|
|
41
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
42
|
+
AlertDialogFooter: () => AlertDialogFooter,
|
|
43
|
+
AlertDialogHeader: () => AlertDialogHeader,
|
|
44
|
+
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
45
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
46
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
47
|
+
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
48
|
+
AlertTitle: () => AlertTitle,
|
|
34
49
|
Avatar: () => Avatar,
|
|
35
50
|
AvatarFallback: () => AvatarFallback,
|
|
36
51
|
AvatarImage: () => AvatarImage,
|
|
@@ -90,6 +105,18 @@ __export(src_exports, {
|
|
|
90
105
|
DialogPortal: () => DialogPortal,
|
|
91
106
|
DialogTitle: () => DialogTitle,
|
|
92
107
|
DialogTrigger: () => DialogTrigger,
|
|
108
|
+
Drawer: () => Drawer,
|
|
109
|
+
DrawerBody: () => DrawerBody,
|
|
110
|
+
DrawerClose: () => DrawerClose,
|
|
111
|
+
DrawerContent: () => DrawerContent,
|
|
112
|
+
DrawerContentPrimitive: () => DrawerContentPrimitive,
|
|
113
|
+
DrawerDescription: () => DrawerDescription,
|
|
114
|
+
DrawerFooter: () => DrawerFooter,
|
|
115
|
+
DrawerHeader: () => DrawerHeader,
|
|
116
|
+
DrawerOverlay: () => DrawerOverlay,
|
|
117
|
+
DrawerPortal: () => DrawerPortal,
|
|
118
|
+
DrawerTitle: () => DrawerTitle,
|
|
119
|
+
DrawerTrigger: () => DrawerTrigger,
|
|
93
120
|
DropdownMenu: () => DropdownMenu,
|
|
94
121
|
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
95
122
|
DropdownMenuContent: () => DropdownMenuContent,
|
|
@@ -107,6 +134,9 @@ __export(src_exports, {
|
|
|
107
134
|
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
108
135
|
EditableLabel: () => EditableLabel,
|
|
109
136
|
EnterInput: () => EnterInput,
|
|
137
|
+
HoverCard: () => HoverCard,
|
|
138
|
+
HoverCardContent: () => HoverCardContent,
|
|
139
|
+
HoverCardTrigger: () => HoverCardTrigger,
|
|
110
140
|
Input: () => Input,
|
|
111
141
|
InputWithPrefix: () => InputWithPrefix,
|
|
112
142
|
Label: () => Label3,
|
|
@@ -118,7 +148,12 @@ __export(src_exports, {
|
|
|
118
148
|
PopoverTrigger: () => PopoverTrigger,
|
|
119
149
|
PortalContainerProvider: () => PortalContainerProvider,
|
|
120
150
|
Progress: () => Progress,
|
|
151
|
+
RadioGroup: () => RadioGroup3,
|
|
152
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
121
153
|
RadixDialogModalProvider: () => RadixDialogModalProvider,
|
|
154
|
+
ResizableHandle: () => ResizableHandle,
|
|
155
|
+
ResizablePanel: () => ResizablePanel,
|
|
156
|
+
ResizablePanelGroup: () => ResizablePanelGroup,
|
|
122
157
|
ScoreRing: () => ScoreRing,
|
|
123
158
|
ScrollArea: () => ScrollArea,
|
|
124
159
|
ScrollBar: () => ScrollBar,
|
|
@@ -145,6 +180,7 @@ __export(src_exports, {
|
|
|
145
180
|
SheetTitle: () => SheetTitle,
|
|
146
181
|
SheetTrigger: () => SheetTrigger,
|
|
147
182
|
Skeleton: () => Skeleton,
|
|
183
|
+
Slider: () => Slider,
|
|
148
184
|
Switch: () => Switch,
|
|
149
185
|
TabbedBottomSheet: () => TabbedBottomSheet,
|
|
150
186
|
Table: () => Table,
|
|
@@ -162,6 +198,14 @@ __export(src_exports, {
|
|
|
162
198
|
TabsTriggerCore: () => TabsTriggerCore,
|
|
163
199
|
Textarea: () => Textarea,
|
|
164
200
|
TextareaWithPrefix: () => TextareaWithPrefix,
|
|
201
|
+
Toggle: () => Toggle,
|
|
202
|
+
ToggleGroup: () => ToggleGroup,
|
|
203
|
+
ToggleGroupItem: () => ToggleGroupItem,
|
|
204
|
+
Tooltip: () => Tooltip,
|
|
205
|
+
TooltipContent: () => TooltipContent,
|
|
206
|
+
TooltipProvider: () => TooltipProvider,
|
|
207
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
208
|
+
alertVariants: () => alertVariants,
|
|
165
209
|
badgeVariants: () => badgeVariants,
|
|
166
210
|
buttonVariants: () => buttonVariants,
|
|
167
211
|
cn: () => cn,
|
|
@@ -169,8 +213,10 @@ __export(src_exports, {
|
|
|
169
213
|
scoreRingColorClasses: () => scoreRingColorClasses,
|
|
170
214
|
selectTriggerVariants: () => selectTriggerVariants,
|
|
171
215
|
sheetVariants: () => sheetVariants,
|
|
216
|
+
toggleVariants: () => toggleVariants,
|
|
172
217
|
useCardSize: () => useCardSize,
|
|
173
218
|
useDialogContainer: () => useDialogContainer,
|
|
219
|
+
useDrawerDirection: () => useDrawerDirection,
|
|
174
220
|
useIsMobile: () => useIsMobile,
|
|
175
221
|
usePortalContainer: () => usePortalContainer,
|
|
176
222
|
useRadixDialogModal: () => useRadixDialogModal,
|
|
@@ -218,11 +264,187 @@ function Badge({ className, variant, ...props }) {
|
|
|
218
264
|
|
|
219
265
|
// src/bottom-sheet.tsx
|
|
220
266
|
var import_react_visually_hidden = require("@radix-ui/react-visually-hidden");
|
|
267
|
+
var import_vaul2 = require("vaul");
|
|
268
|
+
|
|
269
|
+
// src/drawer.tsx
|
|
270
|
+
var import_react_tree = require("@ai-matrx/kit/react-tree");
|
|
221
271
|
var React2 = __toESM(require("react"), 1);
|
|
222
272
|
var import_vaul = require("vaul");
|
|
223
273
|
|
|
224
|
-
// src/
|
|
274
|
+
// src/radix-dialog-modal-context.tsx
|
|
275
|
+
var React = __toESM(require("react"), 1);
|
|
225
276
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
277
|
+
var RadixDialogModalContext = React.createContext(true);
|
|
278
|
+
function RadixDialogModalProvider({
|
|
279
|
+
children,
|
|
280
|
+
modal
|
|
281
|
+
}) {
|
|
282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadixDialogModalContext.Provider, { value: modal, children });
|
|
283
|
+
}
|
|
284
|
+
function useRadixDialogModal() {
|
|
285
|
+
return React.useContext(RadixDialogModalContext);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// src/drawer.tsx
|
|
289
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
290
|
+
var DrawerDirectionContext = React2.createContext("bottom");
|
|
291
|
+
var useDrawerDirection = () => React2.useContext(DrawerDirectionContext);
|
|
292
|
+
var Drawer = ({
|
|
293
|
+
children,
|
|
294
|
+
shouldScaleBackground = true,
|
|
295
|
+
...props
|
|
296
|
+
}) => {
|
|
297
|
+
const direction = props.direction ?? "bottom";
|
|
298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadixDialogModalProvider, { modal: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DrawerDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
299
|
+
import_vaul.Drawer.Root,
|
|
300
|
+
{
|
|
301
|
+
modal: true,
|
|
302
|
+
shouldScaleBackground,
|
|
303
|
+
...props,
|
|
304
|
+
direction,
|
|
305
|
+
children
|
|
306
|
+
}
|
|
307
|
+
) }) });
|
|
308
|
+
};
|
|
309
|
+
Drawer.displayName = "Drawer";
|
|
310
|
+
var DrawerTrigger = import_vaul.Drawer.Trigger;
|
|
311
|
+
var DrawerPortal = import_vaul.Drawer.Portal;
|
|
312
|
+
var DrawerClose = import_vaul.Drawer.Close;
|
|
313
|
+
var DrawerOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
314
|
+
import_vaul.Drawer.Overlay,
|
|
315
|
+
{
|
|
316
|
+
ref,
|
|
317
|
+
"data-slot": "drawer-overlay",
|
|
318
|
+
className: cn(
|
|
319
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]",
|
|
320
|
+
className
|
|
321
|
+
),
|
|
322
|
+
...props
|
|
323
|
+
}
|
|
324
|
+
));
|
|
325
|
+
DrawerOverlay.displayName = import_vaul.Drawer.Overlay.displayName;
|
|
326
|
+
var DrawerDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
327
|
+
import_vaul.Drawer.Description,
|
|
328
|
+
{
|
|
329
|
+
ref,
|
|
330
|
+
"data-slot": "drawer-description",
|
|
331
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
332
|
+
...props
|
|
333
|
+
}
|
|
334
|
+
));
|
|
335
|
+
DrawerDescription.displayName = import_vaul.Drawer.Description.displayName;
|
|
336
|
+
var DrawerContentPrimitive = React2.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_vaul.Drawer.Content, { ...props, ref, "aria-modal": "true" }));
|
|
337
|
+
DrawerContentPrimitive.displayName = "DrawerContentPrimitive";
|
|
338
|
+
var DIRECTION_CLASSES = {
|
|
339
|
+
bottom: "inset-x-0 bottom-0 mt-24 flex-col rounded-t-[10px] border-t pb-safe",
|
|
340
|
+
top: "inset-x-0 top-0 mb-24 flex-col rounded-b-[10px] border-b pt-safe",
|
|
341
|
+
left: "inset-y-0 left-0 mr-24 flex-row rounded-r-[10px] border-r",
|
|
342
|
+
right: "inset-y-0 right-0 ml-24 flex-row rounded-l-[10px] border-l"
|
|
343
|
+
};
|
|
344
|
+
var SIZE_CLASSES = {
|
|
345
|
+
bottom: { adaptive: "h-auto max-h-[90dvh]", full: "h-[92dvh]" },
|
|
346
|
+
top: { adaptive: "h-auto max-h-[90dvh]", full: "h-[92dvh]" },
|
|
347
|
+
left: { adaptive: "w-auto max-w-[92vw]", full: "h-dvh w-[92vw] max-w-sm" },
|
|
348
|
+
right: { adaptive: "w-auto max-w-[92vw]", full: "h-dvh w-[92vw] max-w-sm" }
|
|
349
|
+
};
|
|
350
|
+
var DrawerContent = React2.forwardRef(({ className, children, size = "adaptive", showHandle, ...props }, ref) => {
|
|
351
|
+
const direction = useDrawerDirection();
|
|
352
|
+
const hasDescription = (0, import_react_tree.treeContainsComponent)(children, DrawerDescription) || (0, import_react_tree.treeContainsComponent)(children, import_vaul.Drawer.Description);
|
|
353
|
+
const withHandle = showHandle ?? (direction === "bottom" || direction === "top");
|
|
354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(DrawerPortal, { children: [
|
|
355
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DrawerOverlay, {}),
|
|
356
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
357
|
+
DrawerContentPrimitive,
|
|
358
|
+
{
|
|
359
|
+
ref,
|
|
360
|
+
"data-slot": "drawer-content",
|
|
361
|
+
"data-direction": direction,
|
|
362
|
+
className: cn(
|
|
363
|
+
"fixed z-[10000] flex min-w-0 border bg-background",
|
|
364
|
+
DIRECTION_CLASSES[direction],
|
|
365
|
+
SIZE_CLASSES[direction][size],
|
|
366
|
+
className
|
|
367
|
+
),
|
|
368
|
+
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
369
|
+
...props,
|
|
370
|
+
children: [
|
|
371
|
+
withHandle ? (
|
|
372
|
+
// Rule 3: the pill is 4px; the TARGET is 44px.
|
|
373
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
374
|
+
"div",
|
|
375
|
+
{
|
|
376
|
+
"aria-hidden": true,
|
|
377
|
+
"data-slot": "drawer-handle",
|
|
378
|
+
className: cn(
|
|
379
|
+
"flex min-h-11 w-full shrink-0 cursor-grab items-center justify-center active:cursor-grabbing",
|
|
380
|
+
direction === "top" && "order-last"
|
|
381
|
+
),
|
|
382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-1 w-[100px] rounded-full bg-muted" })
|
|
383
|
+
}
|
|
384
|
+
)
|
|
385
|
+
) : null,
|
|
386
|
+
children
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
] });
|
|
391
|
+
});
|
|
392
|
+
DrawerContent.displayName = "DrawerContent";
|
|
393
|
+
var DrawerHeader = ({
|
|
394
|
+
className,
|
|
395
|
+
...props
|
|
396
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
397
|
+
"div",
|
|
398
|
+
{
|
|
399
|
+
"data-slot": "drawer-header",
|
|
400
|
+
className: cn(
|
|
401
|
+
"grid shrink-0 gap-1.5 p-4 text-center sm:text-left",
|
|
402
|
+
className
|
|
403
|
+
),
|
|
404
|
+
...props
|
|
405
|
+
}
|
|
406
|
+
);
|
|
407
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
408
|
+
var DrawerBody = ({
|
|
409
|
+
className,
|
|
410
|
+
...props
|
|
411
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
412
|
+
"div",
|
|
413
|
+
{
|
|
414
|
+
"data-slot": "drawer-body",
|
|
415
|
+
className: cn("min-h-0 flex-1 overflow-y-auto overscroll-contain px-4", className),
|
|
416
|
+
...props
|
|
417
|
+
}
|
|
418
|
+
);
|
|
419
|
+
DrawerBody.displayName = "DrawerBody";
|
|
420
|
+
var DrawerFooter = ({
|
|
421
|
+
className,
|
|
422
|
+
...props
|
|
423
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
424
|
+
"div",
|
|
425
|
+
{
|
|
426
|
+
"data-slot": "drawer-footer",
|
|
427
|
+
className: cn("mt-auto flex shrink-0 flex-col gap-2 p-4 pb-safe", className),
|
|
428
|
+
...props
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
432
|
+
var DrawerTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
433
|
+
import_vaul.Drawer.Title,
|
|
434
|
+
{
|
|
435
|
+
ref,
|
|
436
|
+
"data-slot": "drawer-title",
|
|
437
|
+
className: cn(
|
|
438
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
439
|
+
className
|
|
440
|
+
),
|
|
441
|
+
...props
|
|
442
|
+
}
|
|
443
|
+
));
|
|
444
|
+
DrawerTitle.displayName = import_vaul.Drawer.Title.displayName;
|
|
445
|
+
|
|
446
|
+
// src/icons.tsx
|
|
447
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
226
448
|
function lucideProps(props) {
|
|
227
449
|
return {
|
|
228
450
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -237,53 +459,53 @@ function lucideProps(props) {
|
|
|
237
459
|
};
|
|
238
460
|
}
|
|
239
461
|
function Loader2Icon(props) {
|
|
240
|
-
return /* @__PURE__ */ (0,
|
|
462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...lucideProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) });
|
|
241
463
|
}
|
|
242
464
|
function ChevronLeftIcon(props) {
|
|
243
|
-
return /* @__PURE__ */ (0,
|
|
465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...lucideProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m15 18-6-6 6-6" }) });
|
|
244
466
|
}
|
|
245
467
|
function ChevronRightIcon(props) {
|
|
246
|
-
return /* @__PURE__ */ (0,
|
|
468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...lucideProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m9 18 6-6-6-6" }) });
|
|
247
469
|
}
|
|
248
470
|
function MoreHorizontalIcon(props) {
|
|
249
|
-
return /* @__PURE__ */ (0,
|
|
250
|
-
/* @__PURE__ */ (0,
|
|
251
|
-
/* @__PURE__ */ (0,
|
|
252
|
-
/* @__PURE__ */ (0,
|
|
471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...lucideProps(props), children: [
|
|
472
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "1" }),
|
|
473
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "19", cy: "12", r: "1" }),
|
|
474
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "5", cy: "12", r: "1" })
|
|
253
475
|
] });
|
|
254
476
|
}
|
|
255
477
|
function LucideCheckIcon(props) {
|
|
256
|
-
return /* @__PURE__ */ (0,
|
|
478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...lucideProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M20 6 9 17l-5-5" }) });
|
|
257
479
|
}
|
|
258
480
|
function ChevronsUpDownIcon(props) {
|
|
259
|
-
return /* @__PURE__ */ (0,
|
|
260
|
-
/* @__PURE__ */ (0,
|
|
261
|
-
/* @__PURE__ */ (0,
|
|
481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...lucideProps(props), children: [
|
|
482
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m7 15 5 5 5-5" }),
|
|
483
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m7 9 5-5 5 5" })
|
|
262
484
|
] });
|
|
263
485
|
}
|
|
264
486
|
function ExternalLinkIcon(props) {
|
|
265
|
-
return /* @__PURE__ */ (0,
|
|
266
|
-
/* @__PURE__ */ (0,
|
|
267
|
-
/* @__PURE__ */ (0,
|
|
268
|
-
/* @__PURE__ */ (0,
|
|
487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...lucideProps(props), children: [
|
|
488
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M15 3h6v6" }),
|
|
489
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M10 14 21 3" }),
|
|
490
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })
|
|
269
491
|
] });
|
|
270
492
|
}
|
|
271
493
|
function LockIcon(props) {
|
|
272
|
-
return /* @__PURE__ */ (0,
|
|
273
|
-
/* @__PURE__ */ (0,
|
|
274
|
-
/* @__PURE__ */ (0,
|
|
494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...lucideProps(props), children: [
|
|
495
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
496
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
275
497
|
] });
|
|
276
498
|
}
|
|
277
499
|
function PlusIcon(props) {
|
|
278
|
-
return /* @__PURE__ */ (0,
|
|
279
|
-
/* @__PURE__ */ (0,
|
|
280
|
-
/* @__PURE__ */ (0,
|
|
500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...lucideProps(props), children: [
|
|
501
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M5 12h14" }),
|
|
502
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 5v14" })
|
|
281
503
|
] });
|
|
282
504
|
}
|
|
283
505
|
function XIcon(props) {
|
|
284
|
-
return /* @__PURE__ */ (0,
|
|
285
|
-
/* @__PURE__ */ (0,
|
|
286
|
-
/* @__PURE__ */ (0,
|
|
506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...lucideProps(props), children: [
|
|
507
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M18 6 6 18" }),
|
|
508
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m6 6 12 12" })
|
|
287
509
|
] });
|
|
288
510
|
}
|
|
289
511
|
function radixProps(props) {
|
|
@@ -298,7 +520,7 @@ function radixProps(props) {
|
|
|
298
520
|
};
|
|
299
521
|
}
|
|
300
522
|
function MagnifyingGlassIcon(props) {
|
|
301
|
-
return /* @__PURE__ */ (0,
|
|
523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...radixProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
302
524
|
"path",
|
|
303
525
|
{
|
|
304
526
|
d: "M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",
|
|
@@ -309,7 +531,7 @@ function MagnifyingGlassIcon(props) {
|
|
|
309
531
|
) });
|
|
310
532
|
}
|
|
311
533
|
function CheckIcon(props) {
|
|
312
|
-
return /* @__PURE__ */ (0,
|
|
534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...radixProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
313
535
|
"path",
|
|
314
536
|
{
|
|
315
537
|
d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
|
|
@@ -320,7 +542,7 @@ function CheckIcon(props) {
|
|
|
320
542
|
) });
|
|
321
543
|
}
|
|
322
544
|
function DividerHorizontalIcon(props) {
|
|
323
|
-
return /* @__PURE__ */ (0,
|
|
545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...radixProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
324
546
|
"path",
|
|
325
547
|
{
|
|
326
548
|
d: "M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",
|
|
@@ -331,7 +553,7 @@ function DividerHorizontalIcon(props) {
|
|
|
331
553
|
) });
|
|
332
554
|
}
|
|
333
555
|
function DotFilledIcon(props) {
|
|
334
|
-
return /* @__PURE__ */ (0,
|
|
556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...radixProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
335
557
|
"path",
|
|
336
558
|
{
|
|
337
559
|
d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
|
|
@@ -340,7 +562,7 @@ function DotFilledIcon(props) {
|
|
|
340
562
|
) });
|
|
341
563
|
}
|
|
342
564
|
function RadixChevronRightIcon(props) {
|
|
343
|
-
return /* @__PURE__ */ (0,
|
|
565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...radixProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
344
566
|
"path",
|
|
345
567
|
{
|
|
346
568
|
d: "M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",
|
|
@@ -351,7 +573,7 @@ function RadixChevronRightIcon(props) {
|
|
|
351
573
|
) });
|
|
352
574
|
}
|
|
353
575
|
function RadixChevronDownIcon(props) {
|
|
354
|
-
return /* @__PURE__ */ (0,
|
|
576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...radixProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
355
577
|
"path",
|
|
356
578
|
{
|
|
357
579
|
d: "M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",
|
|
@@ -362,7 +584,7 @@ function RadixChevronDownIcon(props) {
|
|
|
362
584
|
) });
|
|
363
585
|
}
|
|
364
586
|
function RadixChevronUpIcon(props) {
|
|
365
|
-
return /* @__PURE__ */ (0,
|
|
587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...radixProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
366
588
|
"path",
|
|
367
589
|
{
|
|
368
590
|
d: "M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",
|
|
@@ -373,7 +595,7 @@ function RadixChevronUpIcon(props) {
|
|
|
373
595
|
) });
|
|
374
596
|
}
|
|
375
597
|
function Cross2Icon(props) {
|
|
376
|
-
return /* @__PURE__ */ (0,
|
|
598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
377
599
|
"svg",
|
|
378
600
|
{
|
|
379
601
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -381,7 +603,7 @@ function Cross2Icon(props) {
|
|
|
381
603
|
fill: "none",
|
|
382
604
|
"aria-hidden": true,
|
|
383
605
|
...props,
|
|
384
|
-
children: /* @__PURE__ */ (0,
|
|
606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
385
607
|
"path",
|
|
386
608
|
{
|
|
387
609
|
d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
|
|
@@ -393,39 +615,20 @@ function Cross2Icon(props) {
|
|
|
393
615
|
}
|
|
394
616
|
);
|
|
395
617
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
}
|
|
407
|
-
function useRadixDialogModal() {
|
|
408
|
-
return React.useContext(RadixDialogModalContext);
|
|
618
|
+
function DragHandleDots2Icon(props) {
|
|
619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...radixProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
620
|
+
"path",
|
|
621
|
+
{
|
|
622
|
+
d: "M4.5 2.5C5.05228 2.5 5.5 2.05228 5.5 1.5C5.5 0.947715 5.05228 0.5 4.5 0.5C3.94772 0.5 3.5 0.947715 3.5 1.5C3.5 2.05228 3.94772 2.5 4.5 2.5ZM4.5 6.5C5.05228 6.5 5.5 6.05229 5.5 5.5C5.5 4.94771 5.05228 4.5 4.5 4.5C3.94772 4.5 3.5 4.94771 3.5 5.5C3.5 6.05229 3.94772 6.5 4.5 6.5ZM5.5 9.5C5.5 10.0523 5.05228 10.5 4.5 10.5C3.94772 10.5 3.5 10.0523 3.5 9.5C3.5 8.94771 3.94772 8.5 4.5 8.5C5.05228 8.5 5.5 8.94771 5.5 9.5ZM4.5 14.5C5.05228 14.5 5.5 14.0523 5.5 13.5C5.5 12.9477 5.05228 12.5 4.5 12.5C3.94772 12.5 3.5 12.9477 3.5 13.5C3.5 14.0523 3.94772 14.5 4.5 14.5ZM11.5 1.5C11.5 2.05228 11.0523 2.5 10.5 2.5C9.94771 2.5 9.5 2.05228 9.5 1.5C9.5 0.947715 9.94771 0.5 10.5 0.5C11.0523 0.5 11.5 0.947715 11.5 1.5ZM10.5 6.5C11.0523 6.5 11.5 6.05229 11.5 5.5C11.5 4.94771 11.0523 4.5 10.5 4.5C9.94771 4.5 9.5 4.94771 9.5 5.5C9.5 6.05229 9.94771 6.5 10.5 6.5ZM11.5 9.5C11.5 10.0523 11.0523 10.5 10.5 10.5C9.94771 10.5 9.5 10.0523 9.5 9.5C9.5 8.94771 9.94771 8.5 10.5 8.5C11.0523 8.5 11.5 8.94771 11.5 9.5ZM10.5 14.5C11.0523 14.5 11.5 14.0523 11.5 13.5C11.5 12.9477 11.0523 12.5 10.5 12.5C9.94771 12.5 9.5 12.9477 9.5 13.5C9.5 14.0523 9.94771 14.5 10.5 14.5Z",
|
|
623
|
+
fill: "currentColor",
|
|
624
|
+
fillRule: "evenodd",
|
|
625
|
+
clipRule: "evenodd"
|
|
626
|
+
}
|
|
627
|
+
) });
|
|
409
628
|
}
|
|
410
629
|
|
|
411
630
|
// src/bottom-sheet.tsx
|
|
412
|
-
var
|
|
413
|
-
var DrawerRoot = ({
|
|
414
|
-
children,
|
|
415
|
-
shouldScaleBackground = true,
|
|
416
|
-
...props
|
|
417
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RadixDialogModalProvider, { modal: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
418
|
-
import_vaul.Drawer.Root,
|
|
419
|
-
{
|
|
420
|
-
modal: true,
|
|
421
|
-
shouldScaleBackground,
|
|
422
|
-
...props,
|
|
423
|
-
children
|
|
424
|
-
}
|
|
425
|
-
) });
|
|
426
|
-
DrawerRoot.displayName = "DrawerRoot";
|
|
427
|
-
var DrawerContentPrimitive = React2.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_vaul.Drawer.Content, { ...props, ref, "aria-modal": "true" }));
|
|
428
|
-
DrawerContentPrimitive.displayName = "DrawerContentPrimitive";
|
|
631
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
429
632
|
function BottomSheet({
|
|
430
633
|
open,
|
|
431
634
|
onOpenChange,
|
|
@@ -435,15 +638,15 @@ function BottomSheet({
|
|
|
435
638
|
contentClassName,
|
|
436
639
|
children
|
|
437
640
|
}) {
|
|
438
|
-
return /* @__PURE__ */ (0,
|
|
439
|
-
/* @__PURE__ */ (0,
|
|
440
|
-
|
|
641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_vaul2.Drawer.Portal, { children: [
|
|
642
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
643
|
+
import_vaul2.Drawer.Overlay,
|
|
441
644
|
{
|
|
442
645
|
className: cn("fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]", "fixed inset-0 z-50"),
|
|
443
646
|
style: { background: "var(--matrx-overlay-scrim-drawer)" }
|
|
444
647
|
}
|
|
445
648
|
),
|
|
446
|
-
/* @__PURE__ */ (0,
|
|
649
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
447
650
|
DrawerContentPrimitive,
|
|
448
651
|
{
|
|
449
652
|
className: cn(
|
|
@@ -460,11 +663,11 @@ function BottomSheet({
|
|
|
460
663
|
borderBottom: "none"
|
|
461
664
|
} : void 0,
|
|
462
665
|
children: [
|
|
463
|
-
/* @__PURE__ */ (0,
|
|
464
|
-
/* @__PURE__ */ (0,
|
|
465
|
-
/* @__PURE__ */ (0,
|
|
666
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_visually_hidden.VisuallyHidden, { children: [
|
|
667
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_vaul2.Drawer.Title, { children: title }),
|
|
668
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_vaul2.Drawer.Description, { children: "Bottom sheet panel." })
|
|
466
669
|
] }),
|
|
467
|
-
/* @__PURE__ */ (0,
|
|
670
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-auto mt-3 mb-1 h-1.5 w-10 rounded-full bg-muted-foreground/30 flex-shrink-0" }),
|
|
468
671
|
children
|
|
469
672
|
]
|
|
470
673
|
}
|
|
@@ -477,8 +680,8 @@ function BottomSheetHeader({
|
|
|
477
680
|
onBack,
|
|
478
681
|
trailing
|
|
479
682
|
}) {
|
|
480
|
-
return /* @__PURE__ */ (0,
|
|
481
|
-
/* @__PURE__ */ (0,
|
|
683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center px-2 pt-1 pb-2 flex-shrink-0 min-h-[44px]", children: [
|
|
684
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "min-w-[44px] flex items-center justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
482
685
|
"button",
|
|
483
686
|
{
|
|
484
687
|
onClick: onBack,
|
|
@@ -488,15 +691,15 @@ function BottomSheetHeader({
|
|
|
488
691
|
),
|
|
489
692
|
"aria-hidden": !showBack,
|
|
490
693
|
tabIndex: showBack ? 0 : -1,
|
|
491
|
-
children: /* @__PURE__ */ (0,
|
|
694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChevronLeftIcon, { className: "h-4 w-4 text-foreground" })
|
|
492
695
|
}
|
|
493
696
|
) }),
|
|
494
|
-
/* @__PURE__ */ (0,
|
|
495
|
-
/* @__PURE__ */ (0,
|
|
697
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-[17px] font-semibold flex-1 text-center truncate", children: title }),
|
|
698
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "min-w-[44px] flex items-center justify-end", children: trailing })
|
|
496
699
|
] });
|
|
497
700
|
}
|
|
498
701
|
function BottomSheetBody({ children, className }) {
|
|
499
|
-
return /* @__PURE__ */ (0,
|
|
702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
500
703
|
"div",
|
|
501
704
|
{
|
|
502
705
|
className: cn(
|
|
@@ -513,7 +716,7 @@ function BottomSheetFooter({
|
|
|
513
716
|
children,
|
|
514
717
|
className
|
|
515
718
|
}) {
|
|
516
|
-
return /* @__PURE__ */ (0,
|
|
719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
517
720
|
"div",
|
|
518
721
|
{
|
|
519
722
|
className: cn(
|
|
@@ -525,12 +728,73 @@ function BottomSheetFooter({
|
|
|
525
728
|
);
|
|
526
729
|
}
|
|
527
730
|
|
|
528
|
-
// src/
|
|
529
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
731
|
+
// src/alert.tsx
|
|
530
732
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
531
733
|
var React3 = __toESM(require("react"), 1);
|
|
532
|
-
var
|
|
533
|
-
var
|
|
734
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
735
|
+
var alertVariants = (0, import_class_variance_authority2.cva)(
|
|
736
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-7",
|
|
737
|
+
{
|
|
738
|
+
variants: {
|
|
739
|
+
variant: {
|
|
740
|
+
default: "bg-background text-foreground [&>svg]:text-foreground",
|
|
741
|
+
destructive: "border-destructive/50 bg-destructive/5 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
742
|
+
warning: "border-warning/50 bg-warning/5 text-warning dark:border-warning [&>svg]:text-warning",
|
|
743
|
+
success: "border-success/50 bg-success/5 text-success dark:border-success [&>svg]:text-success",
|
|
744
|
+
info: "border-info/50 bg-info/5 text-info dark:border-info [&>svg]:text-info"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
defaultVariants: {
|
|
748
|
+
variant: "default"
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
);
|
|
752
|
+
var Alert = React3.forwardRef(
|
|
753
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
754
|
+
"div",
|
|
755
|
+
{
|
|
756
|
+
ref,
|
|
757
|
+
role: "alert",
|
|
758
|
+
"data-slot": "alert",
|
|
759
|
+
"data-variant": variant ?? "default",
|
|
760
|
+
className: cn(alertVariants({ variant }), className),
|
|
761
|
+
...props
|
|
762
|
+
}
|
|
763
|
+
)
|
|
764
|
+
);
|
|
765
|
+
Alert.displayName = "Alert";
|
|
766
|
+
var AlertTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
767
|
+
"h5",
|
|
768
|
+
{
|
|
769
|
+
ref,
|
|
770
|
+
"data-slot": "alert-title",
|
|
771
|
+
className: cn("mb-1 font-medium leading-none tracking-tight", className),
|
|
772
|
+
...props
|
|
773
|
+
}
|
|
774
|
+
));
|
|
775
|
+
AlertTitle.displayName = "AlertTitle";
|
|
776
|
+
var AlertDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
777
|
+
"div",
|
|
778
|
+
{
|
|
779
|
+
ref,
|
|
780
|
+
"data-slot": "alert-description",
|
|
781
|
+
className: cn("text-sm [&_p]:leading-relaxed", className),
|
|
782
|
+
...props
|
|
783
|
+
}
|
|
784
|
+
));
|
|
785
|
+
AlertDescription.displayName = "AlertDescription";
|
|
786
|
+
|
|
787
|
+
// src/alert-dialog.tsx
|
|
788
|
+
var AlertDialogPrimitive = __toESM(require("@radix-ui/react-alert-dialog"), 1);
|
|
789
|
+
var import_react_tree2 = require("@ai-matrx/kit/react-tree");
|
|
790
|
+
var React6 = __toESM(require("react"), 1);
|
|
791
|
+
|
|
792
|
+
// src/button.tsx
|
|
793
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
794
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
795
|
+
var React4 = __toESM(require("react"), 1);
|
|
796
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
797
|
+
var buttonVariants = (0, import_class_variance_authority3.cva)(
|
|
534
798
|
"inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
535
799
|
{
|
|
536
800
|
variants: {
|
|
@@ -581,10 +845,10 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
|
581
845
|
}
|
|
582
846
|
}
|
|
583
847
|
);
|
|
584
|
-
var Button =
|
|
848
|
+
var Button = React4.forwardRef(
|
|
585
849
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
586
850
|
const Component = asChild ? import_react_slot.Slot : "button";
|
|
587
|
-
return /* @__PURE__ */ (0,
|
|
851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
588
852
|
Component,
|
|
589
853
|
{
|
|
590
854
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -596,16 +860,166 @@ var Button = React3.forwardRef(
|
|
|
596
860
|
);
|
|
597
861
|
Button.displayName = "Button";
|
|
598
862
|
|
|
863
|
+
// src/portal-container.tsx
|
|
864
|
+
var React5 = __toESM(require("react"), 1);
|
|
865
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
866
|
+
var PortalContainerContext = React5.createContext(
|
|
867
|
+
void 0
|
|
868
|
+
);
|
|
869
|
+
function PortalContainerProvider({
|
|
870
|
+
container,
|
|
871
|
+
children
|
|
872
|
+
}) {
|
|
873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PortalContainerContext.Provider, { value: container ?? void 0, children });
|
|
874
|
+
}
|
|
875
|
+
function usePortalContainer(explicit) {
|
|
876
|
+
const injected = React5.useContext(PortalContainerContext);
|
|
877
|
+
if (explicit !== void 0) {
|
|
878
|
+
return explicit ?? void 0;
|
|
879
|
+
}
|
|
880
|
+
return injected ?? void 0;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
// src/alert-dialog.tsx
|
|
884
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
885
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
886
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
887
|
+
var AlertDialogPortal = ({
|
|
888
|
+
container,
|
|
889
|
+
...props
|
|
890
|
+
}) => {
|
|
891
|
+
const resolved = usePortalContainer(container);
|
|
892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogPrimitive.Portal, { container: resolved ?? null, ...props });
|
|
893
|
+
};
|
|
894
|
+
AlertDialogPortal.displayName = "AlertDialogPortal";
|
|
895
|
+
var AlertDialogOverlay = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
896
|
+
AlertDialogPrimitive.Overlay,
|
|
897
|
+
{
|
|
898
|
+
ref,
|
|
899
|
+
"data-slot": "alert-dialog-overlay",
|
|
900
|
+
className: cn(
|
|
901
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
902
|
+
className
|
|
903
|
+
),
|
|
904
|
+
...props
|
|
905
|
+
}
|
|
906
|
+
));
|
|
907
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
908
|
+
var AlertDialogContentPrimitive = React6.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogPrimitive.Content, { ...props, ref, "aria-modal": "true" }));
|
|
909
|
+
AlertDialogContentPrimitive.displayName = "AlertDialogContentPrimitive";
|
|
910
|
+
var AlertDialogDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
911
|
+
AlertDialogPrimitive.Description,
|
|
912
|
+
{
|
|
913
|
+
ref,
|
|
914
|
+
"data-slot": "alert-dialog-description",
|
|
915
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
916
|
+
...props
|
|
917
|
+
}
|
|
918
|
+
));
|
|
919
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
920
|
+
var AlertDialogContent = React6.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
921
|
+
const hasDescription = (0, import_react_tree2.treeContainsComponent)(children, AlertDialogDescription) || (0, import_react_tree2.treeContainsComponent)(children, AlertDialogPrimitive.Description);
|
|
922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(AlertDialogPortal, { container, children: [
|
|
923
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogOverlay, {}),
|
|
924
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
925
|
+
AlertDialogContentPrimitive,
|
|
926
|
+
{
|
|
927
|
+
ref,
|
|
928
|
+
"data-slot": "alert-dialog-content",
|
|
929
|
+
className: cn(
|
|
930
|
+
"fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200",
|
|
931
|
+
// Ruling 3 — never taller than the viewport, always scrollable, and
|
|
932
|
+
// the footer stays reachable via --dialog-pad like Dialog's.
|
|
933
|
+
"max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full",
|
|
934
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
935
|
+
className
|
|
936
|
+
),
|
|
937
|
+
...props,
|
|
938
|
+
children: [
|
|
939
|
+
hasDescription ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogPrimitive.Description, { className: "sr-only", children: "Please confirm the action described in this dialog." }),
|
|
940
|
+
children
|
|
941
|
+
]
|
|
942
|
+
}
|
|
943
|
+
)
|
|
944
|
+
] });
|
|
945
|
+
});
|
|
946
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
947
|
+
var AlertDialogHeader = ({
|
|
948
|
+
className,
|
|
949
|
+
...props
|
|
950
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
951
|
+
"div",
|
|
952
|
+
{
|
|
953
|
+
"data-slot": "alert-dialog-header",
|
|
954
|
+
className: cn("flex flex-col space-y-2 text-center sm:text-left", className),
|
|
955
|
+
...props
|
|
956
|
+
}
|
|
957
|
+
);
|
|
958
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
959
|
+
var AlertDialogFooter = ({
|
|
960
|
+
className,
|
|
961
|
+
...props
|
|
962
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
963
|
+
"div",
|
|
964
|
+
{
|
|
965
|
+
"data-slot": "alert-dialog-footer",
|
|
966
|
+
className: cn(
|
|
967
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
968
|
+
// Ruling 3/4 — sticky to the card edges so a scrolled body never shows
|
|
969
|
+
// through under the actions, and safe-area padded on a phone.
|
|
970
|
+
"sticky bottom-0 z-10 bg-background pt-3",
|
|
971
|
+
"mx-[calc(var(--dialog-pad,0px)*-1)] mb-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad,0px)]",
|
|
972
|
+
className
|
|
973
|
+
),
|
|
974
|
+
...props
|
|
975
|
+
}
|
|
976
|
+
);
|
|
977
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
978
|
+
var AlertDialogTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
979
|
+
AlertDialogPrimitive.Title,
|
|
980
|
+
{
|
|
981
|
+
ref,
|
|
982
|
+
"data-slot": "alert-dialog-title",
|
|
983
|
+
className: cn("text-lg font-semibold", className),
|
|
984
|
+
...props
|
|
985
|
+
}
|
|
986
|
+
));
|
|
987
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
988
|
+
var AlertDialogAction = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
989
|
+
AlertDialogPrimitive.Action,
|
|
990
|
+
{
|
|
991
|
+
ref,
|
|
992
|
+
"data-slot": "alert-dialog-action",
|
|
993
|
+
className: cn(buttonVariants(), className),
|
|
994
|
+
...props
|
|
995
|
+
}
|
|
996
|
+
));
|
|
997
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
998
|
+
var AlertDialogCancel = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
999
|
+
AlertDialogPrimitive.Cancel,
|
|
1000
|
+
{
|
|
1001
|
+
ref,
|
|
1002
|
+
"data-slot": "alert-dialog-cancel",
|
|
1003
|
+
className: cn(
|
|
1004
|
+
buttonVariants({ variant: "outline" }),
|
|
1005
|
+
"mt-2 sm:mt-0",
|
|
1006
|
+
className
|
|
1007
|
+
),
|
|
1008
|
+
...props
|
|
1009
|
+
}
|
|
1010
|
+
));
|
|
1011
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
1012
|
+
|
|
599
1013
|
// src/avatar.tsx
|
|
600
1014
|
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
601
|
-
var
|
|
602
|
-
var
|
|
1015
|
+
var React7 = __toESM(require("react"), 1);
|
|
1016
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
603
1017
|
var AVATAR_SIZES = {
|
|
604
1018
|
sm: "h-8 w-8 text-[11px]",
|
|
605
1019
|
md: "h-9 w-9 text-xs",
|
|
606
1020
|
lg: "h-10 w-10 text-sm"
|
|
607
1021
|
};
|
|
608
|
-
var Avatar =
|
|
1022
|
+
var Avatar = React7.forwardRef(({ className, size = "lg", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
609
1023
|
AvatarPrimitive.Root,
|
|
610
1024
|
{
|
|
611
1025
|
ref,
|
|
@@ -619,7 +1033,7 @@ var Avatar = React4.forwardRef(({ className, size = "lg", ...props }, ref) => /*
|
|
|
619
1033
|
}
|
|
620
1034
|
));
|
|
621
1035
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
622
|
-
var AvatarImage =
|
|
1036
|
+
var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
623
1037
|
AvatarPrimitive.Image,
|
|
624
1038
|
{
|
|
625
1039
|
ref,
|
|
@@ -629,7 +1043,7 @@ var AvatarImage = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
629
1043
|
}
|
|
630
1044
|
));
|
|
631
1045
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
632
|
-
var AvatarFallback =
|
|
1046
|
+
var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
633
1047
|
AvatarPrimitive.Fallback,
|
|
634
1048
|
{
|
|
635
1049
|
ref,
|
|
@@ -644,8 +1058,8 @@ var AvatarFallback = React4.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
644
1058
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
645
1059
|
|
|
646
1060
|
// src/card.tsx
|
|
647
|
-
var
|
|
648
|
-
var
|
|
1061
|
+
var React8 = __toESM(require("react"), 1);
|
|
1062
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
649
1063
|
var CARD_SIZES = {
|
|
650
1064
|
sm: {
|
|
651
1065
|
root: "rounded-xl border bg-card text-card-foreground shadow",
|
|
@@ -663,12 +1077,12 @@ var CARD_SIZES = {
|
|
|
663
1077
|
padTopless: "p-6 pt-0"
|
|
664
1078
|
}
|
|
665
1079
|
};
|
|
666
|
-
var CardSizeContext =
|
|
1080
|
+
var CardSizeContext = React8.createContext("md");
|
|
667
1081
|
function useCardSize() {
|
|
668
|
-
return
|
|
1082
|
+
return React8.useContext(CardSizeContext);
|
|
669
1083
|
}
|
|
670
|
-
var Card =
|
|
671
|
-
({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0,
|
|
1084
|
+
var Card = React8.forwardRef(
|
|
1085
|
+
({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CardSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
672
1086
|
"div",
|
|
673
1087
|
{
|
|
674
1088
|
ref,
|
|
@@ -680,9 +1094,9 @@ var Card = React5.forwardRef(
|
|
|
680
1094
|
) })
|
|
681
1095
|
);
|
|
682
1096
|
Card.displayName = "Card";
|
|
683
|
-
var CardHeader =
|
|
1097
|
+
var CardHeader = React8.forwardRef(({ className, ...props }, ref) => {
|
|
684
1098
|
const size = useCardSize();
|
|
685
|
-
return /* @__PURE__ */ (0,
|
|
1099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
686
1100
|
"div",
|
|
687
1101
|
{
|
|
688
1102
|
ref,
|
|
@@ -697,7 +1111,7 @@ var CardHeader = React5.forwardRef(({ className, ...props }, ref) => {
|
|
|
697
1111
|
);
|
|
698
1112
|
});
|
|
699
1113
|
CardHeader.displayName = "CardHeader";
|
|
700
|
-
var CardTitle =
|
|
1114
|
+
var CardTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
701
1115
|
"h3",
|
|
702
1116
|
{
|
|
703
1117
|
ref,
|
|
@@ -707,7 +1121,7 @@ var CardTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
707
1121
|
}
|
|
708
1122
|
));
|
|
709
1123
|
CardTitle.displayName = "CardTitle";
|
|
710
|
-
var CardDescription =
|
|
1124
|
+
var CardDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
711
1125
|
"p",
|
|
712
1126
|
{
|
|
713
1127
|
ref,
|
|
@@ -717,7 +1131,7 @@ var CardDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
717
1131
|
}
|
|
718
1132
|
));
|
|
719
1133
|
CardDescription.displayName = "CardDescription";
|
|
720
|
-
var CardAction =
|
|
1134
|
+
var CardAction = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
721
1135
|
"div",
|
|
722
1136
|
{
|
|
723
1137
|
ref,
|
|
@@ -727,9 +1141,9 @@ var CardAction = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
727
1141
|
}
|
|
728
1142
|
));
|
|
729
1143
|
CardAction.displayName = "CardAction";
|
|
730
|
-
var CardContent =
|
|
1144
|
+
var CardContent = React8.forwardRef(({ className, ...props }, ref) => {
|
|
731
1145
|
const size = useCardSize();
|
|
732
|
-
return /* @__PURE__ */ (0,
|
|
1146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
733
1147
|
"div",
|
|
734
1148
|
{
|
|
735
1149
|
ref,
|
|
@@ -740,9 +1154,9 @@ var CardContent = React5.forwardRef(({ className, ...props }, ref) => {
|
|
|
740
1154
|
);
|
|
741
1155
|
});
|
|
742
1156
|
CardContent.displayName = "CardContent";
|
|
743
|
-
var CardFooter =
|
|
1157
|
+
var CardFooter = React8.forwardRef(({ className, ...props }, ref) => {
|
|
744
1158
|
const size = useCardSize();
|
|
745
|
-
return /* @__PURE__ */ (0,
|
|
1159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
746
1160
|
"div",
|
|
747
1161
|
{
|
|
748
1162
|
ref,
|
|
@@ -760,13 +1174,13 @@ CardFooter.displayName = "CardFooter";
|
|
|
760
1174
|
|
|
761
1175
|
// src/checkbox.tsx
|
|
762
1176
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
763
|
-
var
|
|
764
|
-
var
|
|
1177
|
+
var React9 = __toESM(require("react"), 1);
|
|
1178
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
765
1179
|
var CHECKBOX_SIZES = {
|
|
766
1180
|
sm: { root: "h-3.5 w-3.5 rounded-xs", glyph: "h-3 w-3" },
|
|
767
1181
|
md: { root: "h-4 w-4 rounded-sm", glyph: "h-3.5 w-3.5" }
|
|
768
1182
|
};
|
|
769
|
-
var Checkbox =
|
|
1183
|
+
var Checkbox = React9.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
770
1184
|
CheckboxPrimitive.Root,
|
|
771
1185
|
{
|
|
772
1186
|
ref,
|
|
@@ -777,12 +1191,12 @@ var Checkbox = React6.forwardRef(({ className, size = "md", ...props }, ref) =>
|
|
|
777
1191
|
className
|
|
778
1192
|
),
|
|
779
1193
|
...props,
|
|
780
|
-
children: /* @__PURE__ */ (0,
|
|
1194
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
781
1195
|
CheckboxPrimitive.Indicator,
|
|
782
1196
|
{
|
|
783
1197
|
"data-slot": "checkbox-indicator",
|
|
784
1198
|
className: "flex items-center justify-center text-current",
|
|
785
|
-
children: props.checked === "indeterminate" ? /* @__PURE__ */ (0,
|
|
1199
|
+
children: props.checked === "indeterminate" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DividerHorizontalIcon, { className: CHECKBOX_SIZES[size].glyph }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CheckIcon, { className: CHECKBOX_SIZES[size].glyph })
|
|
786
1200
|
}
|
|
787
1201
|
)
|
|
788
1202
|
}
|
|
@@ -798,35 +1212,15 @@ var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
|
798
1212
|
// src/command.tsx
|
|
799
1213
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
800
1214
|
var import_cmdk = require("cmdk");
|
|
801
|
-
var
|
|
802
|
-
|
|
803
|
-
// src/portal-container.tsx
|
|
804
|
-
var React7 = __toESM(require("react"), 1);
|
|
805
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
806
|
-
var PortalContainerContext = React7.createContext(
|
|
807
|
-
void 0
|
|
808
|
-
);
|
|
809
|
-
function PortalContainerProvider({
|
|
810
|
-
container,
|
|
811
|
-
children
|
|
812
|
-
}) {
|
|
813
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PortalContainerContext.Provider, { value: container ?? void 0, children });
|
|
814
|
-
}
|
|
815
|
-
function usePortalContainer(explicit) {
|
|
816
|
-
const injected = React7.useContext(PortalContainerContext);
|
|
817
|
-
if (explicit !== void 0) {
|
|
818
|
-
return explicit ?? void 0;
|
|
819
|
-
}
|
|
820
|
-
return injected ?? void 0;
|
|
821
|
-
}
|
|
1215
|
+
var React11 = __toESM(require("react"), 1);
|
|
822
1216
|
|
|
823
1217
|
// src/use-is-mobile.ts
|
|
824
|
-
var
|
|
1218
|
+
var React10 = __toESM(require("react"), 1);
|
|
825
1219
|
var MOBILE_BREAKPOINT = 768;
|
|
826
1220
|
function useIsMobile() {
|
|
827
|
-
const [isMobile, setIsMobile] =
|
|
828
|
-
const [hasMounted, setHasMounted] =
|
|
829
|
-
|
|
1221
|
+
const [isMobile, setIsMobile] = React10.useState(false);
|
|
1222
|
+
const [hasMounted, setHasMounted] = React10.useState(false);
|
|
1223
|
+
React10.useEffect(() => {
|
|
830
1224
|
setHasMounted(true);
|
|
831
1225
|
const onChange = () => {
|
|
832
1226
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -846,8 +1240,8 @@ function useIsMobile() {
|
|
|
846
1240
|
}
|
|
847
1241
|
|
|
848
1242
|
// src/command.tsx
|
|
849
|
-
var
|
|
850
|
-
var Command =
|
|
1243
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1244
|
+
var Command = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
851
1245
|
import_cmdk.Command,
|
|
852
1246
|
{
|
|
853
1247
|
ref,
|
|
@@ -862,18 +1256,18 @@ Command.displayName = import_cmdk.Command.displayName;
|
|
|
862
1256
|
var DIALOG_DESKTOP_CLASSES = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg";
|
|
863
1257
|
var DIALOG_MOBILE_SHEET_CLASSES = "fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full duration-200 rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom";
|
|
864
1258
|
var DIALOG_MOBILE_SHEET_OVERRIDE = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
|
|
865
|
-
var CommandDialogContent =
|
|
1259
|
+
var CommandDialogContent = React11.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
866
1260
|
const isMobile = useIsMobile();
|
|
867
1261
|
const isModal = useRadixDialogModal();
|
|
868
1262
|
const portalContainer = usePortalContainer(container);
|
|
869
|
-
return /* @__PURE__ */ (0,
|
|
870
|
-
isModal ? /* @__PURE__ */ (0,
|
|
1263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DialogPrimitive.Portal, { container: portalContainer, children: [
|
|
1264
|
+
isModal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
871
1265
|
DialogPrimitive.Overlay,
|
|
872
1266
|
{
|
|
873
1267
|
className: "fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
874
1268
|
}
|
|
875
1269
|
) : null,
|
|
876
|
-
/* @__PURE__ */ (0,
|
|
1270
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
877
1271
|
DialogPrimitive.Content,
|
|
878
1272
|
{
|
|
879
1273
|
ref,
|
|
@@ -888,9 +1282,9 @@ var CommandDialogContent = React9.forwardRef(({ className, children, container,
|
|
|
888
1282
|
...props,
|
|
889
1283
|
children: [
|
|
890
1284
|
children,
|
|
891
|
-
/* @__PURE__ */ (0,
|
|
892
|
-
/* @__PURE__ */ (0,
|
|
893
|
-
/* @__PURE__ */ (0,
|
|
1285
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DialogPrimitive.Close, { className: "absolute right-2 top-4 flex h-10 w-10 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4", children: [
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(XIcon, { className: "h-4 w-4" }),
|
|
1287
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", children: "Close" })
|
|
894
1288
|
] })
|
|
895
1289
|
]
|
|
896
1290
|
}
|
|
@@ -904,21 +1298,21 @@ var CommandDialog = ({
|
|
|
904
1298
|
...props
|
|
905
1299
|
}) => {
|
|
906
1300
|
const modal = props.modal ?? true;
|
|
907
|
-
return /* @__PURE__ */ (0,
|
|
1301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogPrimitive.Root, { ...props, modal, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
908
1302
|
CommandDialogContent,
|
|
909
1303
|
{
|
|
910
1304
|
className: "overflow-hidden p-0",
|
|
911
1305
|
...container !== void 0 ? { container } : {},
|
|
912
1306
|
children: [
|
|
913
|
-
/* @__PURE__ */ (0,
|
|
914
|
-
/* @__PURE__ */ (0,
|
|
1307
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogPrimitive.Title, { className: "sr-only" }),
|
|
1308
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
915
1309
|
]
|
|
916
1310
|
}
|
|
917
1311
|
) }) });
|
|
918
1312
|
};
|
|
919
|
-
var CommandInput =
|
|
920
|
-
/* @__PURE__ */ (0,
|
|
921
|
-
/* @__PURE__ */ (0,
|
|
1313
|
+
var CommandInput = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
922
1316
|
import_cmdk.Command.Input,
|
|
923
1317
|
{
|
|
924
1318
|
ref,
|
|
@@ -931,7 +1325,7 @@ var CommandInput = React9.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
931
1325
|
)
|
|
932
1326
|
] }));
|
|
933
1327
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
934
|
-
var CommandList =
|
|
1328
|
+
var CommandList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
935
1329
|
import_cmdk.Command.List,
|
|
936
1330
|
{
|
|
937
1331
|
ref,
|
|
@@ -940,7 +1334,7 @@ var CommandList = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
940
1334
|
}
|
|
941
1335
|
));
|
|
942
1336
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
943
|
-
var CommandEmpty =
|
|
1337
|
+
var CommandEmpty = React11.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
944
1338
|
import_cmdk.Command.Empty,
|
|
945
1339
|
{
|
|
946
1340
|
ref,
|
|
@@ -949,7 +1343,7 @@ var CommandEmpty = React9.forwardRef((props, ref) => /* @__PURE__ */ (0, import_
|
|
|
949
1343
|
}
|
|
950
1344
|
));
|
|
951
1345
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
952
|
-
var CommandGroup =
|
|
1346
|
+
var CommandGroup = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
953
1347
|
import_cmdk.Command.Group,
|
|
954
1348
|
{
|
|
955
1349
|
ref,
|
|
@@ -961,7 +1355,7 @@ var CommandGroup = React9.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
961
1355
|
}
|
|
962
1356
|
));
|
|
963
1357
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
964
|
-
var CommandSeparator =
|
|
1358
|
+
var CommandSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
965
1359
|
import_cmdk.Command.Separator,
|
|
966
1360
|
{
|
|
967
1361
|
ref,
|
|
@@ -970,7 +1364,7 @@ var CommandSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
970
1364
|
}
|
|
971
1365
|
));
|
|
972
1366
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
973
|
-
var CommandItem =
|
|
1367
|
+
var CommandItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
974
1368
|
import_cmdk.Command.Item,
|
|
975
1369
|
{
|
|
976
1370
|
ref,
|
|
@@ -986,7 +1380,7 @@ var CommandShortcut = ({
|
|
|
986
1380
|
className,
|
|
987
1381
|
...props
|
|
988
1382
|
}) => {
|
|
989
|
-
return /* @__PURE__ */ (0,
|
|
1383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
990
1384
|
"span",
|
|
991
1385
|
{
|
|
992
1386
|
className: cn(
|
|
@@ -1001,8 +1395,8 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
1001
1395
|
|
|
1002
1396
|
// src/context-menu.tsx
|
|
1003
1397
|
var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"), 1);
|
|
1004
|
-
var
|
|
1005
|
-
var
|
|
1398
|
+
var React12 = __toESM(require("react"), 1);
|
|
1399
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1006
1400
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
1007
1401
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
1008
1402
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
@@ -1013,7 +1407,7 @@ var SURFACE_CLASS = "z-50 min-w-[8rem] max-h-[var(--radix-context-menu-content-a
|
|
|
1013
1407
|
var MOTION_CLASS = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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";
|
|
1014
1408
|
var ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1015
1409
|
var INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1016
|
-
var ContextMenuSubTrigger =
|
|
1410
|
+
var ContextMenuSubTrigger = React12.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1017
1411
|
ContextMenuPrimitive.SubTrigger,
|
|
1018
1412
|
{
|
|
1019
1413
|
ref,
|
|
@@ -1026,12 +1420,12 @@ var ContextMenuSubTrigger = React10.forwardRef(({ className, inset, children, ..
|
|
|
1026
1420
|
...props,
|
|
1027
1421
|
children: [
|
|
1028
1422
|
children,
|
|
1029
|
-
/* @__PURE__ */ (0,
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1030
1424
|
]
|
|
1031
1425
|
}
|
|
1032
1426
|
));
|
|
1033
1427
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1034
|
-
var ContextMenuSubContent =
|
|
1428
|
+
var ContextMenuSubContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1035
1429
|
ContextMenuPrimitive.SubContent,
|
|
1036
1430
|
{
|
|
1037
1431
|
ref,
|
|
@@ -1041,9 +1435,9 @@ var ContextMenuSubContent = React10.forwardRef(({ className, ...props }, ref) =>
|
|
|
1041
1435
|
}
|
|
1042
1436
|
));
|
|
1043
1437
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1044
|
-
var ContextMenuContent =
|
|
1438
|
+
var ContextMenuContent = React12.forwardRef(({ className, container, ...props }, ref) => {
|
|
1045
1439
|
const portalContainer = usePortalContainer(container);
|
|
1046
|
-
return /* @__PURE__ */ (0,
|
|
1440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1047
1441
|
ContextMenuPrimitive.Content,
|
|
1048
1442
|
{
|
|
1049
1443
|
ref,
|
|
@@ -1054,7 +1448,7 @@ var ContextMenuContent = React10.forwardRef(({ className, container, ...props },
|
|
|
1054
1448
|
) });
|
|
1055
1449
|
});
|
|
1056
1450
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1057
|
-
var ContextMenuItem =
|
|
1451
|
+
var ContextMenuItem = React12.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1058
1452
|
ContextMenuPrimitive.Item,
|
|
1059
1453
|
{
|
|
1060
1454
|
ref,
|
|
@@ -1069,7 +1463,7 @@ var ContextMenuItem = React10.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1069
1463
|
}
|
|
1070
1464
|
));
|
|
1071
1465
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1072
|
-
var ContextMenuCheckboxItem =
|
|
1466
|
+
var ContextMenuCheckboxItem = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1073
1467
|
ContextMenuPrimitive.CheckboxItem,
|
|
1074
1468
|
{
|
|
1075
1469
|
ref,
|
|
@@ -1077,13 +1471,13 @@ var ContextMenuCheckboxItem = React10.forwardRef(({ className, children, ...prop
|
|
|
1077
1471
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1078
1472
|
...props,
|
|
1079
1473
|
children: [
|
|
1080
|
-
/* @__PURE__ */ (0,
|
|
1474
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
1081
1475
|
children
|
|
1082
1476
|
]
|
|
1083
1477
|
}
|
|
1084
1478
|
));
|
|
1085
1479
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1086
|
-
var ContextMenuRadioItem =
|
|
1480
|
+
var ContextMenuRadioItem = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1087
1481
|
ContextMenuPrimitive.RadioItem,
|
|
1088
1482
|
{
|
|
1089
1483
|
ref,
|
|
@@ -1091,13 +1485,13 @@ var ContextMenuRadioItem = React10.forwardRef(({ className, children, ...props }
|
|
|
1091
1485
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1092
1486
|
...props,
|
|
1093
1487
|
children: [
|
|
1094
|
-
/* @__PURE__ */ (0,
|
|
1488
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1095
1489
|
children
|
|
1096
1490
|
]
|
|
1097
1491
|
}
|
|
1098
1492
|
));
|
|
1099
1493
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1100
|
-
var ContextMenuLabel =
|
|
1494
|
+
var ContextMenuLabel = React12.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1101
1495
|
ContextMenuPrimitive.Label,
|
|
1102
1496
|
{
|
|
1103
1497
|
ref,
|
|
@@ -1111,7 +1505,7 @@ var ContextMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1111
1505
|
}
|
|
1112
1506
|
));
|
|
1113
1507
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1114
|
-
var ContextMenuSeparator =
|
|
1508
|
+
var ContextMenuSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1115
1509
|
ContextMenuPrimitive.Separator,
|
|
1116
1510
|
{
|
|
1117
1511
|
ref,
|
|
@@ -1124,7 +1518,7 @@ ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
|
1124
1518
|
var ContextMenuShortcut = ({
|
|
1125
1519
|
className,
|
|
1126
1520
|
...props
|
|
1127
|
-
}) => /* @__PURE__ */ (0,
|
|
1521
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1128
1522
|
"span",
|
|
1129
1523
|
{
|
|
1130
1524
|
"data-slot": "context-menu-shortcut",
|
|
@@ -1139,15 +1533,15 @@ var import_react = require("react");
|
|
|
1139
1533
|
|
|
1140
1534
|
// src/popover.tsx
|
|
1141
1535
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1142
|
-
var
|
|
1143
|
-
var
|
|
1536
|
+
var React13 = __toESM(require("react"), 1);
|
|
1537
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1144
1538
|
var Popover = PopoverPrimitive.Root;
|
|
1145
1539
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1146
1540
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1147
|
-
var PopoverContent =
|
|
1541
|
+
var PopoverContent = React13.forwardRef(
|
|
1148
1542
|
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => {
|
|
1149
1543
|
const portalContainer = usePortalContainer(container);
|
|
1150
|
-
return /* @__PURE__ */ (0,
|
|
1544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1151
1545
|
PopoverPrimitive.Content,
|
|
1152
1546
|
{
|
|
1153
1547
|
ref,
|
|
@@ -1171,7 +1565,7 @@ var PopoverContent = React11.forwardRef(
|
|
|
1171
1565
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1172
1566
|
|
|
1173
1567
|
// src/creatable-picker.tsx
|
|
1174
|
-
var
|
|
1568
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1175
1569
|
function article(noun) {
|
|
1176
1570
|
return /^[aeiou]/i.test(noun.trim()) ? `an ${noun}` : `a ${noun}`;
|
|
1177
1571
|
}
|
|
@@ -1246,8 +1640,8 @@ function CreatablePicker({
|
|
|
1246
1640
|
setBusy(false);
|
|
1247
1641
|
}
|
|
1248
1642
|
};
|
|
1249
|
-
return /* @__PURE__ */ (0,
|
|
1250
|
-
/* @__PURE__ */ (0,
|
|
1643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Popover, { open, onOpenChange: (next) => next ? setOpen(true) : close(), children: [
|
|
1644
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1251
1645
|
"button",
|
|
1252
1646
|
{
|
|
1253
1647
|
type: "button",
|
|
@@ -1261,12 +1655,12 @@ function CreatablePicker({
|
|
|
1261
1655
|
triggerClassName
|
|
1262
1656
|
),
|
|
1263
1657
|
children: [
|
|
1264
|
-
/* @__PURE__ */ (0,
|
|
1265
|
-
/* @__PURE__ */ (0,
|
|
1658
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "min-w-0 flex-1 truncate", children: selected ? renderSelected ?? selected.render ?? selected.label : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-muted-foreground", children: loading ? "Loading\u2026" : placeholder }) }),
|
|
1659
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronsUpDownIcon, { className: "size-3.5 shrink-0 opacity-50" })
|
|
1266
1660
|
]
|
|
1267
1661
|
}
|
|
1268
1662
|
) }),
|
|
1269
|
-
/* @__PURE__ */ (0,
|
|
1663
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PopoverContent, { align: "start", className: "w-[--radix-popover-trigger-width] min-w-56 p-0", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1270
1664
|
Command,
|
|
1271
1665
|
{
|
|
1272
1666
|
filter: (itemValue, search, keywords) => {
|
|
@@ -1274,7 +1668,7 @@ function CreatablePicker({
|
|
|
1274
1668
|
return haystack.includes(search.toLowerCase()) ? 1 : 0;
|
|
1275
1669
|
},
|
|
1276
1670
|
children: [
|
|
1277
|
-
/* @__PURE__ */ (0,
|
|
1671
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1278
1672
|
CommandInput,
|
|
1279
1673
|
{
|
|
1280
1674
|
ref: inputRef,
|
|
@@ -1286,13 +1680,13 @@ function CreatablePicker({
|
|
|
1286
1680
|
placeholder: searchPlaceholder ?? `Search or add ${article(noun)}\u2026`
|
|
1287
1681
|
}
|
|
1288
1682
|
),
|
|
1289
|
-
/* @__PURE__ */ (0,
|
|
1290
|
-
/* @__PURE__ */ (0,
|
|
1291
|
-
groups.map((group) => /* @__PURE__ */ (0,
|
|
1683
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CommandList, { children: [
|
|
1684
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CommandEmpty, { children: emptyLabel }),
|
|
1685
|
+
groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1292
1686
|
CommandGroup,
|
|
1293
1687
|
{
|
|
1294
1688
|
...group.heading === void 0 ? {} : { heading: group.heading },
|
|
1295
|
-
children: group.options.map((option) => /* @__PURE__ */ (0,
|
|
1689
|
+
children: group.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1296
1690
|
CommandItem,
|
|
1297
1691
|
{
|
|
1298
1692
|
value: option.label,
|
|
@@ -1303,7 +1697,7 @@ function CreatablePicker({
|
|
|
1303
1697
|
},
|
|
1304
1698
|
className: "gap-2 text-xs",
|
|
1305
1699
|
children: [
|
|
1306
|
-
/* @__PURE__ */ (0,
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1307
1701
|
LucideCheckIcon,
|
|
1308
1702
|
{
|
|
1309
1703
|
className: cn(
|
|
@@ -1312,8 +1706,8 @@ function CreatablePicker({
|
|
|
1312
1706
|
)
|
|
1313
1707
|
}
|
|
1314
1708
|
),
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
option.hint ? /* @__PURE__ */ (0,
|
|
1709
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "min-w-0 flex-1 truncate", children: option.render ?? option.label }),
|
|
1710
|
+
option.hint ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: option.hint }) : null
|
|
1317
1711
|
]
|
|
1318
1712
|
},
|
|
1319
1713
|
option.value
|
|
@@ -1322,9 +1716,9 @@ function CreatablePicker({
|
|
|
1322
1716
|
group.heading ?? "__ungrouped__"
|
|
1323
1717
|
))
|
|
1324
1718
|
] }),
|
|
1325
|
-
canCreate ? /* @__PURE__ */ (0,
|
|
1326
|
-
createExtra && typed && !exactMatch ? /* @__PURE__ */ (0,
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1719
|
+
canCreate ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-1 border-t border-border p-1", children: [
|
|
1720
|
+
createExtra && typed && !exactMatch ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "px-1 pt-0.5", children: typeof createExtra === "function" ? createExtra(typed) : createExtra }) : null,
|
|
1721
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1328
1722
|
"button",
|
|
1329
1723
|
{
|
|
1330
1724
|
type: "button",
|
|
@@ -1332,22 +1726,22 @@ function CreatablePicker({
|
|
|
1332
1726
|
onClick: () => void create(typed),
|
|
1333
1727
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",
|
|
1334
1728
|
children: [
|
|
1335
|
-
busy ? /* @__PURE__ */ (0,
|
|
1336
|
-
/* @__PURE__ */ (0,
|
|
1729
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Loader2Icon, { className: "size-3.5 shrink-0 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1730
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
|
|
1337
1731
|
]
|
|
1338
1732
|
}
|
|
1339
1733
|
),
|
|
1340
|
-
needsName ? /* @__PURE__ */ (0,
|
|
1734
|
+
needsName ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "px-2 pb-0.5 text-[11px] leading-snug text-muted-foreground", children: [
|
|
1341
1735
|
"Type the name of the ",
|
|
1342
1736
|
noun,
|
|
1343
1737
|
" you want to add \u2014 then this creates it."
|
|
1344
1738
|
] }) : null
|
|
1345
1739
|
] }) : null,
|
|
1346
|
-
footerActions?.length || manageAction ? /* @__PURE__ */ (0,
|
|
1740
|
+
footerActions?.length || manageAction ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-0.5 border-t border-border p-1", children: [
|
|
1347
1741
|
footerActions?.map((action) => {
|
|
1348
1742
|
const Icon2 = action.icon;
|
|
1349
|
-
return /* @__PURE__ */ (0,
|
|
1350
|
-
/* @__PURE__ */ (0,
|
|
1743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1351
1745
|
"button",
|
|
1352
1746
|
{
|
|
1353
1747
|
type: "button",
|
|
@@ -1357,15 +1751,15 @@ function CreatablePicker({
|
|
|
1357
1751
|
},
|
|
1358
1752
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
1359
1753
|
children: [
|
|
1360
|
-
Icon2 ? /* @__PURE__ */ (0,
|
|
1361
|
-
/* @__PURE__ */ (0,
|
|
1754
|
+
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon2, { className: "size-3.5 shrink-0" }) : null,
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "min-w-0 truncate", children: action.label })
|
|
1362
1756
|
]
|
|
1363
1757
|
}
|
|
1364
1758
|
),
|
|
1365
|
-
action.note ? /* @__PURE__ */ (0,
|
|
1759
|
+
action.note ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "px-2 pb-1 text-[10px] leading-snug text-muted-foreground", children: action.note }) : null
|
|
1366
1760
|
] }, action.label);
|
|
1367
1761
|
}),
|
|
1368
|
-
manageAction ? /* @__PURE__ */ (0,
|
|
1762
|
+
manageAction ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1369
1763
|
"a",
|
|
1370
1764
|
{
|
|
1371
1765
|
href: manageAction.href,
|
|
@@ -1374,18 +1768,18 @@ function CreatablePicker({
|
|
|
1374
1768
|
onClick: close,
|
|
1375
1769
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
1376
1770
|
children: [
|
|
1377
|
-
/* @__PURE__ */ (0,
|
|
1378
|
-
/* @__PURE__ */ (0,
|
|
1771
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ExternalLinkIcon, { className: "size-3.5 shrink-0" }),
|
|
1772
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "min-w-0 truncate", children: manageAction.label })
|
|
1379
1773
|
]
|
|
1380
1774
|
}
|
|
1381
1775
|
) : null
|
|
1382
1776
|
] }) : null,
|
|
1383
|
-
lockedNote ? /* @__PURE__ */ (0,
|
|
1384
|
-
/* @__PURE__ */ (0,
|
|
1385
|
-
/* @__PURE__ */ (0,
|
|
1386
|
-
/* @__PURE__ */ (0,
|
|
1777
|
+
lockedNote ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-1 border-t border-border p-2", children: [
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "flex gap-1.5 text-[11px] leading-snug text-muted-foreground", children: [
|
|
1779
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LockIcon, { className: "mt-px size-3 shrink-0" }),
|
|
1780
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: lockedNote })
|
|
1387
1781
|
] }),
|
|
1388
|
-
lockedAction ? /* @__PURE__ */ (0,
|
|
1782
|
+
lockedAction ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1389
1783
|
"button",
|
|
1390
1784
|
{
|
|
1391
1785
|
type: "button",
|
|
@@ -1395,8 +1789,8 @@ function CreatablePicker({
|
|
|
1395
1789
|
},
|
|
1396
1790
|
className: "flex w-full items-center gap-2 rounded-sm px-1 py-1 text-left text-xs font-medium text-primary transition-colors hover:bg-accent",
|
|
1397
1791
|
children: [
|
|
1398
|
-
/* @__PURE__ */ (0,
|
|
1399
|
-
/* @__PURE__ */ (0,
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1793
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "min-w-0 truncate", children: lockedAction.label })
|
|
1400
1794
|
]
|
|
1401
1795
|
}
|
|
1402
1796
|
) : null
|
|
@@ -1410,15 +1804,15 @@ function CreatablePicker({
|
|
|
1410
1804
|
// src/dialog.tsx
|
|
1411
1805
|
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1412
1806
|
var VisuallyHidden2 = __toESM(require("@radix-ui/react-visually-hidden"), 1);
|
|
1413
|
-
var
|
|
1414
|
-
var
|
|
1415
|
-
var
|
|
1807
|
+
var import_react_tree3 = require("@ai-matrx/kit/react-tree");
|
|
1808
|
+
var React14 = __toESM(require("react"), 1);
|
|
1809
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1416
1810
|
var Dialog = ({
|
|
1417
1811
|
children,
|
|
1418
1812
|
...props
|
|
1419
1813
|
}) => {
|
|
1420
1814
|
const modal = props.modal ?? true;
|
|
1421
|
-
return /* @__PURE__ */ (0,
|
|
1815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogPrimitive2.Root, { ...props, modal, children }) });
|
|
1422
1816
|
};
|
|
1423
1817
|
Dialog.displayName = "Dialog";
|
|
1424
1818
|
var DialogTrigger = DialogPrimitive2.Trigger;
|
|
@@ -1428,12 +1822,12 @@ var DialogPortal = ({
|
|
|
1428
1822
|
...props
|
|
1429
1823
|
}) => {
|
|
1430
1824
|
const resolved = usePortalContainer(container);
|
|
1431
|
-
return /* @__PURE__ */ (0,
|
|
1825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
|
|
1432
1826
|
};
|
|
1433
1827
|
DialogPortal.displayName = "DialogPortal";
|
|
1434
|
-
var DialogContainerContext =
|
|
1435
|
-
var useDialogContainer = () =>
|
|
1436
|
-
var DialogOverlay =
|
|
1828
|
+
var DialogContainerContext = React14.createContext(null);
|
|
1829
|
+
var useDialogContainer = () => React14.useContext(DialogContainerContext);
|
|
1830
|
+
var DialogOverlay = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1437
1831
|
DialogPrimitive2.Overlay,
|
|
1438
1832
|
{
|
|
1439
1833
|
ref,
|
|
@@ -1448,9 +1842,9 @@ var DialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1448
1842
|
}
|
|
1449
1843
|
));
|
|
1450
1844
|
DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
|
|
1451
|
-
var DialogContentPrimitive =
|
|
1845
|
+
var DialogContentPrimitive = React14.forwardRef((props, ref) => {
|
|
1452
1846
|
const isModal = useRadixDialogModal();
|
|
1453
|
-
return /* @__PURE__ */ (0,
|
|
1847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1454
1848
|
DialogPrimitive2.Content,
|
|
1455
1849
|
{
|
|
1456
1850
|
...props,
|
|
@@ -1463,7 +1857,7 @@ DialogContentPrimitive.displayName = "DialogContentPrimitive";
|
|
|
1463
1857
|
var DIALOG_DESKTOP_CLASSES2 = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg";
|
|
1464
1858
|
var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full duration-200 rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom";
|
|
1465
1859
|
var DIALOG_MOBILE_SHEET_OVERRIDE2 = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
|
|
1466
|
-
var DialogContent =
|
|
1860
|
+
var DialogContent = React14.forwardRef(
|
|
1467
1861
|
({
|
|
1468
1862
|
className,
|
|
1469
1863
|
children,
|
|
@@ -1476,10 +1870,10 @@ var DialogContent = React12.forwardRef(
|
|
|
1476
1870
|
const isModal = useRadixDialogModal();
|
|
1477
1871
|
const injectedContainer = usePortalContainer(container);
|
|
1478
1872
|
const asSheet = mobileSheet && isMobile;
|
|
1479
|
-
const [containerEl, setContainerEl] =
|
|
1873
|
+
const [containerEl, setContainerEl] = React14.useState(
|
|
1480
1874
|
null
|
|
1481
1875
|
);
|
|
1482
|
-
const mergedRef =
|
|
1876
|
+
const mergedRef = React14.useCallback(
|
|
1483
1877
|
(node) => {
|
|
1484
1878
|
setContainerEl(node);
|
|
1485
1879
|
if (typeof ref === "function") ref(node);
|
|
@@ -1488,11 +1882,11 @@ var DialogContent = React12.forwardRef(
|
|
|
1488
1882
|
},
|
|
1489
1883
|
[ref]
|
|
1490
1884
|
);
|
|
1491
|
-
const hasTitle = (0,
|
|
1492
|
-
const hasDescription = (0,
|
|
1493
|
-
return /* @__PURE__ */ (0,
|
|
1494
|
-
isModal ? /* @__PURE__ */ (0,
|
|
1495
|
-
/* @__PURE__ */ (0,
|
|
1885
|
+
const hasTitle = (0, import_react_tree3.treeContainsComponent)(children, DialogTitle) || (0, import_react_tree3.treeContainsComponent)(children, DialogPrimitive2.Title);
|
|
1886
|
+
const hasDescription = (0, import_react_tree3.treeContainsComponent)(children, DialogDescription) || (0, import_react_tree3.treeContainsComponent)(children, DialogPrimitive2.Description);
|
|
1887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DialogPortal, { container, children: [
|
|
1888
|
+
isModal ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogOverlay, {}) : null,
|
|
1889
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1496
1890
|
DialogContentPrimitive,
|
|
1497
1891
|
{
|
|
1498
1892
|
ref: mergedRef,
|
|
@@ -1510,23 +1904,23 @@ var DialogContent = React12.forwardRef(
|
|
|
1510
1904
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
1511
1905
|
...props,
|
|
1512
1906
|
children: [
|
|
1513
|
-
hasTitle ? null : /* @__PURE__ */ (0,
|
|
1514
|
-
/* @__PURE__ */ (0,
|
|
1907
|
+
hasTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(VisuallyHidden2.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogPrimitive2.Title, { children: "Dialog" }) }),
|
|
1908
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogContainerContext.Provider, { value: containerEl, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1515
1909
|
PortalContainerProvider,
|
|
1516
1910
|
{
|
|
1517
1911
|
container: containerEl ?? injectedContainer ?? null,
|
|
1518
1912
|
children
|
|
1519
1913
|
}
|
|
1520
1914
|
) }),
|
|
1521
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
1915
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1522
1916
|
DialogPrimitive2.Close,
|
|
1523
1917
|
{
|
|
1524
1918
|
"data-slot": "dialog-close",
|
|
1525
1919
|
"aria-label": "Close",
|
|
1526
1920
|
className: "absolute right-2 top-4 flex h-11 w-11 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4 lg:h-10 lg:w-10",
|
|
1527
1921
|
children: [
|
|
1528
|
-
/* @__PURE__ */ (0,
|
|
1529
|
-
/* @__PURE__ */ (0,
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(XIcon, { className: "h-4 w-4" }),
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1530
1924
|
]
|
|
1531
1925
|
}
|
|
1532
1926
|
) : null
|
|
@@ -1540,7 +1934,7 @@ DialogContent.displayName = DialogPrimitive2.Content.displayName;
|
|
|
1540
1934
|
var DialogHeader = ({
|
|
1541
1935
|
className,
|
|
1542
1936
|
...props
|
|
1543
|
-
}) => /* @__PURE__ */ (0,
|
|
1937
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1544
1938
|
"div",
|
|
1545
1939
|
{
|
|
1546
1940
|
"data-slot": "dialog-header",
|
|
@@ -1557,7 +1951,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
1557
1951
|
var DialogFooter = ({
|
|
1558
1952
|
className,
|
|
1559
1953
|
...props
|
|
1560
|
-
}) => /* @__PURE__ */ (0,
|
|
1954
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1561
1955
|
"div",
|
|
1562
1956
|
{
|
|
1563
1957
|
"data-slot": "dialog-footer",
|
|
@@ -1571,7 +1965,7 @@ var DialogFooter = ({
|
|
|
1571
1965
|
}
|
|
1572
1966
|
);
|
|
1573
1967
|
DialogFooter.displayName = "DialogFooter";
|
|
1574
|
-
var DialogTitle =
|
|
1968
|
+
var DialogTitle = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1575
1969
|
DialogPrimitive2.Title,
|
|
1576
1970
|
{
|
|
1577
1971
|
ref,
|
|
@@ -1581,7 +1975,7 @@ var DialogTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1581
1975
|
}
|
|
1582
1976
|
));
|
|
1583
1977
|
DialogTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
1584
|
-
var DialogDescription =
|
|
1978
|
+
var DialogDescription = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1585
1979
|
DialogPrimitive2.Description,
|
|
1586
1980
|
{
|
|
1587
1981
|
ref,
|
|
@@ -1594,8 +1988,8 @@ DialogDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
|
1594
1988
|
|
|
1595
1989
|
// src/dropdown-menu.tsx
|
|
1596
1990
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1597
|
-
var
|
|
1598
|
-
var
|
|
1991
|
+
var React15 = __toESM(require("react"), 1);
|
|
1992
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1599
1993
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1600
1994
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1601
1995
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
@@ -1606,7 +2000,7 @@ var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-men
|
|
|
1606
2000
|
var MENU_MOTION_CLASS = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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";
|
|
1607
2001
|
var MENU_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1608
2002
|
var MENU_INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1609
|
-
var DropdownMenuSubTrigger =
|
|
2003
|
+
var DropdownMenuSubTrigger = React15.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1610
2004
|
DropdownMenuPrimitive.SubTrigger,
|
|
1611
2005
|
{
|
|
1612
2006
|
ref,
|
|
@@ -1619,12 +2013,12 @@ var DropdownMenuSubTrigger = React13.forwardRef(({ className, inset, children, .
|
|
|
1619
2013
|
...props,
|
|
1620
2014
|
children: [
|
|
1621
2015
|
children,
|
|
1622
|
-
/* @__PURE__ */ (0,
|
|
2016
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1623
2017
|
]
|
|
1624
2018
|
}
|
|
1625
2019
|
));
|
|
1626
2020
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1627
|
-
var DropdownMenuSubContent =
|
|
2021
|
+
var DropdownMenuSubContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1628
2022
|
DropdownMenuPrimitive.SubContent,
|
|
1629
2023
|
{
|
|
1630
2024
|
ref,
|
|
@@ -1634,9 +2028,9 @@ var DropdownMenuSubContent = React13.forwardRef(({ className, ...props }, ref) =
|
|
|
1634
2028
|
}
|
|
1635
2029
|
));
|
|
1636
2030
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1637
|
-
var DropdownMenuContent =
|
|
2031
|
+
var DropdownMenuContent = React15.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
1638
2032
|
const portalContainer = usePortalContainer(container);
|
|
1639
|
-
return /* @__PURE__ */ (0,
|
|
2033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1640
2034
|
DropdownMenuPrimitive.Content,
|
|
1641
2035
|
{
|
|
1642
2036
|
ref,
|
|
@@ -1653,7 +2047,7 @@ var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, conta
|
|
|
1653
2047
|
) });
|
|
1654
2048
|
});
|
|
1655
2049
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1656
|
-
var DropdownMenuItem =
|
|
2050
|
+
var DropdownMenuItem = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1657
2051
|
DropdownMenuPrimitive.Item,
|
|
1658
2052
|
{
|
|
1659
2053
|
ref,
|
|
@@ -1663,7 +2057,7 @@ var DropdownMenuItem = React13.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1663
2057
|
}
|
|
1664
2058
|
));
|
|
1665
2059
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1666
|
-
var DropdownMenuCheckboxItem =
|
|
2060
|
+
var DropdownMenuCheckboxItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1667
2061
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1668
2062
|
{
|
|
1669
2063
|
ref,
|
|
@@ -1671,13 +2065,13 @@ var DropdownMenuCheckboxItem = React13.forwardRef(({ className, children, ...pro
|
|
|
1671
2065
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
1672
2066
|
...props,
|
|
1673
2067
|
children: [
|
|
1674
|
-
/* @__PURE__ */ (0,
|
|
2068
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
1675
2069
|
children
|
|
1676
2070
|
]
|
|
1677
2071
|
}
|
|
1678
2072
|
));
|
|
1679
2073
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1680
|
-
var DropdownMenuRadioItem =
|
|
2074
|
+
var DropdownMenuRadioItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1681
2075
|
DropdownMenuPrimitive.RadioItem,
|
|
1682
2076
|
{
|
|
1683
2077
|
ref,
|
|
@@ -1685,13 +2079,13 @@ var DropdownMenuRadioItem = React13.forwardRef(({ className, children, ...props
|
|
|
1685
2079
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
1686
2080
|
...props,
|
|
1687
2081
|
children: [
|
|
1688
|
-
/* @__PURE__ */ (0,
|
|
2082
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1689
2083
|
children
|
|
1690
2084
|
]
|
|
1691
2085
|
}
|
|
1692
2086
|
));
|
|
1693
2087
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1694
|
-
var DropdownMenuLabel =
|
|
2088
|
+
var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1695
2089
|
DropdownMenuPrimitive.Label,
|
|
1696
2090
|
{
|
|
1697
2091
|
ref,
|
|
@@ -1701,7 +2095,7 @@ var DropdownMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1701
2095
|
}
|
|
1702
2096
|
));
|
|
1703
2097
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1704
|
-
var DropdownMenuSeparator =
|
|
2098
|
+
var DropdownMenuSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1705
2099
|
DropdownMenuPrimitive.Separator,
|
|
1706
2100
|
{
|
|
1707
2101
|
ref,
|
|
@@ -1714,7 +2108,7 @@ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
|
1714
2108
|
var DropdownMenuShortcut = ({
|
|
1715
2109
|
className,
|
|
1716
2110
|
...props
|
|
1717
|
-
}) => /* @__PURE__ */ (0,
|
|
2111
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1718
2112
|
"span",
|
|
1719
2113
|
{
|
|
1720
2114
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -1726,7 +2120,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
1726
2120
|
|
|
1727
2121
|
// src/editable-label.tsx
|
|
1728
2122
|
var import_react2 = require("react");
|
|
1729
|
-
var
|
|
2123
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1730
2124
|
function EditableLabel({
|
|
1731
2125
|
value,
|
|
1732
2126
|
onCommit,
|
|
@@ -1833,8 +2227,8 @@ function EditableLabel({
|
|
|
1833
2227
|
setEditing
|
|
1834
2228
|
]);
|
|
1835
2229
|
if (editing) {
|
|
1836
|
-
return /* @__PURE__ */ (0,
|
|
1837
|
-
/* @__PURE__ */ (0,
|
|
2230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: cn("relative flex min-w-0 flex-1 items-center", className), children: [
|
|
2231
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1838
2232
|
"input",
|
|
1839
2233
|
{
|
|
1840
2234
|
ref: inputRef,
|
|
@@ -1874,12 +2268,12 @@ function EditableLabel({
|
|
|
1874
2268
|
)
|
|
1875
2269
|
}
|
|
1876
2270
|
),
|
|
1877
|
-
busy && /* @__PURE__ */ (0,
|
|
1878
|
-
error && /* @__PURE__ */ (0,
|
|
2271
|
+
busy && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 animate-spin text-muted-foreground" }),
|
|
2272
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
|
|
1879
2273
|
] });
|
|
1880
2274
|
}
|
|
1881
2275
|
if (controlled) return null;
|
|
1882
|
-
return /* @__PURE__ */ (0,
|
|
2276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1883
2277
|
"button",
|
|
1884
2278
|
{
|
|
1885
2279
|
type: "button",
|
|
@@ -1913,8 +2307,8 @@ function EditableLabel({
|
|
|
1913
2307
|
}
|
|
1914
2308
|
|
|
1915
2309
|
// src/input.tsx
|
|
1916
|
-
var
|
|
1917
|
-
var
|
|
2310
|
+
var React16 = __toESM(require("react"), 1);
|
|
2311
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1918
2312
|
var getVariantStyles = (variant = "default") => {
|
|
1919
2313
|
const baseStyles = `flex h-10 w-full border border-border bg-background text-foreground shadow-input rounded-md px-3 py-2 text-sm file:border-0 file:bg-transparent
|
|
1920
2314
|
file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground
|
|
@@ -1942,9 +2336,9 @@ var getVariantStyles = (variant = "default") => {
|
|
|
1942
2336
|
return baseStyles;
|
|
1943
2337
|
}
|
|
1944
2338
|
};
|
|
1945
|
-
var Input =
|
|
2339
|
+
var Input = React16.forwardRef(
|
|
1946
2340
|
({ className, type, variant = "default", ...props }, ref) => {
|
|
1947
|
-
return /* @__PURE__ */ (0,
|
|
2341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1948
2342
|
"input",
|
|
1949
2343
|
{
|
|
1950
2344
|
type,
|
|
@@ -1956,7 +2350,7 @@ var Input = React14.forwardRef(
|
|
|
1956
2350
|
}
|
|
1957
2351
|
);
|
|
1958
2352
|
Input.displayName = "Input";
|
|
1959
|
-
var EnterInput =
|
|
2353
|
+
var EnterInput = React16.forwardRef(
|
|
1960
2354
|
({ onEnter, ...props }, ref) => {
|
|
1961
2355
|
const handleKeyDown = (e) => {
|
|
1962
2356
|
if (e.key === "Enter" && onEnter) {
|
|
@@ -1964,7 +2358,7 @@ var EnterInput = React14.forwardRef(
|
|
|
1964
2358
|
onEnter();
|
|
1965
2359
|
}
|
|
1966
2360
|
};
|
|
1967
|
-
return /* @__PURE__ */ (0,
|
|
2361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1968
2362
|
Input,
|
|
1969
2363
|
{
|
|
1970
2364
|
...props,
|
|
@@ -1980,11 +2374,11 @@ var EnterInput = React14.forwardRef(
|
|
|
1980
2374
|
}
|
|
1981
2375
|
);
|
|
1982
2376
|
EnterInput.displayName = "EnterInput";
|
|
1983
|
-
var BasicInput =
|
|
2377
|
+
var BasicInput = React16.forwardRef(
|
|
1984
2378
|
// `variant` is accepted (prop-compatible with Input) but intentionally
|
|
1985
2379
|
// unused — and destructured so it never leaks onto the DOM element.
|
|
1986
2380
|
({ className, type, variant: _variant = "default", ...props }, ref) => {
|
|
1987
|
-
return /* @__PURE__ */ (0,
|
|
2381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1988
2382
|
"input",
|
|
1989
2383
|
{
|
|
1990
2384
|
type,
|
|
@@ -1999,10 +2393,10 @@ var BasicInput = React14.forwardRef(
|
|
|
1999
2393
|
}
|
|
2000
2394
|
);
|
|
2001
2395
|
BasicInput.displayName = "BasicInput";
|
|
2002
|
-
var InputWithPrefix =
|
|
2003
|
-
return /* @__PURE__ */ (0,
|
|
2004
|
-
prefix && /* @__PURE__ */ (0,
|
|
2005
|
-
/* @__PURE__ */ (0,
|
|
2396
|
+
var InputWithPrefix = React16.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
|
|
2397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
|
|
2398
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: prefix }),
|
|
2399
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2006
2400
|
Input,
|
|
2007
2401
|
{
|
|
2008
2402
|
ref,
|
|
@@ -2016,9 +2410,9 @@ InputWithPrefix.displayName = "InputWithPrefix";
|
|
|
2016
2410
|
|
|
2017
2411
|
// src/label.tsx
|
|
2018
2412
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
2019
|
-
var
|
|
2020
|
-
var
|
|
2021
|
-
var Label3 =
|
|
2413
|
+
var React17 = __toESM(require("react"), 1);
|
|
2414
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2415
|
+
var Label3 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2022
2416
|
LabelPrimitive.Root,
|
|
2023
2417
|
{
|
|
2024
2418
|
ref,
|
|
@@ -2033,7 +2427,7 @@ Label3.displayName = LabelPrimitive.Root.displayName;
|
|
|
2033
2427
|
|
|
2034
2428
|
// src/overflow-toolbar.tsx
|
|
2035
2429
|
var import_react3 = require("react");
|
|
2036
|
-
var
|
|
2430
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2037
2431
|
var GAP_PX = 6;
|
|
2038
2432
|
var TONE = {
|
|
2039
2433
|
default: "border border-border bg-background hover:bg-accent text-foreground",
|
|
@@ -2055,16 +2449,16 @@ function ToolbarButton({
|
|
|
2055
2449
|
action.hideLabel && !action.running ? "w-7 justify-center px-0" : "px-2",
|
|
2056
2450
|
TONE[tone]
|
|
2057
2451
|
);
|
|
2058
|
-
const inner = /* @__PURE__ */ (0,
|
|
2059
|
-
/* @__PURE__ */ (0,
|
|
2452
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
2453
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2060
2454
|
Icon2,
|
|
2061
2455
|
{
|
|
2062
2456
|
className: cn("w-3.5 h-3.5 shrink-0", action.running && "animate-spin")
|
|
2063
2457
|
}
|
|
2064
2458
|
),
|
|
2065
|
-
showLabel && /* @__PURE__ */ (0,
|
|
2459
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: text })
|
|
2066
2460
|
] });
|
|
2067
|
-
const control = action.href && !action.disabled ? /* @__PURE__ */ (0,
|
|
2461
|
+
const control = action.href && !action.disabled ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2068
2462
|
"a",
|
|
2069
2463
|
{
|
|
2070
2464
|
href: action.href,
|
|
@@ -2074,7 +2468,7 @@ function ToolbarButton({
|
|
|
2074
2468
|
"aria-label": action.label,
|
|
2075
2469
|
children: inner
|
|
2076
2470
|
}
|
|
2077
|
-
) : /* @__PURE__ */ (0,
|
|
2471
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2078
2472
|
"button",
|
|
2079
2473
|
{
|
|
2080
2474
|
type: "button",
|
|
@@ -2086,12 +2480,12 @@ function ToolbarButton({
|
|
|
2086
2480
|
}
|
|
2087
2481
|
);
|
|
2088
2482
|
if (enableTooltip && action.hideLabel && renderTooltip) {
|
|
2089
|
-
return /* @__PURE__ */ (0,
|
|
2483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: renderTooltip(control, action.label) });
|
|
2090
2484
|
}
|
|
2091
2485
|
return control;
|
|
2092
2486
|
}
|
|
2093
2487
|
function OverflowTrigger({ ariaLabel }) {
|
|
2094
|
-
return /* @__PURE__ */ (0,
|
|
2488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2095
2489
|
"button",
|
|
2096
2490
|
{
|
|
2097
2491
|
type: "button",
|
|
@@ -2102,7 +2496,7 @@ function OverflowTrigger({ ariaLabel }) {
|
|
|
2102
2496
|
"inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors",
|
|
2103
2497
|
"border border-border bg-background hover:bg-accent text-foreground"
|
|
2104
2498
|
),
|
|
2105
|
-
children: /* @__PURE__ */ (0,
|
|
2499
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MoreHorizontalIcon, { className: "w-3.5 h-3.5" })
|
|
2106
2500
|
}
|
|
2107
2501
|
);
|
|
2108
2502
|
}
|
|
@@ -2162,22 +2556,22 @@ function OverflowToolbar({
|
|
|
2162
2556
|
}, [signature, leading != null]);
|
|
2163
2557
|
const shown = visibleActions.slice(0, visibleCount);
|
|
2164
2558
|
const hidden = visibleActions.slice(visibleCount);
|
|
2165
|
-
return /* @__PURE__ */ (0,
|
|
2166
|
-
/* @__PURE__ */ (0,
|
|
2559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { ref: containerRef, className: cn("relative min-w-0", className), children: [
|
|
2560
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2167
2561
|
"div",
|
|
2168
2562
|
{
|
|
2169
2563
|
ref: ghostRef,
|
|
2170
2564
|
"aria-hidden": true,
|
|
2171
2565
|
className: "pointer-events-none absolute left-0 top-0 flex items-center gap-1.5 opacity-0",
|
|
2172
2566
|
children: [
|
|
2173
|
-
visibleActions.map((a) => /* @__PURE__ */ (0,
|
|
2174
|
-
/* @__PURE__ */ (0,
|
|
2567
|
+
visibleActions.map((a) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ToolbarButton, { action: a }, a.id)),
|
|
2568
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
|
|
2175
2569
|
]
|
|
2176
2570
|
}
|
|
2177
2571
|
),
|
|
2178
|
-
/* @__PURE__ */ (0,
|
|
2179
|
-
leading != null && /* @__PURE__ */ (0,
|
|
2180
|
-
shown.map((a) => /* @__PURE__ */ (0,
|
|
2572
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center justify-end gap-1.5", children: [
|
|
2573
|
+
leading != null && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { ref: leadingRef, className: "shrink-0", children: leading }),
|
|
2574
|
+
shown.map((a) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2181
2575
|
ToolbarButton,
|
|
2182
2576
|
{
|
|
2183
2577
|
action: a,
|
|
@@ -2188,7 +2582,7 @@ function OverflowToolbar({
|
|
|
2188
2582
|
)),
|
|
2189
2583
|
hidden.length > 0 && renderOverflowMenu({
|
|
2190
2584
|
actions: hidden,
|
|
2191
|
-
trigger: /* @__PURE__ */ (0,
|
|
2585
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
|
|
2192
2586
|
})
|
|
2193
2587
|
] })
|
|
2194
2588
|
] });
|
|
@@ -2196,20 +2590,20 @@ function OverflowToolbar({
|
|
|
2196
2590
|
|
|
2197
2591
|
// src/progress.tsx
|
|
2198
2592
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
2199
|
-
var
|
|
2200
|
-
var
|
|
2593
|
+
var React19 = __toESM(require("react"), 1);
|
|
2594
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2201
2595
|
var PROGRESS_TONES = {
|
|
2202
2596
|
default: "bg-primary",
|
|
2203
2597
|
success: "bg-success",
|
|
2204
2598
|
warning: "bg-warning",
|
|
2205
2599
|
destructive: "bg-destructive"
|
|
2206
2600
|
};
|
|
2207
|
-
var Progress =
|
|
2601
|
+
var Progress = React19.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
|
|
2208
2602
|
const { value, max } = props;
|
|
2209
2603
|
const ceiling = max ?? 100;
|
|
2210
2604
|
const isIndeterminate = value === null || value === void 0;
|
|
2211
2605
|
const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / ceiling * 100));
|
|
2212
|
-
return /* @__PURE__ */ (0,
|
|
2606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2213
2607
|
ProgressPrimitive.Root,
|
|
2214
2608
|
{
|
|
2215
2609
|
ref,
|
|
@@ -2219,7 +2613,7 @@ var Progress = React17.forwardRef(({ className, tone = "default", indicatorClass
|
|
|
2219
2613
|
className
|
|
2220
2614
|
),
|
|
2221
2615
|
...props,
|
|
2222
|
-
children: /* @__PURE__ */ (0,
|
|
2616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2223
2617
|
ProgressPrimitive.Indicator,
|
|
2224
2618
|
{
|
|
2225
2619
|
"data-slot": "progress-indicator",
|
|
@@ -2239,9 +2633,9 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
|
2239
2633
|
|
|
2240
2634
|
// src/scroll-area.tsx
|
|
2241
2635
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
2242
|
-
var
|
|
2243
|
-
var
|
|
2244
|
-
var ScrollArea =
|
|
2636
|
+
var React20 = __toESM(require("react"), 1);
|
|
2637
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2638
|
+
var ScrollArea = React20.forwardRef(
|
|
2245
2639
|
({
|
|
2246
2640
|
className,
|
|
2247
2641
|
children,
|
|
@@ -2250,7 +2644,7 @@ var ScrollArea = React18.forwardRef(
|
|
|
2250
2644
|
scrollBarClassName,
|
|
2251
2645
|
orientation = "vertical",
|
|
2252
2646
|
...props
|
|
2253
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
2647
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2254
2648
|
ScrollAreaPrimitive.Root,
|
|
2255
2649
|
{
|
|
2256
2650
|
ref,
|
|
@@ -2258,7 +2652,7 @@ var ScrollArea = React18.forwardRef(
|
|
|
2258
2652
|
className: cn("relative overflow-hidden", className),
|
|
2259
2653
|
...props,
|
|
2260
2654
|
children: [
|
|
2261
|
-
/* @__PURE__ */ (0,
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2262
2656
|
ScrollAreaPrimitive.Viewport,
|
|
2263
2657
|
{
|
|
2264
2658
|
ref: viewportRef,
|
|
@@ -2267,14 +2661,14 @@ var ScrollArea = React18.forwardRef(
|
|
|
2267
2661
|
children
|
|
2268
2662
|
}
|
|
2269
2663
|
),
|
|
2270
|
-
/* @__PURE__ */ (0,
|
|
2271
|
-
/* @__PURE__ */ (0,
|
|
2664
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ScrollBar, { orientation, className: scrollBarClassName }),
|
|
2665
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
2272
2666
|
]
|
|
2273
2667
|
}
|
|
2274
2668
|
)
|
|
2275
2669
|
);
|
|
2276
2670
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2277
|
-
var ScrollBar =
|
|
2671
|
+
var ScrollBar = React20.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2278
2672
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2279
2673
|
{
|
|
2280
2674
|
ref,
|
|
@@ -2287,7 +2681,7 @@ var ScrollBar = React18.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2287
2681
|
className
|
|
2288
2682
|
),
|
|
2289
2683
|
...props,
|
|
2290
|
-
children: /* @__PURE__ */ (0,
|
|
2684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2291
2685
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2292
2686
|
{
|
|
2293
2687
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2299,7 +2693,7 @@ var ScrollBar = React18.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2299
2693
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2300
2694
|
|
|
2301
2695
|
// src/score-ring.tsx
|
|
2302
|
-
var
|
|
2696
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2303
2697
|
var DEFAULT_SCORE_THRESHOLDS = {
|
|
2304
2698
|
good: 75,
|
|
2305
2699
|
warning: 50
|
|
@@ -2330,7 +2724,7 @@ function ScoreRing({
|
|
|
2330
2724
|
const circumference = 2 * Math.PI * radius;
|
|
2331
2725
|
const boundedPct = pct === null ? 0 : Math.max(0, Math.min(100, pct));
|
|
2332
2726
|
const dashOffset = circumference * (1 - boundedPct / 100);
|
|
2333
|
-
return /* @__PURE__ */ (0,
|
|
2727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2334
2728
|
"div",
|
|
2335
2729
|
{
|
|
2336
2730
|
className: cn(
|
|
@@ -2341,8 +2735,8 @@ function ScoreRing({
|
|
|
2341
2735
|
role: "img",
|
|
2342
2736
|
"aria-label": `${label ?? "Score"}: ${pct === null ? "not available" : `${pct} out of 100`}`,
|
|
2343
2737
|
children: [
|
|
2344
|
-
/* @__PURE__ */ (0,
|
|
2345
|
-
/* @__PURE__ */ (0,
|
|
2738
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
|
|
2739
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2346
2740
|
"circle",
|
|
2347
2741
|
{
|
|
2348
2742
|
cx: "50",
|
|
@@ -2353,7 +2747,7 @@ function ScoreRing({
|
|
|
2353
2747
|
fill: "none"
|
|
2354
2748
|
}
|
|
2355
2749
|
),
|
|
2356
|
-
pct !== null ? /* @__PURE__ */ (0,
|
|
2750
|
+
pct !== null ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2357
2751
|
"circle",
|
|
2358
2752
|
{
|
|
2359
2753
|
cx: "50",
|
|
@@ -2372,8 +2766,8 @@ function ScoreRing({
|
|
|
2372
2766
|
}
|
|
2373
2767
|
) : null
|
|
2374
2768
|
] }),
|
|
2375
|
-
/* @__PURE__ */ (0,
|
|
2376
|
-
/* @__PURE__ */ (0,
|
|
2769
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "absolute flex flex-col items-center justify-center", children: [
|
|
2770
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2377
2771
|
"span",
|
|
2378
2772
|
{
|
|
2379
2773
|
className: cn(
|
|
@@ -2383,7 +2777,7 @@ function ScoreRing({
|
|
|
2383
2777
|
children: pct === null ? "\u2014" : `${pct}${suffix}`
|
|
2384
2778
|
}
|
|
2385
2779
|
),
|
|
2386
|
-
label ? /* @__PURE__ */ (0,
|
|
2780
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "max-w-[74px] truncate text-[9px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }) : null
|
|
2387
2781
|
] })
|
|
2388
2782
|
]
|
|
2389
2783
|
}
|
|
@@ -2391,7 +2785,7 @@ function ScoreRing({
|
|
|
2391
2785
|
}
|
|
2392
2786
|
|
|
2393
2787
|
// src/segmented-control.tsx
|
|
2394
|
-
var
|
|
2788
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2395
2789
|
function SegmentedControl({
|
|
2396
2790
|
value,
|
|
2397
2791
|
onValueChange,
|
|
@@ -2406,7 +2800,7 @@ function SegmentedControl({
|
|
|
2406
2800
|
md: "h-9 text-sm",
|
|
2407
2801
|
lg: "h-10 text-base"
|
|
2408
2802
|
};
|
|
2409
|
-
return /* @__PURE__ */ (0,
|
|
2803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2410
2804
|
"div",
|
|
2411
2805
|
{
|
|
2412
2806
|
className: cn(
|
|
@@ -2417,7 +2811,7 @@ function SegmentedControl({
|
|
|
2417
2811
|
role: "tablist",
|
|
2418
2812
|
children: data.map((option) => {
|
|
2419
2813
|
const isActive = value === option.value;
|
|
2420
|
-
return /* @__PURE__ */ (0,
|
|
2814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2421
2815
|
"button",
|
|
2422
2816
|
{
|
|
2423
2817
|
type: "button",
|
|
@@ -2443,13 +2837,13 @@ function SegmentedControl({
|
|
|
2443
2837
|
|
|
2444
2838
|
// src/select.tsx
|
|
2445
2839
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
2446
|
-
var
|
|
2447
|
-
var
|
|
2448
|
-
var
|
|
2840
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
2841
|
+
var React21 = __toESM(require("react"), 1);
|
|
2842
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2449
2843
|
var Select = SelectPrimitive.Root;
|
|
2450
2844
|
var SelectGroup = SelectPrimitive.Group;
|
|
2451
2845
|
var SelectValue = SelectPrimitive.Value;
|
|
2452
|
-
var selectTriggerVariants = (0,
|
|
2846
|
+
var selectTriggerVariants = (0, import_class_variance_authority4.cva)(
|
|
2453
2847
|
"flex w-full items-center justify-between whitespace-nowrap rounded-md border border-border bg-card text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground transition-colors hover:bg-accent hover:border-accent-foreground/20 focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
2454
2848
|
{
|
|
2455
2849
|
variants: {
|
|
@@ -2464,7 +2858,7 @@ var selectTriggerVariants = (0, import_class_variance_authority3.cva)(
|
|
|
2464
2858
|
}
|
|
2465
2859
|
}
|
|
2466
2860
|
);
|
|
2467
|
-
var SelectTrigger =
|
|
2861
|
+
var SelectTrigger = React21.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2468
2862
|
SelectPrimitive.Trigger,
|
|
2469
2863
|
{
|
|
2470
2864
|
ref,
|
|
@@ -2472,12 +2866,12 @@ var SelectTrigger = React19.forwardRef(({ className, children, hideArrow = false
|
|
|
2472
2866
|
...props,
|
|
2473
2867
|
children: [
|
|
2474
2868
|
children,
|
|
2475
|
-
!hideArrow && /* @__PURE__ */ (0,
|
|
2869
|
+
!hideArrow && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })
|
|
2476
2870
|
]
|
|
2477
2871
|
}
|
|
2478
2872
|
));
|
|
2479
2873
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2480
|
-
var SelectScrollUpButton =
|
|
2874
|
+
var SelectScrollUpButton = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2481
2875
|
SelectPrimitive.ScrollUpButton,
|
|
2482
2876
|
{
|
|
2483
2877
|
ref,
|
|
@@ -2486,11 +2880,11 @@ var SelectScrollUpButton = React19.forwardRef(({ className, ...props }, ref) =>
|
|
|
2486
2880
|
className
|
|
2487
2881
|
),
|
|
2488
2882
|
...props,
|
|
2489
|
-
children: /* @__PURE__ */ (0,
|
|
2883
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixChevronUpIcon, {})
|
|
2490
2884
|
}
|
|
2491
2885
|
));
|
|
2492
2886
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2493
|
-
var SelectScrollDownButton =
|
|
2887
|
+
var SelectScrollDownButton = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2494
2888
|
SelectPrimitive.ScrollDownButton,
|
|
2495
2889
|
{
|
|
2496
2890
|
ref,
|
|
@@ -2499,13 +2893,13 @@ var SelectScrollDownButton = React19.forwardRef(({ className, ...props }, ref) =
|
|
|
2499
2893
|
className
|
|
2500
2894
|
),
|
|
2501
2895
|
...props,
|
|
2502
|
-
children: /* @__PURE__ */ (0,
|
|
2896
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixChevronDownIcon, {})
|
|
2503
2897
|
}
|
|
2504
2898
|
));
|
|
2505
2899
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2506
|
-
var SelectContent =
|
|
2900
|
+
var SelectContent = React21.forwardRef(({ className, children, position = "popper", container, ...props }, ref) => {
|
|
2507
2901
|
const portalContainer = usePortalContainer(container);
|
|
2508
|
-
return /* @__PURE__ */ (0,
|
|
2902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2509
2903
|
SelectPrimitive.Content,
|
|
2510
2904
|
{
|
|
2511
2905
|
ref,
|
|
@@ -2517,8 +2911,8 @@ var SelectContent = React19.forwardRef(({ className, children, position = "poppe
|
|
|
2517
2911
|
position,
|
|
2518
2912
|
...props,
|
|
2519
2913
|
children: [
|
|
2520
|
-
/* @__PURE__ */ (0,
|
|
2521
|
-
/* @__PURE__ */ (0,
|
|
2914
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectScrollUpButton, {}),
|
|
2915
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2522
2916
|
SelectPrimitive.Viewport,
|
|
2523
2917
|
{
|
|
2524
2918
|
className: cn(
|
|
@@ -2528,13 +2922,13 @@ var SelectContent = React19.forwardRef(({ className, children, position = "poppe
|
|
|
2528
2922
|
children
|
|
2529
2923
|
}
|
|
2530
2924
|
),
|
|
2531
|
-
/* @__PURE__ */ (0,
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectScrollDownButton, {})
|
|
2532
2926
|
]
|
|
2533
2927
|
}
|
|
2534
2928
|
) });
|
|
2535
2929
|
});
|
|
2536
2930
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2537
|
-
var SelectLabel =
|
|
2931
|
+
var SelectLabel = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2538
2932
|
SelectPrimitive.Label,
|
|
2539
2933
|
{
|
|
2540
2934
|
ref,
|
|
@@ -2543,7 +2937,7 @@ var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2543
2937
|
}
|
|
2544
2938
|
));
|
|
2545
2939
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2546
|
-
var SelectItem =
|
|
2940
|
+
var SelectItem = React21.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2547
2941
|
SelectPrimitive.Item,
|
|
2548
2942
|
{
|
|
2549
2943
|
ref,
|
|
@@ -2554,14 +2948,14 @@ var SelectItem = React19.forwardRef(({ className, children, description, ...prop
|
|
|
2554
2948
|
),
|
|
2555
2949
|
...props,
|
|
2556
2950
|
children: [
|
|
2557
|
-
/* @__PURE__ */ (0,
|
|
2558
|
-
/* @__PURE__ */ (0,
|
|
2559
|
-
description ? /* @__PURE__ */ (0,
|
|
2951
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
2952
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectPrimitive.ItemText, { children }),
|
|
2953
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "block text-xs leading-snug text-muted-foreground", children: description }) : null
|
|
2560
2954
|
]
|
|
2561
2955
|
}
|
|
2562
2956
|
));
|
|
2563
2957
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2564
|
-
var SelectSeparator =
|
|
2958
|
+
var SelectSeparator = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2565
2959
|
SelectPrimitive.Separator,
|
|
2566
2960
|
{
|
|
2567
2961
|
ref,
|
|
@@ -2573,9 +2967,9 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
2573
2967
|
|
|
2574
2968
|
// src/separator.tsx
|
|
2575
2969
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
2576
|
-
var
|
|
2577
|
-
var
|
|
2578
|
-
var Separator4 =
|
|
2970
|
+
var React22 = __toESM(require("react"), 1);
|
|
2971
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2972
|
+
var Separator4 = React22.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2579
2973
|
SeparatorPrimitive.Root,
|
|
2580
2974
|
{
|
|
2581
2975
|
ref,
|
|
@@ -2593,13 +2987,13 @@ Separator4.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
2593
2987
|
|
|
2594
2988
|
// src/sheet.tsx
|
|
2595
2989
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
2596
|
-
var
|
|
2597
|
-
var
|
|
2598
|
-
var
|
|
2599
|
-
var
|
|
2600
|
-
var SheetContentBase =
|
|
2990
|
+
var import_react_tree4 = require("@ai-matrx/kit/react-tree");
|
|
2991
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
2992
|
+
var React23 = __toESM(require("react"), 1);
|
|
2993
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2994
|
+
var SheetContentBase = React23.forwardRef(({ ...props }, ref) => {
|
|
2601
2995
|
const isModal = useRadixDialogModal();
|
|
2602
|
-
return /* @__PURE__ */ (0,
|
|
2996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2603
2997
|
SheetPrimitive.Content,
|
|
2604
2998
|
{
|
|
2605
2999
|
...props,
|
|
@@ -2609,15 +3003,15 @@ var SheetContentBase = React21.forwardRef(({ ...props }, ref) => {
|
|
|
2609
3003
|
);
|
|
2610
3004
|
});
|
|
2611
3005
|
SheetContentBase.displayName = "SheetContentBase";
|
|
2612
|
-
var Sheet =
|
|
3006
|
+
var Sheet = React23.forwardRef(({ children, ...props }, _ref) => {
|
|
2613
3007
|
const modal = props.modal ?? true;
|
|
2614
|
-
return /* @__PURE__ */ (0,
|
|
3008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SheetPrimitive.Root, { ...props, modal, children }) });
|
|
2615
3009
|
});
|
|
2616
3010
|
Sheet.displayName = "Sheet";
|
|
2617
3011
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
2618
3012
|
var SheetClose = SheetPrimitive.Close;
|
|
2619
3013
|
var SheetPortal = SheetPrimitive.Portal;
|
|
2620
|
-
var SheetOverlay =
|
|
3014
|
+
var SheetOverlay = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2621
3015
|
SheetPrimitive.Overlay,
|
|
2622
3016
|
{
|
|
2623
3017
|
className: cn(
|
|
@@ -2629,7 +3023,7 @@ var SheetOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2629
3023
|
}
|
|
2630
3024
|
));
|
|
2631
3025
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
2632
|
-
var sheetVariants = (0,
|
|
3026
|
+
var sheetVariants = (0, import_class_variance_authority5.cva)(
|
|
2633
3027
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
2634
3028
|
{
|
|
2635
3029
|
variants: {
|
|
@@ -2646,7 +3040,7 @@ var sheetVariants = (0, import_class_variance_authority4.cva)(
|
|
|
2646
3040
|
}
|
|
2647
3041
|
}
|
|
2648
3042
|
);
|
|
2649
|
-
var SheetDescription =
|
|
3043
|
+
var SheetDescription = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2650
3044
|
SheetPrimitive.Description,
|
|
2651
3045
|
{
|
|
2652
3046
|
ref,
|
|
@@ -2655,7 +3049,7 @@ var SheetDescription = React21.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2655
3049
|
}
|
|
2656
3050
|
));
|
|
2657
3051
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
2658
|
-
var SheetContent =
|
|
3052
|
+
var SheetContent = React23.forwardRef(
|
|
2659
3053
|
({
|
|
2660
3054
|
side = "right",
|
|
2661
3055
|
className,
|
|
@@ -2665,10 +3059,10 @@ var SheetContent = React21.forwardRef(
|
|
|
2665
3059
|
overlayClassName,
|
|
2666
3060
|
...props
|
|
2667
3061
|
}, ref) => {
|
|
2668
|
-
const hasDescription = (0,
|
|
2669
|
-
return /* @__PURE__ */ (0,
|
|
2670
|
-
!hideOverlay && /* @__PURE__ */ (0,
|
|
2671
|
-
/* @__PURE__ */ (0,
|
|
3062
|
+
const hasDescription = (0, import_react_tree4.treeContainsComponent)(children, SheetDescription) || (0, import_react_tree4.treeContainsComponent)(children, SheetPrimitive.Description);
|
|
3063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(SheetPortal, { children: [
|
|
3064
|
+
!hideOverlay && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SheetOverlay, { className: overlayClassName }),
|
|
3065
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2672
3066
|
SheetContentBase,
|
|
2673
3067
|
{
|
|
2674
3068
|
ref,
|
|
@@ -2676,9 +3070,9 @@ var SheetContent = React21.forwardRef(
|
|
|
2676
3070
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
2677
3071
|
...props,
|
|
2678
3072
|
children: [
|
|
2679
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
2680
|
-
/* @__PURE__ */ (0,
|
|
2681
|
-
/* @__PURE__ */ (0,
|
|
3073
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
3074
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Cross2Icon, { className: "h-4 w-4" }),
|
|
3075
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "sr-only", children: "Close" })
|
|
2682
3076
|
] }),
|
|
2683
3077
|
children
|
|
2684
3078
|
]
|
|
@@ -2691,7 +3085,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
2691
3085
|
var SheetHeader = ({
|
|
2692
3086
|
className,
|
|
2693
3087
|
...props
|
|
2694
|
-
}) => /* @__PURE__ */ (0,
|
|
3088
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2695
3089
|
"div",
|
|
2696
3090
|
{
|
|
2697
3091
|
className: cn(
|
|
@@ -2705,7 +3099,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
2705
3099
|
var SheetFooter = ({
|
|
2706
3100
|
className,
|
|
2707
3101
|
...props
|
|
2708
|
-
}) => /* @__PURE__ */ (0,
|
|
3102
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2709
3103
|
"div",
|
|
2710
3104
|
{
|
|
2711
3105
|
className: cn(
|
|
@@ -2716,7 +3110,7 @@ var SheetFooter = ({
|
|
|
2716
3110
|
}
|
|
2717
3111
|
);
|
|
2718
3112
|
SheetFooter.displayName = "SheetFooter";
|
|
2719
|
-
var SheetTitle =
|
|
3113
|
+
var SheetTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2720
3114
|
SheetPrimitive.Title,
|
|
2721
3115
|
{
|
|
2722
3116
|
ref,
|
|
@@ -2727,12 +3121,12 @@ var SheetTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2727
3121
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
2728
3122
|
|
|
2729
3123
|
// src/skeleton.tsx
|
|
2730
|
-
var
|
|
3124
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2731
3125
|
function Skeleton({
|
|
2732
3126
|
className,
|
|
2733
3127
|
...props
|
|
2734
3128
|
}) {
|
|
2735
|
-
return /* @__PURE__ */ (0,
|
|
3129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2736
3130
|
"div",
|
|
2737
3131
|
{
|
|
2738
3132
|
className: cn("animate-pulse rounded-md bg-primary/10", className),
|
|
@@ -2743,8 +3137,8 @@ function Skeleton({
|
|
|
2743
3137
|
|
|
2744
3138
|
// src/switch.tsx
|
|
2745
3139
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
2746
|
-
var
|
|
2747
|
-
var
|
|
3140
|
+
var React24 = __toESM(require("react"), 1);
|
|
3141
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2748
3142
|
var SWITCH_SIZES = {
|
|
2749
3143
|
sm: {
|
|
2750
3144
|
root: "h-4 w-9 border-border data-[state=unchecked]:bg-input",
|
|
@@ -2755,7 +3149,7 @@ var SWITCH_SIZES = {
|
|
|
2755
3149
|
thumb: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
2756
3150
|
}
|
|
2757
3151
|
};
|
|
2758
|
-
var Switch =
|
|
3152
|
+
var Switch = React24.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2759
3153
|
SwitchPrimitives.Root,
|
|
2760
3154
|
{
|
|
2761
3155
|
ref,
|
|
@@ -2766,7 +3160,7 @@ var Switch = React22.forwardRef(({ className, size = "md", ...props }, ref) => /
|
|
|
2766
3160
|
className
|
|
2767
3161
|
),
|
|
2768
3162
|
...props,
|
|
2769
|
-
children: /* @__PURE__ */ (0,
|
|
3163
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2770
3164
|
SwitchPrimitives.Thumb,
|
|
2771
3165
|
{
|
|
2772
3166
|
"data-slot": "switch-thumb",
|
|
@@ -2782,7 +3176,7 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
2782
3176
|
|
|
2783
3177
|
// src/tabbed-bottom-sheet.tsx
|
|
2784
3178
|
var import_react4 = require("react");
|
|
2785
|
-
var
|
|
3179
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2786
3180
|
function TabbedBottomSheet({
|
|
2787
3181
|
open,
|
|
2788
3182
|
onOpenChange,
|
|
@@ -2796,15 +3190,15 @@ function TabbedBottomSheet({
|
|
|
2796
3190
|
if (open) setSelectedTabId(null);
|
|
2797
3191
|
}
|
|
2798
3192
|
const selectedTab = selectedTabId ? tabs.find((tab) => tab.id === selectedTabId) : null;
|
|
2799
|
-
return /* @__PURE__ */ (0,
|
|
3193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2800
3194
|
BottomSheet,
|
|
2801
3195
|
{
|
|
2802
3196
|
open,
|
|
2803
3197
|
onOpenChange,
|
|
2804
3198
|
title,
|
|
2805
3199
|
size: "full",
|
|
2806
|
-
children: /* @__PURE__ */ (0,
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
3200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "matrx-mobile-sheet flex min-h-0 flex-1 flex-col", children: [
|
|
3201
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2808
3202
|
BottomSheetHeader,
|
|
2809
3203
|
{
|
|
2810
3204
|
title: selectedTab ? selectedTab.label : title,
|
|
@@ -2812,19 +3206,19 @@ function TabbedBottomSheet({
|
|
|
2812
3206
|
onBack: () => setSelectedTabId(null)
|
|
2813
3207
|
}
|
|
2814
3208
|
),
|
|
2815
|
-
selectedTab ? /* @__PURE__ */ (0,
|
|
3209
|
+
selectedTab ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden pb-safe", children: selectedTab.content }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(BottomSheetBody, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "divide-y divide-border", children: tabs.map((tab) => {
|
|
2816
3210
|
const Icon2 = tab.icon;
|
|
2817
|
-
return /* @__PURE__ */ (0,
|
|
3211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2818
3212
|
"button",
|
|
2819
3213
|
{
|
|
2820
3214
|
type: "button",
|
|
2821
3215
|
onClick: () => setSelectedTabId(tab.id),
|
|
2822
3216
|
className: "flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors hover:bg-muted/60 active:bg-muted",
|
|
2823
3217
|
children: [
|
|
2824
|
-
Icon2 ? /* @__PURE__ */ (0,
|
|
2825
|
-
/* @__PURE__ */ (0,
|
|
3218
|
+
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon2, { className: "h-5 w-5 shrink-0 text-muted-foreground" }) : null,
|
|
3219
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "min-w-0 flex-1 text-base text-foreground", children: tab.label }),
|
|
2826
3220
|
tab.trailing,
|
|
2827
|
-
/* @__PURE__ */ (0,
|
|
3221
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
|
|
2828
3222
|
]
|
|
2829
3223
|
}
|
|
2830
3224
|
) }, tab.id);
|
|
@@ -2835,19 +3229,19 @@ function TabbedBottomSheet({
|
|
|
2835
3229
|
}
|
|
2836
3230
|
|
|
2837
3231
|
// src/table.tsx
|
|
2838
|
-
var
|
|
2839
|
-
var
|
|
3232
|
+
var React25 = __toESM(require("react"), 1);
|
|
3233
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2840
3234
|
var TABLE_SIZES = {
|
|
2841
3235
|
sm: { head: "px-2", cell: "p-2" },
|
|
2842
3236
|
md: { head: "px-3", cell: "p-3" }
|
|
2843
3237
|
};
|
|
2844
|
-
var TableSizeContext =
|
|
3238
|
+
var TableSizeContext = React25.createContext("md");
|
|
2845
3239
|
function useTableSize() {
|
|
2846
|
-
return
|
|
3240
|
+
return React25.useContext(TableSizeContext);
|
|
2847
3241
|
}
|
|
2848
|
-
var Table =
|
|
3242
|
+
var Table = React25.forwardRef(
|
|
2849
3243
|
({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
|
|
2850
|
-
const table = /* @__PURE__ */ (0,
|
|
3244
|
+
const table = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2851
3245
|
"table",
|
|
2852
3246
|
{
|
|
2853
3247
|
ref,
|
|
@@ -2857,7 +3251,7 @@ var Table = React23.forwardRef(
|
|
|
2857
3251
|
...props
|
|
2858
3252
|
}
|
|
2859
3253
|
);
|
|
2860
|
-
return /* @__PURE__ */ (0,
|
|
3254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableSizeContext.Provider, { value: size, children: wrap ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2861
3255
|
"div",
|
|
2862
3256
|
{
|
|
2863
3257
|
"data-slot": "table-wrapper",
|
|
@@ -2868,7 +3262,7 @@ var Table = React23.forwardRef(
|
|
|
2868
3262
|
}
|
|
2869
3263
|
);
|
|
2870
3264
|
Table.displayName = "Table";
|
|
2871
|
-
var TableHeader =
|
|
3265
|
+
var TableHeader = React25.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2872
3266
|
"thead",
|
|
2873
3267
|
{
|
|
2874
3268
|
ref,
|
|
@@ -2882,7 +3276,7 @@ var TableHeader = React23.forwardRef(({ className, sticky = false, ...props }, r
|
|
|
2882
3276
|
}
|
|
2883
3277
|
));
|
|
2884
3278
|
TableHeader.displayName = "TableHeader";
|
|
2885
|
-
var TableBody =
|
|
3279
|
+
var TableBody = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2886
3280
|
"tbody",
|
|
2887
3281
|
{
|
|
2888
3282
|
ref,
|
|
@@ -2892,7 +3286,7 @@ var TableBody = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2892
3286
|
}
|
|
2893
3287
|
));
|
|
2894
3288
|
TableBody.displayName = "TableBody";
|
|
2895
|
-
var TableFooter =
|
|
3289
|
+
var TableFooter = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2896
3290
|
"tfoot",
|
|
2897
3291
|
{
|
|
2898
3292
|
ref,
|
|
@@ -2905,7 +3299,7 @@ var TableFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2905
3299
|
}
|
|
2906
3300
|
));
|
|
2907
3301
|
TableFooter.displayName = "TableFooter";
|
|
2908
|
-
var TableRow =
|
|
3302
|
+
var TableRow = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2909
3303
|
"tr",
|
|
2910
3304
|
{
|
|
2911
3305
|
ref,
|
|
@@ -2918,9 +3312,9 @@ var TableRow = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2918
3312
|
}
|
|
2919
3313
|
));
|
|
2920
3314
|
TableRow.displayName = "TableRow";
|
|
2921
|
-
var TableHead =
|
|
3315
|
+
var TableHead = React25.forwardRef(({ className, ...props }, ref) => {
|
|
2922
3316
|
const size = useTableSize();
|
|
2923
|
-
return /* @__PURE__ */ (0,
|
|
3317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2924
3318
|
"th",
|
|
2925
3319
|
{
|
|
2926
3320
|
ref,
|
|
@@ -2935,9 +3329,9 @@ var TableHead = React23.forwardRef(({ className, ...props }, ref) => {
|
|
|
2935
3329
|
);
|
|
2936
3330
|
});
|
|
2937
3331
|
TableHead.displayName = "TableHead";
|
|
2938
|
-
var TableCell =
|
|
3332
|
+
var TableCell = React25.forwardRef(({ className, ...props }, ref) => {
|
|
2939
3333
|
const size = useTableSize();
|
|
2940
|
-
return /* @__PURE__ */ (0,
|
|
3334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2941
3335
|
"td",
|
|
2942
3336
|
{
|
|
2943
3337
|
ref,
|
|
@@ -2952,7 +3346,7 @@ var TableCell = React23.forwardRef(({ className, ...props }, ref) => {
|
|
|
2952
3346
|
);
|
|
2953
3347
|
});
|
|
2954
3348
|
TableCell.displayName = "TableCell";
|
|
2955
|
-
var TableCaption =
|
|
3349
|
+
var TableCaption = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2956
3350
|
"caption",
|
|
2957
3351
|
{
|
|
2958
3352
|
ref,
|
|
@@ -2965,11 +3359,11 @@ TableCaption.displayName = "TableCaption";
|
|
|
2965
3359
|
|
|
2966
3360
|
// src/tabs.tsx
|
|
2967
3361
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
2968
|
-
var
|
|
2969
|
-
var
|
|
3362
|
+
var React26 = __toESM(require("react"), 1);
|
|
3363
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2970
3364
|
var Tabs = TabsPrimitive.Root;
|
|
2971
3365
|
var TABS_TRIGGER_BASE = "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm";
|
|
2972
|
-
var TabsList =
|
|
3366
|
+
var TabsList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2973
3367
|
TabsPrimitive.List,
|
|
2974
3368
|
{
|
|
2975
3369
|
ref,
|
|
@@ -2982,7 +3376,7 @@ var TabsList = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2982
3376
|
}
|
|
2983
3377
|
));
|
|
2984
3378
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
2985
|
-
var TabsTrigger =
|
|
3379
|
+
var TabsTrigger = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2986
3380
|
TabsPrimitive.Trigger,
|
|
2987
3381
|
{
|
|
2988
3382
|
ref,
|
|
@@ -2996,7 +3390,7 @@ var TabsTrigger = React24.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2996
3390
|
}
|
|
2997
3391
|
));
|
|
2998
3392
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
2999
|
-
var TabsTriggerCore =
|
|
3393
|
+
var TabsTriggerCore = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3000
3394
|
TabsPrimitive.Trigger,
|
|
3001
3395
|
{
|
|
3002
3396
|
ref,
|
|
@@ -3006,7 +3400,7 @@ var TabsTriggerCore = React24.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3006
3400
|
}
|
|
3007
3401
|
));
|
|
3008
3402
|
TabsTriggerCore.displayName = TabsPrimitive.Trigger.displayName;
|
|
3009
|
-
var TabsContent =
|
|
3403
|
+
var TabsContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3010
3404
|
TabsPrimitive.Content,
|
|
3011
3405
|
{
|
|
3012
3406
|
ref,
|
|
@@ -3022,8 +3416,8 @@ var TabsContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3022
3416
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3023
3417
|
|
|
3024
3418
|
// src/textarea.tsx
|
|
3025
|
-
var
|
|
3026
|
-
var
|
|
3419
|
+
var React27 = __toESM(require("react"), 1);
|
|
3420
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3027
3421
|
var FILL_HEIGHT_REGEX = /(?:^|\s)(h-full|h-dvh|flex-1|grow)(?:\s|$)/;
|
|
3028
3422
|
var FILL_WIDTH_REGEX = /(?:^|\s)(w-full|w-screen)(?:\s|$)/;
|
|
3029
3423
|
function getStretchClasses(className) {
|
|
@@ -3036,7 +3430,7 @@ function getStretchClasses(className) {
|
|
|
3036
3430
|
var TEXTAREA_ELEVATED_CLASS = "flex h-auto w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-textarea transition duration-400 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
|
|
3037
3431
|
var TEXTAREA_CONTROL_CLASS = "flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
|
|
3038
3432
|
function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
3039
|
-
|
|
3433
|
+
React27.useEffect(() => {
|
|
3040
3434
|
if (!autoGrow || !ref.current) return;
|
|
3041
3435
|
const textarea = ref.current;
|
|
3042
3436
|
textarea.style.height = "auto";
|
|
@@ -3052,8 +3446,8 @@ function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
|
3052
3446
|
}, [value, autoGrow, minHeight, maxHeight, ref]);
|
|
3053
3447
|
}
|
|
3054
3448
|
function useMergedTextareaRef(forwarded) {
|
|
3055
|
-
const internal =
|
|
3056
|
-
const callback =
|
|
3449
|
+
const internal = React27.useRef(null);
|
|
3450
|
+
const callback = React27.useCallback(
|
|
3057
3451
|
(node) => {
|
|
3058
3452
|
internal.current = node;
|
|
3059
3453
|
if (typeof forwarded === "function") forwarded(node);
|
|
@@ -3070,13 +3464,13 @@ function boxStyle(minHeight, maxHeight) {
|
|
|
3070
3464
|
maxHeight: maxHeight ? `${maxHeight}px` : void 0
|
|
3071
3465
|
};
|
|
3072
3466
|
}
|
|
3073
|
-
var Textarea =
|
|
3467
|
+
var Textarea = React27.forwardRef(
|
|
3074
3468
|
({ className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props }, forwarded) => {
|
|
3075
3469
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3076
3470
|
const stretchClasses = getStretchClasses(className);
|
|
3077
3471
|
const needsWrapper = Boolean(wrapperClassName || stretchClasses);
|
|
3078
3472
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3079
|
-
const textarea = /* @__PURE__ */ (0,
|
|
3473
|
+
const textarea = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3080
3474
|
"textarea",
|
|
3081
3475
|
{
|
|
3082
3476
|
ref: callback,
|
|
@@ -3092,15 +3486,15 @@ var Textarea = React25.forwardRef(
|
|
|
3092
3486
|
}
|
|
3093
3487
|
);
|
|
3094
3488
|
if (!needsWrapper) return textarea;
|
|
3095
|
-
return /* @__PURE__ */ (0,
|
|
3489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn(stretchClasses, wrapperClassName), children: textarea });
|
|
3096
3490
|
}
|
|
3097
3491
|
);
|
|
3098
3492
|
Textarea.displayName = "Textarea";
|
|
3099
|
-
var BasicTextarea =
|
|
3493
|
+
var BasicTextarea = React27.forwardRef(
|
|
3100
3494
|
({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {
|
|
3101
3495
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3102
3496
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3103
|
-
return /* @__PURE__ */ (0,
|
|
3497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3104
3498
|
"textarea",
|
|
3105
3499
|
{
|
|
3106
3500
|
ref: callback,
|
|
@@ -3118,7 +3512,7 @@ var BasicTextarea = React25.forwardRef(
|
|
|
3118
3512
|
}
|
|
3119
3513
|
);
|
|
3120
3514
|
BasicTextarea.displayName = "BasicTextarea";
|
|
3121
|
-
var TextareaWithPrefix =
|
|
3515
|
+
var TextareaWithPrefix = React27.forwardRef(
|
|
3122
3516
|
({
|
|
3123
3517
|
prefix,
|
|
3124
3518
|
className,
|
|
@@ -3130,13 +3524,13 @@ var TextareaWithPrefix = React25.forwardRef(
|
|
|
3130
3524
|
}, forwarded) => {
|
|
3131
3525
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3132
3526
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3133
|
-
return /* @__PURE__ */ (0,
|
|
3527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3134
3528
|
"div",
|
|
3135
3529
|
{
|
|
3136
3530
|
className: cn("relative", getStretchClasses(className), wrapperClassName),
|
|
3137
3531
|
children: [
|
|
3138
|
-
prefix ? /* @__PURE__ */ (0,
|
|
3139
|
-
/* @__PURE__ */ (0,
|
|
3532
|
+
prefix ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "pointer-events-none absolute left-3 top-3 z-10 text-muted-foreground", children: prefix }) : null,
|
|
3533
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3140
3534
|
"textarea",
|
|
3141
3535
|
{
|
|
3142
3536
|
ref: callback,
|
|
@@ -3212,4 +3606,307 @@ function useScrollFade() {
|
|
|
3212
3606
|
}
|
|
3213
3607
|
};
|
|
3214
3608
|
}
|
|
3609
|
+
|
|
3610
|
+
// src/hover-card.tsx
|
|
3611
|
+
var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
|
|
3612
|
+
var React28 = __toESM(require("react"), 1);
|
|
3613
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3614
|
+
var HoverCard = HoverCardPrimitive.Root;
|
|
3615
|
+
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
3616
|
+
var HoverCardContent = React28.forwardRef(({ className, align = "center", sideOffset = 4, container, ...props }, ref) => {
|
|
3617
|
+
const resolved = usePortalContainer(container);
|
|
3618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3619
|
+
HoverCardPrimitive.Content,
|
|
3620
|
+
{
|
|
3621
|
+
ref,
|
|
3622
|
+
"data-slot": "hover-card-content",
|
|
3623
|
+
align,
|
|
3624
|
+
sideOffset,
|
|
3625
|
+
className: cn(
|
|
3626
|
+
"z-[10001] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
|
|
3627
|
+
className
|
|
3628
|
+
),
|
|
3629
|
+
...props
|
|
3630
|
+
}
|
|
3631
|
+
) });
|
|
3632
|
+
});
|
|
3633
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
3634
|
+
|
|
3635
|
+
// src/radio-group.tsx
|
|
3636
|
+
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
3637
|
+
var React29 = __toESM(require("react"), 1);
|
|
3638
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3639
|
+
var RadioGroupSizeContext = React29.createContext("md");
|
|
3640
|
+
var CONTROL_CLASSES = {
|
|
3641
|
+
sm: "h-3.5 w-3.5",
|
|
3642
|
+
md: "h-4 w-4",
|
|
3643
|
+
lg: "h-5 w-5"
|
|
3644
|
+
};
|
|
3645
|
+
var DOT_CLASSES = {
|
|
3646
|
+
sm: "h-1 w-1",
|
|
3647
|
+
md: "h-1.5 w-1.5",
|
|
3648
|
+
lg: "h-2 w-2"
|
|
3649
|
+
};
|
|
3650
|
+
var RadioGroup3 = React29.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3651
|
+
RadioGroupPrimitive.Root,
|
|
3652
|
+
{
|
|
3653
|
+
ref,
|
|
3654
|
+
"data-slot": "radio-group",
|
|
3655
|
+
className: cn("grid gap-2", className),
|
|
3656
|
+
...props
|
|
3657
|
+
}
|
|
3658
|
+
) }));
|
|
3659
|
+
RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
|
|
3660
|
+
var RadioGroupItem = React29.forwardRef(({ className, size, ...props }, ref) => {
|
|
3661
|
+
const groupSize = React29.useContext(RadioGroupSizeContext);
|
|
3662
|
+
const resolved = size ?? groupSize;
|
|
3663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3664
|
+
RadioGroupPrimitive.Item,
|
|
3665
|
+
{
|
|
3666
|
+
ref,
|
|
3667
|
+
"data-slot": "radio-group-item",
|
|
3668
|
+
className: cn(
|
|
3669
|
+
"relative aspect-square shrink-0 rounded-full border border-primary shadow",
|
|
3670
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
3671
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
3672
|
+
"data-[state=checked]:border-primary data-[state=checked]:bg-primary",
|
|
3673
|
+
// Ruling 2 — invisible 44px target on touch, layout untouched.
|
|
3674
|
+
"after:absolute after:left-1/2 after:top-1/2 after:-translate-x-1/2 after:-translate-y-1/2 after:content-['']",
|
|
3675
|
+
"pointer-coarse:after:h-11 pointer-coarse:after:w-11",
|
|
3676
|
+
CONTROL_CLASSES[resolved],
|
|
3677
|
+
className
|
|
3678
|
+
),
|
|
3679
|
+
...props,
|
|
3680
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3681
|
+
"div",
|
|
3682
|
+
{
|
|
3683
|
+
className: cn("rounded-full bg-primary-foreground", DOT_CLASSES[resolved])
|
|
3684
|
+
}
|
|
3685
|
+
) })
|
|
3686
|
+
}
|
|
3687
|
+
);
|
|
3688
|
+
});
|
|
3689
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
3690
|
+
|
|
3691
|
+
// src/resizable.tsx
|
|
3692
|
+
var import_react_resizable_panels = require("react-resizable-panels");
|
|
3693
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3694
|
+
var HANDLE_SIZES = {
|
|
3695
|
+
xs: "w-0.5 [&[aria-orientation=horizontal]]:h-0.5 [&[aria-orientation=horizontal]]:w-full",
|
|
3696
|
+
sm: "w-1 [&[aria-orientation=horizontal]]:h-1 [&[aria-orientation=horizontal]]:w-full",
|
|
3697
|
+
md: "w-1.5 [&[aria-orientation=horizontal]]:h-1.5 [&[aria-orientation=horizontal]]:w-full",
|
|
3698
|
+
lg: "w-2 [&[aria-orientation=horizontal]]:h-2 [&[aria-orientation=horizontal]]:w-full",
|
|
3699
|
+
xl: "w-3 [&[aria-orientation=horizontal]]:h-3 [&[aria-orientation=horizontal]]:w-full",
|
|
3700
|
+
"2xl": "w-4 [&[aria-orientation=horizontal]]:h-4 [&[aria-orientation=horizontal]]:w-full",
|
|
3701
|
+
"3xl": "w-6 [&[aria-orientation=horizontal]]:h-6 [&[aria-orientation=horizontal]]:w-full",
|
|
3702
|
+
"4xl": "w-8 [&[aria-orientation=horizontal]]:h-8 [&[aria-orientation=horizontal]]:w-full"
|
|
3703
|
+
};
|
|
3704
|
+
var ResizablePanelGroup = ({
|
|
3705
|
+
className,
|
|
3706
|
+
...props
|
|
3707
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3708
|
+
import_react_resizable_panels.Group,
|
|
3709
|
+
{
|
|
3710
|
+
"data-slot": "resizable-group",
|
|
3711
|
+
className: cn("flex h-full w-full", className),
|
|
3712
|
+
...props
|
|
3713
|
+
}
|
|
3714
|
+
);
|
|
3715
|
+
ResizablePanelGroup.displayName = "ResizablePanelGroup";
|
|
3716
|
+
var ResizablePanel = import_react_resizable_panels.Panel;
|
|
3717
|
+
var ResizableHandle = ({
|
|
3718
|
+
withHandle,
|
|
3719
|
+
size = "sm",
|
|
3720
|
+
className,
|
|
3721
|
+
...props
|
|
3722
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3723
|
+
import_react_resizable_panels.Separator,
|
|
3724
|
+
{
|
|
3725
|
+
"data-slot": "resizable-handle",
|
|
3726
|
+
className: cn(
|
|
3727
|
+
"group/handle relative flex shrink-0 items-center justify-center bg-border transition-colors",
|
|
3728
|
+
// Invisible hit target centered on the line; wider still on touch.
|
|
3729
|
+
"after:absolute after:inset-y-0 after:left-1/2 after:w-1.5 after:-translate-x-1/2 after:content-['']",
|
|
3730
|
+
"pointer-coarse:after:w-11",
|
|
3731
|
+
"[&[aria-orientation=horizontal]]:after:inset-x-0 [&[aria-orientation=horizontal]]:after:left-0 [&[aria-orientation=horizontal]]:after:top-1/2 [&[aria-orientation=horizontal]]:after:h-1.5 [&[aria-orientation=horizontal]]:after:w-full [&[aria-orientation=horizontal]]:after:-translate-x-0 [&[aria-orientation=horizontal]]:after:-translate-y-1/2",
|
|
3732
|
+
"pointer-coarse:[&[aria-orientation=horizontal]]:after:h-11",
|
|
3733
|
+
// The drag-outline bug: suppress for ALL focus, restore for keyboard.
|
|
3734
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
3735
|
+
// Library-driven state feedback.
|
|
3736
|
+
"data-[separator=hover]:bg-primary data-[separator=active]:bg-primary",
|
|
3737
|
+
HANDLE_SIZES[size],
|
|
3738
|
+
"cursor-col-resize [&[aria-orientation=horizontal]]:cursor-row-resize",
|
|
3739
|
+
className
|
|
3740
|
+
),
|
|
3741
|
+
...props,
|
|
3742
|
+
children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "z-10 flex h-8 w-4 items-center justify-center rounded-sm border bg-border group-aria-[orientation=horizontal]/handle:h-4 group-aria-[orientation=horizontal]/handle:w-8", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DragHandleDots2Icon, { className: "h-2.5 w-2.5 group-aria-[orientation=horizontal]/handle:rotate-90" }) }) : null
|
|
3743
|
+
}
|
|
3744
|
+
);
|
|
3745
|
+
ResizableHandle.displayName = "ResizableHandle";
|
|
3746
|
+
|
|
3747
|
+
// src/slider.tsx
|
|
3748
|
+
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
3749
|
+
var React30 = __toESM(require("react"), 1);
|
|
3750
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3751
|
+
var TRACK_CLASSES = {
|
|
3752
|
+
sm: "h-1",
|
|
3753
|
+
md: "h-1.5",
|
|
3754
|
+
lg: "h-2.5"
|
|
3755
|
+
};
|
|
3756
|
+
var THUMB_CLASSES = {
|
|
3757
|
+
sm: "h-3.5 w-3.5",
|
|
3758
|
+
md: "h-4 w-4",
|
|
3759
|
+
lg: "h-5 w-5"
|
|
3760
|
+
};
|
|
3761
|
+
var Slider = React30.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
3762
|
+
const thumbCount = Math.max(
|
|
3763
|
+
1,
|
|
3764
|
+
(props.value ?? props.defaultValue ?? [0]).length
|
|
3765
|
+
);
|
|
3766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3767
|
+
SliderPrimitive.Root,
|
|
3768
|
+
{
|
|
3769
|
+
ref,
|
|
3770
|
+
"data-slot": "slider",
|
|
3771
|
+
className: cn(
|
|
3772
|
+
"relative flex w-full touch-none select-none items-center data-[disabled]:opacity-50",
|
|
3773
|
+
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
3774
|
+
className
|
|
3775
|
+
),
|
|
3776
|
+
...props,
|
|
3777
|
+
children: [
|
|
3778
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3779
|
+
SliderPrimitive.Track,
|
|
3780
|
+
{
|
|
3781
|
+
"data-slot": "slider-track",
|
|
3782
|
+
className: cn(
|
|
3783
|
+
"relative w-full grow overflow-hidden rounded-full bg-primary/20",
|
|
3784
|
+
TRACK_CLASSES[size],
|
|
3785
|
+
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
3786
|
+
),
|
|
3787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3788
|
+
SliderPrimitive.Range,
|
|
3789
|
+
{
|
|
3790
|
+
"data-slot": "slider-range",
|
|
3791
|
+
className: "absolute h-full bg-primary data-[orientation=vertical]:w-full"
|
|
3792
|
+
}
|
|
3793
|
+
)
|
|
3794
|
+
}
|
|
3795
|
+
),
|
|
3796
|
+
Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3797
|
+
SliderPrimitive.Thumb,
|
|
3798
|
+
{
|
|
3799
|
+
"data-slot": "slider-thumb",
|
|
3800
|
+
className: cn(
|
|
3801
|
+
"relative block cursor-grab rounded-full border border-primary/50 bg-background shadow transition-colors active:cursor-grabbing",
|
|
3802
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
3803
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
3804
|
+
// Ruling 1 — invisible 44px target, coarse pointers only, so a
|
|
3805
|
+
// dense desktop row keeps its exact hit behaviour.
|
|
3806
|
+
"after:absolute after:left-1/2 after:top-1/2 after:-translate-x-1/2 after:-translate-y-1/2 after:content-['']",
|
|
3807
|
+
"pointer-coarse:after:h-11 pointer-coarse:after:w-11",
|
|
3808
|
+
THUMB_CLASSES[size]
|
|
3809
|
+
)
|
|
3810
|
+
},
|
|
3811
|
+
index
|
|
3812
|
+
))
|
|
3813
|
+
]
|
|
3814
|
+
}
|
|
3815
|
+
);
|
|
3816
|
+
});
|
|
3817
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
3818
|
+
|
|
3819
|
+
// src/toggle.tsx
|
|
3820
|
+
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
3821
|
+
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
3822
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
3823
|
+
var React31 = __toESM(require("react"), 1);
|
|
3824
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3825
|
+
var toggleVariants = (0, import_class_variance_authority6.cva)(
|
|
3826
|
+
"inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
3827
|
+
{
|
|
3828
|
+
variants: {
|
|
3829
|
+
variant: {
|
|
3830
|
+
default: "bg-transparent",
|
|
3831
|
+
outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
|
|
3832
|
+
},
|
|
3833
|
+
size: {
|
|
3834
|
+
default: "h-9 min-w-9 px-3",
|
|
3835
|
+
sm: "h-8 min-w-8 px-2",
|
|
3836
|
+
lg: "h-10 min-w-10 px-3"
|
|
3837
|
+
}
|
|
3838
|
+
},
|
|
3839
|
+
defaultVariants: {
|
|
3840
|
+
variant: "default",
|
|
3841
|
+
size: "default"
|
|
3842
|
+
}
|
|
3843
|
+
}
|
|
3844
|
+
);
|
|
3845
|
+
var Toggle = React31.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3846
|
+
TogglePrimitive.Root,
|
|
3847
|
+
{
|
|
3848
|
+
ref,
|
|
3849
|
+
"data-slot": "toggle",
|
|
3850
|
+
className: cn(toggleVariants({ variant, size }), className),
|
|
3851
|
+
...props
|
|
3852
|
+
}
|
|
3853
|
+
));
|
|
3854
|
+
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
3855
|
+
var ToggleGroupContext = React31.createContext({ size: "default", variant: "default" });
|
|
3856
|
+
var ToggleGroup = React31.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3857
|
+
ToggleGroupPrimitive.Root,
|
|
3858
|
+
{
|
|
3859
|
+
ref,
|
|
3860
|
+
"data-slot": "toggle-group",
|
|
3861
|
+
className: cn("flex items-center justify-center gap-1", className),
|
|
3862
|
+
...props,
|
|
3863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
3864
|
+
}
|
|
3865
|
+
));
|
|
3866
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
3867
|
+
var ToggleGroupItem = React31.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
3868
|
+
const context = React31.useContext(ToggleGroupContext);
|
|
3869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3870
|
+
ToggleGroupPrimitive.Item,
|
|
3871
|
+
{
|
|
3872
|
+
ref,
|
|
3873
|
+
"data-slot": "toggle-group-item",
|
|
3874
|
+
className: cn(
|
|
3875
|
+
toggleVariants({
|
|
3876
|
+
variant: context.variant ?? variant,
|
|
3877
|
+
size: context.size ?? size
|
|
3878
|
+
}),
|
|
3879
|
+
className
|
|
3880
|
+
),
|
|
3881
|
+
...props,
|
|
3882
|
+
children
|
|
3883
|
+
}
|
|
3884
|
+
);
|
|
3885
|
+
});
|
|
3886
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
3887
|
+
|
|
3888
|
+
// src/tooltip.tsx
|
|
3889
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3890
|
+
var React32 = __toESM(require("react"), 1);
|
|
3891
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3892
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3893
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
3894
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3895
|
+
var TooltipContent = React32.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
3896
|
+
const resolved = usePortalContainer(container);
|
|
3897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3898
|
+
TooltipPrimitive.Content,
|
|
3899
|
+
{
|
|
3900
|
+
ref,
|
|
3901
|
+
"data-slot": "tooltip-content",
|
|
3902
|
+
sideOffset,
|
|
3903
|
+
className: cn(
|
|
3904
|
+
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",
|
|
3905
|
+
className
|
|
3906
|
+
),
|
|
3907
|
+
...props
|
|
3908
|
+
}
|
|
3909
|
+
) });
|
|
3910
|
+
});
|
|
3911
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3215
3912
|
//# sourceMappingURL=index.cjs.map
|