auxalia-ui-kit 1.5.7 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +673 -583
- package/dist/index.d.cts +26 -11
- package/dist/index.d.ts +26 -11
- package/dist/index.js +613 -528
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39,6 +39,7 @@ __export(index_exports, {
|
|
|
39
39
|
Badge: () => Badge,
|
|
40
40
|
Button: () => Button,
|
|
41
41
|
Card: () => Card,
|
|
42
|
+
Checkbox: () => Checkbox,
|
|
42
43
|
CollapsibleContent: () => CollapsibleContent,
|
|
43
44
|
CollapsibleRoot: () => CollapsibleRoot,
|
|
44
45
|
CollapsibleTrigger: () => CollapsibleTrigger,
|
|
@@ -91,6 +92,8 @@ __export(index_exports, {
|
|
|
91
92
|
PopoverAnchor: () => PopoverAnchor,
|
|
92
93
|
PopoverContent: () => PopoverContent,
|
|
93
94
|
PopoverTrigger: () => PopoverTrigger,
|
|
95
|
+
RadioGroup: () => RadioGroup,
|
|
96
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
94
97
|
Select: () => Select2,
|
|
95
98
|
SelectContent: () => SelectContent2,
|
|
96
99
|
SelectGroup: () => SelectGroup2,
|
|
@@ -117,7 +120,9 @@ __export(index_exports, {
|
|
|
117
120
|
TooltipTrigger: () => TooltipTrigger,
|
|
118
121
|
badgeVariants: () => badgeVariants,
|
|
119
122
|
buttonVariants: () => buttonVariants,
|
|
123
|
+
checkboxVariants: () => checkboxVariants,
|
|
120
124
|
cn: () => cn,
|
|
125
|
+
radioItemVariants: () => radioItemVariants,
|
|
121
126
|
tailwindPreset: () => tailwind_preset_default
|
|
122
127
|
});
|
|
123
128
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -182,12 +187,92 @@ var AlertDescription = React.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
182
187
|
));
|
|
183
188
|
AlertDescription.displayName = "AlertDescription";
|
|
184
189
|
|
|
185
|
-
// src/components/
|
|
190
|
+
// src/components/Checkbox.tsx
|
|
186
191
|
var React2 = __toESM(require("react"), 1);
|
|
187
192
|
var import_radix_ui = require("radix-ui");
|
|
188
193
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
194
|
+
var import_lucide_react = require("lucide-react");
|
|
189
195
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
190
|
-
var
|
|
196
|
+
var checkboxVariants = (0, import_class_variance_authority2.cva)(
|
|
197
|
+
[
|
|
198
|
+
"peer size-4 shrink-0 rounded-[3px] border transition-colors",
|
|
199
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
200
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
201
|
+
"data-[state=unchecked]:bg-card data-[state=unchecked]:border-border"
|
|
202
|
+
],
|
|
203
|
+
{
|
|
204
|
+
variants: {
|
|
205
|
+
color: {
|
|
206
|
+
primary: "data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground focus-visible:ring-primary/30",
|
|
207
|
+
secondary: "data-[state=checked]:bg-secondary data-[state=checked]:border-secondary data-[state=checked]:text-secondary-foreground focus-visible:ring-secondary/30",
|
|
208
|
+
destructive: "data-[state=checked]:bg-destructive data-[state=checked]:border-destructive data-[state=checked]:text-destructive-foreground focus-visible:ring-destructive/30"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
defaultVariants: { color: "primary" }
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
var Checkbox = React2.forwardRef(({ className, color, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
215
|
+
import_radix_ui.Checkbox.Root,
|
|
216
|
+
{
|
|
217
|
+
ref,
|
|
218
|
+
className: cn(checkboxVariants({ color }), className),
|
|
219
|
+
...props,
|
|
220
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_radix_ui.Checkbox.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Check, { className: "size-3", strokeWidth: 3 }) })
|
|
221
|
+
}
|
|
222
|
+
));
|
|
223
|
+
Checkbox.displayName = import_radix_ui.Checkbox.Root.displayName;
|
|
224
|
+
|
|
225
|
+
// src/components/RadioGroup.tsx
|
|
226
|
+
var React3 = __toESM(require("react"), 1);
|
|
227
|
+
var import_radix_ui2 = require("radix-ui");
|
|
228
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
229
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
230
|
+
var radioItemVariants = (0, import_class_variance_authority3.cva)(
|
|
231
|
+
[
|
|
232
|
+
"peer size-4 shrink-0 rounded-full border transition-colors",
|
|
233
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
234
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
235
|
+
"data-[state=unchecked]:bg-card data-[state=unchecked]:border-border"
|
|
236
|
+
],
|
|
237
|
+
{
|
|
238
|
+
variants: {
|
|
239
|
+
color: {
|
|
240
|
+
primary: "data-[state=checked]:border-primary focus-visible:ring-primary/30",
|
|
241
|
+
secondary: "data-[state=checked]:border-secondary focus-visible:ring-secondary/30",
|
|
242
|
+
destructive: "data-[state=checked]:border-destructive focus-visible:ring-destructive/30"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
defaultVariants: { color: "primary" }
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
var radioIndicatorVariants = (0, import_class_variance_authority3.cva)("flex items-center justify-center", {
|
|
249
|
+
variants: {
|
|
250
|
+
color: {
|
|
251
|
+
primary: "[&>span]:bg-primary",
|
|
252
|
+
secondary: "[&>span]:bg-secondary",
|
|
253
|
+
destructive: "[&>span]:bg-destructive"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
defaultVariants: { color: "primary" }
|
|
257
|
+
});
|
|
258
|
+
var RadioGroup = import_radix_ui2.RadioGroup.Root;
|
|
259
|
+
var RadioGroupItem = React3.forwardRef(({ className, color, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
260
|
+
import_radix_ui2.RadioGroup.Item,
|
|
261
|
+
{
|
|
262
|
+
ref,
|
|
263
|
+
className: cn(radioItemVariants({ color }), className),
|
|
264
|
+
...props,
|
|
265
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_radix_ui2.RadioGroup.Indicator, { className: cn(radioIndicatorVariants({ color })), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block size-2 rounded-full" }) })
|
|
266
|
+
}
|
|
267
|
+
));
|
|
268
|
+
RadioGroupItem.displayName = import_radix_ui2.RadioGroup.Item.displayName;
|
|
269
|
+
|
|
270
|
+
// src/components/Avatar.tsx
|
|
271
|
+
var React4 = __toESM(require("react"), 1);
|
|
272
|
+
var import_radix_ui3 = require("radix-ui");
|
|
273
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
274
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
275
|
+
var avatarVariants = (0, import_class_variance_authority4.cva)(
|
|
191
276
|
"relative flex shrink-0 overflow-hidden rounded-full",
|
|
192
277
|
{
|
|
193
278
|
variants: {
|
|
@@ -203,26 +288,26 @@ var avatarVariants = (0, import_class_variance_authority2.cva)(
|
|
|
203
288
|
}
|
|
204
289
|
}
|
|
205
290
|
);
|
|
206
|
-
var Avatar =
|
|
207
|
-
|
|
291
|
+
var Avatar = React4.forwardRef(({ className, size: size4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
292
|
+
import_radix_ui3.Avatar.Root,
|
|
208
293
|
{
|
|
209
294
|
ref,
|
|
210
295
|
className: cn(avatarVariants({ size: size4 }), className),
|
|
211
296
|
...props
|
|
212
297
|
}
|
|
213
298
|
));
|
|
214
|
-
Avatar.displayName =
|
|
215
|
-
var AvatarImage =
|
|
216
|
-
|
|
299
|
+
Avatar.displayName = import_radix_ui3.Avatar.Root.displayName;
|
|
300
|
+
var AvatarImage = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
301
|
+
import_radix_ui3.Avatar.Image,
|
|
217
302
|
{
|
|
218
303
|
ref,
|
|
219
304
|
className: cn("aspect-square h-full w-full object-cover", className),
|
|
220
305
|
...props
|
|
221
306
|
}
|
|
222
307
|
));
|
|
223
|
-
AvatarImage.displayName =
|
|
224
|
-
var AvatarFallback =
|
|
225
|
-
|
|
308
|
+
AvatarImage.displayName = import_radix_ui3.Avatar.Image.displayName;
|
|
309
|
+
var AvatarFallback = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
310
|
+
import_radix_ui3.Avatar.Fallback,
|
|
226
311
|
{
|
|
227
312
|
ref,
|
|
228
313
|
className: cn(
|
|
@@ -233,12 +318,12 @@ var AvatarFallback = React2.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
233
318
|
...props
|
|
234
319
|
}
|
|
235
320
|
));
|
|
236
|
-
AvatarFallback.displayName =
|
|
321
|
+
AvatarFallback.displayName = import_radix_ui3.Avatar.Fallback.displayName;
|
|
237
322
|
|
|
238
323
|
// src/components/Badge.tsx
|
|
239
|
-
var
|
|
240
|
-
var
|
|
241
|
-
var badgeVariants = (0,
|
|
324
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
325
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
326
|
+
var badgeVariants = (0, import_class_variance_authority5.cva)(
|
|
242
327
|
"inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",
|
|
243
328
|
{
|
|
244
329
|
variants: {
|
|
@@ -260,14 +345,14 @@ var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
|
260
345
|
}
|
|
261
346
|
);
|
|
262
347
|
function Badge({ className, variant, ...props }) {
|
|
263
|
-
return /* @__PURE__ */ (0,
|
|
348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
264
349
|
}
|
|
265
350
|
|
|
266
351
|
// src/components/Button.tsx
|
|
267
|
-
var
|
|
352
|
+
var React5 = __toESM(require("react"), 1);
|
|
268
353
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
269
|
-
var
|
|
270
|
-
var
|
|
354
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
355
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
271
356
|
var compoundVariants = [
|
|
272
357
|
// FILLED - Using Auxalia Brand Colors
|
|
273
358
|
{
|
|
@@ -370,7 +455,7 @@ var compoundVariants = [
|
|
|
370
455
|
class: "text-surface-foreground underline hover:text-surface-hover"
|
|
371
456
|
}
|
|
372
457
|
];
|
|
373
|
-
var buttonVariants = (0,
|
|
458
|
+
var buttonVariants = (0, import_class_variance_authority6.cva)(
|
|
374
459
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-all disabled:opacity-50 disabled:cursor-not-allowed",
|
|
375
460
|
{
|
|
376
461
|
variants: {
|
|
@@ -389,10 +474,10 @@ var buttonVariants = (0, import_class_variance_authority4.cva)(
|
|
|
389
474
|
surface: ""
|
|
390
475
|
},
|
|
391
476
|
size: {
|
|
392
|
-
default: "px-4
|
|
393
|
-
sm: "px-3
|
|
394
|
-
lg: "px-6
|
|
395
|
-
icon: "size-
|
|
477
|
+
default: "h-10 px-4",
|
|
478
|
+
sm: "h-8 px-3",
|
|
479
|
+
lg: "h-12 px-6",
|
|
480
|
+
icon: "size-10"
|
|
396
481
|
}
|
|
397
482
|
},
|
|
398
483
|
compoundVariants,
|
|
@@ -403,10 +488,10 @@ var buttonVariants = (0, import_class_variance_authority4.cva)(
|
|
|
403
488
|
}
|
|
404
489
|
}
|
|
405
490
|
);
|
|
406
|
-
var Button =
|
|
491
|
+
var Button = React5.forwardRef(
|
|
407
492
|
({ className, variant, size: size4, color, asChild = false, ...props }, ref) => {
|
|
408
493
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
409
|
-
return /* @__PURE__ */ (0,
|
|
494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
410
495
|
Comp,
|
|
411
496
|
{
|
|
412
497
|
ref,
|
|
@@ -419,35 +504,35 @@ var Button = React3.forwardRef(
|
|
|
419
504
|
Button.displayName = "Button";
|
|
420
505
|
|
|
421
506
|
// src/components/Collapsible.tsx
|
|
422
|
-
var
|
|
423
|
-
var
|
|
507
|
+
var import_radix_ui4 = require("radix-ui");
|
|
508
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
424
509
|
function CollapsibleRoot({
|
|
425
510
|
...props
|
|
426
511
|
}) {
|
|
427
|
-
return /* @__PURE__ */ (0,
|
|
512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui4.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
428
513
|
}
|
|
429
514
|
function CollapsibleTrigger({
|
|
430
515
|
...props
|
|
431
516
|
}) {
|
|
432
|
-
return /* @__PURE__ */ (0,
|
|
517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui4.Collapsible.Trigger, { "data-slot": "collapsible-trigger", ...props });
|
|
433
518
|
}
|
|
434
519
|
function CollapsibleContent({
|
|
435
520
|
...props
|
|
436
521
|
}) {
|
|
437
|
-
return /* @__PURE__ */ (0,
|
|
522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui4.Collapsible.Content, { "data-slot": "collapsible-content", ...props });
|
|
438
523
|
}
|
|
439
524
|
|
|
440
525
|
// src/components/Dialog.tsx
|
|
441
|
-
var
|
|
442
|
-
var
|
|
443
|
-
var
|
|
444
|
-
var
|
|
445
|
-
var Dialog =
|
|
446
|
-
var DialogTrigger =
|
|
447
|
-
var DialogPortal =
|
|
448
|
-
var DialogClose =
|
|
449
|
-
var DialogOverlay =
|
|
450
|
-
|
|
526
|
+
var React6 = __toESM(require("react"), 1);
|
|
527
|
+
var import_radix_ui5 = require("radix-ui");
|
|
528
|
+
var import_lucide_react2 = require("lucide-react");
|
|
529
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
530
|
+
var Dialog = import_radix_ui5.Dialog.Root;
|
|
531
|
+
var DialogTrigger = import_radix_ui5.Dialog.Trigger;
|
|
532
|
+
var DialogPortal = import_radix_ui5.Dialog.Portal;
|
|
533
|
+
var DialogClose = import_radix_ui5.Dialog.Close;
|
|
534
|
+
var DialogOverlay = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
535
|
+
import_radix_ui5.Dialog.Overlay,
|
|
451
536
|
{
|
|
452
537
|
ref,
|
|
453
538
|
className: cn(
|
|
@@ -459,11 +544,11 @@ var DialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
459
544
|
...props
|
|
460
545
|
}
|
|
461
546
|
));
|
|
462
|
-
DialogOverlay.displayName =
|
|
463
|
-
var DialogContent =
|
|
464
|
-
/* @__PURE__ */ (0,
|
|
465
|
-
/* @__PURE__ */ (0,
|
|
466
|
-
|
|
547
|
+
DialogOverlay.displayName = import_radix_ui5.Dialog.Overlay.displayName;
|
|
548
|
+
var DialogContent = React6.forwardRef(({ className, children, showClose = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DialogPortal, { children: [
|
|
549
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DialogOverlay, {}),
|
|
550
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
551
|
+
import_radix_ui5.Dialog.Content,
|
|
467
552
|
{
|
|
468
553
|
ref,
|
|
469
554
|
className: cn(
|
|
@@ -478,20 +563,20 @@ var DialogContent = React4.forwardRef(({ className, children, showClose = true,
|
|
|
478
563
|
...props,
|
|
479
564
|
children: [
|
|
480
565
|
children,
|
|
481
|
-
showClose && /* @__PURE__ */ (0,
|
|
482
|
-
/* @__PURE__ */ (0,
|
|
483
|
-
/* @__PURE__ */ (0,
|
|
566
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DialogClose, { className: "absolute right-4 top-4 rounded-md p-1 text-dim opacity-70 hover:opacity-100 hover:bg-surface transition-all focus:outline-none focus:ring-2 focus:ring-primary/30", children: [
|
|
567
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.X, { className: "size-4" }),
|
|
568
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "sr-only", children: "Close" })
|
|
484
569
|
] })
|
|
485
570
|
]
|
|
486
571
|
}
|
|
487
572
|
)
|
|
488
573
|
] }));
|
|
489
|
-
DialogContent.displayName =
|
|
574
|
+
DialogContent.displayName = import_radix_ui5.Dialog.Content.displayName;
|
|
490
575
|
function DialogHeader({ className, ...props }) {
|
|
491
|
-
return /* @__PURE__ */ (0,
|
|
576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn("flex flex-col gap-1.5 mb-4", className), ...props });
|
|
492
577
|
}
|
|
493
578
|
function DialogFooter({ className, ...props }) {
|
|
494
|
-
return /* @__PURE__ */ (0,
|
|
579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
495
580
|
"div",
|
|
496
581
|
{
|
|
497
582
|
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-6", className),
|
|
@@ -499,29 +584,29 @@ function DialogFooter({ className, ...props }) {
|
|
|
499
584
|
}
|
|
500
585
|
);
|
|
501
586
|
}
|
|
502
|
-
var DialogTitle =
|
|
503
|
-
|
|
587
|
+
var DialogTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
588
|
+
import_radix_ui5.Dialog.Title,
|
|
504
589
|
{
|
|
505
590
|
ref,
|
|
506
591
|
className: cn("text-lg font-semibold leading-tight text-content", className),
|
|
507
592
|
...props
|
|
508
593
|
}
|
|
509
594
|
));
|
|
510
|
-
DialogTitle.displayName =
|
|
511
|
-
var DialogDescription =
|
|
512
|
-
|
|
595
|
+
DialogTitle.displayName = import_radix_ui5.Dialog.Title.displayName;
|
|
596
|
+
var DialogDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
597
|
+
import_radix_ui5.Dialog.Description,
|
|
513
598
|
{
|
|
514
599
|
ref,
|
|
515
600
|
className: cn("text-sm text-dim", className),
|
|
516
601
|
...props
|
|
517
602
|
}
|
|
518
603
|
));
|
|
519
|
-
DialogDescription.displayName =
|
|
604
|
+
DialogDescription.displayName = import_radix_ui5.Dialog.Description.displayName;
|
|
520
605
|
|
|
521
606
|
// src/components/Skeleton.tsx
|
|
522
|
-
var
|
|
607
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
523
608
|
function Skeleton({ className, ...props }) {
|
|
524
|
-
return /* @__PURE__ */ (0,
|
|
609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
525
610
|
"div",
|
|
526
611
|
{
|
|
527
612
|
className: cn(
|
|
@@ -533,35 +618,35 @@ function Skeleton({ className, ...props }) {
|
|
|
533
618
|
);
|
|
534
619
|
}
|
|
535
620
|
function SkeletonText({ className, ...props }) {
|
|
536
|
-
return /* @__PURE__ */ (0,
|
|
537
|
-
/* @__PURE__ */ (0,
|
|
538
|
-
/* @__PURE__ */ (0,
|
|
539
|
-
/* @__PURE__ */ (0,
|
|
621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: cn("space-y-2", className), ...props, children: [
|
|
622
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Skeleton, { className: "h-4 w-full" }),
|
|
623
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Skeleton, { className: "h-4 w-4/5" }),
|
|
624
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Skeleton, { className: "h-4 w-3/5" })
|
|
540
625
|
] });
|
|
541
626
|
}
|
|
542
627
|
function SkeletonAvatar({ className, ...props }) {
|
|
543
|
-
return /* @__PURE__ */ (0,
|
|
628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Skeleton, { className: cn("size-10 rounded-full", className), ...props });
|
|
544
629
|
}
|
|
545
630
|
function SkeletonCard({ className, ...props }) {
|
|
546
|
-
return /* @__PURE__ */ (0,
|
|
547
|
-
/* @__PURE__ */ (0,
|
|
548
|
-
/* @__PURE__ */ (0,
|
|
549
|
-
/* @__PURE__ */ (0,
|
|
550
|
-
/* @__PURE__ */ (0,
|
|
551
|
-
/* @__PURE__ */ (0,
|
|
631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: cn("rounded-lg border border-border p-4 space-y-3", className), ...props, children: [
|
|
632
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
633
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonAvatar, {}),
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Skeleton, { className: "h-4 w-1/3" }),
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Skeleton, { className: "h-3 w-1/2" })
|
|
552
637
|
] })
|
|
553
638
|
] }),
|
|
554
|
-
/* @__PURE__ */ (0,
|
|
555
|
-
/* @__PURE__ */ (0,
|
|
639
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Skeleton, { className: "h-4 w-full" }),
|
|
640
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Skeleton, { className: "h-4 w-4/5" })
|
|
556
641
|
] });
|
|
557
642
|
}
|
|
558
643
|
|
|
559
644
|
// src/components/Switch.tsx
|
|
560
|
-
var
|
|
561
|
-
var
|
|
562
|
-
var
|
|
563
|
-
var
|
|
564
|
-
var switchVariants = (0,
|
|
645
|
+
var React7 = __toESM(require("react"), 1);
|
|
646
|
+
var import_radix_ui6 = require("radix-ui");
|
|
647
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
648
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
649
|
+
var switchVariants = (0, import_class_variance_authority7.cva)(
|
|
565
650
|
[
|
|
566
651
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent",
|
|
567
652
|
"transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
@@ -577,51 +662,51 @@ var switchVariants = (0, import_class_variance_authority5.cva)(
|
|
|
577
662
|
destructive: "data-[state=checked]:bg-destructive focus-visible:ring-destructive/30"
|
|
578
663
|
},
|
|
579
664
|
size: {
|
|
580
|
-
sm: "h-
|
|
665
|
+
sm: "h-4 w-[26px]",
|
|
581
666
|
md: "h-6 w-11",
|
|
582
667
|
lg: "h-7 w-[52px]"
|
|
583
668
|
}
|
|
584
669
|
},
|
|
585
670
|
defaultVariants: {
|
|
586
671
|
color: "primary",
|
|
587
|
-
size: "
|
|
672
|
+
size: "sm"
|
|
588
673
|
}
|
|
589
674
|
}
|
|
590
675
|
);
|
|
591
|
-
var thumbVariants = (0,
|
|
676
|
+
var thumbVariants = (0, import_class_variance_authority7.cva)(
|
|
592
677
|
"pointer-events-none block rounded-full bg-white shadow-sm transition-transform",
|
|
593
678
|
{
|
|
594
679
|
variants: {
|
|
595
680
|
size: {
|
|
596
|
-
sm: "size-
|
|
681
|
+
sm: "size-3 data-[state=checked]:translate-x-[10px] data-[state=unchecked]:translate-x-0",
|
|
597
682
|
md: "size-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
598
683
|
lg: "size-6 data-[state=checked]:translate-x-[26px] data-[state=unchecked]:translate-x-0"
|
|
599
684
|
}
|
|
600
685
|
},
|
|
601
686
|
defaultVariants: {
|
|
602
|
-
size: "
|
|
687
|
+
size: "sm"
|
|
603
688
|
}
|
|
604
689
|
}
|
|
605
690
|
);
|
|
606
|
-
var Switch =
|
|
607
|
-
|
|
691
|
+
var Switch = React7.forwardRef(({ className, color, size: size4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
692
|
+
import_radix_ui6.Switch.Root,
|
|
608
693
|
{
|
|
609
694
|
ref,
|
|
610
695
|
className: cn(switchVariants({ color, size: size4 }), className),
|
|
611
696
|
...props,
|
|
612
|
-
children: /* @__PURE__ */ (0,
|
|
697
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_radix_ui6.Switch.Thumb, { className: cn(thumbVariants({ size: size4 })) })
|
|
613
698
|
}
|
|
614
699
|
));
|
|
615
|
-
Switch.displayName =
|
|
700
|
+
Switch.displayName = import_radix_ui6.Switch.Root.displayName;
|
|
616
701
|
|
|
617
702
|
// src/components/DropdownMenu/index.tsx
|
|
618
|
-
var
|
|
703
|
+
var React8 = __toESM(require("react"), 1);
|
|
619
704
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
620
|
-
var
|
|
705
|
+
var import_lucide_react3 = require("lucide-react");
|
|
621
706
|
|
|
622
707
|
// src/components/DropdownMenu/dropdown.styles.ts
|
|
623
|
-
var
|
|
624
|
-
var dropdownMenuItemVariants = (0,
|
|
708
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
709
|
+
var dropdownMenuItemVariants = (0, import_class_variance_authority8.cva)(
|
|
625
710
|
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
626
711
|
{
|
|
627
712
|
variants: {
|
|
@@ -640,14 +725,14 @@ var dropdownMenuItemVariants = (0, import_class_variance_authority6.cva)(
|
|
|
640
725
|
);
|
|
641
726
|
|
|
642
727
|
// src/components/DropdownMenu/index.tsx
|
|
643
|
-
var
|
|
728
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
644
729
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
645
730
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
646
731
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
647
732
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
648
733
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
649
734
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
650
|
-
var DropdownMenuSubTrigger =
|
|
735
|
+
var DropdownMenuSubTrigger = React8.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
651
736
|
DropdownMenuPrimitive.SubTrigger,
|
|
652
737
|
{
|
|
653
738
|
ref,
|
|
@@ -659,12 +744,12 @@ var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ..
|
|
|
659
744
|
...props,
|
|
660
745
|
children: [
|
|
661
746
|
children,
|
|
662
|
-
/* @__PURE__ */ (0,
|
|
747
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.ChevronRight, { className: "ml-auto" })
|
|
663
748
|
]
|
|
664
749
|
}
|
|
665
750
|
));
|
|
666
751
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
667
|
-
var DropdownMenuSubContent =
|
|
752
|
+
var DropdownMenuSubContent = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
668
753
|
DropdownMenuPrimitive.SubContent,
|
|
669
754
|
{
|
|
670
755
|
ref,
|
|
@@ -676,7 +761,7 @@ var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) =>
|
|
|
676
761
|
}
|
|
677
762
|
));
|
|
678
763
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
679
|
-
var DropdownMenuContent =
|
|
764
|
+
var DropdownMenuContent = React8.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
680
765
|
DropdownMenuPrimitive.Content,
|
|
681
766
|
{
|
|
682
767
|
ref,
|
|
@@ -690,7 +775,7 @@ var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, ...pro
|
|
|
690
775
|
}
|
|
691
776
|
) }));
|
|
692
777
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
693
|
-
var DropdownMenuItem =
|
|
778
|
+
var DropdownMenuItem = React8.forwardRef(({ className, inset, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
694
779
|
DropdownMenuPrimitive.Item,
|
|
695
780
|
{
|
|
696
781
|
ref,
|
|
@@ -699,7 +784,7 @@ var DropdownMenuItem = React6.forwardRef(({ className, inset, variant, ...props
|
|
|
699
784
|
}
|
|
700
785
|
));
|
|
701
786
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
702
|
-
var DropdownMenuCheckboxItem =
|
|
787
|
+
var DropdownMenuCheckboxItem = React8.forwardRef(({ className, children, checked, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
703
788
|
DropdownMenuPrimitive.CheckboxItem,
|
|
704
789
|
{
|
|
705
790
|
ref,
|
|
@@ -711,13 +796,13 @@ var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked
|
|
|
711
796
|
checked,
|
|
712
797
|
...props,
|
|
713
798
|
children: [
|
|
714
|
-
/* @__PURE__ */ (0,
|
|
799
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.Check, { className: "h-4 w-4" }) }) }),
|
|
715
800
|
children
|
|
716
801
|
]
|
|
717
802
|
}
|
|
718
803
|
));
|
|
719
804
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
720
|
-
var DropdownMenuRadioItem =
|
|
805
|
+
var DropdownMenuRadioItem = React8.forwardRef(({ className, children, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
721
806
|
DropdownMenuPrimitive.RadioItem,
|
|
722
807
|
{
|
|
723
808
|
ref,
|
|
@@ -728,13 +813,13 @@ var DropdownMenuRadioItem = React6.forwardRef(({ className, children, variant, .
|
|
|
728
813
|
),
|
|
729
814
|
...props,
|
|
730
815
|
children: [
|
|
731
|
-
/* @__PURE__ */ (0,
|
|
816
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
732
817
|
children
|
|
733
818
|
]
|
|
734
819
|
}
|
|
735
820
|
));
|
|
736
821
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
737
|
-
var DropdownMenuLabel =
|
|
822
|
+
var DropdownMenuLabel = React8.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
738
823
|
DropdownMenuPrimitive.Label,
|
|
739
824
|
{
|
|
740
825
|
ref,
|
|
@@ -747,7 +832,7 @@ var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref)
|
|
|
747
832
|
}
|
|
748
833
|
));
|
|
749
834
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
750
|
-
var DropdownMenuSeparator =
|
|
835
|
+
var DropdownMenuSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
751
836
|
DropdownMenuPrimitive.Separator,
|
|
752
837
|
{
|
|
753
838
|
ref,
|
|
@@ -760,7 +845,7 @@ var DropdownMenuShortcut = ({
|
|
|
760
845
|
className,
|
|
761
846
|
...props
|
|
762
847
|
}) => {
|
|
763
|
-
return /* @__PURE__ */ (0,
|
|
848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
764
849
|
"span",
|
|
765
850
|
{
|
|
766
851
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -772,12 +857,12 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
772
857
|
|
|
773
858
|
// src/components/Field.tsx
|
|
774
859
|
var import_react = require("react");
|
|
775
|
-
var
|
|
860
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
776
861
|
var import_react_separator = require("@radix-ui/react-separator");
|
|
777
|
-
var
|
|
778
|
-
var
|
|
862
|
+
var import_radix_ui7 = require("radix-ui");
|
|
863
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
779
864
|
function FieldSet({ className, ...props }) {
|
|
780
|
-
return /* @__PURE__ */ (0,
|
|
865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
781
866
|
"fieldset",
|
|
782
867
|
{
|
|
783
868
|
"data-slot": "field-set",
|
|
@@ -795,7 +880,7 @@ function FieldLegend({
|
|
|
795
880
|
variant = "legend",
|
|
796
881
|
...props
|
|
797
882
|
}) {
|
|
798
|
-
return /* @__PURE__ */ (0,
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
799
884
|
"legend",
|
|
800
885
|
{
|
|
801
886
|
"data-slot": "field-legend",
|
|
@@ -803,7 +888,7 @@ function FieldLegend({
|
|
|
803
888
|
className: cn(
|
|
804
889
|
"mb-3 font-medium",
|
|
805
890
|
"data-[variant=legend]:text-base",
|
|
806
|
-
"data-[variant=label]:text-
|
|
891
|
+
"data-[variant=label]:text-xs",
|
|
807
892
|
className
|
|
808
893
|
),
|
|
809
894
|
...props
|
|
@@ -811,7 +896,7 @@ function FieldLegend({
|
|
|
811
896
|
);
|
|
812
897
|
}
|
|
813
898
|
function FieldGroup({ className, ...props }) {
|
|
814
|
-
return /* @__PURE__ */ (0,
|
|
899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
815
900
|
"div",
|
|
816
901
|
{
|
|
817
902
|
"data-slot": "field-group",
|
|
@@ -823,8 +908,8 @@ function FieldGroup({ className, ...props }) {
|
|
|
823
908
|
}
|
|
824
909
|
);
|
|
825
910
|
}
|
|
826
|
-
var fieldVariants = (0,
|
|
827
|
-
"group/field flex w-full gap-
|
|
911
|
+
var fieldVariants = (0, import_class_variance_authority9.cva)(
|
|
912
|
+
"group/field flex w-full gap-1.5 data-[invalid=true]:text-destructive",
|
|
828
913
|
{
|
|
829
914
|
variants: {
|
|
830
915
|
orientation: {
|
|
@@ -851,7 +936,7 @@ function Field({
|
|
|
851
936
|
orientation = "vertical",
|
|
852
937
|
...props
|
|
853
938
|
}) {
|
|
854
|
-
return /* @__PURE__ */ (0,
|
|
939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
855
940
|
"div",
|
|
856
941
|
{
|
|
857
942
|
role: "group",
|
|
@@ -863,7 +948,7 @@ function Field({
|
|
|
863
948
|
);
|
|
864
949
|
}
|
|
865
950
|
function FieldContent({ className, ...props }) {
|
|
866
|
-
return /* @__PURE__ */ (0,
|
|
951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
867
952
|
"div",
|
|
868
953
|
{
|
|
869
954
|
"data-slot": "field-content",
|
|
@@ -879,8 +964,8 @@ function FieldLabel({
|
|
|
879
964
|
className,
|
|
880
965
|
...props
|
|
881
966
|
}) {
|
|
882
|
-
return /* @__PURE__ */ (0,
|
|
883
|
-
|
|
967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
968
|
+
import_radix_ui7.Label.Root,
|
|
884
969
|
{
|
|
885
970
|
"data-slot": "field-label",
|
|
886
971
|
className: cn(
|
|
@@ -894,12 +979,12 @@ function FieldLabel({
|
|
|
894
979
|
);
|
|
895
980
|
}
|
|
896
981
|
function FieldTitle({ className, ...props }) {
|
|
897
|
-
return /* @__PURE__ */ (0,
|
|
982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
898
983
|
"div",
|
|
899
984
|
{
|
|
900
985
|
"data-slot": "field-label",
|
|
901
986
|
className: cn(
|
|
902
|
-
"flex w-fit items-center gap-2 text-
|
|
987
|
+
"flex w-fit items-center gap-2 text-xs leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
903
988
|
className
|
|
904
989
|
),
|
|
905
990
|
...props
|
|
@@ -907,7 +992,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
907
992
|
);
|
|
908
993
|
}
|
|
909
994
|
function FieldDescription({ className, ...props }) {
|
|
910
|
-
return /* @__PURE__ */ (0,
|
|
995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
911
996
|
"p",
|
|
912
997
|
{
|
|
913
998
|
"data-slot": "field-description",
|
|
@@ -926,7 +1011,7 @@ function FieldSeparator({
|
|
|
926
1011
|
className,
|
|
927
1012
|
...props
|
|
928
1013
|
}) {
|
|
929
|
-
return /* @__PURE__ */ (0,
|
|
1014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
930
1015
|
"div",
|
|
931
1016
|
{
|
|
932
1017
|
"data-slot": "field-separator",
|
|
@@ -937,8 +1022,8 @@ function FieldSeparator({
|
|
|
937
1022
|
),
|
|
938
1023
|
...props,
|
|
939
1024
|
children: [
|
|
940
|
-
/* @__PURE__ */ (0,
|
|
941
|
-
children && /* @__PURE__ */ (0,
|
|
1025
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_separator.Separator, { className: "absolute inset-0 top-1/2" }),
|
|
1026
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
942
1027
|
"span",
|
|
943
1028
|
{
|
|
944
1029
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -966,19 +1051,19 @@ function FieldError({
|
|
|
966
1051
|
if (errors.length === 1 && errors[0]?.message) {
|
|
967
1052
|
return errors[0].message;
|
|
968
1053
|
}
|
|
969
|
-
return /* @__PURE__ */ (0,
|
|
970
|
-
(error, index2) => error?.message && /* @__PURE__ */ (0,
|
|
1054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
1055
|
+
(error, index2) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: error.message }, index2)
|
|
971
1056
|
) });
|
|
972
1057
|
}, [children, errors]);
|
|
973
1058
|
if (!content) {
|
|
974
1059
|
return null;
|
|
975
1060
|
}
|
|
976
|
-
return /* @__PURE__ */ (0,
|
|
1061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
977
1062
|
"div",
|
|
978
1063
|
{
|
|
979
1064
|
role: "alert",
|
|
980
1065
|
"data-slot": "field-error",
|
|
981
|
-
className: cn("text-destructive text-
|
|
1066
|
+
className: cn("text-destructive text-[10px] font-normal", className),
|
|
982
1067
|
...props,
|
|
983
1068
|
children: content
|
|
984
1069
|
}
|
|
@@ -987,12 +1072,12 @@ function FieldError({
|
|
|
987
1072
|
|
|
988
1073
|
// src/components/Labels.tsx
|
|
989
1074
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
990
|
-
var
|
|
1075
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
991
1076
|
function Label3({
|
|
992
1077
|
className,
|
|
993
1078
|
...props
|
|
994
1079
|
}) {
|
|
995
|
-
return /* @__PURE__ */ (0,
|
|
1080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
996
1081
|
LabelPrimitive.Root,
|
|
997
1082
|
{
|
|
998
1083
|
"data-slot": "label",
|
|
@@ -1006,10 +1091,10 @@ function Label3({
|
|
|
1006
1091
|
}
|
|
1007
1092
|
|
|
1008
1093
|
// src/components/Pagination.tsx
|
|
1009
|
-
var
|
|
1010
|
-
var
|
|
1094
|
+
var import_lucide_react4 = require("lucide-react");
|
|
1095
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1011
1096
|
function Pagination({ className, ...props }) {
|
|
1012
|
-
return /* @__PURE__ */ (0,
|
|
1097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1013
1098
|
"nav",
|
|
1014
1099
|
{
|
|
1015
1100
|
role: "navigation",
|
|
@@ -1024,7 +1109,7 @@ function PaginationContent({
|
|
|
1024
1109
|
className,
|
|
1025
1110
|
...props
|
|
1026
1111
|
}) {
|
|
1027
|
-
return /* @__PURE__ */ (0,
|
|
1112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1028
1113
|
"ul",
|
|
1029
1114
|
{
|
|
1030
1115
|
"data-slot": "pagination-content",
|
|
@@ -1034,7 +1119,7 @@ function PaginationContent({
|
|
|
1034
1119
|
);
|
|
1035
1120
|
}
|
|
1036
1121
|
function PaginationItem({ ...props }) {
|
|
1037
|
-
return /* @__PURE__ */ (0,
|
|
1122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
1038
1123
|
}
|
|
1039
1124
|
function PaginationLink({
|
|
1040
1125
|
className,
|
|
@@ -1042,7 +1127,7 @@ function PaginationLink({
|
|
|
1042
1127
|
size: size4,
|
|
1043
1128
|
...props
|
|
1044
1129
|
}) {
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1046
1131
|
"a",
|
|
1047
1132
|
{
|
|
1048
1133
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -1057,7 +1142,7 @@ function PaginationPrevious({
|
|
|
1057
1142
|
className,
|
|
1058
1143
|
...props
|
|
1059
1144
|
}) {
|
|
1060
|
-
return /* @__PURE__ */ (0,
|
|
1145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1061
1146
|
PaginationLink,
|
|
1062
1147
|
{
|
|
1063
1148
|
"aria-label": "Go to previous page",
|
|
@@ -1065,8 +1150,8 @@ function PaginationPrevious({
|
|
|
1065
1150
|
className: cn("flex flex-row items-center gap-1 px-2.5 sm:pl-2.5", className),
|
|
1066
1151
|
...props,
|
|
1067
1152
|
children: [
|
|
1068
|
-
/* @__PURE__ */ (0,
|
|
1069
|
-
/* @__PURE__ */ (0,
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ChevronLeftIcon, {}),
|
|
1154
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "hidden sm:block", children: "Previous" })
|
|
1070
1155
|
]
|
|
1071
1156
|
}
|
|
1072
1157
|
);
|
|
@@ -1075,7 +1160,7 @@ function PaginationNext({
|
|
|
1075
1160
|
className,
|
|
1076
1161
|
...props
|
|
1077
1162
|
}) {
|
|
1078
|
-
return /* @__PURE__ */ (0,
|
|
1163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1079
1164
|
PaginationLink,
|
|
1080
1165
|
{
|
|
1081
1166
|
"aria-label": "Go to next page",
|
|
@@ -1083,8 +1168,8 @@ function PaginationNext({
|
|
|
1083
1168
|
className: cn("flex flex-row items-center gap-1 px-2.5 sm:pr-2.5", className),
|
|
1084
1169
|
...props,
|
|
1085
1170
|
children: [
|
|
1086
|
-
/* @__PURE__ */ (0,
|
|
1087
|
-
/* @__PURE__ */ (0,
|
|
1171
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "hidden sm:block", children: "Next" }),
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ChevronRightIcon, {})
|
|
1088
1173
|
]
|
|
1089
1174
|
}
|
|
1090
1175
|
);
|
|
@@ -1093,7 +1178,7 @@ function PaginationEllipsis({
|
|
|
1093
1178
|
className,
|
|
1094
1179
|
...props
|
|
1095
1180
|
}) {
|
|
1096
|
-
return /* @__PURE__ */ (0,
|
|
1181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1097
1182
|
"span",
|
|
1098
1183
|
{
|
|
1099
1184
|
"aria-hidden": true,
|
|
@@ -1101,28 +1186,28 @@ function PaginationEllipsis({
|
|
|
1101
1186
|
className: cn("flex size-9 items-center justify-center", className),
|
|
1102
1187
|
...props,
|
|
1103
1188
|
children: [
|
|
1104
|
-
/* @__PURE__ */ (0,
|
|
1105
|
-
/* @__PURE__ */ (0,
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.MoreHorizontalIcon, { className: "size-4" }),
|
|
1190
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
1106
1191
|
]
|
|
1107
1192
|
}
|
|
1108
1193
|
);
|
|
1109
1194
|
}
|
|
1110
1195
|
|
|
1111
1196
|
// src/components/Popover.tsx
|
|
1112
|
-
var
|
|
1197
|
+
var React9 = __toESM(require("react"), 1);
|
|
1113
1198
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1114
|
-
var
|
|
1199
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1115
1200
|
var Popover = PopoverPrimitive.Root;
|
|
1116
1201
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1117
1202
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1118
|
-
var PopoverContent =
|
|
1203
|
+
var PopoverContent = React9.forwardRef(
|
|
1119
1204
|
({
|
|
1120
1205
|
className,
|
|
1121
1206
|
align = "center",
|
|
1122
1207
|
sideOffset = 6,
|
|
1123
1208
|
collisionPadding = 8,
|
|
1124
1209
|
...props
|
|
1125
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
1210
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1126
1211
|
PopoverPrimitive.Content,
|
|
1127
1212
|
{
|
|
1128
1213
|
ref,
|
|
@@ -1151,12 +1236,12 @@ PopoverContent.displayName = "PopoverContent";
|
|
|
1151
1236
|
|
|
1152
1237
|
// src/components/Tooltip.tsx
|
|
1153
1238
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
1154
|
-
var
|
|
1239
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1155
1240
|
function TooltipProvider({
|
|
1156
1241
|
delayDuration = 0,
|
|
1157
1242
|
...props
|
|
1158
1243
|
}) {
|
|
1159
|
-
return /* @__PURE__ */ (0,
|
|
1244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1160
1245
|
TooltipPrimitive.Provider,
|
|
1161
1246
|
{
|
|
1162
1247
|
"data-slot": "tooltip-provider",
|
|
@@ -1168,12 +1253,12 @@ function TooltipProvider({
|
|
|
1168
1253
|
function Tooltip({
|
|
1169
1254
|
...props
|
|
1170
1255
|
}) {
|
|
1171
|
-
return /* @__PURE__ */ (0,
|
|
1256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
1172
1257
|
}
|
|
1173
1258
|
function TooltipTrigger({
|
|
1174
1259
|
...props
|
|
1175
1260
|
}) {
|
|
1176
|
-
return /* @__PURE__ */ (0,
|
|
1261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1177
1262
|
}
|
|
1178
1263
|
function TooltipContent({
|
|
1179
1264
|
className,
|
|
@@ -1181,7 +1266,7 @@ function TooltipContent({
|
|
|
1181
1266
|
children,
|
|
1182
1267
|
...props
|
|
1183
1268
|
}) {
|
|
1184
|
-
return /* @__PURE__ */ (0,
|
|
1269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1185
1270
|
TooltipPrimitive.Content,
|
|
1186
1271
|
{
|
|
1187
1272
|
"data-slot": "tooltip-content",
|
|
@@ -1193,15 +1278,15 @@ function TooltipContent({
|
|
|
1193
1278
|
...props,
|
|
1194
1279
|
children: [
|
|
1195
1280
|
children,
|
|
1196
|
-
/* @__PURE__ */ (0,
|
|
1281
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipPrimitive.Arrow, { className: "fill-slate-900 dark:fill-slate-100 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
1197
1282
|
]
|
|
1198
1283
|
}
|
|
1199
1284
|
) });
|
|
1200
1285
|
}
|
|
1201
1286
|
|
|
1202
1287
|
// src/components/Card/card.styles.ts
|
|
1203
|
-
var
|
|
1204
|
-
var cardVariants = (0,
|
|
1288
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
1289
|
+
var cardVariants = (0, import_class_variance_authority10.cva)(
|
|
1205
1290
|
"rounded-lg border p-4 transition-all duration-300",
|
|
1206
1291
|
{
|
|
1207
1292
|
variants: {
|
|
@@ -1222,14 +1307,14 @@ var cardVariants = (0, import_class_variance_authority8.cva)(
|
|
|
1222
1307
|
);
|
|
1223
1308
|
|
|
1224
1309
|
// src/components/Card/index.tsx
|
|
1225
|
-
var
|
|
1310
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1226
1311
|
function Card({ variant, className, ...props }) {
|
|
1227
|
-
return /* @__PURE__ */ (0,
|
|
1312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: cn(cardVariants({ variant }), className), ...props });
|
|
1228
1313
|
}
|
|
1229
1314
|
|
|
1230
1315
|
// src/components/Input/input.styles.ts
|
|
1231
|
-
var
|
|
1232
|
-
var inputVariants = (0,
|
|
1316
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1317
|
+
var inputVariants = (0, import_class_variance_authority11.cva)(
|
|
1233
1318
|
"w-full rounded-md border transition-colors bg-card text-content placeholder:text-muted focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1234
1319
|
{
|
|
1235
1320
|
variants: {
|
|
@@ -1238,9 +1323,9 @@ var inputVariants = (0, import_class_variance_authority9.cva)(
|
|
|
1238
1323
|
error: "border-destructive hover:border-destructive focus:border-destructive focus:ring-destructive/20"
|
|
1239
1324
|
},
|
|
1240
1325
|
size: {
|
|
1241
|
-
sm: "h-8 px-2.5 text-
|
|
1242
|
-
md: "
|
|
1243
|
-
lg: "h-12 px-4 text-
|
|
1326
|
+
sm: "h-8 px-2.5 text-xs",
|
|
1327
|
+
md: "px-[14px] py-3 text-xs",
|
|
1328
|
+
lg: "h-12 px-4 text-sm"
|
|
1244
1329
|
}
|
|
1245
1330
|
},
|
|
1246
1331
|
defaultVariants: {
|
|
@@ -1251,9 +1336,9 @@ var inputVariants = (0, import_class_variance_authority9.cva)(
|
|
|
1251
1336
|
);
|
|
1252
1337
|
|
|
1253
1338
|
// src/components/Input/index.tsx
|
|
1254
|
-
var
|
|
1339
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1255
1340
|
function Input({ size: size4, variant, className, ...props }) {
|
|
1256
|
-
return /* @__PURE__ */ (0,
|
|
1341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1257
1342
|
"input",
|
|
1258
1343
|
{
|
|
1259
1344
|
className: cn(inputVariants({ variant, size: size4 }), className),
|
|
@@ -1263,10 +1348,10 @@ function Input({ size: size4, variant, className, ...props }) {
|
|
|
1263
1348
|
}
|
|
1264
1349
|
|
|
1265
1350
|
// src/components/Select/index.tsx
|
|
1266
|
-
var
|
|
1351
|
+
var React40 = __toESM(require("react"), 1);
|
|
1267
1352
|
|
|
1268
1353
|
// node_modules/@radix-ui/react-select/dist/index.mjs
|
|
1269
|
-
var
|
|
1354
|
+
var React39 = __toESM(require("react"), 1);
|
|
1270
1355
|
var ReactDOM4 = __toESM(require("react-dom"), 1);
|
|
1271
1356
|
|
|
1272
1357
|
// node_modules/@radix-ui/number/dist/index.mjs
|
|
@@ -1289,24 +1374,24 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
1289
1374
|
var import_react2 = __toESM(require("react"), 1);
|
|
1290
1375
|
|
|
1291
1376
|
// node_modules/@radix-ui/react-context/dist/index.mjs
|
|
1292
|
-
var
|
|
1293
|
-
var
|
|
1377
|
+
var React10 = __toESM(require("react"), 1);
|
|
1378
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1294
1379
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
1295
1380
|
let defaultContexts = [];
|
|
1296
1381
|
function createContext32(rootComponentName, defaultContext) {
|
|
1297
|
-
const BaseContext =
|
|
1382
|
+
const BaseContext = React10.createContext(defaultContext);
|
|
1298
1383
|
const index2 = defaultContexts.length;
|
|
1299
1384
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
1300
1385
|
const Provider2 = (props) => {
|
|
1301
1386
|
const { scope, children, ...context } = props;
|
|
1302
1387
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
1303
|
-
const value =
|
|
1304
|
-
return /* @__PURE__ */ (0,
|
|
1388
|
+
const value = React10.useMemo(() => context, Object.values(context));
|
|
1389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Context.Provider, { value, children });
|
|
1305
1390
|
};
|
|
1306
1391
|
Provider2.displayName = rootComponentName + "Provider";
|
|
1307
1392
|
function useContext22(consumerName, scope) {
|
|
1308
1393
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
1309
|
-
const context =
|
|
1394
|
+
const context = React10.useContext(Context);
|
|
1310
1395
|
if (context) return context;
|
|
1311
1396
|
if (defaultContext !== void 0) return defaultContext;
|
|
1312
1397
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -1315,11 +1400,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
1315
1400
|
}
|
|
1316
1401
|
const createScope = () => {
|
|
1317
1402
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
1318
|
-
return
|
|
1403
|
+
return React10.createContext(defaultContext);
|
|
1319
1404
|
});
|
|
1320
1405
|
return function useScope(scope) {
|
|
1321
1406
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
1322
|
-
return
|
|
1407
|
+
return React10.useMemo(
|
|
1323
1408
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
1324
1409
|
[scope, contexts]
|
|
1325
1410
|
);
|
|
@@ -1342,7 +1427,7 @@ function composeContextScopes(...scopes) {
|
|
|
1342
1427
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
1343
1428
|
return { ...nextScopes2, ...currentScope };
|
|
1344
1429
|
}, {});
|
|
1345
|
-
return
|
|
1430
|
+
return React10.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
1346
1431
|
};
|
|
1347
1432
|
};
|
|
1348
1433
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -1350,7 +1435,7 @@ function composeContextScopes(...scopes) {
|
|
|
1350
1435
|
}
|
|
1351
1436
|
|
|
1352
1437
|
// node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
1353
|
-
var
|
|
1438
|
+
var React11 = __toESM(require("react"), 1);
|
|
1354
1439
|
function setRef(ref, value) {
|
|
1355
1440
|
if (typeof ref === "function") {
|
|
1356
1441
|
return ref(value);
|
|
@@ -1383,15 +1468,15 @@ function composeRefs(...refs) {
|
|
|
1383
1468
|
};
|
|
1384
1469
|
}
|
|
1385
1470
|
function useComposedRefs(...refs) {
|
|
1386
|
-
return
|
|
1471
|
+
return React11.useCallback(composeRefs(...refs), refs);
|
|
1387
1472
|
}
|
|
1388
1473
|
|
|
1389
1474
|
// node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
1390
1475
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1391
|
-
var
|
|
1476
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1392
1477
|
var import_react3 = __toESM(require("react"), 1);
|
|
1393
1478
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
1394
|
-
var
|
|
1479
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1395
1480
|
function createCollection(name) {
|
|
1396
1481
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
1397
1482
|
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
|
|
@@ -1403,7 +1488,7 @@ function createCollection(name) {
|
|
|
1403
1488
|
const { scope, children } = props;
|
|
1404
1489
|
const ref = import_react2.default.useRef(null);
|
|
1405
1490
|
const itemMap = import_react2.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
1406
|
-
return /* @__PURE__ */ (0,
|
|
1491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
1407
1492
|
};
|
|
1408
1493
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
1409
1494
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
@@ -1413,7 +1498,7 @@ function createCollection(name) {
|
|
|
1413
1498
|
const { scope, children } = props;
|
|
1414
1499
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
1415
1500
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
1416
|
-
return /* @__PURE__ */ (0,
|
|
1501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CollectionSlotImpl, { ref: composedRefs, children });
|
|
1417
1502
|
}
|
|
1418
1503
|
);
|
|
1419
1504
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
@@ -1430,7 +1515,7 @@ function createCollection(name) {
|
|
|
1430
1515
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
1431
1516
|
return () => void context.itemMap.delete(ref);
|
|
1432
1517
|
});
|
|
1433
|
-
return /* @__PURE__ */ (0,
|
|
1518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
1434
1519
|
}
|
|
1435
1520
|
);
|
|
1436
1521
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
@@ -1456,22 +1541,22 @@ function createCollection(name) {
|
|
|
1456
1541
|
}
|
|
1457
1542
|
|
|
1458
1543
|
// node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
1459
|
-
var
|
|
1460
|
-
var
|
|
1461
|
-
var DirectionContext =
|
|
1544
|
+
var React13 = __toESM(require("react"), 1);
|
|
1545
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1546
|
+
var DirectionContext = React13.createContext(void 0);
|
|
1462
1547
|
function useDirection(localDir) {
|
|
1463
|
-
const globalDir =
|
|
1548
|
+
const globalDir = React13.useContext(DirectionContext);
|
|
1464
1549
|
return localDir || globalDir || "ltr";
|
|
1465
1550
|
}
|
|
1466
1551
|
|
|
1467
1552
|
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
1468
|
-
var
|
|
1553
|
+
var React17 = __toESM(require("react"), 1);
|
|
1469
1554
|
|
|
1470
1555
|
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
1471
|
-
var
|
|
1556
|
+
var React14 = __toESM(require("react"), 1);
|
|
1472
1557
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
1473
1558
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
1474
|
-
var
|
|
1559
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1475
1560
|
var NODES = [
|
|
1476
1561
|
"a",
|
|
1477
1562
|
"button",
|
|
@@ -1493,13 +1578,13 @@ var NODES = [
|
|
|
1493
1578
|
];
|
|
1494
1579
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
1495
1580
|
const Slot3 = (0, import_react_slot4.createSlot)(`Primitive.${node}`);
|
|
1496
|
-
const Node2 =
|
|
1581
|
+
const Node2 = React14.forwardRef((props, forwardedRef) => {
|
|
1497
1582
|
const { asChild, ...primitiveProps } = props;
|
|
1498
1583
|
const Comp = asChild ? Slot3 : node;
|
|
1499
1584
|
if (typeof window !== "undefined") {
|
|
1500
1585
|
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
1501
1586
|
}
|
|
1502
|
-
return /* @__PURE__ */ (0,
|
|
1587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
1503
1588
|
});
|
|
1504
1589
|
Node2.displayName = `Primitive.${node}`;
|
|
1505
1590
|
return { ...primitive, [node]: Node2 };
|
|
@@ -1509,20 +1594,20 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
1509
1594
|
}
|
|
1510
1595
|
|
|
1511
1596
|
// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
1512
|
-
var
|
|
1597
|
+
var React15 = __toESM(require("react"), 1);
|
|
1513
1598
|
function useCallbackRef(callback) {
|
|
1514
|
-
const callbackRef =
|
|
1515
|
-
|
|
1599
|
+
const callbackRef = React15.useRef(callback);
|
|
1600
|
+
React15.useEffect(() => {
|
|
1516
1601
|
callbackRef.current = callback;
|
|
1517
1602
|
});
|
|
1518
|
-
return
|
|
1603
|
+
return React15.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
1519
1604
|
}
|
|
1520
1605
|
|
|
1521
1606
|
// node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
1522
|
-
var
|
|
1607
|
+
var React16 = __toESM(require("react"), 1);
|
|
1523
1608
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
1524
1609
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
1525
|
-
|
|
1610
|
+
React16.useEffect(() => {
|
|
1526
1611
|
const handleKeyDown = (event) => {
|
|
1527
1612
|
if (event.key === "Escape") {
|
|
1528
1613
|
onEscapeKeyDown(event);
|
|
@@ -1534,18 +1619,18 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
1534
1619
|
}
|
|
1535
1620
|
|
|
1536
1621
|
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
1537
|
-
var
|
|
1622
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1538
1623
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
1539
1624
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
1540
1625
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
1541
1626
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
1542
1627
|
var originalBodyPointerEvents;
|
|
1543
|
-
var DismissableLayerContext =
|
|
1628
|
+
var DismissableLayerContext = React17.createContext({
|
|
1544
1629
|
layers: /* @__PURE__ */ new Set(),
|
|
1545
1630
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
1546
1631
|
branches: /* @__PURE__ */ new Set()
|
|
1547
1632
|
});
|
|
1548
|
-
var DismissableLayer =
|
|
1633
|
+
var DismissableLayer = React17.forwardRef(
|
|
1549
1634
|
(props, forwardedRef) => {
|
|
1550
1635
|
const {
|
|
1551
1636
|
disableOutsidePointerEvents = false,
|
|
@@ -1556,10 +1641,10 @@ var DismissableLayer = React15.forwardRef(
|
|
|
1556
1641
|
onDismiss,
|
|
1557
1642
|
...layerProps
|
|
1558
1643
|
} = props;
|
|
1559
|
-
const context =
|
|
1560
|
-
const [node, setNode] =
|
|
1644
|
+
const context = React17.useContext(DismissableLayerContext);
|
|
1645
|
+
const [node, setNode] = React17.useState(null);
|
|
1561
1646
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
1562
|
-
const [, force] =
|
|
1647
|
+
const [, force] = React17.useState({});
|
|
1563
1648
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
1564
1649
|
const layers = Array.from(context.layers);
|
|
1565
1650
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -1592,7 +1677,7 @@ var DismissableLayer = React15.forwardRef(
|
|
|
1592
1677
|
onDismiss();
|
|
1593
1678
|
}
|
|
1594
1679
|
}, ownerDocument);
|
|
1595
|
-
|
|
1680
|
+
React17.useEffect(() => {
|
|
1596
1681
|
if (!node) return;
|
|
1597
1682
|
if (disableOutsidePointerEvents) {
|
|
1598
1683
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -1609,7 +1694,7 @@ var DismissableLayer = React15.forwardRef(
|
|
|
1609
1694
|
}
|
|
1610
1695
|
};
|
|
1611
1696
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
1612
|
-
|
|
1697
|
+
React17.useEffect(() => {
|
|
1613
1698
|
return () => {
|
|
1614
1699
|
if (!node) return;
|
|
1615
1700
|
context.layers.delete(node);
|
|
@@ -1617,12 +1702,12 @@ var DismissableLayer = React15.forwardRef(
|
|
|
1617
1702
|
dispatchUpdate();
|
|
1618
1703
|
};
|
|
1619
1704
|
}, [node, context]);
|
|
1620
|
-
|
|
1705
|
+
React17.useEffect(() => {
|
|
1621
1706
|
const handleUpdate = () => force({});
|
|
1622
1707
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
1623
1708
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
1624
1709
|
}, []);
|
|
1625
|
-
return /* @__PURE__ */ (0,
|
|
1710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1626
1711
|
Primitive.div,
|
|
1627
1712
|
{
|
|
1628
1713
|
...layerProps,
|
|
@@ -1643,11 +1728,11 @@ var DismissableLayer = React15.forwardRef(
|
|
|
1643
1728
|
);
|
|
1644
1729
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
1645
1730
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
1646
|
-
var DismissableLayerBranch =
|
|
1647
|
-
const context =
|
|
1648
|
-
const ref =
|
|
1731
|
+
var DismissableLayerBranch = React17.forwardRef((props, forwardedRef) => {
|
|
1732
|
+
const context = React17.useContext(DismissableLayerContext);
|
|
1733
|
+
const ref = React17.useRef(null);
|
|
1649
1734
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
1650
|
-
|
|
1735
|
+
React17.useEffect(() => {
|
|
1651
1736
|
const node = ref.current;
|
|
1652
1737
|
if (node) {
|
|
1653
1738
|
context.branches.add(node);
|
|
@@ -1656,15 +1741,15 @@ var DismissableLayerBranch = React15.forwardRef((props, forwardedRef) => {
|
|
|
1656
1741
|
};
|
|
1657
1742
|
}
|
|
1658
1743
|
}, [context.branches]);
|
|
1659
|
-
return /* @__PURE__ */ (0,
|
|
1744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Primitive.div, { ...props, ref: composedRefs });
|
|
1660
1745
|
});
|
|
1661
1746
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
1662
1747
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
1663
1748
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
1664
|
-
const isPointerInsideReactTreeRef =
|
|
1665
|
-
const handleClickRef =
|
|
1749
|
+
const isPointerInsideReactTreeRef = React17.useRef(false);
|
|
1750
|
+
const handleClickRef = React17.useRef(() => {
|
|
1666
1751
|
});
|
|
1667
|
-
|
|
1752
|
+
React17.useEffect(() => {
|
|
1668
1753
|
const handlePointerDown = (event) => {
|
|
1669
1754
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
1670
1755
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -1705,8 +1790,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
1705
1790
|
}
|
|
1706
1791
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
1707
1792
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
1708
|
-
const isFocusInsideReactTreeRef =
|
|
1709
|
-
|
|
1793
|
+
const isFocusInsideReactTreeRef = React17.useRef(false);
|
|
1794
|
+
React17.useEffect(() => {
|
|
1710
1795
|
const handleFocus = (event) => {
|
|
1711
1796
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
1712
1797
|
const eventDetail = { originalEvent: event };
|
|
@@ -1739,10 +1824,10 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
1739
1824
|
}
|
|
1740
1825
|
|
|
1741
1826
|
// node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
1742
|
-
var
|
|
1827
|
+
var React18 = __toESM(require("react"), 1);
|
|
1743
1828
|
var count = 0;
|
|
1744
1829
|
function useFocusGuards() {
|
|
1745
|
-
|
|
1830
|
+
React18.useEffect(() => {
|
|
1746
1831
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
1747
1832
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
1748
1833
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -1767,13 +1852,13 @@ function createFocusGuard() {
|
|
|
1767
1852
|
}
|
|
1768
1853
|
|
|
1769
1854
|
// node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
1770
|
-
var
|
|
1771
|
-
var
|
|
1855
|
+
var React19 = __toESM(require("react"), 1);
|
|
1856
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1772
1857
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
1773
1858
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
1774
1859
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
1775
1860
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
1776
|
-
var FocusScope =
|
|
1861
|
+
var FocusScope = React19.forwardRef((props, forwardedRef) => {
|
|
1777
1862
|
const {
|
|
1778
1863
|
loop = false,
|
|
1779
1864
|
trapped = false,
|
|
@@ -1781,12 +1866,12 @@ var FocusScope = React17.forwardRef((props, forwardedRef) => {
|
|
|
1781
1866
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
1782
1867
|
...scopeProps
|
|
1783
1868
|
} = props;
|
|
1784
|
-
const [container, setContainer] =
|
|
1869
|
+
const [container, setContainer] = React19.useState(null);
|
|
1785
1870
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
1786
1871
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
1787
|
-
const lastFocusedElementRef =
|
|
1872
|
+
const lastFocusedElementRef = React19.useRef(null);
|
|
1788
1873
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
1789
|
-
const focusScope =
|
|
1874
|
+
const focusScope = React19.useRef({
|
|
1790
1875
|
paused: false,
|
|
1791
1876
|
pause() {
|
|
1792
1877
|
this.paused = true;
|
|
@@ -1795,7 +1880,7 @@ var FocusScope = React17.forwardRef((props, forwardedRef) => {
|
|
|
1795
1880
|
this.paused = false;
|
|
1796
1881
|
}
|
|
1797
1882
|
}).current;
|
|
1798
|
-
|
|
1883
|
+
React19.useEffect(() => {
|
|
1799
1884
|
if (trapped) {
|
|
1800
1885
|
let handleFocusIn2 = function(event) {
|
|
1801
1886
|
if (focusScope.paused || !container) return;
|
|
@@ -1831,7 +1916,7 @@ var FocusScope = React17.forwardRef((props, forwardedRef) => {
|
|
|
1831
1916
|
};
|
|
1832
1917
|
}
|
|
1833
1918
|
}, [trapped, container, focusScope.paused]);
|
|
1834
|
-
|
|
1919
|
+
React19.useEffect(() => {
|
|
1835
1920
|
if (container) {
|
|
1836
1921
|
focusScopesStack.add(focusScope);
|
|
1837
1922
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -1862,7 +1947,7 @@ var FocusScope = React17.forwardRef((props, forwardedRef) => {
|
|
|
1862
1947
|
};
|
|
1863
1948
|
}
|
|
1864
1949
|
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
1865
|
-
const handleKeyDown =
|
|
1950
|
+
const handleKeyDown = React19.useCallback(
|
|
1866
1951
|
(event) => {
|
|
1867
1952
|
if (!loop && !trapped) return;
|
|
1868
1953
|
if (focusScope.paused) return;
|
|
@@ -1887,7 +1972,7 @@ var FocusScope = React17.forwardRef((props, forwardedRef) => {
|
|
|
1887
1972
|
},
|
|
1888
1973
|
[loop, trapped, focusScope.paused]
|
|
1889
1974
|
);
|
|
1890
|
-
return /* @__PURE__ */ (0,
|
|
1975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
1891
1976
|
});
|
|
1892
1977
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
1893
1978
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -1971,18 +2056,18 @@ function removeLinks(items) {
|
|
|
1971
2056
|
}
|
|
1972
2057
|
|
|
1973
2058
|
// node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1974
|
-
var
|
|
2059
|
+
var React21 = __toESM(require("react"), 1);
|
|
1975
2060
|
|
|
1976
2061
|
// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
1977
|
-
var
|
|
1978
|
-
var useLayoutEffect2 = globalThis?.document ?
|
|
2062
|
+
var React20 = __toESM(require("react"), 1);
|
|
2063
|
+
var useLayoutEffect2 = globalThis?.document ? React20.useLayoutEffect : () => {
|
|
1979
2064
|
};
|
|
1980
2065
|
|
|
1981
2066
|
// node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1982
|
-
var useReactId =
|
|
2067
|
+
var useReactId = React21[" useId ".trim().toString()] || (() => void 0);
|
|
1983
2068
|
var count2 = 0;
|
|
1984
2069
|
function useId(deterministicId) {
|
|
1985
|
-
const [id, setId] =
|
|
2070
|
+
const [id, setId] = React21.useState(useReactId());
|
|
1986
2071
|
useLayoutEffect2(() => {
|
|
1987
2072
|
if (!deterministicId) setId((reactId) => reactId ?? String(count2++));
|
|
1988
2073
|
}, [deterministicId]);
|
|
@@ -1990,7 +2075,7 @@ function useId(deterministicId) {
|
|
|
1990
2075
|
}
|
|
1991
2076
|
|
|
1992
2077
|
// node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
1993
|
-
var
|
|
2078
|
+
var React26 = __toESM(require("react"), 1);
|
|
1994
2079
|
|
|
1995
2080
|
// node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
1996
2081
|
var sides = ["top", "right", "bottom", "left"];
|
|
@@ -3610,7 +3695,7 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
3610
3695
|
};
|
|
3611
3696
|
|
|
3612
3697
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
3613
|
-
var
|
|
3698
|
+
var React23 = __toESM(require("react"), 1);
|
|
3614
3699
|
var import_react4 = require("react");
|
|
3615
3700
|
var ReactDOM2 = __toESM(require("react-dom"), 1);
|
|
3616
3701
|
var isClient = typeof document !== "undefined";
|
|
@@ -3676,7 +3761,7 @@ function roundByDPR(element, value) {
|
|
|
3676
3761
|
return Math.round(value * dpr) / dpr;
|
|
3677
3762
|
}
|
|
3678
3763
|
function useLatestRef(value) {
|
|
3679
|
-
const ref =
|
|
3764
|
+
const ref = React23.useRef(value);
|
|
3680
3765
|
index(() => {
|
|
3681
3766
|
ref.current = value;
|
|
3682
3767
|
});
|
|
@@ -3699,7 +3784,7 @@ function useFloating(options) {
|
|
|
3699
3784
|
whileElementsMounted,
|
|
3700
3785
|
open
|
|
3701
3786
|
} = options;
|
|
3702
|
-
const [data, setData] =
|
|
3787
|
+
const [data, setData] = React23.useState({
|
|
3703
3788
|
x: 0,
|
|
3704
3789
|
y: 0,
|
|
3705
3790
|
strategy,
|
|
@@ -3707,19 +3792,19 @@ function useFloating(options) {
|
|
|
3707
3792
|
middlewareData: {},
|
|
3708
3793
|
isPositioned: false
|
|
3709
3794
|
});
|
|
3710
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
3795
|
+
const [latestMiddleware, setLatestMiddleware] = React23.useState(middleware);
|
|
3711
3796
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
3712
3797
|
setLatestMiddleware(middleware);
|
|
3713
3798
|
}
|
|
3714
|
-
const [_reference, _setReference] =
|
|
3715
|
-
const [_floating, _setFloating] =
|
|
3716
|
-
const setReference =
|
|
3799
|
+
const [_reference, _setReference] = React23.useState(null);
|
|
3800
|
+
const [_floating, _setFloating] = React23.useState(null);
|
|
3801
|
+
const setReference = React23.useCallback((node) => {
|
|
3717
3802
|
if (node !== referenceRef.current) {
|
|
3718
3803
|
referenceRef.current = node;
|
|
3719
3804
|
_setReference(node);
|
|
3720
3805
|
}
|
|
3721
3806
|
}, []);
|
|
3722
|
-
const setFloating =
|
|
3807
|
+
const setFloating = React23.useCallback((node) => {
|
|
3723
3808
|
if (node !== floatingRef.current) {
|
|
3724
3809
|
floatingRef.current = node;
|
|
3725
3810
|
_setFloating(node);
|
|
@@ -3727,14 +3812,14 @@ function useFloating(options) {
|
|
|
3727
3812
|
}, []);
|
|
3728
3813
|
const referenceEl = externalReference || _reference;
|
|
3729
3814
|
const floatingEl = externalFloating || _floating;
|
|
3730
|
-
const referenceRef =
|
|
3731
|
-
const floatingRef =
|
|
3732
|
-
const dataRef =
|
|
3815
|
+
const referenceRef = React23.useRef(null);
|
|
3816
|
+
const floatingRef = React23.useRef(null);
|
|
3817
|
+
const dataRef = React23.useRef(data);
|
|
3733
3818
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
3734
3819
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
3735
3820
|
const platformRef = useLatestRef(platform2);
|
|
3736
3821
|
const openRef = useLatestRef(open);
|
|
3737
|
-
const update =
|
|
3822
|
+
const update = React23.useCallback(() => {
|
|
3738
3823
|
if (!referenceRef.current || !floatingRef.current) {
|
|
3739
3824
|
return;
|
|
3740
3825
|
}
|
|
@@ -3772,7 +3857,7 @@ function useFloating(options) {
|
|
|
3772
3857
|
}));
|
|
3773
3858
|
}
|
|
3774
3859
|
}, [open]);
|
|
3775
|
-
const isMountedRef =
|
|
3860
|
+
const isMountedRef = React23.useRef(false);
|
|
3776
3861
|
index(() => {
|
|
3777
3862
|
isMountedRef.current = true;
|
|
3778
3863
|
return () => {
|
|
@@ -3789,17 +3874,17 @@ function useFloating(options) {
|
|
|
3789
3874
|
update();
|
|
3790
3875
|
}
|
|
3791
3876
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
3792
|
-
const refs =
|
|
3877
|
+
const refs = React23.useMemo(() => ({
|
|
3793
3878
|
reference: referenceRef,
|
|
3794
3879
|
floating: floatingRef,
|
|
3795
3880
|
setReference,
|
|
3796
3881
|
setFloating
|
|
3797
3882
|
}), [setReference, setFloating]);
|
|
3798
|
-
const elements =
|
|
3883
|
+
const elements = React23.useMemo(() => ({
|
|
3799
3884
|
reference: referenceEl,
|
|
3800
3885
|
floating: floatingEl
|
|
3801
3886
|
}), [referenceEl, floatingEl]);
|
|
3802
|
-
const floatingStyles =
|
|
3887
|
+
const floatingStyles = React23.useMemo(() => {
|
|
3803
3888
|
const initialStyles = {
|
|
3804
3889
|
position: strategy,
|
|
3805
3890
|
left: 0,
|
|
@@ -3825,7 +3910,7 @@ function useFloating(options) {
|
|
|
3825
3910
|
top: y
|
|
3826
3911
|
};
|
|
3827
3912
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
3828
|
-
return
|
|
3913
|
+
return React23.useMemo(() => ({
|
|
3829
3914
|
...data,
|
|
3830
3915
|
update,
|
|
3831
3916
|
refs,
|
|
@@ -3921,12 +4006,12 @@ var arrow3 = (options, deps) => {
|
|
|
3921
4006
|
};
|
|
3922
4007
|
|
|
3923
4008
|
// node_modules/@radix-ui/react-arrow/dist/index.mjs
|
|
3924
|
-
var
|
|
3925
|
-
var
|
|
4009
|
+
var React24 = __toESM(require("react"), 1);
|
|
4010
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3926
4011
|
var NAME = "Arrow";
|
|
3927
|
-
var Arrow2 =
|
|
4012
|
+
var Arrow2 = React24.forwardRef((props, forwardedRef) => {
|
|
3928
4013
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
3929
|
-
return /* @__PURE__ */ (0,
|
|
4014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3930
4015
|
Primitive.svg,
|
|
3931
4016
|
{
|
|
3932
4017
|
...arrowProps,
|
|
@@ -3935,7 +4020,7 @@ var Arrow2 = React21.forwardRef((props, forwardedRef) => {
|
|
|
3935
4020
|
height,
|
|
3936
4021
|
viewBox: "0 0 30 10",
|
|
3937
4022
|
preserveAspectRatio: "none",
|
|
3938
|
-
children: props.asChild ? children : /* @__PURE__ */ (0,
|
|
4023
|
+
children: props.asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("polygon", { points: "0,0 30,0 15,10" })
|
|
3939
4024
|
}
|
|
3940
4025
|
);
|
|
3941
4026
|
});
|
|
@@ -3943,9 +4028,9 @@ Arrow2.displayName = NAME;
|
|
|
3943
4028
|
var Root5 = Arrow2;
|
|
3944
4029
|
|
|
3945
4030
|
// node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
3946
|
-
var
|
|
4031
|
+
var React25 = __toESM(require("react"), 1);
|
|
3947
4032
|
function useSize(element) {
|
|
3948
|
-
const [size4, setSize] =
|
|
4033
|
+
const [size4, setSize] = React25.useState(void 0);
|
|
3949
4034
|
useLayoutEffect2(() => {
|
|
3950
4035
|
if (element) {
|
|
3951
4036
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -3980,38 +4065,38 @@ function useSize(element) {
|
|
|
3980
4065
|
}
|
|
3981
4066
|
|
|
3982
4067
|
// node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
3983
|
-
var
|
|
4068
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3984
4069
|
var POPPER_NAME = "Popper";
|
|
3985
4070
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
3986
4071
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
3987
4072
|
var Popper = (props) => {
|
|
3988
4073
|
const { __scopePopper, children } = props;
|
|
3989
|
-
const [anchor, setAnchor] =
|
|
3990
|
-
return /* @__PURE__ */ (0,
|
|
4074
|
+
const [anchor, setAnchor] = React26.useState(null);
|
|
4075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
3991
4076
|
};
|
|
3992
4077
|
Popper.displayName = POPPER_NAME;
|
|
3993
4078
|
var ANCHOR_NAME = "PopperAnchor";
|
|
3994
|
-
var PopperAnchor =
|
|
4079
|
+
var PopperAnchor = React26.forwardRef(
|
|
3995
4080
|
(props, forwardedRef) => {
|
|
3996
4081
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
3997
4082
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
3998
|
-
const ref =
|
|
4083
|
+
const ref = React26.useRef(null);
|
|
3999
4084
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
4000
|
-
const anchorRef =
|
|
4001
|
-
|
|
4085
|
+
const anchorRef = React26.useRef(null);
|
|
4086
|
+
React26.useEffect(() => {
|
|
4002
4087
|
const previousAnchor = anchorRef.current;
|
|
4003
4088
|
anchorRef.current = virtualRef?.current || ref.current;
|
|
4004
4089
|
if (previousAnchor !== anchorRef.current) {
|
|
4005
4090
|
context.onAnchorChange(anchorRef.current);
|
|
4006
4091
|
}
|
|
4007
4092
|
});
|
|
4008
|
-
return virtualRef ? null : /* @__PURE__ */ (0,
|
|
4093
|
+
return virtualRef ? null : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
4009
4094
|
}
|
|
4010
4095
|
);
|
|
4011
4096
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
4012
4097
|
var CONTENT_NAME = "PopperContent";
|
|
4013
4098
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
4014
|
-
var PopperContent =
|
|
4099
|
+
var PopperContent = React26.forwardRef(
|
|
4015
4100
|
(props, forwardedRef) => {
|
|
4016
4101
|
const {
|
|
4017
4102
|
__scopePopper,
|
|
@@ -4030,9 +4115,9 @@ var PopperContent = React24.forwardRef(
|
|
|
4030
4115
|
...contentProps
|
|
4031
4116
|
} = props;
|
|
4032
4117
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
4033
|
-
const [content, setContent] =
|
|
4118
|
+
const [content, setContent] = React26.useState(null);
|
|
4034
4119
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
4035
|
-
const [arrow4, setArrow] =
|
|
4120
|
+
const [arrow4, setArrow] = React26.useState(null);
|
|
4036
4121
|
const arrowSize = useSize(arrow4);
|
|
4037
4122
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
4038
4123
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -4094,11 +4179,11 @@ var PopperContent = React24.forwardRef(
|
|
|
4094
4179
|
const arrowX = middlewareData.arrow?.x;
|
|
4095
4180
|
const arrowY = middlewareData.arrow?.y;
|
|
4096
4181
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
4097
|
-
const [contentZIndex, setContentZIndex] =
|
|
4182
|
+
const [contentZIndex, setContentZIndex] = React26.useState();
|
|
4098
4183
|
useLayoutEffect2(() => {
|
|
4099
4184
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
4100
4185
|
}, [content]);
|
|
4101
|
-
return /* @__PURE__ */ (0,
|
|
4186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4102
4187
|
"div",
|
|
4103
4188
|
{
|
|
4104
4189
|
ref: refs.setFloating,
|
|
@@ -4122,7 +4207,7 @@ var PopperContent = React24.forwardRef(
|
|
|
4122
4207
|
}
|
|
4123
4208
|
},
|
|
4124
4209
|
dir: props.dir,
|
|
4125
|
-
children: /* @__PURE__ */ (0,
|
|
4210
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4126
4211
|
PopperContentProvider,
|
|
4127
4212
|
{
|
|
4128
4213
|
scope: __scopePopper,
|
|
@@ -4131,7 +4216,7 @@ var PopperContent = React24.forwardRef(
|
|
|
4131
4216
|
arrowX,
|
|
4132
4217
|
arrowY,
|
|
4133
4218
|
shouldHideArrow: cannotCenterArrow,
|
|
4134
|
-
children: /* @__PURE__ */ (0,
|
|
4219
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4135
4220
|
Primitive.div,
|
|
4136
4221
|
{
|
|
4137
4222
|
"data-side": placedSide,
|
|
@@ -4160,7 +4245,7 @@ var OPPOSITE_SIDE = {
|
|
|
4160
4245
|
bottom: "top",
|
|
4161
4246
|
left: "right"
|
|
4162
4247
|
};
|
|
4163
|
-
var PopperArrow =
|
|
4248
|
+
var PopperArrow = React26.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
4164
4249
|
const { __scopePopper, ...arrowProps } = props;
|
|
4165
4250
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
4166
4251
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -4168,7 +4253,7 @@ var PopperArrow = React24.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
4168
4253
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
4169
4254
|
// doesn't report size as we'd expect on SVG elements.
|
|
4170
4255
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
4171
|
-
/* @__PURE__ */ (0,
|
|
4256
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4172
4257
|
"span",
|
|
4173
4258
|
{
|
|
4174
4259
|
ref: contentContext.onArrowChange,
|
|
@@ -4191,7 +4276,7 @@ var PopperArrow = React24.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
4191
4276
|
}[contentContext.placedSide],
|
|
4192
4277
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
4193
4278
|
},
|
|
4194
|
-
children: /* @__PURE__ */ (0,
|
|
4279
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4195
4280
|
Root5,
|
|
4196
4281
|
{
|
|
4197
4282
|
...arrowProps,
|
|
@@ -4252,16 +4337,16 @@ var Content4 = PopperContent;
|
|
|
4252
4337
|
var Arrow3 = PopperArrow;
|
|
4253
4338
|
|
|
4254
4339
|
// node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
4255
|
-
var
|
|
4340
|
+
var React27 = __toESM(require("react"), 1);
|
|
4256
4341
|
var import_react_dom2 = __toESM(require("react-dom"), 1);
|
|
4257
|
-
var
|
|
4342
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4258
4343
|
var PORTAL_NAME = "Portal";
|
|
4259
|
-
var Portal4 =
|
|
4344
|
+
var Portal4 = React27.forwardRef((props, forwardedRef) => {
|
|
4260
4345
|
const { container: containerProp, ...portalProps } = props;
|
|
4261
|
-
const [mounted, setMounted] =
|
|
4346
|
+
const [mounted, setMounted] = React27.useState(false);
|
|
4262
4347
|
useLayoutEffect2(() => setMounted(true), []);
|
|
4263
4348
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
4264
|
-
return container ? import_react_dom2.default.createPortal(/* @__PURE__ */ (0,
|
|
4349
|
+
return container ? import_react_dom2.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
4265
4350
|
});
|
|
4266
4351
|
Portal4.displayName = PORTAL_NAME;
|
|
4267
4352
|
|
|
@@ -4269,9 +4354,9 @@ Portal4.displayName = PORTAL_NAME;
|
|
|
4269
4354
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
4270
4355
|
|
|
4271
4356
|
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
4272
|
-
var
|
|
4273
|
-
var
|
|
4274
|
-
var useInsertionEffect =
|
|
4357
|
+
var React28 = __toESM(require("react"), 1);
|
|
4358
|
+
var React29 = __toESM(require("react"), 1);
|
|
4359
|
+
var useInsertionEffect = React28[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
4275
4360
|
function useControllableState({
|
|
4276
4361
|
prop,
|
|
4277
4362
|
defaultProp,
|
|
@@ -4286,8 +4371,8 @@ function useControllableState({
|
|
|
4286
4371
|
const isControlled = prop !== void 0;
|
|
4287
4372
|
const value = isControlled ? prop : uncontrolledProp;
|
|
4288
4373
|
if (true) {
|
|
4289
|
-
const isControlledRef =
|
|
4290
|
-
|
|
4374
|
+
const isControlledRef = React28.useRef(prop !== void 0);
|
|
4375
|
+
React28.useEffect(() => {
|
|
4291
4376
|
const wasControlled = isControlledRef.current;
|
|
4292
4377
|
if (wasControlled !== isControlled) {
|
|
4293
4378
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -4299,7 +4384,7 @@ function useControllableState({
|
|
|
4299
4384
|
isControlledRef.current = isControlled;
|
|
4300
4385
|
}, [isControlled, caller]);
|
|
4301
4386
|
}
|
|
4302
|
-
const setValue =
|
|
4387
|
+
const setValue = React28.useCallback(
|
|
4303
4388
|
(nextValue) => {
|
|
4304
4389
|
if (isControlled) {
|
|
4305
4390
|
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
@@ -4318,13 +4403,13 @@ function useUncontrolledState({
|
|
|
4318
4403
|
defaultProp,
|
|
4319
4404
|
onChange
|
|
4320
4405
|
}) {
|
|
4321
|
-
const [value, setValue] =
|
|
4322
|
-
const prevValueRef =
|
|
4323
|
-
const onChangeRef =
|
|
4406
|
+
const [value, setValue] = React28.useState(defaultProp);
|
|
4407
|
+
const prevValueRef = React28.useRef(value);
|
|
4408
|
+
const onChangeRef = React28.useRef(onChange);
|
|
4324
4409
|
useInsertionEffect(() => {
|
|
4325
4410
|
onChangeRef.current = onChange;
|
|
4326
4411
|
}, [onChange]);
|
|
4327
|
-
|
|
4412
|
+
React28.useEffect(() => {
|
|
4328
4413
|
if (prevValueRef.current !== value) {
|
|
4329
4414
|
onChangeRef.current?.(value);
|
|
4330
4415
|
prevValueRef.current = value;
|
|
@@ -4337,10 +4422,10 @@ function isFunction(value) {
|
|
|
4337
4422
|
}
|
|
4338
4423
|
|
|
4339
4424
|
// node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
4340
|
-
var
|
|
4425
|
+
var React30 = __toESM(require("react"), 1);
|
|
4341
4426
|
function usePrevious(value) {
|
|
4342
|
-
const ref =
|
|
4343
|
-
return
|
|
4427
|
+
const ref = React30.useRef({ value, previous: value });
|
|
4428
|
+
return React30.useMemo(() => {
|
|
4344
4429
|
if (ref.current.value !== value) {
|
|
4345
4430
|
ref.current.previous = ref.current.value;
|
|
4346
4431
|
ref.current.value = value;
|
|
@@ -4350,8 +4435,8 @@ function usePrevious(value) {
|
|
|
4350
4435
|
}
|
|
4351
4436
|
|
|
4352
4437
|
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
4353
|
-
var
|
|
4354
|
-
var
|
|
4438
|
+
var React31 = __toESM(require("react"), 1);
|
|
4439
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4355
4440
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
4356
4441
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
4357
4442
|
position: "absolute",
|
|
@@ -4366,9 +4451,9 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
4366
4451
|
wordWrap: "normal"
|
|
4367
4452
|
});
|
|
4368
4453
|
var NAME2 = "VisuallyHidden";
|
|
4369
|
-
var VisuallyHidden =
|
|
4454
|
+
var VisuallyHidden = React31.forwardRef(
|
|
4370
4455
|
(props, forwardedRef) => {
|
|
4371
|
-
return /* @__PURE__ */ (0,
|
|
4456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4372
4457
|
Primitive.span,
|
|
4373
4458
|
{
|
|
4374
4459
|
...props,
|
|
@@ -4534,10 +4619,10 @@ function __spreadArray(to, from, pack) {
|
|
|
4534
4619
|
}
|
|
4535
4620
|
|
|
4536
4621
|
// node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
4537
|
-
var
|
|
4622
|
+
var React38 = __toESM(require("react"));
|
|
4538
4623
|
|
|
4539
4624
|
// node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
4540
|
-
var
|
|
4625
|
+
var React34 = __toESM(require("react"));
|
|
4541
4626
|
|
|
4542
4627
|
// node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
4543
4628
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
@@ -4584,8 +4669,8 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
4584
4669
|
}
|
|
4585
4670
|
|
|
4586
4671
|
// node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
4587
|
-
var
|
|
4588
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
4672
|
+
var React32 = __toESM(require("react"));
|
|
4673
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React32.useLayoutEffect : React32.useEffect;
|
|
4589
4674
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
4590
4675
|
function useMergeRefs(refs, defaultValue) {
|
|
4591
4676
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -4702,7 +4787,7 @@ function createSidecarMedium(options) {
|
|
|
4702
4787
|
}
|
|
4703
4788
|
|
|
4704
4789
|
// node_modules/use-sidecar/dist/es2015/exports.js
|
|
4705
|
-
var
|
|
4790
|
+
var React33 = __toESM(require("react"));
|
|
4706
4791
|
var SideCar = function(_a) {
|
|
4707
4792
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
4708
4793
|
if (!sideCar) {
|
|
@@ -4712,7 +4797,7 @@ var SideCar = function(_a) {
|
|
|
4712
4797
|
if (!Target) {
|
|
4713
4798
|
throw new Error("Sidecar medium not found");
|
|
4714
4799
|
}
|
|
4715
|
-
return
|
|
4800
|
+
return React33.createElement(Target, __assign({}, rest));
|
|
4716
4801
|
};
|
|
4717
4802
|
SideCar.isSideCarExport = true;
|
|
4718
4803
|
function exportSidecar(medium, exported) {
|
|
@@ -4727,9 +4812,9 @@ var effectCar = createSidecarMedium();
|
|
|
4727
4812
|
var nothing = function() {
|
|
4728
4813
|
return;
|
|
4729
4814
|
};
|
|
4730
|
-
var RemoveScroll =
|
|
4731
|
-
var ref =
|
|
4732
|
-
var _a =
|
|
4815
|
+
var RemoveScroll = React34.forwardRef(function(props, parentRef) {
|
|
4816
|
+
var ref = React34.useRef(null);
|
|
4817
|
+
var _a = React34.useState({
|
|
4733
4818
|
onScrollCapture: nothing,
|
|
4734
4819
|
onWheelCapture: nothing,
|
|
4735
4820
|
onTouchMoveCapture: nothing
|
|
@@ -4738,11 +4823,11 @@ var RemoveScroll = React32.forwardRef(function(props, parentRef) {
|
|
|
4738
4823
|
var SideCar2 = sideCar;
|
|
4739
4824
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
4740
4825
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
4741
|
-
return
|
|
4742
|
-
|
|
4826
|
+
return React34.createElement(
|
|
4827
|
+
React34.Fragment,
|
|
4743
4828
|
null,
|
|
4744
|
-
enabled &&
|
|
4745
|
-
forwardProps ?
|
|
4829
|
+
enabled && React34.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
4830
|
+
forwardProps ? React34.cloneElement(React34.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React34.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
4746
4831
|
);
|
|
4747
4832
|
});
|
|
4748
4833
|
RemoveScroll.defaultProps = {
|
|
@@ -4756,13 +4841,13 @@ RemoveScroll.classNames = {
|
|
|
4756
4841
|
};
|
|
4757
4842
|
|
|
4758
4843
|
// node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
4759
|
-
var
|
|
4844
|
+
var React37 = __toESM(require("react"));
|
|
4760
4845
|
|
|
4761
4846
|
// node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
4762
|
-
var
|
|
4847
|
+
var React36 = __toESM(require("react"));
|
|
4763
4848
|
|
|
4764
4849
|
// node_modules/react-style-singleton/dist/es2015/hook.js
|
|
4765
|
-
var
|
|
4850
|
+
var React35 = __toESM(require("react"));
|
|
4766
4851
|
|
|
4767
4852
|
// node_modules/get-nonce/dist/es2015/index.js
|
|
4768
4853
|
var currentNonce;
|
|
@@ -4826,7 +4911,7 @@ var stylesheetSingleton = function() {
|
|
|
4826
4911
|
var styleHookSingleton = function() {
|
|
4827
4912
|
var sheet = stylesheetSingleton();
|
|
4828
4913
|
return function(styles, isDynamic) {
|
|
4829
|
-
|
|
4914
|
+
React35.useEffect(function() {
|
|
4830
4915
|
sheet.add(styles);
|
|
4831
4916
|
return function() {
|
|
4832
4917
|
sheet.remove();
|
|
@@ -4900,7 +4985,7 @@ var getCurrentUseCounter = function() {
|
|
|
4900
4985
|
return isFinite(counter) ? counter : 0;
|
|
4901
4986
|
};
|
|
4902
4987
|
var useLockAttribute = function() {
|
|
4903
|
-
|
|
4988
|
+
React36.useEffect(function() {
|
|
4904
4989
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
4905
4990
|
return function() {
|
|
4906
4991
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -4915,10 +5000,10 @@ var useLockAttribute = function() {
|
|
|
4915
5000
|
var RemoveScrollBar = function(_a) {
|
|
4916
5001
|
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
4917
5002
|
useLockAttribute();
|
|
4918
|
-
var gap =
|
|
5003
|
+
var gap = React36.useMemo(function() {
|
|
4919
5004
|
return getGapWidth(gapMode);
|
|
4920
5005
|
}, [gapMode]);
|
|
4921
|
-
return
|
|
5006
|
+
return React36.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
4922
5007
|
};
|
|
4923
5008
|
|
|
4924
5009
|
// node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -5059,16 +5144,16 @@ var generateStyle = function(id) {
|
|
|
5059
5144
|
var idCounter = 0;
|
|
5060
5145
|
var lockStack = [];
|
|
5061
5146
|
function RemoveScrollSideCar(props) {
|
|
5062
|
-
var shouldPreventQueue =
|
|
5063
|
-
var touchStartRef =
|
|
5064
|
-
var activeAxis =
|
|
5065
|
-
var id =
|
|
5066
|
-
var Style2 =
|
|
5067
|
-
var lastProps =
|
|
5068
|
-
|
|
5147
|
+
var shouldPreventQueue = React37.useRef([]);
|
|
5148
|
+
var touchStartRef = React37.useRef([0, 0]);
|
|
5149
|
+
var activeAxis = React37.useRef();
|
|
5150
|
+
var id = React37.useState(idCounter++)[0];
|
|
5151
|
+
var Style2 = React37.useState(styleSingleton)[0];
|
|
5152
|
+
var lastProps = React37.useRef(props);
|
|
5153
|
+
React37.useEffect(function() {
|
|
5069
5154
|
lastProps.current = props;
|
|
5070
5155
|
}, [props]);
|
|
5071
|
-
|
|
5156
|
+
React37.useEffect(function() {
|
|
5072
5157
|
if (props.inert) {
|
|
5073
5158
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
5074
5159
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -5084,7 +5169,7 @@ function RemoveScrollSideCar(props) {
|
|
|
5084
5169
|
}
|
|
5085
5170
|
return;
|
|
5086
5171
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
5087
|
-
var shouldCancelEvent =
|
|
5172
|
+
var shouldCancelEvent = React37.useCallback(function(event, parent) {
|
|
5088
5173
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
5089
5174
|
return !lastProps.current.allowPinchZoom;
|
|
5090
5175
|
}
|
|
@@ -5126,7 +5211,7 @@ function RemoveScrollSideCar(props) {
|
|
|
5126
5211
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
5127
5212
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
5128
5213
|
}, []);
|
|
5129
|
-
var shouldPrevent =
|
|
5214
|
+
var shouldPrevent = React37.useCallback(function(_event) {
|
|
5130
5215
|
var event = _event;
|
|
5131
5216
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
5132
5217
|
return;
|
|
@@ -5153,7 +5238,7 @@ function RemoveScrollSideCar(props) {
|
|
|
5153
5238
|
}
|
|
5154
5239
|
}
|
|
5155
5240
|
}, []);
|
|
5156
|
-
var shouldCancel =
|
|
5241
|
+
var shouldCancel = React37.useCallback(function(name, delta, target, should) {
|
|
5157
5242
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
5158
5243
|
shouldPreventQueue.current.push(event);
|
|
5159
5244
|
setTimeout(function() {
|
|
@@ -5162,17 +5247,17 @@ function RemoveScrollSideCar(props) {
|
|
|
5162
5247
|
});
|
|
5163
5248
|
}, 1);
|
|
5164
5249
|
}, []);
|
|
5165
|
-
var scrollTouchStart =
|
|
5250
|
+
var scrollTouchStart = React37.useCallback(function(event) {
|
|
5166
5251
|
touchStartRef.current = getTouchXY(event);
|
|
5167
5252
|
activeAxis.current = void 0;
|
|
5168
5253
|
}, []);
|
|
5169
|
-
var scrollWheel =
|
|
5254
|
+
var scrollWheel = React37.useCallback(function(event) {
|
|
5170
5255
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
5171
5256
|
}, []);
|
|
5172
|
-
var scrollTouchMove =
|
|
5257
|
+
var scrollTouchMove = React37.useCallback(function(event) {
|
|
5173
5258
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
5174
5259
|
}, []);
|
|
5175
|
-
|
|
5260
|
+
React37.useEffect(function() {
|
|
5176
5261
|
lockStack.push(Style2);
|
|
5177
5262
|
props.setCallbacks({
|
|
5178
5263
|
onScrollCapture: scrollWheel,
|
|
@@ -5192,11 +5277,11 @@ function RemoveScrollSideCar(props) {
|
|
|
5192
5277
|
};
|
|
5193
5278
|
}, []);
|
|
5194
5279
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
5195
|
-
return
|
|
5196
|
-
|
|
5280
|
+
return React37.createElement(
|
|
5281
|
+
React37.Fragment,
|
|
5197
5282
|
null,
|
|
5198
|
-
inert ?
|
|
5199
|
-
removeScrollBar ?
|
|
5283
|
+
inert ? React37.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
5284
|
+
removeScrollBar ? React37.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
5200
5285
|
);
|
|
5201
5286
|
}
|
|
5202
5287
|
function getOutermostShadowParent(node) {
|
|
@@ -5215,14 +5300,14 @@ function getOutermostShadowParent(node) {
|
|
|
5215
5300
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
5216
5301
|
|
|
5217
5302
|
// node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
5218
|
-
var ReactRemoveScroll =
|
|
5219
|
-
return
|
|
5303
|
+
var ReactRemoveScroll = React38.forwardRef(function(props, ref) {
|
|
5304
|
+
return React38.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
5220
5305
|
});
|
|
5221
5306
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
5222
5307
|
var Combination_default = ReactRemoveScroll;
|
|
5223
5308
|
|
|
5224
5309
|
// node_modules/@radix-ui/react-select/dist/index.mjs
|
|
5225
|
-
var
|
|
5310
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5226
5311
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
5227
5312
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
5228
5313
|
var SELECT_NAME = "Select";
|
|
@@ -5252,9 +5337,9 @@ var Select = (props) => {
|
|
|
5252
5337
|
form
|
|
5253
5338
|
} = props;
|
|
5254
5339
|
const popperScope = usePopperScope(__scopeSelect);
|
|
5255
|
-
const [trigger, setTrigger] =
|
|
5256
|
-
const [valueNode, setValueNode] =
|
|
5257
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
5340
|
+
const [trigger, setTrigger] = React39.useState(null);
|
|
5341
|
+
const [valueNode, setValueNode] = React39.useState(null);
|
|
5342
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React39.useState(false);
|
|
5258
5343
|
const direction = useDirection(dir);
|
|
5259
5344
|
const [open, setOpen] = useControllableState({
|
|
5260
5345
|
prop: openProp,
|
|
@@ -5268,11 +5353,11 @@ var Select = (props) => {
|
|
|
5268
5353
|
onChange: onValueChange,
|
|
5269
5354
|
caller: SELECT_NAME
|
|
5270
5355
|
});
|
|
5271
|
-
const triggerPointerDownPosRef =
|
|
5356
|
+
const triggerPointerDownPosRef = React39.useRef(null);
|
|
5272
5357
|
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
|
5273
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
5358
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React39.useState(/* @__PURE__ */ new Set());
|
|
5274
5359
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
5275
|
-
return /* @__PURE__ */ (0,
|
|
5360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Root22, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5276
5361
|
SelectProvider,
|
|
5277
5362
|
{
|
|
5278
5363
|
required,
|
|
@@ -5292,14 +5377,14 @@ var Select = (props) => {
|
|
|
5292
5377
|
triggerPointerDownPosRef,
|
|
5293
5378
|
disabled,
|
|
5294
5379
|
children: [
|
|
5295
|
-
/* @__PURE__ */ (0,
|
|
5380
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5296
5381
|
SelectNativeOptionsProvider,
|
|
5297
5382
|
{
|
|
5298
5383
|
scope: props.__scopeSelect,
|
|
5299
|
-
onNativeOptionAdd:
|
|
5384
|
+
onNativeOptionAdd: React39.useCallback((option) => {
|
|
5300
5385
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
5301
5386
|
}, []),
|
|
5302
|
-
onNativeOptionRemove:
|
|
5387
|
+
onNativeOptionRemove: React39.useCallback((option) => {
|
|
5303
5388
|
setNativeOptionsSet((prev) => {
|
|
5304
5389
|
const optionsSet = new Set(prev);
|
|
5305
5390
|
optionsSet.delete(option);
|
|
@@ -5309,7 +5394,7 @@ var Select = (props) => {
|
|
|
5309
5394
|
children
|
|
5310
5395
|
}
|
|
5311
5396
|
) }),
|
|
5312
|
-
isFormControl ? /* @__PURE__ */ (0,
|
|
5397
|
+
isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5313
5398
|
SelectBubbleInput,
|
|
5314
5399
|
{
|
|
5315
5400
|
"aria-hidden": true,
|
|
@@ -5322,7 +5407,7 @@ var Select = (props) => {
|
|
|
5322
5407
|
disabled,
|
|
5323
5408
|
form,
|
|
5324
5409
|
children: [
|
|
5325
|
-
value === void 0 ? /* @__PURE__ */ (0,
|
|
5410
|
+
value === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: "" }) : null,
|
|
5326
5411
|
Array.from(nativeOptionsSet)
|
|
5327
5412
|
]
|
|
5328
5413
|
},
|
|
@@ -5334,7 +5419,7 @@ var Select = (props) => {
|
|
|
5334
5419
|
};
|
|
5335
5420
|
Select.displayName = SELECT_NAME;
|
|
5336
5421
|
var TRIGGER_NAME = "SelectTrigger";
|
|
5337
|
-
var SelectTrigger =
|
|
5422
|
+
var SelectTrigger = React39.forwardRef(
|
|
5338
5423
|
(props, forwardedRef) => {
|
|
5339
5424
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
5340
5425
|
const popperScope = usePopperScope(__scopeSelect);
|
|
@@ -5342,7 +5427,7 @@ var SelectTrigger = React37.forwardRef(
|
|
|
5342
5427
|
const isDisabled = context.disabled || disabled;
|
|
5343
5428
|
const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
|
|
5344
5429
|
const getItems = useCollection(__scopeSelect);
|
|
5345
|
-
const pointerTypeRef =
|
|
5430
|
+
const pointerTypeRef = React39.useRef("touch");
|
|
5346
5431
|
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
|
|
5347
5432
|
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
5348
5433
|
const currentItem = enabledItems.find((item) => item.value === context.value);
|
|
@@ -5363,7 +5448,7 @@ var SelectTrigger = React37.forwardRef(
|
|
|
5363
5448
|
};
|
|
5364
5449
|
}
|
|
5365
5450
|
};
|
|
5366
|
-
return /* @__PURE__ */ (0,
|
|
5451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Anchor2, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5367
5452
|
Primitive.button,
|
|
5368
5453
|
{
|
|
5369
5454
|
type: "button",
|
|
@@ -5412,7 +5497,7 @@ var SelectTrigger = React37.forwardRef(
|
|
|
5412
5497
|
);
|
|
5413
5498
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
5414
5499
|
var VALUE_NAME = "SelectValue";
|
|
5415
|
-
var SelectValue =
|
|
5500
|
+
var SelectValue = React39.forwardRef(
|
|
5416
5501
|
(props, forwardedRef) => {
|
|
5417
5502
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
5418
5503
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
@@ -5422,47 +5507,47 @@ var SelectValue = React37.forwardRef(
|
|
|
5422
5507
|
useLayoutEffect2(() => {
|
|
5423
5508
|
onValueNodeHasChildrenChange(hasChildren);
|
|
5424
5509
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
5425
|
-
return /* @__PURE__ */ (0,
|
|
5510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5426
5511
|
Primitive.span,
|
|
5427
5512
|
{
|
|
5428
5513
|
...valueProps,
|
|
5429
5514
|
ref: composedRefs,
|
|
5430
5515
|
style: { pointerEvents: "none" },
|
|
5431
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ (0,
|
|
5516
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: placeholder }) : children
|
|
5432
5517
|
}
|
|
5433
5518
|
);
|
|
5434
5519
|
}
|
|
5435
5520
|
);
|
|
5436
5521
|
SelectValue.displayName = VALUE_NAME;
|
|
5437
5522
|
var ICON_NAME = "SelectIcon";
|
|
5438
|
-
var SelectIcon =
|
|
5523
|
+
var SelectIcon = React39.forwardRef(
|
|
5439
5524
|
(props, forwardedRef) => {
|
|
5440
5525
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
5441
|
-
return /* @__PURE__ */ (0,
|
|
5526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" });
|
|
5442
5527
|
}
|
|
5443
5528
|
);
|
|
5444
5529
|
SelectIcon.displayName = ICON_NAME;
|
|
5445
5530
|
var PORTAL_NAME2 = "SelectPortal";
|
|
5446
5531
|
var SelectPortal = (props) => {
|
|
5447
|
-
return /* @__PURE__ */ (0,
|
|
5532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Portal4, { asChild: true, ...props });
|
|
5448
5533
|
};
|
|
5449
5534
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
5450
5535
|
var CONTENT_NAME2 = "SelectContent";
|
|
5451
|
-
var SelectContent =
|
|
5536
|
+
var SelectContent = React39.forwardRef(
|
|
5452
5537
|
(props, forwardedRef) => {
|
|
5453
5538
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
5454
|
-
const [fragment, setFragment] =
|
|
5539
|
+
const [fragment, setFragment] = React39.useState();
|
|
5455
5540
|
useLayoutEffect2(() => {
|
|
5456
5541
|
setFragment(new DocumentFragment());
|
|
5457
5542
|
}, []);
|
|
5458
5543
|
if (!context.open) {
|
|
5459
5544
|
const frag = fragment;
|
|
5460
5545
|
return frag ? ReactDOM4.createPortal(
|
|
5461
|
-
/* @__PURE__ */ (0,
|
|
5546
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: props.children }) }) }),
|
|
5462
5547
|
frag
|
|
5463
5548
|
) : null;
|
|
5464
5549
|
}
|
|
5465
|
-
return /* @__PURE__ */ (0,
|
|
5550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
5466
5551
|
}
|
|
5467
5552
|
);
|
|
5468
5553
|
SelectContent.displayName = CONTENT_NAME2;
|
|
@@ -5470,7 +5555,7 @@ var CONTENT_MARGIN = 10;
|
|
|
5470
5555
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
5471
5556
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
5472
5557
|
var Slot2 = (0, import_react_slot5.createSlot)("SelectContent.RemoveScroll");
|
|
5473
|
-
var SelectContentImpl =
|
|
5558
|
+
var SelectContentImpl = React39.forwardRef(
|
|
5474
5559
|
(props, forwardedRef) => {
|
|
5475
5560
|
const {
|
|
5476
5561
|
__scopeSelect,
|
|
@@ -5494,21 +5579,21 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5494
5579
|
...contentProps
|
|
5495
5580
|
} = props;
|
|
5496
5581
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
5497
|
-
const [content, setContent] =
|
|
5498
|
-
const [viewport, setViewport] =
|
|
5582
|
+
const [content, setContent] = React39.useState(null);
|
|
5583
|
+
const [viewport, setViewport] = React39.useState(null);
|
|
5499
5584
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
5500
|
-
const [selectedItem, setSelectedItem] =
|
|
5501
|
-
const [selectedItemText, setSelectedItemText] =
|
|
5585
|
+
const [selectedItem, setSelectedItem] = React39.useState(null);
|
|
5586
|
+
const [selectedItemText, setSelectedItemText] = React39.useState(
|
|
5502
5587
|
null
|
|
5503
5588
|
);
|
|
5504
5589
|
const getItems = useCollection(__scopeSelect);
|
|
5505
|
-
const [isPositioned, setIsPositioned] =
|
|
5506
|
-
const firstValidItemFoundRef =
|
|
5507
|
-
|
|
5590
|
+
const [isPositioned, setIsPositioned] = React39.useState(false);
|
|
5591
|
+
const firstValidItemFoundRef = React39.useRef(false);
|
|
5592
|
+
React39.useEffect(() => {
|
|
5508
5593
|
if (content) return hideOthers(content);
|
|
5509
5594
|
}, [content]);
|
|
5510
5595
|
useFocusGuards();
|
|
5511
|
-
const focusFirst2 =
|
|
5596
|
+
const focusFirst2 = React39.useCallback(
|
|
5512
5597
|
(candidates) => {
|
|
5513
5598
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
5514
5599
|
const [lastItem] = restItems.slice(-1);
|
|
@@ -5524,17 +5609,17 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5524
5609
|
},
|
|
5525
5610
|
[getItems, viewport]
|
|
5526
5611
|
);
|
|
5527
|
-
const focusSelectedItem =
|
|
5612
|
+
const focusSelectedItem = React39.useCallback(
|
|
5528
5613
|
() => focusFirst2([selectedItem, content]),
|
|
5529
5614
|
[focusFirst2, selectedItem, content]
|
|
5530
5615
|
);
|
|
5531
|
-
|
|
5616
|
+
React39.useEffect(() => {
|
|
5532
5617
|
if (isPositioned) {
|
|
5533
5618
|
focusSelectedItem();
|
|
5534
5619
|
}
|
|
5535
5620
|
}, [isPositioned, focusSelectedItem]);
|
|
5536
5621
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
5537
|
-
|
|
5622
|
+
React39.useEffect(() => {
|
|
5538
5623
|
if (content) {
|
|
5539
5624
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
5540
5625
|
const handlePointerMove = (event) => {
|
|
@@ -5564,7 +5649,7 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5564
5649
|
};
|
|
5565
5650
|
}
|
|
5566
5651
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
5567
|
-
|
|
5652
|
+
React39.useEffect(() => {
|
|
5568
5653
|
const close = () => onOpenChange(false);
|
|
5569
5654
|
window.addEventListener("blur", close);
|
|
5570
5655
|
window.addEventListener("resize", close);
|
|
@@ -5581,7 +5666,7 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5581
5666
|
setTimeout(() => nextItem.ref.current.focus());
|
|
5582
5667
|
}
|
|
5583
5668
|
});
|
|
5584
|
-
const itemRefCallback =
|
|
5669
|
+
const itemRefCallback = React39.useCallback(
|
|
5585
5670
|
(node, value, disabled) => {
|
|
5586
5671
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
5587
5672
|
const isSelectedItem = context.value !== void 0 && context.value === value;
|
|
@@ -5592,8 +5677,8 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5592
5677
|
},
|
|
5593
5678
|
[context.value]
|
|
5594
5679
|
);
|
|
5595
|
-
const handleItemLeave =
|
|
5596
|
-
const itemTextRefCallback =
|
|
5680
|
+
const handleItemLeave = React39.useCallback(() => content?.focus(), [content]);
|
|
5681
|
+
const itemTextRefCallback = React39.useCallback(
|
|
5597
5682
|
(node, value, disabled) => {
|
|
5598
5683
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
5599
5684
|
const isSelectedItem = context.value !== void 0 && context.value === value;
|
|
@@ -5616,7 +5701,7 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5616
5701
|
hideWhenDetached,
|
|
5617
5702
|
avoidCollisions
|
|
5618
5703
|
} : {};
|
|
5619
|
-
return /* @__PURE__ */ (0,
|
|
5704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5620
5705
|
SelectContentProvider,
|
|
5621
5706
|
{
|
|
5622
5707
|
scope: __scopeSelect,
|
|
@@ -5632,7 +5717,7 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5632
5717
|
position,
|
|
5633
5718
|
isPositioned,
|
|
5634
5719
|
searchRef,
|
|
5635
|
-
children: /* @__PURE__ */ (0,
|
|
5720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Combination_default, { as: Slot2, allowPinchZoom: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5636
5721
|
FocusScope,
|
|
5637
5722
|
{
|
|
5638
5723
|
asChild: true,
|
|
@@ -5644,7 +5729,7 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5644
5729
|
context.trigger?.focus({ preventScroll: true });
|
|
5645
5730
|
event.preventDefault();
|
|
5646
5731
|
}),
|
|
5647
|
-
children: /* @__PURE__ */ (0,
|
|
5732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5648
5733
|
DismissableLayer,
|
|
5649
5734
|
{
|
|
5650
5735
|
asChild: true,
|
|
@@ -5653,7 +5738,7 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5653
5738
|
onPointerDownOutside,
|
|
5654
5739
|
onFocusOutside: (event) => event.preventDefault(),
|
|
5655
5740
|
onDismiss: () => context.onOpenChange(false),
|
|
5656
|
-
children: /* @__PURE__ */ (0,
|
|
5741
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5657
5742
|
SelectPosition,
|
|
5658
5743
|
{
|
|
5659
5744
|
role: "listbox",
|
|
@@ -5704,18 +5789,18 @@ var SelectContentImpl = React37.forwardRef(
|
|
|
5704
5789
|
);
|
|
5705
5790
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
5706
5791
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
5707
|
-
var SelectItemAlignedPosition =
|
|
5792
|
+
var SelectItemAlignedPosition = React39.forwardRef((props, forwardedRef) => {
|
|
5708
5793
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
5709
5794
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
5710
5795
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
5711
|
-
const [contentWrapper, setContentWrapper] =
|
|
5712
|
-
const [content, setContent] =
|
|
5796
|
+
const [contentWrapper, setContentWrapper] = React39.useState(null);
|
|
5797
|
+
const [content, setContent] = React39.useState(null);
|
|
5713
5798
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
5714
5799
|
const getItems = useCollection(__scopeSelect);
|
|
5715
|
-
const shouldExpandOnScrollRef =
|
|
5716
|
-
const shouldRepositionRef =
|
|
5800
|
+
const shouldExpandOnScrollRef = React39.useRef(false);
|
|
5801
|
+
const shouldRepositionRef = React39.useRef(true);
|
|
5717
5802
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
5718
|
-
const position =
|
|
5803
|
+
const position = React39.useCallback(() => {
|
|
5719
5804
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
5720
5805
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
5721
5806
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -5815,11 +5900,11 @@ var SelectItemAlignedPosition = React37.forwardRef((props, forwardedRef) => {
|
|
|
5815
5900
|
onPlaced
|
|
5816
5901
|
]);
|
|
5817
5902
|
useLayoutEffect2(() => position(), [position]);
|
|
5818
|
-
const [contentZIndex, setContentZIndex] =
|
|
5903
|
+
const [contentZIndex, setContentZIndex] = React39.useState();
|
|
5819
5904
|
useLayoutEffect2(() => {
|
|
5820
5905
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
5821
5906
|
}, [content]);
|
|
5822
|
-
const handleScrollButtonChange =
|
|
5907
|
+
const handleScrollButtonChange = React39.useCallback(
|
|
5823
5908
|
(node) => {
|
|
5824
5909
|
if (node && shouldRepositionRef.current === true) {
|
|
5825
5910
|
position();
|
|
@@ -5829,14 +5914,14 @@ var SelectItemAlignedPosition = React37.forwardRef((props, forwardedRef) => {
|
|
|
5829
5914
|
},
|
|
5830
5915
|
[position, focusSelectedItem]
|
|
5831
5916
|
);
|
|
5832
|
-
return /* @__PURE__ */ (0,
|
|
5917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5833
5918
|
SelectViewportProvider,
|
|
5834
5919
|
{
|
|
5835
5920
|
scope: __scopeSelect,
|
|
5836
5921
|
contentWrapper,
|
|
5837
5922
|
shouldExpandOnScrollRef,
|
|
5838
5923
|
onScrollButtonChange: handleScrollButtonChange,
|
|
5839
|
-
children: /* @__PURE__ */ (0,
|
|
5924
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5840
5925
|
"div",
|
|
5841
5926
|
{
|
|
5842
5927
|
ref: setContentWrapper,
|
|
@@ -5846,7 +5931,7 @@ var SelectItemAlignedPosition = React37.forwardRef((props, forwardedRef) => {
|
|
|
5846
5931
|
position: "fixed",
|
|
5847
5932
|
zIndex: contentZIndex
|
|
5848
5933
|
},
|
|
5849
|
-
children: /* @__PURE__ */ (0,
|
|
5934
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5850
5935
|
Primitive.div,
|
|
5851
5936
|
{
|
|
5852
5937
|
...popperProps,
|
|
@@ -5868,7 +5953,7 @@ var SelectItemAlignedPosition = React37.forwardRef((props, forwardedRef) => {
|
|
|
5868
5953
|
});
|
|
5869
5954
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
5870
5955
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
5871
|
-
var SelectPopperPosition =
|
|
5956
|
+
var SelectPopperPosition = React39.forwardRef((props, forwardedRef) => {
|
|
5872
5957
|
const {
|
|
5873
5958
|
__scopeSelect,
|
|
5874
5959
|
align = "start",
|
|
@@ -5876,7 +5961,7 @@ var SelectPopperPosition = React37.forwardRef((props, forwardedRef) => {
|
|
|
5876
5961
|
...popperProps
|
|
5877
5962
|
} = props;
|
|
5878
5963
|
const popperScope = usePopperScope(__scopeSelect);
|
|
5879
|
-
return /* @__PURE__ */ (0,
|
|
5964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5880
5965
|
Content4,
|
|
5881
5966
|
{
|
|
5882
5967
|
...popperScope,
|
|
@@ -5903,15 +5988,15 @@ var SelectPopperPosition = React37.forwardRef((props, forwardedRef) => {
|
|
|
5903
5988
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
5904
5989
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
5905
5990
|
var VIEWPORT_NAME = "SelectViewport";
|
|
5906
|
-
var SelectViewport =
|
|
5991
|
+
var SelectViewport = React39.forwardRef(
|
|
5907
5992
|
(props, forwardedRef) => {
|
|
5908
5993
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
5909
5994
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
5910
5995
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
5911
5996
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
5912
|
-
const prevScrollTopRef =
|
|
5913
|
-
return /* @__PURE__ */ (0,
|
|
5914
|
-
/* @__PURE__ */ (0,
|
|
5997
|
+
const prevScrollTopRef = React39.useRef(0);
|
|
5998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
5999
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5915
6000
|
"style",
|
|
5916
6001
|
{
|
|
5917
6002
|
dangerouslySetInnerHTML: {
|
|
@@ -5920,7 +6005,7 @@ var SelectViewport = React37.forwardRef(
|
|
|
5920
6005
|
nonce
|
|
5921
6006
|
}
|
|
5922
6007
|
),
|
|
5923
|
-
/* @__PURE__ */ (0,
|
|
6008
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5924
6009
|
Primitive.div,
|
|
5925
6010
|
{
|
|
5926
6011
|
"data-radix-select-viewport": "",
|
|
@@ -5972,26 +6057,26 @@ var SelectViewport = React37.forwardRef(
|
|
|
5972
6057
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
5973
6058
|
var GROUP_NAME = "SelectGroup";
|
|
5974
6059
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
5975
|
-
var SelectGroup =
|
|
6060
|
+
var SelectGroup = React39.forwardRef(
|
|
5976
6061
|
(props, forwardedRef) => {
|
|
5977
6062
|
const { __scopeSelect, ...groupProps } = props;
|
|
5978
6063
|
const groupId = useId();
|
|
5979
|
-
return /* @__PURE__ */ (0,
|
|
6064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
5980
6065
|
}
|
|
5981
6066
|
);
|
|
5982
6067
|
SelectGroup.displayName = GROUP_NAME;
|
|
5983
6068
|
var LABEL_NAME = "SelectLabel";
|
|
5984
|
-
var SelectLabel =
|
|
6069
|
+
var SelectLabel = React39.forwardRef(
|
|
5985
6070
|
(props, forwardedRef) => {
|
|
5986
6071
|
const { __scopeSelect, ...labelProps } = props;
|
|
5987
6072
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
5988
|
-
return /* @__PURE__ */ (0,
|
|
6073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
5989
6074
|
}
|
|
5990
6075
|
);
|
|
5991
6076
|
SelectLabel.displayName = LABEL_NAME;
|
|
5992
6077
|
var ITEM_NAME = "SelectItem";
|
|
5993
6078
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
5994
|
-
var SelectItem =
|
|
6079
|
+
var SelectItem = React39.forwardRef(
|
|
5995
6080
|
(props, forwardedRef) => {
|
|
5996
6081
|
const {
|
|
5997
6082
|
__scopeSelect,
|
|
@@ -6003,14 +6088,14 @@ var SelectItem = React37.forwardRef(
|
|
|
6003
6088
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
6004
6089
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
6005
6090
|
const isSelected = context.value === value;
|
|
6006
|
-
const [textValue, setTextValue] =
|
|
6007
|
-
const [isFocused, setIsFocused] =
|
|
6091
|
+
const [textValue, setTextValue] = React39.useState(textValueProp ?? "");
|
|
6092
|
+
const [isFocused, setIsFocused] = React39.useState(false);
|
|
6008
6093
|
const composedRefs = useComposedRefs(
|
|
6009
6094
|
forwardedRef,
|
|
6010
6095
|
(node) => contentContext.itemRefCallback?.(node, value, disabled)
|
|
6011
6096
|
);
|
|
6012
6097
|
const textId = useId();
|
|
6013
|
-
const pointerTypeRef =
|
|
6098
|
+
const pointerTypeRef = React39.useRef("touch");
|
|
6014
6099
|
const handleSelect = () => {
|
|
6015
6100
|
if (!disabled) {
|
|
6016
6101
|
context.onValueChange(value);
|
|
@@ -6022,7 +6107,7 @@ var SelectItem = React37.forwardRef(
|
|
|
6022
6107
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
6023
6108
|
);
|
|
6024
6109
|
}
|
|
6025
|
-
return /* @__PURE__ */ (0,
|
|
6110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6026
6111
|
SelectItemContextProvider,
|
|
6027
6112
|
{
|
|
6028
6113
|
scope: __scopeSelect,
|
|
@@ -6030,17 +6115,17 @@ var SelectItem = React37.forwardRef(
|
|
|
6030
6115
|
disabled,
|
|
6031
6116
|
textId,
|
|
6032
6117
|
isSelected,
|
|
6033
|
-
onItemTextChange:
|
|
6118
|
+
onItemTextChange: React39.useCallback((node) => {
|
|
6034
6119
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
6035
6120
|
}, []),
|
|
6036
|
-
children: /* @__PURE__ */ (0,
|
|
6121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6037
6122
|
Collection.ItemSlot,
|
|
6038
6123
|
{
|
|
6039
6124
|
scope: __scopeSelect,
|
|
6040
6125
|
value,
|
|
6041
6126
|
disabled,
|
|
6042
6127
|
textValue,
|
|
6043
|
-
children: /* @__PURE__ */ (0,
|
|
6128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6044
6129
|
Primitive.div,
|
|
6045
6130
|
{
|
|
6046
6131
|
role: "option",
|
|
@@ -6093,14 +6178,14 @@ var SelectItem = React37.forwardRef(
|
|
|
6093
6178
|
);
|
|
6094
6179
|
SelectItem.displayName = ITEM_NAME;
|
|
6095
6180
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
6096
|
-
var SelectItemText =
|
|
6181
|
+
var SelectItemText = React39.forwardRef(
|
|
6097
6182
|
(props, forwardedRef) => {
|
|
6098
6183
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
6099
6184
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
6100
6185
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
6101
6186
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
6102
6187
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
6103
|
-
const [itemTextNode, setItemTextNode] =
|
|
6188
|
+
const [itemTextNode, setItemTextNode] = React39.useState(null);
|
|
6104
6189
|
const composedRefs = useComposedRefs(
|
|
6105
6190
|
forwardedRef,
|
|
6106
6191
|
(node) => setItemTextNode(node),
|
|
@@ -6108,8 +6193,8 @@ var SelectItemText = React37.forwardRef(
|
|
|
6108
6193
|
(node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)
|
|
6109
6194
|
);
|
|
6110
6195
|
const textContent = itemTextNode?.textContent;
|
|
6111
|
-
const nativeOption =
|
|
6112
|
-
() => /* @__PURE__ */ (0,
|
|
6196
|
+
const nativeOption = React39.useMemo(
|
|
6197
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
|
|
6113
6198
|
[itemContext.disabled, itemContext.value, textContent]
|
|
6114
6199
|
);
|
|
6115
6200
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
@@ -6117,27 +6202,27 @@ var SelectItemText = React37.forwardRef(
|
|
|
6117
6202
|
onNativeOptionAdd(nativeOption);
|
|
6118
6203
|
return () => onNativeOptionRemove(nativeOption);
|
|
6119
6204
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
6120
|
-
return /* @__PURE__ */ (0,
|
|
6121
|
-
/* @__PURE__ */ (0,
|
|
6205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
6206
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
6122
6207
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
|
|
6123
6208
|
] });
|
|
6124
6209
|
}
|
|
6125
6210
|
);
|
|
6126
6211
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
6127
6212
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
6128
|
-
var SelectItemIndicator =
|
|
6213
|
+
var SelectItemIndicator = React39.forwardRef(
|
|
6129
6214
|
(props, forwardedRef) => {
|
|
6130
6215
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
6131
6216
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
6132
|
-
return itemContext.isSelected ? /* @__PURE__ */ (0,
|
|
6217
|
+
return itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
6133
6218
|
}
|
|
6134
6219
|
);
|
|
6135
6220
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
6136
6221
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
6137
|
-
var SelectScrollUpButton =
|
|
6222
|
+
var SelectScrollUpButton = React39.forwardRef((props, forwardedRef) => {
|
|
6138
6223
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
6139
6224
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
6140
|
-
const [canScrollUp, setCanScrollUp] =
|
|
6225
|
+
const [canScrollUp, setCanScrollUp] = React39.useState(false);
|
|
6141
6226
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
6142
6227
|
useLayoutEffect2(() => {
|
|
6143
6228
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -6152,7 +6237,7 @@ var SelectScrollUpButton = React37.forwardRef((props, forwardedRef) => {
|
|
|
6152
6237
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
6153
6238
|
}
|
|
6154
6239
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
6155
|
-
return canScrollUp ? /* @__PURE__ */ (0,
|
|
6240
|
+
return canScrollUp ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6156
6241
|
SelectScrollButtonImpl,
|
|
6157
6242
|
{
|
|
6158
6243
|
...props,
|
|
@@ -6168,10 +6253,10 @@ var SelectScrollUpButton = React37.forwardRef((props, forwardedRef) => {
|
|
|
6168
6253
|
});
|
|
6169
6254
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
6170
6255
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
6171
|
-
var SelectScrollDownButton =
|
|
6256
|
+
var SelectScrollDownButton = React39.forwardRef((props, forwardedRef) => {
|
|
6172
6257
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
6173
6258
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
6174
|
-
const [canScrollDown, setCanScrollDown] =
|
|
6259
|
+
const [canScrollDown, setCanScrollDown] = React39.useState(false);
|
|
6175
6260
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
6176
6261
|
useLayoutEffect2(() => {
|
|
6177
6262
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -6187,7 +6272,7 @@ var SelectScrollDownButton = React37.forwardRef((props, forwardedRef) => {
|
|
|
6187
6272
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
6188
6273
|
}
|
|
6189
6274
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
6190
|
-
return canScrollDown ? /* @__PURE__ */ (0,
|
|
6275
|
+
return canScrollDown ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6191
6276
|
SelectScrollButtonImpl,
|
|
6192
6277
|
{
|
|
6193
6278
|
...props,
|
|
@@ -6202,25 +6287,25 @@ var SelectScrollDownButton = React37.forwardRef((props, forwardedRef) => {
|
|
|
6202
6287
|
) : null;
|
|
6203
6288
|
});
|
|
6204
6289
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
6205
|
-
var SelectScrollButtonImpl =
|
|
6290
|
+
var SelectScrollButtonImpl = React39.forwardRef((props, forwardedRef) => {
|
|
6206
6291
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
6207
6292
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
6208
|
-
const autoScrollTimerRef =
|
|
6293
|
+
const autoScrollTimerRef = React39.useRef(null);
|
|
6209
6294
|
const getItems = useCollection(__scopeSelect);
|
|
6210
|
-
const clearAutoScrollTimer =
|
|
6295
|
+
const clearAutoScrollTimer = React39.useCallback(() => {
|
|
6211
6296
|
if (autoScrollTimerRef.current !== null) {
|
|
6212
6297
|
window.clearInterval(autoScrollTimerRef.current);
|
|
6213
6298
|
autoScrollTimerRef.current = null;
|
|
6214
6299
|
}
|
|
6215
6300
|
}, []);
|
|
6216
|
-
|
|
6301
|
+
React39.useEffect(() => {
|
|
6217
6302
|
return () => clearAutoScrollTimer();
|
|
6218
6303
|
}, [clearAutoScrollTimer]);
|
|
6219
6304
|
useLayoutEffect2(() => {
|
|
6220
6305
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
6221
6306
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
6222
6307
|
}, [getItems]);
|
|
6223
|
-
return /* @__PURE__ */ (0,
|
|
6308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6224
6309
|
Primitive.div,
|
|
6225
6310
|
{
|
|
6226
6311
|
"aria-hidden": true,
|
|
@@ -6245,31 +6330,31 @@ var SelectScrollButtonImpl = React37.forwardRef((props, forwardedRef) => {
|
|
|
6245
6330
|
);
|
|
6246
6331
|
});
|
|
6247
6332
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
6248
|
-
var SelectSeparator =
|
|
6333
|
+
var SelectSeparator = React39.forwardRef(
|
|
6249
6334
|
(props, forwardedRef) => {
|
|
6250
6335
|
const { __scopeSelect, ...separatorProps } = props;
|
|
6251
|
-
return /* @__PURE__ */ (0,
|
|
6336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
6252
6337
|
}
|
|
6253
6338
|
);
|
|
6254
6339
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
6255
6340
|
var ARROW_NAME2 = "SelectArrow";
|
|
6256
|
-
var SelectArrow =
|
|
6341
|
+
var SelectArrow = React39.forwardRef(
|
|
6257
6342
|
(props, forwardedRef) => {
|
|
6258
6343
|
const { __scopeSelect, ...arrowProps } = props;
|
|
6259
6344
|
const popperScope = usePopperScope(__scopeSelect);
|
|
6260
6345
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
6261
6346
|
const contentContext = useSelectContentContext(ARROW_NAME2, __scopeSelect);
|
|
6262
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ (0,
|
|
6347
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Arrow3, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
6263
6348
|
}
|
|
6264
6349
|
);
|
|
6265
6350
|
SelectArrow.displayName = ARROW_NAME2;
|
|
6266
6351
|
var BUBBLE_INPUT_NAME = "SelectBubbleInput";
|
|
6267
|
-
var SelectBubbleInput =
|
|
6352
|
+
var SelectBubbleInput = React39.forwardRef(
|
|
6268
6353
|
({ __scopeSelect, value, ...props }, forwardedRef) => {
|
|
6269
|
-
const ref =
|
|
6354
|
+
const ref = React39.useRef(null);
|
|
6270
6355
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
6271
6356
|
const prevValue = usePrevious(value);
|
|
6272
|
-
|
|
6357
|
+
React39.useEffect(() => {
|
|
6273
6358
|
const select = ref.current;
|
|
6274
6359
|
if (!select) return;
|
|
6275
6360
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
@@ -6284,7 +6369,7 @@ var SelectBubbleInput = React37.forwardRef(
|
|
|
6284
6369
|
select.dispatchEvent(event);
|
|
6285
6370
|
}
|
|
6286
6371
|
}, [prevValue, value]);
|
|
6287
|
-
return /* @__PURE__ */ (0,
|
|
6372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6288
6373
|
Primitive.select,
|
|
6289
6374
|
{
|
|
6290
6375
|
...props,
|
|
@@ -6301,9 +6386,9 @@ function shouldShowPlaceholder(value) {
|
|
|
6301
6386
|
}
|
|
6302
6387
|
function useTypeaheadSearch(onSearchChange) {
|
|
6303
6388
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
6304
|
-
const searchRef =
|
|
6305
|
-
const timerRef =
|
|
6306
|
-
const handleTypeaheadSearch =
|
|
6389
|
+
const searchRef = React39.useRef("");
|
|
6390
|
+
const timerRef = React39.useRef(0);
|
|
6391
|
+
const handleTypeaheadSearch = React39.useCallback(
|
|
6307
6392
|
(key) => {
|
|
6308
6393
|
const search = searchRef.current + key;
|
|
6309
6394
|
handleSearchChange(search);
|
|
@@ -6315,11 +6400,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
6315
6400
|
},
|
|
6316
6401
|
[handleSearchChange]
|
|
6317
6402
|
);
|
|
6318
|
-
const resetTypeahead =
|
|
6403
|
+
const resetTypeahead = React39.useCallback(() => {
|
|
6319
6404
|
searchRef.current = "";
|
|
6320
6405
|
window.clearTimeout(timerRef.current);
|
|
6321
6406
|
}, []);
|
|
6322
|
-
|
|
6407
|
+
React39.useEffect(() => {
|
|
6323
6408
|
return () => window.clearTimeout(timerRef.current);
|
|
6324
6409
|
}, []);
|
|
6325
6410
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -6356,11 +6441,11 @@ var ScrollDownButton = SelectScrollDownButton;
|
|
|
6356
6441
|
var Separator3 = SelectSeparator;
|
|
6357
6442
|
|
|
6358
6443
|
// src/components/Select/index.tsx
|
|
6359
|
-
var
|
|
6444
|
+
var import_lucide_react5 = require("lucide-react");
|
|
6360
6445
|
|
|
6361
6446
|
// src/components/Select/select.styles.ts
|
|
6362
|
-
var
|
|
6363
|
-
var selectTriggerVariants = (0,
|
|
6447
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
6448
|
+
var selectTriggerVariants = (0, import_class_variance_authority12.cva)(
|
|
6364
6449
|
"flex w-full items-center justify-between gap-2 rounded-md border transition-colors bg-card text-content focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted [&>span]:truncate",
|
|
6365
6450
|
{
|
|
6366
6451
|
variants: {
|
|
@@ -6384,7 +6469,7 @@ var selectTriggerVariants = (0, import_class_variance_authority10.cva)(
|
|
|
6384
6469
|
}
|
|
6385
6470
|
}
|
|
6386
6471
|
);
|
|
6387
|
-
var selectItemVariants = (0,
|
|
6472
|
+
var selectItemVariants = (0, import_class_variance_authority12.cva)(
|
|
6388
6473
|
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
6389
6474
|
{
|
|
6390
6475
|
variants: {
|
|
@@ -6404,11 +6489,11 @@ var selectItemVariants = (0, import_class_variance_authority10.cva)(
|
|
|
6404
6489
|
);
|
|
6405
6490
|
|
|
6406
6491
|
// src/components/Select/index.tsx
|
|
6407
|
-
var
|
|
6492
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
6408
6493
|
var Select2 = Root23;
|
|
6409
6494
|
var SelectGroup2 = Group2;
|
|
6410
6495
|
var SelectValue2 = Value;
|
|
6411
|
-
var SelectTrigger2 =
|
|
6496
|
+
var SelectTrigger2 = React40.forwardRef(({ className, variant, size: size4, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
6412
6497
|
Trigger4,
|
|
6413
6498
|
{
|
|
6414
6499
|
ref,
|
|
@@ -6416,12 +6501,12 @@ var SelectTrigger2 = React38.forwardRef(({ className, variant, size: size4, chil
|
|
|
6416
6501
|
...props,
|
|
6417
6502
|
children: [
|
|
6418
6503
|
children,
|
|
6419
|
-
/* @__PURE__ */ (0,
|
|
6504
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react5.ChevronDown, { className: "size-4 shrink-0 opacity-50" }) })
|
|
6420
6505
|
]
|
|
6421
6506
|
}
|
|
6422
6507
|
));
|
|
6423
6508
|
SelectTrigger2.displayName = Trigger4.displayName;
|
|
6424
|
-
var SelectScrollUpButton2 =
|
|
6509
|
+
var SelectScrollUpButton2 = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
6425
6510
|
ScrollUpButton,
|
|
6426
6511
|
{
|
|
6427
6512
|
ref,
|
|
@@ -6430,11 +6515,11 @@ var SelectScrollUpButton2 = React38.forwardRef(({ className, ...props }, ref) =>
|
|
|
6430
6515
|
className
|
|
6431
6516
|
),
|
|
6432
6517
|
...props,
|
|
6433
|
-
children: /* @__PURE__ */ (0,
|
|
6518
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react5.ChevronUp, { className: "size-4" })
|
|
6434
6519
|
}
|
|
6435
6520
|
));
|
|
6436
6521
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
6437
|
-
var SelectScrollDownButton2 =
|
|
6522
|
+
var SelectScrollDownButton2 = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
6438
6523
|
ScrollDownButton,
|
|
6439
6524
|
{
|
|
6440
6525
|
ref,
|
|
@@ -6443,11 +6528,11 @@ var SelectScrollDownButton2 = React38.forwardRef(({ className, ...props }, ref)
|
|
|
6443
6528
|
className
|
|
6444
6529
|
),
|
|
6445
6530
|
...props,
|
|
6446
|
-
children: /* @__PURE__ */ (0,
|
|
6531
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react5.ChevronDown, { className: "size-4" })
|
|
6447
6532
|
}
|
|
6448
6533
|
));
|
|
6449
6534
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
6450
|
-
var SelectContent2 =
|
|
6535
|
+
var SelectContent2 = React40.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Portal5, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
6451
6536
|
Content22,
|
|
6452
6537
|
{
|
|
6453
6538
|
ref,
|
|
@@ -6463,8 +6548,8 @@ var SelectContent2 = React38.forwardRef(({ className, children, position = "popp
|
|
|
6463
6548
|
position,
|
|
6464
6549
|
...props,
|
|
6465
6550
|
children: [
|
|
6466
|
-
/* @__PURE__ */ (0,
|
|
6467
|
-
/* @__PURE__ */ (0,
|
|
6551
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectScrollUpButton2, {}),
|
|
6552
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
6468
6553
|
Viewport,
|
|
6469
6554
|
{
|
|
6470
6555
|
className: cn(
|
|
@@ -6474,12 +6559,12 @@ var SelectContent2 = React38.forwardRef(({ className, children, position = "popp
|
|
|
6474
6559
|
children
|
|
6475
6560
|
}
|
|
6476
6561
|
),
|
|
6477
|
-
/* @__PURE__ */ (0,
|
|
6562
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectScrollDownButton2, {})
|
|
6478
6563
|
]
|
|
6479
6564
|
}
|
|
6480
6565
|
) }));
|
|
6481
6566
|
SelectContent2.displayName = Content22.displayName;
|
|
6482
|
-
var SelectLabel2 =
|
|
6567
|
+
var SelectLabel2 = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
6483
6568
|
Label4,
|
|
6484
6569
|
{
|
|
6485
6570
|
ref,
|
|
@@ -6488,20 +6573,20 @@ var SelectLabel2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
6488
6573
|
}
|
|
6489
6574
|
));
|
|
6490
6575
|
SelectLabel2.displayName = Label4.displayName;
|
|
6491
|
-
var SelectItem2 =
|
|
6576
|
+
var SelectItem2 = React40.forwardRef(({ className, children, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
6492
6577
|
Item2,
|
|
6493
6578
|
{
|
|
6494
6579
|
ref,
|
|
6495
6580
|
className: cn(selectItemVariants({ variant }), className),
|
|
6496
6581
|
...props,
|
|
6497
6582
|
children: [
|
|
6498
|
-
/* @__PURE__ */ (0,
|
|
6499
|
-
/* @__PURE__ */ (0,
|
|
6583
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ItemIndicator2, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react5.Check, { className: "size-4" }) }) }),
|
|
6584
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ItemText, { children })
|
|
6500
6585
|
]
|
|
6501
6586
|
}
|
|
6502
6587
|
));
|
|
6503
6588
|
SelectItem2.displayName = Item2.displayName;
|
|
6504
|
-
var SelectSeparator2 =
|
|
6589
|
+
var SelectSeparator2 = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
6505
6590
|
Separator3,
|
|
6506
6591
|
{
|
|
6507
6592
|
ref,
|
|
@@ -6515,14 +6600,14 @@ SelectSeparator2.displayName = Separator3.displayName;
|
|
|
6515
6600
|
var import_react6 = require("react");
|
|
6516
6601
|
|
|
6517
6602
|
// src/components/Tabs/tabs.styles.ts
|
|
6518
|
-
var
|
|
6519
|
-
var tabsVariants = (0,
|
|
6603
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
6604
|
+
var tabsVariants = (0, import_class_variance_authority13.cva)(
|
|
6520
6605
|
`
|
|
6521
6606
|
inline-flex items-center gap-1 rounded-lg p-1
|
|
6522
6607
|
border border-black/8 bg-white/50 dark:border-white/10 dark:bg-white/5
|
|
6523
6608
|
`
|
|
6524
6609
|
);
|
|
6525
|
-
var tabVariants = (0,
|
|
6610
|
+
var tabVariants = (0, import_class_variance_authority13.cva)(
|
|
6526
6611
|
`
|
|
6527
6612
|
inline-flex items-center justify-center px-4 py-2 text-sm font-medium
|
|
6528
6613
|
rounded-md transition-colors duration-200
|
|
@@ -6542,19 +6627,19 @@ var tabVariants = (0, import_class_variance_authority11.cva)(
|
|
|
6542
6627
|
);
|
|
6543
6628
|
|
|
6544
6629
|
// src/components/Tabs/index.tsx
|
|
6545
|
-
var
|
|
6630
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
6546
6631
|
var TabsContext = (0, import_react6.createContext)(void 0);
|
|
6547
6632
|
function Tabs({ value, onValueChange, children, className }) {
|
|
6548
|
-
return /* @__PURE__ */ (0,
|
|
6633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TabsContext.Provider, { value: { value, onValueChange }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn("w-full", className), children }) });
|
|
6549
6634
|
}
|
|
6550
6635
|
function TabsList({ children, className }) {
|
|
6551
|
-
return /* @__PURE__ */ (0,
|
|
6636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn(tabsVariants(), className), role: "tablist", children });
|
|
6552
6637
|
}
|
|
6553
6638
|
function TabsTrigger({ value, children, className }) {
|
|
6554
6639
|
const context = (0, import_react6.useContext)(TabsContext);
|
|
6555
6640
|
if (!context) throw new Error("TabsTrigger must be used within Tabs");
|
|
6556
6641
|
const isActive = context.value === value;
|
|
6557
|
-
return /* @__PURE__ */ (0,
|
|
6642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6558
6643
|
"button",
|
|
6559
6644
|
{
|
|
6560
6645
|
role: "tab",
|
|
@@ -6571,12 +6656,12 @@ function TabsContent({ value, children, className }) {
|
|
|
6571
6656
|
if (!context) throw new Error("TabsContent must be used within Tabs");
|
|
6572
6657
|
const isActive = context.value === value;
|
|
6573
6658
|
if (!isActive) return null;
|
|
6574
|
-
return /* @__PURE__ */ (0,
|
|
6659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { role: "tabpanel", className, children });
|
|
6575
6660
|
}
|
|
6576
6661
|
|
|
6577
6662
|
// src/components/Text/text.styles.ts
|
|
6578
|
-
var
|
|
6579
|
-
var textVariants = (0,
|
|
6663
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
6664
|
+
var textVariants = (0, import_class_variance_authority14.cva)(`text-content`, {
|
|
6580
6665
|
variants: {
|
|
6581
6666
|
size: {
|
|
6582
6667
|
sm: "text-sm",
|
|
@@ -6599,23 +6684,23 @@ var textVariants = (0, import_class_variance_authority12.cva)(`text-content`, {
|
|
|
6599
6684
|
});
|
|
6600
6685
|
|
|
6601
6686
|
// src/components/Text/index.tsx
|
|
6602
|
-
var
|
|
6687
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
6603
6688
|
function Text({ size: size4 = "md", className, ...props }) {
|
|
6604
|
-
return /* @__PURE__ */ (0,
|
|
6689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: cn(textVariants({ size: size4 }), className), ...props });
|
|
6605
6690
|
}
|
|
6606
6691
|
|
|
6607
6692
|
// src/components/ControlledTable/index.tsx
|
|
6608
6693
|
var import_react10 = require("react");
|
|
6609
|
-
var
|
|
6610
|
-
var
|
|
6694
|
+
var import_radix_ui8 = require("radix-ui");
|
|
6695
|
+
var import_lucide_react8 = require("lucide-react");
|
|
6611
6696
|
|
|
6612
6697
|
// src/components/ControlledTable/toolbar/index.tsx
|
|
6613
6698
|
var import_react9 = require("react");
|
|
6614
|
-
var
|
|
6699
|
+
var import_lucide_react7 = require("lucide-react");
|
|
6615
6700
|
|
|
6616
6701
|
// src/components/ControlledTable/SimpleSearch.tsx
|
|
6617
|
-
var
|
|
6618
|
-
var
|
|
6702
|
+
var import_lucide_react6 = require("lucide-react");
|
|
6703
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
6619
6704
|
var SimpleSearch = ({
|
|
6620
6705
|
searchValue,
|
|
6621
6706
|
onSearchCallback,
|
|
@@ -6624,15 +6709,15 @@ var SimpleSearch = ({
|
|
|
6624
6709
|
const handleChange = (e) => {
|
|
6625
6710
|
onSearchCallback?.(e.target.value);
|
|
6626
6711
|
};
|
|
6627
|
-
return /* @__PURE__ */ (0,
|
|
6628
|
-
/* @__PURE__ */ (0,
|
|
6629
|
-
|
|
6712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative", children: [
|
|
6713
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6714
|
+
import_lucide_react6.SearchIcon,
|
|
6630
6715
|
{
|
|
6631
6716
|
size: 16,
|
|
6632
6717
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted"
|
|
6633
6718
|
}
|
|
6634
6719
|
),
|
|
6635
|
-
/* @__PURE__ */ (0,
|
|
6720
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6636
6721
|
Input,
|
|
6637
6722
|
{
|
|
6638
6723
|
value: searchValue,
|
|
@@ -6663,7 +6748,7 @@ function useDebounce(value, delay) {
|
|
|
6663
6748
|
var useDebounce_default = useDebounce;
|
|
6664
6749
|
|
|
6665
6750
|
// src/components/ControlledTable/tableFilter/filterItem/filterSelect/index.tsx
|
|
6666
|
-
var
|
|
6751
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6667
6752
|
var CustomFilterSelect = ({
|
|
6668
6753
|
field,
|
|
6669
6754
|
onFilterCallback,
|
|
@@ -6698,18 +6783,18 @@ var CustomFilterSelect = ({
|
|
|
6698
6783
|
const actualValue = value === "__none__" ? "" : value;
|
|
6699
6784
|
setSearchTerm({ [field.id]: actualValue });
|
|
6700
6785
|
};
|
|
6701
|
-
return /* @__PURE__ */ (0,
|
|
6702
|
-
field.label && /* @__PURE__ */ (0,
|
|
6703
|
-
/* @__PURE__ */ (0,
|
|
6786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: `min-w-[200px] ${className ?? ""}`, children: [
|
|
6787
|
+
field.label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mb-1.5 text-sm text-neutral-600", children: field.label }),
|
|
6788
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6704
6789
|
Select2,
|
|
6705
6790
|
{
|
|
6706
6791
|
value: searchTerm?.[field.id] ? String(searchTerm[field.id]) : "__none__",
|
|
6707
6792
|
onValueChange: handleValueChange,
|
|
6708
6793
|
children: [
|
|
6709
|
-
/* @__PURE__ */ (0,
|
|
6710
|
-
/* @__PURE__ */ (0,
|
|
6711
|
-
/* @__PURE__ */ (0,
|
|
6712
|
-
modifiedOptions.map((opt) => /* @__PURE__ */ (0,
|
|
6794
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectTrigger2, { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectValue2, {}) }),
|
|
6795
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SelectContent2, { children: [
|
|
6796
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectItem2, { value: "__none__", children: field.insteadNone ?? "None" }),
|
|
6797
|
+
modifiedOptions.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6713
6798
|
SelectItem2,
|
|
6714
6799
|
{
|
|
6715
6800
|
value: String(opt.id ?? opt.value),
|
|
@@ -6726,7 +6811,7 @@ var CustomFilterSelect = ({
|
|
|
6726
6811
|
var filterSelect_default = CustomFilterSelect;
|
|
6727
6812
|
|
|
6728
6813
|
// src/components/ControlledTable/tableFilter/filterItem/index.tsx
|
|
6729
|
-
var
|
|
6814
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6730
6815
|
var FIELD_TYPE_COMPONENT_MAP = [
|
|
6731
6816
|
{
|
|
6732
6817
|
types: ["select"],
|
|
@@ -6746,7 +6831,7 @@ var FilterItem = ({
|
|
|
6746
6831
|
if (!config) return null;
|
|
6747
6832
|
const { component: Component, extraProps } = config;
|
|
6748
6833
|
const additionalProps = typeof extraProps === "function" ? extraProps(field) : extraProps;
|
|
6749
|
-
return /* @__PURE__ */ (0,
|
|
6834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6750
6835
|
Component,
|
|
6751
6836
|
{
|
|
6752
6837
|
field,
|
|
@@ -6761,7 +6846,7 @@ var FilterItem = ({
|
|
|
6761
6846
|
var filterItem_default = FilterItem;
|
|
6762
6847
|
|
|
6763
6848
|
// src/components/ControlledTable/tableFilter/index.tsx
|
|
6764
|
-
var
|
|
6849
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6765
6850
|
var TableFilter = ({
|
|
6766
6851
|
filterFields,
|
|
6767
6852
|
filteredParams,
|
|
@@ -6770,8 +6855,8 @@ var TableFilter = ({
|
|
|
6770
6855
|
if (!filterFields || filterFields.length === 0) {
|
|
6771
6856
|
return null;
|
|
6772
6857
|
}
|
|
6773
|
-
return /* @__PURE__ */ (0,
|
|
6774
|
-
return /* @__PURE__ */ (0,
|
|
6858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex flex-wrap items-end gap-4", children: filterFields.map((field) => {
|
|
6859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6775
6860
|
filterItem_default,
|
|
6776
6861
|
{
|
|
6777
6862
|
field,
|
|
@@ -6786,7 +6871,7 @@ var TableFilter = ({
|
|
|
6786
6871
|
var tableFilter_default = TableFilter;
|
|
6787
6872
|
|
|
6788
6873
|
// src/components/ControlledTable/toolbar/index.tsx
|
|
6789
|
-
var
|
|
6874
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6790
6875
|
var CommonToolbar = ({
|
|
6791
6876
|
searchValue,
|
|
6792
6877
|
filterFields,
|
|
@@ -6797,25 +6882,25 @@ var CommonToolbar = ({
|
|
|
6797
6882
|
onFilterCallback
|
|
6798
6883
|
}) => {
|
|
6799
6884
|
const [isFilterOpen, setIsFilterOpen] = (0, import_react9.useState)(false);
|
|
6800
|
-
return /* @__PURE__ */ (0,
|
|
6801
|
-
/* @__PURE__ */ (0,
|
|
6802
|
-
/* @__PURE__ */ (0,
|
|
6803
|
-
filterFields && filterFields.length > 0 && /* @__PURE__ */ (0,
|
|
6804
|
-
/* @__PURE__ */ (0,
|
|
6885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "mb-4", children: [
|
|
6886
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "mb-3 flex items-center justify-between gap-4", children: [
|
|
6887
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6888
|
+
filterFields && filterFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6889
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6805
6890
|
Button,
|
|
6806
6891
|
{
|
|
6807
6892
|
variant: "outline",
|
|
6808
6893
|
size: "sm",
|
|
6809
6894
|
onClick: () => setIsFilterOpen((prev) => !prev),
|
|
6810
6895
|
children: [
|
|
6811
|
-
/* @__PURE__ */ (0,
|
|
6896
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Filter, { size: 14, className: "mr-1" }),
|
|
6812
6897
|
"Filters"
|
|
6813
6898
|
]
|
|
6814
6899
|
}
|
|
6815
6900
|
),
|
|
6816
|
-
numSelected > 0 && /* @__PURE__ */ (0,
|
|
6901
|
+
numSelected > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1.5 text-xs font-medium text-white", children: numSelected })
|
|
6817
6902
|
] }),
|
|
6818
|
-
/* @__PURE__ */ (0,
|
|
6903
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "max-w-90 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6819
6904
|
SimpleSearch_default,
|
|
6820
6905
|
{
|
|
6821
6906
|
searchValue,
|
|
@@ -6824,9 +6909,9 @@ var CommonToolbar = ({
|
|
|
6824
6909
|
}
|
|
6825
6910
|
) })
|
|
6826
6911
|
] }),
|
|
6827
|
-
toolbarActions.length > 0 && /* @__PURE__ */ (0,
|
|
6912
|
+
toolbarActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center gap-2", children: renderToolbarActions(toolbarActions, numSelected) })
|
|
6828
6913
|
] }),
|
|
6829
|
-
filterFields && filterFields.length > 0 && /* @__PURE__ */ (0,
|
|
6914
|
+
filterFields && filterFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CollapsibleRoot, { open: isFilterOpen, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "rounded-lg border border-border p-4", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6830
6915
|
tableFilter_default,
|
|
6831
6916
|
{
|
|
6832
6917
|
filterFields,
|
|
@@ -6840,15 +6925,15 @@ function renderToolbarActions(actions, numSelected) {
|
|
|
6840
6925
|
if (!actions || actions.length === 0) return null;
|
|
6841
6926
|
return actions.map((item) => {
|
|
6842
6927
|
const isTitleView = Object.keys(item).includes("titleView") ? item.titleView : true;
|
|
6843
|
-
return /* @__PURE__ */ (0,
|
|
6928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6844
6929
|
Button,
|
|
6845
6930
|
{
|
|
6846
6931
|
variant: "outline",
|
|
6847
6932
|
onClick: () => item.callback(),
|
|
6848
6933
|
disabled: item.visibleWithoutSelection ? false : numSelected === 0,
|
|
6849
6934
|
children: [
|
|
6850
|
-
/* @__PURE__ */ (0,
|
|
6851
|
-
isTitleView && /* @__PURE__ */ (0,
|
|
6935
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "mr-1", children: getIconForAction(item.action) }),
|
|
6936
|
+
isTitleView && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: item.label ?? item.action })
|
|
6852
6937
|
]
|
|
6853
6938
|
},
|
|
6854
6939
|
item.action
|
|
@@ -6859,29 +6944,29 @@ function getIconForAction(action) {
|
|
|
6859
6944
|
const cls = "h-4 w-4";
|
|
6860
6945
|
switch (action) {
|
|
6861
6946
|
case "delete":
|
|
6862
|
-
return /* @__PURE__ */ (0,
|
|
6947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Trash2, { className: cls });
|
|
6863
6948
|
case "edit":
|
|
6864
|
-
return /* @__PURE__ */ (0,
|
|
6949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Edit, { className: cls });
|
|
6865
6950
|
case "download":
|
|
6866
|
-
return /* @__PURE__ */ (0,
|
|
6951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Download, { className: cls });
|
|
6867
6952
|
case "open":
|
|
6868
|
-
return /* @__PURE__ */ (0,
|
|
6953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Eye, { className: cls });
|
|
6869
6954
|
case "clone":
|
|
6870
|
-
return /* @__PURE__ */ (0,
|
|
6955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Copy, { className: cls });
|
|
6871
6956
|
case "create":
|
|
6872
|
-
return /* @__PURE__ */ (0,
|
|
6957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Plus, { className: cls });
|
|
6873
6958
|
case "upload":
|
|
6874
|
-
return /* @__PURE__ */ (0,
|
|
6959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Upload, { className: cls });
|
|
6875
6960
|
case "view":
|
|
6876
|
-
return /* @__PURE__ */ (0,
|
|
6961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Eye, { className: cls });
|
|
6877
6962
|
case "check":
|
|
6878
|
-
return /* @__PURE__ */ (0,
|
|
6963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.ListCheckIcon, { className: cls });
|
|
6879
6964
|
case "print":
|
|
6880
|
-
return /* @__PURE__ */ (0,
|
|
6965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.FileTextIcon, { className: cls });
|
|
6881
6966
|
case "compare":
|
|
6882
|
-
return /* @__PURE__ */ (0,
|
|
6967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Copy, { className: cls });
|
|
6883
6968
|
case "convert":
|
|
6884
|
-
return /* @__PURE__ */ (0,
|
|
6969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react7.Upload, { className: cls });
|
|
6885
6970
|
default:
|
|
6886
6971
|
return null;
|
|
6887
6972
|
}
|
|
@@ -6889,7 +6974,7 @@ function getIconForAction(action) {
|
|
|
6889
6974
|
var toolbar_default = CommonToolbar;
|
|
6890
6975
|
|
|
6891
6976
|
// src/components/ControlledTable/ControlledPagination.tsx
|
|
6892
|
-
var
|
|
6977
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6893
6978
|
var ControlledPagination = ({
|
|
6894
6979
|
currentPage,
|
|
6895
6980
|
rowsPerPage,
|
|
@@ -6918,28 +7003,28 @@ var ControlledPagination = ({
|
|
|
6918
7003
|
}
|
|
6919
7004
|
return pages;
|
|
6920
7005
|
};
|
|
6921
|
-
return /* @__PURE__ */ (0,
|
|
6922
|
-
/* @__PURE__ */ (0,
|
|
6923
|
-
/* @__PURE__ */ (0,
|
|
7006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
7007
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
7008
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { children: [
|
|
6924
7009
|
rowsPerPageLabel,
|
|
6925
7010
|
":"
|
|
6926
7011
|
] }),
|
|
6927
|
-
/* @__PURE__ */ (0,
|
|
7012
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
6928
7013
|
Select2,
|
|
6929
7014
|
{
|
|
6930
7015
|
value: rowsPerPage.toString(),
|
|
6931
7016
|
onValueChange: (value) => onRowsPerPageChange(parseInt(value, 10)),
|
|
6932
7017
|
children: [
|
|
6933
|
-
/* @__PURE__ */ (0,
|
|
6934
|
-
/* @__PURE__ */ (0,
|
|
7018
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectTrigger2, { className: "w-20", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectValue2, {}) }),
|
|
7019
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectContent2, { children: rowsPerPageOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectItem2, { value: option.toString(), children: option }, option)) })
|
|
6935
7020
|
]
|
|
6936
7021
|
}
|
|
6937
7022
|
)
|
|
6938
7023
|
] }),
|
|
6939
|
-
/* @__PURE__ */ (0,
|
|
6940
|
-
/* @__PURE__ */ (0,
|
|
6941
|
-
/* @__PURE__ */ (0,
|
|
6942
|
-
/* @__PURE__ */ (0,
|
|
7024
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-4 text-sm", children: [
|
|
7025
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "w-full", children: countLabel(startItem, endItem, totalCount) }),
|
|
7026
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Pagination, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(PaginationContent, { children: [
|
|
7027
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6943
7028
|
PaginationPrevious,
|
|
6944
7029
|
{
|
|
6945
7030
|
onClick: () => currentPage > 1 && onPageChange(currentPage - 1),
|
|
@@ -6947,7 +7032,7 @@ var ControlledPagination = ({
|
|
|
6947
7032
|
}
|
|
6948
7033
|
) }),
|
|
6949
7034
|
getPageNumbers().map(
|
|
6950
|
-
(page, idx) => page === "ellipsis" ? /* @__PURE__ */ (0,
|
|
7035
|
+
(page, idx) => page === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PaginationEllipsis, {}) }, `ellipsis-${idx}`) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6951
7036
|
PaginationLink,
|
|
6952
7037
|
{
|
|
6953
7038
|
onClick: () => onPageChange(page),
|
|
@@ -6957,7 +7042,7 @@ var ControlledPagination = ({
|
|
|
6957
7042
|
}
|
|
6958
7043
|
) }, page)
|
|
6959
7044
|
),
|
|
6960
|
-
/* @__PURE__ */ (0,
|
|
7045
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6961
7046
|
PaginationNext,
|
|
6962
7047
|
{
|
|
6963
7048
|
onClick: () => currentPage < totalPages && onPageChange(currentPage + 1),
|
|
@@ -6971,7 +7056,7 @@ var ControlledPagination = ({
|
|
|
6971
7056
|
var ControlledPagination_default = ControlledPagination;
|
|
6972
7057
|
|
|
6973
7058
|
// src/components/ControlledTable/index.tsx
|
|
6974
|
-
var
|
|
7059
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6975
7060
|
var ControlledTable = ({
|
|
6976
7061
|
tableSource,
|
|
6977
7062
|
tableConfig,
|
|
@@ -7065,7 +7150,7 @@ var ControlledTable = ({
|
|
|
7065
7150
|
if (field.renderLink) {
|
|
7066
7151
|
return field.renderLink(to, rawValue);
|
|
7067
7152
|
}
|
|
7068
|
-
return /* @__PURE__ */ (0,
|
|
7153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7069
7154
|
"a",
|
|
7070
7155
|
{
|
|
7071
7156
|
href: to,
|
|
@@ -7077,22 +7162,22 @@ var ControlledTable = ({
|
|
|
7077
7162
|
);
|
|
7078
7163
|
}
|
|
7079
7164
|
if (field.type === "img") {
|
|
7080
|
-
return /* @__PURE__ */ (0,
|
|
7165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("img", { src: rawValue, alt: "", className: "h-auto max-w-full" });
|
|
7081
7166
|
}
|
|
7082
7167
|
if (field.type === "bool") {
|
|
7083
|
-
return rawValue ? /* @__PURE__ */ (0,
|
|
7168
|
+
return rawValue ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.X, { size: 16 });
|
|
7084
7169
|
}
|
|
7085
7170
|
const content = rawValue ?? "";
|
|
7086
7171
|
if (field.withTooltip) {
|
|
7087
|
-
return /* @__PURE__ */ (0,
|
|
7088
|
-
/* @__PURE__ */ (0,
|
|
7089
|
-
/* @__PURE__ */ (0,
|
|
7172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Tooltip, { children: [
|
|
7173
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "block max-w-50 truncate", children: content }) }),
|
|
7174
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TooltipContent, { children: content })
|
|
7090
7175
|
] }) });
|
|
7091
7176
|
}
|
|
7092
|
-
return /* @__PURE__ */ (0,
|
|
7177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: content });
|
|
7093
7178
|
};
|
|
7094
|
-
return /* @__PURE__ */ (0,
|
|
7095
|
-
/* @__PURE__ */ (0,
|
|
7179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
7180
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7096
7181
|
toolbar_default,
|
|
7097
7182
|
{
|
|
7098
7183
|
searchValue: filteredParams?.search?.value || "",
|
|
@@ -7104,18 +7189,18 @@ var ControlledTable = ({
|
|
|
7104
7189
|
onFilterCallback
|
|
7105
7190
|
}
|
|
7106
7191
|
),
|
|
7107
|
-
/* @__PURE__ */ (0,
|
|
7108
|
-
loading && /* @__PURE__ */ (0,
|
|
7109
|
-
/* @__PURE__ */ (0,
|
|
7110
|
-
/* @__PURE__ */ (0,
|
|
7111
|
-
isSelectable && /* @__PURE__ */ (0,
|
|
7112
|
-
|
|
7192
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "relative overflow-hidden rounded-lg border border-border", children: [
|
|
7193
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-card/60", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }) }),
|
|
7194
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("table", { className: "w-full text-sm", children: [
|
|
7195
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("thead", { className: "border-b bg-surface text-dim", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tr", { children: [
|
|
7196
|
+
isSelectable && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "w-10 px-3 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7197
|
+
import_radix_ui8.Checkbox.Root,
|
|
7113
7198
|
{
|
|
7114
7199
|
checked: allSelected,
|
|
7115
7200
|
onCheckedChange: handleSelectAll,
|
|
7116
7201
|
className: "flex h-4 w-4 items-center justify-center rounded border border-border-input bg-white dark:bg-white/5 data-[state=checked]:border-primary data-[state=checked]:bg-primary",
|
|
7117
|
-
children: /* @__PURE__ */ (0,
|
|
7118
|
-
|
|
7202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_radix_ui8.Checkbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7203
|
+
import_lucide_react8.CheckIcon,
|
|
7119
7204
|
{
|
|
7120
7205
|
size: 10,
|
|
7121
7206
|
className: "text-primary-foreground"
|
|
@@ -7126,19 +7211,19 @@ var ControlledTable = ({
|
|
|
7126
7211
|
fields.map((field) => {
|
|
7127
7212
|
const id = field.orderField || field.id;
|
|
7128
7213
|
const isSorted = sortObj?.field === id;
|
|
7129
|
-
return /* @__PURE__ */ (0,
|
|
7214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7130
7215
|
"th",
|
|
7131
7216
|
{
|
|
7132
7217
|
className: `px-3 py-3 font-medium ${field.headAlign === "center" ? "text-center" : field.headAlign === "right" ? "text-right" : "text-left"} ${field.sortable ? "cursor-pointer select-none hover:text-primary" : ""}`,
|
|
7133
7218
|
style: { width: field.width },
|
|
7134
7219
|
onClick: () => field.sortable && handleSort(field),
|
|
7135
|
-
children: /* @__PURE__ */ (0,
|
|
7220
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
7136
7221
|
"div",
|
|
7137
7222
|
{
|
|
7138
7223
|
className: `inline-flex items-center gap-1 ${field.headAlign === "center" ? "justify-center" : ""}`,
|
|
7139
7224
|
children: [
|
|
7140
7225
|
field.label ?? "",
|
|
7141
|
-
field.sortable && (isSorted ? sortObj?.order === "asc" ? /* @__PURE__ */ (0,
|
|
7226
|
+
field.sortable && (isSorted ? sortObj?.order === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.ArrowUp, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.ArrowDown, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.ArrowUpDown, { size: 14, className: "opacity-40" }))
|
|
7142
7227
|
]
|
|
7143
7228
|
}
|
|
7144
7229
|
)
|
|
@@ -7146,9 +7231,9 @@ var ControlledTable = ({
|
|
|
7146
7231
|
field.id
|
|
7147
7232
|
);
|
|
7148
7233
|
}),
|
|
7149
|
-
hasActions && /* @__PURE__ */ (0,
|
|
7234
|
+
hasActions && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "w-10 px-3 py-3" })
|
|
7150
7235
|
] }) }),
|
|
7151
|
-
/* @__PURE__ */ (0,
|
|
7236
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tbody", { children: tableData.length === 0 && !loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7152
7237
|
"td",
|
|
7153
7238
|
{
|
|
7154
7239
|
colSpan: fields.length + (isSelectable ? 1 : 0) + (hasActions ? 1 : 0),
|
|
@@ -7158,13 +7243,13 @@ var ControlledTable = ({
|
|
|
7158
7243
|
) }) : tableData.map((record) => {
|
|
7159
7244
|
const key = record[rowUniqueKey];
|
|
7160
7245
|
const isSelected = selectedRows.includes(key);
|
|
7161
|
-
return /* @__PURE__ */ (0,
|
|
7246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
7162
7247
|
"tr",
|
|
7163
7248
|
{
|
|
7164
7249
|
onClick: () => onRowClick?.(record),
|
|
7165
7250
|
className: `border-b last:border-b-0 transition-colors ${onRowClick ? "cursor-pointer" : ""} ${isSelected ? "bg-primary/5" : "hover:bg-surface-hover"}`,
|
|
7166
7251
|
children: [
|
|
7167
|
-
isSelectable && /* @__PURE__ */ (0,
|
|
7252
|
+
isSelectable && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7168
7253
|
"td",
|
|
7169
7254
|
{
|
|
7170
7255
|
className: "w-10 px-3 py-3",
|
|
@@ -7172,14 +7257,14 @@ var ControlledTable = ({
|
|
|
7172
7257
|
e.stopPropagation();
|
|
7173
7258
|
handleSelectRow(key);
|
|
7174
7259
|
},
|
|
7175
|
-
children: /* @__PURE__ */ (0,
|
|
7176
|
-
|
|
7260
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7261
|
+
import_radix_ui8.Checkbox.Root,
|
|
7177
7262
|
{
|
|
7178
7263
|
checked: isSelected,
|
|
7179
7264
|
onCheckedChange: () => handleSelectRow(key),
|
|
7180
7265
|
className: "flex h-4 w-4 items-center justify-center rounded border border-border-input bg-white dark:bg-white/5 data-[state=checked]:border-primary data-[state=checked]:bg-primary",
|
|
7181
|
-
children: /* @__PURE__ */ (0,
|
|
7182
|
-
|
|
7266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_radix_ui8.Checkbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7267
|
+
import_lucide_react8.CheckIcon,
|
|
7183
7268
|
{
|
|
7184
7269
|
size: 10,
|
|
7185
7270
|
className: "text-primary-foreground"
|
|
@@ -7189,7 +7274,7 @@ var ControlledTable = ({
|
|
|
7189
7274
|
)
|
|
7190
7275
|
}
|
|
7191
7276
|
),
|
|
7192
|
-
fields.map((field) => /* @__PURE__ */ (0,
|
|
7277
|
+
fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7193
7278
|
"td",
|
|
7194
7279
|
{
|
|
7195
7280
|
className: `px-3 py-3 ${field.textAlign === "center" ? "text-center" : field.textAlign === "right" ? "text-right" : "text-left"}`,
|
|
@@ -7198,29 +7283,29 @@ var ControlledTable = ({
|
|
|
7198
7283
|
},
|
|
7199
7284
|
field.id
|
|
7200
7285
|
)),
|
|
7201
|
-
hasActions && /* @__PURE__ */ (0,
|
|
7286
|
+
hasActions && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7202
7287
|
"td",
|
|
7203
7288
|
{
|
|
7204
7289
|
className: "px-3 py-3",
|
|
7205
7290
|
onClick: (e) => e.stopPropagation(),
|
|
7206
|
-
children: /* @__PURE__ */ (0,
|
|
7207
|
-
withEditAction && /* @__PURE__ */ (0,
|
|
7291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
7292
|
+
withEditAction && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7208
7293
|
"button",
|
|
7209
7294
|
{
|
|
7210
7295
|
className: "inline-flex h-7 w-7 items-center justify-center rounded hover:bg-surface-hover",
|
|
7211
7296
|
onClick: () => handleEditAction?.(record.id),
|
|
7212
|
-
children: /* @__PURE__ */ (0,
|
|
7297
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.Edit, { size: 15 })
|
|
7213
7298
|
}
|
|
7214
7299
|
),
|
|
7215
|
-
withDownloadAction && /* @__PURE__ */ (0,
|
|
7300
|
+
withDownloadAction && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7216
7301
|
"button",
|
|
7217
7302
|
{
|
|
7218
7303
|
className: "inline-flex h-7 w-7 items-center justify-center rounded hover:bg-surface-hover",
|
|
7219
7304
|
onClick: () => handleDownloadAction?.(record.id),
|
|
7220
|
-
children: /* @__PURE__ */ (0,
|
|
7305
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.Download, { size: 15 })
|
|
7221
7306
|
}
|
|
7222
7307
|
),
|
|
7223
|
-
withOpenAction && /* @__PURE__ */ (0,
|
|
7308
|
+
withOpenAction && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7224
7309
|
"button",
|
|
7225
7310
|
{
|
|
7226
7311
|
className: "inline-flex h-7 w-7 items-center justify-center rounded hover:bg-surface-hover",
|
|
@@ -7232,23 +7317,23 @@ var ControlledTable = ({
|
|
|
7232
7317
|
else if (handleClickIcon)
|
|
7233
7318
|
handleClickIcon(record);
|
|
7234
7319
|
},
|
|
7235
|
-
children: /* @__PURE__ */ (0,
|
|
7320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.Eye, { size: 15 })
|
|
7236
7321
|
}
|
|
7237
7322
|
),
|
|
7238
|
-
withCloneAction && /* @__PURE__ */ (0,
|
|
7323
|
+
withCloneAction && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7239
7324
|
"button",
|
|
7240
7325
|
{
|
|
7241
7326
|
className: "inline-flex h-7 w-7 items-center justify-center rounded hover:bg-surface-hover",
|
|
7242
7327
|
onClick: () => handleClickIcon?.(record),
|
|
7243
|
-
children: /* @__PURE__ */ (0,
|
|
7328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.Copy, { size: 15 })
|
|
7244
7329
|
}
|
|
7245
7330
|
),
|
|
7246
|
-
withRemoveAction && /* @__PURE__ */ (0,
|
|
7331
|
+
withRemoveAction && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7247
7332
|
"button",
|
|
7248
7333
|
{
|
|
7249
7334
|
className: "inline-flex h-7 w-7 items-center justify-center rounded text-destructive hover:bg-destructive/10",
|
|
7250
7335
|
onClick: () => handleRemoveAction?.(record.id),
|
|
7251
|
-
children: /* @__PURE__ */ (0,
|
|
7336
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react8.Trash2, { size: 15 })
|
|
7252
7337
|
}
|
|
7253
7338
|
)
|
|
7254
7339
|
] })
|
|
@@ -7261,7 +7346,7 @@ var ControlledTable = ({
|
|
|
7261
7346
|
}) })
|
|
7262
7347
|
] }) })
|
|
7263
7348
|
] }),
|
|
7264
|
-
withPagination && count3 > 0 && /* @__PURE__ */ (0,
|
|
7349
|
+
withPagination && count3 > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mt-3", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7265
7350
|
ControlledPagination_default,
|
|
7266
7351
|
{
|
|
7267
7352
|
currentPage,
|
|
@@ -7446,6 +7531,7 @@ var AuxaliaTokens = {
|
|
|
7446
7531
|
Badge,
|
|
7447
7532
|
Button,
|
|
7448
7533
|
Card,
|
|
7534
|
+
Checkbox,
|
|
7449
7535
|
CollapsibleContent,
|
|
7450
7536
|
CollapsibleRoot,
|
|
7451
7537
|
CollapsibleTrigger,
|
|
@@ -7498,6 +7584,8 @@ var AuxaliaTokens = {
|
|
|
7498
7584
|
PopoverAnchor,
|
|
7499
7585
|
PopoverContent,
|
|
7500
7586
|
PopoverTrigger,
|
|
7587
|
+
RadioGroup,
|
|
7588
|
+
RadioGroupItem,
|
|
7501
7589
|
Select,
|
|
7502
7590
|
SelectContent,
|
|
7503
7591
|
SelectGroup,
|
|
@@ -7524,6 +7612,8 @@ var AuxaliaTokens = {
|
|
|
7524
7612
|
TooltipTrigger,
|
|
7525
7613
|
badgeVariants,
|
|
7526
7614
|
buttonVariants,
|
|
7615
|
+
checkboxVariants,
|
|
7527
7616
|
cn,
|
|
7617
|
+
radioItemVariants,
|
|
7528
7618
|
tailwindPreset
|
|
7529
7619
|
});
|