@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.
package/dist/index.umd.js CHANGED
@@ -462,11 +462,12 @@
462
462
  };
463
463
  };
464
464
  function Autocomplete(t0) {
465
- const $ = reactCompilerRuntime.c(13);
465
+ const $ = reactCompilerRuntime.c(14);
466
466
  const {
467
467
  children,
468
468
  open,
469
- setOpen
469
+ setOpen,
470
+ className
470
471
  } = t0;
471
472
  const autocompleteRef = React.useRef(null);
472
473
  let t1;
@@ -489,50 +490,61 @@
489
490
  }
490
491
  const t4 = open ? paperMixin : "";
491
492
  let t5;
492
- if ($[4] !== t4) {
493
- t5 = cls(t4, "bg-surface-50 dark:bg-surface-900 py-2");
494
- $[4] = t4;
495
- $[5] = t5;
493
+ if ($[4] !== className || $[5] !== t4) {
494
+ t5 = cls(t4, "bg-surface-50 dark:bg-surface-900", className);
495
+ $[4] = className;
496
+ $[5] = t4;
497
+ $[6] = t5;
496
498
  } else {
497
- t5 = $[5];
499
+ t5 = $[6];
498
500
  }
499
501
  let t6;
500
- if ($[6] !== children || $[7] !== t5) {
502
+ if ($[7] !== children || $[8] !== t5) {
501
503
  t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: autocompleteRef, className: t5, children });
502
- $[6] = children;
503
- $[7] = t5;
504
- $[8] = t6;
504
+ $[7] = children;
505
+ $[8] = t5;
506
+ $[9] = t6;
505
507
  } else {
506
- t6 = $[8];
508
+ t6 = $[9];
507
509
  }
508
510
  let t7;
509
- if ($[9] !== open || $[10] !== t3 || $[11] !== t6) {
510
- t7 = /* @__PURE__ */ jsxRuntime.jsx(Collapse, { in: open, duration: 50, className: t3, children: t6 });
511
- $[9] = open;
512
- $[10] = t3;
513
- $[11] = t6;
514
- $[12] = t7;
511
+ if ($[10] !== open || $[11] !== t3 || $[12] !== t6) {
512
+ t7 = /* @__PURE__ */ jsxRuntime.jsx(Collapse, { in: open, duration: 30, className: t3, children: t6 });
513
+ $[10] = open;
514
+ $[11] = t3;
515
+ $[12] = t6;
516
+ $[13] = t7;
515
517
  } else {
516
- t7 = $[12];
518
+ t7 = $[13];
517
519
  }
518
520
  return t7;
519
521
  }
520
522
  function AutocompleteItem(t0) {
521
- const $ = reactCompilerRuntime.c(3);
523
+ const $ = reactCompilerRuntime.c(6);
522
524
  const {
523
525
  children,
524
- onClick
526
+ onClick,
527
+ className
525
528
  } = t0;
526
529
  let t1;
527
- if ($[0] !== children || $[1] !== onClick) {
528
- t1 = /* @__PURE__ */ jsxRuntime.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 });
529
- $[0] = children;
530
- $[1] = onClick;
531
- $[2] = t1;
530
+ if ($[0] !== className) {
531
+ t1 = cls("flex w-full items-center h-[48px] cursor-pointer hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800", className);
532
+ $[0] = className;
533
+ $[1] = t1;
532
534
  } else {
533
- t1 = $[2];
535
+ t1 = $[1];
534
536
  }
535
- return t1;
537
+ let t2;
538
+ if ($[2] !== children || $[3] !== onClick || $[4] !== t1) {
539
+ t2 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t1, onClick, children });
540
+ $[2] = children;
541
+ $[3] = onClick;
542
+ $[4] = t1;
543
+ $[5] = t2;
544
+ } else {
545
+ t2 = $[5];
546
+ }
547
+ return t2;
536
548
  }
537
549
  const getSizeClasses = (size) => {
538
550
  switch (size) {
@@ -879,7 +891,7 @@
879
891
  "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
892
  "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
881
893
  "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,
894
+ "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,
883
895
  "border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
884
896
  "border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
885
897
  "border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
@@ -1277,6 +1289,7 @@
1277
1289
  if ($[0] !== style || $[1] !== t2) {
1278
1290
  t3 = {
1279
1291
  fontSize: t2,
1292
+ verticalAlign: "middle",
1280
1293
  ...style
1281
1294
  };
1282
1295
  $[0] = style;
@@ -1288,7 +1301,7 @@
1288
1301
  const t4 = color ? colorClassesMapping[color] : "";
1289
1302
  let t5;
1290
1303
  if ($[3] !== className || $[4] !== t4) {
1291
- t5 = cls("material-icons", "block", t4, "select-none", className);
1304
+ t5 = cls("material-icons", t4, "select-none", className);
1292
1305
  $[3] = className;
1293
1306
  $[4] = t4;
1294
1307
  $[5] = t5;
@@ -28718,7 +28731,7 @@
28718
28731
  });
28719
28732
  Label.displayName = LabelPrimitive__namespace.Root.displayName;
28720
28733
  function LoadingButton(t0) {
28721
- const $ = reactCompilerRuntime.c(17);
28734
+ const $ = reactCompilerRuntime.c(18);
28722
28735
  let children;
28723
28736
  let disabled;
28724
28737
  let loading;
@@ -28752,31 +28765,32 @@
28752
28765
  const t1 = loading || disabled;
28753
28766
  const t2 = props.component;
28754
28767
  let t3;
28755
- if ($[7] !== loading) {
28756
- t3 = loading && /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, { size: "small" });
28768
+ if ($[7] !== loading || $[8] !== props.size) {
28769
+ t3 = loading && /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, { size: props.size === "small" ? "smallest" : "small" });
28757
28770
  $[7] = loading;
28758
- $[8] = t3;
28771
+ $[8] = props.size;
28772
+ $[9] = t3;
28759
28773
  } else {
28760
- t3 = $[8];
28774
+ t3 = $[9];
28761
28775
  }
28762
28776
  const t4 = !loading && startIcon;
28763
28777
  let t5;
28764
- if ($[9] !== children || $[10] !== onClick || $[11] !== props || $[12] !== t1 || $[13] !== t2 || $[14] !== t3 || $[15] !== t4) {
28778
+ if ($[10] !== children || $[11] !== onClick || $[12] !== props || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
28765
28779
  t5 = /* @__PURE__ */ jsxRuntime.jsxs(Button, { disabled: t1, onClick, component: t2, ...props, children: [
28766
28780
  t3,
28767
28781
  t4,
28768
28782
  children
28769
28783
  ] });
28770
- $[9] = children;
28771
- $[10] = onClick;
28772
- $[11] = props;
28773
- $[12] = t1;
28774
- $[13] = t2;
28775
- $[14] = t3;
28776
- $[15] = t4;
28777
- $[16] = t5;
28784
+ $[10] = children;
28785
+ $[11] = onClick;
28786
+ $[12] = props;
28787
+ $[13] = t1;
28788
+ $[14] = t2;
28789
+ $[15] = t3;
28790
+ $[16] = t4;
28791
+ $[17] = t5;
28778
28792
  } else {
28779
- t5 = $[16];
28793
+ t5 = $[17];
28780
28794
  }
28781
28795
  return t5;
28782
28796
  }
@@ -29663,7 +29677,7 @@
29663
29677
  }
29664
29678
  const MultiSelectContext = React__namespace.createContext({});
29665
29679
  const MultiSelect = React__namespace.forwardRef((t0, ref) => {
29666
- const $ = reactCompilerRuntime.c(102);
29680
+ const $ = reactCompilerRuntime.c(103);
29667
29681
  const {
29668
29682
  value,
29669
29683
  size: t1,
@@ -29908,7 +29922,7 @@
29908
29922
  t24 = $[48];
29909
29923
  }
29910
29924
  let t25;
29911
- if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== toggleOption || $[57] !== useChips) {
29925
+ if ($[49] !== children || $[50] !== handleClear || $[51] !== includeClear || $[52] !== isPopoverOpen || $[53] !== placeholder || $[54] !== renderValues || $[55] !== selectedValues || $[56] !== size || $[57] !== toggleOption || $[58] !== useChips) {
29912
29926
  t25 = selectedValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center w-full", children: [
29913
29927
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
29914
29928
  renderValues && renderValues(selectedValues),
@@ -29932,11 +29946,11 @@
29932
29946
  event_1.stopPropagation();
29933
29947
  handleClear();
29934
29948
  } }),
29935
- /* @__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" : "") }) })
29949
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29936
29950
  ] })
29937
29951
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full mx-auto", children: [
29938
29952
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: placeholder }),
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" : "") }) })
29953
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", isPopoverOpen ? "rotate-180" : "") }) })
29940
29954
  ] });
29941
29955
  $[49] = children;
29942
29956
  $[50] = handleClear;
@@ -29945,104 +29959,105 @@
29945
29959
  $[53] = placeholder;
29946
29960
  $[54] = renderValues;
29947
29961
  $[55] = selectedValues;
29948
- $[56] = toggleOption;
29949
- $[57] = useChips;
29950
- $[58] = t25;
29962
+ $[56] = size;
29963
+ $[57] = toggleOption;
29964
+ $[58] = useChips;
29965
+ $[59] = t25;
29951
29966
  } else {
29952
- t25 = $[58];
29967
+ t25 = $[59];
29953
29968
  }
29954
29969
  let t26;
29955
- if ($[59] !== handleTogglePopover || $[60] !== ref || $[61] !== t24 || $[62] !== t25) {
29970
+ if ($[60] !== handleTogglePopover || $[61] !== ref || $[62] !== t24 || $[63] !== t25) {
29956
29971
  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;
29972
+ $[60] = handleTogglePopover;
29973
+ $[61] = ref;
29974
+ $[62] = t24;
29975
+ $[63] = t25;
29976
+ $[64] = t26;
29962
29977
  } else {
29963
- t26 = $[63];
29978
+ t26 = $[64];
29964
29979
  }
29965
29980
  let t27;
29966
- if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
29981
+ if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
29967
29982
  t27 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
29968
- $[64] = t27;
29983
+ $[65] = t27;
29969
29984
  } else {
29970
- t27 = $[64];
29985
+ t27 = $[65];
29971
29986
  }
29972
29987
  let t28;
29973
- if ($[65] !== onPopoverOpenChange) {
29988
+ if ($[66] !== onPopoverOpenChange) {
29974
29989
  t28 = () => onPopoverOpenChange(false);
29975
- $[65] = onPopoverOpenChange;
29976
- $[66] = t28;
29990
+ $[66] = onPopoverOpenChange;
29991
+ $[67] = t28;
29977
29992
  } else {
29978
- t28 = $[66];
29993
+ t28 = $[67];
29979
29994
  }
29980
29995
  let t29;
29981
- if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
29996
+ if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
29982
29997
  t29 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
29983
- $[67] = t29;
29998
+ $[68] = t29;
29984
29999
  } else {
29985
- t29 = $[67];
30000
+ t29 = $[68];
29986
30001
  }
29987
30002
  let t30;
29988
- if ($[68] !== handleInputKeyDown) {
30003
+ if ($[69] !== handleInputKeyDown) {
29989
30004
  t30 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Input, { className: t29, placeholder: "Search...", onKeyDown: handleInputKeyDown });
29990
- $[68] = handleInputKeyDown;
29991
- $[69] = t30;
30005
+ $[69] = handleInputKeyDown;
30006
+ $[70] = t30;
29992
30007
  } else {
29993
- t30 = $[69];
30008
+ t30 = $[70];
29994
30009
  }
29995
30010
  let t31;
29996
- if ($[70] !== handleClear || $[71] !== selectedValues.length) {
30011
+ if ($[71] !== handleClear || $[72] !== selectedValues.length) {
29997
30012
  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;
30013
+ $[71] = handleClear;
30014
+ $[72] = selectedValues.length;
30015
+ $[73] = t31;
30001
30016
  } else {
30002
- t31 = $[72];
30017
+ t31 = $[73];
30003
30018
  }
30004
30019
  let t32;
30005
- if ($[73] !== t30 || $[74] !== t31) {
30020
+ if ($[74] !== t30 || $[75] !== t31) {
30006
30021
  t32 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center", children: [
30007
30022
  t30,
30008
30023
  t31
30009
30024
  ] });
30010
- $[73] = t30;
30011
- $[74] = t31;
30012
- $[75] = t32;
30025
+ $[74] = t30;
30026
+ $[75] = t31;
30027
+ $[76] = t32;
30013
30028
  } else {
30014
- t32 = $[75];
30029
+ t32 = $[76];
30015
30030
  }
30016
30031
  let t33;
30017
- if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
30032
+ if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
30018
30033
  t33 = /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "horizontal", className: "my-0" });
30019
- $[76] = t33;
30034
+ $[77] = t33;
30020
30035
  } else {
30021
- t33 = $[76];
30036
+ t33 = $[77];
30022
30037
  }
30023
30038
  let t34;
30024
- if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
30039
+ if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
30025
30040
  t34 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { className: "px-4 py-2", children: "No results found." });
30026
- $[77] = t34;
30041
+ $[78] = t34;
30027
30042
  } else {
30028
- t34 = $[77];
30043
+ t34 = $[78];
30029
30044
  }
30030
30045
  let t35;
30031
- if ($[78] !== allValues.length || $[79] !== includeSelectAll || $[80] !== selectedValues.length || $[81] !== toggleAll) {
30046
+ if ($[79] !== allValues.length || $[80] !== includeSelectAll || $[81] !== selectedValues.length || $[82] !== toggleAll) {
30032
30047
  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: [
30033
30048
  /* @__PURE__ */ jsxRuntime.jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
30034
30049
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
30035
30050
  ] }, "all");
30036
- $[78] = allValues.length;
30037
- $[79] = includeSelectAll;
30038
- $[80] = selectedValues.length;
30039
- $[81] = toggleAll;
30040
- $[82] = t35;
30051
+ $[79] = allValues.length;
30052
+ $[80] = includeSelectAll;
30053
+ $[81] = selectedValues.length;
30054
+ $[82] = toggleAll;
30055
+ $[83] = t35;
30041
30056
  } else {
30042
- t35 = $[82];
30057
+ t35 = $[83];
30043
30058
  }
30044
30059
  let t36;
30045
- if ($[83] !== children || $[84] !== t35) {
30060
+ if ($[84] !== children || $[85] !== t35) {
30046
30061
  t36 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
30047
30062
  t34,
30048
30063
  /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Group, { children: [
@@ -30050,61 +30065,61 @@
30050
30065
  children
30051
30066
  ] })
30052
30067
  ] });
30053
- $[83] = children;
30054
- $[84] = t35;
30055
- $[85] = t36;
30068
+ $[84] = children;
30069
+ $[85] = t35;
30070
+ $[86] = t36;
30056
30071
  } else {
30057
- t36 = $[85];
30072
+ t36 = $[86];
30058
30073
  }
30059
30074
  let t37;
30060
- if ($[86] !== t32 || $[87] !== t36) {
30075
+ if ($[87] !== t32 || $[88] !== t36) {
30061
30076
  t37 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
30062
30077
  t32,
30063
30078
  t33,
30064
30079
  t36
30065
30080
  ] });
30066
- $[86] = t32;
30067
- $[87] = t36;
30068
- $[88] = t37;
30081
+ $[87] = t32;
30082
+ $[88] = t36;
30083
+ $[89] = t37;
30069
30084
  } else {
30070
- t37 = $[88];
30085
+ t37 = $[89];
30071
30086
  }
30072
30087
  let t38;
30073
- if ($[89] !== t28 || $[90] !== t37) {
30088
+ if ($[90] !== t28 || $[91] !== t37) {
30074
30089
  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;
30090
+ $[90] = t28;
30091
+ $[91] = t37;
30092
+ $[92] = t38;
30078
30093
  } else {
30079
- t38 = $[91];
30094
+ t38 = $[92];
30080
30095
  }
30081
30096
  let t39;
30082
- if ($[92] !== isPopoverOpen || $[93] !== modalPopover || $[94] !== onPopoverOpenChange || $[95] !== t26 || $[96] !== t38) {
30097
+ if ($[93] !== isPopoverOpen || $[94] !== modalPopover || $[95] !== onPopoverOpenChange || $[96] !== t26 || $[97] !== t38) {
30083
30098
  t39 = /* @__PURE__ */ jsxRuntime.jsxs(PopoverPrimitive__namespace.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
30084
30099
  t26,
30085
30100
  t38
30086
30101
  ] });
30087
- $[92] = isPopoverOpen;
30088
- $[93] = modalPopover;
30089
- $[94] = onPopoverOpenChange;
30090
- $[95] = t26;
30091
- $[96] = t38;
30092
- $[97] = t39;
30102
+ $[93] = isPopoverOpen;
30103
+ $[94] = modalPopover;
30104
+ $[95] = onPopoverOpenChange;
30105
+ $[96] = t26;
30106
+ $[97] = t38;
30107
+ $[98] = t39;
30093
30108
  } else {
30094
- t39 = $[97];
30109
+ t39 = $[98];
30095
30110
  }
30096
30111
  let t40;
30097
- if ($[98] !== t18 || $[99] !== t19 || $[100] !== t39) {
30112
+ if ($[99] !== t18 || $[100] !== t19 || $[101] !== t39) {
30098
30113
  t40 = /* @__PURE__ */ jsxRuntime.jsxs(MultiSelectContext.Provider, { value: t18, children: [
30099
30114
  t19,
30100
30115
  t39
30101
30116
  ] });
30102
- $[98] = t18;
30103
- $[99] = t19;
30104
- $[100] = t39;
30105
- $[101] = t40;
30117
+ $[99] = t18;
30118
+ $[100] = t19;
30119
+ $[101] = t39;
30120
+ $[102] = t40;
30106
30121
  } else {
30107
- t40 = $[101];
30122
+ t40 = $[102];
30108
30123
  }
30109
30124
  return t40;
30110
30125
  });
@@ -30546,6 +30561,7 @@
30546
30561
  endAdornment,
30547
30562
  invisible,
30548
30563
  children,
30564
+ dataType = "string",
30549
30565
  ...props
30550
30566
  }, ref) => {
30551
30567
  const [openInternal, setOpenInternal] = React.useState(open ?? false);
@@ -30554,9 +30570,12 @@
30554
30570
  }, [open]);
30555
30571
  const onValueChangeInternal = React.useCallback((newValue) => {
30556
30572
  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);
30573
+ if (dataType === "boolean") {
30574
+ if (newValue === "true") typedValue = true;
30575
+ else if (newValue === "false") typedValue = false;
30576
+ } else if (dataType === "number") {
30577
+ if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
30578
+ }
30560
30579
  onValueChange?.(typedValue);
30561
30580
  if (onChange) {
30562
30581
  const event = {
@@ -30575,54 +30594,56 @@
30575
30594
  setOpenInternal(open_0);
30576
30595
  }, ...props, children: [
30577
30596
  typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label,
30578
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
30597
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
30579
30598
  "min-h-[28px]": size === "smallest",
30580
30599
  "min-h-[32px]": size === "small",
30581
30600
  "min-h-[42px]": size === "medium",
30582
30601
  "min-h-[64px]": size === "large",
30583
30602
  "w-fit": !fullWidth,
30584
30603
  "w-full": fullWidth
30585
- }), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls("h-full", padding ? {
30586
- "px-4": size === "large",
30587
- "px-3": size === "medium",
30588
- "px-2": size === "small" || size === "smallest"
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", {
30590
- "min-h-[28px]": size === "smallest",
30591
- "min-h-[32px]": size === "small",
30592
- "min-h-[42px]": size === "medium",
30593
- "min-h-[64px]": size === "large",
30594
- "w-full": fullWidth,
30595
- "w-fit": !fullWidth
30596
- }, inputClassName), children: [
30597
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
30604
+ }), children: [
30605
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Trigger, { ref: inputRef, id, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls("h-full", padding ? {
30606
+ "px-4": size === "large",
30607
+ "px-3": size === "medium",
30608
+ "px-2": size === "small" || size === "smallest"
30609
+ } : "", "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", {
30598
30610
  "min-h-[28px]": size === "smallest",
30599
30611
  "min-h-[32px]": size === "small",
30600
30612
  "min-h-[42px]": size === "medium",
30601
- "min-h-[64px]": size === "large"
30602
- }), children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Value, { onClick: (e) => {
30603
- e.preventDefault();
30604
- e.stopPropagation();
30605
- }, placeholder, className: "w-full", children: [
30606
- hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
30607
- hasValue && !renderValue && (() => {
30608
- const childrenProps = React.Children.map(children, (child) => {
30609
- if (React.isValidElement(child)) {
30610
- return child.props;
30611
- }
30612
- }).filter(Boolean);
30613
- const option = childrenProps.find((o) => String(o.value) === String(value));
30614
- return option?.children;
30615
- })()
30613
+ "min-h-[64px]": size === "large",
30614
+ "w-full": fullWidth,
30615
+ "w-fit": !fullWidth
30616
+ }, inputClassName), children: [
30617
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
30618
+ "min-h-[28px]": size === "smallest",
30619
+ "min-h-[32px]": size === "small",
30620
+ "min-h-[42px]": size === "medium",
30621
+ "min-h-[64px]": size === "large"
30622
+ }), children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Value, { onClick: (e) => {
30623
+ e.preventDefault();
30624
+ e.stopPropagation();
30625
+ }, placeholder, className: "w-full", children: [
30626
+ hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
30627
+ hasValue && !renderValue && (() => {
30628
+ const childrenProps = React.Children.map(children, (child) => {
30629
+ if (React.isValidElement(child)) {
30630
+ return child.props;
30631
+ }
30632
+ }).filter(Boolean);
30633
+ const option = childrenProps.find((o) => String(o.value) === String(value));
30634
+ return option?.children;
30635
+ })()
30636
+ ] }) }),
30637
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", open ? "rotate-180" : "", {
30638
+ "px-2": size === "large",
30639
+ "px-1": size === "medium" || size === "small"
30640
+ }) }) })
30616
30641
  ] }) }),
30617
- endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("h-full flex items-center"), onClick: (e_0) => {
30642
+ endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("h-full flex items-center absolute right-0 pr-12"), onClick: (e_0) => {
30618
30643
  e_0.preventDefault();
30619
30644
  e_0.stopPropagation();
30620
- }, children: endAdornment }),
30621
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: "medium", className: cls("transition", open ? "rotate-180" : "", {
30622
- "px-2": size === "large",
30623
- "px-1": size === "medium" || size === "small"
30624
- }) }) })
30625
- ] }) }) }),
30645
+ }, children: endAdornment })
30646
+ ] }),
30626
30647
  /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Content, { position, className: cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: "p-1", style: {
30627
30648
  maxHeight: "var(--radix-select-content-available-height)"
30628
30649
  }, children }) }) })