@firecms/ui 3.0.0-canary.225 → 3.0.0-canary.226
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/DateTimeField.d.ts +1 -1
- package/dist/components/MultiSelect.d.ts +1 -1
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/TextField.d.ts +2 -2
- package/dist/index.es.js +256 -241
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +256 -241
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/BooleanSwitch.tsx +1 -1
- package/src/components/BooleanSwitchWithLabel.tsx +3 -2
- package/src/components/DateTimeField.tsx +5 -3
- package/src/components/MultiSelect.tsx +5 -4
- package/src/components/Select.tsx +8 -5
- package/src/components/TextField.tsx +6 -4
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,
|
@@ -769,7 +769,8 @@
|
|
769
769
|
}, []);
|
770
770
|
const focus = document.activeElement === refInput?.current || document.activeElement === ref?.current;
|
771
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 === "
|
772
|
+
"min-h-[28px]": size === "smallest",
|
773
|
+
"min-h-[32px]": size === "small",
|
773
774
|
"min-h-[42px]": size === "medium",
|
774
775
|
"min-h-[64px]": size === "large"
|
775
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) => {
|
@@ -27699,7 +27700,7 @@
|
|
27699
27700
|
return t15;
|
27700
27701
|
}
|
27701
27702
|
const DateTimeField = (t0) => {
|
27702
|
-
const $ = reactCompilerRuntime.c(
|
27703
|
+
const $ = reactCompilerRuntime.c(57);
|
27703
27704
|
const {
|
27704
27705
|
value,
|
27705
27706
|
label,
|
@@ -27773,170 +27774,176 @@
|
|
27773
27774
|
}
|
27774
27775
|
const t6 = !invisible && fieldBackgroundMixin;
|
27775
27776
|
const t7 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
|
27776
|
-
const t8 = size === "
|
27777
|
-
const t9 = size === "
|
27778
|
-
const t10 = size === "
|
27779
|
-
|
27780
|
-
|
27781
|
-
|
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, {
|
27782
27784
|
"min-h-[28px]": t8,
|
27783
|
-
"min-h-[
|
27784
|
-
"min-h-[
|
27785
|
+
"min-h-[32px]": t9,
|
27786
|
+
"min-h-[42px]": t10,
|
27787
|
+
"min-h-[64px]": t11
|
27785
27788
|
}, className);
|
27786
27789
|
$[6] = className;
|
27787
27790
|
$[7] = t10;
|
27788
|
-
$[8] =
|
27789
|
-
$[9] =
|
27790
|
-
$[10] =
|
27791
|
-
$[11] =
|
27792
|
-
$[12] =
|
27791
|
+
$[8] = t11;
|
27792
|
+
$[9] = t6;
|
27793
|
+
$[10] = t7;
|
27794
|
+
$[11] = t8;
|
27795
|
+
$[12] = t9;
|
27796
|
+
$[13] = t12;
|
27793
27797
|
} else {
|
27794
|
-
|
27798
|
+
t12 = $[13];
|
27795
27799
|
}
|
27796
|
-
let
|
27797
|
-
if ($[
|
27798
|
-
|
27800
|
+
let t13;
|
27801
|
+
if ($[14] !== disabled) {
|
27802
|
+
t13 = () => {
|
27799
27803
|
if (!disabled) {
|
27800
27804
|
inputRef.current?.focus();
|
27801
27805
|
}
|
27802
27806
|
};
|
27803
|
-
$[
|
27804
|
-
$[
|
27805
|
-
} else {
|
27806
|
-
t12 = $[14];
|
27807
|
-
}
|
27808
|
-
let t13;
|
27809
|
-
if ($[15] !== disabled || $[16] !== error || $[17] !== focused || $[18] !== label) {
|
27810
|
-
t13 = 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 });
|
27811
|
-
$[15] = disabled;
|
27812
|
-
$[16] = error;
|
27813
|
-
$[17] = focused;
|
27814
|
-
$[18] = label;
|
27815
|
-
$[19] = t13;
|
27807
|
+
$[14] = disabled;
|
27808
|
+
$[15] = t13;
|
27816
27809
|
} else {
|
27817
|
-
t13 = $[
|
27810
|
+
t13 = $[15];
|
27818
27811
|
}
|
27819
|
-
|
27820
|
-
|
27821
|
-
|
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);
|
27822
27825
|
let t17;
|
27823
|
-
|
27824
|
-
|
27825
|
-
t17 = () => setFocused(
|
27826
|
-
|
27826
|
+
let t18;
|
27827
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
27828
|
+
t17 = () => setFocused(true);
|
27829
|
+
t18 = () => setFocused(false);
|
27827
27830
|
$[21] = t17;
|
27831
|
+
$[22] = t18;
|
27828
27832
|
} else {
|
27829
|
-
t16 = $[20];
|
27830
27833
|
t17 = $[21];
|
27834
|
+
t18 = $[22];
|
27831
27835
|
}
|
27832
|
-
const
|
27833
|
-
const
|
27834
|
-
const
|
27835
|
-
const
|
27836
|
-
|
27837
|
-
|
27838
|
-
|
27839
|
-
|
27840
|
-
"min-h-[
|
27841
|
-
"min-h-[
|
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
|
27842
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");
|
27843
|
-
$[
|
27844
|
-
$[
|
27845
|
-
$[
|
27846
|
-
$[25] = t18;
|
27849
|
+
$[23] = disabled;
|
27850
|
+
$[24] = inputClassName;
|
27851
|
+
$[25] = label;
|
27847
27852
|
$[26] = t19;
|
27848
27853
|
$[27] = t20;
|
27849
27854
|
$[28] = t21;
|
27850
27855
|
$[29] = t22;
|
27856
|
+
$[30] = t23;
|
27857
|
+
$[31] = t24;
|
27851
27858
|
} else {
|
27852
|
-
|
27859
|
+
t24 = $[31];
|
27853
27860
|
}
|
27854
|
-
let
|
27855
|
-
if ($[
|
27856
|
-
|
27857
|
-
$[
|
27858
|
-
$[
|
27859
|
-
$[
|
27860
|
-
$[
|
27861
|
-
$[
|
27862
|
-
$[
|
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;
|
27863
27870
|
} else {
|
27864
|
-
|
27871
|
+
t25 = $[37];
|
27865
27872
|
}
|
27866
|
-
let
|
27867
|
-
if ($[
|
27868
|
-
|
27873
|
+
let t26;
|
27874
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
27875
|
+
t26 = (e_2) => {
|
27869
27876
|
e_2.stopPropagation();
|
27870
27877
|
inputRef.current?.showPicker();
|
27871
27878
|
};
|
27872
|
-
$[
|
27879
|
+
$[38] = t26;
|
27873
27880
|
} else {
|
27874
|
-
|
27881
|
+
t26 = $[38];
|
27875
27882
|
}
|
27876
|
-
let
|
27877
|
-
if ($[
|
27878
|
-
|
27879
|
-
$[
|
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;
|
27880
27887
|
} else {
|
27881
|
-
|
27888
|
+
t27 = $[39];
|
27882
27889
|
}
|
27883
|
-
let
|
27884
|
-
if ($[
|
27885
|
-
|
27886
|
-
$[
|
27887
|
-
$[
|
27888
|
-
$[
|
27889
|
-
$[
|
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;
|
27890
27897
|
} else {
|
27891
|
-
|
27898
|
+
t28 = $[43];
|
27892
27899
|
}
|
27893
|
-
let
|
27894
|
-
if ($[
|
27895
|
-
|
27896
|
-
|
27897
|
-
t23,
|
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,
|
27898
27904
|
t25,
|
27899
|
-
|
27905
|
+
t27,
|
27906
|
+
t28
|
27900
27907
|
] });
|
27901
|
-
$[
|
27902
|
-
$[
|
27903
|
-
$[
|
27904
|
-
$[
|
27905
|
-
$[
|
27906
|
-
$[
|
27907
|
-
$[
|
27908
|
+
$[44] = style;
|
27909
|
+
$[45] = t12;
|
27910
|
+
$[46] = t13;
|
27911
|
+
$[47] = t14;
|
27912
|
+
$[48] = t25;
|
27913
|
+
$[49] = t28;
|
27914
|
+
$[50] = t29;
|
27908
27915
|
} else {
|
27909
|
-
|
27916
|
+
t29 = $[50];
|
27910
27917
|
}
|
27911
|
-
let
|
27912
|
-
if ($[
|
27913
|
-
|
27918
|
+
let t30;
|
27919
|
+
if ($[51] !== invalidValue || $[52] !== value) {
|
27920
|
+
t30 = invalidValue && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center m-2", children: [
|
27914
27921
|
/* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, { size: "small", color: "error" }),
|
27915
27922
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pl-2", children: [
|
27916
27923
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", children: "Invalid date value for this field" }),
|
27917
27924
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", children: `The provided value is: ${JSON.stringify(value)}` })
|
27918
27925
|
] })
|
27919
27926
|
] });
|
27920
|
-
$[
|
27921
|
-
$[
|
27922
|
-
$[
|
27927
|
+
$[51] = invalidValue;
|
27928
|
+
$[52] = value;
|
27929
|
+
$[53] = t30;
|
27923
27930
|
} else {
|
27924
|
-
|
27931
|
+
t30 = $[53];
|
27925
27932
|
}
|
27926
|
-
let
|
27927
|
-
if ($[
|
27928
|
-
|
27933
|
+
let t31;
|
27934
|
+
if ($[54] !== t29 || $[55] !== t30) {
|
27935
|
+
t31 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
27929
27936
|
t5,
|
27930
|
-
|
27931
|
-
|
27937
|
+
t29,
|
27938
|
+
t30
|
27932
27939
|
] });
|
27933
|
-
$[52] = t27;
|
27934
|
-
$[53] = t28;
|
27935
27940
|
$[54] = t29;
|
27941
|
+
$[55] = t30;
|
27942
|
+
$[56] = t31;
|
27936
27943
|
} else {
|
27937
|
-
|
27944
|
+
t31 = $[56];
|
27938
27945
|
}
|
27939
|
-
return
|
27946
|
+
return t31;
|
27940
27947
|
};
|
27941
27948
|
const inputStyles = `
|
27942
27949
|
/* Hide the default calendar icon in Chrome, Safari, Edge, Opera */
|
@@ -29656,7 +29663,7 @@
|
|
29656
29663
|
}
|
29657
29664
|
const MultiSelectContext = React__namespace.createContext({});
|
29658
29665
|
const MultiSelect = React__namespace.forwardRef((t0, ref) => {
|
29659
|
-
const $ = reactCompilerRuntime.c(
|
29666
|
+
const $ = reactCompilerRuntime.c(102);
|
29660
29667
|
const {
|
29661
29668
|
value,
|
29662
29669
|
size: t1,
|
@@ -29870,20 +29877,22 @@
|
|
29870
29877
|
} else {
|
29871
29878
|
t19 = $[39];
|
29872
29879
|
}
|
29873
|
-
const t20 = size === "
|
29874
|
-
const t21 = size === "
|
29875
|
-
const t22 = size === "
|
29876
|
-
|
29877
|
-
|
29878
|
-
|
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({
|
29879
29887
|
"min-h-[28px]": t20,
|
29880
|
-
"min-h-[
|
29881
|
-
"min-h-[
|
29888
|
+
"min-h-[32px]": t21,
|
29889
|
+
"min-h-[42px]": t22,
|
29890
|
+
"min-h-[64px]": t23
|
29882
29891
|
}, {
|
29883
|
-
"py-1": size === "small",
|
29892
|
+
"py-1": size === "small" || size === "smallest",
|
29884
29893
|
"py-2": size === "medium" || size === "large"
|
29885
29894
|
}, {
|
29886
|
-
"px-2": size === "small",
|
29895
|
+
"px-2": size === "small" || size === "smallest",
|
29887
29896
|
"px-4": size === "medium" || size === "large"
|
29888
29897
|
}, "select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className);
|
29889
29898
|
$[40] = className;
|
@@ -29894,12 +29903,13 @@
|
|
29894
29903
|
$[45] = t21;
|
29895
29904
|
$[46] = t22;
|
29896
29905
|
$[47] = t23;
|
29906
|
+
$[48] = t24;
|
29897
29907
|
} else {
|
29898
|
-
|
29908
|
+
t24 = $[48];
|
29899
29909
|
}
|
29900
|
-
let
|
29901
|
-
if ($[
|
29902
|
-
|
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: [
|
29903
29913
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
|
29904
29914
|
renderValues && renderValues(selectedValues),
|
29905
29915
|
!renderValues && selectedValues.map((value_1) => {
|
@@ -29928,175 +29938,175 @@
|
|
29928
29938
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: placeholder }),
|
29929
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" : "") }) })
|
29930
29940
|
] });
|
29931
|
-
$[
|
29932
|
-
$[
|
29933
|
-
$[
|
29934
|
-
$[
|
29935
|
-
$[
|
29936
|
-
$[
|
29937
|
-
$[
|
29938
|
-
$[
|
29939
|
-
$[
|
29940
|
-
$[
|
29941
|
-
} else {
|
29942
|
-
|
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];
|
29943
29953
|
}
|
29944
|
-
let
|
29945
|
-
if ($[
|
29946
|
-
|
29947
|
-
$[
|
29948
|
-
$[
|
29949
|
-
$[60] = t23;
|
29954
|
+
let t26;
|
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;
|
29950
29959
|
$[61] = t24;
|
29951
29960
|
$[62] = t25;
|
29952
|
-
} else {
|
29953
|
-
t25 = $[62];
|
29954
|
-
}
|
29955
|
-
let t26;
|
29956
|
-
if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
|
29957
|
-
t26 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
29958
29961
|
$[63] = t26;
|
29959
29962
|
} else {
|
29960
29963
|
t26 = $[63];
|
29961
29964
|
}
|
29962
29965
|
let t27;
|
29963
|
-
if ($[64]
|
29964
|
-
t27 = (
|
29965
|
-
$[64] =
|
29966
|
-
$[65] = t27;
|
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;
|
29967
29969
|
} else {
|
29968
|
-
t27 = $[
|
29970
|
+
t27 = $[64];
|
29969
29971
|
}
|
29970
29972
|
let t28;
|
29971
|
-
if ($[
|
29972
|
-
t28 =
|
29973
|
+
if ($[65] !== onPopoverOpenChange) {
|
29974
|
+
t28 = () => onPopoverOpenChange(false);
|
29975
|
+
$[65] = onPopoverOpenChange;
|
29973
29976
|
$[66] = t28;
|
29974
29977
|
} else {
|
29975
29978
|
t28 = $[66];
|
29976
29979
|
}
|
29977
29980
|
let t29;
|
29978
|
-
if ($[67]
|
29979
|
-
t29 =
|
29980
|
-
$[67] =
|
29981
|
-
$[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;
|
29982
29984
|
} else {
|
29983
|
-
t29 = $[
|
29985
|
+
t29 = $[67];
|
29984
29986
|
}
|
29985
29987
|
let t30;
|
29986
|
-
if ($[
|
29987
|
-
t30 =
|
29988
|
-
$[
|
29989
|
-
$[
|
29990
|
-
$[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;
|
29991
29992
|
} else {
|
29992
|
-
t30 = $[
|
29993
|
+
t30 = $[69];
|
29993
29994
|
}
|
29994
29995
|
let t31;
|
29995
|
-
if ($[
|
29996
|
-
t31 = /* @__PURE__ */ jsxRuntime.
|
29997
|
-
|
29998
|
-
|
29999
|
-
]
|
30000
|
-
$[72] = t29;
|
30001
|
-
$[73] = t30;
|
30002
|
-
$[74] = t31;
|
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;
|
30000
|
+
$[72] = t31;
|
30003
30001
|
} else {
|
30004
|
-
t31 = $[
|
30002
|
+
t31 = $[72];
|
30005
30003
|
}
|
30006
30004
|
let t32;
|
30007
|
-
if ($[
|
30008
|
-
t32 = /* @__PURE__ */ jsxRuntime.
|
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;
|
30009
30012
|
$[75] = t32;
|
30010
30013
|
} else {
|
30011
30014
|
t32 = $[75];
|
30012
30015
|
}
|
30013
30016
|
let t33;
|
30014
30017
|
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
30015
|
-
t33 = /* @__PURE__ */ jsxRuntime.jsx(
|
30018
|
+
t33 = /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "horizontal", className: "my-0" });
|
30016
30019
|
$[76] = t33;
|
30017
30020
|
} else {
|
30018
30021
|
t33 = $[76];
|
30019
30022
|
}
|
30020
30023
|
let t34;
|
30021
|
-
if ($[77]
|
30022
|
-
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: [
|
30023
30033
|
/* @__PURE__ */ jsxRuntime.jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
|
30024
30034
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
|
30025
30035
|
] }, "all");
|
30026
|
-
$[
|
30027
|
-
$[
|
30028
|
-
$[
|
30029
|
-
$[
|
30030
|
-
$[
|
30036
|
+
$[78] = allValues.length;
|
30037
|
+
$[79] = includeSelectAll;
|
30038
|
+
$[80] = selectedValues.length;
|
30039
|
+
$[81] = toggleAll;
|
30040
|
+
$[82] = t35;
|
30031
30041
|
} else {
|
30032
|
-
|
30042
|
+
t35 = $[82];
|
30033
30043
|
}
|
30034
|
-
let
|
30035
|
-
if ($[
|
30036
|
-
|
30037
|
-
|
30044
|
+
let t36;
|
30045
|
+
if ($[83] !== children || $[84] !== t35) {
|
30046
|
+
t36 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
|
30047
|
+
t34,
|
30038
30048
|
/* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Group, { children: [
|
30039
|
-
|
30049
|
+
t35,
|
30040
30050
|
children
|
30041
30051
|
] })
|
30042
30052
|
] });
|
30043
|
-
$[
|
30044
|
-
$[83] = t34;
|
30053
|
+
$[83] = children;
|
30045
30054
|
$[84] = t35;
|
30055
|
+
$[85] = t36;
|
30046
30056
|
} else {
|
30047
|
-
|
30057
|
+
t36 = $[85];
|
30048
30058
|
}
|
30049
|
-
let
|
30050
|
-
if ($[
|
30051
|
-
|
30052
|
-
t31,
|
30059
|
+
let t37;
|
30060
|
+
if ($[86] !== t32 || $[87] !== t36) {
|
30061
|
+
t37 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
|
30053
30062
|
t32,
|
30054
|
-
|
30063
|
+
t33,
|
30064
|
+
t36
|
30055
30065
|
] });
|
30056
|
-
$[
|
30057
|
-
$[86] = t35;
|
30066
|
+
$[86] = t32;
|
30058
30067
|
$[87] = t36;
|
30068
|
+
$[88] = t37;
|
30059
30069
|
} else {
|
30060
|
-
|
30070
|
+
t37 = $[88];
|
30061
30071
|
}
|
30062
|
-
let
|
30063
|
-
if ($[
|
30064
|
-
|
30065
|
-
$[
|
30066
|
-
$[89] = t36;
|
30072
|
+
let t38;
|
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;
|
30067
30076
|
$[90] = t37;
|
30077
|
+
$[91] = t38;
|
30068
30078
|
} else {
|
30069
|
-
|
30079
|
+
t38 = $[91];
|
30070
30080
|
}
|
30071
|
-
let
|
30072
|
-
if ($[
|
30073
|
-
|
30074
|
-
|
30075
|
-
|
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
|
30076
30086
|
] });
|
30077
|
-
$[
|
30078
|
-
$[
|
30079
|
-
$[
|
30080
|
-
$[
|
30081
|
-
$[95] = t37;
|
30087
|
+
$[92] = isPopoverOpen;
|
30088
|
+
$[93] = modalPopover;
|
30089
|
+
$[94] = onPopoverOpenChange;
|
30090
|
+
$[95] = t26;
|
30082
30091
|
$[96] = t38;
|
30092
|
+
$[97] = t39;
|
30083
30093
|
} else {
|
30084
|
-
|
30094
|
+
t39 = $[97];
|
30085
30095
|
}
|
30086
|
-
let
|
30087
|
-
if ($[
|
30088
|
-
|
30096
|
+
let t40;
|
30097
|
+
if ($[98] !== t18 || $[99] !== t19 || $[100] !== t39) {
|
30098
|
+
t40 = /* @__PURE__ */ jsxRuntime.jsxs(MultiSelectContext.Provider, { value: t18, children: [
|
30089
30099
|
t19,
|
30090
|
-
|
30100
|
+
t39
|
30091
30101
|
] });
|
30092
|
-
$[
|
30093
|
-
$[
|
30094
|
-
$[99] = t38;
|
30102
|
+
$[98] = t18;
|
30103
|
+
$[99] = t19;
|
30095
30104
|
$[100] = t39;
|
30105
|
+
$[101] = t40;
|
30096
30106
|
} else {
|
30097
|
-
|
30107
|
+
t40 = $[101];
|
30098
30108
|
}
|
30099
|
-
return
|
30109
|
+
return t40;
|
30100
30110
|
});
|
30101
30111
|
MultiSelect.displayName = "MultiSelect";
|
30102
30112
|
function MultiSelectItem(t0) {
|
@@ -30566,7 +30576,8 @@
|
|
30566
30576
|
}, ...props, children: [
|
30567
30577
|
typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label,
|
30568
30578
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
|
30569
|
-
"min-h-[28px]": size === "
|
30579
|
+
"min-h-[28px]": size === "smallest",
|
30580
|
+
"min-h-[32px]": size === "small",
|
30570
30581
|
"min-h-[42px]": size === "medium",
|
30571
30582
|
"min-h-[64px]": size === "large",
|
30572
30583
|
"w-fit": !fullWidth,
|
@@ -30574,16 +30585,18 @@
|
|
30574
30585
|
}), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls("h-full", padding ? {
|
30575
30586
|
"px-4": size === "large",
|
30576
30587
|
"px-3": size === "medium",
|
30577
|
-
"px-2": size === "small"
|
30588
|
+
"px-2": size === "small" || size === "smallest"
|
30578
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", {
|
30579
|
-
"min-h-[28px]": size === "
|
30590
|
+
"min-h-[28px]": size === "smallest",
|
30591
|
+
"min-h-[32px]": size === "small",
|
30580
30592
|
"min-h-[42px]": size === "medium",
|
30581
30593
|
"min-h-[64px]": size === "large",
|
30582
30594
|
"w-full": fullWidth,
|
30583
30595
|
"w-fit": !fullWidth
|
30584
30596
|
}, inputClassName), children: [
|
30585
30597
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
30586
|
-
"min-h-[28px]": size === "
|
30598
|
+
"min-h-[28px]": size === "smallest",
|
30599
|
+
"min-h-[32px]": size === "small",
|
30587
30600
|
"min-h-[42px]": size === "medium",
|
30588
30601
|
"min-h-[64px]": size === "large"
|
30589
30602
|
}), children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Value, { onClick: (e) => {
|
@@ -31365,12 +31378,14 @@
|
|
31365
31378
|
};
|
31366
31379
|
}, [inputRef, type]);
|
31367
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, {
|
31368
|
-
"min-h-[28px]": size === "
|
31381
|
+
"min-h-[28px]": size === "smallest",
|
31382
|
+
"min-h-[32px]": size === "small",
|
31369
31383
|
"min-h-[42px]": size === "medium",
|
31370
31384
|
"min-h-[64px]": size === "large"
|
31371
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 });
|
31372
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" : "", {
|
31373
|
-
"min-h-[28px]": size === "
|
31387
|
+
"min-h-[28px]": size === "smallest",
|
31388
|
+
"min-h-[32px]": size === "small",
|
31374
31389
|
"min-h-[42px]": size === "medium",
|
31375
31390
|
"min-h-[64px]": size === "large"
|
31376
31391
|
}, className), style, children: [
|
@@ -31379,7 +31394,7 @@
|
|
31379
31394
|
endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("flex flex-row justify-center items-center absolute h-full right-0 top-0", {
|
31380
31395
|
"mr-4": size === "large",
|
31381
31396
|
"mr-3": size === "medium",
|
31382
|
-
"mr-2": size === "small"
|
31397
|
+
"mr-2": size === "small" || size === "smallest"
|
31383
31398
|
}), children: endAdornment })
|
31384
31399
|
] });
|
31385
31400
|
});
|