@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.es.js
CHANGED
@@ -738,13 +738,13 @@ const BooleanSwitch = React__default.forwardRef(function BooleanSwitch2({
|
|
738
738
|
const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
739
739
|
value,
|
740
740
|
position = "end",
|
741
|
+
size = "medium",
|
741
742
|
invisible,
|
742
743
|
onValueChange,
|
743
744
|
error,
|
744
745
|
label,
|
745
746
|
autoFocus,
|
746
747
|
disabled,
|
747
|
-
size,
|
748
748
|
className,
|
749
749
|
fullWidth = true,
|
750
750
|
inputClassName,
|
@@ -759,7 +759,8 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
759
759
|
}, []);
|
760
760
|
const focus = document.activeElement === refInput?.current || document.activeElement === ref?.current;
|
761
761
|
return /* @__PURE__ */ jsxs("div", { ref, onFocus, onBlur, tabIndex: -1, className: cls(!invisible && fieldBackgroundMixin, !invisible && (disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin), disabled ? "cursor-default" : "cursor-pointer", "rounded-md max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark", {
|
762
|
-
"min-h-[28px]": size === "
|
762
|
+
"min-h-[28px]": size === "smallest",
|
763
|
+
"min-h-[32px]": size === "small",
|
763
764
|
"min-h-[42px]": size === "medium",
|
764
765
|
"min-h-[64px]": size === "large"
|
765
766
|
}, size === "small" ? "pl-2" : "pl-4", size === "small" ? "pr-4" : "pr-6", position === "end" ? "flex-row-reverse" : "flex-row", fullWidth ? "w-full" : "", className), onClick: disabled ? void 0 : (e) => {
|
@@ -27689,7 +27690,7 @@ function Typography(t0) {
|
|
27689
27690
|
return t15;
|
27690
27691
|
}
|
27691
27692
|
const DateTimeField = (t0) => {
|
27692
|
-
const $ = c(
|
27693
|
+
const $ = c(57);
|
27693
27694
|
const {
|
27694
27695
|
value,
|
27695
27696
|
label,
|
@@ -27763,170 +27764,176 @@ const DateTimeField = (t0) => {
|
|
27763
27764
|
}
|
27764
27765
|
const t6 = !invisible && fieldBackgroundMixin;
|
27765
27766
|
const t7 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
|
27766
|
-
const t8 = size === "
|
27767
|
-
const t9 = size === "
|
27768
|
-
const t10 = size === "
|
27769
|
-
|
27770
|
-
|
27771
|
-
|
27767
|
+
const t8 = size === "smallest";
|
27768
|
+
const t9 = size === "small";
|
27769
|
+
const t10 = size === "medium";
|
27770
|
+
const t11 = size === "large";
|
27771
|
+
let t12;
|
27772
|
+
if ($[6] !== className || $[7] !== t10 || $[8] !== t11 || $[9] !== t6 || $[10] !== t7 || $[11] !== t8 || $[12] !== t9) {
|
27773
|
+
t12 = cls("rounded-md relative max-w-full", t6, t7, {
|
27772
27774
|
"min-h-[28px]": t8,
|
27773
|
-
"min-h-[
|
27774
|
-
"min-h-[
|
27775
|
+
"min-h-[32px]": t9,
|
27776
|
+
"min-h-[42px]": t10,
|
27777
|
+
"min-h-[64px]": t11
|
27775
27778
|
}, className);
|
27776
27779
|
$[6] = className;
|
27777
27780
|
$[7] = t10;
|
27778
|
-
$[8] =
|
27779
|
-
$[9] =
|
27780
|
-
$[10] =
|
27781
|
-
$[11] =
|
27782
|
-
$[12] =
|
27781
|
+
$[8] = t11;
|
27782
|
+
$[9] = t6;
|
27783
|
+
$[10] = t7;
|
27784
|
+
$[11] = t8;
|
27785
|
+
$[12] = t9;
|
27786
|
+
$[13] = t12;
|
27783
27787
|
} else {
|
27784
|
-
|
27788
|
+
t12 = $[13];
|
27785
27789
|
}
|
27786
|
-
let
|
27787
|
-
if ($[
|
27788
|
-
|
27790
|
+
let t13;
|
27791
|
+
if ($[14] !== disabled) {
|
27792
|
+
t13 = () => {
|
27789
27793
|
if (!disabled) {
|
27790
27794
|
inputRef.current?.focus();
|
27791
27795
|
}
|
27792
27796
|
};
|
27793
|
-
$[
|
27794
|
-
$[
|
27795
|
-
} else {
|
27796
|
-
t12 = $[14];
|
27797
|
-
}
|
27798
|
-
let t13;
|
27799
|
-
if ($[15] !== disabled || $[16] !== error || $[17] !== focused || $[18] !== label) {
|
27800
|
-
t13 = label && /* @__PURE__ */ jsx(InputLabel, { className: cls("absolute top-1 pointer-events-none", !error ? focused ? "text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-500", disabled ? "opacity-50" : ""), shrink: true, children: label });
|
27801
|
-
$[15] = disabled;
|
27802
|
-
$[16] = error;
|
27803
|
-
$[17] = focused;
|
27804
|
-
$[18] = label;
|
27805
|
-
$[19] = t13;
|
27797
|
+
$[14] = disabled;
|
27798
|
+
$[15] = t13;
|
27806
27799
|
} else {
|
27807
|
-
t13 = $[
|
27800
|
+
t13 = $[15];
|
27808
27801
|
}
|
27809
|
-
|
27810
|
-
|
27811
|
-
|
27802
|
+
let t14;
|
27803
|
+
if ($[16] !== disabled || $[17] !== error || $[18] !== focused || $[19] !== label) {
|
27804
|
+
t14 = label && /* @__PURE__ */ jsx(InputLabel, { className: cls("absolute top-1 pointer-events-none", !error ? focused ? "text-primary" : "text-text-secondary dark:text-text-secondary-dark" : "text-red-500 dark:text-red-500", disabled ? "opacity-50" : ""), shrink: true, children: label });
|
27805
|
+
$[16] = disabled;
|
27806
|
+
$[17] = error;
|
27807
|
+
$[18] = focused;
|
27808
|
+
$[19] = label;
|
27809
|
+
$[20] = t14;
|
27810
|
+
} else {
|
27811
|
+
t14 = $[20];
|
27812
|
+
}
|
27813
|
+
const t15 = mode === "date_time" ? "datetime-local" : "date";
|
27814
|
+
const t16 = valueAsInputValue(value ?? null, mode);
|
27812
27815
|
let t17;
|
27813
|
-
|
27814
|
-
|
27815
|
-
t17 = () => setFocused(
|
27816
|
-
|
27816
|
+
let t18;
|
27817
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
27818
|
+
t17 = () => setFocused(true);
|
27819
|
+
t18 = () => setFocused(false);
|
27817
27820
|
$[21] = t17;
|
27821
|
+
$[22] = t18;
|
27818
27822
|
} else {
|
27819
|
-
t16 = $[20];
|
27820
27823
|
t17 = $[21];
|
27824
|
+
t18 = $[22];
|
27821
27825
|
}
|
27822
|
-
const
|
27823
|
-
const
|
27824
|
-
const
|
27825
|
-
const
|
27826
|
-
|
27827
|
-
|
27828
|
-
|
27829
|
-
|
27830
|
-
"min-h-[
|
27831
|
-
"min-h-[
|
27826
|
+
const t19 = clearable ? "pr-14" : "pr-12";
|
27827
|
+
const t20 = size === "smallest";
|
27828
|
+
const t21 = size === "small";
|
27829
|
+
const t22 = size === "medium";
|
27830
|
+
const t23 = size === "large";
|
27831
|
+
let t24;
|
27832
|
+
if ($[23] !== disabled || $[24] !== inputClassName || $[25] !== label || $[26] !== t19 || $[27] !== t20 || $[28] !== t21 || $[29] !== t22 || $[30] !== t23) {
|
27833
|
+
t24 = cls("w-full outline-none bg-transparent leading-normal text-base px-3", t19, "rounded-md", {
|
27834
|
+
"min-h-[28px]": t20,
|
27835
|
+
"min-h-[32px]": t21,
|
27836
|
+
"min-h-[42px]": t22,
|
27837
|
+
"min-h-[64px]": t23
|
27832
27838
|
}, 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");
|
27833
|
-
$[
|
27834
|
-
$[
|
27835
|
-
$[
|
27836
|
-
$[25] = t18;
|
27839
|
+
$[23] = disabled;
|
27840
|
+
$[24] = inputClassName;
|
27841
|
+
$[25] = label;
|
27837
27842
|
$[26] = t19;
|
27838
27843
|
$[27] = t20;
|
27839
27844
|
$[28] = t21;
|
27840
27845
|
$[29] = t22;
|
27846
|
+
$[30] = t23;
|
27847
|
+
$[31] = t24;
|
27841
27848
|
} else {
|
27842
|
-
|
27849
|
+
t24 = $[31];
|
27843
27850
|
}
|
27844
|
-
let
|
27845
|
-
if ($[
|
27846
|
-
|
27847
|
-
$[
|
27848
|
-
$[
|
27849
|
-
$[
|
27850
|
-
$[
|
27851
|
-
$[
|
27852
|
-
$[
|
27851
|
+
let t25;
|
27852
|
+
if ($[32] !== disabled || $[33] !== handleInputChange || $[34] !== t15 || $[35] !== t16 || $[36] !== t24) {
|
27853
|
+
t25 = /* @__PURE__ */ jsx("input", { ref: inputRef, type: t15, value: t16, onChange: handleInputChange, onFocus: t17, onBlur: t18, disabled, className: t24 });
|
27854
|
+
$[32] = disabled;
|
27855
|
+
$[33] = handleInputChange;
|
27856
|
+
$[34] = t15;
|
27857
|
+
$[35] = t16;
|
27858
|
+
$[36] = t24;
|
27859
|
+
$[37] = t25;
|
27853
27860
|
} else {
|
27854
|
-
|
27861
|
+
t25 = $[37];
|
27855
27862
|
}
|
27856
|
-
let
|
27857
|
-
if ($[
|
27858
|
-
|
27863
|
+
let t26;
|
27864
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
27865
|
+
t26 = (e_2) => {
|
27859
27866
|
e_2.stopPropagation();
|
27860
27867
|
inputRef.current?.showPicker();
|
27861
27868
|
};
|
27862
|
-
$[
|
27869
|
+
$[38] = t26;
|
27863
27870
|
} else {
|
27864
|
-
|
27871
|
+
t26 = $[38];
|
27865
27872
|
}
|
27866
|
-
let
|
27867
|
-
if ($[
|
27868
|
-
|
27869
|
-
$[
|
27873
|
+
let t27;
|
27874
|
+
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
27875
|
+
t27 = /* @__PURE__ */ jsx(IconButton, { onClick: t26, className: "absolute right-3 top-1/2 transform -translate-y-1/2 !text-surface-accent-500", children: /* @__PURE__ */ jsx(CalendarMonthIcon, { color: "disabled" }) });
|
27876
|
+
$[39] = t27;
|
27870
27877
|
} else {
|
27871
|
-
|
27878
|
+
t27 = $[39];
|
27872
27879
|
}
|
27873
|
-
let
|
27874
|
-
if ($[
|
27875
|
-
|
27876
|
-
$[
|
27877
|
-
$[
|
27878
|
-
$[
|
27879
|
-
$[
|
27880
|
+
let t28;
|
27881
|
+
if ($[40] !== clearable || $[41] !== handleClear || $[42] !== value) {
|
27882
|
+
t28 = clearable && value && /* @__PURE__ */ jsx(IconButton, { onClick: handleClear, className: "absolute right-14 top-1/2 transform -translate-y-1/2 text-surface-accent-400 ", children: /* @__PURE__ */ jsx(CloseIcon, {}) });
|
27883
|
+
$[40] = clearable;
|
27884
|
+
$[41] = handleClear;
|
27885
|
+
$[42] = value;
|
27886
|
+
$[43] = t28;
|
27880
27887
|
} else {
|
27881
|
-
|
27888
|
+
t28 = $[43];
|
27882
27889
|
}
|
27883
|
-
let
|
27884
|
-
if ($[
|
27885
|
-
|
27886
|
-
|
27887
|
-
t23,
|
27890
|
+
let t29;
|
27891
|
+
if ($[44] !== style || $[45] !== t12 || $[46] !== t13 || $[47] !== t14 || $[48] !== t25 || $[49] !== t28) {
|
27892
|
+
t29 = /* @__PURE__ */ jsxs("div", { className: t12, style, onClick: t13, children: [
|
27893
|
+
t14,
|
27888
27894
|
t25,
|
27889
|
-
|
27895
|
+
t27,
|
27896
|
+
t28
|
27890
27897
|
] });
|
27891
|
-
$[
|
27892
|
-
$[
|
27893
|
-
$[
|
27894
|
-
$[
|
27895
|
-
$[
|
27896
|
-
$[
|
27897
|
-
$[
|
27898
|
+
$[44] = style;
|
27899
|
+
$[45] = t12;
|
27900
|
+
$[46] = t13;
|
27901
|
+
$[47] = t14;
|
27902
|
+
$[48] = t25;
|
27903
|
+
$[49] = t28;
|
27904
|
+
$[50] = t29;
|
27898
27905
|
} else {
|
27899
|
-
|
27906
|
+
t29 = $[50];
|
27900
27907
|
}
|
27901
|
-
let
|
27902
|
-
if ($[
|
27903
|
-
|
27908
|
+
let t30;
|
27909
|
+
if ($[51] !== invalidValue || $[52] !== value) {
|
27910
|
+
t30 = invalidValue && /* @__PURE__ */ jsxs("div", { className: "flex items-center m-2", children: [
|
27904
27911
|
/* @__PURE__ */ jsx(ErrorIcon, { size: "small", color: "error" }),
|
27905
27912
|
/* @__PURE__ */ jsxs("div", { className: "pl-2", children: [
|
27906
27913
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Invalid date value for this field" }),
|
27907
27914
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: `The provided value is: ${JSON.stringify(value)}` })
|
27908
27915
|
] })
|
27909
27916
|
] });
|
27910
|
-
$[
|
27911
|
-
$[
|
27912
|
-
$[
|
27917
|
+
$[51] = invalidValue;
|
27918
|
+
$[52] = value;
|
27919
|
+
$[53] = t30;
|
27913
27920
|
} else {
|
27914
|
-
|
27921
|
+
t30 = $[53];
|
27915
27922
|
}
|
27916
|
-
let
|
27917
|
-
if ($[
|
27918
|
-
|
27923
|
+
let t31;
|
27924
|
+
if ($[54] !== t29 || $[55] !== t30) {
|
27925
|
+
t31 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
27919
27926
|
t5,
|
27920
|
-
|
27921
|
-
|
27927
|
+
t29,
|
27928
|
+
t30
|
27922
27929
|
] });
|
27923
|
-
$[52] = t27;
|
27924
|
-
$[53] = t28;
|
27925
27930
|
$[54] = t29;
|
27931
|
+
$[55] = t30;
|
27932
|
+
$[56] = t31;
|
27926
27933
|
} else {
|
27927
|
-
|
27934
|
+
t31 = $[56];
|
27928
27935
|
}
|
27929
|
-
return
|
27936
|
+
return t31;
|
27930
27937
|
};
|
27931
27938
|
const inputStyles = `
|
27932
27939
|
/* Hide the default calendar icon in Chrome, Safari, Edge, Opera */
|
@@ -29646,7 +29653,7 @@ function SelectInputLabel(t0) {
|
|
29646
29653
|
}
|
29647
29654
|
const MultiSelectContext = React.createContext({});
|
29648
29655
|
const MultiSelect = React.forwardRef((t0, ref) => {
|
29649
|
-
const $ = c(
|
29656
|
+
const $ = c(102);
|
29650
29657
|
const {
|
29651
29658
|
value,
|
29652
29659
|
size: t1,
|
@@ -29860,20 +29867,22 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
29860
29867
|
} else {
|
29861
29868
|
t19 = $[39];
|
29862
29869
|
}
|
29863
|
-
const t20 = size === "
|
29864
|
-
const t21 = size === "
|
29865
|
-
const t22 = size === "
|
29866
|
-
|
29867
|
-
|
29868
|
-
|
29870
|
+
const t20 = size === "smallest";
|
29871
|
+
const t21 = size === "small";
|
29872
|
+
const t22 = size === "medium";
|
29873
|
+
const t23 = size === "large";
|
29874
|
+
let t24;
|
29875
|
+
if ($[40] !== className || $[41] !== disabled || $[42] !== invisible || $[43] !== size || $[44] !== t20 || $[45] !== t21 || $[46] !== t22 || $[47] !== t23) {
|
29876
|
+
t24 = cls({
|
29869
29877
|
"min-h-[28px]": t20,
|
29870
|
-
"min-h-[
|
29871
|
-
"min-h-[
|
29878
|
+
"min-h-[32px]": t21,
|
29879
|
+
"min-h-[42px]": t22,
|
29880
|
+
"min-h-[64px]": t23
|
29872
29881
|
}, {
|
29873
|
-
"py-1": size === "small",
|
29882
|
+
"py-1": size === "small" || size === "smallest",
|
29874
29883
|
"py-2": size === "medium" || size === "large"
|
29875
29884
|
}, {
|
29876
|
-
"px-2": size === "small",
|
29885
|
+
"px-2": size === "small" || size === "smallest",
|
29877
29886
|
"px-4": size === "medium" || size === "large"
|
29878
29887
|
}, "select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className);
|
29879
29888
|
$[40] = className;
|
@@ -29884,12 +29893,13 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
29884
29893
|
$[45] = t21;
|
29885
29894
|
$[46] = t22;
|
29886
29895
|
$[47] = t23;
|
29896
|
+
$[48] = t24;
|
29887
29897
|
} else {
|
29888
|
-
|
29898
|
+
t24 = $[48];
|
29889
29899
|
}
|
29890
|
-
let
|
29891
|
-
if ($[
|
29892
|
-
|
29900
|
+
let t25;
|
29901
|
+
if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== toggleOption || $[57] !== useChips) {
|
29902
|
+
t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
|
29893
29903
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
|
29894
29904
|
renderValues && renderValues(selectedValues),
|
29895
29905
|
!renderValues && selectedValues.map((value_1) => {
|
@@ -29918,175 +29928,175 @@ const MultiSelect = React.forwardRef((t0, ref) => {
|
|
29918
29928
|
/* @__PURE__ */ jsx("span", { className: "text-sm", children: placeholder }),
|
29919
29929
|
/* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
|
29920
29930
|
] });
|
29921
|
-
$[
|
29922
|
-
$[
|
29923
|
-
$[
|
29924
|
-
$[
|
29925
|
-
$[
|
29926
|
-
$[
|
29927
|
-
$[
|
29928
|
-
$[
|
29929
|
-
$[
|
29930
|
-
$[
|
29931
|
-
} else {
|
29932
|
-
|
29931
|
+
$[49] = children;
|
29932
|
+
$[50] = handleClear;
|
29933
|
+
$[51] = includeClear;
|
29934
|
+
$[52] = isPopoverOpen;
|
29935
|
+
$[53] = placeholder;
|
29936
|
+
$[54] = renderValues;
|
29937
|
+
$[55] = selectedValues;
|
29938
|
+
$[56] = toggleOption;
|
29939
|
+
$[57] = useChips;
|
29940
|
+
$[58] = t25;
|
29941
|
+
} else {
|
29942
|
+
t25 = $[58];
|
29933
29943
|
}
|
29934
|
-
let
|
29935
|
-
if ($[
|
29936
|
-
|
29937
|
-
$[
|
29938
|
-
$[
|
29939
|
-
$[60] = t23;
|
29944
|
+
let t26;
|
29945
|
+
if ($[59] !== handleTogglePopover || $[60] !== ref || $[61] !== t24 || $[62] !== t25) {
|
29946
|
+
t26 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
|
29947
|
+
$[59] = handleTogglePopover;
|
29948
|
+
$[60] = ref;
|
29940
29949
|
$[61] = t24;
|
29941
29950
|
$[62] = t25;
|
29942
|
-
} else {
|
29943
|
-
t25 = $[62];
|
29944
|
-
}
|
29945
|
-
let t26;
|
29946
|
-
if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
|
29947
|
-
t26 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
29948
29951
|
$[63] = t26;
|
29949
29952
|
} else {
|
29950
29953
|
t26 = $[63];
|
29951
29954
|
}
|
29952
29955
|
let t27;
|
29953
|
-
if ($[64]
|
29954
|
-
t27 = (
|
29955
|
-
$[64] =
|
29956
|
-
$[65] = t27;
|
29956
|
+
if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
|
29957
|
+
t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
|
29958
|
+
$[64] = t27;
|
29957
29959
|
} else {
|
29958
|
-
t27 = $[
|
29960
|
+
t27 = $[64];
|
29959
29961
|
}
|
29960
29962
|
let t28;
|
29961
|
-
if ($[
|
29962
|
-
t28 =
|
29963
|
+
if ($[65] !== onPopoverOpenChange) {
|
29964
|
+
t28 = () => onPopoverOpenChange(false);
|
29965
|
+
$[65] = onPopoverOpenChange;
|
29963
29966
|
$[66] = t28;
|
29964
29967
|
} else {
|
29965
29968
|
t28 = $[66];
|
29966
29969
|
}
|
29967
29970
|
let t29;
|
29968
|
-
if ($[67]
|
29969
|
-
t29 =
|
29970
|
-
$[67] =
|
29971
|
-
$[68] = t29;
|
29971
|
+
if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
|
29972
|
+
t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
|
29973
|
+
$[67] = t29;
|
29972
29974
|
} else {
|
29973
|
-
t29 = $[
|
29975
|
+
t29 = $[67];
|
29974
29976
|
}
|
29975
29977
|
let t30;
|
29976
|
-
if ($[
|
29977
|
-
t30 =
|
29978
|
-
$[
|
29979
|
-
$[
|
29980
|
-
$[71] = t30;
|
29978
|
+
if ($[68] !== handleInputKeyDown) {
|
29979
|
+
t30 = /* @__PURE__ */ jsx(Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
|
29980
|
+
$[68] = handleInputKeyDown;
|
29981
|
+
$[69] = t30;
|
29981
29982
|
} else {
|
29982
|
-
t30 = $[
|
29983
|
+
t30 = $[69];
|
29983
29984
|
}
|
29984
29985
|
let t31;
|
29985
|
-
if ($[
|
29986
|
-
t31 = /* @__PURE__ */
|
29987
|
-
|
29988
|
-
|
29989
|
-
]
|
29990
|
-
$[72] = t29;
|
29991
|
-
$[73] = t30;
|
29992
|
-
$[74] = t31;
|
29986
|
+
if ($[70] !== handleClear || $[71] !== selectedValues.length) {
|
29987
|
+
t31 = selectedValues.length > 0 && /* @__PURE__ */ jsx("div", { onClick: handleClear, className: "text-sm justify-center cursor-pointer py-3 px-4 text-text-secondary dark:text-text-secondary-dark", children: "Clear" });
|
29988
|
+
$[70] = handleClear;
|
29989
|
+
$[71] = selectedValues.length;
|
29990
|
+
$[72] = t31;
|
29993
29991
|
} else {
|
29994
|
-
t31 = $[
|
29992
|
+
t31 = $[72];
|
29995
29993
|
}
|
29996
29994
|
let t32;
|
29997
|
-
if ($[
|
29998
|
-
t32 = /* @__PURE__ */
|
29995
|
+
if ($[73] !== t30 || $[74] !== t31) {
|
29996
|
+
t32 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center", children: [
|
29997
|
+
t30,
|
29998
|
+
t31
|
29999
|
+
] });
|
30000
|
+
$[73] = t30;
|
30001
|
+
$[74] = t31;
|
29999
30002
|
$[75] = t32;
|
30000
30003
|
} else {
|
30001
30004
|
t32 = $[75];
|
30002
30005
|
}
|
30003
30006
|
let t33;
|
30004
30007
|
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
30005
|
-
t33 = /* @__PURE__ */ jsx(
|
30008
|
+
t33 = /* @__PURE__ */ jsx(Separator, { orientation: "horizontal", className: "my-0" });
|
30006
30009
|
$[76] = t33;
|
30007
30010
|
} else {
|
30008
30011
|
t33 = $[76];
|
30009
30012
|
}
|
30010
30013
|
let t34;
|
30011
|
-
if ($[77]
|
30012
|
-
t34 =
|
30014
|
+
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
30015
|
+
t34 = /* @__PURE__ */ jsx(Command.Empty, { className: "px-4 py-2", children: "No results found." });
|
30016
|
+
$[77] = t34;
|
30017
|
+
} else {
|
30018
|
+
t34 = $[77];
|
30019
|
+
}
|
30020
|
+
let t35;
|
30021
|
+
if ($[78] !== allValues.length || $[79] !== includeSelectAll || $[80] !== selectedValues.length || $[81] !== toggleAll) {
|
30022
|
+
t35 = includeSelectAll && /* @__PURE__ */ jsxs(Command.Item, { onSelect: toggleAll, className: cls("flex flex-row items-center gap-1.5", "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900"), children: [
|
30013
30023
|
/* @__PURE__ */ jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
|
30014
30024
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
|
30015
30025
|
] }, "all");
|
30016
|
-
$[
|
30017
|
-
$[
|
30018
|
-
$[
|
30019
|
-
$[
|
30020
|
-
$[
|
30026
|
+
$[78] = allValues.length;
|
30027
|
+
$[79] = includeSelectAll;
|
30028
|
+
$[80] = selectedValues.length;
|
30029
|
+
$[81] = toggleAll;
|
30030
|
+
$[82] = t35;
|
30021
30031
|
} else {
|
30022
|
-
|
30032
|
+
t35 = $[82];
|
30023
30033
|
}
|
30024
|
-
let
|
30025
|
-
if ($[
|
30026
|
-
|
30027
|
-
|
30034
|
+
let t36;
|
30035
|
+
if ($[83] !== children || $[84] !== t35) {
|
30036
|
+
t36 = /* @__PURE__ */ jsxs(Command.List, { children: [
|
30037
|
+
t34,
|
30028
30038
|
/* @__PURE__ */ jsxs(Command.Group, { children: [
|
30029
|
-
|
30039
|
+
t35,
|
30030
30040
|
children
|
30031
30041
|
] })
|
30032
30042
|
] });
|
30033
|
-
$[
|
30034
|
-
$[83] = t34;
|
30043
|
+
$[83] = children;
|
30035
30044
|
$[84] = t35;
|
30045
|
+
$[85] = t36;
|
30036
30046
|
} else {
|
30037
|
-
|
30047
|
+
t36 = $[85];
|
30038
30048
|
}
|
30039
|
-
let
|
30040
|
-
if ($[
|
30041
|
-
|
30042
|
-
t31,
|
30049
|
+
let t37;
|
30050
|
+
if ($[86] !== t32 || $[87] !== t36) {
|
30051
|
+
t37 = /* @__PURE__ */ jsxs(Command, { children: [
|
30043
30052
|
t32,
|
30044
|
-
|
30053
|
+
t33,
|
30054
|
+
t36
|
30045
30055
|
] });
|
30046
|
-
$[
|
30047
|
-
$[86] = t35;
|
30056
|
+
$[86] = t32;
|
30048
30057
|
$[87] = t36;
|
30058
|
+
$[88] = t37;
|
30049
30059
|
} else {
|
30050
|
-
|
30060
|
+
t37 = $[88];
|
30051
30061
|
}
|
30052
|
-
let
|
30053
|
-
if ($[
|
30054
|
-
|
30055
|
-
$[
|
30056
|
-
$[89] = t36;
|
30062
|
+
let t38;
|
30063
|
+
if ($[89] !== t28 || $[90] !== t37) {
|
30064
|
+
t38 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
|
30065
|
+
$[89] = t28;
|
30057
30066
|
$[90] = t37;
|
30067
|
+
$[91] = t38;
|
30058
30068
|
} else {
|
30059
|
-
|
30069
|
+
t38 = $[91];
|
30060
30070
|
}
|
30061
|
-
let
|
30062
|
-
if ($[
|
30063
|
-
|
30064
|
-
|
30065
|
-
|
30071
|
+
let t39;
|
30072
|
+
if ($[92] !== isPopoverOpen || $[93] !== modalPopover || $[94] !== onPopoverOpenChange || $[95] !== t26 || $[96] !== t38) {
|
30073
|
+
t39 = /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
|
30074
|
+
t26,
|
30075
|
+
t38
|
30066
30076
|
] });
|
30067
|
-
$[
|
30068
|
-
$[
|
30069
|
-
$[
|
30070
|
-
$[
|
30071
|
-
$[95] = t37;
|
30077
|
+
$[92] = isPopoverOpen;
|
30078
|
+
$[93] = modalPopover;
|
30079
|
+
$[94] = onPopoverOpenChange;
|
30080
|
+
$[95] = t26;
|
30072
30081
|
$[96] = t38;
|
30082
|
+
$[97] = t39;
|
30073
30083
|
} else {
|
30074
|
-
|
30084
|
+
t39 = $[97];
|
30075
30085
|
}
|
30076
|
-
let
|
30077
|
-
if ($[
|
30078
|
-
|
30086
|
+
let t40;
|
30087
|
+
if ($[98] !== t18 || $[99] !== t19 || $[100] !== t39) {
|
30088
|
+
t40 = /* @__PURE__ */ jsxs(MultiSelectContext.Provider, { value: t18, children: [
|
30079
30089
|
t19,
|
30080
|
-
|
30090
|
+
t39
|
30081
30091
|
] });
|
30082
|
-
$[
|
30083
|
-
$[
|
30084
|
-
$[99] = t38;
|
30092
|
+
$[98] = t18;
|
30093
|
+
$[99] = t19;
|
30085
30094
|
$[100] = t39;
|
30095
|
+
$[101] = t40;
|
30086
30096
|
} else {
|
30087
|
-
|
30097
|
+
t40 = $[101];
|
30088
30098
|
}
|
30089
|
-
return
|
30099
|
+
return t40;
|
30090
30100
|
});
|
30091
30101
|
MultiSelect.displayName = "MultiSelect";
|
30092
30102
|
function MultiSelectItem(t0) {
|
@@ -30556,7 +30566,8 @@ const Select = forwardRef(({
|
|
30556
30566
|
}, ...props, children: [
|
30557
30567
|
typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label,
|
30558
30568
|
/* @__PURE__ */ jsx("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
|
30559
|
-
"min-h-[28px]": size === "
|
30569
|
+
"min-h-[28px]": size === "smallest",
|
30570
|
+
"min-h-[32px]": size === "small",
|
30560
30571
|
"min-h-[42px]": size === "medium",
|
30561
30572
|
"min-h-[64px]": size === "large",
|
30562
30573
|
"w-fit": !fullWidth,
|
@@ -30564,16 +30575,18 @@ const Select = forwardRef(({
|
|
30564
30575
|
}), children: /* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cls("h-full", padding ? {
|
30565
30576
|
"px-4": size === "large",
|
30566
30577
|
"px-3": size === "medium",
|
30567
|
-
"px-2": size === "small"
|
30578
|
+
"px-2": size === "small" || size === "smallest"
|
30568
30579
|
} : "", "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", {
|
30569
|
-
"min-h-[28px]": size === "
|
30580
|
+
"min-h-[28px]": size === "smallest",
|
30581
|
+
"min-h-[32px]": size === "small",
|
30570
30582
|
"min-h-[42px]": size === "medium",
|
30571
30583
|
"min-h-[64px]": size === "large",
|
30572
30584
|
"w-full": fullWidth,
|
30573
30585
|
"w-fit": !fullWidth
|
30574
30586
|
}, inputClassName), children: [
|
30575
30587
|
/* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
|
30576
|
-
"min-h-[28px]": size === "
|
30588
|
+
"min-h-[28px]": size === "smallest",
|
30589
|
+
"min-h-[32px]": size === "small",
|
30577
30590
|
"min-h-[42px]": size === "medium",
|
30578
30591
|
"min-h-[64px]": size === "large"
|
30579
30592
|
}), children: /* @__PURE__ */ jsxs(SelectPrimitive.Value, { onClick: (e) => {
|
@@ -31355,12 +31368,14 @@ const TextField = forwardRef(({
|
|
31355
31368
|
};
|
31356
31369
|
}, [inputRef, type]);
|
31357
31370
|
const input = multiline ? /* @__PURE__ */ jsx(TextareaAutosize, { ...inputProps, ref: inputRef, placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus, minRows, maxRows, value: value ?? "", onChange, style: inputStyle, className: cls(invisible ? focusedInvisibleMixin : "", "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8", disabled && "outline-none opacity-50 text-surface-accent-600 dark:text-surface-accent-500", inputClassName) }) : /* @__PURE__ */ jsx("input", { ...inputProps, ref: inputRef, disabled, style: inputStyle, className: cls("w-full outline-none bg-transparent leading-normal px-3", "rounded-md", "focused:text-text-primary focused:dark:text-text-primary-dark", invisible ? focusedInvisibleMixin : "", disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, {
|
31358
|
-
"min-h-[28px]": size === "
|
31371
|
+
"min-h-[28px]": size === "smallest",
|
31372
|
+
"min-h-[32px]": size === "small",
|
31359
31373
|
"min-h-[42px]": size === "medium",
|
31360
31374
|
"min-h-[64px]": size === "large"
|
31361
31375
|
}, 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 });
|
31362
31376
|
return /* @__PURE__ */ jsxs("div", { ref, className: cls("rounded-md relative max-w-full", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, error ? "border border-red-500 dark:border-red-600" : "", {
|
31363
|
-
"min-h-[28px]": size === "
|
31377
|
+
"min-h-[28px]": size === "smallest",
|
31378
|
+
"min-h-[32px]": size === "small",
|
31364
31379
|
"min-h-[42px]": size === "medium",
|
31365
31380
|
"min-h-[64px]": size === "large"
|
31366
31381
|
}, className), style, children: [
|
@@ -31369,7 +31384,7 @@ const TextField = forwardRef(({
|
|
31369
31384
|
endAdornment && /* @__PURE__ */ jsx("div", { className: cls("flex flex-row justify-center items-center absolute h-full right-0 top-0", {
|
31370
31385
|
"mr-4": size === "large",
|
31371
31386
|
"mr-3": size === "medium",
|
31372
|
-
"mr-2": size === "small"
|
31387
|
+
"mr-2": size === "small" || size === "smallest"
|
31373
31388
|
}), children: endAdornment })
|
31374
31389
|
] });
|
31375
31390
|
});
|