@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.es.js
CHANGED
|
@@ -34,8 +34,8 @@ const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-
|
|
|
34
34
|
const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40";
|
|
35
35
|
const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
|
|
36
36
|
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";
|
|
37
|
-
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
|
|
38
|
-
const cardClickableMixin = "hover:bg-
|
|
37
|
+
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";
|
|
38
|
+
const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 hover:ring-2 hover:ring-primary cursor-pointer";
|
|
39
39
|
const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
|
|
40
40
|
function cls(...classes) {
|
|
41
41
|
return twMerge(clsx(classes));
|
|
@@ -452,11 +452,12 @@ const useAutoComplete = ({
|
|
|
452
452
|
};
|
|
453
453
|
};
|
|
454
454
|
function Autocomplete(t0) {
|
|
455
|
-
const $ = c(
|
|
455
|
+
const $ = c(14);
|
|
456
456
|
const {
|
|
457
457
|
children,
|
|
458
458
|
open,
|
|
459
|
-
setOpen
|
|
459
|
+
setOpen,
|
|
460
|
+
className
|
|
460
461
|
} = t0;
|
|
461
462
|
const autocompleteRef = React__default.useRef(null);
|
|
462
463
|
let t1;
|
|
@@ -479,50 +480,61 @@ function Autocomplete(t0) {
|
|
|
479
480
|
}
|
|
480
481
|
const t4 = open ? paperMixin : "";
|
|
481
482
|
let t5;
|
|
482
|
-
if ($[4] !== t4) {
|
|
483
|
-
t5 = cls(t4, "bg-surface-50 dark:bg-surface-900
|
|
484
|
-
$[4] =
|
|
485
|
-
$[5] =
|
|
483
|
+
if ($[4] !== className || $[5] !== t4) {
|
|
484
|
+
t5 = cls(t4, "bg-surface-50 dark:bg-surface-900", className);
|
|
485
|
+
$[4] = className;
|
|
486
|
+
$[5] = t4;
|
|
487
|
+
$[6] = t5;
|
|
486
488
|
} else {
|
|
487
|
-
t5 = $[
|
|
489
|
+
t5 = $[6];
|
|
488
490
|
}
|
|
489
491
|
let t6;
|
|
490
|
-
if ($[
|
|
492
|
+
if ($[7] !== children || $[8] !== t5) {
|
|
491
493
|
t6 = /* @__PURE__ */ jsx("div", { ref: autocompleteRef, className: t5, children });
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
494
|
+
$[7] = children;
|
|
495
|
+
$[8] = t5;
|
|
496
|
+
$[9] = t6;
|
|
495
497
|
} else {
|
|
496
|
-
t6 = $[
|
|
498
|
+
t6 = $[9];
|
|
497
499
|
}
|
|
498
500
|
let t7;
|
|
499
|
-
if ($[
|
|
500
|
-
t7 = /* @__PURE__ */ jsx(Collapse, { in: open, duration:
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
501
|
+
if ($[10] !== open || $[11] !== t3 || $[12] !== t6) {
|
|
502
|
+
t7 = /* @__PURE__ */ jsx(Collapse, { in: open, duration: 30, className: t3, children: t6 });
|
|
503
|
+
$[10] = open;
|
|
504
|
+
$[11] = t3;
|
|
505
|
+
$[12] = t6;
|
|
506
|
+
$[13] = t7;
|
|
505
507
|
} else {
|
|
506
|
-
t7 = $[
|
|
508
|
+
t7 = $[13];
|
|
507
509
|
}
|
|
508
510
|
return t7;
|
|
509
511
|
}
|
|
510
512
|
function AutocompleteItem(t0) {
|
|
511
|
-
const $ = c(
|
|
513
|
+
const $ = c(6);
|
|
512
514
|
const {
|
|
513
515
|
children,
|
|
514
|
-
onClick
|
|
516
|
+
onClick,
|
|
517
|
+
className
|
|
515
518
|
} = t0;
|
|
516
519
|
let t1;
|
|
517
|
-
if ($[0] !==
|
|
518
|
-
t1 =
|
|
519
|
-
$[0] =
|
|
520
|
-
$[1] =
|
|
521
|
-
$[2] = t1;
|
|
520
|
+
if ($[0] !== className) {
|
|
521
|
+
t1 = cls("flex w-full items-center h-[48px] cursor-pointer hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800", className);
|
|
522
|
+
$[0] = className;
|
|
523
|
+
$[1] = t1;
|
|
522
524
|
} else {
|
|
523
|
-
t1 = $[
|
|
525
|
+
t1 = $[1];
|
|
524
526
|
}
|
|
525
|
-
|
|
527
|
+
let t2;
|
|
528
|
+
if ($[2] !== children || $[3] !== onClick || $[4] !== t1) {
|
|
529
|
+
t2 = /* @__PURE__ */ jsx("div", { className: t1, onClick, children });
|
|
530
|
+
$[2] = children;
|
|
531
|
+
$[3] = onClick;
|
|
532
|
+
$[4] = t1;
|
|
533
|
+
$[5] = t2;
|
|
534
|
+
} else {
|
|
535
|
+
t2 = $[5];
|
|
536
|
+
}
|
|
537
|
+
return t2;
|
|
526
538
|
}
|
|
527
539
|
const getSizeClasses = (size) => {
|
|
528
540
|
switch (size) {
|
|
@@ -551,13 +563,14 @@ const getColorClasses = (severity) => {
|
|
|
551
563
|
}
|
|
552
564
|
};
|
|
553
565
|
const Alert = (t0) => {
|
|
554
|
-
const $ = c(
|
|
566
|
+
const $ = c(19);
|
|
555
567
|
const {
|
|
556
568
|
children,
|
|
557
569
|
onDismiss,
|
|
558
570
|
color: t1,
|
|
559
571
|
size: t2,
|
|
560
572
|
action,
|
|
573
|
+
outerClassName,
|
|
561
574
|
className,
|
|
562
575
|
style
|
|
563
576
|
} = t0;
|
|
@@ -565,12 +578,12 @@ const Alert = (t0) => {
|
|
|
565
578
|
const size = t2 === void 0 ? "medium" : t2;
|
|
566
579
|
let t3;
|
|
567
580
|
let t4;
|
|
568
|
-
if ($[0] !==
|
|
581
|
+
if ($[0] !== color || $[1] !== outerClassName || $[2] !== size || $[3] !== style) {
|
|
569
582
|
const classes = getColorClasses(color);
|
|
570
583
|
t3 = style;
|
|
571
|
-
t4 = cls(getSizeClasses(size), "w-full", "font-medium", "rounded-md flex items-center gap-2", classes,
|
|
572
|
-
$[0] =
|
|
573
|
-
$[1] =
|
|
584
|
+
t4 = cls(getSizeClasses(size), "w-full", "font-medium", "rounded-md flex items-center gap-2", classes, outerClassName);
|
|
585
|
+
$[0] = color;
|
|
586
|
+
$[1] = outerClassName;
|
|
574
587
|
$[2] = size;
|
|
575
588
|
$[3] = style;
|
|
576
589
|
$[4] = t3;
|
|
@@ -580,38 +593,47 @@ const Alert = (t0) => {
|
|
|
580
593
|
t4 = $[5];
|
|
581
594
|
}
|
|
582
595
|
let t5;
|
|
583
|
-
if ($[6] !==
|
|
584
|
-
t5 =
|
|
585
|
-
$[6] =
|
|
596
|
+
if ($[6] !== className) {
|
|
597
|
+
t5 = cls("flex-grow", className);
|
|
598
|
+
$[6] = className;
|
|
586
599
|
$[7] = t5;
|
|
587
600
|
} else {
|
|
588
601
|
t5 = $[7];
|
|
589
602
|
}
|
|
590
603
|
let t6;
|
|
591
|
-
if ($[8] !==
|
|
592
|
-
t6 =
|
|
593
|
-
$[8] =
|
|
594
|
-
$[9] =
|
|
604
|
+
if ($[8] !== children || $[9] !== t5) {
|
|
605
|
+
t6 = /* @__PURE__ */ jsx("div", { className: t5, children });
|
|
606
|
+
$[8] = children;
|
|
607
|
+
$[9] = t5;
|
|
608
|
+
$[10] = t6;
|
|
595
609
|
} else {
|
|
596
|
-
t6 = $[
|
|
610
|
+
t6 = $[10];
|
|
597
611
|
}
|
|
598
612
|
let t7;
|
|
599
|
-
if ($[
|
|
600
|
-
t7 = /* @__PURE__ */
|
|
601
|
-
|
|
613
|
+
if ($[11] !== onDismiss) {
|
|
614
|
+
t7 = onDismiss && /* @__PURE__ */ 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: "×" });
|
|
615
|
+
$[11] = onDismiss;
|
|
616
|
+
$[12] = t7;
|
|
617
|
+
} else {
|
|
618
|
+
t7 = $[12];
|
|
619
|
+
}
|
|
620
|
+
let t8;
|
|
621
|
+
if ($[13] !== action || $[14] !== t3 || $[15] !== t4 || $[16] !== t6 || $[17] !== t7) {
|
|
622
|
+
t8 = /* @__PURE__ */ jsxs("div", { style: t3, className: t4, children: [
|
|
602
623
|
t6,
|
|
624
|
+
t7,
|
|
603
625
|
action
|
|
604
626
|
] });
|
|
605
|
-
$[
|
|
606
|
-
$[
|
|
607
|
-
$[
|
|
608
|
-
$[
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
627
|
+
$[13] = action;
|
|
628
|
+
$[14] = t3;
|
|
629
|
+
$[15] = t4;
|
|
630
|
+
$[16] = t6;
|
|
631
|
+
$[17] = t7;
|
|
632
|
+
$[18] = t8;
|
|
611
633
|
} else {
|
|
612
|
-
|
|
634
|
+
t8 = $[18];
|
|
613
635
|
}
|
|
614
|
-
return
|
|
636
|
+
return t8;
|
|
615
637
|
};
|
|
616
638
|
const AvatarInner = (t0, ref) => {
|
|
617
639
|
const $ = c(25);
|
|
@@ -720,18 +742,22 @@ const BooleanSwitch = React__default.forwardRef(function BooleanSwitch2({
|
|
|
720
742
|
} else {
|
|
721
743
|
onValueChange?.(!value);
|
|
722
744
|
}
|
|
723
|
-
}, 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: [
|
|
745
|
+
}, 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: [
|
|
724
746
|
allowIndeterminate && (value === null || value === void 0) && /* @__PURE__ */ 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", {
|
|
725
747
|
"w-[21px] h-[10px]": size === "medium" || size === "large",
|
|
726
748
|
"w-[19px] h-[8px]": size === "small",
|
|
749
|
+
"w-[16px] h-[6px]": size === "smallest",
|
|
727
750
|
"translate-x-[10px]": size === "medium" || size === "large",
|
|
728
|
-
"translate-x-[9px]": size === "small"
|
|
751
|
+
"translate-x-[9px]": size === "small",
|
|
752
|
+
"translate-x-[8px]": size === "smallest"
|
|
729
753
|
}) }, "knob"),
|
|
730
754
|
!(allowIndeterminate && (value === null || value === void 0)) && /* @__PURE__ */ 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", {
|
|
731
755
|
"w-[21px] h-[21px]": size === "medium" || size === "large",
|
|
732
756
|
"w-[19px] h-[19px]": size === "small",
|
|
757
|
+
"w-[16px] h-[16px]": size === "smallest",
|
|
733
758
|
[value ? "translate-x-[19px]" : "translate-x-[3px]"]: size === "medium" || size === "large",
|
|
734
|
-
[value ? "translate-x-[17px]" : "translate-x-[2px]"]: size === "small"
|
|
759
|
+
[value ? "translate-x-[17px]" : "translate-x-[2px]"]: size === "small",
|
|
760
|
+
[value ? "translate-x-[16px]" : "translate-x-[1px]"]: size === "smallest"
|
|
735
761
|
}) }, "knob")
|
|
736
762
|
] });
|
|
737
763
|
});
|
|
@@ -763,7 +789,7 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
|
763
789
|
"min-h-[32px]": size === "small",
|
|
764
790
|
"min-h-[42px]": size === "medium",
|
|
765
791
|
"min-h-[64px]": size === "large"
|
|
766
|
-
}, 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) => {
|
|
792
|
+
}, 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) => {
|
|
767
793
|
if (props.allowIndeterminate) {
|
|
768
794
|
if (value === null || value === void 0) onValueChange?.(true);
|
|
769
795
|
else if (value) onValueChange?.(false);
|
|
@@ -773,11 +799,11 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
|
773
799
|
}
|
|
774
800
|
}, children: [
|
|
775
801
|
/* @__PURE__ */ jsx(BooleanSwitch, { value, ref: refInput, size, className: cls(invisible && focus ? focusedClasses : "", inputClassName), disabled, ...props }),
|
|
776
|
-
/* @__PURE__ */ jsx("div", { className: cls("flex-grow", position === "end" ? "mr-4" : "ml-4", size === "small" ? "text-sm" : "text-base"), children: label })
|
|
802
|
+
/* @__PURE__ */ jsx("div", { className: cls("flex-grow", position === "end" ? "mr-4" : "ml-4", size === "small" || size === "smallest" ? "text-sm" : "text-base"), children: label })
|
|
777
803
|
] });
|
|
778
804
|
};
|
|
779
805
|
const ButtonInner = React__default.forwardRef((t0, ref) => {
|
|
780
|
-
const $ = c(
|
|
806
|
+
const $ = c(55);
|
|
781
807
|
let Component;
|
|
782
808
|
let children;
|
|
783
809
|
let className;
|
|
@@ -829,7 +855,7 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
|
|
|
829
855
|
const size = t3 === void 0 ? "medium" : t3;
|
|
830
856
|
const startIcon = t4 === void 0 ? null : t4;
|
|
831
857
|
const fullWidth = t5 === void 0 ? false : t5;
|
|
832
|
-
const color = t6 === void 0 ? "
|
|
858
|
+
const color = t6 === void 0 ? "neutral" : t6;
|
|
833
859
|
const t7 = !fullWidth;
|
|
834
860
|
const t8 = variant === "filled" && color === "primary" && !disabled;
|
|
835
861
|
const t9 = variant === "filled" && color === "secondary" && !disabled;
|
|
@@ -864,17 +890,17 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
|
|
|
864
890
|
"border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": t9,
|
|
865
891
|
"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,
|
|
866
892
|
"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,
|
|
867
|
-
"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,
|
|
893
|
+
"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,
|
|
868
894
|
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t13,
|
|
869
895
|
"border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t14,
|
|
870
896
|
"border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
|
|
871
897
|
"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,
|
|
872
|
-
"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,
|
|
898
|
+
"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,
|
|
873
899
|
"border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
|
|
874
900
|
"border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
|
|
875
901
|
"border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
|
|
876
902
|
"border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
|
|
877
|
-
"border border-surface-
|
|
903
|
+
"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,
|
|
878
904
|
"text-text-disabled dark:text-text-disabled-dark": disabled,
|
|
879
905
|
"border border-transparent opacity-50": t23,
|
|
880
906
|
"border border-surface-500 opacity-50": t24,
|
|
@@ -944,22 +970,24 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
|
|
|
944
970
|
}
|
|
945
971
|
const t31 = props;
|
|
946
972
|
let t32;
|
|
947
|
-
if ($[44] !== children || $[45] !== disabled || $[46] !==
|
|
948
|
-
t32 = /* @__PURE__ */ jsxs("button", { ref: t26, type: t27, onClick: t28, className: t29, disabled, ...t31, children: [
|
|
973
|
+
if ($[44] !== children || $[45] !== disabled || $[46] !== size || $[47] !== startIcon || $[48] !== t26 || $[49] !== t27 || $[50] !== t28 || $[51] !== t29 || $[52] !== t31 || $[53] !== variant) {
|
|
974
|
+
t32 = /* @__PURE__ */ jsxs("button", { ref: t26, type: t27, onClick: t28, className: t29, disabled, "data-variant": variant, "data-size": size, ...t31, children: [
|
|
949
975
|
startIcon,
|
|
950
976
|
children
|
|
951
977
|
] });
|
|
952
978
|
$[44] = children;
|
|
953
979
|
$[45] = disabled;
|
|
954
|
-
$[46] =
|
|
955
|
-
$[47] =
|
|
956
|
-
$[48] =
|
|
957
|
-
$[49] =
|
|
958
|
-
$[50] =
|
|
959
|
-
$[51] =
|
|
960
|
-
$[52] =
|
|
961
|
-
|
|
962
|
-
|
|
980
|
+
$[46] = size;
|
|
981
|
+
$[47] = startIcon;
|
|
982
|
+
$[48] = t26;
|
|
983
|
+
$[49] = t27;
|
|
984
|
+
$[50] = t28;
|
|
985
|
+
$[51] = t29;
|
|
986
|
+
$[52] = t31;
|
|
987
|
+
$[53] = variant;
|
|
988
|
+
$[54] = t32;
|
|
989
|
+
} else {
|
|
990
|
+
t32 = $[54];
|
|
963
991
|
}
|
|
964
992
|
return t32;
|
|
965
993
|
});
|
|
@@ -1267,6 +1295,7 @@ const Icon = React.forwardRef((t0, ref) => {
|
|
|
1267
1295
|
if ($[0] !== style || $[1] !== t2) {
|
|
1268
1296
|
t3 = {
|
|
1269
1297
|
fontSize: t2,
|
|
1298
|
+
verticalAlign: "middle",
|
|
1270
1299
|
...style
|
|
1271
1300
|
};
|
|
1272
1301
|
$[0] = style;
|
|
@@ -1278,7 +1307,7 @@ const Icon = React.forwardRef((t0, ref) => {
|
|
|
1278
1307
|
const t4 = color ? colorClassesMapping[color] : "";
|
|
1279
1308
|
let t5;
|
|
1280
1309
|
if ($[3] !== className || $[4] !== t4) {
|
|
1281
|
-
t5 = cls("material-icons",
|
|
1310
|
+
t5 = cls("material-icons", t4, "select-none", className);
|
|
1282
1311
|
$[3] = className;
|
|
1283
1312
|
$[4] = t4;
|
|
1284
1313
|
$[5] = t5;
|
|
@@ -27982,7 +28011,7 @@ const widthClasses = {
|
|
|
27982
28011
|
full: "max-w-full min-w-full w-full"
|
|
27983
28012
|
};
|
|
27984
28013
|
const Dialog = (t0) => {
|
|
27985
|
-
const $ = c(
|
|
28014
|
+
const $ = c(42);
|
|
27986
28015
|
const {
|
|
27987
28016
|
open,
|
|
27988
28017
|
onOpenChange,
|
|
@@ -27998,17 +28027,19 @@ const Dialog = (t0) => {
|
|
|
27998
28027
|
onOpenAutoFocus,
|
|
27999
28028
|
onEscapeKeyDown,
|
|
28000
28029
|
onPointerDownOutside,
|
|
28001
|
-
onInteractOutside
|
|
28030
|
+
onInteractOutside,
|
|
28031
|
+
disableInitialFocus: t5
|
|
28002
28032
|
} = t0;
|
|
28003
28033
|
const fullWidth = t1 === void 0 ? true : t1;
|
|
28004
28034
|
const scrollable = t2 === void 0 ? true : t2;
|
|
28005
28035
|
const maxWidth = t3 === void 0 ? "lg" : t3;
|
|
28006
28036
|
const modal = t4 === void 0 ? true : t4;
|
|
28037
|
+
const disableInitialFocus = t5 === void 0 ? true : t5;
|
|
28007
28038
|
const [displayed, setDisplayed] = useState(false);
|
|
28008
|
-
let t5;
|
|
28009
28039
|
let t6;
|
|
28040
|
+
let t7;
|
|
28010
28041
|
if ($[0] !== open) {
|
|
28011
|
-
|
|
28042
|
+
t6 = () => {
|
|
28012
28043
|
if (!open) {
|
|
28013
28044
|
const timeout = setTimeout(() => {
|
|
28014
28045
|
setDisplayed(false);
|
|
@@ -28019,126 +28050,140 @@ const Dialog = (t0) => {
|
|
|
28019
28050
|
return _temp$2;
|
|
28020
28051
|
}
|
|
28021
28052
|
};
|
|
28022
|
-
|
|
28053
|
+
t7 = [open];
|
|
28023
28054
|
$[0] = open;
|
|
28024
|
-
$[1] =
|
|
28025
|
-
$[2] =
|
|
28055
|
+
$[1] = t6;
|
|
28056
|
+
$[2] = t7;
|
|
28026
28057
|
} else {
|
|
28027
|
-
|
|
28028
|
-
|
|
28058
|
+
t6 = $[1];
|
|
28059
|
+
t7 = $[2];
|
|
28029
28060
|
}
|
|
28030
|
-
useEffect(
|
|
28031
|
-
const
|
|
28032
|
-
let
|
|
28061
|
+
useEffect(t6, t7);
|
|
28062
|
+
const t8 = displayed || open;
|
|
28063
|
+
let t9;
|
|
28033
28064
|
if ($[3] !== containerClassName) {
|
|
28034
|
-
|
|
28065
|
+
t9 = cls("fixed inset-0 z-30", containerClassName);
|
|
28035
28066
|
$[3] = containerClassName;
|
|
28036
|
-
$[4] =
|
|
28067
|
+
$[4] = t9;
|
|
28037
28068
|
} else {
|
|
28038
|
-
|
|
28069
|
+
t9 = $[4];
|
|
28039
28070
|
}
|
|
28040
|
-
const
|
|
28041
|
-
let
|
|
28042
|
-
if ($[5] !==
|
|
28043
|
-
|
|
28044
|
-
$[5] =
|
|
28045
|
-
$[6] =
|
|
28071
|
+
const t10 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28072
|
+
let t11;
|
|
28073
|
+
if ($[5] !== t10) {
|
|
28074
|
+
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");
|
|
28075
|
+
$[5] = t10;
|
|
28076
|
+
$[6] = t11;
|
|
28046
28077
|
} else {
|
|
28047
|
-
|
|
28078
|
+
t11 = $[6];
|
|
28048
28079
|
}
|
|
28049
|
-
const
|
|
28050
|
-
let
|
|
28051
|
-
if ($[7] !==
|
|
28052
|
-
|
|
28053
|
-
pointerEvents:
|
|
28080
|
+
const t12 = displayed ? "auto" : "none";
|
|
28081
|
+
let t13;
|
|
28082
|
+
if ($[7] !== t12) {
|
|
28083
|
+
t13 = {
|
|
28084
|
+
pointerEvents: t12
|
|
28054
28085
|
};
|
|
28055
|
-
$[7] =
|
|
28056
|
-
$[8] =
|
|
28086
|
+
$[7] = t12;
|
|
28087
|
+
$[8] = t13;
|
|
28057
28088
|
} else {
|
|
28058
|
-
|
|
28089
|
+
t13 = $[8];
|
|
28059
28090
|
}
|
|
28060
|
-
let
|
|
28061
|
-
if ($[9] !==
|
|
28062
|
-
|
|
28063
|
-
$[9] =
|
|
28064
|
-
$[10] =
|
|
28065
|
-
$[11] =
|
|
28091
|
+
let t14;
|
|
28092
|
+
if ($[9] !== t11 || $[10] !== t13) {
|
|
28093
|
+
t14 = /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: t11, style: t13 });
|
|
28094
|
+
$[9] = t11;
|
|
28095
|
+
$[10] = t13;
|
|
28096
|
+
$[11] = t14;
|
|
28066
28097
|
} else {
|
|
28067
|
-
|
|
28098
|
+
t14 = $[11];
|
|
28068
28099
|
}
|
|
28069
|
-
let
|
|
28070
|
-
if ($[12]
|
|
28071
|
-
|
|
28072
|
-
|
|
28073
|
-
|
|
28074
|
-
|
|
28075
|
-
|
|
28076
|
-
|
|
28077
|
-
|
|
28078
|
-
|
|
28079
|
-
const t18 = scrollable && "overflow-y-auto";
|
|
28080
|
-
const t19 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28081
|
-
const t20 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28082
|
-
let t21;
|
|
28083
|
-
if ($[13] !== className || $[14] !== t15 || $[15] !== t16 || $[16] !== t17 || $[17] !== t18 || $[18] !== t19 || $[19] !== t20) {
|
|
28084
|
-
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);
|
|
28085
|
-
$[13] = className;
|
|
28100
|
+
let t15;
|
|
28101
|
+
if ($[12] !== disableInitialFocus || $[13] !== onOpenAutoFocus) {
|
|
28102
|
+
t15 = (e) => {
|
|
28103
|
+
if (disableInitialFocus) {
|
|
28104
|
+
e.preventDefault();
|
|
28105
|
+
}
|
|
28106
|
+
onOpenAutoFocus?.(e);
|
|
28107
|
+
};
|
|
28108
|
+
$[12] = disableInitialFocus;
|
|
28109
|
+
$[13] = onOpenAutoFocus;
|
|
28086
28110
|
$[14] = t15;
|
|
28087
|
-
$[15] = t16;
|
|
28088
|
-
$[16] = t17;
|
|
28089
|
-
$[17] = t18;
|
|
28090
|
-
$[18] = t19;
|
|
28091
|
-
$[19] = t20;
|
|
28092
|
-
$[20] = t21;
|
|
28093
28111
|
} else {
|
|
28094
|
-
|
|
28112
|
+
t15 = $[14];
|
|
28095
28113
|
}
|
|
28096
|
-
let
|
|
28097
|
-
if ($[
|
|
28098
|
-
|
|
28099
|
-
$[
|
|
28100
|
-
$[22] = t21;
|
|
28101
|
-
$[23] = t22;
|
|
28114
|
+
let t16;
|
|
28115
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28116
|
+
t16 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
|
|
28117
|
+
$[15] = t16;
|
|
28102
28118
|
} else {
|
|
28103
|
-
|
|
28119
|
+
t16 = $[15];
|
|
28104
28120
|
}
|
|
28121
|
+
const t17 = fullWidth && !fullScreen ? "w-11/12" : void 0;
|
|
28122
|
+
const t18 = fullHeight && !fullScreen ? "h-full" : void 0;
|
|
28123
|
+
const t19 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
|
|
28124
|
+
const t20 = scrollable && "overflow-y-auto";
|
|
28125
|
+
const t21 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28126
|
+
const t22 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28105
28127
|
let t23;
|
|
28106
|
-
if ($[
|
|
28107
|
-
t23 =
|
|
28108
|
-
$[
|
|
28109
|
-
$[
|
|
28110
|
-
$[
|
|
28111
|
-
$[
|
|
28112
|
-
$[
|
|
28113
|
-
$[
|
|
28114
|
-
|
|
28115
|
-
|
|
28128
|
+
if ($[16] !== className || $[17] !== t17 || $[18] !== t18 || $[19] !== t19 || $[20] !== t20 || $[21] !== t21 || $[22] !== t22) {
|
|
28129
|
+
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);
|
|
28130
|
+
$[16] = className;
|
|
28131
|
+
$[17] = t17;
|
|
28132
|
+
$[18] = t18;
|
|
28133
|
+
$[19] = t19;
|
|
28134
|
+
$[20] = t20;
|
|
28135
|
+
$[21] = t21;
|
|
28136
|
+
$[22] = t22;
|
|
28137
|
+
$[23] = t23;
|
|
28138
|
+
} else {
|
|
28139
|
+
t23 = $[23];
|
|
28116
28140
|
}
|
|
28117
28141
|
let t24;
|
|
28118
|
-
if ($[
|
|
28119
|
-
t24 = /* @__PURE__ */ jsx(
|
|
28120
|
-
|
|
28121
|
-
|
|
28122
|
-
]
|
|
28123
|
-
$[30] = t13;
|
|
28124
|
-
$[31] = t23;
|
|
28125
|
-
$[32] = t8;
|
|
28126
|
-
$[33] = t24;
|
|
28142
|
+
if ($[24] !== children || $[25] !== t23) {
|
|
28143
|
+
t24 = /* @__PURE__ */ jsx("div", { className: t23, children });
|
|
28144
|
+
$[24] = children;
|
|
28145
|
+
$[25] = t23;
|
|
28146
|
+
$[26] = t24;
|
|
28127
28147
|
} else {
|
|
28128
|
-
t24 = $[
|
|
28148
|
+
t24 = $[26];
|
|
28129
28149
|
}
|
|
28130
28150
|
let t25;
|
|
28131
|
-
if ($[
|
|
28132
|
-
t25 = /* @__PURE__ */ jsx(DialogPrimitive.
|
|
28133
|
-
$[
|
|
28134
|
-
$[
|
|
28135
|
-
$[
|
|
28136
|
-
$[
|
|
28137
|
-
$[
|
|
28151
|
+
if ($[27] !== onEscapeKeyDown || $[28] !== onInteractOutside || $[29] !== onPointerDownOutside || $[30] !== t15 || $[31] !== t24) {
|
|
28152
|
+
t25 = /* @__PURE__ */ jsx(DialogPrimitive.Content, { onEscapeKeyDown, onOpenAutoFocus: t15, onPointerDownOutside, onInteractOutside, className: t16, children: t24 });
|
|
28153
|
+
$[27] = onEscapeKeyDown;
|
|
28154
|
+
$[28] = onInteractOutside;
|
|
28155
|
+
$[29] = onPointerDownOutside;
|
|
28156
|
+
$[30] = t15;
|
|
28157
|
+
$[31] = t24;
|
|
28158
|
+
$[32] = t25;
|
|
28138
28159
|
} else {
|
|
28139
|
-
t25 = $[
|
|
28160
|
+
t25 = $[32];
|
|
28140
28161
|
}
|
|
28141
|
-
|
|
28162
|
+
let t26;
|
|
28163
|
+
if ($[33] !== t14 || $[34] !== t25 || $[35] !== t9) {
|
|
28164
|
+
t26 = /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", { className: t9, children: [
|
|
28165
|
+
t14,
|
|
28166
|
+
t25
|
|
28167
|
+
] }) });
|
|
28168
|
+
$[33] = t14;
|
|
28169
|
+
$[34] = t25;
|
|
28170
|
+
$[35] = t9;
|
|
28171
|
+
$[36] = t26;
|
|
28172
|
+
} else {
|
|
28173
|
+
t26 = $[36];
|
|
28174
|
+
}
|
|
28175
|
+
let t27;
|
|
28176
|
+
if ($[37] !== modal || $[38] !== onOpenChange || $[39] !== t26 || $[40] !== t8) {
|
|
28177
|
+
t27 = /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: t8, modal, onOpenChange, children: t26 });
|
|
28178
|
+
$[37] = modal;
|
|
28179
|
+
$[38] = onOpenChange;
|
|
28180
|
+
$[39] = t26;
|
|
28181
|
+
$[40] = t8;
|
|
28182
|
+
$[41] = t27;
|
|
28183
|
+
} else {
|
|
28184
|
+
t27 = $[41];
|
|
28185
|
+
}
|
|
28186
|
+
return t27;
|
|
28142
28187
|
};
|
|
28143
28188
|
function _temp$2() {
|
|
28144
28189
|
}
|
|
@@ -28743,7 +28788,7 @@ function LoadingButton(t0) {
|
|
|
28743
28788
|
const t2 = props.component;
|
|
28744
28789
|
let t3;
|
|
28745
28790
|
if ($[7] !== loading) {
|
|
28746
|
-
t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: "
|
|
28791
|
+
t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: "smallest" });
|
|
28747
28792
|
$[7] = loading;
|
|
28748
28793
|
$[8] = t3;
|
|
28749
28794
|
} else {
|
|
@@ -29653,7 +29698,7 @@ function SelectInputLabel(t0) {
|
|
|
29653
29698
|
}
|
|
29654
29699
|
const MultiSelectContext = React.createContext({});
|
|
29655
29700
|
const MultiSelect = React.forwardRef((t0, ref) => {
|
|
29656
|
-
const $ = c(
|
|
29701
|
+
const $ = c(103);
|
|
29657
29702
|
const {
|
|
29658
29703
|
value,
|
|
29659
29704
|
size: t1,
|
|
@@ -29898,7 +29943,7 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29898
29943
|
t24 = $[48];
|
|
29899
29944
|
}
|
|
29900
29945
|
let t25;
|
|
29901
|
-
if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !==
|
|
29946
|
+
if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== size || $[57] !== toggleOption || $[58] !== useChips) {
|
|
29902
29947
|
t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
|
|
29903
29948
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
|
|
29904
29949
|
renderValues && renderValues(selectedValues),
|
|
@@ -29922,11 +29967,11 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29922
29967
|
event_1.stopPropagation();
|
|
29923
29968
|
handleClear();
|
|
29924
29969
|
} }),
|
|
29925
|
-
/* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29970
|
+
/* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29926
29971
|
] })
|
|
29927
29972
|
] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full mx-auto", children: [
|
|
29928
29973
|
/* @__PURE__ */ jsx("span", { className: "text-sm", children: placeholder }),
|
|
29929
|
-
/* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29974
|
+
/* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29930
29975
|
] });
|
|
29931
29976
|
$[49] = children;
|
|
29932
29977
|
$[50] = handleClear;
|
|
@@ -29935,104 +29980,105 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29935
29980
|
$[53] = placeholder;
|
|
29936
29981
|
$[54] = renderValues;
|
|
29937
29982
|
$[55] = selectedValues;
|
|
29938
|
-
$[56] =
|
|
29939
|
-
$[57] =
|
|
29940
|
-
$[58] =
|
|
29983
|
+
$[56] = size;
|
|
29984
|
+
$[57] = toggleOption;
|
|
29985
|
+
$[58] = useChips;
|
|
29986
|
+
$[59] = t25;
|
|
29941
29987
|
} else {
|
|
29942
|
-
t25 = $[
|
|
29988
|
+
t25 = $[59];
|
|
29943
29989
|
}
|
|
29944
29990
|
let t26;
|
|
29945
|
-
if ($[
|
|
29991
|
+
if ($[60] !== handleTogglePopover || $[61] !== ref || $[62] !== t24 || $[63] !== t25) {
|
|
29946
29992
|
t26 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
|
|
29947
|
-
$[
|
|
29948
|
-
$[
|
|
29949
|
-
$[
|
|
29950
|
-
$[
|
|
29951
|
-
$[
|
|
29993
|
+
$[60] = handleTogglePopover;
|
|
29994
|
+
$[61] = ref;
|
|
29995
|
+
$[62] = t24;
|
|
29996
|
+
$[63] = t25;
|
|
29997
|
+
$[64] = t26;
|
|
29952
29998
|
} else {
|
|
29953
|
-
t26 = $[
|
|
29999
|
+
t26 = $[64];
|
|
29954
30000
|
}
|
|
29955
30001
|
let t27;
|
|
29956
|
-
if ($[
|
|
30002
|
+
if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29957
30003
|
t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29958
|
-
$[
|
|
30004
|
+
$[65] = t27;
|
|
29959
30005
|
} else {
|
|
29960
|
-
t27 = $[
|
|
30006
|
+
t27 = $[65];
|
|
29961
30007
|
}
|
|
29962
30008
|
let t28;
|
|
29963
|
-
if ($[
|
|
30009
|
+
if ($[66] !== onPopoverOpenChange) {
|
|
29964
30010
|
t28 = () => onPopoverOpenChange(false);
|
|
29965
|
-
$[
|
|
29966
|
-
$[
|
|
30011
|
+
$[66] = onPopoverOpenChange;
|
|
30012
|
+
$[67] = t28;
|
|
29967
30013
|
} else {
|
|
29968
|
-
t28 = $[
|
|
30014
|
+
t28 = $[67];
|
|
29969
30015
|
}
|
|
29970
30016
|
let t29;
|
|
29971
|
-
if ($[
|
|
30017
|
+
if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29972
30018
|
t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
|
|
29973
|
-
$[
|
|
30019
|
+
$[68] = t29;
|
|
29974
30020
|
} else {
|
|
29975
|
-
t29 = $[
|
|
30021
|
+
t29 = $[68];
|
|
29976
30022
|
}
|
|
29977
30023
|
let t30;
|
|
29978
|
-
if ($[
|
|
30024
|
+
if ($[69] !== handleInputKeyDown) {
|
|
29979
30025
|
t30 = /* @__PURE__ */ jsx(Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
|
|
29980
|
-
$[
|
|
29981
|
-
$[
|
|
30026
|
+
$[69] = handleInputKeyDown;
|
|
30027
|
+
$[70] = t30;
|
|
29982
30028
|
} else {
|
|
29983
|
-
t30 = $[
|
|
30029
|
+
t30 = $[70];
|
|
29984
30030
|
}
|
|
29985
30031
|
let t31;
|
|
29986
|
-
if ($[
|
|
30032
|
+
if ($[71] !== handleClear || $[72] !== selectedValues.length) {
|
|
29987
30033
|
t31 = selectedValues.length > 0 && /* @__PURE__ */ 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" });
|
|
29988
|
-
$[
|
|
29989
|
-
$[
|
|
29990
|
-
$[
|
|
30034
|
+
$[71] = handleClear;
|
|
30035
|
+
$[72] = selectedValues.length;
|
|
30036
|
+
$[73] = t31;
|
|
29991
30037
|
} else {
|
|
29992
|
-
t31 = $[
|
|
30038
|
+
t31 = $[73];
|
|
29993
30039
|
}
|
|
29994
30040
|
let t32;
|
|
29995
|
-
if ($[
|
|
30041
|
+
if ($[74] !== t30 || $[75] !== t31) {
|
|
29996
30042
|
t32 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center", children: [
|
|
29997
30043
|
t30,
|
|
29998
30044
|
t31
|
|
29999
30045
|
] });
|
|
30000
|
-
$[
|
|
30001
|
-
$[
|
|
30002
|
-
$[
|
|
30046
|
+
$[74] = t30;
|
|
30047
|
+
$[75] = t31;
|
|
30048
|
+
$[76] = t32;
|
|
30003
30049
|
} else {
|
|
30004
|
-
t32 = $[
|
|
30050
|
+
t32 = $[76];
|
|
30005
30051
|
}
|
|
30006
30052
|
let t33;
|
|
30007
|
-
if ($[
|
|
30053
|
+
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30008
30054
|
t33 = /* @__PURE__ */ jsx(Separator, { orientation: "horizontal", className: "my-0" });
|
|
30009
|
-
$[
|
|
30055
|
+
$[77] = t33;
|
|
30010
30056
|
} else {
|
|
30011
|
-
t33 = $[
|
|
30057
|
+
t33 = $[77];
|
|
30012
30058
|
}
|
|
30013
30059
|
let t34;
|
|
30014
|
-
if ($[
|
|
30060
|
+
if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30015
30061
|
t34 = /* @__PURE__ */ jsx(Command.Empty, { className: "px-4 py-2", children: "No results found." });
|
|
30016
|
-
$[
|
|
30062
|
+
$[78] = t34;
|
|
30017
30063
|
} else {
|
|
30018
|
-
t34 = $[
|
|
30064
|
+
t34 = $[78];
|
|
30019
30065
|
}
|
|
30020
30066
|
let t35;
|
|
30021
|
-
if ($[
|
|
30067
|
+
if ($[79] !== allValues.length || $[80] !== includeSelectAll || $[81] !== selectedValues.length || $[82] !== toggleAll) {
|
|
30022
30068
|
t35 = includeSelectAll && /* @__PURE__ */ jsxs(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: [
|
|
30023
30069
|
/* @__PURE__ */ jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
|
|
30024
30070
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
|
|
30025
30071
|
] }, "all");
|
|
30026
|
-
$[
|
|
30027
|
-
$[
|
|
30028
|
-
$[
|
|
30029
|
-
$[
|
|
30030
|
-
$[
|
|
30072
|
+
$[79] = allValues.length;
|
|
30073
|
+
$[80] = includeSelectAll;
|
|
30074
|
+
$[81] = selectedValues.length;
|
|
30075
|
+
$[82] = toggleAll;
|
|
30076
|
+
$[83] = t35;
|
|
30031
30077
|
} else {
|
|
30032
|
-
t35 = $[
|
|
30078
|
+
t35 = $[83];
|
|
30033
30079
|
}
|
|
30034
30080
|
let t36;
|
|
30035
|
-
if ($[
|
|
30081
|
+
if ($[84] !== children || $[85] !== t35) {
|
|
30036
30082
|
t36 = /* @__PURE__ */ jsxs(Command.List, { children: [
|
|
30037
30083
|
t34,
|
|
30038
30084
|
/* @__PURE__ */ jsxs(Command.Group, { children: [
|
|
@@ -30040,61 +30086,61 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
30040
30086
|
children
|
|
30041
30087
|
] })
|
|
30042
30088
|
] });
|
|
30043
|
-
$[
|
|
30044
|
-
$[
|
|
30045
|
-
$[
|
|
30089
|
+
$[84] = children;
|
|
30090
|
+
$[85] = t35;
|
|
30091
|
+
$[86] = t36;
|
|
30046
30092
|
} else {
|
|
30047
|
-
t36 = $[
|
|
30093
|
+
t36 = $[86];
|
|
30048
30094
|
}
|
|
30049
30095
|
let t37;
|
|
30050
|
-
if ($[
|
|
30096
|
+
if ($[87] !== t32 || $[88] !== t36) {
|
|
30051
30097
|
t37 = /* @__PURE__ */ jsxs(Command, { children: [
|
|
30052
30098
|
t32,
|
|
30053
30099
|
t33,
|
|
30054
30100
|
t36
|
|
30055
30101
|
] });
|
|
30056
|
-
$[
|
|
30057
|
-
$[
|
|
30058
|
-
$[
|
|
30102
|
+
$[87] = t32;
|
|
30103
|
+
$[88] = t36;
|
|
30104
|
+
$[89] = t37;
|
|
30059
30105
|
} else {
|
|
30060
|
-
t37 = $[
|
|
30106
|
+
t37 = $[89];
|
|
30061
30107
|
}
|
|
30062
30108
|
let t38;
|
|
30063
|
-
if ($[
|
|
30109
|
+
if ($[90] !== t28 || $[91] !== t37) {
|
|
30064
30110
|
t38 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
|
|
30065
|
-
$[
|
|
30066
|
-
$[
|
|
30067
|
-
$[
|
|
30111
|
+
$[90] = t28;
|
|
30112
|
+
$[91] = t37;
|
|
30113
|
+
$[92] = t38;
|
|
30068
30114
|
} else {
|
|
30069
|
-
t38 = $[
|
|
30115
|
+
t38 = $[92];
|
|
30070
30116
|
}
|
|
30071
30117
|
let t39;
|
|
30072
|
-
if ($[
|
|
30118
|
+
if ($[93] !== isPopoverOpen || $[94] !== modalPopover || $[95] !== onPopoverOpenChange || $[96] !== t26 || $[97] !== t38) {
|
|
30073
30119
|
t39 = /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
|
|
30074
30120
|
t26,
|
|
30075
30121
|
t38
|
|
30076
30122
|
] });
|
|
30077
|
-
$[
|
|
30078
|
-
$[
|
|
30079
|
-
$[
|
|
30080
|
-
$[
|
|
30081
|
-
$[
|
|
30082
|
-
$[
|
|
30123
|
+
$[93] = isPopoverOpen;
|
|
30124
|
+
$[94] = modalPopover;
|
|
30125
|
+
$[95] = onPopoverOpenChange;
|
|
30126
|
+
$[96] = t26;
|
|
30127
|
+
$[97] = t38;
|
|
30128
|
+
$[98] = t39;
|
|
30083
30129
|
} else {
|
|
30084
|
-
t39 = $[
|
|
30130
|
+
t39 = $[98];
|
|
30085
30131
|
}
|
|
30086
30132
|
let t40;
|
|
30087
|
-
if ($[
|
|
30133
|
+
if ($[99] !== t18 || $[100] !== t19 || $[101] !== t39) {
|
|
30088
30134
|
t40 = /* @__PURE__ */ jsxs(MultiSelectContext.Provider, { value: t18, children: [
|
|
30089
30135
|
t19,
|
|
30090
30136
|
t39
|
|
30091
30137
|
] });
|
|
30092
|
-
$[
|
|
30093
|
-
$[
|
|
30094
|
-
$[
|
|
30095
|
-
$[
|
|
30138
|
+
$[99] = t18;
|
|
30139
|
+
$[100] = t19;
|
|
30140
|
+
$[101] = t39;
|
|
30141
|
+
$[102] = t40;
|
|
30096
30142
|
} else {
|
|
30097
|
-
t40 = $[
|
|
30143
|
+
t40 = $[102];
|
|
30098
30144
|
}
|
|
30099
30145
|
return t40;
|
|
30100
30146
|
});
|
|
@@ -30525,6 +30571,7 @@ const Select = forwardRef(({
|
|
|
30525
30571
|
onValueChange,
|
|
30526
30572
|
className,
|
|
30527
30573
|
inputClassName,
|
|
30574
|
+
viewportClassName,
|
|
30528
30575
|
placeholder,
|
|
30529
30576
|
renderValue,
|
|
30530
30577
|
label,
|
|
@@ -30536,6 +30583,7 @@ const Select = forwardRef(({
|
|
|
30536
30583
|
endAdornment,
|
|
30537
30584
|
invisible,
|
|
30538
30585
|
children,
|
|
30586
|
+
dataType = "string",
|
|
30539
30587
|
...props
|
|
30540
30588
|
}, ref) => {
|
|
30541
30589
|
const [openInternal, setOpenInternal] = useState(open ?? false);
|
|
@@ -30544,9 +30592,12 @@ const Select = forwardRef(({
|
|
|
30544
30592
|
}, [open]);
|
|
30545
30593
|
const onValueChangeInternal = useCallback((newValue) => {
|
|
30546
30594
|
let typedValue = newValue;
|
|
30547
|
-
if (
|
|
30548
|
-
|
|
30549
|
-
|
|
30595
|
+
if (dataType === "boolean") {
|
|
30596
|
+
if (newValue === "true") typedValue = true;
|
|
30597
|
+
else if (newValue === "false") typedValue = false;
|
|
30598
|
+
} else if (dataType === "number") {
|
|
30599
|
+
if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
|
|
30600
|
+
}
|
|
30550
30601
|
onValueChange?.(typedValue);
|
|
30551
30602
|
if (onChange) {
|
|
30552
30603
|
const event = {
|
|
@@ -30565,55 +30616,57 @@ const Select = forwardRef(({
|
|
|
30565
30616
|
setOpenInternal(open_0);
|
|
30566
30617
|
}, ...props, children: [
|
|
30567
30618
|
typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label,
|
|
30568
|
-
/* @__PURE__ */
|
|
30619
|
+
/* @__PURE__ */ jsxs("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
|
|
30569
30620
|
"min-h-[28px]": size === "smallest",
|
|
30570
30621
|
"min-h-[32px]": size === "small",
|
|
30571
30622
|
"min-h-[42px]": size === "medium",
|
|
30572
30623
|
"min-h-[64px]": size === "large",
|
|
30573
30624
|
"w-fit": !fullWidth,
|
|
30574
30625
|
"w-full": fullWidth
|
|
30575
|
-
}), children:
|
|
30576
|
-
"
|
|
30577
|
-
|
|
30578
|
-
|
|
30579
|
-
|
|
30580
|
-
"
|
|
30581
|
-
"min-h-[32px]": size === "small",
|
|
30582
|
-
"min-h-[42px]": size === "medium",
|
|
30583
|
-
"min-h-[64px]": size === "large",
|
|
30584
|
-
"w-full": fullWidth,
|
|
30585
|
-
"w-fit": !fullWidth
|
|
30586
|
-
}, inputClassName), children: [
|
|
30587
|
-
/* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
|
30626
|
+
}), children: [
|
|
30627
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cls("h-full", padding ? {
|
|
30628
|
+
"px-4": size === "large",
|
|
30629
|
+
"px-3": size === "medium",
|
|
30630
|
+
"px-2": size === "small" || size === "smallest"
|
|
30631
|
+
} : "", "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", {
|
|
30588
30632
|
"min-h-[28px]": size === "smallest",
|
|
30589
30633
|
"min-h-[32px]": size === "small",
|
|
30590
30634
|
"min-h-[42px]": size === "medium",
|
|
30591
|
-
"min-h-[64px]": size === "large"
|
|
30592
|
-
|
|
30593
|
-
|
|
30594
|
-
|
|
30595
|
-
|
|
30596
|
-
|
|
30597
|
-
|
|
30598
|
-
|
|
30599
|
-
|
|
30600
|
-
|
|
30601
|
-
|
|
30602
|
-
|
|
30603
|
-
|
|
30604
|
-
|
|
30605
|
-
|
|
30635
|
+
"min-h-[64px]": size === "large",
|
|
30636
|
+
"w-full": fullWidth,
|
|
30637
|
+
"w-fit": !fullWidth
|
|
30638
|
+
}, inputClassName), children: [
|
|
30639
|
+
/* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
|
30640
|
+
"min-h-[28px]": size === "smallest",
|
|
30641
|
+
"min-h-[32px]": size === "small",
|
|
30642
|
+
"min-h-[42px]": size === "medium",
|
|
30643
|
+
"min-h-[64px]": size === "large"
|
|
30644
|
+
}), children: /* @__PURE__ */ jsxs(SelectPrimitive.Value, { onClick: (e) => {
|
|
30645
|
+
e.preventDefault();
|
|
30646
|
+
e.stopPropagation();
|
|
30647
|
+
}, placeholder, className: "w-full", children: [
|
|
30648
|
+
hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
|
|
30649
|
+
hasValue && !renderValue && (() => {
|
|
30650
|
+
const childrenProps = Children.map(children, (child) => {
|
|
30651
|
+
if (React__default.isValidElement(child)) {
|
|
30652
|
+
return child.props;
|
|
30653
|
+
}
|
|
30654
|
+
}).filter(Boolean);
|
|
30655
|
+
const option = childrenProps.find((o) => String(o.value) === String(value));
|
|
30656
|
+
return option?.children;
|
|
30657
|
+
})()
|
|
30658
|
+
] }) }),
|
|
30659
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", open ? "rotate-180" : "", {
|
|
30660
|
+
"px-2": size === "large",
|
|
30661
|
+
"px-1": size === "medium" || size === "small"
|
|
30662
|
+
}) }) })
|
|
30606
30663
|
] }) }),
|
|
30607
|
-
endAdornment && /* @__PURE__ */ jsx("div", { className: cls("h-full flex items-center"), onClick: (e_0) => {
|
|
30664
|
+
endAdornment && /* @__PURE__ */ jsx("div", { className: cls("h-full flex items-center absolute right-0 pr-12"), onClick: (e_0) => {
|
|
30608
30665
|
e_0.preventDefault();
|
|
30609
30666
|
e_0.stopPropagation();
|
|
30610
|
-
}, children: endAdornment })
|
|
30611
|
-
|
|
30612
|
-
|
|
30613
|
-
"px-1": size === "medium" || size === "small"
|
|
30614
|
-
}) }) })
|
|
30615
|
-
] }) }) }),
|
|
30616
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(SelectPrimitive.Content, { position, className: cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin), children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "p-1", style: {
|
|
30667
|
+
}, children: endAdornment })
|
|
30668
|
+
] }),
|
|
30669
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(SelectPrimitive.Content, { position, className: cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin), children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: cls("p-1", viewportClassName), style: {
|
|
30617
30670
|
maxHeight: "var(--radix-select-content-available-height)"
|
|
30618
30671
|
}, children }) }) })
|
|
30619
30672
|
] });
|