@firecms/ui 3.0.0-beta.13 → 3.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ export type AutocompleteProps = {
3
3
  children: React.ReactNode;
4
4
  open: boolean;
5
5
  setOpen: (open: boolean) => void;
6
+ className?: string;
6
7
  };
7
8
  export declare const useAutoComplete: ({ ref }: {
8
9
  ref: React.MutableRefObject<HTMLDivElement | null>;
@@ -11,9 +12,10 @@ export declare const useAutoComplete: ({ ref }: {
11
12
  autoCompleteOpen: boolean;
12
13
  setAutoCompleteOpen: React.Dispatch<React.SetStateAction<boolean>>;
13
14
  };
14
- export declare function Autocomplete({ children, open, setOpen }: AutocompleteProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Autocomplete({ children, open, setOpen, className }: AutocompleteProps): import("react/jsx-runtime").JSX.Element;
15
16
  export type AutocompleteItemProps = {
16
17
  children: React.ReactNode;
17
18
  onClick?: () => void;
19
+ className?: string;
18
20
  };
19
- export declare function AutocompleteItem({ children, onClick }: AutocompleteItemProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function AutocompleteItem({ children, onClick, className }: AutocompleteItemProps): import("react/jsx-runtime").JSX.Element;
@@ -23,6 +23,7 @@ export type SelectProps<T extends SelectValue = string> = {
23
23
  padding?: boolean;
24
24
  invisible?: boolean;
25
25
  children?: React.ReactNode;
26
+ dataType?: "string" | "number" | "boolean";
26
27
  };
27
28
  export declare const Select: React.ForwardRefExoticComponent<SelectProps<string> & React.RefAttributes<HTMLDivElement>>;
28
29
  export type SelectItemProps<T extends SelectValue = string> = {
package/dist/index.css CHANGED
@@ -71,3 +71,4 @@
71
71
  a {
72
72
  @apply text-blue-600 dark:text-blue-400 dark:hover:text-blue-600 hover:text-blue-800
73
73
  }
74
+
package/dist/index.es.js CHANGED
@@ -452,11 +452,12 @@ const useAutoComplete = ({
452
452
  };
453
453
  };
454
454
  function Autocomplete(t0) {
455
- const $ = c(13);
455
+ const $ = c(14);
456
456
  const {
457
457
  children,
458
458
  open,
459
- setOpen
459
+ setOpen,
460
+ className
460
461
  } = t0;
461
462
  const autocompleteRef = React__default.useRef(null);
462
463
  let t1;
@@ -479,50 +480,61 @@ function Autocomplete(t0) {
479
480
  }
480
481
  const t4 = open ? paperMixin : "";
481
482
  let t5;
482
- if ($[4] !== t4) {
483
- t5 = cls(t4, "bg-surface-50 dark:bg-surface-900 py-2");
484
- $[4] = t4;
485
- $[5] = t5;
483
+ if ($[4] !== className || $[5] !== t4) {
484
+ t5 = cls(t4, "bg-surface-50 dark:bg-surface-900", className);
485
+ $[4] = className;
486
+ $[5] = t4;
487
+ $[6] = t5;
486
488
  } else {
487
- t5 = $[5];
489
+ t5 = $[6];
488
490
  }
489
491
  let t6;
490
- if ($[6] !== children || $[7] !== t5) {
492
+ if ($[7] !== children || $[8] !== t5) {
491
493
  t6 = /* @__PURE__ */ jsx("div", { ref: autocompleteRef, className: t5, children });
492
- $[6] = children;
493
- $[7] = t5;
494
- $[8] = t6;
494
+ $[7] = children;
495
+ $[8] = t5;
496
+ $[9] = t6;
495
497
  } else {
496
- t6 = $[8];
498
+ t6 = $[9];
497
499
  }
498
500
  let t7;
499
- if ($[9] !== open || $[10] !== t3 || $[11] !== t6) {
500
- t7 = /* @__PURE__ */ jsx(Collapse, { in: open, duration: 50, className: t3, children: t6 });
501
- $[9] = open;
502
- $[10] = t3;
503
- $[11] = t6;
504
- $[12] = t7;
501
+ if ($[10] !== open || $[11] !== t3 || $[12] !== t6) {
502
+ t7 = /* @__PURE__ */ jsx(Collapse, { in: open, duration: 30, className: t3, children: t6 });
503
+ $[10] = open;
504
+ $[11] = t3;
505
+ $[12] = t6;
506
+ $[13] = t7;
505
507
  } else {
506
- t7 = $[12];
508
+ t7 = $[13];
507
509
  }
508
510
  return t7;
509
511
  }
510
512
  function AutocompleteItem(t0) {
511
- const $ = c(3);
513
+ const $ = c(6);
512
514
  const {
513
515
  children,
514
- onClick
516
+ onClick,
517
+ className
515
518
  } = t0;
516
519
  let t1;
517
- if ($[0] !== children || $[1] !== onClick) {
518
- t1 = /* @__PURE__ */ jsx("div", { className: "flex w-full items-center pr-6 pl-14 h-[48px] cursor-pointer hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800", onClick, children });
519
- $[0] = children;
520
- $[1] = onClick;
521
- $[2] = t1;
520
+ if ($[0] !== className) {
521
+ t1 = cls("flex w-full items-center h-[48px] cursor-pointer hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800", className);
522
+ $[0] = className;
523
+ $[1] = t1;
522
524
  } else {
523
- t1 = $[2];
525
+ t1 = $[1];
524
526
  }
525
- return t1;
527
+ let t2;
528
+ if ($[2] !== children || $[3] !== onClick || $[4] !== t1) {
529
+ t2 = /* @__PURE__ */ jsx("div", { className: t1, onClick, children });
530
+ $[2] = children;
531
+ $[3] = onClick;
532
+ $[4] = t1;
533
+ $[5] = t2;
534
+ } else {
535
+ t2 = $[5];
536
+ }
537
+ return t2;
526
538
  }
527
539
  const getSizeClasses = (size) => {
528
540
  switch (size) {
@@ -869,7 +881,7 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
869
881
  "border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t14,
870
882
  "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
871
883
  "border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:dark:bg-surface-700": t16,
872
- "border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 dark:text-text-primary-dark dark:hover:bg-surface-accent-700": t17,
884
+ "border border-transparent text-text-primary hover:text-text-primary hover:bg-surface-accent-200 dark:text-text-primary-dark dark:hover:text-text-primary-dark dark:hover:bg-surface-accent-700": t17,
873
885
  "border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
874
886
  "border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
875
887
  "border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
@@ -1267,6 +1279,7 @@ const Icon = React.forwardRef((t0, ref) => {
1267
1279
  if ($[0] !== style || $[1] !== t2) {
1268
1280
  t3 = {
1269
1281
  fontSize: t2,
1282
+ verticalAlign: "middle",
1270
1283
  ...style
1271
1284
  };
1272
1285
  $[0] = style;
@@ -1278,7 +1291,7 @@ const Icon = React.forwardRef((t0, ref) => {
1278
1291
  const t4 = color ? colorClassesMapping[color] : "";
1279
1292
  let t5;
1280
1293
  if ($[3] !== className || $[4] !== t4) {
1281
- t5 = cls("material-icons", "block", t4, "select-none", className);
1294
+ t5 = cls("material-icons", t4, "select-none", className);
1282
1295
  $[3] = className;
1283
1296
  $[4] = t4;
1284
1297
  $[5] = t5;
@@ -28708,7 +28721,7 @@ const Label = React.forwardRef((t0, ref) => {
28708
28721
  });
28709
28722
  Label.displayName = LabelPrimitive.Root.displayName;
28710
28723
  function LoadingButton(t0) {
28711
- const $ = c(17);
28724
+ const $ = c(18);
28712
28725
  let children;
28713
28726
  let disabled;
28714
28727
  let loading;
@@ -28742,31 +28755,32 @@ function LoadingButton(t0) {
28742
28755
  const t1 = loading || disabled;
28743
28756
  const t2 = props.component;
28744
28757
  let t3;
28745
- if ($[7] !== loading) {
28746
- t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: "small" });
28758
+ if ($[7] !== loading || $[8] !== props.size) {
28759
+ t3 = loading && /* @__PURE__ */ jsx(CircularProgress, { size: props.size === "small" ? "smallest" : "small" });
28747
28760
  $[7] = loading;
28748
- $[8] = t3;
28761
+ $[8] = props.size;
28762
+ $[9] = t3;
28749
28763
  } else {
28750
- t3 = $[8];
28764
+ t3 = $[9];
28751
28765
  }
28752
28766
  const t4 = !loading && startIcon;
28753
28767
  let t5;
28754
- if ($[9] !== children || $[10] !== onClick || $[11] !== props || $[12] !== t1 || $[13] !== t2 || $[14] !== t3 || $[15] !== t4) {
28768
+ if ($[10] !== children || $[11] !== onClick || $[12] !== props || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
28755
28769
  t5 = /* @__PURE__ */ jsxs(Button, { disabled: t1, onClick, component: t2, ...props, children: [
28756
28770
  t3,
28757
28771
  t4,
28758
28772
  children
28759
28773
  ] });
28760
- $[9] = children;
28761
- $[10] = onClick;
28762
- $[11] = props;
28763
- $[12] = t1;
28764
- $[13] = t2;
28765
- $[14] = t3;
28766
- $[15] = t4;
28767
- $[16] = t5;
28774
+ $[10] = children;
28775
+ $[11] = onClick;
28776
+ $[12] = props;
28777
+ $[13] = t1;
28778
+ $[14] = t2;
28779
+ $[15] = t3;
28780
+ $[16] = t4;
28781
+ $[17] = t5;
28768
28782
  } else {
28769
- t5 = $[16];
28783
+ t5 = $[17];
28770
28784
  }
28771
28785
  return t5;
28772
28786
  }
@@ -29653,7 +29667,7 @@ function SelectInputLabel(t0) {
29653
29667
  }
29654
29668
  const MultiSelectContext = React.createContext({});
29655
29669
  const MultiSelect = React.forwardRef((t0, ref) => {
29656
- const $ = c(102);
29670
+ const $ = c(103);
29657
29671
  const {
29658
29672
  value,
29659
29673
  size: t1,
@@ -29898,7 +29912,7 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29898
29912
  t24 = $[48];
29899
29913
  }
29900
29914
  let t25;
29901
- if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== toggleOption || $[57] !== useChips) {
29915
+ if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== size || $[57] !== toggleOption || $[58] !== useChips) {
29902
29916
  t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
29903
29917
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
29904
29918
  renderValues && renderValues(selectedValues),
@@ -29922,11 +29936,11 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29922
29936
  event_1.stopPropagation();
29923
29937
  handleClear();
29924
29938
  } }),
29925
- /* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29939
+ /* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29926
29940
  ] })
29927
29941
  ] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full mx-auto", children: [
29928
29942
  /* @__PURE__ */ jsx("span", { className: "text-sm", children: placeholder }),
29929
- /* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29943
+ /* @__PURE__ */ jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29930
29944
  ] });
29931
29945
  $[49] = children;
29932
29946
  $[50] = handleClear;
@@ -29935,104 +29949,105 @@ const MultiSelect = React.forwardRef((t0, ref) => {
29935
29949
  $[53] = placeholder;
29936
29950
  $[54] = renderValues;
29937
29951
  $[55] = selectedValues;
29938
- $[56] = toggleOption;
29939
- $[57] = useChips;
29940
- $[58] = t25;
29952
+ $[56] = size;
29953
+ $[57] = toggleOption;
29954
+ $[58] = useChips;
29955
+ $[59] = t25;
29941
29956
  } else {
29942
- t25 = $[58];
29957
+ t25 = $[59];
29943
29958
  }
29944
29959
  let t26;
29945
- if ($[59] !== handleTogglePopover || $[60] !== ref || $[61] !== t24 || $[62] !== t25) {
29960
+ if ($[60] !== handleTogglePopover || $[61] !== ref || $[62] !== t24 || $[63] !== t25) {
29946
29961
  t26 = /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { ref, onClick: handleTogglePopover, className: t24, children: t25 }) });
29947
- $[59] = handleTogglePopover;
29948
- $[60] = ref;
29949
- $[61] = t24;
29950
- $[62] = t25;
29951
- $[63] = t26;
29962
+ $[60] = handleTogglePopover;
29963
+ $[61] = ref;
29964
+ $[62] = t24;
29965
+ $[63] = t25;
29966
+ $[64] = t26;
29952
29967
  } else {
29953
- t26 = $[63];
29968
+ t26 = $[64];
29954
29969
  }
29955
29970
  let t27;
29956
- if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
29971
+ if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
29957
29972
  t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
29958
- $[64] = t27;
29973
+ $[65] = t27;
29959
29974
  } else {
29960
- t27 = $[64];
29975
+ t27 = $[65];
29961
29976
  }
29962
29977
  let t28;
29963
- if ($[65] !== onPopoverOpenChange) {
29978
+ if ($[66] !== onPopoverOpenChange) {
29964
29979
  t28 = () => onPopoverOpenChange(false);
29965
- $[65] = onPopoverOpenChange;
29966
- $[66] = t28;
29980
+ $[66] = onPopoverOpenChange;
29981
+ $[67] = t28;
29967
29982
  } else {
29968
- t28 = $[66];
29983
+ t28 = $[67];
29969
29984
  }
29970
29985
  let t29;
29971
- if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
29986
+ if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
29972
29987
  t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
29973
- $[67] = t29;
29988
+ $[68] = t29;
29974
29989
  } else {
29975
- t29 = $[67];
29990
+ t29 = $[68];
29976
29991
  }
29977
29992
  let t30;
29978
- if ($[68] !== handleInputKeyDown) {
29993
+ if ($[69] !== handleInputKeyDown) {
29979
29994
  t30 = /* @__PURE__ */ jsx(Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
29980
- $[68] = handleInputKeyDown;
29981
- $[69] = t30;
29995
+ $[69] = handleInputKeyDown;
29996
+ $[70] = t30;
29982
29997
  } else {
29983
- t30 = $[69];
29998
+ t30 = $[70];
29984
29999
  }
29985
30000
  let t31;
29986
- if ($[70] !== handleClear || $[71] !== selectedValues.length) {
30001
+ if ($[71] !== handleClear || $[72] !== selectedValues.length) {
29987
30002
  t31 = selectedValues.length > 0 && /* @__PURE__ */ jsx("div", { onClick: handleClear, className: "text-sm justify-center cursor-pointer py-3 px-4 text-text-secondary dark:text-text-secondary-dark", children: "Clear" });
29988
- $[70] = handleClear;
29989
- $[71] = selectedValues.length;
29990
- $[72] = t31;
30003
+ $[71] = handleClear;
30004
+ $[72] = selectedValues.length;
30005
+ $[73] = t31;
29991
30006
  } else {
29992
- t31 = $[72];
30007
+ t31 = $[73];
29993
30008
  }
29994
30009
  let t32;
29995
- if ($[73] !== t30 || $[74] !== t31) {
30010
+ if ($[74] !== t30 || $[75] !== t31) {
29996
30011
  t32 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center", children: [
29997
30012
  t30,
29998
30013
  t31
29999
30014
  ] });
30000
- $[73] = t30;
30001
- $[74] = t31;
30002
- $[75] = t32;
30015
+ $[74] = t30;
30016
+ $[75] = t31;
30017
+ $[76] = t32;
30003
30018
  } else {
30004
- t32 = $[75];
30019
+ t32 = $[76];
30005
30020
  }
30006
30021
  let t33;
30007
- if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
30022
+ if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
30008
30023
  t33 = /* @__PURE__ */ jsx(Separator, { orientation: "horizontal", className: "my-0" });
30009
- $[76] = t33;
30024
+ $[77] = t33;
30010
30025
  } else {
30011
- t33 = $[76];
30026
+ t33 = $[77];
30012
30027
  }
30013
30028
  let t34;
30014
- if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
30029
+ if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
30015
30030
  t34 = /* @__PURE__ */ jsx(Command.Empty, { className: "px-4 py-2", children: "No results found." });
30016
- $[77] = t34;
30031
+ $[78] = t34;
30017
30032
  } else {
30018
- t34 = $[77];
30033
+ t34 = $[78];
30019
30034
  }
30020
30035
  let t35;
30021
- if ($[78] !== allValues.length || $[79] !== includeSelectAll || $[80] !== selectedValues.length || $[81] !== toggleAll) {
30036
+ if ($[79] !== allValues.length || $[80] !== includeSelectAll || $[81] !== selectedValues.length || $[82] !== toggleAll) {
30022
30037
  t35 = includeSelectAll && /* @__PURE__ */ jsxs(Command.Item, { onSelect: toggleAll, className: cls("flex flex-row items-center gap-1.5", "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900"), children: [
30023
30038
  /* @__PURE__ */ jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
30024
30039
  /* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
30025
30040
  ] }, "all");
30026
- $[78] = allValues.length;
30027
- $[79] = includeSelectAll;
30028
- $[80] = selectedValues.length;
30029
- $[81] = toggleAll;
30030
- $[82] = t35;
30041
+ $[79] = allValues.length;
30042
+ $[80] = includeSelectAll;
30043
+ $[81] = selectedValues.length;
30044
+ $[82] = toggleAll;
30045
+ $[83] = t35;
30031
30046
  } else {
30032
- t35 = $[82];
30047
+ t35 = $[83];
30033
30048
  }
30034
30049
  let t36;
30035
- if ($[83] !== children || $[84] !== t35) {
30050
+ if ($[84] !== children || $[85] !== t35) {
30036
30051
  t36 = /* @__PURE__ */ jsxs(Command.List, { children: [
30037
30052
  t34,
30038
30053
  /* @__PURE__ */ jsxs(Command.Group, { children: [
@@ -30040,61 +30055,61 @@ const MultiSelect = React.forwardRef((t0, ref) => {
30040
30055
  children
30041
30056
  ] })
30042
30057
  ] });
30043
- $[83] = children;
30044
- $[84] = t35;
30045
- $[85] = t36;
30058
+ $[84] = children;
30059
+ $[85] = t35;
30060
+ $[86] = t36;
30046
30061
  } else {
30047
- t36 = $[85];
30062
+ t36 = $[86];
30048
30063
  }
30049
30064
  let t37;
30050
- if ($[86] !== t32 || $[87] !== t36) {
30065
+ if ($[87] !== t32 || $[88] !== t36) {
30051
30066
  t37 = /* @__PURE__ */ jsxs(Command, { children: [
30052
30067
  t32,
30053
30068
  t33,
30054
30069
  t36
30055
30070
  ] });
30056
- $[86] = t32;
30057
- $[87] = t36;
30058
- $[88] = t37;
30071
+ $[87] = t32;
30072
+ $[88] = t36;
30073
+ $[89] = t37;
30059
30074
  } else {
30060
- t37 = $[88];
30075
+ t37 = $[89];
30061
30076
  }
30062
30077
  let t38;
30063
- if ($[89] !== t28 || $[90] !== t37) {
30078
+ if ($[90] !== t28 || $[91] !== t37) {
30064
30079
  t38 = /* @__PURE__ */ jsx(PopoverPrimitive.Content, { className: t27, align: "start", sideOffset: 8, onEscapeKeyDown: t28, children: t37 });
30065
- $[89] = t28;
30066
- $[90] = t37;
30067
- $[91] = t38;
30080
+ $[90] = t28;
30081
+ $[91] = t37;
30082
+ $[92] = t38;
30068
30083
  } else {
30069
- t38 = $[91];
30084
+ t38 = $[92];
30070
30085
  }
30071
30086
  let t39;
30072
- if ($[92] !== isPopoverOpen || $[93] !== modalPopover || $[94] !== onPopoverOpenChange || $[95] !== t26 || $[96] !== t38) {
30087
+ if ($[93] !== isPopoverOpen || $[94] !== modalPopover || $[95] !== onPopoverOpenChange || $[96] !== t26 || $[97] !== t38) {
30073
30088
  t39 = /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
30074
30089
  t26,
30075
30090
  t38
30076
30091
  ] });
30077
- $[92] = isPopoverOpen;
30078
- $[93] = modalPopover;
30079
- $[94] = onPopoverOpenChange;
30080
- $[95] = t26;
30081
- $[96] = t38;
30082
- $[97] = t39;
30092
+ $[93] = isPopoverOpen;
30093
+ $[94] = modalPopover;
30094
+ $[95] = onPopoverOpenChange;
30095
+ $[96] = t26;
30096
+ $[97] = t38;
30097
+ $[98] = t39;
30083
30098
  } else {
30084
- t39 = $[97];
30099
+ t39 = $[98];
30085
30100
  }
30086
30101
  let t40;
30087
- if ($[98] !== t18 || $[99] !== t19 || $[100] !== t39) {
30102
+ if ($[99] !== t18 || $[100] !== t19 || $[101] !== t39) {
30088
30103
  t40 = /* @__PURE__ */ jsxs(MultiSelectContext.Provider, { value: t18, children: [
30089
30104
  t19,
30090
30105
  t39
30091
30106
  ] });
30092
- $[98] = t18;
30093
- $[99] = t19;
30094
- $[100] = t39;
30095
- $[101] = t40;
30107
+ $[99] = t18;
30108
+ $[100] = t19;
30109
+ $[101] = t39;
30110
+ $[102] = t40;
30096
30111
  } else {
30097
- t40 = $[101];
30112
+ t40 = $[102];
30098
30113
  }
30099
30114
  return t40;
30100
30115
  });
@@ -30536,6 +30551,7 @@ const Select = forwardRef(({
30536
30551
  endAdornment,
30537
30552
  invisible,
30538
30553
  children,
30554
+ dataType = "string",
30539
30555
  ...props
30540
30556
  }, ref) => {
30541
30557
  const [openInternal, setOpenInternal] = useState(open ?? false);
@@ -30544,9 +30560,12 @@ const Select = forwardRef(({
30544
30560
  }, [open]);
30545
30561
  const onValueChangeInternal = useCallback((newValue) => {
30546
30562
  let typedValue = newValue;
30547
- if (newValue === "true") typedValue = true;
30548
- else if (newValue === "false") typedValue = false;
30549
- else if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
30563
+ if (dataType === "boolean") {
30564
+ if (newValue === "true") typedValue = true;
30565
+ else if (newValue === "false") typedValue = false;
30566
+ } else if (dataType === "number") {
30567
+ if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
30568
+ }
30550
30569
  onValueChange?.(typedValue);
30551
30570
  if (onChange) {
30552
30571
  const event = {
@@ -30565,54 +30584,56 @@ const Select = forwardRef(({
30565
30584
  setOpenInternal(open_0);
30566
30585
  }, ...props, children: [
30567
30586
  typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label,
30568
- /* @__PURE__ */ jsx("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
30587
+ /* @__PURE__ */ jsxs("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
30569
30588
  "min-h-[28px]": size === "smallest",
30570
30589
  "min-h-[32px]": size === "small",
30571
30590
  "min-h-[42px]": size === "medium",
30572
30591
  "min-h-[64px]": size === "large",
30573
30592
  "w-fit": !fullWidth,
30574
30593
  "w-full": fullWidth
30575
- }), children: /* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cls("h-full", padding ? {
30576
- "px-4": size === "large",
30577
- "px-3": size === "medium",
30578
- "px-2": size === "small" || size === "smallest"
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", {
30580
- "min-h-[28px]": size === "smallest",
30581
- "min-h-[32px]": size === "small",
30582
- "min-h-[42px]": size === "medium",
30583
- "min-h-[64px]": size === "large",
30584
- "w-full": fullWidth,
30585
- "w-fit": !fullWidth
30586
- }, inputClassName), children: [
30587
- /* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
30594
+ }), children: [
30595
+ /* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cls("h-full", padding ? {
30596
+ "px-4": size === "large",
30597
+ "px-3": size === "medium",
30598
+ "px-2": size === "small" || size === "smallest"
30599
+ } : "", "outline-none focus:outline-none", "select-none rounded-md text-sm", error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark", error ? "border border-red-500 dark:border-red-600" : "", disabled ? "text-surface-accent-600 dark:text-surface-accent-400" : "text-surface-accent-800 dark:text-white", "relative flex flex-row items-center", {
30588
30600
  "min-h-[28px]": size === "smallest",
30589
30601
  "min-h-[32px]": size === "small",
30590
30602
  "min-h-[42px]": size === "medium",
30591
- "min-h-[64px]": size === "large"
30592
- }), children: /* @__PURE__ */ jsxs(SelectPrimitive.Value, { onClick: (e) => {
30593
- e.preventDefault();
30594
- e.stopPropagation();
30595
- }, placeholder, className: "w-full", children: [
30596
- hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
30597
- hasValue && !renderValue && (() => {
30598
- const childrenProps = Children.map(children, (child) => {
30599
- if (React__default.isValidElement(child)) {
30600
- return child.props;
30601
- }
30602
- }).filter(Boolean);
30603
- const option = childrenProps.find((o) => String(o.value) === String(value));
30604
- return option?.children;
30605
- })()
30603
+ "min-h-[64px]": size === "large",
30604
+ "w-full": fullWidth,
30605
+ "w-fit": !fullWidth
30606
+ }, inputClassName), children: [
30607
+ /* @__PURE__ */ jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
30608
+ "min-h-[28px]": size === "smallest",
30609
+ "min-h-[32px]": size === "small",
30610
+ "min-h-[42px]": size === "medium",
30611
+ "min-h-[64px]": size === "large"
30612
+ }), children: /* @__PURE__ */ jsxs(SelectPrimitive.Value, { onClick: (e) => {
30613
+ e.preventDefault();
30614
+ e.stopPropagation();
30615
+ }, placeholder, className: "w-full", children: [
30616
+ hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
30617
+ hasValue && !renderValue && (() => {
30618
+ const childrenProps = Children.map(children, (child) => {
30619
+ if (React__default.isValidElement(child)) {
30620
+ return child.props;
30621
+ }
30622
+ }).filter(Boolean);
30623
+ const option = childrenProps.find((o) => String(o.value) === String(value));
30624
+ return option?.children;
30625
+ })()
30626
+ ] }) }),
30627
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", open ? "rotate-180" : "", {
30628
+ "px-2": size === "large",
30629
+ "px-1": size === "medium" || size === "small"
30630
+ }) }) })
30606
30631
  ] }) }),
30607
- endAdornment && /* @__PURE__ */ jsx("div", { className: cls("h-full flex items-center"), onClick: (e_0) => {
30632
+ endAdornment && /* @__PURE__ */ jsx("div", { className: cls("h-full flex items-center absolute right-0 pr-12"), onClick: (e_0) => {
30608
30633
  e_0.preventDefault();
30609
30634
  e_0.stopPropagation();
30610
- }, children: endAdornment }),
30611
- /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, { size: "medium", className: cls("transition", open ? "rotate-180" : "", {
30612
- "px-2": size === "large",
30613
- "px-1": size === "medium" || size === "small"
30614
- }) }) })
30615
- ] }) }) }),
30635
+ }, children: endAdornment })
30636
+ ] }),
30616
30637
  /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(SelectPrimitive.Content, { position, className: cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin), children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "p-1", style: {
30617
30638
  maxHeight: "var(--radix-select-content-available-height)"
30618
30639
  }, children }) }) })