@firecms/ui 3.0.0-beta.12 → 3.0.0-beta.13
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/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 +10 -9
- package/dist/components/TextField.d.ts +20 -4
- package/dist/index.es.js +554 -483
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +554 -483
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -2
- 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/Menubar.tsx +1 -1
- package/src/components/MultiSelect.tsx +54 -51
- package/src/components/Select.tsx +70 -55
- package/src/components/TextField.tsx +26 -14
package/dist/index.umd.js
CHANGED
|
@@ -748,13 +748,13 @@
|
|
|
748
748
|
const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
749
749
|
value,
|
|
750
750
|
position = "end",
|
|
751
|
+
size = "medium",
|
|
751
752
|
invisible,
|
|
752
753
|
onValueChange,
|
|
753
754
|
error,
|
|
754
755
|
label,
|
|
755
756
|
autoFocus,
|
|
756
757
|
disabled,
|
|
757
|
-
size,
|
|
758
758
|
className,
|
|
759
759
|
fullWidth = true,
|
|
760
760
|
inputClassName,
|
|
@@ -768,7 +768,12 @@
|
|
|
768
768
|
React.useEffect(() => {
|
|
769
769
|
}, []);
|
|
770
770
|
const focus = document.activeElement === refInput?.current || document.activeElement === ref?.current;
|
|
771
|
-
return /* @__PURE__ */ jsxRuntime.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",
|
|
771
|
+
return /* @__PURE__ */ jsxRuntime.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", {
|
|
772
|
+
"min-h-[28px]": size === "smallest",
|
|
773
|
+
"min-h-[32px]": size === "small",
|
|
774
|
+
"min-h-[42px]": size === "medium",
|
|
775
|
+
"min-h-[64px]": size === "large"
|
|
776
|
+
}, size === "small" ? "pl-2" : "pl-4", size === "small" ? "pr-4" : "pr-6", position === "end" ? "flex-row-reverse" : "flex-row", fullWidth ? "w-full" : "", className), onClick: disabled ? void 0 : (e) => {
|
|
772
777
|
if (props.allowIndeterminate) {
|
|
773
778
|
if (value === null || value === void 0) onValueChange?.(true);
|
|
774
779
|
else if (value) onValueChange?.(false);
|
|
@@ -840,20 +845,20 @@
|
|
|
840
845
|
const t9 = variant === "filled" && color === "secondary" && !disabled;
|
|
841
846
|
const t10 = variant === "filled" && color === "error" && !disabled;
|
|
842
847
|
const t11 = variant === "filled" && color === "text" && !disabled;
|
|
843
|
-
const t12 = variant === "
|
|
844
|
-
const t13 = variant === "text" && color === "
|
|
845
|
-
const t14 = variant === "text" && color === "
|
|
846
|
-
const t15 = variant === "text" && color === "
|
|
847
|
-
const t16 = variant === "
|
|
848
|
-
const t17 = variant === "
|
|
849
|
-
const t18 = variant === "outlined" && color === "
|
|
850
|
-
const t19 = variant === "outlined" && color === "
|
|
851
|
-
const t20 = variant === "
|
|
852
|
-
const t21 = variant === "
|
|
853
|
-
const t22 = variant === "
|
|
848
|
+
const t12 = variant === "filled" && color === "neutral" && !disabled;
|
|
849
|
+
const t13 = variant === "text" && color === "primary" && !disabled;
|
|
850
|
+
const t14 = variant === "text" && color === "secondary" && !disabled;
|
|
851
|
+
const t15 = variant === "text" && color === "error" && !disabled;
|
|
852
|
+
const t16 = variant === "text" && color === "text" && !disabled;
|
|
853
|
+
const t17 = variant === "text" && color === "neutral" && !disabled;
|
|
854
|
+
const t18 = variant === "outlined" && color === "primary" && !disabled;
|
|
855
|
+
const t19 = variant === "outlined" && color === "secondary" && !disabled;
|
|
856
|
+
const t20 = variant === "outlined" && color === "error" && !disabled;
|
|
857
|
+
const t21 = variant === "outlined" && color === "text" && !disabled;
|
|
858
|
+
const t22 = variant === "outlined" && color === "neutral" && !disabled;
|
|
854
859
|
const t23 = variant === "text" && disabled;
|
|
855
860
|
const t24 = variant === "outlined" && disabled;
|
|
856
|
-
const t25 =
|
|
861
|
+
const t25 = variant === "filled" && disabled;
|
|
857
862
|
let t26;
|
|
858
863
|
let t27;
|
|
859
864
|
let t28;
|
|
@@ -869,17 +874,17 @@
|
|
|
869
874
|
"border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": t9,
|
|
870
875
|
"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,
|
|
871
876
|
"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,
|
|
872
|
-
"border border-transparent
|
|
873
|
-
"border border-transparent text-
|
|
874
|
-
"border border-transparent text-
|
|
875
|
-
"border border-transparent text-
|
|
876
|
-
"border border-primary text-primary hover:text-primary hover:bg-
|
|
877
|
-
"border border-
|
|
878
|
-
"border border-
|
|
879
|
-
"border border-
|
|
880
|
-
"border border-
|
|
881
|
-
"border border-
|
|
882
|
-
"border border-
|
|
877
|
+
"border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-800 dark:hover:bg-surface-accent-700 dark:text-text-primary-dark": t12,
|
|
878
|
+
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t13,
|
|
879
|
+
"border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t14,
|
|
880
|
+
"border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
|
|
881
|
+
"border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:dark:bg-surface-700": t16,
|
|
882
|
+
"border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 dark:text-text-primary-dark dark:hover:bg-surface-accent-700": t17,
|
|
883
|
+
"border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
|
|
884
|
+
"border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
|
|
885
|
+
"border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
|
|
886
|
+
"border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
|
|
887
|
+
"border border-surface-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,
|
|
883
888
|
"text-text-disabled dark:text-text-disabled-dark": disabled,
|
|
884
889
|
"border border-transparent opacity-50": t23,
|
|
885
890
|
"border border-surface-500 opacity-50": t24,
|
|
@@ -27695,7 +27700,7 @@
|
|
|
27695
27700
|
return t15;
|
|
27696
27701
|
}
|
|
27697
27702
|
const DateTimeField = (t0) => {
|
|
27698
|
-
const $ = reactCompilerRuntime.c(
|
|
27703
|
+
const $ = reactCompilerRuntime.c(57);
|
|
27699
27704
|
const {
|
|
27700
27705
|
value,
|
|
27701
27706
|
label,
|
|
@@ -27769,161 +27774,176 @@
|
|
|
27769
27774
|
}
|
|
27770
27775
|
const t6 = !invisible && fieldBackgroundMixin;
|
|
27771
27776
|
const t7 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
|
|
27772
|
-
const t8 = size === "
|
|
27773
|
-
const t9 = size === "
|
|
27774
|
-
|
|
27775
|
-
|
|
27776
|
-
|
|
27777
|
-
|
|
27778
|
-
|
|
27777
|
+
const t8 = size === "smallest";
|
|
27778
|
+
const t9 = size === "small";
|
|
27779
|
+
const t10 = size === "medium";
|
|
27780
|
+
const t11 = size === "large";
|
|
27781
|
+
let t12;
|
|
27782
|
+
if ($[6] !== className || $[7] !== t10 || $[8] !== t11 || $[9] !== t6 || $[10] !== t7 || $[11] !== t8 || $[12] !== t9) {
|
|
27783
|
+
t12 = cls("rounded-md relative max-w-full", t6, t7, {
|
|
27784
|
+
"min-h-[28px]": t8,
|
|
27785
|
+
"min-h-[32px]": t9,
|
|
27786
|
+
"min-h-[42px]": t10,
|
|
27787
|
+
"min-h-[64px]": t11
|
|
27779
27788
|
}, className);
|
|
27780
27789
|
$[6] = className;
|
|
27781
|
-
$[7] =
|
|
27782
|
-
$[8] =
|
|
27783
|
-
$[9] =
|
|
27784
|
-
$[10] =
|
|
27785
|
-
$[11] =
|
|
27790
|
+
$[7] = t10;
|
|
27791
|
+
$[8] = t11;
|
|
27792
|
+
$[9] = t6;
|
|
27793
|
+
$[10] = t7;
|
|
27794
|
+
$[11] = t8;
|
|
27795
|
+
$[12] = t9;
|
|
27796
|
+
$[13] = t12;
|
|
27786
27797
|
} else {
|
|
27787
|
-
|
|
27798
|
+
t12 = $[13];
|
|
27788
27799
|
}
|
|
27789
|
-
let
|
|
27790
|
-
if ($[
|
|
27791
|
-
|
|
27800
|
+
let t13;
|
|
27801
|
+
if ($[14] !== disabled) {
|
|
27802
|
+
t13 = () => {
|
|
27792
27803
|
if (!disabled) {
|
|
27793
27804
|
inputRef.current?.focus();
|
|
27794
27805
|
}
|
|
27795
27806
|
};
|
|
27796
|
-
$[12] = disabled;
|
|
27797
|
-
$[13] = t11;
|
|
27798
|
-
} else {
|
|
27799
|
-
t11 = $[13];
|
|
27800
|
-
}
|
|
27801
|
-
let t12;
|
|
27802
|
-
if ($[14] !== disabled || $[15] !== error || $[16] !== focused || $[17] !== label) {
|
|
27803
|
-
t12 = label && /* @__PURE__ */ jsxRuntime.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 });
|
|
27804
27807
|
$[14] = disabled;
|
|
27805
|
-
$[15] =
|
|
27806
|
-
$[16] = focused;
|
|
27807
|
-
$[17] = label;
|
|
27808
|
-
$[18] = t12;
|
|
27808
|
+
$[15] = t13;
|
|
27809
27809
|
} else {
|
|
27810
|
-
|
|
27810
|
+
t13 = $[15];
|
|
27811
27811
|
}
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
|
|
27815
|
-
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
|
|
27819
|
-
$[
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
|
|
27823
|
-
|
|
27824
|
-
|
|
27825
|
-
|
|
27826
|
-
|
|
27827
|
-
|
|
27828
|
-
|
|
27829
|
-
|
|
27830
|
-
|
|
27831
|
-
|
|
27832
|
-
|
|
27833
|
-
$[
|
|
27834
|
-
$[
|
|
27835
|
-
|
|
27836
|
-
|
|
27837
|
-
|
|
27812
|
+
let t14;
|
|
27813
|
+
if ($[16] !== disabled || $[17] !== error || $[18] !== focused || $[19] !== label) {
|
|
27814
|
+
t14 = label && /* @__PURE__ */ jsxRuntime.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 });
|
|
27815
|
+
$[16] = disabled;
|
|
27816
|
+
$[17] = error;
|
|
27817
|
+
$[18] = focused;
|
|
27818
|
+
$[19] = label;
|
|
27819
|
+
$[20] = t14;
|
|
27820
|
+
} else {
|
|
27821
|
+
t14 = $[20];
|
|
27822
|
+
}
|
|
27823
|
+
const t15 = mode === "date_time" ? "datetime-local" : "date";
|
|
27824
|
+
const t16 = valueAsInputValue(value ?? null, mode);
|
|
27825
|
+
let t17;
|
|
27826
|
+
let t18;
|
|
27827
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27828
|
+
t17 = () => setFocused(true);
|
|
27829
|
+
t18 = () => setFocused(false);
|
|
27830
|
+
$[21] = t17;
|
|
27831
|
+
$[22] = t18;
|
|
27832
|
+
} else {
|
|
27833
|
+
t17 = $[21];
|
|
27834
|
+
t18 = $[22];
|
|
27835
|
+
}
|
|
27836
|
+
const t19 = clearable ? "pr-14" : "pr-12";
|
|
27837
|
+
const t20 = size === "smallest";
|
|
27838
|
+
const t21 = size === "small";
|
|
27839
|
+
const t22 = size === "medium";
|
|
27840
|
+
const t23 = size === "large";
|
|
27841
|
+
let t24;
|
|
27842
|
+
if ($[23] !== disabled || $[24] !== inputClassName || $[25] !== label || $[26] !== t19 || $[27] !== t20 || $[28] !== t21 || $[29] !== t22 || $[30] !== t23) {
|
|
27843
|
+
t24 = cls("w-full outline-none bg-transparent leading-normal text-base px-3", t19, "rounded-md", {
|
|
27844
|
+
"min-h-[28px]": t20,
|
|
27845
|
+
"min-h-[32px]": t21,
|
|
27846
|
+
"min-h-[42px]": t22,
|
|
27847
|
+
"min-h-[64px]": t23
|
|
27848
|
+
}, 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");
|
|
27849
|
+
$[23] = disabled;
|
|
27850
|
+
$[24] = inputClassName;
|
|
27851
|
+
$[25] = label;
|
|
27852
|
+
$[26] = t19;
|
|
27853
|
+
$[27] = t20;
|
|
27854
|
+
$[28] = t21;
|
|
27855
|
+
$[29] = t22;
|
|
27856
|
+
$[30] = t23;
|
|
27857
|
+
$[31] = t24;
|
|
27838
27858
|
} else {
|
|
27839
|
-
|
|
27859
|
+
t24 = $[31];
|
|
27840
27860
|
}
|
|
27841
|
-
let
|
|
27842
|
-
if ($[
|
|
27843
|
-
|
|
27844
|
-
$[
|
|
27845
|
-
$[
|
|
27846
|
-
$[
|
|
27847
|
-
$[
|
|
27848
|
-
$[
|
|
27849
|
-
$[
|
|
27861
|
+
let t25;
|
|
27862
|
+
if ($[32] !== disabled || $[33] !== handleInputChange || $[34] !== t15 || $[35] !== t16 || $[36] !== t24) {
|
|
27863
|
+
t25 = /* @__PURE__ */ jsxRuntime.jsx("input", { ref: inputRef, type: t15, value: t16, onChange: handleInputChange, onFocus: t17, onBlur: t18, disabled, className: t24 });
|
|
27864
|
+
$[32] = disabled;
|
|
27865
|
+
$[33] = handleInputChange;
|
|
27866
|
+
$[34] = t15;
|
|
27867
|
+
$[35] = t16;
|
|
27868
|
+
$[36] = t24;
|
|
27869
|
+
$[37] = t25;
|
|
27850
27870
|
} else {
|
|
27851
|
-
|
|
27871
|
+
t25 = $[37];
|
|
27852
27872
|
}
|
|
27853
|
-
let
|
|
27854
|
-
if ($[
|
|
27855
|
-
|
|
27873
|
+
let t26;
|
|
27874
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27875
|
+
t26 = (e_2) => {
|
|
27856
27876
|
e_2.stopPropagation();
|
|
27857
27877
|
inputRef.current?.showPicker();
|
|
27858
27878
|
};
|
|
27859
|
-
$[
|
|
27879
|
+
$[38] = t26;
|
|
27860
27880
|
} else {
|
|
27861
|
-
|
|
27881
|
+
t26 = $[38];
|
|
27862
27882
|
}
|
|
27863
|
-
let
|
|
27864
|
-
if ($[
|
|
27865
|
-
|
|
27866
|
-
$[
|
|
27883
|
+
let t27;
|
|
27884
|
+
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27885
|
+
t27 = /* @__PURE__ */ jsxRuntime.jsx(IconButton, { onClick: t26, className: "absolute right-3 top-1/2 transform -translate-y-1/2 !text-surface-accent-500", children: /* @__PURE__ */ jsxRuntime.jsx(CalendarMonthIcon, { color: "disabled" }) });
|
|
27886
|
+
$[39] = t27;
|
|
27867
27887
|
} else {
|
|
27868
|
-
|
|
27888
|
+
t27 = $[39];
|
|
27869
27889
|
}
|
|
27870
|
-
let
|
|
27871
|
-
if ($[
|
|
27872
|
-
|
|
27873
|
-
$[
|
|
27874
|
-
$[
|
|
27875
|
-
$[
|
|
27876
|
-
$[
|
|
27890
|
+
let t28;
|
|
27891
|
+
if ($[40] !== clearable || $[41] !== handleClear || $[42] !== value) {
|
|
27892
|
+
t28 = clearable && value && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { onClick: handleClear, className: "absolute right-14 top-1/2 transform -translate-y-1/2 text-surface-accent-400 ", children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {}) });
|
|
27893
|
+
$[40] = clearable;
|
|
27894
|
+
$[41] = handleClear;
|
|
27895
|
+
$[42] = value;
|
|
27896
|
+
$[43] = t28;
|
|
27877
27897
|
} else {
|
|
27878
|
-
|
|
27898
|
+
t28 = $[43];
|
|
27879
27899
|
}
|
|
27880
|
-
let
|
|
27881
|
-
if ($[
|
|
27882
|
-
|
|
27883
|
-
|
|
27884
|
-
|
|
27885
|
-
|
|
27886
|
-
|
|
27900
|
+
let t29;
|
|
27901
|
+
if ($[44] !== style || $[45] !== t12 || $[46] !== t13 || $[47] !== t14 || $[48] !== t25 || $[49] !== t28) {
|
|
27902
|
+
t29 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t12, style, onClick: t13, children: [
|
|
27903
|
+
t14,
|
|
27904
|
+
t25,
|
|
27905
|
+
t27,
|
|
27906
|
+
t28
|
|
27887
27907
|
] });
|
|
27888
|
-
$[
|
|
27889
|
-
$[
|
|
27890
|
-
$[
|
|
27891
|
-
$[
|
|
27892
|
-
$[
|
|
27893
|
-
$[
|
|
27894
|
-
$[
|
|
27908
|
+
$[44] = style;
|
|
27909
|
+
$[45] = t12;
|
|
27910
|
+
$[46] = t13;
|
|
27911
|
+
$[47] = t14;
|
|
27912
|
+
$[48] = t25;
|
|
27913
|
+
$[49] = t28;
|
|
27914
|
+
$[50] = t29;
|
|
27895
27915
|
} else {
|
|
27896
|
-
|
|
27916
|
+
t29 = $[50];
|
|
27897
27917
|
}
|
|
27898
|
-
let
|
|
27899
|
-
if ($[
|
|
27900
|
-
|
|
27901
|
-
/* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, { size: "
|
|
27918
|
+
let t30;
|
|
27919
|
+
if ($[51] !== invalidValue || $[52] !== value) {
|
|
27920
|
+
t30 = invalidValue && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center m-2", children: [
|
|
27921
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, { size: "small", color: "error" }),
|
|
27902
27922
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pl-2", children: [
|
|
27903
27923
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", children: "Invalid date value for this field" }),
|
|
27904
27924
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", children: `The provided value is: ${JSON.stringify(value)}` })
|
|
27905
27925
|
] })
|
|
27906
27926
|
] });
|
|
27907
|
-
$[
|
|
27908
|
-
$[
|
|
27909
|
-
$[
|
|
27927
|
+
$[51] = invalidValue;
|
|
27928
|
+
$[52] = value;
|
|
27929
|
+
$[53] = t30;
|
|
27910
27930
|
} else {
|
|
27911
|
-
|
|
27931
|
+
t30 = $[53];
|
|
27912
27932
|
}
|
|
27913
|
-
let
|
|
27914
|
-
if ($[
|
|
27915
|
-
|
|
27933
|
+
let t31;
|
|
27934
|
+
if ($[54] !== t29 || $[55] !== t30) {
|
|
27935
|
+
t31 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
27916
27936
|
t5,
|
|
27917
|
-
|
|
27918
|
-
|
|
27937
|
+
t29,
|
|
27938
|
+
t30
|
|
27919
27939
|
] });
|
|
27920
|
-
$[
|
|
27921
|
-
$[
|
|
27922
|
-
$[
|
|
27940
|
+
$[54] = t29;
|
|
27941
|
+
$[55] = t30;
|
|
27942
|
+
$[56] = t31;
|
|
27923
27943
|
} else {
|
|
27924
|
-
|
|
27944
|
+
t31 = $[56];
|
|
27925
27945
|
}
|
|
27926
|
-
return
|
|
27946
|
+
return t31;
|
|
27927
27947
|
};
|
|
27928
27948
|
const inputStyles = `
|
|
27929
27949
|
/* Hide the default calendar icon in Chrome, Safari, Edge, Opera */
|
|
@@ -27972,12 +27992,13 @@
|
|
|
27972
27992
|
full: "max-w-full min-w-full w-full"
|
|
27973
27993
|
};
|
|
27974
27994
|
const Dialog = (t0) => {
|
|
27975
|
-
const $ = reactCompilerRuntime.c(
|
|
27995
|
+
const $ = reactCompilerRuntime.c(39);
|
|
27976
27996
|
const {
|
|
27977
27997
|
open,
|
|
27978
27998
|
onOpenChange,
|
|
27979
27999
|
children,
|
|
27980
28000
|
className,
|
|
28001
|
+
containerClassName,
|
|
27981
28002
|
fullWidth: t1,
|
|
27982
28003
|
fullHeight,
|
|
27983
28004
|
fullScreen,
|
|
@@ -28018,107 +28039,116 @@
|
|
|
28018
28039
|
}
|
|
28019
28040
|
React.useEffect(t5, t6);
|
|
28020
28041
|
const t7 = displayed || open;
|
|
28021
|
-
|
|
28022
|
-
|
|
28023
|
-
|
|
28024
|
-
|
|
28025
|
-
$[
|
|
28026
|
-
$[4] = t9;
|
|
28042
|
+
let t8;
|
|
28043
|
+
if ($[3] !== containerClassName) {
|
|
28044
|
+
t8 = cls("fixed inset-0 z-30", containerClassName);
|
|
28045
|
+
$[3] = containerClassName;
|
|
28046
|
+
$[4] = t8;
|
|
28027
28047
|
} else {
|
|
28028
|
-
|
|
28048
|
+
t8 = $[4];
|
|
28029
28049
|
}
|
|
28030
|
-
const
|
|
28031
|
-
let
|
|
28032
|
-
if ($[5] !==
|
|
28033
|
-
|
|
28034
|
-
|
|
28035
|
-
|
|
28036
|
-
$[5] = t10;
|
|
28037
|
-
$[6] = t11;
|
|
28050
|
+
const t9 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28051
|
+
let t10;
|
|
28052
|
+
if ($[5] !== t9) {
|
|
28053
|
+
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");
|
|
28054
|
+
$[5] = t9;
|
|
28055
|
+
$[6] = t10;
|
|
28038
28056
|
} else {
|
|
28039
|
-
|
|
28057
|
+
t10 = $[6];
|
|
28040
28058
|
}
|
|
28059
|
+
const t11 = displayed ? "auto" : "none";
|
|
28041
28060
|
let t12;
|
|
28042
|
-
if ($[7] !== t11
|
|
28043
|
-
t12 =
|
|
28061
|
+
if ($[7] !== t11) {
|
|
28062
|
+
t12 = {
|
|
28063
|
+
pointerEvents: t11
|
|
28064
|
+
};
|
|
28044
28065
|
$[7] = t11;
|
|
28045
|
-
$[8] =
|
|
28046
|
-
$[9] = t12;
|
|
28066
|
+
$[8] = t12;
|
|
28047
28067
|
} else {
|
|
28048
|
-
t12 = $[
|
|
28068
|
+
t12 = $[8];
|
|
28049
28069
|
}
|
|
28050
28070
|
let t13;
|
|
28051
|
-
if ($[10]
|
|
28052
|
-
t13 =
|
|
28053
|
-
$[
|
|
28054
|
-
|
|
28055
|
-
|
|
28056
|
-
}
|
|
28057
|
-
|
|
28058
|
-
|
|
28059
|
-
|
|
28060
|
-
|
|
28061
|
-
|
|
28062
|
-
const t19 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28063
|
-
let t20;
|
|
28064
|
-
if ($[11] !== className || $[12] !== t14 || $[13] !== t15 || $[14] !== t16 || $[15] !== t17 || $[16] !== t18 || $[17] !== t19) {
|
|
28065
|
-
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);
|
|
28066
|
-
$[11] = className;
|
|
28071
|
+
if ($[9] !== t10 || $[10] !== t12) {
|
|
28072
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, { className: t10, style: t12 });
|
|
28073
|
+
$[9] = t10;
|
|
28074
|
+
$[10] = t12;
|
|
28075
|
+
$[11] = t13;
|
|
28076
|
+
} else {
|
|
28077
|
+
t13 = $[11];
|
|
28078
|
+
}
|
|
28079
|
+
let t14;
|
|
28080
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28081
|
+
t14 = cls("h-full outline-none flex justify-center items-center z-40 opacity-100 transition-all duration-200 ease-in-out");
|
|
28067
28082
|
$[12] = t14;
|
|
28068
|
-
$[13] = t15;
|
|
28069
|
-
$[14] = t16;
|
|
28070
|
-
$[15] = t17;
|
|
28071
|
-
$[16] = t18;
|
|
28072
|
-
$[17] = t19;
|
|
28073
|
-
$[18] = t20;
|
|
28074
28083
|
} else {
|
|
28075
|
-
|
|
28084
|
+
t14 = $[12];
|
|
28076
28085
|
}
|
|
28086
|
+
const t15 = fullWidth && !fullScreen ? "w-11/12" : void 0;
|
|
28087
|
+
const t16 = fullHeight && !fullScreen ? "h-full" : void 0;
|
|
28088
|
+
const t17 = fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl";
|
|
28089
|
+
const t18 = scrollable && "overflow-y-auto";
|
|
28090
|
+
const t19 = displayed && open ? "opacity-100" : "opacity-0";
|
|
28091
|
+
const t20 = maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0;
|
|
28077
28092
|
let t21;
|
|
28078
|
-
if ($[
|
|
28079
|
-
t21 =
|
|
28080
|
-
$[
|
|
28081
|
-
$[
|
|
28082
|
-
$[
|
|
28093
|
+
if ($[13] !== className || $[14] !== t15 || $[15] !== t16 || $[16] !== t17 || $[17] !== t18 || $[18] !== t19 || $[19] !== t20) {
|
|
28094
|
+
t21 = cls(paperMixin, "z-30", "relative", "outline-none focus:outline-none", t15, t16, "text-surface-accent-900 dark:text-white", "justify-center items-center", t17, "ease-in-out duration-200", t18, t19, t20, className);
|
|
28095
|
+
$[13] = className;
|
|
28096
|
+
$[14] = t15;
|
|
28097
|
+
$[15] = t16;
|
|
28098
|
+
$[16] = t17;
|
|
28099
|
+
$[17] = t18;
|
|
28100
|
+
$[18] = t19;
|
|
28101
|
+
$[19] = t20;
|
|
28102
|
+
$[20] = t21;
|
|
28083
28103
|
} else {
|
|
28084
|
-
t21 = $[
|
|
28104
|
+
t21 = $[20];
|
|
28085
28105
|
}
|
|
28086
28106
|
let t22;
|
|
28087
|
-
if ($[
|
|
28088
|
-
t22 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
28089
|
-
$[
|
|
28090
|
-
$[
|
|
28091
|
-
$[
|
|
28092
|
-
$[25] = onPointerDownOutside;
|
|
28093
|
-
$[26] = t21;
|
|
28094
|
-
$[27] = t22;
|
|
28107
|
+
if ($[21] !== children || $[22] !== t21) {
|
|
28108
|
+
t22 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t21, children });
|
|
28109
|
+
$[21] = children;
|
|
28110
|
+
$[22] = t21;
|
|
28111
|
+
$[23] = t22;
|
|
28095
28112
|
} else {
|
|
28096
|
-
t22 = $[
|
|
28113
|
+
t22 = $[23];
|
|
28097
28114
|
}
|
|
28098
28115
|
let t23;
|
|
28099
|
-
if ($[
|
|
28100
|
-
t23 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.
|
|
28101
|
-
|
|
28102
|
-
|
|
28103
|
-
]
|
|
28104
|
-
$[
|
|
28105
|
-
$[
|
|
28106
|
-
$[
|
|
28116
|
+
if ($[24] !== onEscapeKeyDown || $[25] !== onInteractOutside || $[26] !== onOpenAutoFocus || $[27] !== onPointerDownOutside || $[28] !== t22) {
|
|
28117
|
+
t23 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Content, { onEscapeKeyDown, onOpenAutoFocus, onPointerDownOutside, onInteractOutside, className: t14, children: t22 });
|
|
28118
|
+
$[24] = onEscapeKeyDown;
|
|
28119
|
+
$[25] = onInteractOutside;
|
|
28120
|
+
$[26] = onOpenAutoFocus;
|
|
28121
|
+
$[27] = onPointerDownOutside;
|
|
28122
|
+
$[28] = t22;
|
|
28123
|
+
$[29] = t23;
|
|
28107
28124
|
} else {
|
|
28108
|
-
t23 = $[
|
|
28125
|
+
t23 = $[29];
|
|
28109
28126
|
}
|
|
28110
28127
|
let t24;
|
|
28111
|
-
if ($[
|
|
28112
|
-
t24 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.
|
|
28113
|
-
|
|
28114
|
-
|
|
28115
|
-
|
|
28116
|
-
$[
|
|
28117
|
-
$[
|
|
28128
|
+
if ($[30] !== t13 || $[31] !== t23 || $[32] !== t8) {
|
|
28129
|
+
t24 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t8, children: [
|
|
28130
|
+
t13,
|
|
28131
|
+
t23
|
|
28132
|
+
] }) });
|
|
28133
|
+
$[30] = t13;
|
|
28134
|
+
$[31] = t23;
|
|
28135
|
+
$[32] = t8;
|
|
28136
|
+
$[33] = t24;
|
|
28118
28137
|
} else {
|
|
28119
|
-
t24 = $[
|
|
28138
|
+
t24 = $[33];
|
|
28120
28139
|
}
|
|
28121
|
-
|
|
28140
|
+
let t25;
|
|
28141
|
+
if ($[34] !== modal || $[35] !== onOpenChange || $[36] !== t24 || $[37] !== t7) {
|
|
28142
|
+
t25 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { open: t7, modal, onOpenChange, children: t24 });
|
|
28143
|
+
$[34] = modal;
|
|
28144
|
+
$[35] = onOpenChange;
|
|
28145
|
+
$[36] = t24;
|
|
28146
|
+
$[37] = t7;
|
|
28147
|
+
$[38] = t25;
|
|
28148
|
+
} else {
|
|
28149
|
+
t25 = $[38];
|
|
28150
|
+
}
|
|
28151
|
+
return t25;
|
|
28122
28152
|
};
|
|
28123
28153
|
function _temp$2() {
|
|
28124
28154
|
}
|
|
@@ -28966,7 +28996,7 @@
|
|
|
28966
28996
|
} = t0;
|
|
28967
28997
|
let t1;
|
|
28968
28998
|
if ($[0] !== className) {
|
|
28969
|
-
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-
|
|
28999
|
+
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);
|
|
28970
29000
|
$[0] = className;
|
|
28971
29001
|
$[1] = t1;
|
|
28972
29002
|
} else {
|
|
@@ -29633,98 +29663,99 @@
|
|
|
29633
29663
|
}
|
|
29634
29664
|
const MultiSelectContext = React__namespace.createContext({});
|
|
29635
29665
|
const MultiSelect = React__namespace.forwardRef((t0, ref) => {
|
|
29636
|
-
const $ = reactCompilerRuntime.c(
|
|
29666
|
+
const $ = reactCompilerRuntime.c(102);
|
|
29637
29667
|
const {
|
|
29638
29668
|
value,
|
|
29639
|
-
size,
|
|
29669
|
+
size: t1,
|
|
29640
29670
|
label,
|
|
29641
29671
|
error,
|
|
29642
29672
|
onValueChange,
|
|
29643
29673
|
invisible,
|
|
29644
29674
|
disabled,
|
|
29645
29675
|
placeholder,
|
|
29646
|
-
modalPopover:
|
|
29647
|
-
includeClear:
|
|
29648
|
-
includeSelectAll:
|
|
29649
|
-
useChips:
|
|
29676
|
+
modalPopover: t2,
|
|
29677
|
+
includeClear: t3,
|
|
29678
|
+
includeSelectAll: t4,
|
|
29679
|
+
useChips: t5,
|
|
29650
29680
|
className,
|
|
29651
29681
|
children,
|
|
29652
29682
|
renderValues,
|
|
29653
29683
|
open,
|
|
29654
29684
|
onOpenChange
|
|
29655
29685
|
} = t0;
|
|
29656
|
-
const
|
|
29657
|
-
const
|
|
29658
|
-
const
|
|
29659
|
-
const
|
|
29686
|
+
const size = t1 === void 0 ? "large" : t1;
|
|
29687
|
+
const modalPopover = t2 === void 0 ? true : t2;
|
|
29688
|
+
const includeClear = t3 === void 0 ? true : t3;
|
|
29689
|
+
const includeSelectAll = t4 === void 0 ? true : t4;
|
|
29690
|
+
const useChips = t5 === void 0 ? true : t5;
|
|
29660
29691
|
const [isPopoverOpen, setIsPopoverOpen] = React__namespace.useState(open ?? false);
|
|
29661
|
-
let
|
|
29692
|
+
let t6;
|
|
29662
29693
|
if ($[0] !== value) {
|
|
29663
|
-
|
|
29694
|
+
t6 = value ?? [];
|
|
29664
29695
|
$[0] = value;
|
|
29665
|
-
$[1] =
|
|
29696
|
+
$[1] = t6;
|
|
29666
29697
|
} else {
|
|
29667
|
-
|
|
29698
|
+
t6 = $[1];
|
|
29668
29699
|
}
|
|
29669
|
-
const [selectedValues, setSelectedValues] = React__namespace.useState(
|
|
29670
|
-
let
|
|
29700
|
+
const [selectedValues, setSelectedValues] = React__namespace.useState(t6);
|
|
29701
|
+
let t7;
|
|
29671
29702
|
if ($[2] !== onOpenChange) {
|
|
29672
|
-
|
|
29703
|
+
t7 = (open_0) => {
|
|
29673
29704
|
setIsPopoverOpen(open_0);
|
|
29674
29705
|
onOpenChange?.(open_0);
|
|
29675
29706
|
};
|
|
29676
29707
|
$[2] = onOpenChange;
|
|
29677
|
-
$[3] =
|
|
29708
|
+
$[3] = t7;
|
|
29678
29709
|
} else {
|
|
29679
|
-
|
|
29710
|
+
t7 = $[3];
|
|
29680
29711
|
}
|
|
29681
|
-
const onPopoverOpenChange =
|
|
29682
|
-
let t7;
|
|
29712
|
+
const onPopoverOpenChange = t7;
|
|
29683
29713
|
let t8;
|
|
29714
|
+
let t9;
|
|
29684
29715
|
if ($[4] !== open) {
|
|
29685
|
-
|
|
29716
|
+
t8 = () => {
|
|
29686
29717
|
setIsPopoverOpen(open ?? false);
|
|
29687
29718
|
};
|
|
29688
|
-
|
|
29719
|
+
t9 = [open];
|
|
29689
29720
|
$[4] = open;
|
|
29690
|
-
$[5] =
|
|
29691
|
-
$[6] =
|
|
29721
|
+
$[5] = t8;
|
|
29722
|
+
$[6] = t9;
|
|
29692
29723
|
} else {
|
|
29693
|
-
|
|
29694
|
-
|
|
29724
|
+
t8 = $[5];
|
|
29725
|
+
t9 = $[6];
|
|
29695
29726
|
}
|
|
29696
|
-
React.useEffect(
|
|
29697
|
-
let
|
|
29727
|
+
React.useEffect(t8, t9);
|
|
29728
|
+
let t10;
|
|
29698
29729
|
if ($[7] !== children) {
|
|
29699
|
-
|
|
29730
|
+
t10 = children ? React.Children.map(children, _temp$1).filter(Boolean) : [];
|
|
29700
29731
|
$[7] = children;
|
|
29701
|
-
$[8] =
|
|
29732
|
+
$[8] = t10;
|
|
29702
29733
|
} else {
|
|
29703
|
-
|
|
29734
|
+
t10 = $[8];
|
|
29704
29735
|
}
|
|
29705
|
-
const allValues =
|
|
29706
|
-
let t10;
|
|
29736
|
+
const allValues = t10;
|
|
29707
29737
|
let t11;
|
|
29738
|
+
let t12;
|
|
29708
29739
|
if ($[9] !== value) {
|
|
29709
|
-
|
|
29740
|
+
t11 = () => {
|
|
29710
29741
|
setSelectedValues(value ?? []);
|
|
29711
29742
|
};
|
|
29712
|
-
|
|
29743
|
+
t12 = [value];
|
|
29713
29744
|
$[9] = value;
|
|
29714
|
-
$[10] =
|
|
29715
|
-
$[11] =
|
|
29745
|
+
$[10] = t11;
|
|
29746
|
+
$[11] = t12;
|
|
29716
29747
|
} else {
|
|
29717
|
-
|
|
29718
|
-
|
|
29748
|
+
t11 = $[10];
|
|
29749
|
+
t12 = $[11];
|
|
29719
29750
|
}
|
|
29720
|
-
React__namespace.useEffect(
|
|
29751
|
+
React__namespace.useEffect(t11, t12);
|
|
29721
29752
|
let onItemClick;
|
|
29722
29753
|
let updateValues;
|
|
29723
29754
|
if ($[12] !== onValueChange || $[13] !== selectedValues) {
|
|
29724
29755
|
onItemClick = function onItemClick2(newValue) {
|
|
29725
29756
|
let newSelectedValues;
|
|
29726
|
-
if (selectedValues.
|
|
29727
|
-
newSelectedValues = selectedValues.filter((v) => v !== newValue);
|
|
29757
|
+
if (selectedValues.some((v_0) => String(v_0) === String(newValue))) {
|
|
29758
|
+
newSelectedValues = selectedValues.filter((v) => String(v) !== String(newValue));
|
|
29728
29759
|
} else {
|
|
29729
29760
|
newSelectedValues = [...selectedValues, newValue];
|
|
29730
29761
|
}
|
|
@@ -29742,9 +29773,9 @@
|
|
|
29742
29773
|
onItemClick = $[14];
|
|
29743
29774
|
updateValues = $[15];
|
|
29744
29775
|
}
|
|
29745
|
-
let
|
|
29776
|
+
let t13;
|
|
29746
29777
|
if ($[16] !== onPopoverOpenChange || $[17] !== selectedValues || $[18] !== updateValues) {
|
|
29747
|
-
|
|
29778
|
+
t13 = (event) => {
|
|
29748
29779
|
if (event.key === "Enter") {
|
|
29749
29780
|
onPopoverOpenChange(true);
|
|
29750
29781
|
} else {
|
|
@@ -29758,50 +29789,50 @@
|
|
|
29758
29789
|
$[16] = onPopoverOpenChange;
|
|
29759
29790
|
$[17] = selectedValues;
|
|
29760
29791
|
$[18] = updateValues;
|
|
29761
|
-
$[19] =
|
|
29792
|
+
$[19] = t13;
|
|
29762
29793
|
} else {
|
|
29763
|
-
|
|
29794
|
+
t13 = $[19];
|
|
29764
29795
|
}
|
|
29765
|
-
const handleInputKeyDown =
|
|
29766
|
-
let
|
|
29796
|
+
const handleInputKeyDown = t13;
|
|
29797
|
+
let t14;
|
|
29767
29798
|
if ($[20] !== selectedValues || $[21] !== updateValues) {
|
|
29768
|
-
|
|
29769
|
-
const newSelectedValues_1 = selectedValues.
|
|
29799
|
+
t14 = (value_0) => {
|
|
29800
|
+
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];
|
|
29770
29801
|
updateValues(newSelectedValues_1);
|
|
29771
29802
|
};
|
|
29772
29803
|
$[20] = selectedValues;
|
|
29773
29804
|
$[21] = updateValues;
|
|
29774
|
-
$[22] =
|
|
29805
|
+
$[22] = t14;
|
|
29775
29806
|
} else {
|
|
29776
|
-
|
|
29807
|
+
t14 = $[22];
|
|
29777
29808
|
}
|
|
29778
|
-
const toggleOption =
|
|
29779
|
-
let
|
|
29809
|
+
const toggleOption = t14;
|
|
29810
|
+
let t15;
|
|
29780
29811
|
if ($[23] !== updateValues) {
|
|
29781
|
-
|
|
29812
|
+
t15 = () => {
|
|
29782
29813
|
updateValues([]);
|
|
29783
29814
|
};
|
|
29784
29815
|
$[23] = updateValues;
|
|
29785
|
-
$[24] =
|
|
29816
|
+
$[24] = t15;
|
|
29786
29817
|
} else {
|
|
29787
|
-
|
|
29818
|
+
t15 = $[24];
|
|
29788
29819
|
}
|
|
29789
|
-
const handleClear =
|
|
29790
|
-
let
|
|
29820
|
+
const handleClear = t15;
|
|
29821
|
+
let t16;
|
|
29791
29822
|
if ($[25] !== isPopoverOpen || $[26] !== onPopoverOpenChange) {
|
|
29792
|
-
|
|
29823
|
+
t16 = () => {
|
|
29793
29824
|
onPopoverOpenChange(!isPopoverOpen);
|
|
29794
29825
|
};
|
|
29795
29826
|
$[25] = isPopoverOpen;
|
|
29796
29827
|
$[26] = onPopoverOpenChange;
|
|
29797
|
-
$[27] =
|
|
29828
|
+
$[27] = t16;
|
|
29798
29829
|
} else {
|
|
29799
|
-
|
|
29830
|
+
t16 = $[27];
|
|
29800
29831
|
}
|
|
29801
|
-
const handleTogglePopover =
|
|
29802
|
-
let
|
|
29832
|
+
const handleTogglePopover = t16;
|
|
29833
|
+
let t17;
|
|
29803
29834
|
if ($[28] !== allValues || $[29] !== handleClear || $[30] !== onPopoverOpenChange || $[31] !== selectedValues.length || $[32] !== updateValues) {
|
|
29804
|
-
|
|
29835
|
+
t17 = () => {
|
|
29805
29836
|
if (selectedValues.length === allValues.length) {
|
|
29806
29837
|
handleClear();
|
|
29807
29838
|
} else {
|
|
@@ -29814,60 +29845,76 @@
|
|
|
29814
29845
|
$[30] = onPopoverOpenChange;
|
|
29815
29846
|
$[31] = selectedValues.length;
|
|
29816
29847
|
$[32] = updateValues;
|
|
29817
|
-
$[33] =
|
|
29848
|
+
$[33] = t17;
|
|
29818
29849
|
} else {
|
|
29819
|
-
|
|
29850
|
+
t17 = $[33];
|
|
29820
29851
|
}
|
|
29821
|
-
const toggleAll =
|
|
29852
|
+
const toggleAll = t17;
|
|
29822
29853
|
useInjectStyles("MultiSelect", `
|
|
29823
29854
|
[cmdk-group] {
|
|
29824
29855
|
max-height: 45vh;
|
|
29825
29856
|
overflow-y: auto;
|
|
29826
29857
|
// width: 400px;
|
|
29827
29858
|
} `);
|
|
29828
|
-
let
|
|
29859
|
+
let t18;
|
|
29829
29860
|
if ($[34] !== onItemClick || $[35] !== selectedValues) {
|
|
29830
|
-
|
|
29861
|
+
t18 = {
|
|
29831
29862
|
fieldValue: selectedValues,
|
|
29832
29863
|
onItemClick
|
|
29833
29864
|
};
|
|
29834
29865
|
$[34] = onItemClick;
|
|
29835
29866
|
$[35] = selectedValues;
|
|
29836
|
-
$[36] =
|
|
29867
|
+
$[36] = t18;
|
|
29837
29868
|
} else {
|
|
29838
|
-
|
|
29869
|
+
t18 = $[36];
|
|
29839
29870
|
}
|
|
29840
|
-
let
|
|
29871
|
+
let t19;
|
|
29841
29872
|
if ($[37] !== error || $[38] !== label) {
|
|
29842
|
-
|
|
29873
|
+
t19 = typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label;
|
|
29843
29874
|
$[37] = error;
|
|
29844
29875
|
$[38] = label;
|
|
29845
|
-
$[39] =
|
|
29876
|
+
$[39] = t19;
|
|
29846
29877
|
} else {
|
|
29847
|
-
|
|
29878
|
+
t19 = $[39];
|
|
29848
29879
|
}
|
|
29849
|
-
const
|
|
29850
|
-
const
|
|
29851
|
-
const
|
|
29852
|
-
|
|
29853
|
-
|
|
29854
|
-
|
|
29880
|
+
const t20 = size === "smallest";
|
|
29881
|
+
const t21 = size === "small";
|
|
29882
|
+
const t22 = size === "medium";
|
|
29883
|
+
const t23 = size === "large";
|
|
29884
|
+
let t24;
|
|
29885
|
+
if ($[40] !== className || $[41] !== disabled || $[42] !== invisible || $[43] !== size || $[44] !== t20 || $[45] !== t21 || $[46] !== t22 || $[47] !== t23) {
|
|
29886
|
+
t24 = cls({
|
|
29887
|
+
"min-h-[28px]": t20,
|
|
29888
|
+
"min-h-[32px]": t21,
|
|
29889
|
+
"min-h-[42px]": t22,
|
|
29890
|
+
"min-h-[64px]": t23
|
|
29891
|
+
}, {
|
|
29892
|
+
"py-1": size === "small" || size === "smallest",
|
|
29893
|
+
"py-2": size === "medium" || size === "large"
|
|
29894
|
+
}, {
|
|
29895
|
+
"px-2": size === "small" || size === "smallest",
|
|
29896
|
+
"px-4": size === "medium" || size === "large"
|
|
29897
|
+
}, "select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className);
|
|
29855
29898
|
$[40] = className;
|
|
29856
|
-
$[41] =
|
|
29857
|
-
$[42] =
|
|
29858
|
-
$[43] =
|
|
29859
|
-
$[44] =
|
|
29899
|
+
$[41] = disabled;
|
|
29900
|
+
$[42] = invisible;
|
|
29901
|
+
$[43] = size;
|
|
29902
|
+
$[44] = t20;
|
|
29903
|
+
$[45] = t21;
|
|
29904
|
+
$[46] = t22;
|
|
29905
|
+
$[47] = t23;
|
|
29906
|
+
$[48] = t24;
|
|
29860
29907
|
} else {
|
|
29861
|
-
|
|
29908
|
+
t24 = $[48];
|
|
29862
29909
|
}
|
|
29863
|
-
let
|
|
29864
|
-
if ($[
|
|
29865
|
-
|
|
29910
|
+
let t25;
|
|
29911
|
+
if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== toggleOption || $[57] !== useChips) {
|
|
29912
|
+
t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center w-full", children: [
|
|
29866
29913
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
|
|
29867
29914
|
renderValues && renderValues(selectedValues),
|
|
29868
29915
|
!renderValues && selectedValues.map((value_1) => {
|
|
29869
29916
|
const childrenProps = React.Children.map(children, _temp2).filter(Boolean);
|
|
29870
|
-
const option = childrenProps.find((o) => o.value === value_1);
|
|
29917
|
+
const option = childrenProps.find((o) => String(o.value) === String(value_1));
|
|
29871
29918
|
if (!useChips) {
|
|
29872
29919
|
return option?.children;
|
|
29873
29920
|
}
|
|
@@ -29877,7 +29924,7 @@
|
|
|
29877
29924
|
event_0.stopPropagation();
|
|
29878
29925
|
toggleOption(value_1);
|
|
29879
29926
|
} })
|
|
29880
|
-
] }, value_1);
|
|
29927
|
+
] }, String(value_1));
|
|
29881
29928
|
})
|
|
29882
29929
|
] }),
|
|
29883
29930
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -29891,179 +29938,179 @@
|
|
|
29891
29938
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: placeholder }),
|
|
29892
29939
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
|
29893
29940
|
] });
|
|
29894
|
-
$[
|
|
29895
|
-
$[
|
|
29896
|
-
$[
|
|
29897
|
-
$[
|
|
29898
|
-
$[
|
|
29899
|
-
$[
|
|
29900
|
-
$[
|
|
29901
|
-
$[
|
|
29902
|
-
$[
|
|
29903
|
-
$[
|
|
29904
|
-
} else {
|
|
29905
|
-
|
|
29906
|
-
}
|
|
29907
|
-
let t24;
|
|
29908
|
-
if ($[55] !== handleTogglePopover || $[56] !== ref || $[57] !== t22 || $[58] !== t23) {
|
|
29909
|
-
t24 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ref, onClick: handleTogglePopover, className: t22, children: t23 }) });
|
|
29910
|
-
$[55] = handleTogglePopover;
|
|
29911
|
-
$[56] = ref;
|
|
29912
|
-
$[57] = t22;
|
|
29913
|
-
$[58] = t23;
|
|
29914
|
-
$[59] = t24;
|
|
29915
|
-
} else {
|
|
29916
|
-
t24 = $[59];
|
|
29917
|
-
}
|
|
29918
|
-
let t25;
|
|
29919
|
-
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29920
|
-
t25 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29921
|
-
$[60] = t25;
|
|
29922
|
-
} else {
|
|
29923
|
-
t25 = $[60];
|
|
29941
|
+
$[49] = children;
|
|
29942
|
+
$[50] = handleClear;
|
|
29943
|
+
$[51] = includeClear;
|
|
29944
|
+
$[52] = isPopoverOpen;
|
|
29945
|
+
$[53] = placeholder;
|
|
29946
|
+
$[54] = renderValues;
|
|
29947
|
+
$[55] = selectedValues;
|
|
29948
|
+
$[56] = toggleOption;
|
|
29949
|
+
$[57] = useChips;
|
|
29950
|
+
$[58] = t25;
|
|
29951
|
+
} else {
|
|
29952
|
+
t25 = $[58];
|
|
29924
29953
|
}
|
|
29925
29954
|
let t26;
|
|
29926
|
-
if ($[61] !==
|
|
29927
|
-
t26 = (
|
|
29928
|
-
$[
|
|
29929
|
-
$[
|
|
29955
|
+
if ($[59] !== handleTogglePopover || $[60] !== ref || $[61] !== t24 || $[62] !== t25) {
|
|
29956
|
+
t26 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
|
|
29957
|
+
$[59] = handleTogglePopover;
|
|
29958
|
+
$[60] = ref;
|
|
29959
|
+
$[61] = t24;
|
|
29960
|
+
$[62] = t25;
|
|
29961
|
+
$[63] = t26;
|
|
29930
29962
|
} else {
|
|
29931
|
-
t26 = $[
|
|
29963
|
+
t26 = $[63];
|
|
29932
29964
|
}
|
|
29933
29965
|
let t27;
|
|
29934
|
-
if ($[
|
|
29935
|
-
t27 = cls(
|
|
29936
|
-
$[
|
|
29966
|
+
if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29967
|
+
t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
|
29968
|
+
$[64] = t27;
|
|
29937
29969
|
} else {
|
|
29938
|
-
t27 = $[
|
|
29970
|
+
t27 = $[64];
|
|
29939
29971
|
}
|
|
29940
29972
|
let t28;
|
|
29941
|
-
if ($[
|
|
29942
|
-
t28 =
|
|
29943
|
-
$[
|
|
29944
|
-
$[
|
|
29973
|
+
if ($[65] !== onPopoverOpenChange) {
|
|
29974
|
+
t28 = () => onPopoverOpenChange(false);
|
|
29975
|
+
$[65] = onPopoverOpenChange;
|
|
29976
|
+
$[66] = t28;
|
|
29945
29977
|
} else {
|
|
29946
|
-
t28 = $[
|
|
29978
|
+
t28 = $[66];
|
|
29947
29979
|
}
|
|
29948
29980
|
let t29;
|
|
29949
|
-
if ($[
|
|
29950
|
-
t29 =
|
|
29951
|
-
$[
|
|
29952
|
-
$[67] = selectedValues.length;
|
|
29953
|
-
$[68] = t29;
|
|
29981
|
+
if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29982
|
+
t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
|
|
29983
|
+
$[67] = t29;
|
|
29954
29984
|
} else {
|
|
29955
|
-
t29 = $[
|
|
29985
|
+
t29 = $[67];
|
|
29956
29986
|
}
|
|
29957
29987
|
let t30;
|
|
29958
|
-
if ($[
|
|
29959
|
-
t30 = /* @__PURE__ */ jsxRuntime.
|
|
29960
|
-
|
|
29961
|
-
|
|
29962
|
-
] });
|
|
29963
|
-
$[69] = t28;
|
|
29964
|
-
$[70] = t29;
|
|
29965
|
-
$[71] = t30;
|
|
29988
|
+
if ($[68] !== handleInputKeyDown) {
|
|
29989
|
+
t30 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
|
|
29990
|
+
$[68] = handleInputKeyDown;
|
|
29991
|
+
$[69] = t30;
|
|
29966
29992
|
} else {
|
|
29967
|
-
t30 = $[
|
|
29993
|
+
t30 = $[69];
|
|
29968
29994
|
}
|
|
29969
29995
|
let t31;
|
|
29970
|
-
if ($[
|
|
29971
|
-
t31 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
29996
|
+
if ($[70] !== handleClear || $[71] !== selectedValues.length) {
|
|
29997
|
+
t31 = selectedValues.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: handleClear, className: "text-sm justify-center cursor-pointer py-3 px-4 text-text-secondary dark:text-text-secondary-dark", children: "Clear" });
|
|
29998
|
+
$[70] = handleClear;
|
|
29999
|
+
$[71] = selectedValues.length;
|
|
29972
30000
|
$[72] = t31;
|
|
29973
30001
|
} else {
|
|
29974
30002
|
t31 = $[72];
|
|
29975
30003
|
}
|
|
29976
30004
|
let t32;
|
|
29977
|
-
if ($[73]
|
|
29978
|
-
t32 = /* @__PURE__ */ jsxRuntime.
|
|
29979
|
-
|
|
30005
|
+
if ($[73] !== t30 || $[74] !== t31) {
|
|
30006
|
+
t32 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
30007
|
+
t30,
|
|
30008
|
+
t31
|
|
30009
|
+
] });
|
|
30010
|
+
$[73] = t30;
|
|
30011
|
+
$[74] = t31;
|
|
30012
|
+
$[75] = t32;
|
|
29980
30013
|
} else {
|
|
29981
|
-
t32 = $[
|
|
30014
|
+
t32 = $[75];
|
|
29982
30015
|
}
|
|
29983
30016
|
let t33;
|
|
29984
|
-
if ($[
|
|
29985
|
-
t33 =
|
|
30017
|
+
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30018
|
+
t33 = /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "horizontal", className: "my-0" });
|
|
30019
|
+
$[76] = t33;
|
|
30020
|
+
} else {
|
|
30021
|
+
t33 = $[76];
|
|
30022
|
+
}
|
|
30023
|
+
let t34;
|
|
30024
|
+
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30025
|
+
t34 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { className: "px-4 py-2", children: "No results found." });
|
|
30026
|
+
$[77] = t34;
|
|
30027
|
+
} else {
|
|
30028
|
+
t34 = $[77];
|
|
30029
|
+
}
|
|
30030
|
+
let t35;
|
|
30031
|
+
if ($[78] !== allValues.length || $[79] !== includeSelectAll || $[80] !== selectedValues.length || $[81] !== toggleAll) {
|
|
30032
|
+
t35 = includeSelectAll && /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Item, { onSelect: toggleAll, className: cls("flex flex-row items-center gap-1.5", "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900"), children: [
|
|
29986
30033
|
/* @__PURE__ */ jsxRuntime.jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
|
|
29987
30034
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
|
|
29988
30035
|
] }, "all");
|
|
29989
|
-
$[
|
|
29990
|
-
$[
|
|
29991
|
-
$[
|
|
29992
|
-
$[
|
|
29993
|
-
$[
|
|
30036
|
+
$[78] = allValues.length;
|
|
30037
|
+
$[79] = includeSelectAll;
|
|
30038
|
+
$[80] = selectedValues.length;
|
|
30039
|
+
$[81] = toggleAll;
|
|
30040
|
+
$[82] = t35;
|
|
29994
30041
|
} else {
|
|
29995
|
-
|
|
30042
|
+
t35 = $[82];
|
|
29996
30043
|
}
|
|
29997
|
-
let
|
|
29998
|
-
if ($[
|
|
29999
|
-
|
|
30000
|
-
|
|
30044
|
+
let t36;
|
|
30045
|
+
if ($[83] !== children || $[84] !== t35) {
|
|
30046
|
+
t36 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
|
|
30047
|
+
t34,
|
|
30001
30048
|
/* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Group, { children: [
|
|
30002
|
-
|
|
30049
|
+
t35,
|
|
30003
30050
|
children
|
|
30004
30051
|
] })
|
|
30005
30052
|
] });
|
|
30006
|
-
$[
|
|
30007
|
-
$[80] = t33;
|
|
30008
|
-
$[81] = t34;
|
|
30009
|
-
} else {
|
|
30010
|
-
t34 = $[81];
|
|
30011
|
-
}
|
|
30012
|
-
let t35;
|
|
30013
|
-
if ($[82] !== t30 || $[83] !== t34) {
|
|
30014
|
-
t35 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
|
|
30015
|
-
t30,
|
|
30016
|
-
t31,
|
|
30017
|
-
t34
|
|
30018
|
-
] });
|
|
30019
|
-
$[82] = t30;
|
|
30020
|
-
$[83] = t34;
|
|
30053
|
+
$[83] = children;
|
|
30021
30054
|
$[84] = t35;
|
|
30055
|
+
$[85] = t36;
|
|
30022
30056
|
} else {
|
|
30023
|
-
|
|
30024
|
-
}
|
|
30025
|
-
let t36;
|
|
30026
|
-
if ($[85] !== t26 || $[86] !== t35) {
|
|
30027
|
-
t36 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { className: t25, align: "start", sideOffset: 8, onEscapeKeyDown: t26, children: t35 });
|
|
30028
|
-
$[85] = t26;
|
|
30029
|
-
$[86] = t35;
|
|
30030
|
-
$[87] = t36;
|
|
30031
|
-
} else {
|
|
30032
|
-
t36 = $[87];
|
|
30057
|
+
t36 = $[85];
|
|
30033
30058
|
}
|
|
30034
30059
|
let t37;
|
|
30035
|
-
if ($[
|
|
30036
|
-
t37 = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30037
|
-
|
|
30060
|
+
if ($[86] !== t32 || $[87] !== t36) {
|
|
30061
|
+
t37 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
|
|
30062
|
+
t32,
|
|
30063
|
+
t33,
|
|
30038
30064
|
t36
|
|
30039
30065
|
] });
|
|
30040
|
-
$[
|
|
30041
|
-
$[
|
|
30042
|
-
$[
|
|
30043
|
-
$[91] = t24;
|
|
30044
|
-
$[92] = t36;
|
|
30045
|
-
$[93] = t37;
|
|
30066
|
+
$[86] = t32;
|
|
30067
|
+
$[87] = t36;
|
|
30068
|
+
$[88] = t37;
|
|
30046
30069
|
} else {
|
|
30047
|
-
t37 = $[
|
|
30070
|
+
t37 = $[88];
|
|
30048
30071
|
}
|
|
30049
30072
|
let t38;
|
|
30050
|
-
if ($[
|
|
30051
|
-
t38 = /* @__PURE__ */ jsxRuntime.
|
|
30052
|
-
|
|
30053
|
-
|
|
30073
|
+
if ($[89] !== t28 || $[90] !== t37) {
|
|
30074
|
+
t38 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
|
|
30075
|
+
$[89] = t28;
|
|
30076
|
+
$[90] = t37;
|
|
30077
|
+
$[91] = t38;
|
|
30078
|
+
} else {
|
|
30079
|
+
t38 = $[91];
|
|
30080
|
+
}
|
|
30081
|
+
let t39;
|
|
30082
|
+
if ($[92] !== isPopoverOpen || $[93] !== modalPopover || $[94] !== onPopoverOpenChange || $[95] !== t26 || $[96] !== t38) {
|
|
30083
|
+
t39 = /* @__PURE__ */ jsxRuntime.jsxs(PopoverPrimitive__namespace.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
|
|
30084
|
+
t26,
|
|
30085
|
+
t38
|
|
30086
|
+
] });
|
|
30087
|
+
$[92] = isPopoverOpen;
|
|
30088
|
+
$[93] = modalPopover;
|
|
30089
|
+
$[94] = onPopoverOpenChange;
|
|
30090
|
+
$[95] = t26;
|
|
30091
|
+
$[96] = t38;
|
|
30092
|
+
$[97] = t39;
|
|
30093
|
+
} else {
|
|
30094
|
+
t39 = $[97];
|
|
30095
|
+
}
|
|
30096
|
+
let t40;
|
|
30097
|
+
if ($[98] !== t18 || $[99] !== t19 || $[100] !== t39) {
|
|
30098
|
+
t40 = /* @__PURE__ */ jsxRuntime.jsxs(MultiSelectContext.Provider, { value: t18, children: [
|
|
30099
|
+
t19,
|
|
30100
|
+
t39
|
|
30054
30101
|
] });
|
|
30055
|
-
$[
|
|
30056
|
-
$[
|
|
30057
|
-
$[
|
|
30058
|
-
$[
|
|
30102
|
+
$[98] = t18;
|
|
30103
|
+
$[99] = t19;
|
|
30104
|
+
$[100] = t39;
|
|
30105
|
+
$[101] = t40;
|
|
30059
30106
|
} else {
|
|
30060
|
-
|
|
30107
|
+
t40 = $[101];
|
|
30061
30108
|
}
|
|
30062
|
-
return
|
|
30109
|
+
return t40;
|
|
30063
30110
|
});
|
|
30064
30111
|
MultiSelect.displayName = "MultiSelect";
|
|
30065
30112
|
function MultiSelectItem(t0) {
|
|
30066
|
-
const $ = reactCompilerRuntime.c(
|
|
30113
|
+
const $ = reactCompilerRuntime.c(20);
|
|
30067
30114
|
const {
|
|
30068
30115
|
children,
|
|
30069
30116
|
value,
|
|
@@ -30087,7 +30134,15 @@
|
|
|
30087
30134
|
}
|
|
30088
30135
|
let t2;
|
|
30089
30136
|
if ($[2] !== t1 || $[3] !== value) {
|
|
30090
|
-
|
|
30137
|
+
let t32;
|
|
30138
|
+
if ($[5] !== value) {
|
|
30139
|
+
t32 = (v) => String(v) === String(value);
|
|
30140
|
+
$[5] = value;
|
|
30141
|
+
$[6] = t32;
|
|
30142
|
+
} else {
|
|
30143
|
+
t32 = $[6];
|
|
30144
|
+
}
|
|
30145
|
+
t2 = t1.some(t32);
|
|
30091
30146
|
$[2] = t1;
|
|
30092
30147
|
$[3] = value;
|
|
30093
30148
|
$[4] = t2;
|
|
@@ -30096,47 +30151,47 @@
|
|
|
30096
30151
|
}
|
|
30097
30152
|
const isSelected = t2;
|
|
30098
30153
|
let t3;
|
|
30099
|
-
if ($[
|
|
30154
|
+
if ($[7] !== onItemClick || $[8] !== value) {
|
|
30100
30155
|
t3 = (_) => {
|
|
30101
30156
|
onItemClick(value);
|
|
30102
30157
|
};
|
|
30103
|
-
$[
|
|
30104
|
-
$[
|
|
30105
|
-
$[
|
|
30158
|
+
$[7] = onItemClick;
|
|
30159
|
+
$[8] = value;
|
|
30160
|
+
$[9] = t3;
|
|
30106
30161
|
} else {
|
|
30107
|
-
t3 = $[
|
|
30162
|
+
t3 = $[9];
|
|
30108
30163
|
}
|
|
30109
30164
|
const t4 = isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "";
|
|
30110
30165
|
let t5;
|
|
30111
|
-
if ($[
|
|
30166
|
+
if ($[10] !== className || $[11] !== t4) {
|
|
30112
30167
|
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);
|
|
30113
|
-
$[
|
|
30114
|
-
$[
|
|
30115
|
-
$[
|
|
30168
|
+
$[10] = className;
|
|
30169
|
+
$[11] = t4;
|
|
30170
|
+
$[12] = t5;
|
|
30116
30171
|
} else {
|
|
30117
|
-
t5 = $[
|
|
30172
|
+
t5 = $[12];
|
|
30118
30173
|
}
|
|
30119
30174
|
let t6;
|
|
30120
|
-
if ($[
|
|
30175
|
+
if ($[13] !== isSelected) {
|
|
30121
30176
|
t6 = /* @__PURE__ */ jsxRuntime.jsx(InnerCheckBox, { checked: isSelected });
|
|
30122
|
-
$[
|
|
30123
|
-
$[
|
|
30177
|
+
$[13] = isSelected;
|
|
30178
|
+
$[14] = t6;
|
|
30124
30179
|
} else {
|
|
30125
|
-
t6 = $[
|
|
30180
|
+
t6 = $[14];
|
|
30126
30181
|
}
|
|
30127
30182
|
let t7;
|
|
30128
|
-
if ($[
|
|
30183
|
+
if ($[15] !== children || $[16] !== t3 || $[17] !== t5 || $[18] !== t6) {
|
|
30129
30184
|
t7 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Item, { onMouseDown: _temp3, onSelect: t3, className: t5, children: [
|
|
30130
30185
|
t6,
|
|
30131
30186
|
children
|
|
30132
30187
|
] });
|
|
30133
|
-
$[
|
|
30134
|
-
$[
|
|
30135
|
-
$[
|
|
30136
|
-
$[
|
|
30137
|
-
$[
|
|
30188
|
+
$[15] = children;
|
|
30189
|
+
$[16] = t3;
|
|
30190
|
+
$[17] = t5;
|
|
30191
|
+
$[18] = t6;
|
|
30192
|
+
$[19] = t7;
|
|
30138
30193
|
} else {
|
|
30139
|
-
t7 = $[
|
|
30194
|
+
t7 = $[19];
|
|
30140
30195
|
}
|
|
30141
30196
|
return t7;
|
|
30142
30197
|
}
|
|
@@ -30498,25 +30553,31 @@
|
|
|
30498
30553
|
setOpenInternal(open ?? false);
|
|
30499
30554
|
}, [open]);
|
|
30500
30555
|
const onValueChangeInternal = React.useCallback((newValue) => {
|
|
30501
|
-
|
|
30556
|
+
let typedValue = newValue;
|
|
30557
|
+
if (newValue === "true") typedValue = true;
|
|
30558
|
+
else if (newValue === "false") typedValue = false;
|
|
30559
|
+
else if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
|
|
30560
|
+
onValueChange?.(typedValue);
|
|
30502
30561
|
if (onChange) {
|
|
30503
30562
|
const event = {
|
|
30504
30563
|
target: {
|
|
30505
30564
|
name,
|
|
30506
|
-
value:
|
|
30565
|
+
value: typedValue
|
|
30507
30566
|
}
|
|
30508
30567
|
};
|
|
30509
30568
|
onChange(event);
|
|
30510
30569
|
}
|
|
30511
|
-
}, [onChange,
|
|
30570
|
+
}, [onChange, onValueChange, name]);
|
|
30512
30571
|
const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
|
|
30513
|
-
|
|
30572
|
+
const stringValue = value !== void 0 ? String(value) : void 0;
|
|
30573
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Root, { name, value: stringValue, open: openInternal, disabled, onValueChange: onValueChangeInternal, onOpenChange: (open_0) => {
|
|
30514
30574
|
onOpenChange?.(open_0);
|
|
30515
30575
|
setOpenInternal(open_0);
|
|
30516
30576
|
}, ...props, children: [
|
|
30517
30577
|
typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label,
|
|
30518
30578
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
|
|
30519
|
-
"min-h-[28px]": size === "
|
|
30579
|
+
"min-h-[28px]": size === "smallest",
|
|
30580
|
+
"min-h-[32px]": size === "small",
|
|
30520
30581
|
"min-h-[42px]": size === "medium",
|
|
30521
30582
|
"min-h-[64px]": size === "large",
|
|
30522
30583
|
"w-fit": !fullWidth,
|
|
@@ -30524,30 +30585,32 @@
|
|
|
30524
30585
|
}), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls("h-full", padding ? {
|
|
30525
30586
|
"px-4": size === "large",
|
|
30526
30587
|
"px-3": size === "medium",
|
|
30527
|
-
"px-2": size === "small"
|
|
30588
|
+
"px-2": size === "small" || size === "smallest"
|
|
30528
30589
|
} : "", "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", {
|
|
30529
|
-
"min-h-[28px]": size === "
|
|
30590
|
+
"min-h-[28px]": size === "smallest",
|
|
30591
|
+
"min-h-[32px]": size === "small",
|
|
30530
30592
|
"min-h-[42px]": size === "medium",
|
|
30531
30593
|
"min-h-[64px]": size === "large",
|
|
30532
30594
|
"w-full": fullWidth,
|
|
30533
30595
|
"w-fit": !fullWidth
|
|
30534
30596
|
}, inputClassName), children: [
|
|
30535
30597
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
|
30536
|
-
"min-h-[28px]": size === "
|
|
30598
|
+
"min-h-[28px]": size === "smallest",
|
|
30599
|
+
"min-h-[32px]": size === "small",
|
|
30537
30600
|
"min-h-[42px]": size === "medium",
|
|
30538
30601
|
"min-h-[64px]": size === "large"
|
|
30539
30602
|
}), children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Value, { onClick: (e) => {
|
|
30540
30603
|
e.preventDefault();
|
|
30541
30604
|
e.stopPropagation();
|
|
30542
30605
|
}, placeholder, className: "w-full", children: [
|
|
30543
|
-
hasValue && value && renderValue ? renderValue(value) : placeholder,
|
|
30606
|
+
hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
|
|
30544
30607
|
hasValue && !renderValue && (() => {
|
|
30545
30608
|
const childrenProps = React.Children.map(children, (child) => {
|
|
30546
30609
|
if (React.isValidElement(child)) {
|
|
30547
30610
|
return child.props;
|
|
30548
30611
|
}
|
|
30549
30612
|
}).filter(Boolean);
|
|
30550
|
-
const option = childrenProps.find((o) => o.value === value);
|
|
30613
|
+
const option = childrenProps.find((o) => String(o.value) === String(value));
|
|
30551
30614
|
return option?.children;
|
|
30552
30615
|
})()
|
|
30553
30616
|
] }) }),
|
|
@@ -30574,6 +30637,7 @@
|
|
|
30574
30637
|
disabled,
|
|
30575
30638
|
className
|
|
30576
30639
|
} = t0;
|
|
30640
|
+
const stringValue = String(value);
|
|
30577
30641
|
const t1 = disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer";
|
|
30578
30642
|
let t2;
|
|
30579
30643
|
if ($[0] !== className || $[1] !== t1) {
|
|
@@ -30600,15 +30664,15 @@
|
|
|
30600
30664
|
t4 = $[5];
|
|
30601
30665
|
}
|
|
30602
30666
|
let t5;
|
|
30603
|
-
if ($[6] !== disabled || $[7] !==
|
|
30604
|
-
t5 = /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Item, { value, disabled, className: t2, children: [
|
|
30667
|
+
if ($[6] !== disabled || $[7] !== stringValue || $[8] !== t2 || $[9] !== t3) {
|
|
30668
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Item, { value: stringValue, disabled, className: t2, children: [
|
|
30605
30669
|
t3,
|
|
30606
30670
|
t4
|
|
30607
|
-
] },
|
|
30671
|
+
] }, stringValue);
|
|
30608
30672
|
$[6] = disabled;
|
|
30609
|
-
$[7] =
|
|
30610
|
-
$[8] =
|
|
30611
|
-
$[9] =
|
|
30673
|
+
$[7] = stringValue;
|
|
30674
|
+
$[8] = t2;
|
|
30675
|
+
$[9] = t3;
|
|
30612
30676
|
$[10] = t5;
|
|
30613
30677
|
} else {
|
|
30614
30678
|
t5 = $[10];
|
|
@@ -31284,7 +31348,8 @@
|
|
|
31284
31348
|
type = "text",
|
|
31285
31349
|
multiline = false,
|
|
31286
31350
|
invisible,
|
|
31287
|
-
|
|
31351
|
+
maxRows,
|
|
31352
|
+
minRows,
|
|
31288
31353
|
disabled,
|
|
31289
31354
|
error,
|
|
31290
31355
|
endAdornment,
|
|
@@ -31312,18 +31377,24 @@
|
|
|
31312
31377
|
element?.removeEventListener("wheel", handleWheel);
|
|
31313
31378
|
};
|
|
31314
31379
|
}, [inputRef, type]);
|
|
31315
|
-
const input = multiline ? /* @__PURE__ */ jsxRuntime.jsx(TextareaAutosize, { ...inputProps, ref: inputRef, placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus,
|
|
31380
|
+
const input = multiline ? /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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, {
|
|
31381
|
+
"min-h-[28px]": size === "smallest",
|
|
31382
|
+
"min-h-[32px]": size === "small",
|
|
31383
|
+
"min-h-[42px]": size === "medium",
|
|
31384
|
+
"min-h-[64px]": size === "large"
|
|
31385
|
+
}, 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 });
|
|
31316
31386
|
return /* @__PURE__ */ jsxRuntime.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" : "", {
|
|
31317
|
-
"min-h-[
|
|
31318
|
-
"min-h-[
|
|
31319
|
-
"min-h-[
|
|
31387
|
+
"min-h-[28px]": size === "smallest",
|
|
31388
|
+
"min-h-[32px]": size === "small",
|
|
31389
|
+
"min-h-[42px]": size === "medium",
|
|
31390
|
+
"min-h-[64px]": size === "large"
|
|
31320
31391
|
}, className), style, children: [
|
|
31321
31392
|
label && /* @__PURE__ */ jsxRuntime.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 }),
|
|
31322
31393
|
input,
|
|
31323
31394
|
endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("flex flex-row justify-center items-center absolute h-full right-0 top-0", {
|
|
31324
31395
|
"mr-4": size === "large",
|
|
31325
31396
|
"mr-3": size === "medium",
|
|
31326
|
-
"mr-2": size === "small"
|
|
31397
|
+
"mr-2": size === "small" || size === "smallest"
|
|
31327
31398
|
}), children: endAdornment })
|
|
31328
31399
|
] });
|
|
31329
31400
|
});
|