@ai-matrx/design-system 0.5.2 → 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 +148 -1
- package/README.md +8 -4
- package/dist/index.cjs +1136 -415
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +381 -5
- package/dist/index.d.ts +381 -5
- package/dist/index.js +1136 -415
- package/dist/index.js.map +1 -1
- package/dist/styles.css +20 -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,30 +728,115 @@ 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: {
|
|
537
801
|
variant: {
|
|
538
802
|
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
803
|
+
/**
|
|
804
|
+
* An explicit spelling of `default`, identical by construction. It is
|
|
805
|
+
* not decoration: matrx-frontend's `ButtonMine` fork carried it, ~17
|
|
806
|
+
* call sites say `variant="primary"`, and the alternative to keeping
|
|
807
|
+
* the word was a host shim translating a prop — the massage C22 bans.
|
|
808
|
+
*/
|
|
809
|
+
primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
539
810
|
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
811
|
+
/** The affirmative twin of `destructive` — confirm, approve, publish. */
|
|
812
|
+
success: "bg-success text-success-foreground shadow-sm hover:bg-success/90",
|
|
540
813
|
outline: "border border-border bg-card shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
541
814
|
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
542
815
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
543
816
|
link: "text-primary underline-offset-4 hover:underline",
|
|
544
817
|
subtle: "border border-transparent bg-muted/50 text-foreground hover:border-border hover:bg-muted"
|
|
545
818
|
},
|
|
819
|
+
/**
|
|
820
|
+
* ONE size scale, xs → 3xl, plus the two icon boxes. The top and bottom
|
|
821
|
+
* of the scale came in from matrx-frontend's `ButtonMine` fork (2026-09-07):
|
|
822
|
+
* a dense toolbar needs `xs`, and a marketing/hero call to action needs
|
|
823
|
+
* `xl`+. A host that has to reach outside this scale forks the button,
|
|
824
|
+
* which is exactly how `ButtonMine` was born.
|
|
825
|
+
*/
|
|
546
826
|
size: {
|
|
547
|
-
|
|
827
|
+
xs: "h-6 rounded-md px-1 text-xs",
|
|
548
828
|
sm: "h-8 rounded-md px-3 text-xs",
|
|
829
|
+
default: "h-9 px-4 py-2",
|
|
830
|
+
/** An explicit spelling of `default` (the fork's middle rung). */
|
|
831
|
+
md: "h-9 px-4 py-2",
|
|
549
832
|
lg: "h-10 rounded-md px-6",
|
|
833
|
+
xl: "h-12 px-8 py-3 text-base",
|
|
834
|
+
"2xl": "h-14 px-10 py-3 text-base",
|
|
835
|
+
"3xl": "h-16 px-12 py-3 text-base",
|
|
550
836
|
icon: "h-9 w-9",
|
|
551
|
-
"icon-sm": "h-7 w-7"
|
|
837
|
+
"icon-sm": "h-7 w-7",
|
|
838
|
+
/** A circular icon box — an avatar-shaped control, not a square one. */
|
|
839
|
+
roundIcon: "h-8 w-8 rounded-full p-0"
|
|
552
840
|
}
|
|
553
841
|
},
|
|
554
842
|
defaultVariants: {
|
|
@@ -557,10 +845,10 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
|
557
845
|
}
|
|
558
846
|
}
|
|
559
847
|
);
|
|
560
|
-
var Button =
|
|
848
|
+
var Button = React4.forwardRef(
|
|
561
849
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
562
850
|
const Component = asChild ? import_react_slot.Slot : "button";
|
|
563
|
-
return /* @__PURE__ */ (0,
|
|
851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
564
852
|
Component,
|
|
565
853
|
{
|
|
566
854
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -572,16 +860,166 @@ var Button = React3.forwardRef(
|
|
|
572
860
|
);
|
|
573
861
|
Button.displayName = "Button";
|
|
574
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
|
+
|
|
575
1013
|
// src/avatar.tsx
|
|
576
1014
|
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
577
|
-
var
|
|
578
|
-
var
|
|
1015
|
+
var React7 = __toESM(require("react"), 1);
|
|
1016
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
579
1017
|
var AVATAR_SIZES = {
|
|
580
1018
|
sm: "h-8 w-8 text-[11px]",
|
|
581
1019
|
md: "h-9 w-9 text-xs",
|
|
582
1020
|
lg: "h-10 w-10 text-sm"
|
|
583
1021
|
};
|
|
584
|
-
var Avatar =
|
|
1022
|
+
var Avatar = React7.forwardRef(({ className, size = "lg", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
585
1023
|
AvatarPrimitive.Root,
|
|
586
1024
|
{
|
|
587
1025
|
ref,
|
|
@@ -595,7 +1033,7 @@ var Avatar = React4.forwardRef(({ className, size = "lg", ...props }, ref) => /*
|
|
|
595
1033
|
}
|
|
596
1034
|
));
|
|
597
1035
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
598
|
-
var AvatarImage =
|
|
1036
|
+
var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
599
1037
|
AvatarPrimitive.Image,
|
|
600
1038
|
{
|
|
601
1039
|
ref,
|
|
@@ -605,7 +1043,7 @@ var AvatarImage = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
605
1043
|
}
|
|
606
1044
|
));
|
|
607
1045
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
608
|
-
var AvatarFallback =
|
|
1046
|
+
var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
609
1047
|
AvatarPrimitive.Fallback,
|
|
610
1048
|
{
|
|
611
1049
|
ref,
|
|
@@ -620,8 +1058,8 @@ var AvatarFallback = React4.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
620
1058
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
621
1059
|
|
|
622
1060
|
// src/card.tsx
|
|
623
|
-
var
|
|
624
|
-
var
|
|
1061
|
+
var React8 = __toESM(require("react"), 1);
|
|
1062
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
625
1063
|
var CARD_SIZES = {
|
|
626
1064
|
sm: {
|
|
627
1065
|
root: "rounded-xl border bg-card text-card-foreground shadow",
|
|
@@ -639,12 +1077,12 @@ var CARD_SIZES = {
|
|
|
639
1077
|
padTopless: "p-6 pt-0"
|
|
640
1078
|
}
|
|
641
1079
|
};
|
|
642
|
-
var CardSizeContext =
|
|
1080
|
+
var CardSizeContext = React8.createContext("md");
|
|
643
1081
|
function useCardSize() {
|
|
644
|
-
return
|
|
1082
|
+
return React8.useContext(CardSizeContext);
|
|
645
1083
|
}
|
|
646
|
-
var Card =
|
|
647
|
-
({ 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)(
|
|
648
1086
|
"div",
|
|
649
1087
|
{
|
|
650
1088
|
ref,
|
|
@@ -656,9 +1094,9 @@ var Card = React5.forwardRef(
|
|
|
656
1094
|
) })
|
|
657
1095
|
);
|
|
658
1096
|
Card.displayName = "Card";
|
|
659
|
-
var CardHeader =
|
|
1097
|
+
var CardHeader = React8.forwardRef(({ className, ...props }, ref) => {
|
|
660
1098
|
const size = useCardSize();
|
|
661
|
-
return /* @__PURE__ */ (0,
|
|
1099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
662
1100
|
"div",
|
|
663
1101
|
{
|
|
664
1102
|
ref,
|
|
@@ -673,7 +1111,7 @@ var CardHeader = React5.forwardRef(({ className, ...props }, ref) => {
|
|
|
673
1111
|
);
|
|
674
1112
|
});
|
|
675
1113
|
CardHeader.displayName = "CardHeader";
|
|
676
|
-
var CardTitle =
|
|
1114
|
+
var CardTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
677
1115
|
"h3",
|
|
678
1116
|
{
|
|
679
1117
|
ref,
|
|
@@ -683,7 +1121,7 @@ var CardTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
683
1121
|
}
|
|
684
1122
|
));
|
|
685
1123
|
CardTitle.displayName = "CardTitle";
|
|
686
|
-
var CardDescription =
|
|
1124
|
+
var CardDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
687
1125
|
"p",
|
|
688
1126
|
{
|
|
689
1127
|
ref,
|
|
@@ -693,7 +1131,7 @@ var CardDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
693
1131
|
}
|
|
694
1132
|
));
|
|
695
1133
|
CardDescription.displayName = "CardDescription";
|
|
696
|
-
var CardAction =
|
|
1134
|
+
var CardAction = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
697
1135
|
"div",
|
|
698
1136
|
{
|
|
699
1137
|
ref,
|
|
@@ -703,9 +1141,9 @@ var CardAction = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
703
1141
|
}
|
|
704
1142
|
));
|
|
705
1143
|
CardAction.displayName = "CardAction";
|
|
706
|
-
var CardContent =
|
|
1144
|
+
var CardContent = React8.forwardRef(({ className, ...props }, ref) => {
|
|
707
1145
|
const size = useCardSize();
|
|
708
|
-
return /* @__PURE__ */ (0,
|
|
1146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
709
1147
|
"div",
|
|
710
1148
|
{
|
|
711
1149
|
ref,
|
|
@@ -716,9 +1154,9 @@ var CardContent = React5.forwardRef(({ className, ...props }, ref) => {
|
|
|
716
1154
|
);
|
|
717
1155
|
});
|
|
718
1156
|
CardContent.displayName = "CardContent";
|
|
719
|
-
var CardFooter =
|
|
1157
|
+
var CardFooter = React8.forwardRef(({ className, ...props }, ref) => {
|
|
720
1158
|
const size = useCardSize();
|
|
721
|
-
return /* @__PURE__ */ (0,
|
|
1159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
722
1160
|
"div",
|
|
723
1161
|
{
|
|
724
1162
|
ref,
|
|
@@ -736,13 +1174,13 @@ CardFooter.displayName = "CardFooter";
|
|
|
736
1174
|
|
|
737
1175
|
// src/checkbox.tsx
|
|
738
1176
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
739
|
-
var
|
|
740
|
-
var
|
|
1177
|
+
var React9 = __toESM(require("react"), 1);
|
|
1178
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
741
1179
|
var CHECKBOX_SIZES = {
|
|
742
1180
|
sm: { root: "h-3.5 w-3.5 rounded-xs", glyph: "h-3 w-3" },
|
|
743
1181
|
md: { root: "h-4 w-4 rounded-sm", glyph: "h-3.5 w-3.5" }
|
|
744
1182
|
};
|
|
745
|
-
var Checkbox =
|
|
1183
|
+
var Checkbox = React9.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
746
1184
|
CheckboxPrimitive.Root,
|
|
747
1185
|
{
|
|
748
1186
|
ref,
|
|
@@ -753,12 +1191,12 @@ var Checkbox = React6.forwardRef(({ className, size = "md", ...props }, ref) =>
|
|
|
753
1191
|
className
|
|
754
1192
|
),
|
|
755
1193
|
...props,
|
|
756
|
-
children: /* @__PURE__ */ (0,
|
|
1194
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
757
1195
|
CheckboxPrimitive.Indicator,
|
|
758
1196
|
{
|
|
759
1197
|
"data-slot": "checkbox-indicator",
|
|
760
1198
|
className: "flex items-center justify-center text-current",
|
|
761
|
-
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 })
|
|
762
1200
|
}
|
|
763
1201
|
)
|
|
764
1202
|
}
|
|
@@ -774,35 +1212,15 @@ var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
|
774
1212
|
// src/command.tsx
|
|
775
1213
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
776
1214
|
var import_cmdk = require("cmdk");
|
|
777
|
-
var
|
|
778
|
-
|
|
779
|
-
// src/portal-container.tsx
|
|
780
|
-
var React7 = __toESM(require("react"), 1);
|
|
781
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
782
|
-
var PortalContainerContext = React7.createContext(
|
|
783
|
-
void 0
|
|
784
|
-
);
|
|
785
|
-
function PortalContainerProvider({
|
|
786
|
-
container,
|
|
787
|
-
children
|
|
788
|
-
}) {
|
|
789
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PortalContainerContext.Provider, { value: container ?? void 0, children });
|
|
790
|
-
}
|
|
791
|
-
function usePortalContainer(explicit) {
|
|
792
|
-
const injected = React7.useContext(PortalContainerContext);
|
|
793
|
-
if (explicit !== void 0) {
|
|
794
|
-
return explicit ?? void 0;
|
|
795
|
-
}
|
|
796
|
-
return injected ?? void 0;
|
|
797
|
-
}
|
|
1215
|
+
var React11 = __toESM(require("react"), 1);
|
|
798
1216
|
|
|
799
1217
|
// src/use-is-mobile.ts
|
|
800
|
-
var
|
|
1218
|
+
var React10 = __toESM(require("react"), 1);
|
|
801
1219
|
var MOBILE_BREAKPOINT = 768;
|
|
802
1220
|
function useIsMobile() {
|
|
803
|
-
const [isMobile, setIsMobile] =
|
|
804
|
-
const [hasMounted, setHasMounted] =
|
|
805
|
-
|
|
1221
|
+
const [isMobile, setIsMobile] = React10.useState(false);
|
|
1222
|
+
const [hasMounted, setHasMounted] = React10.useState(false);
|
|
1223
|
+
React10.useEffect(() => {
|
|
806
1224
|
setHasMounted(true);
|
|
807
1225
|
const onChange = () => {
|
|
808
1226
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -822,8 +1240,8 @@ function useIsMobile() {
|
|
|
822
1240
|
}
|
|
823
1241
|
|
|
824
1242
|
// src/command.tsx
|
|
825
|
-
var
|
|
826
|
-
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)(
|
|
827
1245
|
import_cmdk.Command,
|
|
828
1246
|
{
|
|
829
1247
|
ref,
|
|
@@ -838,18 +1256,18 @@ Command.displayName = import_cmdk.Command.displayName;
|
|
|
838
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";
|
|
839
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";
|
|
840
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";
|
|
841
|
-
var CommandDialogContent =
|
|
1259
|
+
var CommandDialogContent = React11.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
842
1260
|
const isMobile = useIsMobile();
|
|
843
1261
|
const isModal = useRadixDialogModal();
|
|
844
1262
|
const portalContainer = usePortalContainer(container);
|
|
845
|
-
return /* @__PURE__ */ (0,
|
|
846
|
-
isModal ? /* @__PURE__ */ (0,
|
|
1263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DialogPrimitive.Portal, { container: portalContainer, children: [
|
|
1264
|
+
isModal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
847
1265
|
DialogPrimitive.Overlay,
|
|
848
1266
|
{
|
|
849
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"
|
|
850
1268
|
}
|
|
851
1269
|
) : null,
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
1270
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
853
1271
|
DialogPrimitive.Content,
|
|
854
1272
|
{
|
|
855
1273
|
ref,
|
|
@@ -864,9 +1282,9 @@ var CommandDialogContent = React9.forwardRef(({ className, children, container,
|
|
|
864
1282
|
...props,
|
|
865
1283
|
children: [
|
|
866
1284
|
children,
|
|
867
|
-
/* @__PURE__ */ (0,
|
|
868
|
-
/* @__PURE__ */ (0,
|
|
869
|
-
/* @__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" })
|
|
870
1288
|
] })
|
|
871
1289
|
]
|
|
872
1290
|
}
|
|
@@ -880,21 +1298,21 @@ var CommandDialog = ({
|
|
|
880
1298
|
...props
|
|
881
1299
|
}) => {
|
|
882
1300
|
const modal = props.modal ?? true;
|
|
883
|
-
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)(
|
|
884
1302
|
CommandDialogContent,
|
|
885
1303
|
{
|
|
886
1304
|
className: "overflow-hidden p-0",
|
|
887
1305
|
...container !== void 0 ? { container } : {},
|
|
888
1306
|
children: [
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__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 })
|
|
891
1309
|
]
|
|
892
1310
|
}
|
|
893
1311
|
) }) });
|
|
894
1312
|
};
|
|
895
|
-
var CommandInput =
|
|
896
|
-
/* @__PURE__ */ (0,
|
|
897
|
-
/* @__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)(
|
|
898
1316
|
import_cmdk.Command.Input,
|
|
899
1317
|
{
|
|
900
1318
|
ref,
|
|
@@ -907,7 +1325,7 @@ var CommandInput = React9.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
907
1325
|
)
|
|
908
1326
|
] }));
|
|
909
1327
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
910
|
-
var CommandList =
|
|
1328
|
+
var CommandList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
911
1329
|
import_cmdk.Command.List,
|
|
912
1330
|
{
|
|
913
1331
|
ref,
|
|
@@ -916,7 +1334,7 @@ var CommandList = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
916
1334
|
}
|
|
917
1335
|
));
|
|
918
1336
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
919
|
-
var CommandEmpty =
|
|
1337
|
+
var CommandEmpty = React11.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
920
1338
|
import_cmdk.Command.Empty,
|
|
921
1339
|
{
|
|
922
1340
|
ref,
|
|
@@ -925,7 +1343,7 @@ var CommandEmpty = React9.forwardRef((props, ref) => /* @__PURE__ */ (0, import_
|
|
|
925
1343
|
}
|
|
926
1344
|
));
|
|
927
1345
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
928
|
-
var CommandGroup =
|
|
1346
|
+
var CommandGroup = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
929
1347
|
import_cmdk.Command.Group,
|
|
930
1348
|
{
|
|
931
1349
|
ref,
|
|
@@ -937,7 +1355,7 @@ var CommandGroup = React9.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
937
1355
|
}
|
|
938
1356
|
));
|
|
939
1357
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
940
|
-
var CommandSeparator =
|
|
1358
|
+
var CommandSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
941
1359
|
import_cmdk.Command.Separator,
|
|
942
1360
|
{
|
|
943
1361
|
ref,
|
|
@@ -946,7 +1364,7 @@ var CommandSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
946
1364
|
}
|
|
947
1365
|
));
|
|
948
1366
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
949
|
-
var CommandItem =
|
|
1367
|
+
var CommandItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
950
1368
|
import_cmdk.Command.Item,
|
|
951
1369
|
{
|
|
952
1370
|
ref,
|
|
@@ -962,7 +1380,7 @@ var CommandShortcut = ({
|
|
|
962
1380
|
className,
|
|
963
1381
|
...props
|
|
964
1382
|
}) => {
|
|
965
|
-
return /* @__PURE__ */ (0,
|
|
1383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
966
1384
|
"span",
|
|
967
1385
|
{
|
|
968
1386
|
className: cn(
|
|
@@ -977,8 +1395,8 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
977
1395
|
|
|
978
1396
|
// src/context-menu.tsx
|
|
979
1397
|
var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"), 1);
|
|
980
|
-
var
|
|
981
|
-
var
|
|
1398
|
+
var React12 = __toESM(require("react"), 1);
|
|
1399
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
982
1400
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
983
1401
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
984
1402
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
@@ -989,7 +1407,7 @@ var SURFACE_CLASS = "z-50 min-w-[8rem] max-h-[var(--radix-context-menu-content-a
|
|
|
989
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";
|
|
990
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";
|
|
991
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";
|
|
992
|
-
var ContextMenuSubTrigger =
|
|
1410
|
+
var ContextMenuSubTrigger = React12.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
993
1411
|
ContextMenuPrimitive.SubTrigger,
|
|
994
1412
|
{
|
|
995
1413
|
ref,
|
|
@@ -1002,12 +1420,12 @@ var ContextMenuSubTrigger = React10.forwardRef(({ className, inset, children, ..
|
|
|
1002
1420
|
...props,
|
|
1003
1421
|
children: [
|
|
1004
1422
|
children,
|
|
1005
|
-
/* @__PURE__ */ (0,
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1006
1424
|
]
|
|
1007
1425
|
}
|
|
1008
1426
|
));
|
|
1009
1427
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1010
|
-
var ContextMenuSubContent =
|
|
1428
|
+
var ContextMenuSubContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1011
1429
|
ContextMenuPrimitive.SubContent,
|
|
1012
1430
|
{
|
|
1013
1431
|
ref,
|
|
@@ -1017,9 +1435,9 @@ var ContextMenuSubContent = React10.forwardRef(({ className, ...props }, ref) =>
|
|
|
1017
1435
|
}
|
|
1018
1436
|
));
|
|
1019
1437
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1020
|
-
var ContextMenuContent =
|
|
1438
|
+
var ContextMenuContent = React12.forwardRef(({ className, container, ...props }, ref) => {
|
|
1021
1439
|
const portalContainer = usePortalContainer(container);
|
|
1022
|
-
return /* @__PURE__ */ (0,
|
|
1440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1023
1441
|
ContextMenuPrimitive.Content,
|
|
1024
1442
|
{
|
|
1025
1443
|
ref,
|
|
@@ -1030,7 +1448,7 @@ var ContextMenuContent = React10.forwardRef(({ className, container, ...props },
|
|
|
1030
1448
|
) });
|
|
1031
1449
|
});
|
|
1032
1450
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1033
|
-
var ContextMenuItem =
|
|
1451
|
+
var ContextMenuItem = React12.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1034
1452
|
ContextMenuPrimitive.Item,
|
|
1035
1453
|
{
|
|
1036
1454
|
ref,
|
|
@@ -1045,7 +1463,7 @@ var ContextMenuItem = React10.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1045
1463
|
}
|
|
1046
1464
|
));
|
|
1047
1465
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1048
|
-
var ContextMenuCheckboxItem =
|
|
1466
|
+
var ContextMenuCheckboxItem = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1049
1467
|
ContextMenuPrimitive.CheckboxItem,
|
|
1050
1468
|
{
|
|
1051
1469
|
ref,
|
|
@@ -1053,13 +1471,13 @@ var ContextMenuCheckboxItem = React10.forwardRef(({ className, children, ...prop
|
|
|
1053
1471
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1054
1472
|
...props,
|
|
1055
1473
|
children: [
|
|
1056
|
-
/* @__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" }) }) }),
|
|
1057
1475
|
children
|
|
1058
1476
|
]
|
|
1059
1477
|
}
|
|
1060
1478
|
));
|
|
1061
1479
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1062
|
-
var ContextMenuRadioItem =
|
|
1480
|
+
var ContextMenuRadioItem = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1063
1481
|
ContextMenuPrimitive.RadioItem,
|
|
1064
1482
|
{
|
|
1065
1483
|
ref,
|
|
@@ -1067,13 +1485,13 @@ var ContextMenuRadioItem = React10.forwardRef(({ className, children, ...props }
|
|
|
1067
1485
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1068
1486
|
...props,
|
|
1069
1487
|
children: [
|
|
1070
|
-
/* @__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" }) }) }),
|
|
1071
1489
|
children
|
|
1072
1490
|
]
|
|
1073
1491
|
}
|
|
1074
1492
|
));
|
|
1075
1493
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1076
|
-
var ContextMenuLabel =
|
|
1494
|
+
var ContextMenuLabel = React12.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1077
1495
|
ContextMenuPrimitive.Label,
|
|
1078
1496
|
{
|
|
1079
1497
|
ref,
|
|
@@ -1087,7 +1505,7 @@ var ContextMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1087
1505
|
}
|
|
1088
1506
|
));
|
|
1089
1507
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1090
|
-
var ContextMenuSeparator =
|
|
1508
|
+
var ContextMenuSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1091
1509
|
ContextMenuPrimitive.Separator,
|
|
1092
1510
|
{
|
|
1093
1511
|
ref,
|
|
@@ -1100,7 +1518,7 @@ ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
|
1100
1518
|
var ContextMenuShortcut = ({
|
|
1101
1519
|
className,
|
|
1102
1520
|
...props
|
|
1103
|
-
}) => /* @__PURE__ */ (0,
|
|
1521
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1104
1522
|
"span",
|
|
1105
1523
|
{
|
|
1106
1524
|
"data-slot": "context-menu-shortcut",
|
|
@@ -1115,15 +1533,15 @@ var import_react = require("react");
|
|
|
1115
1533
|
|
|
1116
1534
|
// src/popover.tsx
|
|
1117
1535
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1118
|
-
var
|
|
1119
|
-
var
|
|
1536
|
+
var React13 = __toESM(require("react"), 1);
|
|
1537
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1120
1538
|
var Popover = PopoverPrimitive.Root;
|
|
1121
1539
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1122
1540
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1123
|
-
var PopoverContent =
|
|
1541
|
+
var PopoverContent = React13.forwardRef(
|
|
1124
1542
|
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => {
|
|
1125
1543
|
const portalContainer = usePortalContainer(container);
|
|
1126
|
-
return /* @__PURE__ */ (0,
|
|
1544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1127
1545
|
PopoverPrimitive.Content,
|
|
1128
1546
|
{
|
|
1129
1547
|
ref,
|
|
@@ -1147,7 +1565,7 @@ var PopoverContent = React11.forwardRef(
|
|
|
1147
1565
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1148
1566
|
|
|
1149
1567
|
// src/creatable-picker.tsx
|
|
1150
|
-
var
|
|
1568
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1151
1569
|
function article(noun) {
|
|
1152
1570
|
return /^[aeiou]/i.test(noun.trim()) ? `an ${noun}` : `a ${noun}`;
|
|
1153
1571
|
}
|
|
@@ -1222,8 +1640,8 @@ function CreatablePicker({
|
|
|
1222
1640
|
setBusy(false);
|
|
1223
1641
|
}
|
|
1224
1642
|
};
|
|
1225
|
-
return /* @__PURE__ */ (0,
|
|
1226
|
-
/* @__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)(
|
|
1227
1645
|
"button",
|
|
1228
1646
|
{
|
|
1229
1647
|
type: "button",
|
|
@@ -1237,12 +1655,12 @@ function CreatablePicker({
|
|
|
1237
1655
|
triggerClassName
|
|
1238
1656
|
),
|
|
1239
1657
|
children: [
|
|
1240
|
-
/* @__PURE__ */ (0,
|
|
1241
|
-
/* @__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" })
|
|
1242
1660
|
]
|
|
1243
1661
|
}
|
|
1244
1662
|
) }),
|
|
1245
|
-
/* @__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)(
|
|
1246
1664
|
Command,
|
|
1247
1665
|
{
|
|
1248
1666
|
filter: (itemValue, search, keywords) => {
|
|
@@ -1250,7 +1668,7 @@ function CreatablePicker({
|
|
|
1250
1668
|
return haystack.includes(search.toLowerCase()) ? 1 : 0;
|
|
1251
1669
|
},
|
|
1252
1670
|
children: [
|
|
1253
|
-
/* @__PURE__ */ (0,
|
|
1671
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1254
1672
|
CommandInput,
|
|
1255
1673
|
{
|
|
1256
1674
|
ref: inputRef,
|
|
@@ -1262,13 +1680,13 @@ function CreatablePicker({
|
|
|
1262
1680
|
placeholder: searchPlaceholder ?? `Search or add ${article(noun)}\u2026`
|
|
1263
1681
|
}
|
|
1264
1682
|
),
|
|
1265
|
-
/* @__PURE__ */ (0,
|
|
1266
|
-
/* @__PURE__ */ (0,
|
|
1267
|
-
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)(
|
|
1268
1686
|
CommandGroup,
|
|
1269
1687
|
{
|
|
1270
1688
|
...group.heading === void 0 ? {} : { heading: group.heading },
|
|
1271
|
-
children: group.options.map((option) => /* @__PURE__ */ (0,
|
|
1689
|
+
children: group.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1272
1690
|
CommandItem,
|
|
1273
1691
|
{
|
|
1274
1692
|
value: option.label,
|
|
@@ -1279,7 +1697,7 @@ function CreatablePicker({
|
|
|
1279
1697
|
},
|
|
1280
1698
|
className: "gap-2 text-xs",
|
|
1281
1699
|
children: [
|
|
1282
|
-
/* @__PURE__ */ (0,
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1283
1701
|
LucideCheckIcon,
|
|
1284
1702
|
{
|
|
1285
1703
|
className: cn(
|
|
@@ -1288,8 +1706,8 @@ function CreatablePicker({
|
|
|
1288
1706
|
)
|
|
1289
1707
|
}
|
|
1290
1708
|
),
|
|
1291
|
-
/* @__PURE__ */ (0,
|
|
1292
|
-
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
|
|
1293
1711
|
]
|
|
1294
1712
|
},
|
|
1295
1713
|
option.value
|
|
@@ -1298,9 +1716,9 @@ function CreatablePicker({
|
|
|
1298
1716
|
group.heading ?? "__ungrouped__"
|
|
1299
1717
|
))
|
|
1300
1718
|
] }),
|
|
1301
|
-
canCreate ? /* @__PURE__ */ (0,
|
|
1302
|
-
createExtra && typed && !exactMatch ? /* @__PURE__ */ (0,
|
|
1303
|
-
/* @__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)(
|
|
1304
1722
|
"button",
|
|
1305
1723
|
{
|
|
1306
1724
|
type: "button",
|
|
@@ -1308,22 +1726,22 @@ function CreatablePicker({
|
|
|
1308
1726
|
onClick: () => void create(typed),
|
|
1309
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",
|
|
1310
1728
|
children: [
|
|
1311
|
-
busy ? /* @__PURE__ */ (0,
|
|
1312
|
-
/* @__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` })
|
|
1313
1731
|
]
|
|
1314
1732
|
}
|
|
1315
1733
|
),
|
|
1316
|
-
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: [
|
|
1317
1735
|
"Type the name of the ",
|
|
1318
1736
|
noun,
|
|
1319
1737
|
" you want to add \u2014 then this creates it."
|
|
1320
1738
|
] }) : null
|
|
1321
1739
|
] }) : null,
|
|
1322
|
-
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: [
|
|
1323
1741
|
footerActions?.map((action) => {
|
|
1324
1742
|
const Icon2 = action.icon;
|
|
1325
|
-
return /* @__PURE__ */ (0,
|
|
1326
|
-
/* @__PURE__ */ (0,
|
|
1743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1327
1745
|
"button",
|
|
1328
1746
|
{
|
|
1329
1747
|
type: "button",
|
|
@@ -1333,15 +1751,15 @@ function CreatablePicker({
|
|
|
1333
1751
|
},
|
|
1334
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",
|
|
1335
1753
|
children: [
|
|
1336
|
-
Icon2 ? /* @__PURE__ */ (0,
|
|
1337
|
-
/* @__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 })
|
|
1338
1756
|
]
|
|
1339
1757
|
}
|
|
1340
1758
|
),
|
|
1341
|
-
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
|
|
1342
1760
|
] }, action.label);
|
|
1343
1761
|
}),
|
|
1344
|
-
manageAction ? /* @__PURE__ */ (0,
|
|
1762
|
+
manageAction ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1345
1763
|
"a",
|
|
1346
1764
|
{
|
|
1347
1765
|
href: manageAction.href,
|
|
@@ -1350,18 +1768,18 @@ function CreatablePicker({
|
|
|
1350
1768
|
onClick: close,
|
|
1351
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",
|
|
1352
1770
|
children: [
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1354
|
-
/* @__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 })
|
|
1355
1773
|
]
|
|
1356
1774
|
}
|
|
1357
1775
|
) : null
|
|
1358
1776
|
] }) : null,
|
|
1359
|
-
lockedNote ? /* @__PURE__ */ (0,
|
|
1360
|
-
/* @__PURE__ */ (0,
|
|
1361
|
-
/* @__PURE__ */ (0,
|
|
1362
|
-
/* @__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 })
|
|
1363
1781
|
] }),
|
|
1364
|
-
lockedAction ? /* @__PURE__ */ (0,
|
|
1782
|
+
lockedAction ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1365
1783
|
"button",
|
|
1366
1784
|
{
|
|
1367
1785
|
type: "button",
|
|
@@ -1371,8 +1789,8 @@ function CreatablePicker({
|
|
|
1371
1789
|
},
|
|
1372
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",
|
|
1373
1791
|
children: [
|
|
1374
|
-
/* @__PURE__ */ (0,
|
|
1375
|
-
/* @__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 })
|
|
1376
1794
|
]
|
|
1377
1795
|
}
|
|
1378
1796
|
) : null
|
|
@@ -1386,15 +1804,15 @@ function CreatablePicker({
|
|
|
1386
1804
|
// src/dialog.tsx
|
|
1387
1805
|
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1388
1806
|
var VisuallyHidden2 = __toESM(require("@radix-ui/react-visually-hidden"), 1);
|
|
1389
|
-
var
|
|
1390
|
-
var
|
|
1391
|
-
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");
|
|
1392
1810
|
var Dialog = ({
|
|
1393
1811
|
children,
|
|
1394
1812
|
...props
|
|
1395
1813
|
}) => {
|
|
1396
1814
|
const modal = props.modal ?? true;
|
|
1397
|
-
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 }) });
|
|
1398
1816
|
};
|
|
1399
1817
|
Dialog.displayName = "Dialog";
|
|
1400
1818
|
var DialogTrigger = DialogPrimitive2.Trigger;
|
|
@@ -1404,12 +1822,12 @@ var DialogPortal = ({
|
|
|
1404
1822
|
...props
|
|
1405
1823
|
}) => {
|
|
1406
1824
|
const resolved = usePortalContainer(container);
|
|
1407
|
-
return /* @__PURE__ */ (0,
|
|
1825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
|
|
1408
1826
|
};
|
|
1409
1827
|
DialogPortal.displayName = "DialogPortal";
|
|
1410
|
-
var DialogContainerContext =
|
|
1411
|
-
var useDialogContainer = () =>
|
|
1412
|
-
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)(
|
|
1413
1831
|
DialogPrimitive2.Overlay,
|
|
1414
1832
|
{
|
|
1415
1833
|
ref,
|
|
@@ -1424,9 +1842,9 @@ var DialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1424
1842
|
}
|
|
1425
1843
|
));
|
|
1426
1844
|
DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
|
|
1427
|
-
var DialogContentPrimitive =
|
|
1845
|
+
var DialogContentPrimitive = React14.forwardRef((props, ref) => {
|
|
1428
1846
|
const isModal = useRadixDialogModal();
|
|
1429
|
-
return /* @__PURE__ */ (0,
|
|
1847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1430
1848
|
DialogPrimitive2.Content,
|
|
1431
1849
|
{
|
|
1432
1850
|
...props,
|
|
@@ -1439,7 +1857,7 @@ DialogContentPrimitive.displayName = "DialogContentPrimitive";
|
|
|
1439
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";
|
|
1440
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";
|
|
1441
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";
|
|
1442
|
-
var DialogContent =
|
|
1860
|
+
var DialogContent = React14.forwardRef(
|
|
1443
1861
|
({
|
|
1444
1862
|
className,
|
|
1445
1863
|
children,
|
|
@@ -1452,10 +1870,10 @@ var DialogContent = React12.forwardRef(
|
|
|
1452
1870
|
const isModal = useRadixDialogModal();
|
|
1453
1871
|
const injectedContainer = usePortalContainer(container);
|
|
1454
1872
|
const asSheet = mobileSheet && isMobile;
|
|
1455
|
-
const [containerEl, setContainerEl] =
|
|
1873
|
+
const [containerEl, setContainerEl] = React14.useState(
|
|
1456
1874
|
null
|
|
1457
1875
|
);
|
|
1458
|
-
const mergedRef =
|
|
1876
|
+
const mergedRef = React14.useCallback(
|
|
1459
1877
|
(node) => {
|
|
1460
1878
|
setContainerEl(node);
|
|
1461
1879
|
if (typeof ref === "function") ref(node);
|
|
@@ -1464,11 +1882,11 @@ var DialogContent = React12.forwardRef(
|
|
|
1464
1882
|
},
|
|
1465
1883
|
[ref]
|
|
1466
1884
|
);
|
|
1467
|
-
const hasTitle = (0,
|
|
1468
|
-
const hasDescription = (0,
|
|
1469
|
-
return /* @__PURE__ */ (0,
|
|
1470
|
-
isModal ? /* @__PURE__ */ (0,
|
|
1471
|
-
/* @__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)(
|
|
1472
1890
|
DialogContentPrimitive,
|
|
1473
1891
|
{
|
|
1474
1892
|
ref: mergedRef,
|
|
@@ -1486,23 +1904,23 @@ var DialogContent = React12.forwardRef(
|
|
|
1486
1904
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
1487
1905
|
...props,
|
|
1488
1906
|
children: [
|
|
1489
|
-
hasTitle ? null : /* @__PURE__ */ (0,
|
|
1490
|
-
/* @__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)(
|
|
1491
1909
|
PortalContainerProvider,
|
|
1492
1910
|
{
|
|
1493
1911
|
container: containerEl ?? injectedContainer ?? null,
|
|
1494
1912
|
children
|
|
1495
1913
|
}
|
|
1496
1914
|
) }),
|
|
1497
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
1915
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1498
1916
|
DialogPrimitive2.Close,
|
|
1499
1917
|
{
|
|
1500
1918
|
"data-slot": "dialog-close",
|
|
1501
1919
|
"aria-label": "Close",
|
|
1502
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",
|
|
1503
1921
|
children: [
|
|
1504
|
-
/* @__PURE__ */ (0,
|
|
1505
|
-
/* @__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" })
|
|
1506
1924
|
]
|
|
1507
1925
|
}
|
|
1508
1926
|
) : null
|
|
@@ -1516,7 +1934,7 @@ DialogContent.displayName = DialogPrimitive2.Content.displayName;
|
|
|
1516
1934
|
var DialogHeader = ({
|
|
1517
1935
|
className,
|
|
1518
1936
|
...props
|
|
1519
|
-
}) => /* @__PURE__ */ (0,
|
|
1937
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1520
1938
|
"div",
|
|
1521
1939
|
{
|
|
1522
1940
|
"data-slot": "dialog-header",
|
|
@@ -1533,7 +1951,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
1533
1951
|
var DialogFooter = ({
|
|
1534
1952
|
className,
|
|
1535
1953
|
...props
|
|
1536
|
-
}) => /* @__PURE__ */ (0,
|
|
1954
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1537
1955
|
"div",
|
|
1538
1956
|
{
|
|
1539
1957
|
"data-slot": "dialog-footer",
|
|
@@ -1547,7 +1965,7 @@ var DialogFooter = ({
|
|
|
1547
1965
|
}
|
|
1548
1966
|
);
|
|
1549
1967
|
DialogFooter.displayName = "DialogFooter";
|
|
1550
|
-
var DialogTitle =
|
|
1968
|
+
var DialogTitle = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1551
1969
|
DialogPrimitive2.Title,
|
|
1552
1970
|
{
|
|
1553
1971
|
ref,
|
|
@@ -1557,7 +1975,7 @@ var DialogTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1557
1975
|
}
|
|
1558
1976
|
));
|
|
1559
1977
|
DialogTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
1560
|
-
var DialogDescription =
|
|
1978
|
+
var DialogDescription = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1561
1979
|
DialogPrimitive2.Description,
|
|
1562
1980
|
{
|
|
1563
1981
|
ref,
|
|
@@ -1570,8 +1988,8 @@ DialogDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
|
1570
1988
|
|
|
1571
1989
|
// src/dropdown-menu.tsx
|
|
1572
1990
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1573
|
-
var
|
|
1574
|
-
var
|
|
1991
|
+
var React15 = __toESM(require("react"), 1);
|
|
1992
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1575
1993
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1576
1994
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1577
1995
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
@@ -1582,7 +2000,7 @@ var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-men
|
|
|
1582
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";
|
|
1583
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";
|
|
1584
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";
|
|
1585
|
-
var DropdownMenuSubTrigger =
|
|
2003
|
+
var DropdownMenuSubTrigger = React15.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1586
2004
|
DropdownMenuPrimitive.SubTrigger,
|
|
1587
2005
|
{
|
|
1588
2006
|
ref,
|
|
@@ -1595,12 +2013,12 @@ var DropdownMenuSubTrigger = React13.forwardRef(({ className, inset, children, .
|
|
|
1595
2013
|
...props,
|
|
1596
2014
|
children: [
|
|
1597
2015
|
children,
|
|
1598
|
-
/* @__PURE__ */ (0,
|
|
2016
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1599
2017
|
]
|
|
1600
2018
|
}
|
|
1601
2019
|
));
|
|
1602
2020
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1603
|
-
var DropdownMenuSubContent =
|
|
2021
|
+
var DropdownMenuSubContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1604
2022
|
DropdownMenuPrimitive.SubContent,
|
|
1605
2023
|
{
|
|
1606
2024
|
ref,
|
|
@@ -1610,9 +2028,9 @@ var DropdownMenuSubContent = React13.forwardRef(({ className, ...props }, ref) =
|
|
|
1610
2028
|
}
|
|
1611
2029
|
));
|
|
1612
2030
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1613
|
-
var DropdownMenuContent =
|
|
2031
|
+
var DropdownMenuContent = React15.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
1614
2032
|
const portalContainer = usePortalContainer(container);
|
|
1615
|
-
return /* @__PURE__ */ (0,
|
|
2033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1616
2034
|
DropdownMenuPrimitive.Content,
|
|
1617
2035
|
{
|
|
1618
2036
|
ref,
|
|
@@ -1629,7 +2047,7 @@ var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, conta
|
|
|
1629
2047
|
) });
|
|
1630
2048
|
});
|
|
1631
2049
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1632
|
-
var DropdownMenuItem =
|
|
2050
|
+
var DropdownMenuItem = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1633
2051
|
DropdownMenuPrimitive.Item,
|
|
1634
2052
|
{
|
|
1635
2053
|
ref,
|
|
@@ -1639,7 +2057,7 @@ var DropdownMenuItem = React13.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1639
2057
|
}
|
|
1640
2058
|
));
|
|
1641
2059
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1642
|
-
var DropdownMenuCheckboxItem =
|
|
2060
|
+
var DropdownMenuCheckboxItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1643
2061
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1644
2062
|
{
|
|
1645
2063
|
ref,
|
|
@@ -1647,13 +2065,13 @@ var DropdownMenuCheckboxItem = React13.forwardRef(({ className, children, ...pro
|
|
|
1647
2065
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
1648
2066
|
...props,
|
|
1649
2067
|
children: [
|
|
1650
|
-
/* @__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" }) }) }),
|
|
1651
2069
|
children
|
|
1652
2070
|
]
|
|
1653
2071
|
}
|
|
1654
2072
|
));
|
|
1655
2073
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1656
|
-
var DropdownMenuRadioItem =
|
|
2074
|
+
var DropdownMenuRadioItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1657
2075
|
DropdownMenuPrimitive.RadioItem,
|
|
1658
2076
|
{
|
|
1659
2077
|
ref,
|
|
@@ -1661,13 +2079,13 @@ var DropdownMenuRadioItem = React13.forwardRef(({ className, children, ...props
|
|
|
1661
2079
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
1662
2080
|
...props,
|
|
1663
2081
|
children: [
|
|
1664
|
-
/* @__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" }) }) }),
|
|
1665
2083
|
children
|
|
1666
2084
|
]
|
|
1667
2085
|
}
|
|
1668
2086
|
));
|
|
1669
2087
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1670
|
-
var DropdownMenuLabel =
|
|
2088
|
+
var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1671
2089
|
DropdownMenuPrimitive.Label,
|
|
1672
2090
|
{
|
|
1673
2091
|
ref,
|
|
@@ -1677,7 +2095,7 @@ var DropdownMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1677
2095
|
}
|
|
1678
2096
|
));
|
|
1679
2097
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1680
|
-
var DropdownMenuSeparator =
|
|
2098
|
+
var DropdownMenuSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1681
2099
|
DropdownMenuPrimitive.Separator,
|
|
1682
2100
|
{
|
|
1683
2101
|
ref,
|
|
@@ -1690,7 +2108,7 @@ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
|
1690
2108
|
var DropdownMenuShortcut = ({
|
|
1691
2109
|
className,
|
|
1692
2110
|
...props
|
|
1693
|
-
}) => /* @__PURE__ */ (0,
|
|
2111
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1694
2112
|
"span",
|
|
1695
2113
|
{
|
|
1696
2114
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -1702,7 +2120,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
1702
2120
|
|
|
1703
2121
|
// src/editable-label.tsx
|
|
1704
2122
|
var import_react2 = require("react");
|
|
1705
|
-
var
|
|
2123
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1706
2124
|
function EditableLabel({
|
|
1707
2125
|
value,
|
|
1708
2126
|
onCommit,
|
|
@@ -1809,8 +2227,8 @@ function EditableLabel({
|
|
|
1809
2227
|
setEditing
|
|
1810
2228
|
]);
|
|
1811
2229
|
if (editing) {
|
|
1812
|
-
return /* @__PURE__ */ (0,
|
|
1813
|
-
/* @__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)(
|
|
1814
2232
|
"input",
|
|
1815
2233
|
{
|
|
1816
2234
|
ref: inputRef,
|
|
@@ -1850,12 +2268,12 @@ function EditableLabel({
|
|
|
1850
2268
|
)
|
|
1851
2269
|
}
|
|
1852
2270
|
),
|
|
1853
|
-
busy && /* @__PURE__ */ (0,
|
|
1854
|
-
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 })
|
|
1855
2273
|
] });
|
|
1856
2274
|
}
|
|
1857
2275
|
if (controlled) return null;
|
|
1858
|
-
return /* @__PURE__ */ (0,
|
|
2276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1859
2277
|
"button",
|
|
1860
2278
|
{
|
|
1861
2279
|
type: "button",
|
|
@@ -1889,8 +2307,8 @@ function EditableLabel({
|
|
|
1889
2307
|
}
|
|
1890
2308
|
|
|
1891
2309
|
// src/input.tsx
|
|
1892
|
-
var
|
|
1893
|
-
var
|
|
2310
|
+
var React16 = __toESM(require("react"), 1);
|
|
2311
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1894
2312
|
var getVariantStyles = (variant = "default") => {
|
|
1895
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
|
|
1896
2314
|
file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground
|
|
@@ -1918,9 +2336,9 @@ var getVariantStyles = (variant = "default") => {
|
|
|
1918
2336
|
return baseStyles;
|
|
1919
2337
|
}
|
|
1920
2338
|
};
|
|
1921
|
-
var Input =
|
|
2339
|
+
var Input = React16.forwardRef(
|
|
1922
2340
|
({ className, type, variant = "default", ...props }, ref) => {
|
|
1923
|
-
return /* @__PURE__ */ (0,
|
|
2341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1924
2342
|
"input",
|
|
1925
2343
|
{
|
|
1926
2344
|
type,
|
|
@@ -1932,7 +2350,7 @@ var Input = React14.forwardRef(
|
|
|
1932
2350
|
}
|
|
1933
2351
|
);
|
|
1934
2352
|
Input.displayName = "Input";
|
|
1935
|
-
var EnterInput =
|
|
2353
|
+
var EnterInput = React16.forwardRef(
|
|
1936
2354
|
({ onEnter, ...props }, ref) => {
|
|
1937
2355
|
const handleKeyDown = (e) => {
|
|
1938
2356
|
if (e.key === "Enter" && onEnter) {
|
|
@@ -1940,7 +2358,7 @@ var EnterInput = React14.forwardRef(
|
|
|
1940
2358
|
onEnter();
|
|
1941
2359
|
}
|
|
1942
2360
|
};
|
|
1943
|
-
return /* @__PURE__ */ (0,
|
|
2361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1944
2362
|
Input,
|
|
1945
2363
|
{
|
|
1946
2364
|
...props,
|
|
@@ -1956,11 +2374,11 @@ var EnterInput = React14.forwardRef(
|
|
|
1956
2374
|
}
|
|
1957
2375
|
);
|
|
1958
2376
|
EnterInput.displayName = "EnterInput";
|
|
1959
|
-
var BasicInput =
|
|
2377
|
+
var BasicInput = React16.forwardRef(
|
|
1960
2378
|
// `variant` is accepted (prop-compatible with Input) but intentionally
|
|
1961
2379
|
// unused — and destructured so it never leaks onto the DOM element.
|
|
1962
2380
|
({ className, type, variant: _variant = "default", ...props }, ref) => {
|
|
1963
|
-
return /* @__PURE__ */ (0,
|
|
2381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1964
2382
|
"input",
|
|
1965
2383
|
{
|
|
1966
2384
|
type,
|
|
@@ -1975,10 +2393,10 @@ var BasicInput = React14.forwardRef(
|
|
|
1975
2393
|
}
|
|
1976
2394
|
);
|
|
1977
2395
|
BasicInput.displayName = "BasicInput";
|
|
1978
|
-
var InputWithPrefix =
|
|
1979
|
-
return /* @__PURE__ */ (0,
|
|
1980
|
-
prefix && /* @__PURE__ */ (0,
|
|
1981
|
-
/* @__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)(
|
|
1982
2400
|
Input,
|
|
1983
2401
|
{
|
|
1984
2402
|
ref,
|
|
@@ -1992,9 +2410,9 @@ InputWithPrefix.displayName = "InputWithPrefix";
|
|
|
1992
2410
|
|
|
1993
2411
|
// src/label.tsx
|
|
1994
2412
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
1995
|
-
var
|
|
1996
|
-
var
|
|
1997
|
-
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)(
|
|
1998
2416
|
LabelPrimitive.Root,
|
|
1999
2417
|
{
|
|
2000
2418
|
ref,
|
|
@@ -2009,7 +2427,7 @@ Label3.displayName = LabelPrimitive.Root.displayName;
|
|
|
2009
2427
|
|
|
2010
2428
|
// src/overflow-toolbar.tsx
|
|
2011
2429
|
var import_react3 = require("react");
|
|
2012
|
-
var
|
|
2430
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2013
2431
|
var GAP_PX = 6;
|
|
2014
2432
|
var TONE = {
|
|
2015
2433
|
default: "border border-border bg-background hover:bg-accent text-foreground",
|
|
@@ -2031,16 +2449,16 @@ function ToolbarButton({
|
|
|
2031
2449
|
action.hideLabel && !action.running ? "w-7 justify-center px-0" : "px-2",
|
|
2032
2450
|
TONE[tone]
|
|
2033
2451
|
);
|
|
2034
|
-
const inner = /* @__PURE__ */ (0,
|
|
2035
|
-
/* @__PURE__ */ (0,
|
|
2452
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
2453
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2036
2454
|
Icon2,
|
|
2037
2455
|
{
|
|
2038
2456
|
className: cn("w-3.5 h-3.5 shrink-0", action.running && "animate-spin")
|
|
2039
2457
|
}
|
|
2040
2458
|
),
|
|
2041
|
-
showLabel && /* @__PURE__ */ (0,
|
|
2459
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: text })
|
|
2042
2460
|
] });
|
|
2043
|
-
const control = action.href && !action.disabled ? /* @__PURE__ */ (0,
|
|
2461
|
+
const control = action.href && !action.disabled ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2044
2462
|
"a",
|
|
2045
2463
|
{
|
|
2046
2464
|
href: action.href,
|
|
@@ -2050,7 +2468,7 @@ function ToolbarButton({
|
|
|
2050
2468
|
"aria-label": action.label,
|
|
2051
2469
|
children: inner
|
|
2052
2470
|
}
|
|
2053
|
-
) : /* @__PURE__ */ (0,
|
|
2471
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2054
2472
|
"button",
|
|
2055
2473
|
{
|
|
2056
2474
|
type: "button",
|
|
@@ -2062,12 +2480,12 @@ function ToolbarButton({
|
|
|
2062
2480
|
}
|
|
2063
2481
|
);
|
|
2064
2482
|
if (enableTooltip && action.hideLabel && renderTooltip) {
|
|
2065
|
-
return /* @__PURE__ */ (0,
|
|
2483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: renderTooltip(control, action.label) });
|
|
2066
2484
|
}
|
|
2067
2485
|
return control;
|
|
2068
2486
|
}
|
|
2069
2487
|
function OverflowTrigger({ ariaLabel }) {
|
|
2070
|
-
return /* @__PURE__ */ (0,
|
|
2488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2071
2489
|
"button",
|
|
2072
2490
|
{
|
|
2073
2491
|
type: "button",
|
|
@@ -2078,7 +2496,7 @@ function OverflowTrigger({ ariaLabel }) {
|
|
|
2078
2496
|
"inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors",
|
|
2079
2497
|
"border border-border bg-background hover:bg-accent text-foreground"
|
|
2080
2498
|
),
|
|
2081
|
-
children: /* @__PURE__ */ (0,
|
|
2499
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MoreHorizontalIcon, { className: "w-3.5 h-3.5" })
|
|
2082
2500
|
}
|
|
2083
2501
|
);
|
|
2084
2502
|
}
|
|
@@ -2138,22 +2556,22 @@ function OverflowToolbar({
|
|
|
2138
2556
|
}, [signature, leading != null]);
|
|
2139
2557
|
const shown = visibleActions.slice(0, visibleCount);
|
|
2140
2558
|
const hidden = visibleActions.slice(visibleCount);
|
|
2141
|
-
return /* @__PURE__ */ (0,
|
|
2142
|
-
/* @__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)(
|
|
2143
2561
|
"div",
|
|
2144
2562
|
{
|
|
2145
2563
|
ref: ghostRef,
|
|
2146
2564
|
"aria-hidden": true,
|
|
2147
2565
|
className: "pointer-events-none absolute left-0 top-0 flex items-center gap-1.5 opacity-0",
|
|
2148
2566
|
children: [
|
|
2149
|
-
visibleActions.map((a) => /* @__PURE__ */ (0,
|
|
2150
|
-
/* @__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 })
|
|
2151
2569
|
]
|
|
2152
2570
|
}
|
|
2153
2571
|
),
|
|
2154
|
-
/* @__PURE__ */ (0,
|
|
2155
|
-
leading != null && /* @__PURE__ */ (0,
|
|
2156
|
-
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)(
|
|
2157
2575
|
ToolbarButton,
|
|
2158
2576
|
{
|
|
2159
2577
|
action: a,
|
|
@@ -2164,7 +2582,7 @@ function OverflowToolbar({
|
|
|
2164
2582
|
)),
|
|
2165
2583
|
hidden.length > 0 && renderOverflowMenu({
|
|
2166
2584
|
actions: hidden,
|
|
2167
|
-
trigger: /* @__PURE__ */ (0,
|
|
2585
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
|
|
2168
2586
|
})
|
|
2169
2587
|
] })
|
|
2170
2588
|
] });
|
|
@@ -2172,20 +2590,20 @@ function OverflowToolbar({
|
|
|
2172
2590
|
|
|
2173
2591
|
// src/progress.tsx
|
|
2174
2592
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
2175
|
-
var
|
|
2176
|
-
var
|
|
2593
|
+
var React19 = __toESM(require("react"), 1);
|
|
2594
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2177
2595
|
var PROGRESS_TONES = {
|
|
2178
2596
|
default: "bg-primary",
|
|
2179
2597
|
success: "bg-success",
|
|
2180
2598
|
warning: "bg-warning",
|
|
2181
2599
|
destructive: "bg-destructive"
|
|
2182
2600
|
};
|
|
2183
|
-
var Progress =
|
|
2601
|
+
var Progress = React19.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
|
|
2184
2602
|
const { value, max } = props;
|
|
2185
2603
|
const ceiling = max ?? 100;
|
|
2186
2604
|
const isIndeterminate = value === null || value === void 0;
|
|
2187
2605
|
const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / ceiling * 100));
|
|
2188
|
-
return /* @__PURE__ */ (0,
|
|
2606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2189
2607
|
ProgressPrimitive.Root,
|
|
2190
2608
|
{
|
|
2191
2609
|
ref,
|
|
@@ -2195,7 +2613,7 @@ var Progress = React17.forwardRef(({ className, tone = "default", indicatorClass
|
|
|
2195
2613
|
className
|
|
2196
2614
|
),
|
|
2197
2615
|
...props,
|
|
2198
|
-
children: /* @__PURE__ */ (0,
|
|
2616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2199
2617
|
ProgressPrimitive.Indicator,
|
|
2200
2618
|
{
|
|
2201
2619
|
"data-slot": "progress-indicator",
|
|
@@ -2215,9 +2633,9 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
|
2215
2633
|
|
|
2216
2634
|
// src/scroll-area.tsx
|
|
2217
2635
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
2218
|
-
var
|
|
2219
|
-
var
|
|
2220
|
-
var ScrollArea =
|
|
2636
|
+
var React20 = __toESM(require("react"), 1);
|
|
2637
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2638
|
+
var ScrollArea = React20.forwardRef(
|
|
2221
2639
|
({
|
|
2222
2640
|
className,
|
|
2223
2641
|
children,
|
|
@@ -2226,7 +2644,7 @@ var ScrollArea = React18.forwardRef(
|
|
|
2226
2644
|
scrollBarClassName,
|
|
2227
2645
|
orientation = "vertical",
|
|
2228
2646
|
...props
|
|
2229
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
2647
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2230
2648
|
ScrollAreaPrimitive.Root,
|
|
2231
2649
|
{
|
|
2232
2650
|
ref,
|
|
@@ -2234,7 +2652,7 @@ var ScrollArea = React18.forwardRef(
|
|
|
2234
2652
|
className: cn("relative overflow-hidden", className),
|
|
2235
2653
|
...props,
|
|
2236
2654
|
children: [
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2238
2656
|
ScrollAreaPrimitive.Viewport,
|
|
2239
2657
|
{
|
|
2240
2658
|
ref: viewportRef,
|
|
@@ -2243,14 +2661,14 @@ var ScrollArea = React18.forwardRef(
|
|
|
2243
2661
|
children
|
|
2244
2662
|
}
|
|
2245
2663
|
),
|
|
2246
|
-
/* @__PURE__ */ (0,
|
|
2247
|
-
/* @__PURE__ */ (0,
|
|
2664
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ScrollBar, { orientation, className: scrollBarClassName }),
|
|
2665
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
2248
2666
|
]
|
|
2249
2667
|
}
|
|
2250
2668
|
)
|
|
2251
2669
|
);
|
|
2252
2670
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2253
|
-
var ScrollBar =
|
|
2671
|
+
var ScrollBar = React20.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2254
2672
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2255
2673
|
{
|
|
2256
2674
|
ref,
|
|
@@ -2263,7 +2681,7 @@ var ScrollBar = React18.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2263
2681
|
className
|
|
2264
2682
|
),
|
|
2265
2683
|
...props,
|
|
2266
|
-
children: /* @__PURE__ */ (0,
|
|
2684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2267
2685
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2268
2686
|
{
|
|
2269
2687
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2275,7 +2693,7 @@ var ScrollBar = React18.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2275
2693
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2276
2694
|
|
|
2277
2695
|
// src/score-ring.tsx
|
|
2278
|
-
var
|
|
2696
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2279
2697
|
var DEFAULT_SCORE_THRESHOLDS = {
|
|
2280
2698
|
good: 75,
|
|
2281
2699
|
warning: 50
|
|
@@ -2306,7 +2724,7 @@ function ScoreRing({
|
|
|
2306
2724
|
const circumference = 2 * Math.PI * radius;
|
|
2307
2725
|
const boundedPct = pct === null ? 0 : Math.max(0, Math.min(100, pct));
|
|
2308
2726
|
const dashOffset = circumference * (1 - boundedPct / 100);
|
|
2309
|
-
return /* @__PURE__ */ (0,
|
|
2727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2310
2728
|
"div",
|
|
2311
2729
|
{
|
|
2312
2730
|
className: cn(
|
|
@@ -2317,8 +2735,8 @@ function ScoreRing({
|
|
|
2317
2735
|
role: "img",
|
|
2318
2736
|
"aria-label": `${label ?? "Score"}: ${pct === null ? "not available" : `${pct} out of 100`}`,
|
|
2319
2737
|
children: [
|
|
2320
|
-
/* @__PURE__ */ (0,
|
|
2321
|
-
/* @__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)(
|
|
2322
2740
|
"circle",
|
|
2323
2741
|
{
|
|
2324
2742
|
cx: "50",
|
|
@@ -2329,7 +2747,7 @@ function ScoreRing({
|
|
|
2329
2747
|
fill: "none"
|
|
2330
2748
|
}
|
|
2331
2749
|
),
|
|
2332
|
-
pct !== null ? /* @__PURE__ */ (0,
|
|
2750
|
+
pct !== null ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2333
2751
|
"circle",
|
|
2334
2752
|
{
|
|
2335
2753
|
cx: "50",
|
|
@@ -2348,8 +2766,8 @@ function ScoreRing({
|
|
|
2348
2766
|
}
|
|
2349
2767
|
) : null
|
|
2350
2768
|
] }),
|
|
2351
|
-
/* @__PURE__ */ (0,
|
|
2352
|
-
/* @__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)(
|
|
2353
2771
|
"span",
|
|
2354
2772
|
{
|
|
2355
2773
|
className: cn(
|
|
@@ -2359,7 +2777,7 @@ function ScoreRing({
|
|
|
2359
2777
|
children: pct === null ? "\u2014" : `${pct}${suffix}`
|
|
2360
2778
|
}
|
|
2361
2779
|
),
|
|
2362
|
-
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
|
|
2363
2781
|
] })
|
|
2364
2782
|
]
|
|
2365
2783
|
}
|
|
@@ -2367,7 +2785,7 @@ function ScoreRing({
|
|
|
2367
2785
|
}
|
|
2368
2786
|
|
|
2369
2787
|
// src/segmented-control.tsx
|
|
2370
|
-
var
|
|
2788
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2371
2789
|
function SegmentedControl({
|
|
2372
2790
|
value,
|
|
2373
2791
|
onValueChange,
|
|
@@ -2382,7 +2800,7 @@ function SegmentedControl({
|
|
|
2382
2800
|
md: "h-9 text-sm",
|
|
2383
2801
|
lg: "h-10 text-base"
|
|
2384
2802
|
};
|
|
2385
|
-
return /* @__PURE__ */ (0,
|
|
2803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2386
2804
|
"div",
|
|
2387
2805
|
{
|
|
2388
2806
|
className: cn(
|
|
@@ -2393,7 +2811,7 @@ function SegmentedControl({
|
|
|
2393
2811
|
role: "tablist",
|
|
2394
2812
|
children: data.map((option) => {
|
|
2395
2813
|
const isActive = value === option.value;
|
|
2396
|
-
return /* @__PURE__ */ (0,
|
|
2814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2397
2815
|
"button",
|
|
2398
2816
|
{
|
|
2399
2817
|
type: "button",
|
|
@@ -2419,13 +2837,13 @@ function SegmentedControl({
|
|
|
2419
2837
|
|
|
2420
2838
|
// src/select.tsx
|
|
2421
2839
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
2422
|
-
var
|
|
2423
|
-
var
|
|
2424
|
-
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");
|
|
2425
2843
|
var Select = SelectPrimitive.Root;
|
|
2426
2844
|
var SelectGroup = SelectPrimitive.Group;
|
|
2427
2845
|
var SelectValue = SelectPrimitive.Value;
|
|
2428
|
-
var selectTriggerVariants = (0,
|
|
2846
|
+
var selectTriggerVariants = (0, import_class_variance_authority4.cva)(
|
|
2429
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",
|
|
2430
2848
|
{
|
|
2431
2849
|
variants: {
|
|
@@ -2440,7 +2858,7 @@ var selectTriggerVariants = (0, import_class_variance_authority3.cva)(
|
|
|
2440
2858
|
}
|
|
2441
2859
|
}
|
|
2442
2860
|
);
|
|
2443
|
-
var SelectTrigger =
|
|
2861
|
+
var SelectTrigger = React21.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2444
2862
|
SelectPrimitive.Trigger,
|
|
2445
2863
|
{
|
|
2446
2864
|
ref,
|
|
@@ -2448,12 +2866,12 @@ var SelectTrigger = React19.forwardRef(({ className, children, hideArrow = false
|
|
|
2448
2866
|
...props,
|
|
2449
2867
|
children: [
|
|
2450
2868
|
children,
|
|
2451
|
-
!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" }) })
|
|
2452
2870
|
]
|
|
2453
2871
|
}
|
|
2454
2872
|
));
|
|
2455
2873
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2456
|
-
var SelectScrollUpButton =
|
|
2874
|
+
var SelectScrollUpButton = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2457
2875
|
SelectPrimitive.ScrollUpButton,
|
|
2458
2876
|
{
|
|
2459
2877
|
ref,
|
|
@@ -2462,11 +2880,11 @@ var SelectScrollUpButton = React19.forwardRef(({ className, ...props }, ref) =>
|
|
|
2462
2880
|
className
|
|
2463
2881
|
),
|
|
2464
2882
|
...props,
|
|
2465
|
-
children: /* @__PURE__ */ (0,
|
|
2883
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixChevronUpIcon, {})
|
|
2466
2884
|
}
|
|
2467
2885
|
));
|
|
2468
2886
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2469
|
-
var SelectScrollDownButton =
|
|
2887
|
+
var SelectScrollDownButton = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2470
2888
|
SelectPrimitive.ScrollDownButton,
|
|
2471
2889
|
{
|
|
2472
2890
|
ref,
|
|
@@ -2475,13 +2893,13 @@ var SelectScrollDownButton = React19.forwardRef(({ className, ...props }, ref) =
|
|
|
2475
2893
|
className
|
|
2476
2894
|
),
|
|
2477
2895
|
...props,
|
|
2478
|
-
children: /* @__PURE__ */ (0,
|
|
2896
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixChevronDownIcon, {})
|
|
2479
2897
|
}
|
|
2480
2898
|
));
|
|
2481
2899
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2482
|
-
var SelectContent =
|
|
2900
|
+
var SelectContent = React21.forwardRef(({ className, children, position = "popper", container, ...props }, ref) => {
|
|
2483
2901
|
const portalContainer = usePortalContainer(container);
|
|
2484
|
-
return /* @__PURE__ */ (0,
|
|
2902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2485
2903
|
SelectPrimitive.Content,
|
|
2486
2904
|
{
|
|
2487
2905
|
ref,
|
|
@@ -2493,8 +2911,8 @@ var SelectContent = React19.forwardRef(({ className, children, position = "poppe
|
|
|
2493
2911
|
position,
|
|
2494
2912
|
...props,
|
|
2495
2913
|
children: [
|
|
2496
|
-
/* @__PURE__ */ (0,
|
|
2497
|
-
/* @__PURE__ */ (0,
|
|
2914
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectScrollUpButton, {}),
|
|
2915
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2498
2916
|
SelectPrimitive.Viewport,
|
|
2499
2917
|
{
|
|
2500
2918
|
className: cn(
|
|
@@ -2504,13 +2922,13 @@ var SelectContent = React19.forwardRef(({ className, children, position = "poppe
|
|
|
2504
2922
|
children
|
|
2505
2923
|
}
|
|
2506
2924
|
),
|
|
2507
|
-
/* @__PURE__ */ (0,
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectScrollDownButton, {})
|
|
2508
2926
|
]
|
|
2509
2927
|
}
|
|
2510
2928
|
) });
|
|
2511
2929
|
});
|
|
2512
2930
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2513
|
-
var SelectLabel =
|
|
2931
|
+
var SelectLabel = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2514
2932
|
SelectPrimitive.Label,
|
|
2515
2933
|
{
|
|
2516
2934
|
ref,
|
|
@@ -2519,7 +2937,7 @@ var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2519
2937
|
}
|
|
2520
2938
|
));
|
|
2521
2939
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2522
|
-
var SelectItem =
|
|
2940
|
+
var SelectItem = React21.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2523
2941
|
SelectPrimitive.Item,
|
|
2524
2942
|
{
|
|
2525
2943
|
ref,
|
|
@@ -2530,14 +2948,14 @@ var SelectItem = React19.forwardRef(({ className, children, description, ...prop
|
|
|
2530
2948
|
),
|
|
2531
2949
|
...props,
|
|
2532
2950
|
children: [
|
|
2533
|
-
/* @__PURE__ */ (0,
|
|
2534
|
-
/* @__PURE__ */ (0,
|
|
2535
|
-
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
|
|
2536
2954
|
]
|
|
2537
2955
|
}
|
|
2538
2956
|
));
|
|
2539
2957
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2540
|
-
var SelectSeparator =
|
|
2958
|
+
var SelectSeparator = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2541
2959
|
SelectPrimitive.Separator,
|
|
2542
2960
|
{
|
|
2543
2961
|
ref,
|
|
@@ -2549,9 +2967,9 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
2549
2967
|
|
|
2550
2968
|
// src/separator.tsx
|
|
2551
2969
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
2552
|
-
var
|
|
2553
|
-
var
|
|
2554
|
-
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)(
|
|
2555
2973
|
SeparatorPrimitive.Root,
|
|
2556
2974
|
{
|
|
2557
2975
|
ref,
|
|
@@ -2569,13 +2987,13 @@ Separator4.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
2569
2987
|
|
|
2570
2988
|
// src/sheet.tsx
|
|
2571
2989
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
2572
|
-
var
|
|
2573
|
-
var
|
|
2574
|
-
var
|
|
2575
|
-
var
|
|
2576
|
-
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) => {
|
|
2577
2995
|
const isModal = useRadixDialogModal();
|
|
2578
|
-
return /* @__PURE__ */ (0,
|
|
2996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2579
2997
|
SheetPrimitive.Content,
|
|
2580
2998
|
{
|
|
2581
2999
|
...props,
|
|
@@ -2585,15 +3003,15 @@ var SheetContentBase = React21.forwardRef(({ ...props }, ref) => {
|
|
|
2585
3003
|
);
|
|
2586
3004
|
});
|
|
2587
3005
|
SheetContentBase.displayName = "SheetContentBase";
|
|
2588
|
-
var Sheet =
|
|
3006
|
+
var Sheet = React23.forwardRef(({ children, ...props }, _ref) => {
|
|
2589
3007
|
const modal = props.modal ?? true;
|
|
2590
|
-
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 }) });
|
|
2591
3009
|
});
|
|
2592
3010
|
Sheet.displayName = "Sheet";
|
|
2593
3011
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
2594
3012
|
var SheetClose = SheetPrimitive.Close;
|
|
2595
3013
|
var SheetPortal = SheetPrimitive.Portal;
|
|
2596
|
-
var SheetOverlay =
|
|
3014
|
+
var SheetOverlay = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2597
3015
|
SheetPrimitive.Overlay,
|
|
2598
3016
|
{
|
|
2599
3017
|
className: cn(
|
|
@@ -2605,7 +3023,7 @@ var SheetOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2605
3023
|
}
|
|
2606
3024
|
));
|
|
2607
3025
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
2608
|
-
var sheetVariants = (0,
|
|
3026
|
+
var sheetVariants = (0, import_class_variance_authority5.cva)(
|
|
2609
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",
|
|
2610
3028
|
{
|
|
2611
3029
|
variants: {
|
|
@@ -2622,7 +3040,7 @@ var sheetVariants = (0, import_class_variance_authority4.cva)(
|
|
|
2622
3040
|
}
|
|
2623
3041
|
}
|
|
2624
3042
|
);
|
|
2625
|
-
var SheetDescription =
|
|
3043
|
+
var SheetDescription = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2626
3044
|
SheetPrimitive.Description,
|
|
2627
3045
|
{
|
|
2628
3046
|
ref,
|
|
@@ -2631,7 +3049,7 @@ var SheetDescription = React21.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2631
3049
|
}
|
|
2632
3050
|
));
|
|
2633
3051
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
2634
|
-
var SheetContent =
|
|
3052
|
+
var SheetContent = React23.forwardRef(
|
|
2635
3053
|
({
|
|
2636
3054
|
side = "right",
|
|
2637
3055
|
className,
|
|
@@ -2641,10 +3059,10 @@ var SheetContent = React21.forwardRef(
|
|
|
2641
3059
|
overlayClassName,
|
|
2642
3060
|
...props
|
|
2643
3061
|
}, ref) => {
|
|
2644
|
-
const hasDescription = (0,
|
|
2645
|
-
return /* @__PURE__ */ (0,
|
|
2646
|
-
!hideOverlay && /* @__PURE__ */ (0,
|
|
2647
|
-
/* @__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)(
|
|
2648
3066
|
SheetContentBase,
|
|
2649
3067
|
{
|
|
2650
3068
|
ref,
|
|
@@ -2652,9 +3070,9 @@ var SheetContent = React21.forwardRef(
|
|
|
2652
3070
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
2653
3071
|
...props,
|
|
2654
3072
|
children: [
|
|
2655
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2657
|
-
/* @__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" })
|
|
2658
3076
|
] }),
|
|
2659
3077
|
children
|
|
2660
3078
|
]
|
|
@@ -2667,7 +3085,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
2667
3085
|
var SheetHeader = ({
|
|
2668
3086
|
className,
|
|
2669
3087
|
...props
|
|
2670
|
-
}) => /* @__PURE__ */ (0,
|
|
3088
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2671
3089
|
"div",
|
|
2672
3090
|
{
|
|
2673
3091
|
className: cn(
|
|
@@ -2681,7 +3099,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
2681
3099
|
var SheetFooter = ({
|
|
2682
3100
|
className,
|
|
2683
3101
|
...props
|
|
2684
|
-
}) => /* @__PURE__ */ (0,
|
|
3102
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2685
3103
|
"div",
|
|
2686
3104
|
{
|
|
2687
3105
|
className: cn(
|
|
@@ -2692,7 +3110,7 @@ var SheetFooter = ({
|
|
|
2692
3110
|
}
|
|
2693
3111
|
);
|
|
2694
3112
|
SheetFooter.displayName = "SheetFooter";
|
|
2695
|
-
var SheetTitle =
|
|
3113
|
+
var SheetTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2696
3114
|
SheetPrimitive.Title,
|
|
2697
3115
|
{
|
|
2698
3116
|
ref,
|
|
@@ -2703,12 +3121,12 @@ var SheetTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2703
3121
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
2704
3122
|
|
|
2705
3123
|
// src/skeleton.tsx
|
|
2706
|
-
var
|
|
3124
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2707
3125
|
function Skeleton({
|
|
2708
3126
|
className,
|
|
2709
3127
|
...props
|
|
2710
3128
|
}) {
|
|
2711
|
-
return /* @__PURE__ */ (0,
|
|
3129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2712
3130
|
"div",
|
|
2713
3131
|
{
|
|
2714
3132
|
className: cn("animate-pulse rounded-md bg-primary/10", className),
|
|
@@ -2719,8 +3137,8 @@ function Skeleton({
|
|
|
2719
3137
|
|
|
2720
3138
|
// src/switch.tsx
|
|
2721
3139
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
2722
|
-
var
|
|
2723
|
-
var
|
|
3140
|
+
var React24 = __toESM(require("react"), 1);
|
|
3141
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2724
3142
|
var SWITCH_SIZES = {
|
|
2725
3143
|
sm: {
|
|
2726
3144
|
root: "h-4 w-9 border-border data-[state=unchecked]:bg-input",
|
|
@@ -2731,7 +3149,7 @@ var SWITCH_SIZES = {
|
|
|
2731
3149
|
thumb: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
2732
3150
|
}
|
|
2733
3151
|
};
|
|
2734
|
-
var Switch =
|
|
3152
|
+
var Switch = React24.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2735
3153
|
SwitchPrimitives.Root,
|
|
2736
3154
|
{
|
|
2737
3155
|
ref,
|
|
@@ -2742,7 +3160,7 @@ var Switch = React22.forwardRef(({ className, size = "md", ...props }, ref) => /
|
|
|
2742
3160
|
className
|
|
2743
3161
|
),
|
|
2744
3162
|
...props,
|
|
2745
|
-
children: /* @__PURE__ */ (0,
|
|
3163
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2746
3164
|
SwitchPrimitives.Thumb,
|
|
2747
3165
|
{
|
|
2748
3166
|
"data-slot": "switch-thumb",
|
|
@@ -2758,7 +3176,7 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
2758
3176
|
|
|
2759
3177
|
// src/tabbed-bottom-sheet.tsx
|
|
2760
3178
|
var import_react4 = require("react");
|
|
2761
|
-
var
|
|
3179
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2762
3180
|
function TabbedBottomSheet({
|
|
2763
3181
|
open,
|
|
2764
3182
|
onOpenChange,
|
|
@@ -2772,15 +3190,15 @@ function TabbedBottomSheet({
|
|
|
2772
3190
|
if (open) setSelectedTabId(null);
|
|
2773
3191
|
}
|
|
2774
3192
|
const selectedTab = selectedTabId ? tabs.find((tab) => tab.id === selectedTabId) : null;
|
|
2775
|
-
return /* @__PURE__ */ (0,
|
|
3193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2776
3194
|
BottomSheet,
|
|
2777
3195
|
{
|
|
2778
3196
|
open,
|
|
2779
3197
|
onOpenChange,
|
|
2780
3198
|
title,
|
|
2781
3199
|
size: "full",
|
|
2782
|
-
children: /* @__PURE__ */ (0,
|
|
2783
|
-
/* @__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)(
|
|
2784
3202
|
BottomSheetHeader,
|
|
2785
3203
|
{
|
|
2786
3204
|
title: selectedTab ? selectedTab.label : title,
|
|
@@ -2788,19 +3206,19 @@ function TabbedBottomSheet({
|
|
|
2788
3206
|
onBack: () => setSelectedTabId(null)
|
|
2789
3207
|
}
|
|
2790
3208
|
),
|
|
2791
|
-
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) => {
|
|
2792
3210
|
const Icon2 = tab.icon;
|
|
2793
|
-
return /* @__PURE__ */ (0,
|
|
3211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2794
3212
|
"button",
|
|
2795
3213
|
{
|
|
2796
3214
|
type: "button",
|
|
2797
3215
|
onClick: () => setSelectedTabId(tab.id),
|
|
2798
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",
|
|
2799
3217
|
children: [
|
|
2800
|
-
Icon2 ? /* @__PURE__ */ (0,
|
|
2801
|
-
/* @__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 }),
|
|
2802
3220
|
tab.trailing,
|
|
2803
|
-
/* @__PURE__ */ (0,
|
|
3221
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
|
|
2804
3222
|
]
|
|
2805
3223
|
}
|
|
2806
3224
|
) }, tab.id);
|
|
@@ -2811,19 +3229,19 @@ function TabbedBottomSheet({
|
|
|
2811
3229
|
}
|
|
2812
3230
|
|
|
2813
3231
|
// src/table.tsx
|
|
2814
|
-
var
|
|
2815
|
-
var
|
|
3232
|
+
var React25 = __toESM(require("react"), 1);
|
|
3233
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2816
3234
|
var TABLE_SIZES = {
|
|
2817
3235
|
sm: { head: "px-2", cell: "p-2" },
|
|
2818
3236
|
md: { head: "px-3", cell: "p-3" }
|
|
2819
3237
|
};
|
|
2820
|
-
var TableSizeContext =
|
|
3238
|
+
var TableSizeContext = React25.createContext("md");
|
|
2821
3239
|
function useTableSize() {
|
|
2822
|
-
return
|
|
3240
|
+
return React25.useContext(TableSizeContext);
|
|
2823
3241
|
}
|
|
2824
|
-
var Table =
|
|
3242
|
+
var Table = React25.forwardRef(
|
|
2825
3243
|
({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
|
|
2826
|
-
const table = /* @__PURE__ */ (0,
|
|
3244
|
+
const table = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2827
3245
|
"table",
|
|
2828
3246
|
{
|
|
2829
3247
|
ref,
|
|
@@ -2833,7 +3251,7 @@ var Table = React23.forwardRef(
|
|
|
2833
3251
|
...props
|
|
2834
3252
|
}
|
|
2835
3253
|
);
|
|
2836
|
-
return /* @__PURE__ */ (0,
|
|
3254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableSizeContext.Provider, { value: size, children: wrap ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2837
3255
|
"div",
|
|
2838
3256
|
{
|
|
2839
3257
|
"data-slot": "table-wrapper",
|
|
@@ -2844,7 +3262,7 @@ var Table = React23.forwardRef(
|
|
|
2844
3262
|
}
|
|
2845
3263
|
);
|
|
2846
3264
|
Table.displayName = "Table";
|
|
2847
|
-
var TableHeader =
|
|
3265
|
+
var TableHeader = React25.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2848
3266
|
"thead",
|
|
2849
3267
|
{
|
|
2850
3268
|
ref,
|
|
@@ -2858,7 +3276,7 @@ var TableHeader = React23.forwardRef(({ className, sticky = false, ...props }, r
|
|
|
2858
3276
|
}
|
|
2859
3277
|
));
|
|
2860
3278
|
TableHeader.displayName = "TableHeader";
|
|
2861
|
-
var TableBody =
|
|
3279
|
+
var TableBody = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2862
3280
|
"tbody",
|
|
2863
3281
|
{
|
|
2864
3282
|
ref,
|
|
@@ -2868,7 +3286,7 @@ var TableBody = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2868
3286
|
}
|
|
2869
3287
|
));
|
|
2870
3288
|
TableBody.displayName = "TableBody";
|
|
2871
|
-
var TableFooter =
|
|
3289
|
+
var TableFooter = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2872
3290
|
"tfoot",
|
|
2873
3291
|
{
|
|
2874
3292
|
ref,
|
|
@@ -2881,7 +3299,7 @@ var TableFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2881
3299
|
}
|
|
2882
3300
|
));
|
|
2883
3301
|
TableFooter.displayName = "TableFooter";
|
|
2884
|
-
var TableRow =
|
|
3302
|
+
var TableRow = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2885
3303
|
"tr",
|
|
2886
3304
|
{
|
|
2887
3305
|
ref,
|
|
@@ -2894,9 +3312,9 @@ var TableRow = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2894
3312
|
}
|
|
2895
3313
|
));
|
|
2896
3314
|
TableRow.displayName = "TableRow";
|
|
2897
|
-
var TableHead =
|
|
3315
|
+
var TableHead = React25.forwardRef(({ className, ...props }, ref) => {
|
|
2898
3316
|
const size = useTableSize();
|
|
2899
|
-
return /* @__PURE__ */ (0,
|
|
3317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2900
3318
|
"th",
|
|
2901
3319
|
{
|
|
2902
3320
|
ref,
|
|
@@ -2911,9 +3329,9 @@ var TableHead = React23.forwardRef(({ className, ...props }, ref) => {
|
|
|
2911
3329
|
);
|
|
2912
3330
|
});
|
|
2913
3331
|
TableHead.displayName = "TableHead";
|
|
2914
|
-
var TableCell =
|
|
3332
|
+
var TableCell = React25.forwardRef(({ className, ...props }, ref) => {
|
|
2915
3333
|
const size = useTableSize();
|
|
2916
|
-
return /* @__PURE__ */ (0,
|
|
3334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2917
3335
|
"td",
|
|
2918
3336
|
{
|
|
2919
3337
|
ref,
|
|
@@ -2928,7 +3346,7 @@ var TableCell = React23.forwardRef(({ className, ...props }, ref) => {
|
|
|
2928
3346
|
);
|
|
2929
3347
|
});
|
|
2930
3348
|
TableCell.displayName = "TableCell";
|
|
2931
|
-
var TableCaption =
|
|
3349
|
+
var TableCaption = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2932
3350
|
"caption",
|
|
2933
3351
|
{
|
|
2934
3352
|
ref,
|
|
@@ -2941,11 +3359,11 @@ TableCaption.displayName = "TableCaption";
|
|
|
2941
3359
|
|
|
2942
3360
|
// src/tabs.tsx
|
|
2943
3361
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
2944
|
-
var
|
|
2945
|
-
var
|
|
3362
|
+
var React26 = __toESM(require("react"), 1);
|
|
3363
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2946
3364
|
var Tabs = TabsPrimitive.Root;
|
|
2947
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";
|
|
2948
|
-
var TabsList =
|
|
3366
|
+
var TabsList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2949
3367
|
TabsPrimitive.List,
|
|
2950
3368
|
{
|
|
2951
3369
|
ref,
|
|
@@ -2958,7 +3376,7 @@ var TabsList = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2958
3376
|
}
|
|
2959
3377
|
));
|
|
2960
3378
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
2961
|
-
var TabsTrigger =
|
|
3379
|
+
var TabsTrigger = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2962
3380
|
TabsPrimitive.Trigger,
|
|
2963
3381
|
{
|
|
2964
3382
|
ref,
|
|
@@ -2972,7 +3390,7 @@ var TabsTrigger = React24.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2972
3390
|
}
|
|
2973
3391
|
));
|
|
2974
3392
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
2975
|
-
var TabsTriggerCore =
|
|
3393
|
+
var TabsTriggerCore = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2976
3394
|
TabsPrimitive.Trigger,
|
|
2977
3395
|
{
|
|
2978
3396
|
ref,
|
|
@@ -2982,7 +3400,7 @@ var TabsTriggerCore = React24.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
2982
3400
|
}
|
|
2983
3401
|
));
|
|
2984
3402
|
TabsTriggerCore.displayName = TabsPrimitive.Trigger.displayName;
|
|
2985
|
-
var TabsContent =
|
|
3403
|
+
var TabsContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2986
3404
|
TabsPrimitive.Content,
|
|
2987
3405
|
{
|
|
2988
3406
|
ref,
|
|
@@ -2998,8 +3416,8 @@ var TabsContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2998
3416
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
2999
3417
|
|
|
3000
3418
|
// src/textarea.tsx
|
|
3001
|
-
var
|
|
3002
|
-
var
|
|
3419
|
+
var React27 = __toESM(require("react"), 1);
|
|
3420
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3003
3421
|
var FILL_HEIGHT_REGEX = /(?:^|\s)(h-full|h-dvh|flex-1|grow)(?:\s|$)/;
|
|
3004
3422
|
var FILL_WIDTH_REGEX = /(?:^|\s)(w-full|w-screen)(?:\s|$)/;
|
|
3005
3423
|
function getStretchClasses(className) {
|
|
@@ -3012,7 +3430,7 @@ function getStretchClasses(className) {
|
|
|
3012
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";
|
|
3013
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";
|
|
3014
3432
|
function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
3015
|
-
|
|
3433
|
+
React27.useEffect(() => {
|
|
3016
3434
|
if (!autoGrow || !ref.current) return;
|
|
3017
3435
|
const textarea = ref.current;
|
|
3018
3436
|
textarea.style.height = "auto";
|
|
@@ -3028,8 +3446,8 @@ function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
|
3028
3446
|
}, [value, autoGrow, minHeight, maxHeight, ref]);
|
|
3029
3447
|
}
|
|
3030
3448
|
function useMergedTextareaRef(forwarded) {
|
|
3031
|
-
const internal =
|
|
3032
|
-
const callback =
|
|
3449
|
+
const internal = React27.useRef(null);
|
|
3450
|
+
const callback = React27.useCallback(
|
|
3033
3451
|
(node) => {
|
|
3034
3452
|
internal.current = node;
|
|
3035
3453
|
if (typeof forwarded === "function") forwarded(node);
|
|
@@ -3046,13 +3464,13 @@ function boxStyle(minHeight, maxHeight) {
|
|
|
3046
3464
|
maxHeight: maxHeight ? `${maxHeight}px` : void 0
|
|
3047
3465
|
};
|
|
3048
3466
|
}
|
|
3049
|
-
var Textarea =
|
|
3467
|
+
var Textarea = React27.forwardRef(
|
|
3050
3468
|
({ className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props }, forwarded) => {
|
|
3051
3469
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3052
3470
|
const stretchClasses = getStretchClasses(className);
|
|
3053
3471
|
const needsWrapper = Boolean(wrapperClassName || stretchClasses);
|
|
3054
3472
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3055
|
-
const textarea = /* @__PURE__ */ (0,
|
|
3473
|
+
const textarea = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3056
3474
|
"textarea",
|
|
3057
3475
|
{
|
|
3058
3476
|
ref: callback,
|
|
@@ -3068,15 +3486,15 @@ var Textarea = React25.forwardRef(
|
|
|
3068
3486
|
}
|
|
3069
3487
|
);
|
|
3070
3488
|
if (!needsWrapper) return textarea;
|
|
3071
|
-
return /* @__PURE__ */ (0,
|
|
3489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn(stretchClasses, wrapperClassName), children: textarea });
|
|
3072
3490
|
}
|
|
3073
3491
|
);
|
|
3074
3492
|
Textarea.displayName = "Textarea";
|
|
3075
|
-
var BasicTextarea =
|
|
3493
|
+
var BasicTextarea = React27.forwardRef(
|
|
3076
3494
|
({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {
|
|
3077
3495
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3078
3496
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3079
|
-
return /* @__PURE__ */ (0,
|
|
3497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3080
3498
|
"textarea",
|
|
3081
3499
|
{
|
|
3082
3500
|
ref: callback,
|
|
@@ -3094,7 +3512,7 @@ var BasicTextarea = React25.forwardRef(
|
|
|
3094
3512
|
}
|
|
3095
3513
|
);
|
|
3096
3514
|
BasicTextarea.displayName = "BasicTextarea";
|
|
3097
|
-
var TextareaWithPrefix =
|
|
3515
|
+
var TextareaWithPrefix = React27.forwardRef(
|
|
3098
3516
|
({
|
|
3099
3517
|
prefix,
|
|
3100
3518
|
className,
|
|
@@ -3106,13 +3524,13 @@ var TextareaWithPrefix = React25.forwardRef(
|
|
|
3106
3524
|
}, forwarded) => {
|
|
3107
3525
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3108
3526
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3109
|
-
return /* @__PURE__ */ (0,
|
|
3527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3110
3528
|
"div",
|
|
3111
3529
|
{
|
|
3112
3530
|
className: cn("relative", getStretchClasses(className), wrapperClassName),
|
|
3113
3531
|
children: [
|
|
3114
|
-
prefix ? /* @__PURE__ */ (0,
|
|
3115
|
-
/* @__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)(
|
|
3116
3534
|
"textarea",
|
|
3117
3535
|
{
|
|
3118
3536
|
ref: callback,
|
|
@@ -3188,4 +3606,307 @@ function useScrollFade() {
|
|
|
3188
3606
|
}
|
|
3189
3607
|
};
|
|
3190
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;
|
|
3191
3912
|
//# sourceMappingURL=index.cjs.map
|