@firecms/ui 3.0.0-beta.13 → 3.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert.d.ts +1 -0
- package/dist/components/Autocomplete.d.ts +4 -2
- package/dist/components/Dialog.d.ts +5 -1
- package/dist/components/Select.d.ts +2 -0
- package/dist/index.css +1 -0
- package/dist/index.es.js +348 -295
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +348 -295
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.d.ts +2 -2
- package/package.json +3 -3
- package/src/components/Alert.tsx +7 -4
- package/src/components/Autocomplete.tsx +10 -5
- package/src/components/BooleanSwitch.tsx +7 -3
- package/src/components/BooleanSwitchWithLabel.tsx +3 -3
- package/src/components/Button.tsx +7 -5
- package/src/components/Dialog.tsx +12 -3
- package/src/components/LoadingButton.tsx +1 -1
- package/src/components/MultiSelect.tsx +2 -3
- package/src/components/Select.tsx +47 -40
- package/src/icons/Icon.tsx +1 -1
- package/src/index.css +1 -0
- package/src/material-icons.woff2 +0 -0
- package/src/styles.ts +2 -2
- package/tailwind.config.js +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40";
|
|
45
45
|
const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
|
|
46
46
|
const paperMixin = "bg-white rounded-md dark:bg-surface-950 border border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
|
|
47
|
-
const cardMixin = "bg-white border border-surface-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-surface-950 dark:border-surface-700 dark:border-opacity-40
|
|
48
|
-
const cardClickableMixin = "hover:bg-
|
|
47
|
+
const cardMixin = "bg-white border border-surface-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-surface-950 dark:border-surface-700 dark:border-opacity-40";
|
|
48
|
+
const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 hover:ring-2 hover:ring-primary cursor-pointer";
|
|
49
49
|
const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
|
|
50
50
|
function cls(...classes) {
|
|
51
51
|
return tailwindMerge.twMerge(clsx.clsx(classes));
|
|
@@ -462,11 +462,12 @@
|
|
|
462
462
|
};
|
|
463
463
|
};
|
|
464
464
|
function Autocomplete(t0) {
|
|
465
|
-
const $ = reactCompilerRuntime.c(
|
|
465
|
+
const $ = reactCompilerRuntime.c(14);
|
|
466
466
|
const {
|
|
467
467
|
children,
|
|
468
468
|
open,
|
|
469
|
-
setOpen
|
|
469
|
+
setOpen,
|
|
470
|
+
className
|
|
470
471
|
} = t0;
|
|
471
472
|
const autocompleteRef = React.useRef(null);
|
|
472
473
|
let t1;
|
|
@@ -489,50 +490,61 @@
|
|
|
489
490
|
}
|
|
490
491
|
const t4 = open ? paperMixin : "";
|
|
491
492
|
let t5;
|
|
492
|
-
if ($[4] !== t4) {
|
|
493
|
-
t5 = cls(t4, "bg-surface-50 dark:bg-surface-900
|
|
494
|
-
$[4] =
|
|
495
|
-
$[5] =
|
|
493
|
+
if ($[4] !== className || $[5] !== t4) {
|
|
494
|
+
t5 = cls(t4, "bg-surface-50 dark:bg-surface-900", className);
|
|
495
|
+
$[4] = className;
|
|
496
|
+
$[5] = t4;
|
|
497
|
+
$[6] = t5;
|
|
496
498
|
} else {
|
|
497
|
-
t5 = $[
|
|
499
|
+
t5 = $[6];
|
|
498
500
|
}
|
|
499
501
|
let t6;
|
|
500
|
-
if ($[
|
|
502
|
+
if ($[7] !== children || $[8] !== t5) {
|
|
501
503
|
t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: autocompleteRef, className: t5, children });
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
504
|
+
$[7] = children;
|
|
505
|
+
$[8] = t5;
|
|
506
|
+
$[9] = t6;
|
|
505
507
|
} else {
|
|
506
|
-
t6 = $[
|
|
508
|
+
t6 = $[9];
|
|
507
509
|
}
|
|
508
510
|
let t7;
|
|
509
|
-
if ($[
|
|
510
|
-
t7 = /* @__PURE__ */ jsxRuntime.jsx(Collapse, { in: open, duration:
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
511
|
+
if ($[10] !== open || $[11] !== t3 || $[12] !== t6) {
|
|
512
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsx(Collapse, { in: open, duration: 30, className: t3, children: t6 });
|
|
513
|
+
$[10] = open;
|
|
514
|
+
$[11] = t3;
|
|
515
|
+
$[12] = t6;
|
|
516
|
+
$[13] = t7;
|
|
515
517
|
} else {
|
|
516
|
-
t7 = $[
|
|
518
|
+
t7 = $[13];
|
|
517
519
|
}
|
|
518
520
|
return t7;
|
|
519
521
|
}
|
|
520
522
|
function AutocompleteItem(t0) {
|
|
521
|
-
const $ = reactCompilerRuntime.c(
|
|
523
|
+
const $ = reactCompilerRuntime.c(6);
|
|
522
524
|
const {
|
|
523
525
|
children,
|
|
524
|
-
onClick
|
|
526
|
+
onClick,
|
|
527
|
+
className
|
|
525
528
|
} = t0;
|
|
526
529
|
let t1;
|
|
527
|
-
if ($[0] !==
|
|
528
|
-
t1 =
|
|
529
|
-
$[0] =
|
|
530
|
-
$[1] =
|
|
531
|
-
$[2] = t1;
|
|
530
|
+
if ($[0] !== className) {
|
|
531
|
+
t1 = cls("flex w-full items-center h-[48px] cursor-pointer hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800", className);
|
|
532
|
+
$[0] = className;
|
|
533
|
+
$[1] = t1;
|
|
532
534
|
} else {
|
|
533
|
-
t1 = $[
|
|
535
|
+
t1 = $[1];
|
|
534
536
|
}
|
|
535
|
-
|
|
537
|
+
let t2;
|
|
538
|
+
if ($[2] !== children || $[3] !== onClick || $[4] !== t1) {
|
|
539
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t1, onClick, children });
|
|
540
|
+
$[2] = children;
|
|
541
|
+
$[3] = onClick;
|
|
542
|
+
$[4] = t1;
|
|
543
|
+
$[5] = t2;
|
|
544
|
+
} else {
|
|
545
|
+
t2 = $[5];
|
|
546
|
+
}
|
|
547
|
+
return t2;
|
|
536
548
|
}
|
|
537
549
|
const getSizeClasses = (size) => {
|
|
538
550
|
switch (size) {
|
|
@@ -561,13 +573,14 @@
|
|
|
561
573
|
}
|
|
562
574
|
};
|
|
563
575
|
const Alert = (t0) => {
|
|
564
|
-
const $ = reactCompilerRuntime.c(
|
|
576
|
+
const $ = reactCompilerRuntime.c(19);
|
|
565
577
|
const {
|
|
566
578
|
children,
|
|
567
579
|
onDismiss,
|
|
568
580
|
color: t1,
|
|
569
581
|
size: t2,
|
|
570
582
|
action,
|
|
583
|
+
outerClassName,
|
|
571
584
|
className,
|
|
572
585
|
style
|
|
573
586
|
} = t0;
|
|
@@ -575,12 +588,12 @@
|
|
|
575
588
|
const size = t2 === void 0 ? "medium" : t2;
|
|
576
589
|
let t3;
|
|
577
590
|
let t4;
|
|
578
|
-
if ($[0] !==
|
|
591
|
+
if ($[0] !== color || $[1] !== outerClassName || $[2] !== size || $[3] !== style) {
|
|
579
592
|
const classes = getColorClasses(color);
|
|
580
593
|
t3 = style;
|
|
581
|
-
t4 = cls(getSizeClasses(size), "w-full", "font-medium", "rounded-md flex items-center gap-2", classes,
|
|
582
|
-
$[0] =
|
|
583
|
-
$[1] =
|
|
594
|
+
t4 = cls(getSizeClasses(size), "w-full", "font-medium", "rounded-md flex items-center gap-2", classes, outerClassName);
|
|
595
|
+
$[0] = color;
|
|
596
|
+
$[1] = outerClassName;
|
|
584
597
|
$[2] = size;
|
|
585
598
|
$[3] = style;
|
|
586
599
|
$[4] = t3;
|
|
@@ -590,38 +603,47 @@
|
|
|
590
603
|
t4 = $[5];
|
|
591
604
|
}
|
|
592
605
|
let t5;
|
|
593
|
-
if ($[6] !==
|
|
594
|
-
t5 =
|
|
595
|
-
$[6] =
|
|
606
|
+
if ($[6] !== className) {
|
|
607
|
+
t5 = cls("flex-grow", className);
|
|
608
|
+
$[6] = className;
|
|
596
609
|
$[7] = t5;
|
|
597
610
|
} else {
|
|
598
611
|
t5 = $[7];
|
|
599
612
|
}
|
|
600
613
|
let t6;
|
|
601
|
-
if ($[8] !==
|
|
602
|
-
t6 =
|
|
603
|
-
$[8] =
|
|
604
|
-
$[9] =
|
|
614
|
+
if ($[8] !== children || $[9] !== t5) {
|
|
615
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t5, children });
|
|
616
|
+
$[8] = children;
|
|
617
|
+
$[9] = t5;
|
|
618
|
+
$[10] = t6;
|
|
605
619
|
} else {
|
|
606
|
-
t6 = $[
|
|
620
|
+
t6 = $[10];
|
|
607
621
|
}
|
|
608
622
|
let t7;
|
|
609
|
-
if ($[
|
|
610
|
-
t7 = /* @__PURE__ */ jsxRuntime.
|
|
611
|
-
|
|
623
|
+
if ($[11] !== onDismiss) {
|
|
624
|
+
t7 = onDismiss && /* @__PURE__ */ jsxRuntime.jsx("button", { className: "text-surface-accent-400 hover:text-surface-accent-600 dark:text-surface-accent-500 dark:hover:text-surface-accent-400", onClick: onDismiss, children: "×" });
|
|
625
|
+
$[11] = onDismiss;
|
|
626
|
+
$[12] = t7;
|
|
627
|
+
} else {
|
|
628
|
+
t7 = $[12];
|
|
629
|
+
}
|
|
630
|
+
let t8;
|
|
631
|
+
if ($[13] !== action || $[14] !== t3 || $[15] !== t4 || $[16] !== t6 || $[17] !== t7) {
|
|
632
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsxs("div", { style: t3, className: t4, children: [
|
|
612
633
|
t6,
|
|
634
|
+
t7,
|
|
613
635
|
action
|
|
614
636
|
] });
|
|
615
|
-
$[
|
|
616
|
-
$[
|
|
617
|
-
$[
|
|
618
|
-
$[
|
|
619
|
-
$[
|
|
620
|
-
$[
|
|
637
|
+
$[13] = action;
|
|
638
|
+
$[14] = t3;
|
|
639
|
+
$[15] = t4;
|
|
640
|
+
$[16] = t6;
|
|
641
|
+
$[17] = t7;
|
|
642
|
+
$[18] = t8;
|
|
621
643
|
} else {
|
|
622
|
-
|
|
644
|
+
t8 = $[18];
|
|
623
645
|
}
|
|
624
|
-
return
|
|
646
|
+
return t8;
|
|
625
647
|
};
|
|
626
648
|
const AvatarInner = (t0, ref) => {
|
|
627
649
|
const $ = reactCompilerRuntime.c(25);
|
|
@@ -730,18 +752,22 @@
|
|
|
730
752
|
} else {
|
|
731
753
|
onValueChange?.(!value);
|
|
732
754
|
}
|
|
733
|
-
}, className: cls(size === "small" ? "w-[38px] h-[22px] min-w-[38px] min-h-[22px]" : "w-[42px] h-[26px] min-w-[42px] min-h-[26px]", "outline-none rounded-full relative shadow-sm", value ? disabled ? "bg-white bg-opacity-54 dark:bg-surface-accent-950 border-surface-accent-100 dark:border-surface-accent-700 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700" : "ring-secondary ring-1 bg-secondary dark:bg-secondary" : "bg-white bg-opacity-54 dark:bg-surface-accent-900 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700", className), ...props, children: [
|
|
755
|
+
}, className: cls(size === "smallest" ? "w-[34px] h-[18px] min-w-[34px] min-h-[18px]" : size === "small" ? "w-[38px] h-[22px] min-w-[38px] min-h-[22px]" : "w-[42px] h-[26px] min-w-[42px] min-h-[26px]", "outline-none rounded-full relative shadow-sm", value ? disabled ? "bg-white bg-opacity-54 dark:bg-surface-accent-950 border-surface-accent-100 dark:border-surface-accent-700 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700" : "ring-secondary ring-1 bg-secondary dark:bg-secondary" : "bg-white bg-opacity-54 dark:bg-surface-accent-900 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700", className), ...props, children: [
|
|
734
756
|
allowIndeterminate && (value === null || value === void 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("block rounded-full transition-transform duration-100 transform will-change-auto", disabled ? "bg-surface-accent-400 dark:bg-surface-accent-600" : "bg-surface-accent-400 dark:bg-surface-accent-600", {
|
|
735
757
|
"w-[21px] h-[10px]": size === "medium" || size === "large",
|
|
736
758
|
"w-[19px] h-[8px]": size === "small",
|
|
759
|
+
"w-[16px] h-[6px]": size === "smallest",
|
|
737
760
|
"translate-x-[10px]": size === "medium" || size === "large",
|
|
738
|
-
"translate-x-[9px]": size === "small"
|
|
761
|
+
"translate-x-[9px]": size === "small",
|
|
762
|
+
"translate-x-[8px]": size === "smallest"
|
|
739
763
|
}) }, "knob"),
|
|
740
764
|
!(allowIndeterminate && (value === null || value === void 0)) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("block rounded-full transition-transform duration-100 transform will-change-auto", disabled ? "bg-surface-accent-300 dark:bg-surface-accent-700" : value ? "bg-white" : "bg-surface-accent-600 dark:bg-surface-accent-400", {
|
|
741
765
|
"w-[21px] h-[21px]": size === "medium" || size === "large",
|
|
742
766
|
"w-[19px] h-[19px]": size === "small",
|
|
767
|
+
"w-[16px] h-[16px]": size === "smallest",
|
|
743
768
|
[value ? "translate-x-[19px]" : "translate-x-[3px]"]: size === "medium" || size === "large",
|
|
744
|
-
[value ? "translate-x-[17px]" : "translate-x-[2px]"]: size === "small"
|
|
769
|
+
[value ? "translate-x-[17px]" : "translate-x-[2px]"]: size === "small",
|
|
770
|
+
[value ? "translate-x-[16px]" : "translate-x-[1px]"]: size === "smallest"
|
|
745
771
|
}) }, "knob")
|
|
746
772
|
] });
|
|
747
773
|
});
|
|
@@ -773,7 +799,7 @@
|
|
|
773
799
|
"min-h-[32px]": size === "small",
|
|
774
800
|
"min-h-[42px]": size === "medium",
|
|
775
801
|
"min-h-[64px]": size === "large"
|
|
776
|
-
}, size === "small" ? "pl-2" : "pl-4", size === "small" ? "pr-4" : "pr-6", position === "end" ? "flex-row-reverse" : "flex-row", fullWidth ? "w-full" : "", className), onClick: disabled ? void 0 : (e) => {
|
|
802
|
+
}, size === "small" || size === "smallest" ? "pl-2" : "pl-4", size === "small" || size === "smallest" ? "pr-4" : "pr-6", position === "end" ? "flex-row-reverse" : "flex-row", fullWidth ? "w-full" : "", className), onClick: disabled ? void 0 : (e) => {
|
|
777
803
|
if (props.allowIndeterminate) {
|
|
778
804
|
if (value === null || value === void 0) onValueChange?.(true);
|
|
779
805
|
else if (value) onValueChange?.(false);
|
|
@@ -783,11 +809,11 @@
|
|
|
783
809
|
}
|
|
784
810
|
}, children: [
|
|
785
811
|
/* @__PURE__ */ jsxRuntime.jsx(BooleanSwitch, { value, ref: refInput, size, className: cls(invisible && focus ? focusedClasses : "", inputClassName), disabled, ...props }),
|
|
786
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("flex-grow", position === "end" ? "mr-4" : "ml-4", size === "small" ? "text-sm" : "text-base"), children: label })
|
|
812
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("flex-grow", position === "end" ? "mr-4" : "ml-4", size === "small" || size === "smallest" ? "text-sm" : "text-base"), children: label })
|
|
787
813
|
] });
|
|
788
814
|
};
|
|
789
815
|
const ButtonInner = React.forwardRef((t0, ref) => {
|
|
790
|
-
const $ = reactCompilerRuntime.c(
|
|
816
|
+
const $ = reactCompilerRuntime.c(55);
|
|
791
817
|
let Component;
|
|
792
818
|
let children;
|
|
793
819
|
let className;
|
|
@@ -839,7 +865,7 @@
|
|
|
839
865
|
const size = t3 === void 0 ? "medium" : t3;
|
|
840
866
|
const startIcon = t4 === void 0 ? null : t4;
|
|
841
867
|
const fullWidth = t5 === void 0 ? false : t5;
|
|
842
|
-
const color = t6 === void 0 ? "
|
|
868
|
+
const color = t6 === void 0 ? "neutral" : t6;
|
|
843
869
|
const t7 = !fullWidth;
|
|
844
870
|
const t8 = variant === "filled" && color === "primary" && !disabled;
|
|
845
871
|
const t9 = variant === "filled" && color === "secondary" && !disabled;
|
|
@@ -874,17 +900,17 @@
|
|
|
874
900
|
"border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": t9,
|
|
875
901
|
"border border-red-500 bg-red-500 hover:bg-red-500 focus:ring-red-500 shadow hover:ring-1 hover:ring-red-600 text-white hover:text-white": t10,
|
|
876
902
|
"border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow hover:ring-1 hover:ring-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t11,
|
|
877
|
-
"border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-800 dark:hover:bg-surface-accent-700 dark:text-text-primary-dark": t12,
|
|
903
|
+
"border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-800 dark:hover:bg-surface-accent-700 dark:text-text-primary-dark hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t12,
|
|
878
904
|
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t13,
|
|
879
905
|
"border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t14,
|
|
880
906
|
"border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
|
|
881
907
|
"border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:dark:bg-surface-700": t16,
|
|
882
|
-
"border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 dark:text-text-primary-dark dark:hover:bg-surface-accent-700": t17,
|
|
908
|
+
"border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 dark:text-text-primary-dark dark:hover:text-text-primary-dark dark:hover:bg-surface-accent-700": t17,
|
|
883
909
|
"border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
|
|
884
910
|
"border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
|
|
885
911
|
"border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
|
|
886
912
|
"border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
|
|
887
|
-
"border border-surface-
|
|
913
|
+
"border border-surface-300 text-text-primary hover:bg-surface-accent-200 dark:border-surface-600 dark:text-text-primary-dark dark:hover:bg-surface-accent-700": t22,
|
|
888
914
|
"text-text-disabled dark:text-text-disabled-dark": disabled,
|
|
889
915
|
"border border-transparent opacity-50": t23,
|
|
890
916
|
"border border-surface-500 opacity-50": t24,
|
|
@@ -954,22 +980,24 @@
|
|
|
954
980
|
}
|
|
955
981
|
const t31 = props;
|
|
956
982
|
let t32;
|
|
957
|
-
if ($[44] !== children || $[45] !== disabled || $[46] !==
|
|
958
|
-
t32 = /* @__PURE__ */ jsxRuntime.jsxs("button", { ref: t26, type: t27, onClick: t28, className: t29, disabled, ...t31, children: [
|
|
983
|
+
if ($[44] !== children || $[45] !== disabled || $[46] !== size || $[47] !== startIcon || $[48] !== t26 || $[49] !== t27 || $[50] !== t28 || $[51] !== t29 || $[52] !== t31 || $[53] !== variant) {
|
|
984
|
+
t32 = /* @__PURE__ */ jsxRuntime.jsxs("button", { ref: t26, type: t27, onClick: t28, className: t29, disabled, "data-variant": variant, "data-size": size, ...t31, children: [
|
|
959
985
|
startIcon,
|
|
960
986
|
children
|
|
961
987
|
] });
|
|
962
988
|
$[44] = children;
|
|
963
989
|
$[45] = disabled;
|
|
964
|
-
$[46] =
|
|
965
|
-
$[47] =
|
|
966
|
-
$[48] =
|
|
967
|
-
$[49] =
|
|
968
|
-
$[50] =
|
|
969
|
-
$[51] =
|
|
970
|
-
$[52] =
|
|
971
|
-
|
|
972
|
-
|
|
990
|
+
$[46] = size;
|
|
991
|
+
$[47] = startIcon;
|
|
992
|
+
$[48] = t26;
|
|
993
|
+
$[49] = t27;
|
|
994
|
+
$[50] = t28;
|
|
995
|
+
$[51] = t29;
|
|
996
|
+
$[52] = t31;
|
|
997
|
+
$[53] = variant;
|
|
998
|
+
$[54] = t32;
|
|
999
|
+
} else {
|
|
1000
|
+
t32 = $[54];
|
|
973
1001
|
}
|
|
974
1002
|
return t32;
|
|
975
1003
|
});
|
|
@@ -1277,6 +1305,7 @@
|
|
|
1277
1305
|
if ($[0] !== style || $[1] !== t2) {
|
|
1278
1306
|
t3 = {
|
|
1279
1307
|
fontSize: t2,
|
|
1308
|
+
verticalAlign: "middle",
|
|
1280
1309
|
...style
|
|
1281
1310
|
};
|
|
1282
1311
|
$[0] = style;
|
|
@@ -1288,7 +1317,7 @@
|
|
|
1288
1317
|
const t4 = color ? colorClassesMapping[color] : "";
|
|
1289
1318
|
let t5;
|
|
1290
1319
|
if ($[3] !== className || $[4] !== t4) {
|
|
1291
|
-
t5 = cls("material-icons",
|
|
1320
|
+
t5 = cls("material-icons", t4, "select-none", className);
|
|
1292
1321
|
$[3] = className;
|
|
1293
1322
|
$[4] = t4;
|
|
1294
1323
|
$[5] = t5;
|
|
@@ -27992,7 +28021,7 @@
|
|
|
27992
28021
|
full: "max-w-full min-w-full w-full"
|
|
27993
28022
|
};
|
|
27994
28023
|
const Dialog = (t0) => {
|
|
27995
|
-
const $ = reactCompilerRuntime.c(
|
|
28024
|
+
const $ = reactCompilerRuntime.c(42);
|
|
27996
28025
|
const {
|
|
27997
28026
|
open,
|
|
27998
28027
|
onOpenChange,
|
|
@@ -28008,17 +28037,19 @@
|
|
|
28008
28037
|
onOpenAutoFocus,
|
|
28009
28038
|
onEscapeKeyDown,
|
|
28010
28039
|
onPointerDownOutside,
|
|
28011
|
-
onInteractOutside
|
|
28040
|
+
onInteractOutside,
|
|
28041
|
+
disableInitialFocus: t5
|
|
28012
28042
|
} = t0;
|
|
28013
28043
|
const fullWidth = t1 === void 0 ? true : t1;
|
|
28014
28044
|
const scrollable = t2 === void 0 ? true : t2;
|
|
28015
28045
|
const maxWidth = t3 === void 0 ? "lg" : t3;
|
|
28016
28046
|
const modal = t4 === void 0 ? true : t4;
|
|
28047
|
+
const disableInitialFocus = t5 === void 0 ? true : t5;
|
|
28017
28048
|
const [displayed, setDisplayed] = React.useState(false);
|
|
28018
|
-
let t5;
|
|
28019
28049
|
let t6;
|
|
28050
|
+
let t7;
|
|
28020
28051
|
if ($[0] !== open) {
|
|
28021
|
-
|
|
28052
|
+
t6 = () => {
|
|
28022
28053
|
if (!open) {
|
|
28023
28054
|
const timeout = setTimeout(() => {
|
|
28024
28055
|
setDisplayed(false);
|
|
@@ -28029,126 +28060,140 @@
|
|
|
28029
28060
|
return _temp$2;
|
|
28030
28061
|
}
|
|
28031
28062
|
};
|
|
28032
|
-
|
|
28063
|
+
t7 = [open];
|
|
28033
28064
|
$[0] = open;
|
|
28034
|
-
$[1] =
|
|
28035
|
-
$[2] =
|
|
28065
|
+
$[1] = t6;
|
|
28066
|
+
$[2] = t7;
|
|
28036
28067
|
} else {
|
|
28037
|
-
|
|
28038
|
-
|
|
28068
|
+
t6 = $[1];
|
|
28069
|
+
t7 = $[2];
|
|
28039
28070
|
}
|
|
28040
|
-
React.useEffect(
|
|
28041
|
-
const
|
|
28042
|
-
let
|
|
28071
|
+
React.useEffect(t6, t7);
|
|
28072
|
+
const t8 = displayed || open;
|
|
28073
|
+
let t9;
|
|
28043
28074
|
if ($[3] !== containerClassName) {
|
|
28044
|
-
|
|
28075
|
+
t9 = cls("fixed inset-0 z-30", containerClassName);
|
|
28045
28076
|
$[3] = containerClassName;
|
|
28046
|
-
$[4] =
|
|
28077
|
+
$[4] = t9;
|
|
28047
28078
|
} else {
|
|
28048
|
-
|
|
28079
|
+
t9 = $[4];
|
|
28049
28080
|
}
|
|
28050
|
-
const
|
|
28051
|
-
let
|
|
28052
|
-
if ($[5] !==
|
|
28053
|
-
|
|
28054
|
-
$[5] =
|
|
28055
|
-
$[6] =
|
|
28081
|
+
const t10 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28082
|
+
let t11;
|
|
28083
|
+
if ($[5] !== t10) {
|
|
28084
|
+
t11 = cls("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 bg-black bg-opacity-50 dark:bg-opacity-60 backdrop-blur-sm ", t10, "z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center");
|
|
28085
|
+
$[5] = t10;
|
|
28086
|
+
$[6] = t11;
|
|
28056
28087
|
} else {
|
|
28057
|
-
|
|
28088
|
+
t11 = $[6];
|
|
28058
28089
|
}
|
|
28059
|
-
const
|
|
28060
|
-
let
|
|
28061
|
-
if ($[7] !==
|
|
28062
|
-
|
|
28063
|
-
pointerEvents:
|
|
28090
|
+
const t12 = displayed ? "auto" : "none";
|
|
28091
|
+
let t13;
|
|
28092
|
+
if ($[7] !== t12) {
|
|
28093
|
+
t13 = {
|
|
28094
|
+
pointerEvents: t12
|
|
28064
28095
|
};
|
|
28065
|
-
$[7] =
|
|
28066
|
-
$[8] =
|
|
28096
|
+
$[7] = t12;
|
|
28097
|
+
$[8] = t13;
|
|
28067
28098
|
} else {
|
|
28068
|
-
|
|
28099
|
+
t13 = $[8];
|
|
28069
28100
|
}
|
|
28070
|
-
let
|
|
28071
|
-
if ($[9] !==
|
|
28072
|
-
|
|
28073
|
-
$[9] =
|
|
28074
|
-
$[10] =
|
|
28075
|
-
$[11] =
|
|
28101
|
+
let t14;
|
|
28102
|
+
if ($[9] !== t11 || $[10] !== t13) {
|
|
28103
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, { className: t11, style: t13 });
|
|
28104
|
+
$[9] = t11;
|
|
28105
|
+
$[10] = t13;
|
|
28106
|
+
$[11] = t14;
|
|
28076
28107
|
} else {
|
|
28077
|
-
|
|
28108
|
+
t14 = $[11];
|
|
28078
28109
|
}
|
|
28079
|
-
let
|
|
28080
|
-
if ($[12]
|
|
28081
|
-
|
|
28082
|
-
|
|
28083
|
-
|
|
28084
|
-
|
|
28085
|
-
|
|
28086
|
-
|
|
28087
|
-
|
|
28088
|
-
|
|
28089
|
-
const t18 = scrollable && "overflow-y-auto";
|
|
28090
|
-
const t19 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28091
|
-
const t20 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28092
|
-
let t21;
|
|
28093
|
-
if ($[13] !== className || $[14] !== t15 || $[15] !== t16 || $[16] !== t17 || $[17] !== t18 || $[18] !== t19 || $[19] !== t20) {
|
|
28094
|
-
t21 = cls(paperMixin, "z-30", "relative", "outline-none focus:outline-none", t15, t16, "text-surface-accent-900 dark:text-white", "justify-center items-center", t17, "ease-in-out duration-200", t18, t19, t20, className);
|
|
28095
|
-
$[13] = className;
|
|
28110
|
+
let t15;
|
|
28111
|
+
if ($[12] !== disableInitialFocus || $[13] !== onOpenAutoFocus) {
|
|
28112
|
+
t15 = (e) => {
|
|
28113
|
+
if (disableInitialFocus) {
|
|
28114
|
+
e.preventDefault();
|
|
28115
|
+
}
|
|
28116
|
+
onOpenAutoFocus?.(e);
|
|
28117
|
+
};
|
|
28118
|
+
$[12] = disableInitialFocus;
|
|
28119
|
+
$[13] = onOpenAutoFocus;
|
|
28096
28120
|
$[14] = t15;
|
|
28097
|
-
$[15] = t16;
|
|
28098
|
-
$[16] = t17;
|
|
28099
|
-
$[17] = t18;
|
|
28100
|
-
$[18] = t19;
|
|
28101
|
-
$[19] = t20;
|
|
28102
|
-
$[20] = t21;
|
|
28103
28121
|
} else {
|
|
28104
|
-
|
|
28122
|
+
t15 = $[14];
|
|
28105
28123
|
}
|
|
28106
|
-
let
|
|
28107
|
-
if ($[
|
|
28108
|
-
|
|
28109
|
-
$[
|
|
28110
|
-
$[22] = t21;
|
|
28111
|
-
$[23] = t22;
|
|
28124
|
+
let t16;
|
|
28125
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28126
|
+
t16 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
|
|
28127
|
+
$[15] = t16;
|
|
28112
28128
|
} else {
|
|
28113
|
-
|
|
28129
|
+
t16 = $[15];
|
|
28114
28130
|
}
|
|
28131
|
+
const t17 = fullWidth && !fullScreen ? "w-11/12" : void 0;
|
|
28132
|
+
const t18 = fullHeight && !fullScreen ? "h-full" : void 0;
|
|
28133
|
+
const t19 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
|
|
28134
|
+
const t20 = scrollable && "overflow-y-auto";
|
|
28135
|
+
const t21 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28136
|
+
const t22 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28115
28137
|
let t23;
|
|
28116
|
-
if ($[
|
|
28117
|
-
t23 =
|
|
28118
|
-
$[
|
|
28119
|
-
$[
|
|
28120
|
-
$[
|
|
28121
|
-
$[
|
|
28122
|
-
$[
|
|
28123
|
-
$[
|
|
28124
|
-
|
|
28125
|
-
|
|
28138
|
+
if ($[16] !== className || $[17] !== t17 || $[18] !== t18 || $[19] !== t19 || $[20] !== t20 || $[21] !== t21 || $[22] !== t22) {
|
|
28139
|
+
t23 = cls(paperMixin, "z-30", "relative", "outline-none focus:outline-none", t17, t18, "text-surface-accent-900 dark:text-white", "justify-center items-center", t19, "ease-in-out duration-200", t20, t21, t22, className);
|
|
28140
|
+
$[16] = className;
|
|
28141
|
+
$[17] = t17;
|
|
28142
|
+
$[18] = t18;
|
|
28143
|
+
$[19] = t19;
|
|
28144
|
+
$[20] = t20;
|
|
28145
|
+
$[21] = t21;
|
|
28146
|
+
$[22] = t22;
|
|
28147
|
+
$[23] = t23;
|
|
28148
|
+
} else {
|
|
28149
|
+
t23 = $[23];
|
|
28126
28150
|
}
|
|
28127
28151
|
let t24;
|
|
28128
|
-
if ($[
|
|
28129
|
-
t24 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
28130
|
-
|
|
28131
|
-
|
|
28132
|
-
]
|
|
28133
|
-
$[30] = t13;
|
|
28134
|
-
$[31] = t23;
|
|
28135
|
-
$[32] = t8;
|
|
28136
|
-
$[33] = t24;
|
|
28152
|
+
if ($[24] !== children || $[25] !== t23) {
|
|
28153
|
+
t24 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t23, children });
|
|
28154
|
+
$[24] = children;
|
|
28155
|
+
$[25] = t23;
|
|
28156
|
+
$[26] = t24;
|
|
28137
28157
|
} else {
|
|
28138
|
-
t24 = $[
|
|
28158
|
+
t24 = $[26];
|
|
28139
28159
|
}
|
|
28140
28160
|
let t25;
|
|
28141
|
-
if ($[
|
|
28142
|
-
t25 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.
|
|
28143
|
-
$[
|
|
28144
|
-
$[
|
|
28145
|
-
$[
|
|
28146
|
-
$[
|
|
28147
|
-
$[
|
|
28161
|
+
if ($[27] !== onEscapeKeyDown || $[28] !== onInteractOutside || $[29] !== onPointerDownOutside || $[30] !== t15 || $[31] !== t24) {
|
|
28162
|
+
t25 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Content, { onEscapeKeyDown, onOpenAutoFocus: t15, onPointerDownOutside, onInteractOutside, className: t16, children: t24 });
|
|
28163
|
+
$[27] = onEscapeKeyDown;
|
|
28164
|
+
$[28] = onInteractOutside;
|
|
28165
|
+
$[29] = onPointerDownOutside;
|
|
28166
|
+
$[30] = t15;
|
|
28167
|
+
$[31] = t24;
|
|
28168
|
+
$[32] = t25;
|
|
28148
28169
|
} else {
|
|
28149
|
-
t25 = $[
|
|
28170
|
+
t25 = $[32];
|
|
28150
28171
|
}
|
|
28151
|
-
|
|
28172
|
+
let t26;
|
|
28173
|
+
if ($[33] !== t14 || $[34] !== t25 || $[35] !== t9) {
|
|
28174
|
+
t26 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t9, children: [
|
|
28175
|
+
t14,
|
|
28176
|
+
t25
|
|
28177
|
+
] }) });
|
|
28178
|
+
$[33] = t14;
|
|
28179
|
+
$[34] = t25;
|
|
28180
|
+
$[35] = t9;
|
|
28181
|
+
$[36] = t26;
|
|
28182
|
+
} else {
|
|
28183
|
+
t26 = $[36];
|
|
28184
|
+
}
|
|
28185
|
+
let t27;
|
|
28186
|
+
if ($[37] !== modal || $[38] !== onOpenChange || $[39] !== t26 || $[40] !== t8) {
|
|
28187
|
+
t27 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { open: t8, modal, onOpenChange, children: t26 });
|
|
28188
|
+
$[37] = modal;
|
|
28189
|
+
$[38] = onOpenChange;
|
|
28190
|
+
$[39] = t26;
|
|
28191
|
+
$[40] = t8;
|
|
28192
|
+
$[41] = t27;
|
|
28193
|
+
} else {
|
|
28194
|
+
t27 = $[41];
|
|
28195
|
+
}
|
|
28196
|
+
return t27;
|
|
28152
28197
|
};
|
|
28153
28198
|
function _temp$2() {
|
|
28154
28199
|
}
|
|
@@ -28753,7 +28798,7 @@
|
|
|
28753
28798
|
const t2 = props.component;
|
|
28754
28799
|
let t3;
|
|
28755
28800
|
if ($[7] !== loading) {
|
|
28756
|
-
t3 = loading && /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, { size: "
|
|
28801
|
+
t3 = loading && /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, { size: "smallest" });
|
|
28757
28802
|
$[7] = loading;
|
|
28758
28803
|
$[8] = t3;
|
|
28759
28804
|
} else {
|
|
@@ -29663,7 +29708,7 @@
|
|
|
29663
29708
|
}
|
|
29664
29709
|
const MultiSelectContext = React__namespace.createContext({});
|
|
29665
29710
|
const MultiSelect = React__namespace.forwardRef((t0, ref) => {
|
|
29666
|
-
const $ = reactCompilerRuntime.c(
|
|
29711
|
+
const $ = reactCompilerRuntime.c(103);
|
|
29667
29712
|
const {
|
|
29668
29713
|
value,
|
|
29669
29714
|
size: t1,
|
|
@@ -29908,7 +29953,7 @@
|
|
|
29908
29953
|
t24 = $[48];
|
|
29909
29954
|
}
|
|
29910
29955
|
let t25;
|
|
29911
|
-
if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !==
|
|
29956
|
+
if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== size || $[57] !== toggleOption || $[58] !== useChips) {
|
|
29912
29957
|
t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center w-full", children: [
|
|
29913
29958
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
|
|
29914
29959
|
renderValues && renderValues(selectedValues),
|
|
@@ -29932,11 +29977,11 @@
|
|
|
29932
29977
|
event_1.stopPropagation();
|
|
29933
29978
|
handleClear();
|
|
29934
29979
|
} }),
|
|
29935
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29980
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29936
29981
|
] })
|
|
29937
29982
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full mx-auto", children: [
|
|
29938
29983
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: placeholder }),
|
|
29939
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29984
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29940
29985
|
] });
|
|
29941
29986
|
$[49] = children;
|
|
29942
29987
|
$[50] = handleClear;
|
|
@@ -29945,104 +29990,105 @@
|
|
|
29945
29990
|
$[53] = placeholder;
|
|
29946
29991
|
$[54] = renderValues;
|
|
29947
29992
|
$[55] = selectedValues;
|
|
29948
|
-
$[56] =
|
|
29949
|
-
$[57] =
|
|
29950
|
-
$[58] =
|
|
29993
|
+
$[56] = size;
|
|
29994
|
+
$[57] = toggleOption;
|
|
29995
|
+
$[58] = useChips;
|
|
29996
|
+
$[59] = t25;
|
|
29951
29997
|
} else {
|
|
29952
|
-
t25 = $[
|
|
29998
|
+
t25 = $[59];
|
|
29953
29999
|
}
|
|
29954
30000
|
let t26;
|
|
29955
|
-
if ($[
|
|
30001
|
+
if ($[60] !== handleTogglePopover || $[61] !== ref || $[62] !== t24 || $[63] !== t25) {
|
|
29956
30002
|
t26 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
|
|
29957
|
-
$[
|
|
29958
|
-
$[
|
|
29959
|
-
$[
|
|
29960
|
-
$[
|
|
29961
|
-
$[
|
|
30003
|
+
$[60] = handleTogglePopover;
|
|
30004
|
+
$[61] = ref;
|
|
30005
|
+
$[62] = t24;
|
|
30006
|
+
$[63] = t25;
|
|
30007
|
+
$[64] = t26;
|
|
29962
30008
|
} else {
|
|
29963
|
-
t26 = $[
|
|
30009
|
+
t26 = $[64];
|
|
29964
30010
|
}
|
|
29965
30011
|
let t27;
|
|
29966
|
-
if ($[
|
|
30012
|
+
if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29967
30013
|
t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29968
|
-
$[
|
|
30014
|
+
$[65] = t27;
|
|
29969
30015
|
} else {
|
|
29970
|
-
t27 = $[
|
|
30016
|
+
t27 = $[65];
|
|
29971
30017
|
}
|
|
29972
30018
|
let t28;
|
|
29973
|
-
if ($[
|
|
30019
|
+
if ($[66] !== onPopoverOpenChange) {
|
|
29974
30020
|
t28 = () => onPopoverOpenChange(false);
|
|
29975
|
-
$[
|
|
29976
|
-
$[
|
|
30021
|
+
$[66] = onPopoverOpenChange;
|
|
30022
|
+
$[67] = t28;
|
|
29977
30023
|
} else {
|
|
29978
|
-
t28 = $[
|
|
30024
|
+
t28 = $[67];
|
|
29979
30025
|
}
|
|
29980
30026
|
let t29;
|
|
29981
|
-
if ($[
|
|
30027
|
+
if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29982
30028
|
t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
|
|
29983
|
-
$[
|
|
30029
|
+
$[68] = t29;
|
|
29984
30030
|
} else {
|
|
29985
|
-
t29 = $[
|
|
30031
|
+
t29 = $[68];
|
|
29986
30032
|
}
|
|
29987
30033
|
let t30;
|
|
29988
|
-
if ($[
|
|
30034
|
+
if ($[69] !== handleInputKeyDown) {
|
|
29989
30035
|
t30 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
|
|
29990
|
-
$[
|
|
29991
|
-
$[
|
|
30036
|
+
$[69] = handleInputKeyDown;
|
|
30037
|
+
$[70] = t30;
|
|
29992
30038
|
} else {
|
|
29993
|
-
t30 = $[
|
|
30039
|
+
t30 = $[70];
|
|
29994
30040
|
}
|
|
29995
30041
|
let t31;
|
|
29996
|
-
if ($[
|
|
30042
|
+
if ($[71] !== handleClear || $[72] !== selectedValues.length) {
|
|
29997
30043
|
t31 = selectedValues.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: handleClear, className: "text-sm justify-center cursor-pointer py-3 px-4 text-text-secondary dark:text-text-secondary-dark", children: "Clear" });
|
|
29998
|
-
$[
|
|
29999
|
-
$[
|
|
30000
|
-
$[
|
|
30044
|
+
$[71] = handleClear;
|
|
30045
|
+
$[72] = selectedValues.length;
|
|
30046
|
+
$[73] = t31;
|
|
30001
30047
|
} else {
|
|
30002
|
-
t31 = $[
|
|
30048
|
+
t31 = $[73];
|
|
30003
30049
|
}
|
|
30004
30050
|
let t32;
|
|
30005
|
-
if ($[
|
|
30051
|
+
if ($[74] !== t30 || $[75] !== t31) {
|
|
30006
30052
|
t32 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
30007
30053
|
t30,
|
|
30008
30054
|
t31
|
|
30009
30055
|
] });
|
|
30010
|
-
$[
|
|
30011
|
-
$[
|
|
30012
|
-
$[
|
|
30056
|
+
$[74] = t30;
|
|
30057
|
+
$[75] = t31;
|
|
30058
|
+
$[76] = t32;
|
|
30013
30059
|
} else {
|
|
30014
|
-
t32 = $[
|
|
30060
|
+
t32 = $[76];
|
|
30015
30061
|
}
|
|
30016
30062
|
let t33;
|
|
30017
|
-
if ($[
|
|
30063
|
+
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30018
30064
|
t33 = /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "horizontal", className: "my-0" });
|
|
30019
|
-
$[
|
|
30065
|
+
$[77] = t33;
|
|
30020
30066
|
} else {
|
|
30021
|
-
t33 = $[
|
|
30067
|
+
t33 = $[77];
|
|
30022
30068
|
}
|
|
30023
30069
|
let t34;
|
|
30024
|
-
if ($[
|
|
30070
|
+
if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30025
30071
|
t34 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { className: "px-4 py-2", children: "No results found." });
|
|
30026
|
-
$[
|
|
30072
|
+
$[78] = t34;
|
|
30027
30073
|
} else {
|
|
30028
|
-
t34 = $[
|
|
30074
|
+
t34 = $[78];
|
|
30029
30075
|
}
|
|
30030
30076
|
let t35;
|
|
30031
|
-
if ($[
|
|
30077
|
+
if ($[79] !== allValues.length || $[80] !== includeSelectAll || $[81] !== selectedValues.length || $[82] !== toggleAll) {
|
|
30032
30078
|
t35 = includeSelectAll && /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Item, { onSelect: toggleAll, className: cls("flex flex-row items-center gap-1.5", "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900"), children: [
|
|
30033
30079
|
/* @__PURE__ */ jsxRuntime.jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
|
|
30034
30080
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
|
|
30035
30081
|
] }, "all");
|
|
30036
|
-
$[
|
|
30037
|
-
$[
|
|
30038
|
-
$[
|
|
30039
|
-
$[
|
|
30040
|
-
$[
|
|
30082
|
+
$[79] = allValues.length;
|
|
30083
|
+
$[80] = includeSelectAll;
|
|
30084
|
+
$[81] = selectedValues.length;
|
|
30085
|
+
$[82] = toggleAll;
|
|
30086
|
+
$[83] = t35;
|
|
30041
30087
|
} else {
|
|
30042
|
-
t35 = $[
|
|
30088
|
+
t35 = $[83];
|
|
30043
30089
|
}
|
|
30044
30090
|
let t36;
|
|
30045
|
-
if ($[
|
|
30091
|
+
if ($[84] !== children || $[85] !== t35) {
|
|
30046
30092
|
t36 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
|
|
30047
30093
|
t34,
|
|
30048
30094
|
/* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Group, { children: [
|
|
@@ -30050,61 +30096,61 @@
|
|
|
30050
30096
|
children
|
|
30051
30097
|
] })
|
|
30052
30098
|
] });
|
|
30053
|
-
$[
|
|
30054
|
-
$[
|
|
30055
|
-
$[
|
|
30099
|
+
$[84] = children;
|
|
30100
|
+
$[85] = t35;
|
|
30101
|
+
$[86] = t36;
|
|
30056
30102
|
} else {
|
|
30057
|
-
t36 = $[
|
|
30103
|
+
t36 = $[86];
|
|
30058
30104
|
}
|
|
30059
30105
|
let t37;
|
|
30060
|
-
if ($[
|
|
30106
|
+
if ($[87] !== t32 || $[88] !== t36) {
|
|
30061
30107
|
t37 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
|
|
30062
30108
|
t32,
|
|
30063
30109
|
t33,
|
|
30064
30110
|
t36
|
|
30065
30111
|
] });
|
|
30066
|
-
$[
|
|
30067
|
-
$[
|
|
30068
|
-
$[
|
|
30112
|
+
$[87] = t32;
|
|
30113
|
+
$[88] = t36;
|
|
30114
|
+
$[89] = t37;
|
|
30069
30115
|
} else {
|
|
30070
|
-
t37 = $[
|
|
30116
|
+
t37 = $[89];
|
|
30071
30117
|
}
|
|
30072
30118
|
let t38;
|
|
30073
|
-
if ($[
|
|
30119
|
+
if ($[90] !== t28 || $[91] !== t37) {
|
|
30074
30120
|
t38 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
|
|
30075
|
-
$[
|
|
30076
|
-
$[
|
|
30077
|
-
$[
|
|
30121
|
+
$[90] = t28;
|
|
30122
|
+
$[91] = t37;
|
|
30123
|
+
$[92] = t38;
|
|
30078
30124
|
} else {
|
|
30079
|
-
t38 = $[
|
|
30125
|
+
t38 = $[92];
|
|
30080
30126
|
}
|
|
30081
30127
|
let t39;
|
|
30082
|
-
if ($[
|
|
30128
|
+
if ($[93] !== isPopoverOpen || $[94] !== modalPopover || $[95] !== onPopoverOpenChange || $[96] !== t26 || $[97] !== t38) {
|
|
30083
30129
|
t39 = /* @__PURE__ */ jsxRuntime.jsxs(PopoverPrimitive__namespace.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
|
|
30084
30130
|
t26,
|
|
30085
30131
|
t38
|
|
30086
30132
|
] });
|
|
30087
|
-
$[
|
|
30088
|
-
$[
|
|
30089
|
-
$[
|
|
30090
|
-
$[
|
|
30091
|
-
$[
|
|
30092
|
-
$[
|
|
30133
|
+
$[93] = isPopoverOpen;
|
|
30134
|
+
$[94] = modalPopover;
|
|
30135
|
+
$[95] = onPopoverOpenChange;
|
|
30136
|
+
$[96] = t26;
|
|
30137
|
+
$[97] = t38;
|
|
30138
|
+
$[98] = t39;
|
|
30093
30139
|
} else {
|
|
30094
|
-
t39 = $[
|
|
30140
|
+
t39 = $[98];
|
|
30095
30141
|
}
|
|
30096
30142
|
let t40;
|
|
30097
|
-
if ($[
|
|
30143
|
+
if ($[99] !== t18 || $[100] !== t19 || $[101] !== t39) {
|
|
30098
30144
|
t40 = /* @__PURE__ */ jsxRuntime.jsxs(MultiSelectContext.Provider, { value: t18, children: [
|
|
30099
30145
|
t19,
|
|
30100
30146
|
t39
|
|
30101
30147
|
] });
|
|
30102
|
-
$[
|
|
30103
|
-
$[
|
|
30104
|
-
$[
|
|
30105
|
-
$[
|
|
30148
|
+
$[99] = t18;
|
|
30149
|
+
$[100] = t19;
|
|
30150
|
+
$[101] = t39;
|
|
30151
|
+
$[102] = t40;
|
|
30106
30152
|
} else {
|
|
30107
|
-
t40 = $[
|
|
30153
|
+
t40 = $[102];
|
|
30108
30154
|
}
|
|
30109
30155
|
return t40;
|
|
30110
30156
|
});
|
|
@@ -30535,6 +30581,7 @@
|
|
|
30535
30581
|
onValueChange,
|
|
30536
30582
|
className,
|
|
30537
30583
|
inputClassName,
|
|
30584
|
+
viewportClassName,
|
|
30538
30585
|
placeholder,
|
|
30539
30586
|
renderValue,
|
|
30540
30587
|
label,
|
|
@@ -30546,6 +30593,7 @@
|
|
|
30546
30593
|
endAdornment,
|
|
30547
30594
|
invisible,
|
|
30548
30595
|
children,
|
|
30596
|
+
dataType = "string",
|
|
30549
30597
|
...props
|
|
30550
30598
|
}, ref) => {
|
|
30551
30599
|
const [openInternal, setOpenInternal] = React.useState(open ?? false);
|
|
@@ -30554,9 +30602,12 @@
|
|
|
30554
30602
|
}, [open]);
|
|
30555
30603
|
const onValueChangeInternal = React.useCallback((newValue) => {
|
|
30556
30604
|
let typedValue = newValue;
|
|
30557
|
-
if (
|
|
30558
|
-
|
|
30559
|
-
|
|
30605
|
+
if (dataType === "boolean") {
|
|
30606
|
+
if (newValue === "true") typedValue = true;
|
|
30607
|
+
else if (newValue === "false") typedValue = false;
|
|
30608
|
+
} else if (dataType === "number") {
|
|
30609
|
+
if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
|
|
30610
|
+
}
|
|
30560
30611
|
onValueChange?.(typedValue);
|
|
30561
30612
|
if (onChange) {
|
|
30562
30613
|
const event = {
|
|
@@ -30575,55 +30626,57 @@
|
|
|
30575
30626
|
setOpenInternal(open_0);
|
|
30576
30627
|
}, ...props, children: [
|
|
30577
30628
|
typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label,
|
|
30578
|
-
/* @__PURE__ */ jsxRuntime.
|
|
30629
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
|
|
30579
30630
|
"min-h-[28px]": size === "smallest",
|
|
30580
30631
|
"min-h-[32px]": size === "small",
|
|
30581
30632
|
"min-h-[42px]": size === "medium",
|
|
30582
30633
|
"min-h-[64px]": size === "large",
|
|
30583
30634
|
"w-fit": !fullWidth,
|
|
30584
30635
|
"w-full": fullWidth
|
|
30585
|
-
}), children:
|
|
30586
|
-
"
|
|
30587
|
-
|
|
30588
|
-
|
|
30589
|
-
|
|
30590
|
-
"
|
|
30591
|
-
"min-h-[32px]": size === "small",
|
|
30592
|
-
"min-h-[42px]": size === "medium",
|
|
30593
|
-
"min-h-[64px]": size === "large",
|
|
30594
|
-
"w-full": fullWidth,
|
|
30595
|
-
"w-fit": !fullWidth
|
|
30596
|
-
}, inputClassName), children: [
|
|
30597
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
|
30636
|
+
}), children: [
|
|
30637
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls("h-full", padding ? {
|
|
30638
|
+
"px-4": size === "large",
|
|
30639
|
+
"px-3": size === "medium",
|
|
30640
|
+
"px-2": size === "small" || size === "smallest"
|
|
30641
|
+
} : "", "outline-none focus:outline-none", "select-none rounded-md text-sm", error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark", error ? "border border-red-500 dark:border-red-600" : "", disabled ? "text-surface-accent-600 dark:text-surface-accent-400" : "text-surface-accent-800 dark:text-white", "relative flex flex-row items-center", {
|
|
30598
30642
|
"min-h-[28px]": size === "smallest",
|
|
30599
30643
|
"min-h-[32px]": size === "small",
|
|
30600
30644
|
"min-h-[42px]": size === "medium",
|
|
30601
|
-
"min-h-[64px]": size === "large"
|
|
30602
|
-
|
|
30603
|
-
|
|
30604
|
-
|
|
30605
|
-
|
|
30606
|
-
|
|
30607
|
-
|
|
30608
|
-
|
|
30609
|
-
|
|
30610
|
-
|
|
30611
|
-
|
|
30612
|
-
|
|
30613
|
-
|
|
30614
|
-
|
|
30615
|
-
|
|
30645
|
+
"min-h-[64px]": size === "large",
|
|
30646
|
+
"w-full": fullWidth,
|
|
30647
|
+
"w-fit": !fullWidth
|
|
30648
|
+
}, inputClassName), children: [
|
|
30649
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
|
30650
|
+
"min-h-[28px]": size === "smallest",
|
|
30651
|
+
"min-h-[32px]": size === "small",
|
|
30652
|
+
"min-h-[42px]": size === "medium",
|
|
30653
|
+
"min-h-[64px]": size === "large"
|
|
30654
|
+
}), children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Value, { onClick: (e) => {
|
|
30655
|
+
e.preventDefault();
|
|
30656
|
+
e.stopPropagation();
|
|
30657
|
+
}, placeholder, className: "w-full", children: [
|
|
30658
|
+
hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
|
|
30659
|
+
hasValue && !renderValue && (() => {
|
|
30660
|
+
const childrenProps = React.Children.map(children, (child) => {
|
|
30661
|
+
if (React.isValidElement(child)) {
|
|
30662
|
+
return child.props;
|
|
30663
|
+
}
|
|
30664
|
+
}).filter(Boolean);
|
|
30665
|
+
const option = childrenProps.find((o) => String(o.value) === String(value));
|
|
30666
|
+
return option?.children;
|
|
30667
|
+
})()
|
|
30668
|
+
] }) }),
|
|
30669
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", open ? "rotate-180" : "", {
|
|
30670
|
+
"px-2": size === "large",
|
|
30671
|
+
"px-1": size === "medium" || size === "small"
|
|
30672
|
+
}) }) })
|
|
30616
30673
|
] }) }),
|
|
30617
|
-
endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("h-full flex items-center"), onClick: (e_0) => {
|
|
30674
|
+
endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("h-full flex items-center absolute right-0 pr-12"), onClick: (e_0) => {
|
|
30618
30675
|
e_0.preventDefault();
|
|
30619
30676
|
e_0.stopPropagation();
|
|
30620
|
-
}, children: endAdornment })
|
|
30621
|
-
|
|
30622
|
-
|
|
30623
|
-
"px-1": size === "medium" || size === "small"
|
|
30624
|
-
}) }) })
|
|
30625
|
-
] }) }) }),
|
|
30626
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Content, { position, className: cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: "p-1", style: {
|
|
30677
|
+
}, children: endAdornment })
|
|
30678
|
+
] }),
|
|
30679
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Content, { position, className: cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: cls("p-1", viewportClassName), style: {
|
|
30627
30680
|
maxHeight: "var(--radix-select-content-available-height)"
|
|
30628
30681
|
}, children }) }) })
|
|
30629
30682
|
] });
|