@firecms/ui 3.0.0-beta.12 → 3.0.0-beta.14
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/Autocomplete.d.ts +4 -2
- package/dist/components/BooleanSwitch.d.ts +1 -1
- package/dist/components/BooleanSwitchWithLabel.d.ts +1 -1
- package/dist/components/Button.d.ts +6 -4
- package/dist/components/DateTimeField.d.ts +1 -1
- package/dist/components/Dialog.d.ts +2 -1
- package/dist/components/MultiSelect.d.ts +14 -22
- package/dist/components/Select.d.ts +11 -9
- package/dist/components/TextField.d.ts +20 -4
- package/dist/index.css +1 -0
- package/dist/index.es.js +651 -559
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +651 -559
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -3
- package/src/components/Autocomplete.tsx +10 -5
- package/src/components/BooleanSwitch.tsx +1 -1
- package/src/components/BooleanSwitchWithLabel.tsx +7 -2
- package/src/components/Button.tsx +16 -17
- package/src/components/DateTimeField.tsx +11 -5
- package/src/components/Dialog.tsx +3 -1
- package/src/components/LoadingButton.tsx +1 -1
- package/src/components/Menubar.tsx +1 -1
- package/src/components/MultiSelect.tsx +55 -53
- package/src/components/Select.tsx +62 -42
- package/src/components/TextField.tsx +26 -14
- package/src/icons/Icon.tsx +1 -1
- package/src/index.css +1 -0
- package/src/material-icons.woff2 +0 -0
package/dist/index.es.js
CHANGED
|
@@ -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) {
|
|
@@ -738,13 +750,13 @@ const BooleanSwitch = React__default.forwardRef(function BooleanSwitch2({
|
|
|
738
750
|
const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
739
751
|
value,
|
|
740
752
|
position = "end",
|
|
753
|
+
size = "medium",
|
|
741
754
|
invisible,
|
|
742
755
|
onValueChange,
|
|
743
756
|
error,
|
|
744
757
|
label,
|
|
745
758
|
autoFocus,
|
|
746
759
|
disabled,
|
|
747
|
-
size,
|
|
748
760
|
className,
|
|
749
761
|
fullWidth = true,
|
|
750
762
|
inputClassName,
|
|
@@ -758,7 +770,12 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
|
758
770
|
React__default.useEffect(() => {
|
|
759
771
|
}, []);
|
|
760
772
|
const focus = document.activeElement === refInput?.current || document.activeElement === ref?.current;
|
|
761
|
-
return /* @__PURE__ */ jsxs("div", { ref, onFocus, onBlur, tabIndex: -1, className: cls(!invisible && fieldBackgroundMixin, !invisible && (disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin), disabled ? "cursor-default" : "cursor-pointer", "rounded-md max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark",
|
|
773
|
+
return /* @__PURE__ */ jsxs("div", { ref, onFocus, onBlur, tabIndex: -1, className: cls(!invisible && fieldBackgroundMixin, !invisible && (disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin), disabled ? "cursor-default" : "cursor-pointer", "rounded-md max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark", {
|
|
774
|
+
"min-h-[28px]": size === "smallest",
|
|
775
|
+
"min-h-[32px]": size === "small",
|
|
776
|
+
"min-h-[42px]": size === "medium",
|
|
777
|
+
"min-h-[64px]": size === "large"
|
|
778
|
+
}, 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) => {
|
|
762
779
|
if (props.allowIndeterminate) {
|
|
763
780
|
if (value === null || value === void 0) onValueChange?.(true);
|
|
764
781
|
else if (value) onValueChange?.(false);
|
|
@@ -830,20 +847,20 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
|
|
|
830
847
|
const t9 = variant === "filled" && color === "secondary" && !disabled;
|
|
831
848
|
const t10 = variant === "filled" && color === "error" && !disabled;
|
|
832
849
|
const t11 = variant === "filled" && color === "text" && !disabled;
|
|
833
|
-
const t12 = variant === "
|
|
834
|
-
const t13 = variant === "text" && color === "
|
|
835
|
-
const t14 = variant === "text" && color === "
|
|
836
|
-
const t15 = variant === "text" && color === "
|
|
837
|
-
const t16 = variant === "
|
|
838
|
-
const t17 = variant === "
|
|
839
|
-
const t18 = variant === "outlined" && color === "
|
|
840
|
-
const t19 = variant === "outlined" && color === "
|
|
841
|
-
const t20 = variant === "
|
|
842
|
-
const t21 = variant === "
|
|
843
|
-
const t22 = variant === "
|
|
850
|
+
const t12 = variant === "filled" && color === "neutral" && !disabled;
|
|
851
|
+
const t13 = variant === "text" && color === "primary" && !disabled;
|
|
852
|
+
const t14 = variant === "text" && color === "secondary" && !disabled;
|
|
853
|
+
const t15 = variant === "text" && color === "error" && !disabled;
|
|
854
|
+
const t16 = variant === "text" && color === "text" && !disabled;
|
|
855
|
+
const t17 = variant === "text" && color === "neutral" && !disabled;
|
|
856
|
+
const t18 = variant === "outlined" && color === "primary" && !disabled;
|
|
857
|
+
const t19 = variant === "outlined" && color === "secondary" && !disabled;
|
|
858
|
+
const t20 = variant === "outlined" && color === "error" && !disabled;
|
|
859
|
+
const t21 = variant === "outlined" && color === "text" && !disabled;
|
|
860
|
+
const t22 = variant === "outlined" && color === "neutral" && !disabled;
|
|
844
861
|
const t23 = variant === "text" && disabled;
|
|
845
862
|
const t24 = variant === "outlined" && disabled;
|
|
846
|
-
const t25 =
|
|
863
|
+
const t25 = variant === "filled" && disabled;
|
|
847
864
|
let t26;
|
|
848
865
|
let t27;
|
|
849
866
|
let t28;
|
|
@@ -859,17 +876,17 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
|
|
|
859
876
|
"border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": t9,
|
|
860
877
|
"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,
|
|
861
878
|
"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,
|
|
862
|
-
"border border-transparent
|
|
863
|
-
"border border-transparent text-
|
|
864
|
-
"border border-transparent text-
|
|
865
|
-
"border border-transparent text-
|
|
866
|
-
"border border-primary text-primary hover:text-primary hover:bg-
|
|
867
|
-
"border border-
|
|
868
|
-
"border border-
|
|
869
|
-
"border border-
|
|
870
|
-
"border border-
|
|
871
|
-
"border border-
|
|
872
|
-
"border border-
|
|
879
|
+
"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,
|
|
880
|
+
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t13,
|
|
881
|
+
"border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t14,
|
|
882
|
+
"border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
|
|
883
|
+
"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,
|
|
884
|
+
"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,
|
|
885
|
+
"border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
|
|
886
|
+
"border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
|
|
887
|
+
"border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
|
|
888
|
+
"border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
|
|
889
|
+
"border border-surface-400 text-text-primary hover:bg-surface-accent-200 dark:border-surface-600 dark:text-text-primary-dark dark:hover:bg-surface-accent-700": t22,
|
|
873
890
|
"text-text-disabled dark:text-text-disabled-dark": disabled,
|
|
874
891
|
"border border-transparent opacity-50": t23,
|
|
875
892
|
"border border-surface-500 opacity-50": t24,
|
|
@@ -1262,6 +1279,7 @@ const Icon = React.forwardRef((t0, ref) => {
|
|
|
1262
1279
|
if ($[0] !== style || $[1] !== t2) {
|
|
1263
1280
|
t3 = {
|
|
1264
1281
|
fontSize: t2,
|
|
1282
|
+
verticalAlign: "middle",
|
|
1265
1283
|
...style
|
|
1266
1284
|
};
|
|
1267
1285
|
$[0] = style;
|
|
@@ -1273,7 +1291,7 @@ const Icon = React.forwardRef((t0, ref) => {
|
|
|
1273
1291
|
const t4 = color ? colorClassesMapping[color] : "";
|
|
1274
1292
|
let t5;
|
|
1275
1293
|
if ($[3] !== className || $[4] !== t4) {
|
|
1276
|
-
t5 = cls("material-icons",
|
|
1294
|
+
t5 = cls("material-icons", t4, "select-none", className);
|
|
1277
1295
|
$[3] = className;
|
|
1278
1296
|
$[4] = t4;
|
|
1279
1297
|
$[5] = t5;
|
|
@@ -27685,7 +27703,7 @@ function Typography(t0) {
|
|
|
27685
27703
|
return t15;
|
|
27686
27704
|
}
|
|
27687
27705
|
const DateTimeField = (t0) => {
|
|
27688
|
-
const $ = c(
|
|
27706
|
+
const $ = c(57);
|
|
27689
27707
|
const {
|
|
27690
27708
|
value,
|
|
27691
27709
|
label,
|
|
@@ -27759,161 +27777,176 @@ const DateTimeField = (t0) => {
|
|
|
27759
27777
|
}
|
|
27760
27778
|
const t6 = !invisible && fieldBackgroundMixin;
|
|
27761
27779
|
const t7 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
|
|
27762
|
-
const t8 = size === "
|
|
27763
|
-
const t9 = size === "
|
|
27764
|
-
|
|
27765
|
-
|
|
27766
|
-
|
|
27767
|
-
|
|
27768
|
-
|
|
27780
|
+
const t8 = size === "smallest";
|
|
27781
|
+
const t9 = size === "small";
|
|
27782
|
+
const t10 = size === "medium";
|
|
27783
|
+
const t11 = size === "large";
|
|
27784
|
+
let t12;
|
|
27785
|
+
if ($[6] !== className || $[7] !== t10 || $[8] !== t11 || $[9] !== t6 || $[10] !== t7 || $[11] !== t8 || $[12] !== t9) {
|
|
27786
|
+
t12 = cls("rounded-md relative max-w-full", t6, t7, {
|
|
27787
|
+
"min-h-[28px]": t8,
|
|
27788
|
+
"min-h-[32px]": t9,
|
|
27789
|
+
"min-h-[42px]": t10,
|
|
27790
|
+
"min-h-[64px]": t11
|
|
27769
27791
|
}, className);
|
|
27770
27792
|
$[6] = className;
|
|
27771
|
-
$[7] =
|
|
27772
|
-
$[8] =
|
|
27773
|
-
$[9] =
|
|
27774
|
-
$[10] =
|
|
27775
|
-
$[11] =
|
|
27793
|
+
$[7] = t10;
|
|
27794
|
+
$[8] = t11;
|
|
27795
|
+
$[9] = t6;
|
|
27796
|
+
$[10] = t7;
|
|
27797
|
+
$[11] = t8;
|
|
27798
|
+
$[12] = t9;
|
|
27799
|
+
$[13] = t12;
|
|
27776
27800
|
} else {
|
|
27777
|
-
|
|
27801
|
+
t12 = $[13];
|
|
27778
27802
|
}
|
|
27779
|
-
let
|
|
27780
|
-
if ($[
|
|
27781
|
-
|
|
27803
|
+
let t13;
|
|
27804
|
+
if ($[14] !== disabled) {
|
|
27805
|
+
t13 = () => {
|
|
27782
27806
|
if (!disabled) {
|
|
27783
27807
|
inputRef.current?.focus();
|
|
27784
27808
|
}
|
|
27785
27809
|
};
|
|
27786
|
-
$[12] = disabled;
|
|
27787
|
-
$[13] = t11;
|
|
27788
|
-
} else {
|
|
27789
|
-
t11 = $[13];
|
|
27790
|
-
}
|
|
27791
|
-
let t12;
|
|
27792
|
-
if ($[14] !== disabled || $[15] !== error || $[16] !== focused || $[17] !== label) {
|
|
27793
|
-
t12 = label && /* @__PURE__ */ jsx(InputLabel, { className: cls("absolute top-1 pointer-events-none", !error ? focused ? "text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-500", disabled ? "opacity-50" : ""), shrink: true, children: label });
|
|
27794
27810
|
$[14] = disabled;
|
|
27795
|
-
$[15] =
|
|
27796
|
-
$[16] = focused;
|
|
27797
|
-
$[17] = label;
|
|
27798
|
-
$[18] = t12;
|
|
27811
|
+
$[15] = t13;
|
|
27799
27812
|
} else {
|
|
27800
|
-
|
|
27813
|
+
t13 = $[15];
|
|
27801
27814
|
}
|
|
27802
|
-
|
|
27803
|
-
|
|
27804
|
-
|
|
27805
|
-
|
|
27806
|
-
|
|
27807
|
-
|
|
27808
|
-
|
|
27809
|
-
$[
|
|
27810
|
-
|
|
27811
|
-
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
|
|
27815
|
-
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
|
|
27819
|
-
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
|
|
27823
|
-
$[
|
|
27824
|
-
$[
|
|
27825
|
-
|
|
27826
|
-
|
|
27827
|
-
|
|
27815
|
+
let t14;
|
|
27816
|
+
if ($[16] !== disabled || $[17] !== error || $[18] !== focused || $[19] !== label) {
|
|
27817
|
+
t14 = label && /* @__PURE__ */ jsx(InputLabel, { className: cls("absolute top-1 pointer-events-none", !error ? focused ? "text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-500", disabled ? "opacity-50" : ""), shrink: true, children: label });
|
|
27818
|
+
$[16] = disabled;
|
|
27819
|
+
$[17] = error;
|
|
27820
|
+
$[18] = focused;
|
|
27821
|
+
$[19] = label;
|
|
27822
|
+
$[20] = t14;
|
|
27823
|
+
} else {
|
|
27824
|
+
t14 = $[20];
|
|
27825
|
+
}
|
|
27826
|
+
const t15 = mode === "date_time" ? "datetime-local" : "date";
|
|
27827
|
+
const t16 = valueAsInputValue(value ?? null, mode);
|
|
27828
|
+
let t17;
|
|
27829
|
+
let t18;
|
|
27830
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27831
|
+
t17 = () => setFocused(true);
|
|
27832
|
+
t18 = () => setFocused(false);
|
|
27833
|
+
$[21] = t17;
|
|
27834
|
+
$[22] = t18;
|
|
27835
|
+
} else {
|
|
27836
|
+
t17 = $[21];
|
|
27837
|
+
t18 = $[22];
|
|
27838
|
+
}
|
|
27839
|
+
const t19 = clearable ? "pr-14" : "pr-12";
|
|
27840
|
+
const t20 = size === "smallest";
|
|
27841
|
+
const t21 = size === "small";
|
|
27842
|
+
const t22 = size === "medium";
|
|
27843
|
+
const t23 = size === "large";
|
|
27844
|
+
let t24;
|
|
27845
|
+
if ($[23] !== disabled || $[24] !== inputClassName || $[25] !== label || $[26] !== t19 || $[27] !== t20 || $[28] !== t21 || $[29] !== t22 || $[30] !== t23) {
|
|
27846
|
+
t24 = cls("w-full outline-none bg-transparent leading-normal text-base px-3", t19, "rounded-md", {
|
|
27847
|
+
"min-h-[28px]": t20,
|
|
27848
|
+
"min-h-[32px]": t21,
|
|
27849
|
+
"min-h-[42px]": t22,
|
|
27850
|
+
"min-h-[64px]": t23
|
|
27851
|
+
}, label ? "pt-8 pb-2" : "py-2", inputClassName, disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-surface-accent-600 dark:text-surface-accent-500");
|
|
27852
|
+
$[23] = disabled;
|
|
27853
|
+
$[24] = inputClassName;
|
|
27854
|
+
$[25] = label;
|
|
27855
|
+
$[26] = t19;
|
|
27856
|
+
$[27] = t20;
|
|
27857
|
+
$[28] = t21;
|
|
27858
|
+
$[29] = t22;
|
|
27859
|
+
$[30] = t23;
|
|
27860
|
+
$[31] = t24;
|
|
27828
27861
|
} else {
|
|
27829
|
-
|
|
27862
|
+
t24 = $[31];
|
|
27830
27863
|
}
|
|
27831
|
-
let
|
|
27832
|
-
if ($[
|
|
27833
|
-
|
|
27834
|
-
$[
|
|
27835
|
-
$[
|
|
27836
|
-
$[
|
|
27837
|
-
$[
|
|
27838
|
-
$[
|
|
27839
|
-
$[
|
|
27864
|
+
let t25;
|
|
27865
|
+
if ($[32] !== disabled || $[33] !== handleInputChange || $[34] !== t15 || $[35] !== t16 || $[36] !== t24) {
|
|
27866
|
+
t25 = /* @__PURE__ */ jsx("input", { ref: inputRef, type: t15, value: t16, onChange: handleInputChange, onFocus: t17, onBlur: t18, disabled, className: t24 });
|
|
27867
|
+
$[32] = disabled;
|
|
27868
|
+
$[33] = handleInputChange;
|
|
27869
|
+
$[34] = t15;
|
|
27870
|
+
$[35] = t16;
|
|
27871
|
+
$[36] = t24;
|
|
27872
|
+
$[37] = t25;
|
|
27840
27873
|
} else {
|
|
27841
|
-
|
|
27874
|
+
t25 = $[37];
|
|
27842
27875
|
}
|
|
27843
|
-
let
|
|
27844
|
-
if ($[
|
|
27845
|
-
|
|
27876
|
+
let t26;
|
|
27877
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27878
|
+
t26 = (e_2) => {
|
|
27846
27879
|
e_2.stopPropagation();
|
|
27847
27880
|
inputRef.current?.showPicker();
|
|
27848
27881
|
};
|
|
27849
|
-
$[
|
|
27882
|
+
$[38] = t26;
|
|
27850
27883
|
} else {
|
|
27851
|
-
|
|
27884
|
+
t26 = $[38];
|
|
27852
27885
|
}
|
|
27853
|
-
let
|
|
27854
|
-
if ($[
|
|
27855
|
-
|
|
27856
|
-
$[
|
|
27886
|
+
let t27;
|
|
27887
|
+
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27888
|
+
t27 = /* @__PURE__ */ jsx(IconButton, { onClick: t26, className: "absolute right-3 top-1/2 transform -translate-y-1/2 !text-surface-accent-500", children: /* @__PURE__ */ jsx(CalendarMonthIcon, { color: "disabled" }) });
|
|
27889
|
+
$[39] = t27;
|
|
27857
27890
|
} else {
|
|
27858
|
-
|
|
27891
|
+
t27 = $[39];
|
|
27859
27892
|
}
|
|
27860
|
-
let
|
|
27861
|
-
if ($[
|
|
27862
|
-
|
|
27863
|
-
$[
|
|
27864
|
-
$[
|
|
27865
|
-
$[
|
|
27866
|
-
$[
|
|
27893
|
+
let t28;
|
|
27894
|
+
if ($[40] !== clearable || $[41] !== handleClear || $[42] !== value) {
|
|
27895
|
+
t28 = clearable && value && /* @__PURE__ */ jsx(IconButton, { onClick: handleClear, className: "absolute right-14 top-1/2 transform -translate-y-1/2 text-surface-accent-400 ", children: /* @__PURE__ */ jsx(CloseIcon, {}) });
|
|
27896
|
+
$[40] = clearable;
|
|
27897
|
+
$[41] = handleClear;
|
|
27898
|
+
$[42] = value;
|
|
27899
|
+
$[43] = t28;
|
|
27867
27900
|
} else {
|
|
27868
|
-
|
|
27901
|
+
t28 = $[43];
|
|
27869
27902
|
}
|
|
27870
|
-
let
|
|
27871
|
-
if ($[
|
|
27872
|
-
|
|
27873
|
-
|
|
27874
|
-
|
|
27875
|
-
|
|
27876
|
-
|
|
27903
|
+
let t29;
|
|
27904
|
+
if ($[44] !== style || $[45] !== t12 || $[46] !== t13 || $[47] !== t14 || $[48] !== t25 || $[49] !== t28) {
|
|
27905
|
+
t29 = /* @__PURE__ */ jsxs("div", { className: t12, style, onClick: t13, children: [
|
|
27906
|
+
t14,
|
|
27907
|
+
t25,
|
|
27908
|
+
t27,
|
|
27909
|
+
t28
|
|
27877
27910
|
] });
|
|
27878
|
-
$[
|
|
27879
|
-
$[
|
|
27880
|
-
$[
|
|
27881
|
-
$[
|
|
27882
|
-
$[
|
|
27883
|
-
$[
|
|
27884
|
-
$[
|
|
27911
|
+
$[44] = style;
|
|
27912
|
+
$[45] = t12;
|
|
27913
|
+
$[46] = t13;
|
|
27914
|
+
$[47] = t14;
|
|
27915
|
+
$[48] = t25;
|
|
27916
|
+
$[49] = t28;
|
|
27917
|
+
$[50] = t29;
|
|
27885
27918
|
} else {
|
|
27886
|
-
|
|
27919
|
+
t29 = $[50];
|
|
27887
27920
|
}
|
|
27888
|
-
let
|
|
27889
|
-
if ($[
|
|
27890
|
-
|
|
27891
|
-
/* @__PURE__ */ jsx(ErrorIcon, { size: "
|
|
27921
|
+
let t30;
|
|
27922
|
+
if ($[51] !== invalidValue || $[52] !== value) {
|
|
27923
|
+
t30 = invalidValue && /* @__PURE__ */ jsxs("div", { className: "flex items-center m-2", children: [
|
|
27924
|
+
/* @__PURE__ */ jsx(ErrorIcon, { size: "small", color: "error" }),
|
|
27892
27925
|
/* @__PURE__ */ jsxs("div", { className: "pl-2", children: [
|
|
27893
27926
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Invalid date value for this field" }),
|
|
27894
27927
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: `The provided value is: ${JSON.stringify(value)}` })
|
|
27895
27928
|
] })
|
|
27896
27929
|
] });
|
|
27897
|
-
$[
|
|
27898
|
-
$[
|
|
27899
|
-
$[
|
|
27930
|
+
$[51] = invalidValue;
|
|
27931
|
+
$[52] = value;
|
|
27932
|
+
$[53] = t30;
|
|
27900
27933
|
} else {
|
|
27901
|
-
|
|
27934
|
+
t30 = $[53];
|
|
27902
27935
|
}
|
|
27903
|
-
let
|
|
27904
|
-
if ($[
|
|
27905
|
-
|
|
27936
|
+
let t31;
|
|
27937
|
+
if ($[54] !== t29 || $[55] !== t30) {
|
|
27938
|
+
t31 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27906
27939
|
t5,
|
|
27907
|
-
|
|
27908
|
-
|
|
27940
|
+
t29,
|
|
27941
|
+
t30
|
|
27909
27942
|
] });
|
|
27910
|
-
$[
|
|
27911
|
-
$[
|
|
27912
|
-
$[
|
|
27943
|
+
$[54] = t29;
|
|
27944
|
+
$[55] = t30;
|
|
27945
|
+
$[56] = t31;
|
|
27913
27946
|
} else {
|
|
27914
|
-
|
|
27947
|
+
t31 = $[56];
|
|
27915
27948
|
}
|
|
27916
|
-
return
|
|
27949
|
+
return t31;
|
|
27917
27950
|
};
|
|
27918
27951
|
const inputStyles = `
|
|
27919
27952
|
/* Hide the default calendar icon in Chrome, Safari, Edge, Opera */
|
|
@@ -27962,12 +27995,13 @@ const widthClasses = {
|
|
|
27962
27995
|
full: "max-w-full min-w-full w-full"
|
|
27963
27996
|
};
|
|
27964
27997
|
const Dialog = (t0) => {
|
|
27965
|
-
const $ = c(
|
|
27998
|
+
const $ = c(39);
|
|
27966
27999
|
const {
|
|
27967
28000
|
open,
|
|
27968
28001
|
onOpenChange,
|
|
27969
28002
|
children,
|
|
27970
28003
|
className,
|
|
28004
|
+
containerClassName,
|
|
27971
28005
|
fullWidth: t1,
|
|
27972
28006
|
fullHeight,
|
|
27973
28007
|
fullScreen,
|
|
@@ -28008,107 +28042,116 @@ const Dialog = (t0) => {
|
|
|
28008
28042
|
}
|
|
28009
28043
|
useEffect(t5, t6);
|
|
28010
28044
|
const t7 = displayed || open;
|
|
28011
|
-
|
|
28012
|
-
|
|
28013
|
-
|
|
28014
|
-
|
|
28015
|
-
$[
|
|
28016
|
-
$[4] = t9;
|
|
28045
|
+
let t8;
|
|
28046
|
+
if ($[3] !== containerClassName) {
|
|
28047
|
+
t8 = cls("fixed inset-0 z-30", containerClassName);
|
|
28048
|
+
$[3] = containerClassName;
|
|
28049
|
+
$[4] = t8;
|
|
28017
28050
|
} else {
|
|
28018
|
-
|
|
28051
|
+
t8 = $[4];
|
|
28019
28052
|
}
|
|
28020
|
-
const
|
|
28021
|
-
let
|
|
28022
|
-
if ($[5] !==
|
|
28023
|
-
|
|
28024
|
-
|
|
28025
|
-
|
|
28026
|
-
$[5] = t10;
|
|
28027
|
-
$[6] = t11;
|
|
28053
|
+
const t9 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28054
|
+
let t10;
|
|
28055
|
+
if ($[5] !== t9) {
|
|
28056
|
+
t10 = 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 ", t9, "z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center");
|
|
28057
|
+
$[5] = t9;
|
|
28058
|
+
$[6] = t10;
|
|
28028
28059
|
} else {
|
|
28029
|
-
|
|
28060
|
+
t10 = $[6];
|
|
28030
28061
|
}
|
|
28062
|
+
const t11 = displayed ? "auto" : "none";
|
|
28031
28063
|
let t12;
|
|
28032
|
-
if ($[7] !== t11
|
|
28033
|
-
t12 =
|
|
28064
|
+
if ($[7] !== t11) {
|
|
28065
|
+
t12 = {
|
|
28066
|
+
pointerEvents: t11
|
|
28067
|
+
};
|
|
28034
28068
|
$[7] = t11;
|
|
28035
|
-
$[8] =
|
|
28036
|
-
$[9] = t12;
|
|
28069
|
+
$[8] = t12;
|
|
28037
28070
|
} else {
|
|
28038
|
-
t12 = $[
|
|
28071
|
+
t12 = $[8];
|
|
28039
28072
|
}
|
|
28040
28073
|
let t13;
|
|
28041
|
-
if ($[10]
|
|
28042
|
-
t13 =
|
|
28043
|
-
$[
|
|
28044
|
-
|
|
28045
|
-
|
|
28046
|
-
}
|
|
28047
|
-
|
|
28048
|
-
|
|
28049
|
-
|
|
28050
|
-
|
|
28051
|
-
|
|
28052
|
-
const t19 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28053
|
-
let t20;
|
|
28054
|
-
if ($[11] !== className || $[12] !== t14 || $[13] !== t15 || $[14] !== t16 || $[15] !== t17 || $[16] !== t18 || $[17] !== t19) {
|
|
28055
|
-
t20 = cls(paperMixin, "z-30", "relative", "outline-none focus:outline-none", t14, t15, "text-surface-accent-900 dark:text-white", "justify-center items-center", t16, "ease-in-out duration-200", t17, t18, t19, className);
|
|
28056
|
-
$[11] = className;
|
|
28074
|
+
if ($[9] !== t10 || $[10] !== t12) {
|
|
28075
|
+
t13 = /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: t10, style: t12 });
|
|
28076
|
+
$[9] = t10;
|
|
28077
|
+
$[10] = t12;
|
|
28078
|
+
$[11] = t13;
|
|
28079
|
+
} else {
|
|
28080
|
+
t13 = $[11];
|
|
28081
|
+
}
|
|
28082
|
+
let t14;
|
|
28083
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28084
|
+
t14 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
|
|
28057
28085
|
$[12] = t14;
|
|
28058
|
-
$[13] = t15;
|
|
28059
|
-
$[14] = t16;
|
|
28060
|
-
$[15] = t17;
|
|
28061
|
-
$[16] = t18;
|
|
28062
|
-
$[17] = t19;
|
|
28063
|
-
$[18] = t20;
|
|
28064
28086
|
} else {
|
|
28065
|
-
|
|
28087
|
+
t14 = $[12];
|
|
28066
28088
|
}
|
|
28089
|
+
const t15 = fullWidth && !fullScreen ? "w-11/12" : void 0;
|
|
28090
|
+
const t16 = fullHeight && !fullScreen ? "h-full" : void 0;
|
|
28091
|
+
const t17 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
|
|
28092
|
+
const t18 = scrollable && "overflow-y-auto";
|
|
28093
|
+
const t19 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28094
|
+
const t20 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28067
28095
|
let t21;
|
|
28068
|
-
if ($[
|
|
28069
|
-
t21 =
|
|
28070
|
-
$[
|
|
28071
|
-
$[
|
|
28072
|
-
$[
|
|
28096
|
+
if ($[13] !== className || $[14] !== t15 || $[15] !== t16 || $[16] !== t17 || $[17] !== t18 || $[18] !== t19 || $[19] !== t20) {
|
|
28097
|
+
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);
|
|
28098
|
+
$[13] = className;
|
|
28099
|
+
$[14] = t15;
|
|
28100
|
+
$[15] = t16;
|
|
28101
|
+
$[16] = t17;
|
|
28102
|
+
$[17] = t18;
|
|
28103
|
+
$[18] = t19;
|
|
28104
|
+
$[19] = t20;
|
|
28105
|
+
$[20] = t21;
|
|
28073
28106
|
} else {
|
|
28074
|
-
t21 = $[
|
|
28107
|
+
t21 = $[20];
|
|
28075
28108
|
}
|
|
28076
28109
|
let t22;
|
|
28077
|
-
if ($[
|
|
28078
|
-
t22 = /* @__PURE__ */ jsx(
|
|
28079
|
-
$[
|
|
28080
|
-
$[
|
|
28081
|
-
$[
|
|
28082
|
-
$[25] = onPointerDownOutside;
|
|
28083
|
-
$[26] = t21;
|
|
28084
|
-
$[27] = t22;
|
|
28110
|
+
if ($[21] !== children || $[22] !== t21) {
|
|
28111
|
+
t22 = /* @__PURE__ */ jsx("div", { className: t21, children });
|
|
28112
|
+
$[21] = children;
|
|
28113
|
+
$[22] = t21;
|
|
28114
|
+
$[23] = t22;
|
|
28085
28115
|
} else {
|
|
28086
|
-
t22 = $[
|
|
28116
|
+
t22 = $[23];
|
|
28087
28117
|
}
|
|
28088
28118
|
let t23;
|
|
28089
|
-
if ($[
|
|
28090
|
-
t23 = /* @__PURE__ */ jsx(DialogPrimitive.
|
|
28091
|
-
|
|
28092
|
-
|
|
28093
|
-
]
|
|
28094
|
-
$[
|
|
28095
|
-
$[
|
|
28096
|
-
$[
|
|
28119
|
+
if ($[24] !== onEscapeKeyDown || $[25] !== onInteractOutside || $[26] !== onOpenAutoFocus || $[27] !== onPointerDownOutside || $[28] !== t22) {
|
|
28120
|
+
t23 = /* @__PURE__ */ jsx(DialogPrimitive.Content, { onEscapeKeyDown, onOpenAutoFocus, onPointerDownOutside, onInteractOutside, className: t14, children: t22 });
|
|
28121
|
+
$[24] = onEscapeKeyDown;
|
|
28122
|
+
$[25] = onInteractOutside;
|
|
28123
|
+
$[26] = onOpenAutoFocus;
|
|
28124
|
+
$[27] = onPointerDownOutside;
|
|
28125
|
+
$[28] = t22;
|
|
28126
|
+
$[29] = t23;
|
|
28097
28127
|
} else {
|
|
28098
|
-
t23 = $[
|
|
28128
|
+
t23 = $[29];
|
|
28099
28129
|
}
|
|
28100
28130
|
let t24;
|
|
28101
|
-
if ($[
|
|
28102
|
-
t24 = /* @__PURE__ */ jsx(DialogPrimitive.
|
|
28103
|
-
|
|
28104
|
-
|
|
28105
|
-
|
|
28106
|
-
$[
|
|
28107
|
-
$[
|
|
28131
|
+
if ($[30] !== t13 || $[31] !== t23 || $[32] !== t8) {
|
|
28132
|
+
t24 = /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", { className: t8, children: [
|
|
28133
|
+
t13,
|
|
28134
|
+
t23
|
|
28135
|
+
] }) });
|
|
28136
|
+
$[30] = t13;
|
|
28137
|
+
$[31] = t23;
|
|
28138
|
+
$[32] = t8;
|
|
28139
|
+
$[33] = t24;
|
|
28108
28140
|
} else {
|
|
28109
|
-
t24 = $[
|
|
28141
|
+
t24 = $[33];
|
|
28110
28142
|
}
|
|
28111
|
-
|
|
28143
|
+
let t25;
|
|
28144
|
+
if ($[34] !== modal || $[35] !== onOpenChange || $[36] !== t24 || $[37] !== t7) {
|
|
28145
|
+
t25 = /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: t7, modal, onOpenChange, children: t24 });
|
|
28146
|
+
$[34] = modal;
|
|
28147
|
+
$[35] = onOpenChange;
|
|
28148
|
+
$[36] = t24;
|
|
28149
|
+
$[37] = t7;
|
|
28150
|
+
$[38] = t25;
|
|
28151
|
+
} else {
|
|
28152
|
+
t25 = $[38];
|
|
28153
|
+
}
|
|
28154
|
+
return t25;
|
|
28112
28155
|
};
|
|
28113
28156
|
function _temp$2() {
|
|
28114
28157
|
}
|
|
@@ -28678,7 +28721,7 @@ const Label = React.forwardRef((t0, ref) => {
|
|
|
28678
28721
|
});
|
|
28679
28722
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
28680
28723
|
function LoadingButton(t0) {
|
|
28681
|
-
const $ = c(
|
|
28724
|
+
const $ = c(18);
|
|
28682
28725
|
let children;
|
|
28683
28726
|
let disabled;
|
|
28684
28727
|
let loading;
|
|
@@ -28712,31 +28755,32 @@ function LoadingButton(t0) {
|
|
|
28712
28755
|
const t1 = loading || disabled;
|
|
28713
28756
|
const t2 = props.component;
|
|
28714
28757
|
let t3;
|
|
28715
|
-
if ($[7] !== loading) {
|
|
28716
|
-
t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: "small" });
|
|
28758
|
+
if ($[7] !== loading || $[8] !== props.size) {
|
|
28759
|
+
t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: props.size === "small" ? "smallest" : "small" });
|
|
28717
28760
|
$[7] = loading;
|
|
28718
|
-
$[8] =
|
|
28761
|
+
$[8] = props.size;
|
|
28762
|
+
$[9] = t3;
|
|
28719
28763
|
} else {
|
|
28720
|
-
t3 = $[
|
|
28764
|
+
t3 = $[9];
|
|
28721
28765
|
}
|
|
28722
28766
|
const t4 = !loading && startIcon;
|
|
28723
28767
|
let t5;
|
|
28724
|
-
if ($[
|
|
28768
|
+
if ($[10] !== children || $[11] !== onClick || $[12] !== props || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
|
|
28725
28769
|
t5 = /* @__PURE__ */ jsxs(Button, { disabled: t1, onClick, component: t2, ...props, children: [
|
|
28726
28770
|
t3,
|
|
28727
28771
|
t4,
|
|
28728
28772
|
children
|
|
28729
28773
|
] });
|
|
28730
|
-
$[
|
|
28731
|
-
$[
|
|
28732
|
-
$[
|
|
28733
|
-
$[
|
|
28734
|
-
$[
|
|
28735
|
-
$[
|
|
28736
|
-
$[
|
|
28737
|
-
$[
|
|
28774
|
+
$[10] = children;
|
|
28775
|
+
$[11] = onClick;
|
|
28776
|
+
$[12] = props;
|
|
28777
|
+
$[13] = t1;
|
|
28778
|
+
$[14] = t2;
|
|
28779
|
+
$[15] = t3;
|
|
28780
|
+
$[16] = t4;
|
|
28781
|
+
$[17] = t5;
|
|
28738
28782
|
} else {
|
|
28739
|
-
t5 = $[
|
|
28783
|
+
t5 = $[17];
|
|
28740
28784
|
}
|
|
28741
28785
|
return t5;
|
|
28742
28786
|
}
|
|
@@ -28956,7 +29000,7 @@ function MenubarTrigger(t0) {
|
|
|
28956
29000
|
} = t0;
|
|
28957
29001
|
let t1;
|
|
28958
29002
|
if ($[0] !== className) {
|
|
28959
|
-
t1 = cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-
|
|
29003
|
+
t1 = cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800", className);
|
|
28960
29004
|
$[0] = className;
|
|
28961
29005
|
$[1] = t1;
|
|
28962
29006
|
} else {
|
|
@@ -29623,98 +29667,99 @@ function SelectInputLabel(t0) {
|
|
|
29623
29667
|
}
|
|
29624
29668
|
const MultiSelectContext = React.createContext({});
|
|
29625
29669
|
const MultiSelect = React.forwardRef((t0, ref) => {
|
|
29626
|
-
const $ = c(
|
|
29670
|
+
const $ = c(103);
|
|
29627
29671
|
const {
|
|
29628
29672
|
value,
|
|
29629
|
-
size,
|
|
29673
|
+
size: t1,
|
|
29630
29674
|
label,
|
|
29631
29675
|
error,
|
|
29632
29676
|
onValueChange,
|
|
29633
29677
|
invisible,
|
|
29634
29678
|
disabled,
|
|
29635
29679
|
placeholder,
|
|
29636
|
-
modalPopover:
|
|
29637
|
-
includeClear:
|
|
29638
|
-
includeSelectAll:
|
|
29639
|
-
useChips:
|
|
29680
|
+
modalPopover: t2,
|
|
29681
|
+
includeClear: t3,
|
|
29682
|
+
includeSelectAll: t4,
|
|
29683
|
+
useChips: t5,
|
|
29640
29684
|
className,
|
|
29641
29685
|
children,
|
|
29642
29686
|
renderValues,
|
|
29643
29687
|
open,
|
|
29644
29688
|
onOpenChange
|
|
29645
29689
|
} = t0;
|
|
29646
|
-
const
|
|
29647
|
-
const
|
|
29648
|
-
const
|
|
29649
|
-
const
|
|
29690
|
+
const size = t1 === void 0 ? "large" : t1;
|
|
29691
|
+
const modalPopover = t2 === void 0 ? true : t2;
|
|
29692
|
+
const includeClear = t3 === void 0 ? true : t3;
|
|
29693
|
+
const includeSelectAll = t4 === void 0 ? true : t4;
|
|
29694
|
+
const useChips = t5 === void 0 ? true : t5;
|
|
29650
29695
|
const [isPopoverOpen, setIsPopoverOpen] = React.useState(open ?? false);
|
|
29651
|
-
let
|
|
29696
|
+
let t6;
|
|
29652
29697
|
if ($[0] !== value) {
|
|
29653
|
-
|
|
29698
|
+
t6 = value ?? [];
|
|
29654
29699
|
$[0] = value;
|
|
29655
|
-
$[1] =
|
|
29700
|
+
$[1] = t6;
|
|
29656
29701
|
} else {
|
|
29657
|
-
|
|
29702
|
+
t6 = $[1];
|
|
29658
29703
|
}
|
|
29659
|
-
const [selectedValues, setSelectedValues] = React.useState(
|
|
29660
|
-
let
|
|
29704
|
+
const [selectedValues, setSelectedValues] = React.useState(t6);
|
|
29705
|
+
let t7;
|
|
29661
29706
|
if ($[2] !== onOpenChange) {
|
|
29662
|
-
|
|
29707
|
+
t7 = (open_0) => {
|
|
29663
29708
|
setIsPopoverOpen(open_0);
|
|
29664
29709
|
onOpenChange?.(open_0);
|
|
29665
29710
|
};
|
|
29666
29711
|
$[2] = onOpenChange;
|
|
29667
|
-
$[3] =
|
|
29712
|
+
$[3] = t7;
|
|
29668
29713
|
} else {
|
|
29669
|
-
|
|
29714
|
+
t7 = $[3];
|
|
29670
29715
|
}
|
|
29671
|
-
const onPopoverOpenChange =
|
|
29672
|
-
let t7;
|
|
29716
|
+
const onPopoverOpenChange = t7;
|
|
29673
29717
|
let t8;
|
|
29718
|
+
let t9;
|
|
29674
29719
|
if ($[4] !== open) {
|
|
29675
|
-
|
|
29720
|
+
t8 = () => {
|
|
29676
29721
|
setIsPopoverOpen(open ?? false);
|
|
29677
29722
|
};
|
|
29678
|
-
|
|
29723
|
+
t9 = [open];
|
|
29679
29724
|
$[4] = open;
|
|
29680
|
-
$[5] =
|
|
29681
|
-
$[6] =
|
|
29725
|
+
$[5] = t8;
|
|
29726
|
+
$[6] = t9;
|
|
29682
29727
|
} else {
|
|
29683
|
-
|
|
29684
|
-
|
|
29728
|
+
t8 = $[5];
|
|
29729
|
+
t9 = $[6];
|
|
29685
29730
|
}
|
|
29686
|
-
useEffect(
|
|
29687
|
-
let
|
|
29731
|
+
useEffect(t8, t9);
|
|
29732
|
+
let t10;
|
|
29688
29733
|
if ($[7] !== children) {
|
|
29689
|
-
|
|
29734
|
+
t10 = children ? Children.map(children, _temp$1).filter(Boolean) : [];
|
|
29690
29735
|
$[7] = children;
|
|
29691
|
-
$[8] =
|
|
29736
|
+
$[8] = t10;
|
|
29692
29737
|
} else {
|
|
29693
|
-
|
|
29738
|
+
t10 = $[8];
|
|
29694
29739
|
}
|
|
29695
|
-
const allValues =
|
|
29696
|
-
let t10;
|
|
29740
|
+
const allValues = t10;
|
|
29697
29741
|
let t11;
|
|
29742
|
+
let t12;
|
|
29698
29743
|
if ($[9] !== value) {
|
|
29699
|
-
|
|
29744
|
+
t11 = () => {
|
|
29700
29745
|
setSelectedValues(value ?? []);
|
|
29701
29746
|
};
|
|
29702
|
-
|
|
29747
|
+
t12 = [value];
|
|
29703
29748
|
$[9] = value;
|
|
29704
|
-
$[10] =
|
|
29705
|
-
$[11] =
|
|
29749
|
+
$[10] = t11;
|
|
29750
|
+
$[11] = t12;
|
|
29706
29751
|
} else {
|
|
29707
|
-
|
|
29708
|
-
|
|
29752
|
+
t11 = $[10];
|
|
29753
|
+
t12 = $[11];
|
|
29709
29754
|
}
|
|
29710
|
-
React.useEffect(
|
|
29755
|
+
React.useEffect(t11, t12);
|
|
29711
29756
|
let onItemClick;
|
|
29712
29757
|
let updateValues;
|
|
29713
29758
|
if ($[12] !== onValueChange || $[13] !== selectedValues) {
|
|
29714
29759
|
onItemClick = function onItemClick2(newValue) {
|
|
29715
29760
|
let newSelectedValues;
|
|
29716
|
-
if (selectedValues.
|
|
29717
|
-
newSelectedValues = selectedValues.filter((v) => v !== newValue);
|
|
29761
|
+
if (selectedValues.some((v_0) => String(v_0) === String(newValue))) {
|
|
29762
|
+
newSelectedValues = selectedValues.filter((v) => String(v) !== String(newValue));
|
|
29718
29763
|
} else {
|
|
29719
29764
|
newSelectedValues = [...selectedValues, newValue];
|
|
29720
29765
|
}
|
|
@@ -29732,9 +29777,9 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29732
29777
|
onItemClick = $[14];
|
|
29733
29778
|
updateValues = $[15];
|
|
29734
29779
|
}
|
|
29735
|
-
let
|
|
29780
|
+
let t13;
|
|
29736
29781
|
if ($[16] !== onPopoverOpenChange || $[17] !== selectedValues || $[18] !== updateValues) {
|
|
29737
|
-
|
|
29782
|
+
t13 = (event) => {
|
|
29738
29783
|
if (event.key === "Enter") {
|
|
29739
29784
|
onPopoverOpenChange(true);
|
|
29740
29785
|
} else {
|
|
@@ -29748,50 +29793,50 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29748
29793
|
$[16] = onPopoverOpenChange;
|
|
29749
29794
|
$[17] = selectedValues;
|
|
29750
29795
|
$[18] = updateValues;
|
|
29751
|
-
$[19] =
|
|
29796
|
+
$[19] = t13;
|
|
29752
29797
|
} else {
|
|
29753
|
-
|
|
29798
|
+
t13 = $[19];
|
|
29754
29799
|
}
|
|
29755
|
-
const handleInputKeyDown =
|
|
29756
|
-
let
|
|
29800
|
+
const handleInputKeyDown = t13;
|
|
29801
|
+
let t14;
|
|
29757
29802
|
if ($[20] !== selectedValues || $[21] !== updateValues) {
|
|
29758
|
-
|
|
29759
|
-
const newSelectedValues_1 = selectedValues.
|
|
29803
|
+
t14 = (value_0) => {
|
|
29804
|
+
const newSelectedValues_1 = selectedValues.some((v_2) => String(v_2) === String(value_0)) ? selectedValues.filter((v_1) => String(v_1) !== String(value_0)) : [...selectedValues, value_0];
|
|
29760
29805
|
updateValues(newSelectedValues_1);
|
|
29761
29806
|
};
|
|
29762
29807
|
$[20] = selectedValues;
|
|
29763
29808
|
$[21] = updateValues;
|
|
29764
|
-
$[22] =
|
|
29809
|
+
$[22] = t14;
|
|
29765
29810
|
} else {
|
|
29766
|
-
|
|
29811
|
+
t14 = $[22];
|
|
29767
29812
|
}
|
|
29768
|
-
const toggleOption =
|
|
29769
|
-
let
|
|
29813
|
+
const toggleOption = t14;
|
|
29814
|
+
let t15;
|
|
29770
29815
|
if ($[23] !== updateValues) {
|
|
29771
|
-
|
|
29816
|
+
t15 = () => {
|
|
29772
29817
|
updateValues([]);
|
|
29773
29818
|
};
|
|
29774
29819
|
$[23] = updateValues;
|
|
29775
|
-
$[24] =
|
|
29820
|
+
$[24] = t15;
|
|
29776
29821
|
} else {
|
|
29777
|
-
|
|
29822
|
+
t15 = $[24];
|
|
29778
29823
|
}
|
|
29779
|
-
const handleClear =
|
|
29780
|
-
let
|
|
29824
|
+
const handleClear = t15;
|
|
29825
|
+
let t16;
|
|
29781
29826
|
if ($[25] !== isPopoverOpen || $[26] !== onPopoverOpenChange) {
|
|
29782
|
-
|
|
29827
|
+
t16 = () => {
|
|
29783
29828
|
onPopoverOpenChange(!isPopoverOpen);
|
|
29784
29829
|
};
|
|
29785
29830
|
$[25] = isPopoverOpen;
|
|
29786
29831
|
$[26] = onPopoverOpenChange;
|
|
29787
|
-
$[27] =
|
|
29832
|
+
$[27] = t16;
|
|
29788
29833
|
} else {
|
|
29789
|
-
|
|
29834
|
+
t16 = $[27];
|
|
29790
29835
|
}
|
|
29791
|
-
const handleTogglePopover =
|
|
29792
|
-
let
|
|
29836
|
+
const handleTogglePopover = t16;
|
|
29837
|
+
let t17;
|
|
29793
29838
|
if ($[28] !== allValues || $[29] !== handleClear || $[30] !== onPopoverOpenChange || $[31] !== selectedValues.length || $[32] !== updateValues) {
|
|
29794
|
-
|
|
29839
|
+
t17 = () => {
|
|
29795
29840
|
if (selectedValues.length === allValues.length) {
|
|
29796
29841
|
handleClear();
|
|
29797
29842
|
} else {
|
|
@@ -29804,60 +29849,76 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29804
29849
|
$[30] = onPopoverOpenChange;
|
|
29805
29850
|
$[31] = selectedValues.length;
|
|
29806
29851
|
$[32] = updateValues;
|
|
29807
|
-
$[33] =
|
|
29852
|
+
$[33] = t17;
|
|
29808
29853
|
} else {
|
|
29809
|
-
|
|
29854
|
+
t17 = $[33];
|
|
29810
29855
|
}
|
|
29811
|
-
const toggleAll =
|
|
29856
|
+
const toggleAll = t17;
|
|
29812
29857
|
useInjectStyles("MultiSelect", `
|
|
29813
29858
|
[cmdk-group] {
|
|
29814
29859
|
max-height: 45vh;
|
|
29815
29860
|
overflow-y: auto;
|
|
29816
29861
|
// width: 400px;
|
|
29817
29862
|
} `);
|
|
29818
|
-
let
|
|
29863
|
+
let t18;
|
|
29819
29864
|
if ($[34] !== onItemClick || $[35] !== selectedValues) {
|
|
29820
|
-
|
|
29865
|
+
t18 = {
|
|
29821
29866
|
fieldValue: selectedValues,
|
|
29822
29867
|
onItemClick
|
|
29823
29868
|
};
|
|
29824
29869
|
$[34] = onItemClick;
|
|
29825
29870
|
$[35] = selectedValues;
|
|
29826
|
-
$[36] =
|
|
29871
|
+
$[36] = t18;
|
|
29827
29872
|
} else {
|
|
29828
|
-
|
|
29873
|
+
t18 = $[36];
|
|
29829
29874
|
}
|
|
29830
|
-
let
|
|
29875
|
+
let t19;
|
|
29831
29876
|
if ($[37] !== error || $[38] !== label) {
|
|
29832
|
-
|
|
29877
|
+
t19 = typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label;
|
|
29833
29878
|
$[37] = error;
|
|
29834
29879
|
$[38] = label;
|
|
29835
|
-
$[39] =
|
|
29880
|
+
$[39] = t19;
|
|
29836
29881
|
} else {
|
|
29837
|
-
|
|
29882
|
+
t19 = $[39];
|
|
29838
29883
|
}
|
|
29839
|
-
const
|
|
29840
|
-
const
|
|
29841
|
-
const
|
|
29842
|
-
|
|
29843
|
-
|
|
29844
|
-
|
|
29884
|
+
const t20 = size === "smallest";
|
|
29885
|
+
const t21 = size === "small";
|
|
29886
|
+
const t22 = size === "medium";
|
|
29887
|
+
const t23 = size === "large";
|
|
29888
|
+
let t24;
|
|
29889
|
+
if ($[40] !== className || $[41] !== disabled || $[42] !== invisible || $[43] !== size || $[44] !== t20 || $[45] !== t21 || $[46] !== t22 || $[47] !== t23) {
|
|
29890
|
+
t24 = cls({
|
|
29891
|
+
"min-h-[28px]": t20,
|
|
29892
|
+
"min-h-[32px]": t21,
|
|
29893
|
+
"min-h-[42px]": t22,
|
|
29894
|
+
"min-h-[64px]": t23
|
|
29895
|
+
}, {
|
|
29896
|
+
"py-1": size === "small" || size === "smallest",
|
|
29897
|
+
"py-2": size === "medium" || size === "large"
|
|
29898
|
+
}, {
|
|
29899
|
+
"px-2": size === "small" || size === "smallest",
|
|
29900
|
+
"px-4": size === "medium" || size === "large"
|
|
29901
|
+
}, "select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className);
|
|
29845
29902
|
$[40] = className;
|
|
29846
|
-
$[41] =
|
|
29847
|
-
$[42] =
|
|
29848
|
-
$[43] =
|
|
29849
|
-
$[44] =
|
|
29903
|
+
$[41] = disabled;
|
|
29904
|
+
$[42] = invisible;
|
|
29905
|
+
$[43] = size;
|
|
29906
|
+
$[44] = t20;
|
|
29907
|
+
$[45] = t21;
|
|
29908
|
+
$[46] = t22;
|
|
29909
|
+
$[47] = t23;
|
|
29910
|
+
$[48] = t24;
|
|
29850
29911
|
} else {
|
|
29851
|
-
|
|
29912
|
+
t24 = $[48];
|
|
29852
29913
|
}
|
|
29853
|
-
let
|
|
29854
|
-
if ($[
|
|
29855
|
-
|
|
29914
|
+
let t25;
|
|
29915
|
+
if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== size || $[57] !== toggleOption || $[58] !== useChips) {
|
|
29916
|
+
t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
|
|
29856
29917
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
|
|
29857
29918
|
renderValues && renderValues(selectedValues),
|
|
29858
29919
|
!renderValues && selectedValues.map((value_1) => {
|
|
29859
29920
|
const childrenProps = Children.map(children, _temp2).filter(Boolean);
|
|
29860
|
-
const option = childrenProps.find((o) => o.value === value_1);
|
|
29921
|
+
const option = childrenProps.find((o) => String(o.value) === String(value_1));
|
|
29861
29922
|
if (!useChips) {
|
|
29862
29923
|
return option?.children;
|
|
29863
29924
|
}
|
|
@@ -29867,7 +29928,7 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29867
29928
|
event_0.stopPropagation();
|
|
29868
29929
|
toggleOption(value_1);
|
|
29869
29930
|
} })
|
|
29870
|
-
] }, value_1);
|
|
29931
|
+
] }, String(value_1));
|
|
29871
29932
|
})
|
|
29872
29933
|
] }),
|
|
29873
29934
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -29875,185 +29936,186 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
|
29875
29936
|
event_1.stopPropagation();
|
|
29876
29937
|
handleClear();
|
|
29877
29938
|
} }),
|
|
29878
|
-
/* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29939
|
+
/* @__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" : "") }) })
|
|
29879
29940
|
] })
|
|
29880
29941
|
] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full mx-auto", children: [
|
|
29881
29942
|
/* @__PURE__ */ jsx("span", { className: "text-sm", children: placeholder }),
|
|
29882
|
-
/* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29943
|
+
/* @__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" : "") }) })
|
|
29883
29944
|
] });
|
|
29884
|
-
$[
|
|
29885
|
-
$[
|
|
29886
|
-
$[
|
|
29887
|
-
$[
|
|
29888
|
-
$[
|
|
29889
|
-
$[
|
|
29890
|
-
$[
|
|
29891
|
-
$[
|
|
29892
|
-
$[
|
|
29893
|
-
$[
|
|
29894
|
-
|
|
29895
|
-
|
|
29896
|
-
|
|
29897
|
-
let t24;
|
|
29898
|
-
if ($[55] !== handleTogglePopover || $[56] !== ref || $[57] !== t22 || $[58] !== t23) {
|
|
29899
|
-
t24 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t22, children: t23 }) });
|
|
29900
|
-
$[55] = handleTogglePopover;
|
|
29901
|
-
$[56] = ref;
|
|
29902
|
-
$[57] = t22;
|
|
29903
|
-
$[58] = t23;
|
|
29904
|
-
$[59] = t24;
|
|
29905
|
-
} else {
|
|
29906
|
-
t24 = $[59];
|
|
29907
|
-
}
|
|
29908
|
-
let t25;
|
|
29909
|
-
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29910
|
-
t25 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29911
|
-
$[60] = t25;
|
|
29912
|
-
} else {
|
|
29913
|
-
t25 = $[60];
|
|
29945
|
+
$[49] = children;
|
|
29946
|
+
$[50] = handleClear;
|
|
29947
|
+
$[51] = includeClear;
|
|
29948
|
+
$[52] = isPopoverOpen;
|
|
29949
|
+
$[53] = placeholder;
|
|
29950
|
+
$[54] = renderValues;
|
|
29951
|
+
$[55] = selectedValues;
|
|
29952
|
+
$[56] = size;
|
|
29953
|
+
$[57] = toggleOption;
|
|
29954
|
+
$[58] = useChips;
|
|
29955
|
+
$[59] = t25;
|
|
29956
|
+
} else {
|
|
29957
|
+
t25 = $[59];
|
|
29914
29958
|
}
|
|
29915
29959
|
let t26;
|
|
29916
|
-
if ($[61] !==
|
|
29917
|
-
t26 = (
|
|
29918
|
-
$[
|
|
29919
|
-
$[
|
|
29960
|
+
if ($[60] !== handleTogglePopover || $[61] !== ref || $[62] !== t24 || $[63] !== t25) {
|
|
29961
|
+
t26 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
|
|
29962
|
+
$[60] = handleTogglePopover;
|
|
29963
|
+
$[61] = ref;
|
|
29964
|
+
$[62] = t24;
|
|
29965
|
+
$[63] = t25;
|
|
29966
|
+
$[64] = t26;
|
|
29920
29967
|
} else {
|
|
29921
|
-
t26 = $[
|
|
29968
|
+
t26 = $[64];
|
|
29922
29969
|
}
|
|
29923
29970
|
let t27;
|
|
29924
|
-
if ($[
|
|
29925
|
-
t27 = cls(
|
|
29926
|
-
$[
|
|
29971
|
+
if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29972
|
+
t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29973
|
+
$[65] = t27;
|
|
29927
29974
|
} else {
|
|
29928
|
-
t27 = $[
|
|
29975
|
+
t27 = $[65];
|
|
29929
29976
|
}
|
|
29930
29977
|
let t28;
|
|
29931
|
-
if ($[
|
|
29932
|
-
t28 =
|
|
29933
|
-
$[
|
|
29934
|
-
$[
|
|
29978
|
+
if ($[66] !== onPopoverOpenChange) {
|
|
29979
|
+
t28 = () => onPopoverOpenChange(false);
|
|
29980
|
+
$[66] = onPopoverOpenChange;
|
|
29981
|
+
$[67] = t28;
|
|
29935
29982
|
} else {
|
|
29936
|
-
t28 = $[
|
|
29983
|
+
t28 = $[67];
|
|
29937
29984
|
}
|
|
29938
29985
|
let t29;
|
|
29939
|
-
if ($[
|
|
29940
|
-
t29 =
|
|
29941
|
-
$[66] = handleClear;
|
|
29942
|
-
$[67] = selectedValues.length;
|
|
29986
|
+
if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29987
|
+
t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
|
|
29943
29988
|
$[68] = t29;
|
|
29944
29989
|
} else {
|
|
29945
29990
|
t29 = $[68];
|
|
29946
29991
|
}
|
|
29947
29992
|
let t30;
|
|
29948
|
-
if ($[69] !==
|
|
29949
|
-
t30 = /* @__PURE__ */
|
|
29950
|
-
|
|
29951
|
-
|
|
29952
|
-
] });
|
|
29953
|
-
$[69] = t28;
|
|
29954
|
-
$[70] = t29;
|
|
29955
|
-
$[71] = t30;
|
|
29993
|
+
if ($[69] !== handleInputKeyDown) {
|
|
29994
|
+
t30 = /* @__PURE__ */ jsx(Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
|
|
29995
|
+
$[69] = handleInputKeyDown;
|
|
29996
|
+
$[70] = t30;
|
|
29956
29997
|
} else {
|
|
29957
|
-
t30 = $[
|
|
29998
|
+
t30 = $[70];
|
|
29958
29999
|
}
|
|
29959
30000
|
let t31;
|
|
29960
|
-
if ($[72]
|
|
29961
|
-
t31 = /* @__PURE__ */ jsx(
|
|
29962
|
-
$[
|
|
30001
|
+
if ($[71] !== handleClear || $[72] !== selectedValues.length) {
|
|
30002
|
+
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" });
|
|
30003
|
+
$[71] = handleClear;
|
|
30004
|
+
$[72] = selectedValues.length;
|
|
30005
|
+
$[73] = t31;
|
|
29963
30006
|
} else {
|
|
29964
|
-
t31 = $[
|
|
30007
|
+
t31 = $[73];
|
|
29965
30008
|
}
|
|
29966
30009
|
let t32;
|
|
29967
|
-
if ($[
|
|
29968
|
-
t32 = /* @__PURE__ */
|
|
29969
|
-
|
|
30010
|
+
if ($[74] !== t30 || $[75] !== t31) {
|
|
30011
|
+
t32 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center", children: [
|
|
30012
|
+
t30,
|
|
30013
|
+
t31
|
|
30014
|
+
] });
|
|
30015
|
+
$[74] = t30;
|
|
30016
|
+
$[75] = t31;
|
|
30017
|
+
$[76] = t32;
|
|
29970
30018
|
} else {
|
|
29971
|
-
t32 = $[
|
|
30019
|
+
t32 = $[76];
|
|
29972
30020
|
}
|
|
29973
30021
|
let t33;
|
|
29974
|
-
if ($[
|
|
29975
|
-
t33 =
|
|
30022
|
+
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30023
|
+
t33 = /* @__PURE__ */ jsx(Separator, { orientation: "horizontal", className: "my-0" });
|
|
30024
|
+
$[77] = t33;
|
|
30025
|
+
} else {
|
|
30026
|
+
t33 = $[77];
|
|
30027
|
+
}
|
|
30028
|
+
let t34;
|
|
30029
|
+
if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30030
|
+
t34 = /* @__PURE__ */ jsx(Command.Empty, { className: "px-4 py-2", children: "No results found." });
|
|
30031
|
+
$[78] = t34;
|
|
30032
|
+
} else {
|
|
30033
|
+
t34 = $[78];
|
|
30034
|
+
}
|
|
30035
|
+
let t35;
|
|
30036
|
+
if ($[79] !== allValues.length || $[80] !== includeSelectAll || $[81] !== selectedValues.length || $[82] !== toggleAll) {
|
|
30037
|
+
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: [
|
|
29976
30038
|
/* @__PURE__ */ jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
|
|
29977
30039
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
|
|
29978
30040
|
] }, "all");
|
|
29979
|
-
$[
|
|
29980
|
-
$[
|
|
29981
|
-
$[
|
|
29982
|
-
$[
|
|
29983
|
-
$[
|
|
30041
|
+
$[79] = allValues.length;
|
|
30042
|
+
$[80] = includeSelectAll;
|
|
30043
|
+
$[81] = selectedValues.length;
|
|
30044
|
+
$[82] = toggleAll;
|
|
30045
|
+
$[83] = t35;
|
|
29984
30046
|
} else {
|
|
29985
|
-
|
|
30047
|
+
t35 = $[83];
|
|
29986
30048
|
}
|
|
29987
|
-
let
|
|
29988
|
-
if ($[
|
|
29989
|
-
|
|
29990
|
-
|
|
30049
|
+
let t36;
|
|
30050
|
+
if ($[84] !== children || $[85] !== t35) {
|
|
30051
|
+
t36 = /* @__PURE__ */ jsxs(Command.List, { children: [
|
|
30052
|
+
t34,
|
|
29991
30053
|
/* @__PURE__ */ jsxs(Command.Group, { children: [
|
|
29992
|
-
|
|
30054
|
+
t35,
|
|
29993
30055
|
children
|
|
29994
30056
|
] })
|
|
29995
30057
|
] });
|
|
29996
|
-
$[
|
|
29997
|
-
$[
|
|
29998
|
-
$[
|
|
30058
|
+
$[84] = children;
|
|
30059
|
+
$[85] = t35;
|
|
30060
|
+
$[86] = t36;
|
|
29999
30061
|
} else {
|
|
30000
|
-
|
|
30062
|
+
t36 = $[86];
|
|
30001
30063
|
}
|
|
30002
|
-
let
|
|
30003
|
-
if ($[
|
|
30004
|
-
|
|
30005
|
-
|
|
30006
|
-
|
|
30007
|
-
|
|
30064
|
+
let t37;
|
|
30065
|
+
if ($[87] !== t32 || $[88] !== t36) {
|
|
30066
|
+
t37 = /* @__PURE__ */ jsxs(Command, { children: [
|
|
30067
|
+
t32,
|
|
30068
|
+
t33,
|
|
30069
|
+
t36
|
|
30008
30070
|
] });
|
|
30009
|
-
$[
|
|
30010
|
-
$[
|
|
30011
|
-
$[
|
|
30071
|
+
$[87] = t32;
|
|
30072
|
+
$[88] = t36;
|
|
30073
|
+
$[89] = t37;
|
|
30012
30074
|
} else {
|
|
30013
|
-
|
|
30075
|
+
t37 = $[89];
|
|
30014
30076
|
}
|
|
30015
|
-
let
|
|
30016
|
-
if ($[
|
|
30017
|
-
|
|
30018
|
-
$[
|
|
30019
|
-
$[
|
|
30020
|
-
$[
|
|
30077
|
+
let t38;
|
|
30078
|
+
if ($[90] !== t28 || $[91] !== t37) {
|
|
30079
|
+
t38 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
|
|
30080
|
+
$[90] = t28;
|
|
30081
|
+
$[91] = t37;
|
|
30082
|
+
$[92] = t38;
|
|
30021
30083
|
} else {
|
|
30022
|
-
|
|
30084
|
+
t38 = $[92];
|
|
30023
30085
|
}
|
|
30024
|
-
let
|
|
30025
|
-
if ($[
|
|
30026
|
-
|
|
30027
|
-
|
|
30028
|
-
|
|
30086
|
+
let t39;
|
|
30087
|
+
if ($[93] !== isPopoverOpen || $[94] !== modalPopover || $[95] !== onPopoverOpenChange || $[96] !== t26 || $[97] !== t38) {
|
|
30088
|
+
t39 = /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
|
|
30089
|
+
t26,
|
|
30090
|
+
t38
|
|
30029
30091
|
] });
|
|
30030
|
-
$[
|
|
30031
|
-
$[
|
|
30032
|
-
$[
|
|
30033
|
-
$[
|
|
30034
|
-
$[
|
|
30035
|
-
$[
|
|
30092
|
+
$[93] = isPopoverOpen;
|
|
30093
|
+
$[94] = modalPopover;
|
|
30094
|
+
$[95] = onPopoverOpenChange;
|
|
30095
|
+
$[96] = t26;
|
|
30096
|
+
$[97] = t38;
|
|
30097
|
+
$[98] = t39;
|
|
30036
30098
|
} else {
|
|
30037
|
-
|
|
30099
|
+
t39 = $[98];
|
|
30038
30100
|
}
|
|
30039
|
-
let
|
|
30040
|
-
if ($[
|
|
30041
|
-
|
|
30042
|
-
|
|
30043
|
-
|
|
30101
|
+
let t40;
|
|
30102
|
+
if ($[99] !== t18 || $[100] !== t19 || $[101] !== t39) {
|
|
30103
|
+
t40 = /* @__PURE__ */ jsxs(MultiSelectContext.Provider, { value: t18, children: [
|
|
30104
|
+
t19,
|
|
30105
|
+
t39
|
|
30044
30106
|
] });
|
|
30045
|
-
$[
|
|
30046
|
-
$[
|
|
30047
|
-
$[
|
|
30048
|
-
$[
|
|
30107
|
+
$[99] = t18;
|
|
30108
|
+
$[100] = t19;
|
|
30109
|
+
$[101] = t39;
|
|
30110
|
+
$[102] = t40;
|
|
30049
30111
|
} else {
|
|
30050
|
-
|
|
30112
|
+
t40 = $[102];
|
|
30051
30113
|
}
|
|
30052
|
-
return
|
|
30114
|
+
return t40;
|
|
30053
30115
|
});
|
|
30054
30116
|
MultiSelect.displayName = "MultiSelect";
|
|
30055
30117
|
function MultiSelectItem(t0) {
|
|
30056
|
-
const $ = c(
|
|
30118
|
+
const $ = c(20);
|
|
30057
30119
|
const {
|
|
30058
30120
|
children,
|
|
30059
30121
|
value,
|
|
@@ -30077,7 +30139,15 @@ function MultiSelectItem(t0) {
|
|
|
30077
30139
|
}
|
|
30078
30140
|
let t2;
|
|
30079
30141
|
if ($[2] !== t1 || $[3] !== value) {
|
|
30080
|
-
|
|
30142
|
+
let t32;
|
|
30143
|
+
if ($[5] !== value) {
|
|
30144
|
+
t32 = (v) => String(v) === String(value);
|
|
30145
|
+
$[5] = value;
|
|
30146
|
+
$[6] = t32;
|
|
30147
|
+
} else {
|
|
30148
|
+
t32 = $[6];
|
|
30149
|
+
}
|
|
30150
|
+
t2 = t1.some(t32);
|
|
30081
30151
|
$[2] = t1;
|
|
30082
30152
|
$[3] = value;
|
|
30083
30153
|
$[4] = t2;
|
|
@@ -30086,47 +30156,47 @@ function MultiSelectItem(t0) {
|
|
|
30086
30156
|
}
|
|
30087
30157
|
const isSelected = t2;
|
|
30088
30158
|
let t3;
|
|
30089
|
-
if ($[
|
|
30159
|
+
if ($[7] !== onItemClick || $[8] !== value) {
|
|
30090
30160
|
t3 = (_) => {
|
|
30091
30161
|
onItemClick(value);
|
|
30092
30162
|
};
|
|
30093
|
-
$[
|
|
30094
|
-
$[
|
|
30095
|
-
$[
|
|
30163
|
+
$[7] = onItemClick;
|
|
30164
|
+
$[8] = value;
|
|
30165
|
+
$[9] = t3;
|
|
30096
30166
|
} else {
|
|
30097
|
-
t3 = $[
|
|
30167
|
+
t3 = $[9];
|
|
30098
30168
|
}
|
|
30099
30169
|
const t4 = isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "";
|
|
30100
30170
|
let t5;
|
|
30101
|
-
if ($[
|
|
30171
|
+
if ($[10] !== className || $[11] !== t4) {
|
|
30102
30172
|
t5 = cls("flex flex-row items-center gap-1.5", t4, "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", className);
|
|
30103
|
-
$[
|
|
30104
|
-
$[
|
|
30105
|
-
$[
|
|
30173
|
+
$[10] = className;
|
|
30174
|
+
$[11] = t4;
|
|
30175
|
+
$[12] = t5;
|
|
30106
30176
|
} else {
|
|
30107
|
-
t5 = $[
|
|
30177
|
+
t5 = $[12];
|
|
30108
30178
|
}
|
|
30109
30179
|
let t6;
|
|
30110
|
-
if ($[
|
|
30180
|
+
if ($[13] !== isSelected) {
|
|
30111
30181
|
t6 = /* @__PURE__ */ jsx(InnerCheckBox, { checked: isSelected });
|
|
30112
|
-
$[
|
|
30113
|
-
$[
|
|
30182
|
+
$[13] = isSelected;
|
|
30183
|
+
$[14] = t6;
|
|
30114
30184
|
} else {
|
|
30115
|
-
t6 = $[
|
|
30185
|
+
t6 = $[14];
|
|
30116
30186
|
}
|
|
30117
30187
|
let t7;
|
|
30118
|
-
if ($[
|
|
30188
|
+
if ($[15] !== children || $[16] !== t3 || $[17] !== t5 || $[18] !== t6) {
|
|
30119
30189
|
t7 = /* @__PURE__ */ jsxs(Command.Item, { onMouseDown: _temp3, onSelect: t3, className: t5, children: [
|
|
30120
30190
|
t6,
|
|
30121
30191
|
children
|
|
30122
30192
|
] });
|
|
30123
|
-
$[
|
|
30124
|
-
$[
|
|
30125
|
-
$[
|
|
30126
|
-
$[
|
|
30127
|
-
$[
|
|
30193
|
+
$[15] = children;
|
|
30194
|
+
$[16] = t3;
|
|
30195
|
+
$[17] = t5;
|
|
30196
|
+
$[18] = t6;
|
|
30197
|
+
$[19] = t7;
|
|
30128
30198
|
} else {
|
|
30129
|
-
t7 = $[
|
|
30199
|
+
t7 = $[19];
|
|
30130
30200
|
}
|
|
30131
30201
|
return t7;
|
|
30132
30202
|
}
|
|
@@ -30481,6 +30551,7 @@ const Select = forwardRef(({
|
|
|
30481
30551
|
endAdornment,
|
|
30482
30552
|
invisible,
|
|
30483
30553
|
children,
|
|
30554
|
+
dataType = "string",
|
|
30484
30555
|
...props
|
|
30485
30556
|
}, ref) => {
|
|
30486
30557
|
const [openInternal, setOpenInternal] = useState(open ?? false);
|
|
@@ -30488,68 +30559,81 @@ const Select = forwardRef(({
|
|
|
30488
30559
|
setOpenInternal(open ?? false);
|
|
30489
30560
|
}, [open]);
|
|
30490
30561
|
const onValueChangeInternal = useCallback((newValue) => {
|
|
30491
|
-
|
|
30562
|
+
let typedValue = newValue;
|
|
30563
|
+
if (dataType === "boolean") {
|
|
30564
|
+
if (newValue === "true") typedValue = true;
|
|
30565
|
+
else if (newValue === "false") typedValue = false;
|
|
30566
|
+
} else if (dataType === "number") {
|
|
30567
|
+
if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
|
|
30568
|
+
}
|
|
30569
|
+
onValueChange?.(typedValue);
|
|
30492
30570
|
if (onChange) {
|
|
30493
30571
|
const event = {
|
|
30494
30572
|
target: {
|
|
30495
30573
|
name,
|
|
30496
|
-
value:
|
|
30574
|
+
value: typedValue
|
|
30497
30575
|
}
|
|
30498
30576
|
};
|
|
30499
30577
|
onChange(event);
|
|
30500
30578
|
}
|
|
30501
|
-
}, [onChange,
|
|
30579
|
+
}, [onChange, onValueChange, name]);
|
|
30502
30580
|
const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
|
|
30503
|
-
|
|
30581
|
+
const stringValue = value !== void 0 ? String(value) : void 0;
|
|
30582
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Root, { name, value: stringValue, open: openInternal, disabled, onValueChange: onValueChangeInternal, onOpenChange: (open_0) => {
|
|
30504
30583
|
onOpenChange?.(open_0);
|
|
30505
30584
|
setOpenInternal(open_0);
|
|
30506
30585
|
}, ...props, children: [
|
|
30507
30586
|
typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label,
|
|
30508
|
-
/* @__PURE__ */
|
|
30509
|
-
"min-h-[28px]": size === "
|
|
30587
|
+
/* @__PURE__ */ jsxs("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
|
|
30588
|
+
"min-h-[28px]": size === "smallest",
|
|
30589
|
+
"min-h-[32px]": size === "small",
|
|
30510
30590
|
"min-h-[42px]": size === "medium",
|
|
30511
30591
|
"min-h-[64px]": size === "large",
|
|
30512
30592
|
"w-fit": !fullWidth,
|
|
30513
30593
|
"w-full": fullWidth
|
|
30514
|
-
}), children:
|
|
30515
|
-
"
|
|
30516
|
-
|
|
30517
|
-
|
|
30518
|
-
|
|
30519
|
-
"
|
|
30520
|
-
|
|
30521
|
-
|
|
30522
|
-
"w-full": fullWidth,
|
|
30523
|
-
"w-fit": !fullWidth
|
|
30524
|
-
}, inputClassName), children: [
|
|
30525
|
-
/* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
|
30526
|
-
"min-h-[28px]": size === "small",
|
|
30594
|
+
}), children: [
|
|
30595
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cls("h-full", padding ? {
|
|
30596
|
+
"px-4": size === "large",
|
|
30597
|
+
"px-3": size === "medium",
|
|
30598
|
+
"px-2": size === "small" || size === "smallest"
|
|
30599
|
+
} : "", "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", {
|
|
30600
|
+
"min-h-[28px]": size === "smallest",
|
|
30601
|
+
"min-h-[32px]": size === "small",
|
|
30527
30602
|
"min-h-[42px]": size === "medium",
|
|
30528
|
-
"min-h-[64px]": size === "large"
|
|
30529
|
-
|
|
30530
|
-
|
|
30531
|
-
|
|
30532
|
-
|
|
30533
|
-
|
|
30534
|
-
|
|
30535
|
-
|
|
30536
|
-
|
|
30537
|
-
|
|
30538
|
-
|
|
30539
|
-
|
|
30540
|
-
|
|
30541
|
-
|
|
30542
|
-
|
|
30603
|
+
"min-h-[64px]": size === "large",
|
|
30604
|
+
"w-full": fullWidth,
|
|
30605
|
+
"w-fit": !fullWidth
|
|
30606
|
+
}, inputClassName), children: [
|
|
30607
|
+
/* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
|
30608
|
+
"min-h-[28px]": size === "smallest",
|
|
30609
|
+
"min-h-[32px]": size === "small",
|
|
30610
|
+
"min-h-[42px]": size === "medium",
|
|
30611
|
+
"min-h-[64px]": size === "large"
|
|
30612
|
+
}), children: /* @__PURE__ */ jsxs(SelectPrimitive.Value, { onClick: (e) => {
|
|
30613
|
+
e.preventDefault();
|
|
30614
|
+
e.stopPropagation();
|
|
30615
|
+
}, placeholder, className: "w-full", children: [
|
|
30616
|
+
hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
|
|
30617
|
+
hasValue && !renderValue && (() => {
|
|
30618
|
+
const childrenProps = Children.map(children, (child) => {
|
|
30619
|
+
if (React__default.isValidElement(child)) {
|
|
30620
|
+
return child.props;
|
|
30621
|
+
}
|
|
30622
|
+
}).filter(Boolean);
|
|
30623
|
+
const option = childrenProps.find((o) => String(o.value) === String(value));
|
|
30624
|
+
return option?.children;
|
|
30625
|
+
})()
|
|
30626
|
+
] }) }),
|
|
30627
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", open ? "rotate-180" : "", {
|
|
30628
|
+
"px-2": size === "large",
|
|
30629
|
+
"px-1": size === "medium" || size === "small"
|
|
30630
|
+
}) }) })
|
|
30543
30631
|
] }) }),
|
|
30544
|
-
endAdornment && /* @__PURE__ */ jsx("div", { className: cls("h-full flex items-center"), onClick: (e_0) => {
|
|
30632
|
+
endAdornment && /* @__PURE__ */ jsx("div", { className: cls("h-full flex items-center absolute right-0 pr-12"), onClick: (e_0) => {
|
|
30545
30633
|
e_0.preventDefault();
|
|
30546
30634
|
e_0.stopPropagation();
|
|
30547
|
-
}, children: endAdornment })
|
|
30548
|
-
|
|
30549
|
-
"px-2": size === "large",
|
|
30550
|
-
"px-1": size === "medium" || size === "small"
|
|
30551
|
-
}) }) })
|
|
30552
|
-
] }) }) }),
|
|
30635
|
+
}, children: endAdornment })
|
|
30636
|
+
] }),
|
|
30553
30637
|
/* @__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: {
|
|
30554
30638
|
maxHeight: "var(--radix-select-content-available-height)"
|
|
30555
30639
|
}, children }) }) })
|
|
@@ -30564,6 +30648,7 @@ function SelectItem(t0) {
|
|
|
30564
30648
|
disabled,
|
|
30565
30649
|
className
|
|
30566
30650
|
} = t0;
|
|
30651
|
+
const stringValue = String(value);
|
|
30567
30652
|
const t1 = disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer";
|
|
30568
30653
|
let t2;
|
|
30569
30654
|
if ($[0] !== className || $[1] !== t1) {
|
|
@@ -30590,15 +30675,15 @@ function SelectItem(t0) {
|
|
|
30590
30675
|
t4 = $[5];
|
|
30591
30676
|
}
|
|
30592
30677
|
let t5;
|
|
30593
|
-
if ($[6] !== disabled || $[7] !==
|
|
30594
|
-
t5 = /* @__PURE__ */ jsxs(SelectPrimitive.Item, { value, disabled, className: t2, children: [
|
|
30678
|
+
if ($[6] !== disabled || $[7] !== stringValue || $[8] !== t2 || $[9] !== t3) {
|
|
30679
|
+
t5 = /* @__PURE__ */ jsxs(SelectPrimitive.Item, { value: stringValue, disabled, className: t2, children: [
|
|
30595
30680
|
t3,
|
|
30596
30681
|
t4
|
|
30597
|
-
] },
|
|
30682
|
+
] }, stringValue);
|
|
30598
30683
|
$[6] = disabled;
|
|
30599
|
-
$[7] =
|
|
30600
|
-
$[8] =
|
|
30601
|
-
$[9] =
|
|
30684
|
+
$[7] = stringValue;
|
|
30685
|
+
$[8] = t2;
|
|
30686
|
+
$[9] = t3;
|
|
30602
30687
|
$[10] = t5;
|
|
30603
30688
|
} else {
|
|
30604
30689
|
t5 = $[10];
|
|
@@ -31274,7 +31359,8 @@ const TextField = forwardRef(({
|
|
|
31274
31359
|
type = "text",
|
|
31275
31360
|
multiline = false,
|
|
31276
31361
|
invisible,
|
|
31277
|
-
|
|
31362
|
+
maxRows,
|
|
31363
|
+
minRows,
|
|
31278
31364
|
disabled,
|
|
31279
31365
|
error,
|
|
31280
31366
|
endAdornment,
|
|
@@ -31302,18 +31388,24 @@ const TextField = forwardRef(({
|
|
|
31302
31388
|
element?.removeEventListener("wheel", handleWheel);
|
|
31303
31389
|
};
|
|
31304
31390
|
}, [inputRef, type]);
|
|
31305
|
-
const input = multiline ? /* @__PURE__ */ jsx(TextareaAutosize, { ...inputProps, ref: inputRef, placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus,
|
|
31391
|
+
const input = multiline ? /* @__PURE__ */ jsx(TextareaAutosize, { ...inputProps, ref: inputRef, placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus, minRows, maxRows, value: value ?? "", onChange, style: inputStyle, className: cls(invisible ? focusedInvisibleMixin : "", "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8", disabled && "outline-none opacity-50 text-surface-accent-600 dark:text-surface-accent-500", inputClassName) }) : /* @__PURE__ */ jsx("input", { ...inputProps, ref: inputRef, disabled, style: inputStyle, className: cls("w-full outline-none bg-transparent leading-normal px-3", "rounded-md", "focused:text-text-primary focused:dark:text-text-primary-dark", invisible ? focusedInvisibleMixin : "", disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, {
|
|
31392
|
+
"min-h-[28px]": size === "smallest",
|
|
31393
|
+
"min-h-[32px]": size === "small",
|
|
31394
|
+
"min-h-[42px]": size === "medium",
|
|
31395
|
+
"min-h-[64px]": size === "large"
|
|
31396
|
+
}, label ? size === "large" ? "pt-8 pb-2" : "pt-4 pb-2" : "py-2", endAdornment ? "pr-10" : "pr-3", disabled && "outline-none opacity-50 dark:opacity-50 text-surface-accent-800 dark:text-white", inputClassName), placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus, onFocus: () => setFocused(true), onBlur: () => setFocused(false), type, value: type === "number" && Number.isNaN(value) ? "" : value ?? "", onChange });
|
|
31306
31397
|
return /* @__PURE__ */ jsxs("div", { ref, className: cls("rounded-md relative max-w-full", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, error ? "border border-red-500 dark:border-red-600" : "", {
|
|
31307
|
-
"min-h-[
|
|
31308
|
-
"min-h-[
|
|
31309
|
-
"min-h-[
|
|
31398
|
+
"min-h-[28px]": size === "smallest",
|
|
31399
|
+
"min-h-[32px]": size === "small",
|
|
31400
|
+
"min-h-[42px]": size === "medium",
|
|
31401
|
+
"min-h-[64px]": size === "large"
|
|
31310
31402
|
}, className), style, children: [
|
|
31311
31403
|
label && /* @__PURE__ */ jsx(InputLabel, { className: cls("pointer-events-none absolute", size === "large" ? "top-1" : "top-[-1px]", !error ? focused ? "text-primary dark:text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-600", disabled ? "opacity-50" : ""), shrink: hasValue || focused, children: label }),
|
|
31312
31404
|
input,
|
|
31313
31405
|
endAdornment && /* @__PURE__ */ jsx("div", { className: cls("flex flex-row justify-center items-center absolute h-full right-0 top-0", {
|
|
31314
31406
|
"mr-4": size === "large",
|
|
31315
31407
|
"mr-3": size === "medium",
|
|
31316
|
-
"mr-2": size === "small"
|
|
31408
|
+
"mr-2": size === "small" || size === "smallest"
|
|
31317
31409
|
}), children: endAdornment })
|
|
31318
31410
|
] });
|
|
31319
31411
|
});
|