@firecms/ui 3.0.1 → 3.1.0-canary.02232f4

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.
Files changed (77) hide show
  1. package/README.md +9 -7
  2. package/dist/components/BooleanSwitchWithLabel.d.ts +2 -1
  3. package/dist/components/Card.d.ts +1 -1
  4. package/dist/components/Chip.d.ts +1 -1
  5. package/dist/components/ColorPicker.d.ts +30 -0
  6. package/dist/components/DateTimeField.d.ts +7 -0
  7. package/dist/components/Dialog.d.ts +2 -1
  8. package/dist/components/FileUpload.d.ts +1 -1
  9. package/dist/components/Menu.d.ts +2 -1
  10. package/dist/components/Menubar.d.ts +2 -1
  11. package/dist/components/MultiSelect.d.ts +2 -1
  12. package/dist/components/ResizablePanels.d.ts +16 -0
  13. package/dist/components/SearchBar.d.ts +11 -1
  14. package/dist/components/SearchableSelect.d.ts +48 -0
  15. package/dist/components/Select.d.ts +2 -1
  16. package/dist/components/Sheet.d.ts +1 -0
  17. package/dist/components/Tabs.d.ts +8 -1
  18. package/dist/components/ToggleButtonGroup.d.ts +30 -0
  19. package/dist/components/Tooltip.d.ts +18 -2
  20. package/dist/components/index.d.ts +4 -0
  21. package/dist/hooks/PortalContainerContext.d.ts +31 -0
  22. package/dist/hooks/index.d.ts +1 -0
  23. package/dist/hooks/useOutsideAlerter.d.ts +1 -1
  24. package/dist/icons/FirestoreIcon.d.ts +6 -0
  25. package/dist/icons/components/DatabaseIcon.d.ts +6 -0
  26. package/dist/icons/index.d.ts +2 -0
  27. package/dist/index.css +57 -6
  28. package/dist/index.es.js +2846 -1165
  29. package/dist/index.es.js.map +1 -1
  30. package/dist/index.umd.js +2846 -1165
  31. package/dist/index.umd.js.map +1 -1
  32. package/dist/styles.d.ts +11 -11
  33. package/package.json +7 -7
  34. package/src/components/BooleanSwitch.tsx +3 -3
  35. package/src/components/BooleanSwitchWithLabel.tsx +4 -0
  36. package/src/components/Button.tsx +6 -5
  37. package/src/components/Card.tsx +7 -7
  38. package/src/components/Checkbox.tsx +1 -1
  39. package/src/components/Chip.tsx +4 -3
  40. package/src/components/ColorPicker.tsx +134 -0
  41. package/src/components/DateTimeField.tsx +129 -35
  42. package/src/components/DebouncedTextField.tsx +3 -3
  43. package/src/components/Dialog.tsx +25 -16
  44. package/src/components/DialogActions.tsx +1 -1
  45. package/src/components/ExpandablePanel.tsx +1 -1
  46. package/src/components/FileUpload.tsx +25 -24
  47. package/src/components/IconButton.tsx +3 -2
  48. package/src/components/Menu.tsx +44 -30
  49. package/src/components/Menubar.tsx +14 -3
  50. package/src/components/MultiSelect.tsx +113 -77
  51. package/src/components/Popover.tsx +11 -3
  52. package/src/components/ResizablePanels.tsx +181 -0
  53. package/src/components/SearchBar.tsx +37 -19
  54. package/src/components/SearchableSelect.tsx +335 -0
  55. package/src/components/Select.tsx +86 -73
  56. package/src/components/Separator.tsx +2 -2
  57. package/src/components/Sheet.tsx +12 -3
  58. package/src/components/Skeleton.tsx +4 -2
  59. package/src/components/Slider.tsx +4 -4
  60. package/src/components/Table.tsx +1 -1
  61. package/src/components/Tabs.tsx +150 -37
  62. package/src/components/TextField.tsx +19 -8
  63. package/src/components/TextareaAutosize.tsx +77 -212
  64. package/src/components/ToggleButtonGroup.tsx +67 -0
  65. package/src/components/Tooltip.tsx +16 -8
  66. package/src/components/index.tsx +4 -0
  67. package/src/hooks/PortalContainerContext.tsx +48 -0
  68. package/src/hooks/index.ts +1 -0
  69. package/src/hooks/useInjectStyles.tsx +12 -3
  70. package/src/hooks/useOutsideAlerter.tsx +1 -1
  71. package/src/icons/FirestoreIcon.tsx +47 -0
  72. package/src/icons/components/DatabaseIcon.tsx +10 -0
  73. package/src/icons/index.ts +2 -0
  74. package/src/index.css +57 -6
  75. package/src/styles.ts +11 -11
  76. package/src/util/cls.ts +1 -1
  77. package/tailwind.config.js +2 -3
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react-compiler-runtime"), require("react"), require("@radix-ui/react-collapsible"), require("clsx"), require("tailwind-merge"), require("@radix-ui/react-checkbox"), require("@material-design-icons/font/filled.css"), require("@radix-ui/react-dialog"), require("@radix-ui/react-visually-hidden"), require("react-dropzone"), require("@radix-ui/react-label"), require("react-fast-compare"), require("markdown-it"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-menubar"), require("@radix-ui/react-popover"), require("cmdk"), require("@radix-ui/react-separator"), require("@radix-ui/react-radio-group"), require("@radix-ui/react-select"), require("@radix-ui/react-slider"), require("@radix-ui/react-tooltip"), require("react-dom"), require("@radix-ui/react-tabs")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react-compiler-runtime", "react", "@radix-ui/react-collapsible", "clsx", "tailwind-merge", "@radix-ui/react-checkbox", "@material-design-icons/font/filled.css", "@radix-ui/react-dialog", "@radix-ui/react-visually-hidden", "react-dropzone", "@radix-ui/react-label", "react-fast-compare", "markdown-it", "@radix-ui/react-dropdown-menu", "@radix-ui/react-menubar", "@radix-ui/react-popover", "cmdk", "@radix-ui/react-separator", "@radix-ui/react-radio-group", "@radix-ui/react-select", "@radix-ui/react-slider", "@radix-ui/react-tooltip", "react-dom", "@radix-ui/react-tabs"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["FireCMS UI"] = {}, global.jsxRuntime, global.reactCompilerRuntime, global.React, global.Collapsible, global.clsx, global.tailwindMerge, global.CheckboxPrimitive, null, global.DialogPrimitive, global.VisuallyHidden, global.reactDropzone, global.LabelPrimitive, global.equal, global.MarkdownIt, global.DropdownMenu, global.MenubarPrimitive, global.PopoverPrimitive, global.cmdk, global.SeparatorPrimitive, global.RadioGroupPrimitive, global.SelectPrimitive, global.SliderPrimitive, global.TooltipPrimitive, global.ReactDOM, global.TabsPrimitive));
3
- })(this, (function(exports2, jsxRuntime, reactCompilerRuntime, React, Collapsible, clsx, tailwindMerge, CheckboxPrimitive, filled_css, DialogPrimitive, VisuallyHidden, reactDropzone, LabelPrimitive, equal, MarkdownIt, DropdownMenu, MenubarPrimitive, PopoverPrimitive, cmdk, SeparatorPrimitive, RadioGroupPrimitive, SelectPrimitive, SliderPrimitive, TooltipPrimitive, ReactDOM, TabsPrimitive) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react-compiler-runtime"), require("react"), require("@radix-ui/react-collapsible"), require("clsx"), require("tailwind-merge"), require("@radix-ui/react-checkbox"), require("@material-design-icons/font/filled.css"), require("@radix-ui/react-tooltip"), require("@radix-ui/react-dialog"), require("@radix-ui/react-visually-hidden"), require("react-dropzone"), require("@radix-ui/react-label"), require("react-fast-compare"), require("markdown-it"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-menubar"), require("@radix-ui/react-popover"), require("cmdk"), require("@radix-ui/react-separator"), require("@radix-ui/react-radio-group"), require("@radix-ui/react-select"), require("@radix-ui/react-slider"), require("@radix-ui/react-tabs")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react-compiler-runtime", "react", "@radix-ui/react-collapsible", "clsx", "tailwind-merge", "@radix-ui/react-checkbox", "@material-design-icons/font/filled.css", "@radix-ui/react-tooltip", "@radix-ui/react-dialog", "@radix-ui/react-visually-hidden", "react-dropzone", "@radix-ui/react-label", "react-fast-compare", "markdown-it", "@radix-ui/react-dropdown-menu", "@radix-ui/react-menubar", "@radix-ui/react-popover", "cmdk", "@radix-ui/react-separator", "@radix-ui/react-radio-group", "@radix-ui/react-select", "@radix-ui/react-slider", "@radix-ui/react-tabs"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["FireCMS UI"] = {}, global.jsxRuntime, global.reactCompilerRuntime, global.React, global.Collapsible, global.clsx, global.tailwindMerge, global.CheckboxPrimitive, null, global.TooltipPrimitive, global.DialogPrimitive, global.VisuallyHidden, global.reactDropzone, global.LabelPrimitive, global.equal, global.MarkdownIt, global.DropdownMenu, global.MenubarPrimitive, global.PopoverPrimitive, global.cmdk, global.SeparatorPrimitive, global.RadioGroupPrimitive, global.SelectPrimitive, global.SliderPrimitive, global.TabsPrimitive));
3
+ })(this, (function(exports2, jsxRuntime, reactCompilerRuntime, React, Collapsible, clsx, tailwindMerge, CheckboxPrimitive, filled_css, TooltipPrimitive, DialogPrimitive, VisuallyHidden, reactDropzone, LabelPrimitive, equal, MarkdownIt, DropdownMenu, MenubarPrimitive, PopoverPrimitive, cmdk, SeparatorPrimitive, RadioGroupPrimitive, SelectPrimitive, SliderPrimitive, TabsPrimitive) {
4
4
  "use strict";"use client";
5
5
 
6
6
  function _interopNamespaceDefault(e) {
@@ -22,6 +22,7 @@
22
22
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
23
23
  const Collapsible__namespace = /* @__PURE__ */ _interopNamespaceDefault(Collapsible);
24
24
  const CheckboxPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(CheckboxPrimitive);
25
+ const TooltipPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TooltipPrimitive);
25
26
  const DialogPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DialogPrimitive);
26
27
  const VisuallyHidden__namespace = /* @__PURE__ */ _interopNamespaceDefault(VisuallyHidden);
27
28
  const LabelPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(LabelPrimitive);
@@ -32,21 +33,19 @@
32
33
  const RadioGroupPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadioGroupPrimitive);
33
34
  const SelectPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SelectPrimitive);
34
35
  const SliderPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SliderPrimitive);
35
- const TooltipPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TooltipPrimitive);
36
- const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
37
36
  const TabsPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TabsPrimitive);
38
37
  const focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
39
- const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-surface-800 focus:dark:bg-opacity-60";
40
- const focusedClasses = "z-30 outline-none ring-2 ring-primary ring-opacity-75 ring-offset-2 ring-offset-transparent ";
41
- const fieldBackgroundMixin = "bg-opacity-50 bg-surface-accent-200 dark:bg-surface-800 dark:bg-opacity-60";
42
- const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-surface-accent-100 dark:bg-surface-800 dark:bg-opacity-0";
43
- const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-opacity-90";
44
- const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40";
45
- const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
46
- const paperMixin = "bg-white rounded-md dark:bg-surface-950 border border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
47
- const cardMixin = "bg-white border border-surface-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-surface-950 dark:border-surface-700 dark:border-opacity-40";
48
- const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 hover:ring-2 hover:ring-primary cursor-pointer";
49
- const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
38
+ const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-surface-800 focus:dark:bg-opacity-60 focus:bg-surface-accent-100/70 dark:focus:bg-surface-800/60";
39
+ const focusedClasses = "z-30 outline-hidden outline-none ring-2 ring-primary ring-opacity-75 ring-primary/75 ring-offset-2 ring-offset-transparent ";
40
+ const fieldBackgroundMixin = "bg-opacity-50 bg-surface-accent-200 bg-surface-accent-200/50 dark:bg-surface-800 dark:bg-opacity-60 dark:bg-surface-800/60";
41
+ const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-surface-accent-100 dark:bg-surface-800 dark:bg-opacity-0 bg-surface-accent-200/0 dark:bg-surface-800/0";
42
+ const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-opacity-90 bg-surface-accent-200/50 dark:bg-surface-800/90";
43
+ const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40 hover:bg-surface-accent-200/70 hover:dark:bg-surface-700/40";
44
+ const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40 border-surface-200/40 dark:border-surface-700/40 ";
45
+ const paperMixin = "bg-white rounded-md dark:bg-surface-950 border border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40 border-surface-200/40 dark:border-surface-700/40";
46
+ const cardMixin = "bg-white dark:bg-surface-950 rounded-md border border-surface-200/40 dark:border-surface-700/40 m-1 -p-1";
47
+ const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 hover:ring-2 hover:ring-primary cursor-pointer hover:bg-primary/20 dark:hover:bg-primary/10 ";
48
+ const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 bg-primary-bg/30 dark:bg-opacity-10 dark:bg-primary-bg/10 ring-1 ring-primary ring-opacity-75 ring-primary/75 bg-primary/10 dark:bg-primary/10 ring-1 ring-primary/75";
50
49
  function cls(...classes) {
51
50
  return tailwindMerge.twMerge(clsx.clsx(classes));
52
51
  }
@@ -257,31 +256,69 @@
257
256
  }).join("") + "Icon";
258
257
  return componentName;
259
258
  }
259
+ const PortalContainerContext = React.createContext(void 0);
260
+ function PortalContainerProvider(t0) {
261
+ const $ = reactCompilerRuntime.c(5);
262
+ const {
263
+ container,
264
+ children
265
+ } = t0;
266
+ let t1;
267
+ if ($[0] !== container) {
268
+ t1 = {
269
+ container
270
+ };
271
+ $[0] = container;
272
+ $[1] = t1;
273
+ } else {
274
+ t1 = $[1];
275
+ }
276
+ let t2;
277
+ if ($[2] !== children || $[3] !== t1) {
278
+ t2 = /* @__PURE__ */ jsxRuntime.jsx(PortalContainerContext.Provider, { value: t1, children });
279
+ $[2] = children;
280
+ $[3] = t1;
281
+ $[4] = t2;
282
+ } else {
283
+ t2 = $[4];
284
+ }
285
+ return t2;
286
+ }
287
+ function usePortalContainer() {
288
+ const context = React.useContext(PortalContainerContext);
289
+ return context?.container ?? null;
290
+ }
260
291
  function useInjectStyles(key, styles2) {
261
- const $ = reactCompilerRuntime.c(4);
292
+ const $ = reactCompilerRuntime.c(5);
293
+ const portalContainer = usePortalContainer();
262
294
  let t0;
263
- if ($[0] !== key || $[1] !== styles2) {
295
+ if ($[0] !== key || $[1] !== portalContainer || $[2] !== styles2) {
264
296
  t0 = () => {
265
- const styleElement = document.getElementById(key);
266
- if (!styleElement) {
297
+ if (typeof document === "undefined") {
298
+ return;
299
+ }
300
+ const targetContainer = portalContainer ?? document.head;
301
+ const existingStyle = targetContainer.querySelector?.(`#${key}`);
302
+ if (!existingStyle) {
267
303
  const style = document.createElement("style");
268
304
  style.id = key;
269
305
  style.innerHTML = styles2;
270
- document.head.appendChild(style);
306
+ (targetContainer || document.head).appendChild(style);
271
307
  }
272
308
  };
273
309
  $[0] = key;
274
- $[1] = styles2;
275
- $[2] = t0;
310
+ $[1] = portalContainer;
311
+ $[2] = styles2;
312
+ $[3] = t0;
276
313
  } else {
277
- t0 = $[2];
314
+ t0 = $[3];
278
315
  }
279
316
  let t1;
280
- if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
317
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
281
318
  t1 = [];
282
- $[3] = t1;
319
+ $[4] = t1;
283
320
  } else {
284
- t1 = $[3];
321
+ t1 = $[4];
285
322
  }
286
323
  React.useEffect(t0, t1);
287
324
  }
@@ -752,7 +789,7 @@
752
789
  } else {
753
790
  onValueChange?.(!value);
754
791
  }
755
- }, className: cls(size === "smallest" ? "w-[34px] h-[18px] min-w-[34px] min-h-[18px]" : size === "small" ? "w-[38px] h-[22px] min-w-[38px] min-h-[22px]" : "w-[44px] h-[26px] min-w-[44px] min-h-[26px]", "outline-none rounded-full relative shadow-sm", value ? disabled ? "bg-white bg-opacity-54 dark:bg-surface-accent-950 border-surface-accent-100 dark:border-surface-accent-700 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700" : "ring-secondary ring-1 bg-secondary dark:bg-secondary" : "bg-white bg-opacity-54 dark:bg-surface-accent-900 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700", className), ...props, children: [
792
+ }, className: cls(size === "smallest" ? "w-[34px] h-[18px] min-w-[34px] min-h-[18px]" : size === "small" ? "w-[38px] h-[22px] min-w-[38px] min-h-[22px]" : "w-[44px] h-[26px] min-w-[44px] min-h-[26px]", "outline-none outline-hidden rounded-full relative shadow-sm", value ? disabled ? "bg-white bg-opacity-54 bg-white/54 dark:bg-surface-accent-950 border-surface-accent-100 dark:border-surface-accent-700 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700" : "ring-secondary ring-1 bg-secondary dark:bg-secondary" : "bg-white bg-opacity-54 bg-white/54 dark:bg-surface-accent-900 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700", className), ...props, children: [
756
793
  allowIndeterminate && (value === null || value === void 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("block rounded-full transition-transform duration-100 transform will-change-auto", disabled ? "bg-surface-accent-400 dark:bg-surface-accent-600" : "bg-surface-accent-400 dark:bg-surface-accent-600", {
757
794
  "w-[21px] h-[10px]": size === "medium" || size === "large",
758
795
  "w-[19px] h-[8px]": size === "small",
@@ -784,6 +821,7 @@
784
821
  className,
785
822
  fullWidth = true,
786
823
  inputClassName,
824
+ switchAdornment,
787
825
  ...props
788
826
  }) {
789
827
  const ref = React.useRef(null);
@@ -809,6 +847,7 @@
809
847
  }
810
848
  }, children: [
811
849
  /* @__PURE__ */ jsxRuntime.jsx(BooleanSwitch, { value, ref: refInput, size, className: cls(invisible && focus ? focusedClasses : "", inputClassName), disabled, ...props }),
850
+ switchAdornment,
812
851
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("flex-grow", position === "end" ? "mr-4" : "ml-4", size === "small" || size === "smallest" ? "text-sm" : "text-base"), children: label })
813
852
  ] });
814
853
  };
@@ -825,18 +864,29 @@
825
864
  let t5;
826
865
  let t6;
827
866
  if ($[0] !== t0) {
828
- ({
829
- children,
830
- className,
831
- variant: t1,
832
- disabled: t2,
833
- size: t3,
834
- startIcon: t4,
835
- fullWidth: t5,
836
- component: Component,
837
- color: t6,
838
- ...props
839
- } = t0);
867
+ const {
868
+ children: t72,
869
+ className: t82,
870
+ variant: t92,
871
+ disabled: t102,
872
+ size: t112,
873
+ startIcon: t122,
874
+ fullWidth: t132,
875
+ component: t142,
876
+ color: t152,
877
+ loading,
878
+ ...t162
879
+ } = t0;
880
+ children = t72;
881
+ className = t82;
882
+ t1 = t92;
883
+ t2 = t102;
884
+ t3 = t112;
885
+ t4 = t122;
886
+ t5 = t132;
887
+ Component = t142;
888
+ t6 = t152;
889
+ props = t162;
840
890
  $[0] = t0;
841
891
  $[1] = Component;
842
892
  $[2] = children;
@@ -901,12 +951,12 @@
901
951
  "border border-red-500 bg-red-500 hover:bg-red-500 focus:ring-red-500 shadow hover:ring-1 hover:ring-red-600 text-white hover:text-white": t10,
902
952
  "border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow hover:ring-1 hover:ring-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t11,
903
953
  "border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-800 dark:hover:bg-surface-accent-700 dark:text-text-primary-dark hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t12,
904
- "border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t13,
905
- "border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t14,
906
- "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t15,
954
+ "border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": t13,
955
+ "border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": t14,
956
+ "border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10 hover:bg-red-500/10": t15,
907
957
  "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,
908
958
  "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,
909
- "border border-primary text-primary hover:text-primary hover:bg-primary-bg": t18,
959
+ "border border-primary text-primary hover:text-primary hover:bg-primary-bg hover:bg-primary/10": t18,
910
960
  "border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
911
961
  "border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
912
962
  "border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": t21,
@@ -914,7 +964,7 @@
914
964
  "text-text-disabled dark:text-text-disabled-dark": disabled,
915
965
  "border border-transparent opacity-50": t23,
916
966
  "border border-surface-500 opacity-50": t24,
917
- "border border-transparent bg-surface-300 dark:bg-surface-500 opacity-40": t25
967
+ "border border-transparent bg-surface-300 dark:bg-surface-500 opacity-70 bg-surface-300/70 dark:bg-surface-500/70": t25
918
968
  });
919
969
  const sizeClasses2 = cls({
920
970
  "py-1 px-2": size === "small",
@@ -1380,6 +1430,50 @@
1380
1430
  }
1381
1431
  return t0;
1382
1432
  }
1433
+ const sizeMap = {
1434
+ smallest: 16,
1435
+ small: 20,
1436
+ medium: 24,
1437
+ large: 28
1438
+ };
1439
+ function FirestoreIcon(props) {
1440
+ const $ = reactCompilerRuntime.c(7);
1441
+ const s = typeof props.size === "number" ? props.size : sizeMap[props.size ?? "medium"] ?? 24;
1442
+ let t0;
1443
+ let t1;
1444
+ let t2;
1445
+ let t3;
1446
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1447
+ t0 = /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M22.575 87.933A52.16 52.16 0 0034.787 90.513c5.84.204 11.395-1.004 16.359-3.298a70.68 70.68 0 01-15.948-10.013c-2.98 4.778-7.393 8.548-12.623 10.731z", opacity: ".7" });
1448
+ t1 = /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M35.2 77.205c-10.505-9.714-16.878-23.776-16.339-39.2.018-.499.045-1.001.075-1.5a39.51 39.51 0 00-5.866-.855 38.77 38.77 0 00-8.34.997A53.07 53.07 0 00.022 53.236c-.544 15.58 8.884 29.191 22.553 34.697 5.23-2.18 9.642-5.948 12.625-10.728z", opacity: ".6" });
1449
+ t2 = /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M35.2 77.205a31.63 31.63 0 004.096-13.428c.452-12.985-8.278-24.155-20.36-27.273-.03.5-.058 1.002-.076 1.502-.536 15.421 5.835 29.483 16.34 39.199z", opacity: ".7" });
1450
+ t3 = /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M37.944 0a73.99 73.99 0 00-15.603 21.156 72.82 72.82 0 00-3.41 15.349c12.082 3.117 20.812 14.288 20.36 27.275a31.58 31.58 0 01-4.098 13.425 70.76 70.76 0 0015.948 10.013c11.951-5.523 20.43-17.41 20.919-31.467.318-9.11-3.181-17.228-8.126-24.081C58.711 24.424 37.944 0 37.944 0z" });
1451
+ $[0] = t0;
1452
+ $[1] = t1;
1453
+ $[2] = t2;
1454
+ $[3] = t3;
1455
+ } else {
1456
+ t0 = $[0];
1457
+ t1 = $[1];
1458
+ t2 = $[2];
1459
+ t3 = $[3];
1460
+ }
1461
+ let t4;
1462
+ if ($[4] !== props.className || $[5] !== s) {
1463
+ t4 = /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: props.className, fill: "currentColor", width: s, height: s, viewBox: "0 0 73 91", children: [
1464
+ t0,
1465
+ t1,
1466
+ t2,
1467
+ t3
1468
+ ] });
1469
+ $[4] = props.className;
1470
+ $[5] = s;
1471
+ $[6] = t4;
1472
+ } else {
1473
+ t4 = $[6];
1474
+ }
1475
+ return t4;
1476
+ }
1383
1477
  const _10kIcon = React.forwardRef((props, ref) => {
1384
1478
  const $ = reactCompilerRuntime.c(3);
1385
1479
  let t0;
@@ -8646,6 +8740,20 @@
8646
8740
  return t0;
8647
8741
  });
8648
8742
  DatasetLinkedIcon.displayName = "DatasetLinkedIcon";
8743
+ const DatabaseIcon = React.forwardRef((props, ref) => {
8744
+ const $ = reactCompilerRuntime.c(3);
8745
+ let t0;
8746
+ if ($[0] !== props || $[1] !== ref) {
8747
+ t0 = /* @__PURE__ */ jsxRuntime.jsx(Icon, { ...props, iconKey: "database", ref });
8748
+ $[0] = props;
8749
+ $[1] = ref;
8750
+ $[2] = t0;
8751
+ } else {
8752
+ t0 = $[2];
8753
+ }
8754
+ return t0;
8755
+ });
8756
+ DatabaseIcon.displayName = "DatabaseIcon";
8649
8757
  const DateRangeIcon = React.forwardRef((props, ref) => {
8650
8758
  const $ = reactCompilerRuntime.c(3);
8651
8759
  let t0;
@@ -32182,7 +32290,7 @@
32182
32290
  const t6 = disabled ? void 0 : onCheckedChange;
32183
32291
  const t7 = padding ? paddingClasses[size] : "";
32184
32292
  const t8 = outerSizeClasses[size];
32185
- const t9 = onCheckedChange ? "rounded-full hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-700 dark:hover:bg-opacity-75" : "";
32293
+ const t9 = onCheckedChange ? "rounded-full hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-700 dark:hover:bg-opacity-75 dark:hover:bg-surface-accent-700/75" : "";
32186
32294
  const t10 = onCheckedChange ? "cursor-pointer" : "cursor-default";
32187
32295
  let t11;
32188
32296
  if ($[0] !== t10 || $[1] !== t7 || $[2] !== t8 || $[3] !== t9) {
@@ -32256,8 +32364,8 @@
32256
32364
  medium: "px-3 py-1 text-sm",
32257
32365
  large: "px-4 py-1.5 text-sm"
32258
32366
  };
32259
- function Chip(t0) {
32260
- const $ = reactCompilerRuntime.c(18);
32367
+ const Chip = React.forwardRef(function Chip2(t0, ref) {
32368
+ const $ = reactCompilerRuntime.c(19);
32261
32369
  const {
32262
32370
  children,
32263
32371
  colorScheme,
@@ -32312,23 +32420,330 @@
32312
32420
  t10 = $[11];
32313
32421
  }
32314
32422
  let t11;
32315
- if ($[12] !== children || $[13] !== icon || $[14] !== onClick || $[15] !== t10 || $[16] !== t7) {
32316
- t11 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t7, onClick, style: t10, children: [
32423
+ if ($[12] !== children || $[13] !== icon || $[14] !== onClick || $[15] !== ref || $[16] !== t10 || $[17] !== t7) {
32424
+ t11 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: t7, onClick, style: t10, children: [
32317
32425
  children,
32318
32426
  icon
32319
32427
  ] });
32320
32428
  $[12] = children;
32321
32429
  $[13] = icon;
32322
32430
  $[14] = onClick;
32323
- $[15] = t10;
32324
- $[16] = t7;
32325
- $[17] = t11;
32431
+ $[15] = ref;
32432
+ $[16] = t10;
32433
+ $[17] = t7;
32434
+ $[18] = t11;
32326
32435
  } else {
32327
- t11 = $[17];
32436
+ t11 = $[18];
32328
32437
  }
32329
32438
  return t11;
32439
+ });
32440
+ const Tooltip = React.forwardRef((t0, ref) => {
32441
+ const $ = reactCompilerRuntime.c(47);
32442
+ let align;
32443
+ let children;
32444
+ let className;
32445
+ let container;
32446
+ let defaultOpen;
32447
+ let onOpenChange;
32448
+ let open;
32449
+ let props;
32450
+ let sideOffset;
32451
+ let style;
32452
+ let t1;
32453
+ let t2;
32454
+ let t3;
32455
+ let title;
32456
+ let tooltipClassName;
32457
+ let tooltipStyle;
32458
+ if ($[0] !== t0) {
32459
+ ({
32460
+ open,
32461
+ defaultOpen,
32462
+ side: t1,
32463
+ delayDuration: t2,
32464
+ sideOffset,
32465
+ align,
32466
+ onOpenChange,
32467
+ title,
32468
+ tooltipClassName,
32469
+ tooltipStyle,
32470
+ children,
32471
+ asChild: t3,
32472
+ container,
32473
+ className,
32474
+ style,
32475
+ ...props
32476
+ } = t0);
32477
+ $[0] = t0;
32478
+ $[1] = align;
32479
+ $[2] = children;
32480
+ $[3] = className;
32481
+ $[4] = container;
32482
+ $[5] = defaultOpen;
32483
+ $[6] = onOpenChange;
32484
+ $[7] = open;
32485
+ $[8] = props;
32486
+ $[9] = sideOffset;
32487
+ $[10] = style;
32488
+ $[11] = t1;
32489
+ $[12] = t2;
32490
+ $[13] = t3;
32491
+ $[14] = title;
32492
+ $[15] = tooltipClassName;
32493
+ $[16] = tooltipStyle;
32494
+ } else {
32495
+ align = $[1];
32496
+ children = $[2];
32497
+ className = $[3];
32498
+ container = $[4];
32499
+ defaultOpen = $[5];
32500
+ onOpenChange = $[6];
32501
+ open = $[7];
32502
+ props = $[8];
32503
+ sideOffset = $[9];
32504
+ style = $[10];
32505
+ t1 = $[11];
32506
+ t2 = $[12];
32507
+ t3 = $[13];
32508
+ title = $[14];
32509
+ tooltipClassName = $[15];
32510
+ tooltipStyle = $[16];
32511
+ }
32512
+ const side = t1 === void 0 ? "bottom" : t1;
32513
+ const delayDuration = t2 === void 0 ? 200 : t2;
32514
+ const asChild = t3 === void 0 ? false : t3;
32515
+ useInjectStyles("Tooltip", styles);
32516
+ const contextContainer = usePortalContainer();
32517
+ const finalContainer = container ?? contextContainer ?? void 0;
32518
+ if (!title) {
32519
+ let t42;
32520
+ if ($[17] !== children) {
32521
+ t42 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
32522
+ $[17] = children;
32523
+ $[18] = t42;
32524
+ } else {
32525
+ t42 = $[18];
32526
+ }
32527
+ return t42;
32528
+ }
32529
+ let t4;
32530
+ if ($[19] !== asChild || $[20] !== children || $[21] !== className || $[22] !== props || $[23] !== ref || $[24] !== style) {
32531
+ t4 = asChild ? /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { asChild: true, children }) : /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style, className, ref, ...props, children }) });
32532
+ $[19] = asChild;
32533
+ $[20] = children;
32534
+ $[21] = className;
32535
+ $[22] = props;
32536
+ $[23] = ref;
32537
+ $[24] = style;
32538
+ $[25] = t4;
32539
+ } else {
32540
+ t4 = $[25];
32541
+ }
32542
+ const trigger = t4;
32543
+ let t5;
32544
+ if ($[26] !== tooltipClassName) {
32545
+ t5 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 bg-surface-accent-700/90 dark:bg-surface-accent-800/90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100", tooltipClassName);
32546
+ $[26] = tooltipClassName;
32547
+ $[27] = t5;
32548
+ } else {
32549
+ t5 = $[27];
32550
+ }
32551
+ const t6 = sideOffset === void 0 ? 4 : sideOffset;
32552
+ let t7;
32553
+ if ($[28] !== align || $[29] !== side || $[30] !== t5 || $[31] !== t6 || $[32] !== title || $[33] !== tooltipStyle) {
32554
+ t7 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Content, { className: t5, style: tooltipStyle, sideOffset: t6, align, side, children: title });
32555
+ $[28] = align;
32556
+ $[29] = side;
32557
+ $[30] = t5;
32558
+ $[31] = t6;
32559
+ $[32] = title;
32560
+ $[33] = tooltipStyle;
32561
+ $[34] = t7;
32562
+ } else {
32563
+ t7 = $[34];
32564
+ }
32565
+ let t8;
32566
+ if ($[35] !== finalContainer || $[36] !== t7) {
32567
+ t8 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { container: finalContainer, children: t7 });
32568
+ $[35] = finalContainer;
32569
+ $[36] = t7;
32570
+ $[37] = t8;
32571
+ } else {
32572
+ t8 = $[37];
32573
+ }
32574
+ let t9;
32575
+ if ($[38] !== defaultOpen || $[39] !== onOpenChange || $[40] !== open || $[41] !== t8 || $[42] !== trigger) {
32576
+ t9 = /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { open, onOpenChange, defaultOpen, children: [
32577
+ trigger,
32578
+ t8
32579
+ ] });
32580
+ $[38] = defaultOpen;
32581
+ $[39] = onOpenChange;
32582
+ $[40] = open;
32583
+ $[41] = t8;
32584
+ $[42] = trigger;
32585
+ $[43] = t9;
32586
+ } else {
32587
+ t9 = $[43];
32588
+ }
32589
+ let t10;
32590
+ if ($[44] !== delayDuration || $[45] !== t9) {
32591
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { delayDuration, children: t9 });
32592
+ $[44] = delayDuration;
32593
+ $[45] = t9;
32594
+ $[46] = t10;
32595
+ } else {
32596
+ t10 = $[46];
32597
+ }
32598
+ return t10;
32599
+ });
32600
+ const styles = `
32601
+
32602
+ .TooltipContent {
32603
+ animation-duration: 220ms;
32604
+ animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
32605
+ will-change: transform, opacity;
32606
+ }
32607
+
32608
+ .TooltipContent[data-state='delayed-open'][data-side='top'] {
32609
+ animation-name: slideDownAndFade;
32610
+ }
32611
+ .TooltipContent[data-state='delayed-open'][data-side='right'] {
32612
+ animation-name: slideLeftAndFade;
32613
+ }
32614
+ .TooltipContent[data-state='delayed-open'][data-side='bottom'] {
32615
+ animation-name: slideUpAndFade;
32616
+ }
32617
+ .TooltipContent[data-state='delayed-open'][data-side='left'] {
32618
+ animation-name: slideRightAndFade;
32619
+ }
32620
+
32621
+
32622
+ @keyframes slideUpAndFade {
32623
+ from {
32624
+ opacity: 0;
32625
+ transform: translateY(4px);
32626
+ }
32627
+ to {
32628
+ opacity: 1;
32629
+ transform: translateY(0);
32630
+ }
32631
+ }
32632
+
32633
+ @keyframes slideRightAndFade {
32634
+ from {
32635
+ opacity: 0;
32636
+ transform: translateX(-4px);
32637
+ }
32638
+ to {
32639
+ opacity: 1;
32640
+ transform: translateX(0);
32641
+ }
32642
+ }
32643
+
32644
+ @keyframes slideDownAndFade {
32645
+ from {
32646
+ opacity: 0;
32647
+ transform: translateY(-4px);
32648
+ }
32649
+ to {
32650
+ opacity: 1;
32651
+ transform: translateY(0);
32652
+ }
32653
+ }
32654
+
32655
+ @keyframes slideLeftAndFade {
32656
+ from {
32657
+ opacity: 0;
32658
+ transform: translateX(4px);
32659
+ }
32660
+ to {
32661
+ opacity: 1;
32662
+ transform: translateX(0);
32663
+ }
32664
+ }`;
32665
+ const BASE_COLORS = ["blue", "cyan", "teal", "green", "yellow", "orange", "red", "pink", "purple", "gray"];
32666
+ const VARIANTS = ["Darker", "Dark", "Light", "Lighter"];
32667
+ function getColorDisplayName(colorKey) {
32668
+ const base = colorKey.replace(/(Lighter|Light|Dark|Darker)$/, "");
32669
+ const variant = colorKey.replace(base, "");
32670
+ return `${base.charAt(0).toUpperCase()}${base.slice(1)} ${variant}`;
32671
+ }
32672
+ function ColorPicker(t0) {
32673
+ const $ = reactCompilerRuntime.c(18);
32674
+ const {
32675
+ value,
32676
+ onChange,
32677
+ size: t1,
32678
+ allowClear: t2,
32679
+ disabled: t3
32680
+ } = t0;
32681
+ const size = t1 === void 0 ? "medium" : t1;
32682
+ const allowClear = t2 === void 0 ? true : t2;
32683
+ const disabled = t3 === void 0 ? false : t3;
32684
+ const swatchSize = size === "small" ? "w-5 h-5" : "w-6 h-6";
32685
+ const checkSize = size === "small" ? 12 : 14;
32686
+ let t4;
32687
+ if ($[0] !== allowClear || $[1] !== checkSize || $[2] !== disabled || $[3] !== onChange || $[4] !== swatchSize || $[5] !== value) {
32688
+ t4 = allowClear && /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", disabled, onClick: () => onChange(void 0), className: cls("flex items-center gap-2 px-2 py-1 rounded text-sm transition-colors", "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800", disabled && "opacity-50 cursor-not-allowed", !value && "bg-surface-accent-100 dark:bg-surface-accent-800 font-medium"), children: [
32689
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls(swatchSize, "rounded-full border-2 border-dashed border-surface-accent-400 dark:border-surface-accent-600", "flex items-center justify-center"), children: !value && /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size: checkSize }) }),
32690
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-surface-accent-700 dark:text-surface-accent-300", children: "Auto (based on ID)" })
32691
+ ] });
32692
+ $[0] = allowClear;
32693
+ $[1] = checkSize;
32694
+ $[2] = disabled;
32695
+ $[3] = onChange;
32696
+ $[4] = swatchSize;
32697
+ $[5] = value;
32698
+ $[6] = t4;
32699
+ } else {
32700
+ t4 = $[6];
32701
+ }
32702
+ let t5;
32703
+ if ($[7] !== checkSize || $[8] !== disabled || $[9] !== onChange || $[10] !== swatchSize || $[11] !== value) {
32704
+ t5 = VARIANTS.map((variant) => BASE_COLORS.map((base) => {
32705
+ const colorKey = `${base}${variant}`;
32706
+ const colorScheme = CHIP_COLORS[colorKey];
32707
+ const isSelected = value === colorKey;
32708
+ const displayName = getColorDisplayName(colorKey);
32709
+ return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { title: displayName, delayDuration: 300, children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", disabled, onClick: () => onChange(colorKey), className: cls(swatchSize, "rounded-full transition-all flex items-center justify-center", "hover:scale-110 hover:shadow-md", "focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1", disabled && "opacity-50 cursor-not-allowed hover:scale-100", isSelected && "ring-2 ring-primary ring-offset-1"), style: {
32710
+ backgroundColor: colorScheme.color
32711
+ }, "aria-label": displayName, "aria-pressed": isSelected, children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size: checkSize, style: {
32712
+ color: colorScheme.text
32713
+ } }) }) }, colorKey);
32714
+ }));
32715
+ $[7] = checkSize;
32716
+ $[8] = disabled;
32717
+ $[9] = onChange;
32718
+ $[10] = swatchSize;
32719
+ $[11] = value;
32720
+ $[12] = t5;
32721
+ } else {
32722
+ t5 = $[12];
32723
+ }
32724
+ let t6;
32725
+ if ($[13] !== t5) {
32726
+ t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-10 gap-1", children: t5 });
32727
+ $[13] = t5;
32728
+ $[14] = t6;
32729
+ } else {
32730
+ t6 = $[14];
32731
+ }
32732
+ let t7;
32733
+ if ($[15] !== t4 || $[16] !== t6) {
32734
+ t7 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
32735
+ t4,
32736
+ t6
32737
+ ] });
32738
+ $[15] = t4;
32739
+ $[16] = t6;
32740
+ $[17] = t7;
32741
+ } else {
32742
+ t7 = $[17];
32743
+ }
32744
+ return t7;
32330
32745
  }
32331
- const buttonClasses = "hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800 hover:scale-105 transition-transform";
32746
+ const buttonClasses = "hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800 hover:scale-105 transition-transform";
32332
32747
  const baseClasses = "inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150";
32333
32748
  const colorClasses$1 = "text-surface-accent-600 visited:text-surface-accent-600 dark:text-surface-accent-300 dark:visited:text-surface-300";
32334
32749
  const sizeClasses = {
@@ -32388,7 +32803,7 @@
32388
32803
  const size = t1 === void 0 ? "medium" : t1;
32389
32804
  const variant = t2 === void 0 ? "ghost" : t2;
32390
32805
  const shape = t3 === void 0 ? "circular" : t3;
32391
- const bgClasses = variant === "ghost" ? "bg-transparent" : "bg-surface-accent-200 bg-opacity-50 dark:bg-surface-950 dark:bg-opacity-50";
32806
+ const bgClasses = variant === "ghost" ? "bg-transparent" : "bg-surface-accent-200 bg-opacity-50 bg-surface-accent-200/50 dark:bg-surface-950 dark:bg-opacity-50 dark:bg-surface-950/50";
32392
32807
  const Component = component || "button";
32393
32808
  const t4 = disabled ? "opacity-50 pointer-events-none" : "cursor-pointer";
32394
32809
  const t5 = toggled ? "outline outline-2 outline-primary" : "";
@@ -32396,7 +32811,7 @@
32396
32811
  const t7 = sizeClasses[size];
32397
32812
  let t8;
32398
32813
  if ($[10] !== bgClasses || $[11] !== className || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
32399
- t8 = cls(t4, t5, colorClasses$1, bgClasses, baseClasses, buttonClasses, t6, t7, className);
32814
+ t8 = cls(t4, t5, "text-inherit dark:text-inherit", colorClasses$1, bgClasses, baseClasses, buttonClasses, t6, t7, className);
32400
32815
  $[10] = bgClasses;
32401
32816
  $[11] = className;
32402
32817
  $[12] = t4;
@@ -32647,13 +33062,14 @@
32647
33062
  className,
32648
33063
  style,
32649
33064
  inputClassName,
32650
- invisible
33065
+ invisible,
33066
+ timezone
32651
33067
  }) => {
32652
33068
  const inputRef = React.useRef(null);
32653
33069
  const [focused, setFocused] = React.useState(false);
32654
33070
  const [internalValue, setInternalValue] = React.useState("");
32655
33071
  const [isTyping, setIsTyping] = React.useState(false);
32656
- const invalidValue = value !== void 0 && value !== null && !(value instanceof Date);
33072
+ const invalidValue = value !== void 0 && value !== null && (!(value instanceof Date) || isNaN(value.getTime()));
32657
33073
  useInjectStyles("DateTimeField", inputStyles);
32658
33074
  const handleClear = (e) => {
32659
33075
  e.preventDefault();
@@ -32665,18 +33081,64 @@
32665
33081
  if (!dateValue) {
32666
33082
  return "";
32667
33083
  }
32668
- const pad = (n) => n.toString().padStart(2, "0");
32669
- const year = dateValue.getFullYear();
32670
- const month = pad(dateValue.getMonth() + 1);
32671
- const day = pad(dateValue.getDate());
33084
+ const options = {
33085
+ year: "numeric",
33086
+ month: "2-digit",
33087
+ day: "2-digit",
33088
+ hour: "2-digit",
33089
+ minute: "2-digit",
33090
+ hour12: false,
33091
+ timeZone: timezone
33092
+ // undefined = local timezone
33093
+ };
33094
+ const formatter = new Intl.DateTimeFormat("en-CA", options);
33095
+ let parts;
33096
+ try {
33097
+ parts = formatter.formatToParts(dateValue);
33098
+ } catch {
33099
+ return "";
33100
+ }
33101
+ const getPart = (type) => parts.find((p) => p.type === type)?.value ?? "";
33102
+ const year = getPart("year");
33103
+ const month = getPart("month");
33104
+ const day = getPart("day");
32672
33105
  if (mode_0 === "date") {
32673
33106
  return `${year}-${month}-${day}`;
32674
33107
  } else {
32675
- const hours = pad(dateValue.getHours());
32676
- const minutes = pad(dateValue.getMinutes());
33108
+ const hours = getPart("hour");
33109
+ const minutes = getPart("minute");
32677
33110
  return `${year}-${month}-${day}T${hours}:${minutes}`;
32678
33111
  }
32679
33112
  };
33113
+ const getTimezoneOffsetMinutes = (date, tz) => {
33114
+ if (!tz) {
33115
+ return -date.getTimezoneOffset();
33116
+ }
33117
+ const utcFormatter = new Intl.DateTimeFormat("en-CA", {
33118
+ year: "numeric",
33119
+ month: "2-digit",
33120
+ day: "2-digit",
33121
+ hour: "2-digit",
33122
+ minute: "2-digit",
33123
+ hour12: false,
33124
+ timeZone: "UTC"
33125
+ });
33126
+ const tzFormatter = new Intl.DateTimeFormat("en-CA", {
33127
+ year: "numeric",
33128
+ month: "2-digit",
33129
+ day: "2-digit",
33130
+ hour: "2-digit",
33131
+ minute: "2-digit",
33132
+ hour12: false,
33133
+ timeZone: tz
33134
+ });
33135
+ const utcParts = utcFormatter.formatToParts(date);
33136
+ const tzParts = tzFormatter.formatToParts(date);
33137
+ const getPart_0 = (parts_0, type_0) => parseInt(parts_0.find((p_0) => p_0.type === type_0)?.value ?? "0", 10);
33138
+ const utcDate = new Date(Date.UTC(getPart_0(utcParts, "year"), getPart_0(utcParts, "month") - 1, getPart_0(utcParts, "day"), getPart_0(utcParts, "hour"), getPart_0(utcParts, "minute")));
33139
+ const tzDate = new Date(Date.UTC(getPart_0(tzParts, "year"), getPart_0(tzParts, "month") - 1, getPart_0(tzParts, "day"), getPart_0(tzParts, "hour"), getPart_0(tzParts, "minute")));
33140
+ return (tzDate.getTime() - utcDate.getTime()) / 6e4;
33141
+ };
32680
33142
  const handleInputChange = (e_0) => {
32681
33143
  const inputValue = e_0.target.value;
32682
33144
  setInternalValue(inputValue);
@@ -32686,18 +33148,26 @@
32686
33148
  return;
32687
33149
  }
32688
33150
  try {
32689
- const parsed = new Date(inputValue);
32690
- if (isNaN(parsed.getTime())) {
32691
- throw new Error("Invalid date");
32692
- }
32693
- let newDate;
33151
+ let year_0, month_0, day_0, hours_0 = 0, minutes_0 = 0;
32694
33152
  if (mode === "date") {
32695
- const userTimezoneOffset = parsed.getTimezoneOffset() * 6e4;
32696
- newDate = new Date(parsed.getTime() + userTimezoneOffset);
33153
+ [year_0, month_0, day_0] = inputValue.split("-").map(Number);
33154
+ } else {
33155
+ const [datePart, timePart] = inputValue.split("T");
33156
+ [year_0, month_0, day_0] = datePart.split("-").map(Number);
33157
+ [hours_0, minutes_0] = timePart.split(":").map(Number);
33158
+ }
33159
+ let resultDate;
33160
+ if (!timezone) {
33161
+ resultDate = new Date(year_0, month_0 - 1, day_0, hours_0, minutes_0);
32697
33162
  } else {
32698
- newDate = parsed;
33163
+ const refUtcDate = new Date(Date.UTC(year_0, month_0 - 1, day_0, hours_0, minutes_0));
33164
+ const offsetMinutes = getTimezoneOffsetMinutes(refUtcDate, timezone);
33165
+ resultDate = new Date(Date.UTC(year_0, month_0 - 1, day_0, hours_0, minutes_0) - offsetMinutes * 6e4);
32699
33166
  }
32700
- onChange?.(newDate);
33167
+ if (isNaN(resultDate.getTime())) {
33168
+ throw new Error("Invalid date");
33169
+ }
33170
+ onChange?.(resultDate);
32701
33171
  } catch (e_1) {
32702
33172
  return;
32703
33173
  }
@@ -32766,21 +33236,21 @@
32766
33236
  }
32767
33237
  `;
32768
33238
  const widthClasses = {
32769
- xs: "max-w-xs min-w-xs w-xs",
32770
- sm: "max-w-sm min-w-sm w-sm",
32771
- md: "max-w-md min-w-md w-md",
32772
- lg: "max-w-lg min-w-lg w-lg",
32773
- xl: "max-w-xl min-w-xl w-xl",
32774
- "2xl": "max-w-2xl min-w-2xl w-2xl",
32775
- "3xl": "max-w-3xl min-w-3xl w-3xl",
32776
- "4xl": "max-w-4xl min-w-4xl w-4xl",
32777
- "5xl": "max-w-5xl min-w-5xl w-5xl",
32778
- "6xl": "max-w-6xl min-w-6xl w-6xl",
32779
- "7xl": "max-w-7xl min-w-7xl w-7xl",
32780
- full: "max-w-full min-w-full w-full"
33239
+ xs: "max-w-xs w-xs",
33240
+ sm: "max-w-sm w-sm",
33241
+ md: "max-w-md w-md",
33242
+ lg: "max-w-lg w-lg",
33243
+ xl: "max-w-xl w-xl",
33244
+ "2xl": "max-w-2xl w-2xl",
33245
+ "3xl": "max-w-3xl w-3xl",
33246
+ "4xl": "max-w-4xl w-4xl",
33247
+ "5xl": "max-w-5xl w-5xl",
33248
+ "6xl": "max-w-6xl w-6xl",
33249
+ "7xl": "max-w-7xl w-7xl",
33250
+ full: "max-w-full w-full"
32781
33251
  };
32782
33252
  const Dialog = (t0) => {
32783
- const $ = reactCompilerRuntime.c(42);
33253
+ const $ = reactCompilerRuntime.c(45);
32784
33254
  const {
32785
33255
  open,
32786
33256
  onOpenChange,
@@ -32797,7 +33267,8 @@
32797
33267
  onEscapeKeyDown,
32798
33268
  onPointerDownOutside,
32799
33269
  onInteractOutside,
32800
- disableInitialFocus: t5
33270
+ disableInitialFocus: t5,
33271
+ portalContainer
32801
33272
  } = t0;
32802
33273
  const fullWidth = t1 === void 0 ? true : t1;
32803
33274
  const scrollable = t2 === void 0 ? true : t2;
@@ -32805,6 +33276,8 @@
32805
33276
  const modal = t4 === void 0 ? true : t4;
32806
33277
  const disableInitialFocus = t5 === void 0 ? true : t5;
32807
33278
  const [displayed, setDisplayed] = React.useState(false);
33279
+ const contextContainer = usePortalContainer();
33280
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
32808
33281
  let t6;
32809
33282
  let t7;
32810
33283
  if ($[0] !== open) {
@@ -32812,11 +33285,11 @@
32812
33285
  if (!open) {
32813
33286
  const timeout = setTimeout(() => {
32814
33287
  setDisplayed(false);
32815
- }, 150);
33288
+ }, 100);
32816
33289
  return () => clearTimeout(timeout);
32817
33290
  } else {
32818
33291
  setDisplayed(true);
32819
- return _temp$2;
33292
+ return _temp$4;
32820
33293
  }
32821
33294
  };
32822
33295
  t7 = [open];
@@ -32840,7 +33313,7 @@
32840
33313
  const t10 = displayed && open ? "opacity-100" : "opacity-0";
32841
33314
  let t11;
32842
33315
  if ($[5] !== t10) {
32843
- t11 = cls("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 bg-black bg-opacity-50 dark:bg-opacity-60 backdrop-blur-sm ", t10, "z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center");
33316
+ t11 = cls("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 bg-black dark:bg-opacity-60 dark:bg-black/60 bg-opacity-50 bg-black/50 dark: bg-black/60 backdrop-blur-sm ", t10, "z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center");
32844
33317
  $[5] = t10;
32845
33318
  $[6] = t11;
32846
33319
  } else {
@@ -32930,10 +33403,10 @@
32930
33403
  }
32931
33404
  let t26;
32932
33405
  if ($[33] !== t14 || $[34] !== t25 || $[35] !== t9) {
32933
- t26 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t9, children: [
33406
+ t26 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t9, children: [
32934
33407
  t14,
32935
33408
  t25
32936
- ] }) });
33409
+ ] });
32937
33410
  $[33] = t14;
32938
33411
  $[34] = t25;
32939
33412
  $[35] = t9;
@@ -32942,19 +33415,28 @@
32942
33415
  t26 = $[36];
32943
33416
  }
32944
33417
  let t27;
32945
- if ($[37] !== modal || $[38] !== onOpenChange || $[39] !== t26 || $[40] !== t8) {
32946
- t27 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { open: t8, modal, onOpenChange, children: t26 });
32947
- $[37] = modal;
32948
- $[38] = onOpenChange;
32949
- $[39] = t26;
32950
- $[40] = t8;
32951
- $[41] = t27;
33418
+ if ($[37] !== finalContainer || $[38] !== t26) {
33419
+ t27 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { container: finalContainer, children: t26 });
33420
+ $[37] = finalContainer;
33421
+ $[38] = t26;
33422
+ $[39] = t27;
33423
+ } else {
33424
+ t27 = $[39];
33425
+ }
33426
+ let t28;
33427
+ if ($[40] !== modal || $[41] !== onOpenChange || $[42] !== t27 || $[43] !== t8) {
33428
+ t28 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { open: t8, modal, onOpenChange, children: t27 });
33429
+ $[40] = modal;
33430
+ $[41] = onOpenChange;
33431
+ $[42] = t27;
33432
+ $[43] = t8;
33433
+ $[44] = t28;
32952
33434
  } else {
32953
- t27 = $[41];
33435
+ t28 = $[44];
32954
33436
  }
32955
- return t27;
33437
+ return t28;
32956
33438
  };
32957
- function _temp$2() {
33439
+ function _temp$4() {
32958
33440
  }
32959
33441
  function DialogActions(t0) {
32960
33442
  const $ = reactCompilerRuntime.c(7);
@@ -32969,7 +33451,7 @@
32969
33451
  const t3 = translucent ? "backdrop-blur-sm" : "";
32970
33452
  let t4;
32971
33453
  if ($[0] !== className || $[1] !== position || $[2] !== t3) {
32972
- t4 = cls(defaultBorderMixin, "pt-2 pb-4 px-4 border-t flex flex-row items-center justify-end bottom-0 right-0 left-0 text-right z-2 gap-2", position, "bg-white bg-opacity-60 dark:bg-surface-900 dark:bg-opacity-60", t3, className);
33454
+ t4 = cls(defaultBorderMixin, "pt-2 pb-4 px-4 border-t flex flex-row items-center justify-end bottom-0 right-0 left-0 text-right z-2 gap-2", position, "bg-white bg-opacity-60 bg-white/60 dark:bg-surface-900 dark:bg-opacity-60 dark:bg-surface-900/60", t3, className);
32973
33455
  $[0] = className;
32974
33456
  $[1] = position;
32975
33457
  $[2] = t3;
@@ -33217,7 +33699,7 @@
33217
33699
  const t13 = asField && fieldBackgroundMixin;
33218
33700
  let t14;
33219
33701
  if ($[11] !== t10 || $[12] !== t11 || $[13] !== t12 || $[14] !== t13 || $[15] !== titleClassName) {
33220
- t14 = cls("rounded-t flex items-center justify-between w-full min-h-[52px]", "hover:bg-surface-accent-200 hover:bg-opacity-40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40", t10, t11, "transition-all duration-200", t12, t13, titleClassName, "cursor-pointer");
33702
+ t14 = cls("rounded-t flex items-center justify-between w-full min-h-[52px]", "hover:bg-surface-accent-200 hover:bg-opacity-40 hover:bg-surface-accent-200/40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40 dark:hover:bg-surface-800/40", t10, t11, "transition-all duration-200", t12, t13, titleClassName, "cursor-pointer");
33221
33703
  $[11] = t10;
33222
33704
  $[12] = t11;
33223
33705
  $[13] = t12;
@@ -33311,7 +33793,7 @@
33311
33793
  return t24;
33312
33794
  }
33313
33795
  function FileUpload(t0) {
33314
- const $ = reactCompilerRuntime.c(32);
33796
+ const $ = reactCompilerRuntime.c(33);
33315
33797
  const {
33316
33798
  accept,
33317
33799
  onFilesAdded,
@@ -33366,15 +33848,17 @@
33366
33848
  }
33367
33849
  const t4 = size === "large";
33368
33850
  const t5 = size === "medium";
33369
- const t6 = !disabled;
33370
- const t7 = !isDragActive;
33371
- let t8;
33372
- if ($[10] !== isDragAccept || $[11] !== isDragReject || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
33373
- t8 = cls(fieldBackgroundMixin, "flex gap-2", "p-4 box-border relative items-center border-2 border-solid border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid", {
33851
+ const t6 = size === "small";
33852
+ const t7 = !disabled;
33853
+ const t8 = !isDragActive;
33854
+ let t9;
33855
+ if ($[10] !== isDragAccept || $[11] !== isDragReject || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7 || $[16] !== t8) {
33856
+ t9 = cls(fieldBackgroundMixin, "flex gap-2", "p-4 box-border relative items-center border-2 border-solid border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid", {
33374
33857
  "h-44": t4,
33375
33858
  "h-28": t5,
33376
- "cursor-pointer": t6,
33377
- [fieldBackgroundHoverMixin]: t7,
33859
+ "h-16": t6,
33860
+ "cursor-pointer": t7,
33861
+ [fieldBackgroundHoverMixin]: t8,
33378
33862
  "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-red-500": isDragReject,
33379
33863
  "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-green-500": isDragAccept
33380
33864
  });
@@ -33385,60 +33869,61 @@
33385
33869
  $[14] = t6;
33386
33870
  $[15] = t7;
33387
33871
  $[16] = t8;
33872
+ $[17] = t9;
33388
33873
  } else {
33389
- t8 = $[16];
33390
- }
33391
- let t9;
33392
- if ($[17] !== title) {
33393
- t9 = /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "secondary", className: "absolute top-2 left-3.5 cursor-inherit", children: title });
33394
- $[17] = title;
33395
- $[18] = t9;
33396
- } else {
33397
- t9 = $[18];
33874
+ t9 = $[17];
33398
33875
  }
33399
33876
  let t10;
33400
- if ($[19] !== getInputProps) {
33401
- t10 = getInputProps();
33402
- $[19] = getInputProps;
33403
- $[20] = t10;
33877
+ if ($[18] !== title) {
33878
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "secondary", className: "absolute top-2 left-3.5 cursor-inherit", children: title });
33879
+ $[18] = title;
33880
+ $[19] = t10;
33404
33881
  } else {
33405
- t10 = $[20];
33882
+ t10 = $[19];
33406
33883
  }
33407
33884
  let t11;
33408
- if ($[21] !== t10) {
33409
- t11 = /* @__PURE__ */ jsxRuntime.jsx("input", { ...t10 });
33410
- $[21] = t10;
33411
- $[22] = t11;
33885
+ if ($[20] !== getInputProps) {
33886
+ t11 = getInputProps();
33887
+ $[20] = getInputProps;
33888
+ $[21] = t11;
33412
33889
  } else {
33413
- t11 = $[22];
33890
+ t11 = $[21];
33414
33891
  }
33415
33892
  let t12;
33416
- if ($[23] !== uploadDescription) {
33417
- t12 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow h-28 box-border flex flex-col items-center justify-center text-center", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { align: "center", variant: "label", className: "flex flex-row gap-2 justify-center", children: uploadDescription }) });
33418
- $[23] = uploadDescription;
33419
- $[24] = t12;
33893
+ if ($[22] !== t11) {
33894
+ t12 = /* @__PURE__ */ jsxRuntime.jsx("input", { ...t11 });
33895
+ $[22] = t11;
33896
+ $[23] = t12;
33420
33897
  } else {
33421
- t12 = $[24];
33898
+ t12 = $[23];
33422
33899
  }
33423
33900
  let t13;
33424
- if ($[25] !== children || $[26] !== t11 || $[27] !== t12 || $[28] !== t3 || $[29] !== t8 || $[30] !== t9) {
33425
- t13 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ...t3, className: t8, children: [
33426
- t9,
33427
- t11,
33901
+ if ($[24] !== uploadDescription) {
33902
+ t13 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow h-28 box-border flex flex-col items-center justify-center text-center", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { align: "center", variant: "label", className: "flex flex-row gap-2 justify-center", children: uploadDescription }) });
33903
+ $[24] = uploadDescription;
33904
+ $[25] = t13;
33905
+ } else {
33906
+ t13 = $[25];
33907
+ }
33908
+ let t14;
33909
+ if ($[26] !== children || $[27] !== t10 || $[28] !== t12 || $[29] !== t13 || $[30] !== t3 || $[31] !== t9) {
33910
+ t14 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ...t3, className: t9, children: [
33911
+ t10,
33912
+ t12,
33428
33913
  children,
33429
- t12
33914
+ t13
33430
33915
  ] });
33431
- $[25] = children;
33432
- $[26] = t11;
33433
- $[27] = t12;
33434
- $[28] = t3;
33435
- $[29] = t8;
33436
- $[30] = t9;
33437
- $[31] = t13;
33916
+ $[26] = children;
33917
+ $[27] = t10;
33918
+ $[28] = t12;
33919
+ $[29] = t13;
33920
+ $[30] = t3;
33921
+ $[31] = t9;
33922
+ $[32] = t14;
33438
33923
  } else {
33439
- t13 = $[31];
33924
+ t14 = $[32];
33440
33925
  }
33441
- return t13;
33926
+ return t14;
33442
33927
  }
33443
33928
  const colorClasses = {
33444
33929
  info: "bg-sky-200 dark:bg-teal-900",
@@ -33659,6 +34144,8 @@
33659
34144
  className
33660
34145
  } = t0;
33661
34146
  const sideOffset = t1 === void 0 ? 4 : t1;
34147
+ const contextContainer = usePortalContainer();
34148
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
33662
34149
  let t2;
33663
34150
  if ($[0] !== ref || $[1] !== trigger) {
33664
34151
  t2 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, { ref, asChild: true, children: trigger });
@@ -33689,9 +34176,9 @@
33689
34176
  t4 = $[10];
33690
34177
  }
33691
34178
  let t5;
33692
- if ($[11] !== portalContainer || $[12] !== t4) {
33693
- t5 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { container: portalContainer, children: t4 });
33694
- $[11] = portalContainer;
34179
+ if ($[11] !== finalContainer || $[12] !== t4) {
34180
+ t5 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { container: finalContainer, children: t4 });
34181
+ $[11] = finalContainer;
33695
34182
  $[12] = t4;
33696
34183
  $[13] = t5;
33697
34184
  } else {
@@ -33716,38 +34203,46 @@
33716
34203
  });
33717
34204
  Menu.displayName = "Menu";
33718
34205
  const MenuItem = React.memo((t0) => {
33719
- const $ = reactCompilerRuntime.c(8);
34206
+ const $ = reactCompilerRuntime.c(11);
33720
34207
  const {
33721
34208
  children,
33722
34209
  dense: t1,
34210
+ disabled: t2,
33723
34211
  onClick,
33724
34212
  className
33725
34213
  } = t0;
33726
34214
  const dense = t1 === void 0 ? false : t1;
33727
- const t2 = onClick && "cursor-pointer";
33728
- const t3 = dense ? "px-4 py-1.5" : "px-4 py-2";
33729
- let t4;
33730
- if ($[0] !== className || $[1] !== t2 || $[2] !== t3) {
33731
- t4 = cls(t2, "rounded-md text-sm font-medium text-surface-accent-700 dark:text-surface-accent-300 hover:bg-surface-accent-100 dark:hover:bg-surface-accent-900 flex items-center gap-4", t3, className);
34215
+ const disabled = t2 === void 0 ? false : t2;
34216
+ const t3 = onClick && !disabled && "cursor-pointer";
34217
+ const t4 = disabled && "opacity-50 cursor-not-allowed";
34218
+ const t5 = !disabled && "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-900";
34219
+ const t6 = dense ? "px-4 py-1.5" : "px-4 py-2";
34220
+ let t7;
34221
+ if ($[0] !== className || $[1] !== t3 || $[2] !== t4 || $[3] !== t5 || $[4] !== t6) {
34222
+ t7 = cls(t3, t4, "rounded-md text-sm font-medium text-surface-accent-700 dark:text-surface-accent-300 flex items-center gap-4", t5, t6, className);
33732
34223
  $[0] = className;
33733
- $[1] = t2;
33734
- $[2] = t3;
33735
- $[3] = t4;
34224
+ $[1] = t3;
34225
+ $[2] = t4;
34226
+ $[3] = t5;
34227
+ $[4] = t6;
34228
+ $[5] = t7;
33736
34229
  } else {
33737
- t4 = $[3];
34230
+ t7 = $[5];
33738
34231
  }
33739
- const classNames = t4;
33740
- let t5;
33741
- if ($[4] !== children || $[5] !== classNames || $[6] !== onClick) {
33742
- t5 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Item, { className: classNames, onClick, children });
33743
- $[4] = children;
33744
- $[5] = classNames;
33745
- $[6] = onClick;
33746
- $[7] = t5;
34232
+ const classNames = t7;
34233
+ const t8 = disabled ? void 0 : onClick;
34234
+ let t9;
34235
+ if ($[6] !== children || $[7] !== classNames || $[8] !== disabled || $[9] !== t8) {
34236
+ t9 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Item, { className: classNames, disabled, onClick: t8, children });
34237
+ $[6] = children;
34238
+ $[7] = classNames;
34239
+ $[8] = disabled;
34240
+ $[9] = t8;
34241
+ $[10] = t9;
33747
34242
  } else {
33748
- t5 = $[7];
34243
+ t9 = $[10];
33749
34244
  }
33750
- return t5;
34245
+ return t9;
33751
34246
  });
33752
34247
  function Menubar(t0) {
33753
34248
  const $ = reactCompilerRuntime.c(6);
@@ -33800,7 +34295,7 @@
33800
34295
  } = t0;
33801
34296
  let t1;
33802
34297
  if ($[0] !== className) {
33803
- t1 = cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800", className);
34298
+ t1 = cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800", className);
33804
34299
  $[0] = className;
33805
34300
  $[1] = t1;
33806
34301
  } else {
@@ -33819,17 +34314,21 @@
33819
34314
  return t2;
33820
34315
  }
33821
34316
  function MenubarPortal(t0) {
33822
- const $ = reactCompilerRuntime.c(2);
34317
+ const $ = reactCompilerRuntime.c(3);
33823
34318
  const {
33824
- children
34319
+ children,
34320
+ portalContainer
33825
34321
  } = t0;
34322
+ const contextContainer = usePortalContainer();
34323
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
33826
34324
  let t1;
33827
- if ($[0] !== children) {
33828
- t1 = /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { children });
34325
+ if ($[0] !== children || $[1] !== finalContainer) {
34326
+ t1 = /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { container: finalContainer, children });
33829
34327
  $[0] = children;
33830
- $[1] = t1;
34328
+ $[1] = finalContainer;
34329
+ $[2] = t1;
33831
34330
  } else {
33832
- t1 = $[1];
34331
+ t1 = $[2];
33833
34332
  }
33834
34333
  return t1;
33835
34334
  }
@@ -34402,7 +34901,7 @@
34402
34901
  if (orientation === "horizontal") {
34403
34902
  let t1;
34404
34903
  if ($[0] !== className) {
34405
- t1 = cls("dark:bg-opacity-80 dark:bg-surface-800 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-4", className);
34904
+ t1 = cls("dark:bg-opacity-80 dark:bg-surface-800 dark:bg-surface-800/80 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-4", className);
34406
34905
  $[0] = className;
34407
34906
  $[1] = t1;
34408
34907
  } else {
@@ -34421,7 +34920,7 @@
34421
34920
  } else {
34422
34921
  let t1;
34423
34922
  if ($[5] !== className) {
34424
- t1 = cls("dark:bg-opacity-80 dark:bg-surface-800 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px mx-4", className);
34923
+ t1 = cls("dark:bg-opacity-80 dark:bg-surface-800 dark:bg-surface-800/80 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px mx-4", className);
34425
34924
  $[5] = className;
34426
34925
  $[6] = t1;
34427
34926
  } else {
@@ -34467,7 +34966,7 @@
34467
34966
  }
34468
34967
  const MultiSelectContext = React__namespace.createContext({});
34469
34968
  const MultiSelect = React__namespace.forwardRef((t0, ref) => {
34470
- const $ = reactCompilerRuntime.c(105);
34969
+ const $ = reactCompilerRuntime.c(112);
34471
34970
  const {
34472
34971
  value,
34473
34972
  size: t1,
@@ -34482,17 +34981,22 @@
34482
34981
  includeSelectAll: t4,
34483
34982
  useChips: t5,
34484
34983
  className,
34984
+ inputClassName,
34985
+ inputRef,
34485
34986
  children,
34486
34987
  renderValues,
34487
34988
  open,
34488
- onOpenChange
34989
+ onOpenChange,
34990
+ portalContainer,
34991
+ endAdornment
34489
34992
  } = t0;
34490
34993
  const size = t1 === void 0 ? "large" : t1;
34491
34994
  const modalPopover = t2 === void 0 ? true : t2;
34492
34995
  const includeClear = t3 === void 0 ? true : t3;
34493
34996
  const includeSelectAll = t4 === void 0 ? true : t4;
34494
34997
  const useChips = t5 === void 0 ? true : t5;
34495
- const [isPopoverOpen, setIsPopoverOpen] = React__namespace.useState(open ?? false);
34998
+ const [isMounted, setIsMounted] = React.useState(false);
34999
+ const [isPopoverOpen, setIsPopoverOpen] = React.useState(open ?? false);
34496
35000
  let t6;
34497
35001
  if ($[0] !== value) {
34498
35002
  t6 = value ?? [];
@@ -34501,79 +35005,95 @@
34501
35005
  } else {
34502
35006
  t6 = $[1];
34503
35007
  }
34504
- const [selectedValues, setSelectedValues] = React__namespace.useState(t6);
35008
+ const [selectedValues, setSelectedValues] = React.useState(t6);
35009
+ const contextContainer = usePortalContainer();
35010
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
34505
35011
  let t7;
34506
- if ($[2] !== onOpenChange) {
34507
- t7 = (open_0) => {
34508
- setIsPopoverOpen(open_0);
34509
- onOpenChange?.(open_0);
35012
+ let t8;
35013
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35014
+ t7 = () => {
35015
+ setIsMounted(true);
34510
35016
  };
34511
- $[2] = onOpenChange;
34512
- $[3] = t7;
35017
+ t8 = [];
35018
+ $[2] = t7;
35019
+ $[3] = t8;
34513
35020
  } else {
34514
- t7 = $[3];
35021
+ t7 = $[2];
35022
+ t8 = $[3];
34515
35023
  }
34516
- const onPopoverOpenChange = t7;
34517
- let t8;
35024
+ React.useEffect(t7, t8);
34518
35025
  let t9;
34519
- if ($[4] !== open) {
34520
- t8 = () => {
34521
- setIsPopoverOpen(open ?? false);
35026
+ if ($[4] !== onOpenChange) {
35027
+ t9 = (open_0) => {
35028
+ setIsPopoverOpen(open_0);
35029
+ onOpenChange?.(open_0);
34522
35030
  };
34523
- t9 = [open];
34524
- $[4] = open;
34525
- $[5] = t8;
34526
- $[6] = t9;
35031
+ $[4] = onOpenChange;
35032
+ $[5] = t9;
34527
35033
  } else {
34528
- t8 = $[5];
34529
- t9 = $[6];
35034
+ t9 = $[5];
34530
35035
  }
34531
- React.useEffect(t8, t9);
35036
+ const onPopoverOpenChange = t9;
34532
35037
  let t10;
34533
35038
  let t11;
34534
- if ($[7] !== children) {
34535
- t11 = children ? React.Children.map(children, _temp$1).filter(Boolean) : [];
34536
- $[7] = children;
35039
+ if ($[6] !== open) {
35040
+ t10 = () => {
35041
+ setIsPopoverOpen(open ?? false);
35042
+ };
35043
+ t11 = [open];
35044
+ $[6] = open;
35045
+ $[7] = t10;
34537
35046
  $[8] = t11;
34538
35047
  } else {
35048
+ t10 = $[7];
34539
35049
  t11 = $[8];
34540
35050
  }
34541
- t10 = t11;
34542
- const allValues = t10;
35051
+ React.useEffect(t10, t11);
34543
35052
  let t12;
34544
- let map;
35053
+ let t13;
34545
35054
  if ($[9] !== children) {
35055
+ t13 = children ? React.Children.map(children, _temp$3)?.filter(Boolean) ?? [] : [];
35056
+ $[9] = children;
35057
+ $[10] = t13;
35058
+ } else {
35059
+ t13 = $[10];
35060
+ }
35061
+ t12 = t13;
35062
+ const allValues = t12;
35063
+ let t14;
35064
+ let map;
35065
+ if ($[11] !== children) {
34546
35066
  map = /* @__PURE__ */ new Map();
34547
35067
  React.Children.forEach(children, (child_0) => {
34548
35068
  if (React__namespace.isValidElement(child_0)) {
34549
35069
  map.set(String(child_0.props.value), child_0.props.children);
34550
35070
  }
34551
35071
  });
34552
- $[9] = children;
34553
- $[10] = map;
35072
+ $[11] = children;
35073
+ $[12] = map;
34554
35074
  } else {
34555
- map = $[10];
35075
+ map = $[12];
34556
35076
  }
34557
- t12 = map;
34558
- const optionsMap = t12;
34559
- let t13;
34560
- let t14;
34561
- if ($[11] !== value) {
34562
- t13 = () => {
35077
+ t14 = map;
35078
+ const optionsMap = t14;
35079
+ let t15;
35080
+ let t16;
35081
+ if ($[13] !== value) {
35082
+ t15 = () => {
34563
35083
  setSelectedValues(value ?? []);
34564
35084
  };
34565
- t14 = [value];
34566
- $[11] = value;
34567
- $[12] = t13;
34568
- $[13] = t14;
35085
+ t16 = [value];
35086
+ $[13] = value;
35087
+ $[14] = t15;
35088
+ $[15] = t16;
34569
35089
  } else {
34570
- t13 = $[12];
34571
- t14 = $[13];
35090
+ t15 = $[14];
35091
+ t16 = $[15];
34572
35092
  }
34573
- React__namespace.useEffect(t13, t14);
35093
+ React__namespace.useEffect(t15, t16);
34574
35094
  let onItemClick;
34575
35095
  let updateValues;
34576
- if ($[14] !== onValueChange || $[15] !== selectedValues) {
35096
+ if ($[16] !== onValueChange || $[17] !== selectedValues) {
34577
35097
  onItemClick = function onItemClick2(newValue) {
34578
35098
  let newSelectedValues;
34579
35099
  if (selectedValues.some((v_0) => String(v_0) === String(newValue))) {
@@ -34587,17 +35107,17 @@
34587
35107
  setSelectedValues(values);
34588
35108
  onValueChange?.(values);
34589
35109
  };
34590
- $[14] = onValueChange;
34591
- $[15] = selectedValues;
34592
- $[16] = onItemClick;
34593
- $[17] = updateValues;
35110
+ $[16] = onValueChange;
35111
+ $[17] = selectedValues;
35112
+ $[18] = onItemClick;
35113
+ $[19] = updateValues;
34594
35114
  } else {
34595
- onItemClick = $[16];
34596
- updateValues = $[17];
35115
+ onItemClick = $[18];
35116
+ updateValues = $[19];
34597
35117
  }
34598
- let t15;
34599
- if ($[18] !== onPopoverOpenChange || $[19] !== selectedValues || $[20] !== updateValues) {
34600
- t15 = (event) => {
35118
+ let t17;
35119
+ if ($[20] !== onPopoverOpenChange || $[21] !== selectedValues || $[22] !== updateValues) {
35120
+ t17 = (event) => {
34601
35121
  if (event.key === "Enter") {
34602
35122
  onPopoverOpenChange(true);
34603
35123
  } else {
@@ -34608,53 +35128,53 @@
34608
35128
  }
34609
35129
  }
34610
35130
  };
34611
- $[18] = onPopoverOpenChange;
34612
- $[19] = selectedValues;
34613
- $[20] = updateValues;
34614
- $[21] = t15;
35131
+ $[20] = onPopoverOpenChange;
35132
+ $[21] = selectedValues;
35133
+ $[22] = updateValues;
35134
+ $[23] = t17;
34615
35135
  } else {
34616
- t15 = $[21];
35136
+ t17 = $[23];
34617
35137
  }
34618
- const handleInputKeyDown = t15;
34619
- let t16;
34620
- if ($[22] !== selectedValues || $[23] !== updateValues) {
34621
- t16 = (value_0) => {
35138
+ const handleInputKeyDown = t17;
35139
+ let t18;
35140
+ if ($[24] !== selectedValues || $[25] !== updateValues) {
35141
+ t18 = (value_0) => {
34622
35142
  const newSelectedValues_1 = selectedValues.some((v_2) => String(v_2) === String(value_0)) ? selectedValues.filter((v_1) => String(v_1) !== String(value_0)) : [...selectedValues, value_0];
34623
35143
  updateValues(newSelectedValues_1);
34624
35144
  };
34625
- $[22] = selectedValues;
34626
- $[23] = updateValues;
34627
- $[24] = t16;
35145
+ $[24] = selectedValues;
35146
+ $[25] = updateValues;
35147
+ $[26] = t18;
34628
35148
  } else {
34629
- t16 = $[24];
35149
+ t18 = $[26];
34630
35150
  }
34631
- const toggleOption = t16;
34632
- let t17;
34633
- if ($[25] !== updateValues) {
34634
- t17 = () => {
35151
+ const toggleOption = t18;
35152
+ let t19;
35153
+ if ($[27] !== updateValues) {
35154
+ t19 = () => {
34635
35155
  updateValues([]);
34636
35156
  };
34637
- $[25] = updateValues;
34638
- $[26] = t17;
35157
+ $[27] = updateValues;
35158
+ $[28] = t19;
34639
35159
  } else {
34640
- t17 = $[26];
35160
+ t19 = $[28];
34641
35161
  }
34642
- const handleClear = t17;
34643
- let t18;
34644
- if ($[27] !== isPopoverOpen || $[28] !== onPopoverOpenChange) {
34645
- t18 = () => {
35162
+ const handleClear = t19;
35163
+ let t20;
35164
+ if ($[29] !== isPopoverOpen || $[30] !== onPopoverOpenChange) {
35165
+ t20 = () => {
34646
35166
  onPopoverOpenChange(!isPopoverOpen);
34647
35167
  };
34648
- $[27] = isPopoverOpen;
34649
- $[28] = onPopoverOpenChange;
34650
- $[29] = t18;
35168
+ $[29] = isPopoverOpen;
35169
+ $[30] = onPopoverOpenChange;
35170
+ $[31] = t20;
34651
35171
  } else {
34652
- t18 = $[29];
35172
+ t20 = $[31];
34653
35173
  }
34654
- const handleTogglePopover = t18;
34655
- let t19;
34656
- if ($[30] !== allValues || $[31] !== handleClear || $[32] !== onPopoverOpenChange || $[33] !== selectedValues.length || $[34] !== updateValues) {
34657
- t19 = () => {
35174
+ const handleTogglePopover = t20;
35175
+ let t21;
35176
+ if ($[32] !== allValues || $[33] !== handleClear || $[34] !== onPopoverOpenChange || $[35] !== selectedValues.length || $[36] !== updateValues) {
35177
+ t21 = () => {
34658
35178
  if (selectedValues.length === allValues.length) {
34659
35179
  handleClear();
34660
35180
  } else {
@@ -34662,76 +35182,79 @@
34662
35182
  }
34663
35183
  onPopoverOpenChange(false);
34664
35184
  };
34665
- $[30] = allValues;
34666
- $[31] = handleClear;
34667
- $[32] = onPopoverOpenChange;
34668
- $[33] = selectedValues.length;
34669
- $[34] = updateValues;
34670
- $[35] = t19;
35185
+ $[32] = allValues;
35186
+ $[33] = handleClear;
35187
+ $[34] = onPopoverOpenChange;
35188
+ $[35] = selectedValues.length;
35189
+ $[36] = updateValues;
35190
+ $[37] = t21;
34671
35191
  } else {
34672
- t19 = $[35];
35192
+ t21 = $[37];
34673
35193
  }
34674
- const toggleAll = t19;
35194
+ const toggleAll = t21;
34675
35195
  useInjectStyles("MultiSelect", `
34676
35196
  [cmdk-group] {
34677
35197
  max-height: 45vh;
34678
35198
  overflow-y: auto;
34679
35199
  // width: 400px;
34680
35200
  } `);
34681
- let t20;
34682
- if ($[36] !== onItemClick || $[37] !== selectedValues) {
34683
- t20 = {
35201
+ let t22;
35202
+ if ($[38] !== onItemClick || $[39] !== selectedValues) {
35203
+ t22 = {
34684
35204
  fieldValue: selectedValues,
34685
35205
  onItemClick
34686
35206
  };
34687
- $[36] = onItemClick;
34688
- $[37] = selectedValues;
34689
- $[38] = t20;
35207
+ $[38] = onItemClick;
35208
+ $[39] = selectedValues;
35209
+ $[40] = t22;
34690
35210
  } else {
34691
- t20 = $[38];
35211
+ t22 = $[40];
34692
35212
  }
34693
- let t21;
34694
- if ($[39] !== error || $[40] !== label) {
34695
- t21 = typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label;
34696
- $[39] = error;
34697
- $[40] = label;
34698
- $[41] = t21;
34699
- } else {
34700
- t21 = $[41];
34701
- }
34702
- const t22 = size === "smallest";
34703
- const t23 = size === "small";
34704
- const t24 = size === "medium";
34705
- const t25 = size === "large";
34706
- let t26;
34707
- if ($[42] !== className || $[43] !== disabled || $[44] !== invisible || $[45] !== size || $[46] !== t22 || $[47] !== t23 || $[48] !== t24 || $[49] !== t25) {
34708
- t26 = cls({
34709
- "min-h-[28px]": t22,
34710
- "min-h-[32px]": t23,
34711
- "min-h-[44px]": t24,
34712
- "min-h-[64px]": t25
35213
+ let t23;
35214
+ if ($[41] !== error || $[42] !== label) {
35215
+ t23 = typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label;
35216
+ $[41] = error;
35217
+ $[42] = label;
35218
+ $[43] = t23;
35219
+ } else {
35220
+ t23 = $[43];
35221
+ }
35222
+ const t24 = isMounted && isPopoverOpen;
35223
+ const t25 = inputRef ?? ref;
35224
+ const t26 = size === "smallest";
35225
+ const t27 = size === "small";
35226
+ const t28 = size === "medium";
35227
+ const t29 = size === "large";
35228
+ let t30;
35229
+ if ($[44] !== className || $[45] !== disabled || $[46] !== inputClassName || $[47] !== invisible || $[48] !== size || $[49] !== t26 || $[50] !== t27 || $[51] !== t28 || $[52] !== t29) {
35230
+ t30 = cls({
35231
+ "min-h-[28px]": t26,
35232
+ "min-h-[32px]": t27,
35233
+ "min-h-[44px]": t28,
35234
+ "min-h-[64px]": t29
34713
35235
  }, {
34714
35236
  "py-1": size === "small" || size === "smallest",
34715
35237
  "py-2": size === "medium" || size === "large"
34716
35238
  }, {
34717
35239
  "px-2": size === "small" || size === "smallest",
34718
35240
  "px-4": size === "medium" || size === "large"
34719
- }, "select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className);
34720
- $[42] = className;
34721
- $[43] = disabled;
34722
- $[44] = invisible;
34723
- $[45] = size;
34724
- $[46] = t22;
34725
- $[47] = t23;
34726
- $[48] = t24;
34727
- $[49] = t25;
34728
- $[50] = t26;
35241
+ }, "select-none rounded-md text-sm", "focus:ring-0 focus-visible:ring-0 outline-none focus:outline-none focus-visible:outline-none", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, inputClassName);
35242
+ $[44] = className;
35243
+ $[45] = disabled;
35244
+ $[46] = inputClassName;
35245
+ $[47] = invisible;
35246
+ $[48] = size;
35247
+ $[49] = t26;
35248
+ $[50] = t27;
35249
+ $[51] = t28;
35250
+ $[52] = t29;
35251
+ $[53] = t30;
34729
35252
  } else {
34730
- t26 = $[50];
35253
+ t30 = $[53];
34731
35254
  }
34732
- let t27;
34733
- if ($[51] !== handleClear || $[52] !== includeClear || $[53] !== isPopoverOpen || $[54] !== optionsMap || $[55] !== placeholder || $[56] !== renderValues || $[57] !== selectedValues || $[58] !== size || $[59] !== toggleOption || $[60] !== useChips) {
34734
- t27 = selectedValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center w-full", children: [
35255
+ let t31;
35256
+ if ($[54] !== endAdornment || $[55] !== handleClear || $[56] !== includeClear || $[57] !== isPopoverOpen || $[58] !== optionsMap || $[59] !== placeholder || $[60] !== renderValues || $[61] !== selectedValues || $[62] !== size || $[63] !== toggleOption || $[64] !== useChips) {
35257
+ t31 = selectedValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center w-full", children: [
34735
35258
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
34736
35259
  renderValues && renderValues(selectedValues),
34737
35260
  !renderValues && selectedValues.map((value_1) => {
@@ -34749,186 +35272,200 @@
34749
35272
  })
34750
35273
  ] }),
34751
35274
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
34752
- includeClear && /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, { className: "ml-4", size: "small", onClick: (event_1) => {
35275
+ includeClear && !endAdornment && /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, { className: "ml-4", size: "small", onClick: (event_1) => {
34753
35276
  event_1.stopPropagation();
34754
35277
  handleClear();
34755
35278
  } }),
35279
+ endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-4 flex items-center", onClick: _temp2$1, children: endAdornment }),
34756
35280
  /* @__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" : "") }) })
34757
35281
  ] })
34758
35282
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full mx-auto", children: [
34759
35283
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: placeholder }),
34760
- /* @__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" : "") }) })
35284
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
35285
+ endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-4 flex items-center", onClick: _temp3, children: endAdornment }),
35286
+ /* @__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" : "") }) })
35287
+ ] })
34761
35288
  ] });
34762
- $[51] = handleClear;
34763
- $[52] = includeClear;
34764
- $[53] = isPopoverOpen;
34765
- $[54] = optionsMap;
34766
- $[55] = placeholder;
34767
- $[56] = renderValues;
34768
- $[57] = selectedValues;
34769
- $[58] = size;
34770
- $[59] = toggleOption;
34771
- $[60] = useChips;
34772
- $[61] = t27;
34773
- } else {
34774
- t27 = $[61];
35289
+ $[54] = endAdornment;
35290
+ $[55] = handleClear;
35291
+ $[56] = includeClear;
35292
+ $[57] = isPopoverOpen;
35293
+ $[58] = optionsMap;
35294
+ $[59] = placeholder;
35295
+ $[60] = renderValues;
35296
+ $[61] = selectedValues;
35297
+ $[62] = size;
35298
+ $[63] = toggleOption;
35299
+ $[64] = useChips;
35300
+ $[65] = t31;
35301
+ } else {
35302
+ t31 = $[65];
34775
35303
  }
34776
- let t28;
34777
- if ($[62] !== handleTogglePopover || $[63] !== ref || $[64] !== t26 || $[65] !== t27) {
34778
- t28 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ref, onClick: handleTogglePopover, className: t26, children: t27 }) });
34779
- $[62] = handleTogglePopover;
34780
- $[63] = ref;
34781
- $[64] = t26;
34782
- $[65] = t27;
34783
- $[66] = t28;
35304
+ let t32;
35305
+ if ($[66] !== handleTogglePopover || $[67] !== t25 || $[68] !== t30 || $[69] !== t31) {
35306
+ t32 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ref: t25, onClick: handleTogglePopover, className: t30, children: t31 }) });
35307
+ $[66] = handleTogglePopover;
35308
+ $[67] = t25;
35309
+ $[68] = t30;
35310
+ $[69] = t31;
35311
+ $[70] = t32;
34784
35312
  } else {
34785
- t28 = $[66];
35313
+ t32 = $[70];
34786
35314
  }
34787
- let t29;
34788
- if ($[67] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
34789
- t29 = cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
34790
- $[67] = t29;
35315
+ let t33;
35316
+ if ($[71] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35317
+ t33 = cls("z-50 overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
35318
+ $[71] = t33;
34791
35319
  } else {
34792
- t29 = $[67];
35320
+ t33 = $[71];
34793
35321
  }
34794
- let t30;
34795
- if ($[68] !== onPopoverOpenChange) {
34796
- t30 = () => onPopoverOpenChange(false);
34797
- $[68] = onPopoverOpenChange;
34798
- $[69] = t30;
35322
+ let t34;
35323
+ if ($[72] !== onPopoverOpenChange) {
35324
+ t34 = () => onPopoverOpenChange(false);
35325
+ $[72] = onPopoverOpenChange;
35326
+ $[73] = t34;
34799
35327
  } else {
34800
- t30 = $[69];
35328
+ t34 = $[73];
34801
35329
  }
34802
- let t31;
34803
- if ($[70] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
34804
- t31 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow ");
34805
- $[70] = t31;
35330
+ let t35;
35331
+ if ($[74] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35332
+ t35 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow text-surface-accent-900 dark:text-white");
35333
+ $[74] = t35;
34806
35334
  } else {
34807
- t31 = $[70];
35335
+ t35 = $[74];
34808
35336
  }
34809
- let t32;
34810
- if ($[71] !== handleInputKeyDown) {
34811
- t32 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Input, { className: t31, placeholder: "Search...", onKeyDown: handleInputKeyDown });
34812
- $[71] = handleInputKeyDown;
34813
- $[72] = t32;
35337
+ let t36;
35338
+ if ($[75] !== handleInputKeyDown) {
35339
+ t36 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Input, { className: t35, placeholder: "Search...", onKeyDown: handleInputKeyDown });
35340
+ $[75] = handleInputKeyDown;
35341
+ $[76] = t36;
34814
35342
  } else {
34815
- t32 = $[72];
35343
+ t36 = $[76];
34816
35344
  }
34817
- let t33;
34818
- if ($[73] !== handleClear || $[74] !== selectedValues.length) {
34819
- t33 = 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" });
34820
- $[73] = handleClear;
34821
- $[74] = selectedValues.length;
34822
- $[75] = t33;
35345
+ let t37;
35346
+ if ($[77] !== handleClear || $[78] !== selectedValues.length) {
35347
+ t37 = 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" });
35348
+ $[77] = handleClear;
35349
+ $[78] = selectedValues.length;
35350
+ $[79] = t37;
34823
35351
  } else {
34824
- t33 = $[75];
35352
+ t37 = $[79];
34825
35353
  }
34826
- let t34;
34827
- if ($[76] !== t32 || $[77] !== t33) {
34828
- t34 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center", children: [
34829
- t32,
34830
- t33
35354
+ let t38;
35355
+ if ($[80] !== t36 || $[81] !== t37) {
35356
+ t38 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center", children: [
35357
+ t36,
35358
+ t37
34831
35359
  ] });
34832
- $[76] = t32;
34833
- $[77] = t33;
34834
- $[78] = t34;
35360
+ $[80] = t36;
35361
+ $[81] = t37;
35362
+ $[82] = t38;
34835
35363
  } else {
34836
- t34 = $[78];
35364
+ t38 = $[82];
34837
35365
  }
34838
- let t35;
34839
- if ($[79] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
34840
- t35 = /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "horizontal", className: "my-0" });
34841
- $[79] = t35;
35366
+ let t39;
35367
+ if ($[83] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35368
+ t39 = /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "horizontal", className: "my-0" });
35369
+ $[83] = t39;
34842
35370
  } else {
34843
- t35 = $[79];
35371
+ t39 = $[83];
34844
35372
  }
34845
- let t36;
34846
- if ($[80] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
34847
- t36 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { className: "px-4 py-2", children: "No results found." });
34848
- $[80] = t36;
35373
+ let t40;
35374
+ if ($[84] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35375
+ t40 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { className: "px-4 py-2 text-sm text-text-secondary dark:text-text-secondary-dark", children: "No results found." });
35376
+ $[84] = t40;
34849
35377
  } else {
34850
- t36 = $[80];
35378
+ t40 = $[84];
34851
35379
  }
34852
- let t37;
34853
- if ($[81] !== allValues.length || $[82] !== includeSelectAll || $[83] !== selectedValues.length || $[84] !== toggleAll) {
34854
- t37 = 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: [
35380
+ let t41;
35381
+ if ($[85] !== allValues.length || $[86] !== includeSelectAll || $[87] !== selectedValues.length || $[88] !== toggleAll) {
35382
+ t41 = 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-primary/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: [
34855
35383
  /* @__PURE__ */ jsxRuntime.jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
34856
35384
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
34857
35385
  ] }, "all");
34858
- $[81] = allValues.length;
34859
- $[82] = includeSelectAll;
34860
- $[83] = selectedValues.length;
34861
- $[84] = toggleAll;
34862
- $[85] = t37;
35386
+ $[85] = allValues.length;
35387
+ $[86] = includeSelectAll;
35388
+ $[87] = selectedValues.length;
35389
+ $[88] = toggleAll;
35390
+ $[89] = t41;
34863
35391
  } else {
34864
- t37 = $[85];
35392
+ t41 = $[89];
34865
35393
  }
34866
- let t38;
34867
- if ($[86] !== children || $[87] !== t37) {
34868
- t38 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
34869
- t36,
35394
+ let t42;
35395
+ if ($[90] !== children || $[91] !== t41) {
35396
+ t42 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
35397
+ t40,
34870
35398
  /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Group, { children: [
34871
- t37,
35399
+ t41,
34872
35400
  children
34873
35401
  ] })
34874
35402
  ] });
34875
- $[86] = children;
34876
- $[87] = t37;
34877
- $[88] = t38;
34878
- } else {
34879
- t38 = $[88];
34880
- }
34881
- let t39;
34882
- if ($[89] !== t34 || $[90] !== t38) {
34883
- t39 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
34884
- t34,
34885
- t35,
34886
- t38
35403
+ $[90] = children;
35404
+ $[91] = t41;
35405
+ $[92] = t42;
35406
+ } else {
35407
+ t42 = $[92];
35408
+ }
35409
+ let t43;
35410
+ if ($[93] !== t38 || $[94] !== t42) {
35411
+ t43 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
35412
+ t38,
35413
+ t39,
35414
+ t42
34887
35415
  ] });
34888
- $[89] = t34;
34889
- $[90] = t38;
34890
- $[91] = t39;
35416
+ $[93] = t38;
35417
+ $[94] = t42;
35418
+ $[95] = t43;
34891
35419
  } else {
34892
- t39 = $[91];
35420
+ t43 = $[95];
34893
35421
  }
34894
- let t40;
34895
- if ($[92] !== t30 || $[93] !== t39) {
34896
- t40 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { className: t29, align: "start", sideOffset: 8, onEscapeKeyDown: t30, children: t39 });
34897
- $[92] = t30;
34898
- $[93] = t39;
34899
- $[94] = t40;
35422
+ let t44;
35423
+ if ($[96] !== t34 || $[97] !== t43) {
35424
+ t44 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { className: t33, align: "start", sideOffset: 8, onEscapeKeyDown: t34, children: t43 });
35425
+ $[96] = t34;
35426
+ $[97] = t43;
35427
+ $[98] = t44;
34900
35428
  } else {
34901
- t40 = $[94];
35429
+ t44 = $[98];
34902
35430
  }
34903
- let t41;
34904
- if ($[95] !== isPopoverOpen || $[96] !== modalPopover || $[97] !== onPopoverOpenChange || $[98] !== t28 || $[99] !== t40) {
34905
- t41 = /* @__PURE__ */ jsxRuntime.jsxs(PopoverPrimitive__namespace.Root, { open: isPopoverOpen, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
34906
- t28,
34907
- t40
34908
- ] });
34909
- $[95] = isPopoverOpen;
34910
- $[96] = modalPopover;
34911
- $[97] = onPopoverOpenChange;
34912
- $[98] = t28;
34913
- $[99] = t40;
34914
- $[100] = t41;
35431
+ let t45;
35432
+ if ($[99] !== finalContainer || $[100] !== t44) {
35433
+ t45 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container: finalContainer, children: t44 });
35434
+ $[99] = finalContainer;
35435
+ $[100] = t44;
35436
+ $[101] = t45;
34915
35437
  } else {
34916
- t41 = $[100];
35438
+ t45 = $[101];
34917
35439
  }
34918
- let t42;
34919
- if ($[101] !== t20 || $[102] !== t21 || $[103] !== t41) {
34920
- t42 = /* @__PURE__ */ jsxRuntime.jsxs(MultiSelectContext.Provider, { value: t20, children: [
34921
- t21,
34922
- t41
35440
+ let t46;
35441
+ if ($[102] !== modalPopover || $[103] !== onPopoverOpenChange || $[104] !== t24 || $[105] !== t32 || $[106] !== t45) {
35442
+ t46 = /* @__PURE__ */ jsxRuntime.jsxs(PopoverPrimitive__namespace.Root, { open: t24, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
35443
+ t32,
35444
+ t45
34923
35445
  ] });
34924
- $[101] = t20;
34925
- $[102] = t21;
34926
- $[103] = t41;
34927
- $[104] = t42;
35446
+ $[102] = modalPopover;
35447
+ $[103] = onPopoverOpenChange;
35448
+ $[104] = t24;
35449
+ $[105] = t32;
35450
+ $[106] = t45;
35451
+ $[107] = t46;
35452
+ } else {
35453
+ t46 = $[107];
35454
+ }
35455
+ let t47;
35456
+ if ($[108] !== t22 || $[109] !== t23 || $[110] !== t46) {
35457
+ t47 = /* @__PURE__ */ jsxRuntime.jsxs(MultiSelectContext.Provider, { value: t22, children: [
35458
+ t23,
35459
+ t46
35460
+ ] });
35461
+ $[108] = t22;
35462
+ $[109] = t23;
35463
+ $[110] = t46;
35464
+ $[111] = t47;
34928
35465
  } else {
34929
- t42 = $[104];
35466
+ t47 = $[111];
34930
35467
  }
34931
- return t42;
35468
+ return t47;
34932
35469
  });
34933
35470
  MultiSelect.displayName = "MultiSelect";
34934
35471
  const MultiSelectItem = React__namespace.memo(function MultiSelectItem2(t0) {
@@ -34986,7 +35523,7 @@
34986
35523
  const t4 = isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "";
34987
35524
  let t5;
34988
35525
  if ($[10] !== className || $[11] !== t4) {
34989
- t5 = cls("flex flex-row items-center gap-1.5", t4, "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", className);
35526
+ t5 = cls("flex flex-row items-center gap-1.5", t4, "cursor-pointer", "m-1", "ring-offset-transparent", "p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-primary/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", "text-surface-accent-700 dark:text-surface-accent-300", className);
34990
35527
  $[10] = className;
34991
35528
  $[11] = t4;
34992
35529
  $[12] = t5;
@@ -35003,7 +35540,7 @@
35003
35540
  }
35004
35541
  let t7;
35005
35542
  if ($[15] !== children || $[16] !== t3 || $[17] !== t5 || $[18] !== t6) {
35006
- t7 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Item, { onMouseDown: _temp2, onSelect: t3, className: t5, children: [
35543
+ t7 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Item, { onMouseDown: _temp4, onSelect: t3, className: t5, children: [
35007
35544
  t6,
35008
35545
  children
35009
35546
  ] });
@@ -35061,13 +35598,21 @@
35061
35598
  }
35062
35599
  return t7;
35063
35600
  });
35064
- function _temp$1(child) {
35601
+ function _temp$3(child) {
35065
35602
  if (React__namespace.isValidElement(child)) {
35066
35603
  return child.props.value;
35067
35604
  }
35068
35605
  return null;
35069
35606
  }
35070
- function _temp2(e) {
35607
+ function _temp2$1(e) {
35608
+ e.preventDefault();
35609
+ e.stopPropagation();
35610
+ }
35611
+ function _temp3(e_0) {
35612
+ e_0.preventDefault();
35613
+ e_0.stopPropagation();
35614
+ }
35615
+ function _temp4(e) {
35071
35616
  e.preventDefault();
35072
35617
  e.stopPropagation();
35073
35618
  }
@@ -35179,14 +35724,222 @@
35179
35724
  return t3;
35180
35725
  });
35181
35726
  RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
35727
+ function ResizablePanels(t0) {
35728
+ const $ = reactCompilerRuntime.c(40);
35729
+ const {
35730
+ firstPanel,
35731
+ secondPanel,
35732
+ showFirstPanel: t1,
35733
+ showSecondPanel: t2,
35734
+ panelSizePercent,
35735
+ onPanelSizeChange,
35736
+ minPanelSizePx: t3,
35737
+ orientation: t4,
35738
+ className
35739
+ } = t0;
35740
+ const showFirstPanel = t1 === void 0 ? true : t1;
35741
+ const showSecondPanel = t2 === void 0 ? true : t2;
35742
+ const minPanelSizePx = t3 === void 0 ? 200 : t3;
35743
+ const orientation = t4 === void 0 ? "horizontal" : t4;
35744
+ const containerRef = React.useRef(null);
35745
+ const isResizingRef = React.useRef(false);
35746
+ const firstPanelRef = React.useRef(null);
35747
+ const startPosRef = React.useRef(0);
35748
+ const startSizeRef = React.useRef(0);
35749
+ const [, setIsResizing] = React.useState(false);
35750
+ const isHorizontal = orientation === "horizontal";
35751
+ let t5;
35752
+ if ($[0] !== isHorizontal || $[1] !== showFirstPanel || $[2] !== showSecondPanel) {
35753
+ t5 = (e) => {
35754
+ if (!showFirstPanel || !showSecondPanel) {
35755
+ return;
35756
+ }
35757
+ e.preventDefault();
35758
+ isResizingRef.current = true;
35759
+ setIsResizing(true);
35760
+ startPosRef.current = isHorizontal ? e.clientX : e.clientY;
35761
+ if (firstPanelRef.current) {
35762
+ const rect = firstPanelRef.current.getBoundingClientRect();
35763
+ startSizeRef.current = isHorizontal ? rect.width : rect.height;
35764
+ }
35765
+ document.body.style.cursor = isHorizontal ? "col-resize" : "row-resize";
35766
+ document.body.style.userSelect = "none";
35767
+ };
35768
+ $[0] = isHorizontal;
35769
+ $[1] = showFirstPanel;
35770
+ $[2] = showSecondPanel;
35771
+ $[3] = t5;
35772
+ } else {
35773
+ t5 = $[3];
35774
+ }
35775
+ const handleResizeStart = t5;
35776
+ let t6;
35777
+ let t7;
35778
+ if ($[4] !== isHorizontal || $[5] !== minPanelSizePx || $[6] !== onPanelSizeChange) {
35779
+ t6 = () => {
35780
+ const handleMouseMove = (e_0) => {
35781
+ if (!isResizingRef.current || !containerRef.current) {
35782
+ return;
35783
+ }
35784
+ const currentPos = isHorizontal ? e_0.clientX : e_0.clientY;
35785
+ const delta = currentPos - startPosRef.current;
35786
+ let newSize = startSizeRef.current + delta;
35787
+ const containerRect = containerRef.current.getBoundingClientRect();
35788
+ const containerTotal = isHorizontal ? containerRect.width : containerRect.height;
35789
+ const maxSize = containerTotal - minPanelSizePx;
35790
+ newSize = Math.max(minPanelSizePx, Math.min(newSize, maxSize));
35791
+ if (firstPanelRef.current) {
35792
+ if (isHorizontal) {
35793
+ firstPanelRef.current.style.width = `${newSize}px`;
35794
+ } else {
35795
+ firstPanelRef.current.style.height = `${newSize}px`;
35796
+ }
35797
+ }
35798
+ };
35799
+ const handleMouseUp = () => {
35800
+ if (isResizingRef.current && containerRef.current && firstPanelRef.current) {
35801
+ isResizingRef.current = false;
35802
+ setIsResizing(false);
35803
+ document.body.style.cursor = "";
35804
+ document.body.style.userSelect = "";
35805
+ const containerRect_0 = containerRef.current.getBoundingClientRect();
35806
+ const firstPanelRect = firstPanelRef.current.getBoundingClientRect();
35807
+ const containerSize = isHorizontal ? containerRect_0.width : containerRect_0.height;
35808
+ const finalSize = isHorizontal ? firstPanelRect.width : firstPanelRect.height;
35809
+ if (containerSize > 0) {
35810
+ const newPercent = finalSize / containerSize * 100;
35811
+ onPanelSizeChange(Math.max(0, Math.min(100, newPercent)));
35812
+ }
35813
+ }
35814
+ };
35815
+ window.addEventListener("mousemove", handleMouseMove);
35816
+ window.addEventListener("mouseup", handleMouseUp);
35817
+ return () => {
35818
+ window.removeEventListener("mousemove", handleMouseMove);
35819
+ window.removeEventListener("mouseup", handleMouseUp);
35820
+ };
35821
+ };
35822
+ t7 = [onPanelSizeChange, isHorizontal, minPanelSizePx];
35823
+ $[4] = isHorizontal;
35824
+ $[5] = minPanelSizePx;
35825
+ $[6] = onPanelSizeChange;
35826
+ $[7] = t6;
35827
+ $[8] = t7;
35828
+ } else {
35829
+ t6 = $[7];
35830
+ t7 = $[8];
35831
+ }
35832
+ React.useEffect(t6, t7);
35833
+ const appliedBasis = !showFirstPanel ? "0%" : showSecondPanel ? `${panelSizePercent}%` : "100%";
35834
+ const t8 = isHorizontal ? "flex-row" : "flex-col";
35835
+ let t9;
35836
+ if ($[9] !== className || $[10] !== t8) {
35837
+ t9 = cls("relative w-full h-full flex overflow-hidden", t8, className);
35838
+ $[9] = className;
35839
+ $[10] = t8;
35840
+ $[11] = t9;
35841
+ } else {
35842
+ t9 = $[11];
35843
+ }
35844
+ const t10 = !showFirstPanel && "hidden";
35845
+ let t11;
35846
+ if ($[12] !== t10) {
35847
+ t11 = cls("relative flex-shrink-0 flex flex-col overflow-hidden", t10);
35848
+ $[12] = t10;
35849
+ $[13] = t11;
35850
+ } else {
35851
+ t11 = $[13];
35852
+ }
35853
+ const t12 = isHorizontal ? appliedBasis : "100%";
35854
+ const t13 = !isHorizontal ? appliedBasis : "100%";
35855
+ const t14 = isHorizontal && showFirstPanel && showSecondPanel ? `${minPanelSizePx}px` : void 0;
35856
+ const t15 = !isHorizontal && showFirstPanel && showSecondPanel ? `${minPanelSizePx}px` : void 0;
35857
+ const t16 = showSecondPanel ? void 0 : "100%";
35858
+ const t17 = showSecondPanel ? void 0 : "100%";
35859
+ let t18;
35860
+ if ($[14] !== t12 || $[15] !== t13 || $[16] !== t14 || $[17] !== t15 || $[18] !== t16 || $[19] !== t17) {
35861
+ t18 = {
35862
+ width: t12,
35863
+ height: t13,
35864
+ minWidth: t14,
35865
+ minHeight: t15,
35866
+ maxWidth: t16,
35867
+ maxHeight: t17
35868
+ };
35869
+ $[14] = t12;
35870
+ $[15] = t13;
35871
+ $[16] = t14;
35872
+ $[17] = t15;
35873
+ $[18] = t16;
35874
+ $[19] = t17;
35875
+ $[20] = t18;
35876
+ } else {
35877
+ t18 = $[20];
35878
+ }
35879
+ let t19;
35880
+ if ($[21] !== firstPanel || $[22] !== t11 || $[23] !== t18) {
35881
+ t19 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: firstPanelRef, className: t11, style: t18, children: firstPanel });
35882
+ $[21] = firstPanel;
35883
+ $[22] = t11;
35884
+ $[23] = t18;
35885
+ $[24] = t19;
35886
+ } else {
35887
+ t19 = $[24];
35888
+ }
35889
+ let t20;
35890
+ if ($[25] !== handleResizeStart || $[26] !== isHorizontal || $[27] !== showFirstPanel || $[28] !== showSecondPanel) {
35891
+ t20 = showFirstPanel && showSecondPanel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("relative z-10 flex flex-shrink-0 items-center justify-center", isHorizontal ? "w-px h-full cursor-col-resize" : "h-px w-full cursor-row-resize"), onMouseDown: handleResizeStart, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("absolute flex items-center justify-center group", isHorizontal ? "w-4 h-full cursor-col-resize top-0" : "h-4 w-full cursor-row-resize left-0"), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("bg-primary/60 dark:bg-primary rounded-full opacity-0 group-hover:opacity-100 transition-all duration-200", isHorizontal ? "w-1 h-8" : "h-1 w-8") }) }) });
35892
+ $[25] = handleResizeStart;
35893
+ $[26] = isHorizontal;
35894
+ $[27] = showFirstPanel;
35895
+ $[28] = showSecondPanel;
35896
+ $[29] = t20;
35897
+ } else {
35898
+ t20 = $[29];
35899
+ }
35900
+ const t21 = !showSecondPanel && "hidden";
35901
+ let t22;
35902
+ if ($[30] !== t21) {
35903
+ t22 = cls("flex-grow relative flex flex-col overflow-hidden min-w-0 min-h-0", t21);
35904
+ $[30] = t21;
35905
+ $[31] = t22;
35906
+ } else {
35907
+ t22 = $[31];
35908
+ }
35909
+ let t23;
35910
+ if ($[32] !== secondPanel || $[33] !== t22) {
35911
+ t23 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t22, children: secondPanel });
35912
+ $[32] = secondPanel;
35913
+ $[33] = t22;
35914
+ $[34] = t23;
35915
+ } else {
35916
+ t23 = $[34];
35917
+ }
35918
+ let t24;
35919
+ if ($[35] !== t19 || $[36] !== t20 || $[37] !== t23 || $[38] !== t9) {
35920
+ t24 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: t9, children: [
35921
+ t19,
35922
+ t20,
35923
+ t23
35924
+ ] });
35925
+ $[35] = t19;
35926
+ $[36] = t20;
35927
+ $[37] = t23;
35928
+ $[38] = t9;
35929
+ $[39] = t24;
35930
+ } else {
35931
+ t24 = $[39];
35932
+ }
35933
+ return t24;
35934
+ }
35182
35935
  function SearchBar(t0) {
35183
- const $ = reactCompilerRuntime.c(39);
35936
+ const $ = reactCompilerRuntime.c(47);
35184
35937
  const {
35185
35938
  onClick,
35186
35939
  onTextSearch,
35187
35940
  placeholder: t1,
35188
35941
  expandable: t2,
35189
- large: t3,
35942
+ size: t3,
35190
35943
  innerClassName,
35191
35944
  className,
35192
35945
  autoFocus,
@@ -35196,7 +35949,7 @@
35196
35949
  } = t0;
35197
35950
  const placeholder = t1 === void 0 ? "Search" : t1;
35198
35951
  const expandable = t2 === void 0 ? false : t2;
35199
- const large = t3 === void 0 ? false : t3;
35952
+ const size = t3 === void 0 ? "medium" : t3;
35200
35953
  const [searchText, setSearchText] = React.useState("");
35201
35954
  const [active, setActive] = React.useState(false);
35202
35955
  const deferredValues = useDebounceValue(searchText, 200);
@@ -35242,217 +35995,1063 @@
35242
35995
  t6 = $[6];
35243
35996
  }
35244
35997
  const clearText = t6;
35245
- const t7 = large ? "h-14" : "h-[44px]";
35246
- let t8;
35247
- if ($[7] !== className || $[8] !== t7) {
35248
- t8 = cls("relative", t7, "bg-surface-accent-50 dark:bg-surface-800 border", defaultBorderMixin, "rounded-lg", className);
35998
+ const heightClass = size === "small" ? "h-[36px]" : "h-[44px]";
35999
+ const iconPaddingClass = size === "small" ? "px-2" : "px-4";
36000
+ const inputPaddingClass = size === "small" ? "pl-8" : "pl-12";
36001
+ let t7;
36002
+ if ($[7] !== className || $[8] !== heightClass) {
36003
+ t7 = cls("relative", heightClass, "bg-surface-accent-50 dark:bg-surface-800 border", defaultBorderMixin, "rounded-lg", className);
35249
36004
  $[7] = className;
35250
- $[8] = t7;
35251
- $[9] = t8;
36005
+ $[8] = heightClass;
36006
+ $[9] = t7;
36007
+ } else {
36008
+ t7 = $[9];
36009
+ }
36010
+ let t8;
36011
+ if ($[10] !== iconPaddingClass) {
36012
+ t8 = cls("absolute p-0 h-full pointer-events-none flex items-center justify-center top-0", iconPaddingClass);
36013
+ $[10] = iconPaddingClass;
36014
+ $[11] = t8;
35252
36015
  } else {
35253
- t8 = $[9];
36016
+ t8 = $[11];
35254
36017
  }
35255
36018
  let t9;
35256
- if ($[10] !== loading) {
35257
- t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute p-0 px-4 h-full pointer-events-none flex items-center justify-center top-0", children: loading ? /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, { size: "smallest" }) : /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { className: "text-text-disabled dark:text-text-disabled-dark" }) });
35258
- $[10] = loading;
35259
- $[11] = t9;
36019
+ if ($[12] !== loading || $[13] !== size) {
36020
+ t9 = loading ? /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, { size: "smallest" }) : /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { className: "text-text-disabled dark:text-text-disabled-dark", size: size === "small" ? "small" : "medium" });
36021
+ $[12] = loading;
36022
+ $[13] = size;
36023
+ $[14] = t9;
35260
36024
  } else {
35261
- t9 = $[11];
36025
+ t9 = $[14];
35262
36026
  }
35263
- const t10 = searchText ?? "";
35264
- const t11 = !onTextSearch;
35265
- let t12;
35266
- if ($[12] !== onTextSearch) {
35267
- t12 = onTextSearch ? (event) => {
36027
+ let t10;
36028
+ if ($[15] !== t8 || $[16] !== t9) {
36029
+ t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t8, children: t9 });
36030
+ $[15] = t8;
36031
+ $[16] = t9;
36032
+ $[17] = t10;
36033
+ } else {
36034
+ t10 = $[17];
36035
+ }
36036
+ const t11 = searchText ?? "";
36037
+ const t12 = !onTextSearch;
36038
+ let t13;
36039
+ if ($[18] !== onTextSearch) {
36040
+ t13 = onTextSearch ? (event) => {
35268
36041
  setSearchText(event.target.value);
35269
36042
  } : void 0;
35270
- $[12] = onTextSearch;
35271
- $[13] = t12;
36043
+ $[18] = onTextSearch;
36044
+ $[19] = t13;
35272
36045
  } else {
35273
- t12 = $[13];
36046
+ t13 = $[19];
35274
36047
  }
35275
- let t13;
35276
36048
  let t14;
35277
- if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35278
- t13 = () => setActive(true);
35279
- t14 = () => setActive(false);
35280
- $[14] = t13;
35281
- $[15] = t14;
36049
+ let t15;
36050
+ if ($[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36051
+ t14 = () => setActive(true);
36052
+ t15 = () => setActive(false);
36053
+ $[20] = t14;
36054
+ $[21] = t15;
35282
36055
  } else {
35283
- t13 = $[14];
35284
- t14 = $[15];
36056
+ t14 = $[20];
36057
+ t15 = $[21];
35285
36058
  }
35286
- const t15 = (disabled || loading) && "pointer-events-none";
35287
- const t16 = expandable ? active ? "w-[220px]" : "w-[180px]" : "";
35288
- let t17;
35289
- if ($[16] !== innerClassName || $[17] !== t15 || $[18] !== t16) {
35290
- t17 = cls(t15, "placeholder-text-disabled dark:placeholder-text-disabled-dark", "relative flex items-center rounded-lg transition-all bg-transparent outline-none appearance-none border-none", "pl-12 h-full text-current ", t16, innerClassName);
35291
- $[16] = innerClassName;
35292
- $[17] = t15;
35293
- $[18] = t16;
35294
- $[19] = t17;
36059
+ const t16 = (disabled || loading) && "pointer-events-none";
36060
+ const t17 = size === "small" ? "text-sm" : "";
36061
+ const t18 = expandable ? active ? "w-[220px]" : "w-[180px]" : "";
36062
+ let t19;
36063
+ if ($[22] !== innerClassName || $[23] !== inputPaddingClass || $[24] !== t16 || $[25] !== t17 || $[26] !== t18) {
36064
+ t19 = cls(t16, "placeholder-text-disabled dark:placeholder-text-disabled-dark", "relative flex items-center rounded-lg transition-all bg-transparent outline-none appearance-none border-none", inputPaddingClass, "h-full text-current", t17, t18, innerClassName);
36065
+ $[22] = innerClassName;
36066
+ $[23] = inputPaddingClass;
36067
+ $[24] = t16;
36068
+ $[25] = t17;
36069
+ $[26] = t18;
36070
+ $[27] = t19;
35295
36071
  } else {
35296
- t17 = $[19];
36072
+ t19 = $[27];
35297
36073
  }
35298
- let t18;
35299
- if ($[20] !== autoFocus || $[21] !== inputRef || $[22] !== onClick || $[23] !== placeholder || $[24] !== t10 || $[25] !== t11 || $[26] !== t12 || $[27] !== t17) {
35300
- t18 = /* @__PURE__ */ jsxRuntime.jsx("input", { value: t10, ref: inputRef, onClick, placeholder, readOnly: t11, onChange: t12, autoFocus, onFocus: t13, onBlur: t14, className: t17 });
35301
- $[20] = autoFocus;
35302
- $[21] = inputRef;
35303
- $[22] = onClick;
35304
- $[23] = placeholder;
35305
- $[24] = t10;
35306
- $[25] = t11;
35307
- $[26] = t12;
35308
- $[27] = t17;
35309
- $[28] = t18;
36074
+ let t20;
36075
+ if ($[28] !== autoFocus || $[29] !== inputRef || $[30] !== onClick || $[31] !== placeholder || $[32] !== t11 || $[33] !== t12 || $[34] !== t13 || $[35] !== t19) {
36076
+ t20 = /* @__PURE__ */ jsxRuntime.jsx("input", { value: t11, ref: inputRef, onClick, placeholder, readOnly: t12, onChange: t13, autoFocus, onFocus: t14, onBlur: t15, className: t19 });
36077
+ $[28] = autoFocus;
36078
+ $[29] = inputRef;
36079
+ $[30] = onClick;
36080
+ $[31] = placeholder;
36081
+ $[32] = t11;
36082
+ $[33] = t12;
36083
+ $[34] = t13;
36084
+ $[35] = t19;
36085
+ $[36] = t20;
35310
36086
  } else {
35311
- t18 = $[28];
36087
+ t20 = $[36];
35312
36088
  }
35313
- let t19;
35314
- if ($[29] !== clearText || $[30] !== large || $[31] !== searchText) {
35315
- t19 = searchText ? /* @__PURE__ */ jsxRuntime.jsx(IconButton, { className: `${large ? "mr-2 top-1" : "mr-1 top-0"} absolute right-0 z-10`, onClick: clearText, children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, { size: "small" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
36089
+ let t21;
36090
+ if ($[37] !== clearText || $[38] !== searchText || $[39] !== size) {
36091
+ t21 = searchText ? /* @__PURE__ */ jsxRuntime.jsx(IconButton, { className: `${size === "small" ? "mr-0 top-0" : "mr-1 top-0"} absolute right-0 z-10`, size: "small", onClick: clearText, children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, { size: "smallest" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
35316
36092
  width: 26
35317
36093
  } });
35318
- $[29] = clearText;
35319
- $[30] = large;
35320
- $[31] = searchText;
35321
- $[32] = t19;
36094
+ $[37] = clearText;
36095
+ $[38] = searchText;
36096
+ $[39] = size;
36097
+ $[40] = t21;
35322
36098
  } else {
35323
- t19 = $[32];
36099
+ t21 = $[40];
35324
36100
  }
35325
- let t20;
35326
- if ($[33] !== onClick || $[34] !== t18 || $[35] !== t19 || $[36] !== t8 || $[37] !== t9) {
35327
- t20 = /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick, className: t8, children: [
35328
- t9,
35329
- t18,
35330
- t19
36101
+ let t22;
36102
+ if ($[41] !== onClick || $[42] !== t10 || $[43] !== t20 || $[44] !== t21 || $[45] !== t7) {
36103
+ t22 = /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick, className: t7, children: [
36104
+ t10,
36105
+ t20,
36106
+ t21
35331
36107
  ] });
35332
- $[33] = onClick;
35333
- $[34] = t18;
35334
- $[35] = t19;
35335
- $[36] = t8;
35336
- $[37] = t9;
35337
- $[38] = t20;
36108
+ $[41] = onClick;
36109
+ $[42] = t10;
36110
+ $[43] = t20;
36111
+ $[44] = t21;
36112
+ $[45] = t7;
36113
+ $[46] = t22;
35338
36114
  } else {
35339
- t20 = $[38];
36115
+ t22 = $[46];
35340
36116
  }
35341
- return t20;
36117
+ return t22;
35342
36118
  }
35343
- const Select = React.forwardRef(({
35344
- inputRef,
35345
- open,
35346
- name,
35347
- fullWidth = false,
35348
- id,
35349
- onOpenChange,
35350
- value,
35351
- onChange,
35352
- onValueChange,
35353
- className,
35354
- inputClassName,
35355
- viewportClassName,
35356
- placeholder,
35357
- renderValue,
35358
- label,
35359
- size = "large",
35360
- error,
35361
- disabled,
35362
- padding = true,
35363
- position = "item-aligned",
35364
- endAdornment,
35365
- invisible,
35366
- children,
35367
- dataType = "string",
35368
- ...props
35369
- }, ref) => {
35370
- const [openInternal, setOpenInternal] = React.useState(open ?? false);
36119
+ const SearchableSelect = React__namespace.forwardRef((t0, ref) => {
36120
+ const $ = reactCompilerRuntime.c(106);
36121
+ const {
36122
+ value,
36123
+ onValueChange,
36124
+ placeholder: t1,
36125
+ label,
36126
+ size: t2,
36127
+ disabled,
36128
+ error,
36129
+ invisible,
36130
+ className,
36131
+ inputClassName,
36132
+ renderValue,
36133
+ modalPopover: t3,
36134
+ allowCustomValues: t4,
36135
+ portalContainer,
36136
+ autoFocus,
36137
+ children
36138
+ } = t0;
36139
+ const placeholder = t1 === void 0 ? "Select..." : t1;
36140
+ const size = t2 === void 0 ? "large" : t2;
36141
+ const modalPopover = t3 === void 0 ? false : t3;
36142
+ const allowCustomValues = t4 === void 0 ? true : t4;
36143
+ const [isMounted, setIsMounted] = React.useState(false);
36144
+ const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);
36145
+ const [search, setSearch] = React.useState("");
36146
+ const inputRef = React.useRef(null);
36147
+ const contextContainer = usePortalContainer();
36148
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
36149
+ let t5;
36150
+ let t6;
36151
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36152
+ t5 = () => {
36153
+ setIsMounted(true);
36154
+ };
36155
+ t6 = [];
36156
+ $[0] = t5;
36157
+ $[1] = t6;
36158
+ } else {
36159
+ t5 = $[0];
36160
+ t6 = $[1];
36161
+ }
36162
+ React.useEffect(t5, t6);
36163
+ let t7;
36164
+ if ($[2] !== autoFocus || $[3] !== isMounted) {
36165
+ t7 = [autoFocus, isMounted];
36166
+ $[2] = autoFocus;
36167
+ $[3] = isMounted;
36168
+ $[4] = t7;
36169
+ } else {
36170
+ t7 = $[4];
36171
+ }
35371
36172
  React.useEffect(() => {
35372
- setOpenInternal(open ?? false);
35373
- }, [open]);
35374
- const onValueChangeInternal = React.useCallback((newValue) => {
35375
- let typedValue = newValue;
35376
- if (dataType === "boolean") {
35377
- if (newValue === "true") typedValue = true;
35378
- else if (newValue === "false") typedValue = false;
35379
- } else if (dataType === "number") {
35380
- if (!isNaN(Number(newValue)) && newValue.trim() !== "") typedValue = Number(newValue);
36173
+ if (autoFocus && isMounted) {
36174
+ onPopoverOpenChange(true);
36175
+ }
36176
+ }, t7);
36177
+ let t8;
36178
+ let map;
36179
+ if ($[5] !== children) {
36180
+ map = /* @__PURE__ */ new Map();
36181
+ React__namespace.Children.forEach(children, (child) => {
36182
+ if (React__namespace.isValidElement(child) && child.props.value != null) {
36183
+ map.set(String(child.props.value), child.props.children ?? child.props.value);
36184
+ }
36185
+ });
36186
+ $[5] = children;
36187
+ $[6] = map;
36188
+ } else {
36189
+ map = $[6];
36190
+ }
36191
+ t8 = map;
36192
+ const itemsMap = t8;
36193
+ const onPopoverOpenChange = (open) => {
36194
+ setIsPopoverOpen(open);
36195
+ if (open) {
36196
+ setSearch(value ?? "");
36197
+ setTimeout(() => inputRef.current?.focus(), 0);
36198
+ }
36199
+ };
36200
+ let t9;
36201
+ if ($[7] !== onValueChange) {
36202
+ t9 = (selectedValue) => {
36203
+ onValueChange?.(selectedValue);
36204
+ setIsPopoverOpen(false);
36205
+ setSearch("");
36206
+ };
36207
+ $[7] = onValueChange;
36208
+ $[8] = t9;
36209
+ } else {
36210
+ t9 = $[8];
36211
+ }
36212
+ const handleSelect = t9;
36213
+ let t10;
36214
+ if ($[9] !== allowCustomValues || $[10] !== handleSelect || $[11] !== itemsMap || $[12] !== search) {
36215
+ t10 = (e) => {
36216
+ if (e.key === "Enter" && allowCustomValues) {
36217
+ const trimmed = search.trim();
36218
+ if (trimmed) {
36219
+ const isExistingItem = itemsMap.has(trimmed);
36220
+ if (!isExistingItem) {
36221
+ e.preventDefault();
36222
+ handleSelect(trimmed);
36223
+ }
36224
+ }
36225
+ } else {
36226
+ if (e.key === "Escape") {
36227
+ setIsPopoverOpen(false);
36228
+ }
36229
+ }
36230
+ };
36231
+ $[9] = allowCustomValues;
36232
+ $[10] = handleSelect;
36233
+ $[11] = itemsMap;
36234
+ $[12] = search;
36235
+ $[13] = t10;
36236
+ } else {
36237
+ t10 = $[13];
36238
+ }
36239
+ const handleInputKeyDown = t10;
36240
+ let t11;
36241
+ bb0: {
36242
+ if (!value) {
36243
+ t11 = null;
36244
+ break bb0;
36245
+ }
36246
+ if (renderValue) {
36247
+ let t123;
36248
+ if ($[14] !== renderValue || $[15] !== value) {
36249
+ t123 = renderValue(value);
36250
+ $[14] = renderValue;
36251
+ $[15] = value;
36252
+ $[16] = t123;
36253
+ } else {
36254
+ t123 = $[16];
36255
+ }
36256
+ t11 = t123;
36257
+ break bb0;
36258
+ }
36259
+ let t122;
36260
+ if ($[17] !== itemsMap || $[18] !== value) {
36261
+ t122 = itemsMap.get(value);
36262
+ $[17] = itemsMap;
36263
+ $[18] = value;
36264
+ $[19] = t122;
36265
+ } else {
36266
+ t122 = $[19];
36267
+ }
36268
+ const itemLabel = t122;
36269
+ if (itemLabel) {
36270
+ t11 = itemLabel;
36271
+ break bb0;
36272
+ }
36273
+ let t132;
36274
+ if ($[20] !== value) {
36275
+ t132 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: value });
36276
+ $[20] = value;
36277
+ $[21] = t132;
36278
+ } else {
36279
+ t132 = $[21];
35381
36280
  }
35382
- onValueChange?.(typedValue);
35383
- if (onChange) {
35384
- const event = {
35385
- target: {
35386
- name,
35387
- value: typedValue
36281
+ t11 = t132;
36282
+ }
36283
+ const displayLabel = t11;
36284
+ useInjectStyles("SearchableSelect", `
36285
+ [cmdk-group] {
36286
+ max-height: 45vh;
36287
+ overflow-y: auto;
36288
+ }`);
36289
+ let t12;
36290
+ if ($[22] !== error || $[23] !== label) {
36291
+ t12 = label && (typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("text-sm font-medium ml-3.5 mb-1", error ? "text-red-500 dark:text-red-600" : "text-surface-accent-500 dark:text-surface-accent-300"), children: label }) : label);
36292
+ $[22] = error;
36293
+ $[23] = label;
36294
+ $[24] = t12;
36295
+ } else {
36296
+ t12 = $[24];
36297
+ }
36298
+ const t13 = isMounted && isPopoverOpen;
36299
+ let t14;
36300
+ if ($[25] !== disabled || $[26] !== isPopoverOpen || $[27] !== onPopoverOpenChange) {
36301
+ t14 = () => !disabled && onPopoverOpenChange(!isPopoverOpen);
36302
+ $[25] = disabled;
36303
+ $[26] = isPopoverOpen;
36304
+ $[27] = onPopoverOpenChange;
36305
+ $[28] = t14;
36306
+ } else {
36307
+ t14 = $[28];
36308
+ }
36309
+ const t15 = size === "smallest";
36310
+ const t16 = size === "small";
36311
+ const t17 = size === "medium";
36312
+ const t18 = size === "large";
36313
+ let t19;
36314
+ if ($[29] !== className || $[30] !== disabled || $[31] !== inputClassName || $[32] !== invisible || $[33] !== size || $[34] !== t15 || $[35] !== t16 || $[36] !== t17 || $[37] !== t18) {
36315
+ t19 = cls({
36316
+ "min-h-[28px]": t15,
36317
+ "min-h-[32px]": t16,
36318
+ "min-h-[44px]": t17,
36319
+ "min-h-[64px]": t18
36320
+ }, {
36321
+ "py-0.5": size === "smallest",
36322
+ "py-1": size === "small",
36323
+ "py-2": size === "medium" || size === "large"
36324
+ }, {
36325
+ "px-2": size === "small" || size === "smallest",
36326
+ "px-4": size === "medium" || size === "large"
36327
+ }, "select-none rounded-md text-sm w-full text-start", "focus:ring-0 focus-visible:ring-0 outline-none focus:outline-none focus-visible:outline-none", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, inputClassName);
36328
+ $[29] = className;
36329
+ $[30] = disabled;
36330
+ $[31] = inputClassName;
36331
+ $[32] = invisible;
36332
+ $[33] = size;
36333
+ $[34] = t15;
36334
+ $[35] = t16;
36335
+ $[36] = t17;
36336
+ $[37] = t18;
36337
+ $[38] = t19;
36338
+ } else {
36339
+ t19 = $[38];
36340
+ }
36341
+ let t20;
36342
+ if ($[39] !== displayLabel || $[40] !== placeholder) {
36343
+ t20 = displayLabel ?? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-surface-accent-500 dark:text-surface-accent-400", children: placeholder });
36344
+ $[39] = displayLabel;
36345
+ $[40] = placeholder;
36346
+ $[41] = t20;
36347
+ } else {
36348
+ t20 = $[41];
36349
+ }
36350
+ let t21;
36351
+ if ($[42] !== t20) {
36352
+ t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow min-w-0 truncate", children: t20 });
36353
+ $[42] = t20;
36354
+ $[43] = t21;
36355
+ } else {
36356
+ t21 = $[43];
36357
+ }
36358
+ let t22;
36359
+ if ($[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36360
+ t22 = cls("flex-shrink-0 flex items-center");
36361
+ $[44] = t22;
36362
+ } else {
36363
+ t22 = $[44];
36364
+ }
36365
+ const t23 = size === "large" ? "medium" : "small";
36366
+ const t24 = isPopoverOpen ? "rotate-180" : "";
36367
+ let t25;
36368
+ if ($[45] !== t24) {
36369
+ t25 = cls("transition", t24);
36370
+ $[45] = t24;
36371
+ $[46] = t25;
36372
+ } else {
36373
+ t25 = $[46];
36374
+ }
36375
+ let t26;
36376
+ if ($[47] !== t23 || $[48] !== t25) {
36377
+ t26 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t22, children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: t23, className: t25 }) });
36378
+ $[47] = t23;
36379
+ $[48] = t25;
36380
+ $[49] = t26;
36381
+ } else {
36382
+ t26 = $[49];
36383
+ }
36384
+ let t27;
36385
+ if ($[50] !== t21 || $[51] !== t26) {
36386
+ t27 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full gap-1", children: [
36387
+ t21,
36388
+ t26
36389
+ ] });
36390
+ $[50] = t21;
36391
+ $[51] = t26;
36392
+ $[52] = t27;
36393
+ } else {
36394
+ t27 = $[52];
36395
+ }
36396
+ let t28;
36397
+ if ($[53] !== disabled || $[54] !== ref || $[55] !== t14 || $[56] !== t19 || $[57] !== t27) {
36398
+ t28 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ref, disabled, onClick: t14, className: t19, children: t27 }) });
36399
+ $[53] = disabled;
36400
+ $[54] = ref;
36401
+ $[55] = t14;
36402
+ $[56] = t19;
36403
+ $[57] = t27;
36404
+ $[58] = t28;
36405
+ } else {
36406
+ t28 = $[58];
36407
+ }
36408
+ let t29;
36409
+ if ($[59] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36410
+ t29 = cls("z-50 overflow-hidden border bg-white dark:bg-surface-900 rounded-lg", defaultBorderMixin);
36411
+ $[59] = t29;
36412
+ } else {
36413
+ t29 = $[59];
36414
+ }
36415
+ let t30;
36416
+ if ($[60] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36417
+ t30 = {
36418
+ width: "var(--radix-popover-trigger-width)",
36419
+ minWidth: 180
36420
+ };
36421
+ $[60] = t30;
36422
+ } else {
36423
+ t30 = $[60];
36424
+ }
36425
+ let t31;
36426
+ if ($[61] !== onPopoverOpenChange) {
36427
+ t31 = () => onPopoverOpenChange(false);
36428
+ $[61] = onPopoverOpenChange;
36429
+ $[62] = t31;
36430
+ } else {
36431
+ t31 = $[62];
36432
+ }
36433
+ const t32 = size === "smallest" || size === "small";
36434
+ const t33 = size === "medium" || size === "large";
36435
+ let t34;
36436
+ if ($[63] !== t32 || $[64] !== t33) {
36437
+ t34 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full text-surface-accent-900 dark:text-white", {
36438
+ "m-2 text-xs": t32,
36439
+ "m-3 text-sm": t33
36440
+ });
36441
+ $[63] = t32;
36442
+ $[64] = t33;
36443
+ $[65] = t34;
36444
+ } else {
36445
+ t34 = $[65];
36446
+ }
36447
+ let t35;
36448
+ if ($[66] !== handleInputKeyDown || $[67] !== search || $[68] !== t34) {
36449
+ t35 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center", children: /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Input, { ref: inputRef, value: search, onValueChange: setSearch, className: t34, placeholder: "Search...", onKeyDown: handleInputKeyDown }) });
36450
+ $[66] = handleInputKeyDown;
36451
+ $[67] = search;
36452
+ $[68] = t34;
36453
+ $[69] = t35;
36454
+ } else {
36455
+ t35 = $[69];
36456
+ }
36457
+ let t36;
36458
+ if ($[70] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36459
+ t36 = /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "horizontal", className: "my-0" });
36460
+ $[70] = t36;
36461
+ } else {
36462
+ t36 = $[70];
36463
+ }
36464
+ let t37;
36465
+ if ($[71] !== allowCustomValues || $[72] !== handleSelect || $[73] !== itemsMap || $[74] !== search) {
36466
+ t37 = allowCustomValues && search.trim() && !itemsMap.has(search.trim()) ? /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Empty, { className: "px-3 py-2 text-xs cursor-pointer text-primary hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800", onClick: () => handleSelect(search.trim()), children: [
36467
+ "Use “",
36468
+ search.trim(),
36469
+ "”"
36470
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { className: "px-3 py-2 text-xs text-text-secondary dark:text-text-secondary-dark", children: "No results found." });
36471
+ $[71] = allowCustomValues;
36472
+ $[72] = handleSelect;
36473
+ $[73] = itemsMap;
36474
+ $[74] = search;
36475
+ $[75] = t37;
36476
+ } else {
36477
+ t37 = $[75];
36478
+ }
36479
+ let t38;
36480
+ if ($[76] !== children || $[77] !== handleSelect || $[78] !== value) {
36481
+ let t392;
36482
+ if ($[80] !== handleSelect || $[81] !== value) {
36483
+ t392 = (child_0) => {
36484
+ if (!React__namespace.isValidElement(child_0)) {
36485
+ return child_0;
35388
36486
  }
36487
+ const itemValue = child_0.props.value;
36488
+ const isSelected = String(value) === String(itemValue);
36489
+ return /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Item, { value: String(itemValue), onMouseDown: _temp$2, onSelect: () => handleSelect(String(itemValue)), className: cls("flex flex-row items-center gap-1.5", isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "", "cursor-pointer", "m-0.5", "ring-offset-transparent", "p-1.5 rounded", "aria-[selected=true]:outline-none", "aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900", "text-surface-accent-700 dark:text-surface-accent-300", child_0.props.className), children: [
36490
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("w-4 h-4 flex items-center justify-center flex-shrink-0", isSelected ? "text-primary" : "text-transparent"), children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size: 14 }) }),
36491
+ child_0.props.children ?? child_0.props.value
36492
+ ] }, String(itemValue));
35389
36493
  };
35390
- onChange(event);
36494
+ $[80] = handleSelect;
36495
+ $[81] = value;
36496
+ $[82] = t392;
36497
+ } else {
36498
+ t392 = $[82];
35391
36499
  }
35392
- }, [onChange, onValueChange, name]);
36500
+ t38 = React__namespace.Children.map(children, t392);
36501
+ $[76] = children;
36502
+ $[77] = handleSelect;
36503
+ $[78] = value;
36504
+ $[79] = t38;
36505
+ } else {
36506
+ t38 = $[79];
36507
+ }
36508
+ let t39;
36509
+ if ($[83] !== t38) {
36510
+ t39 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Group, { children: t38 });
36511
+ $[83] = t38;
36512
+ $[84] = t39;
36513
+ } else {
36514
+ t39 = $[84];
36515
+ }
36516
+ let t40;
36517
+ if ($[85] !== t37 || $[86] !== t39) {
36518
+ t40 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
36519
+ t37,
36520
+ t39
36521
+ ] });
36522
+ $[85] = t37;
36523
+ $[86] = t39;
36524
+ $[87] = t40;
36525
+ } else {
36526
+ t40 = $[87];
36527
+ }
36528
+ let t41;
36529
+ if ($[88] !== t35 || $[89] !== t40) {
36530
+ t41 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { shouldFilter: true, children: [
36531
+ t35,
36532
+ t36,
36533
+ t40
36534
+ ] });
36535
+ $[88] = t35;
36536
+ $[89] = t40;
36537
+ $[90] = t41;
36538
+ } else {
36539
+ t41 = $[90];
36540
+ }
36541
+ let t42;
36542
+ if ($[91] !== t31 || $[92] !== t41) {
36543
+ t42 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { className: t29, align: "start", sideOffset: 4, style: t30, onEscapeKeyDown: t31, children: t41 });
36544
+ $[91] = t31;
36545
+ $[92] = t41;
36546
+ $[93] = t42;
36547
+ } else {
36548
+ t42 = $[93];
36549
+ }
36550
+ let t43;
36551
+ if ($[94] !== finalContainer || $[95] !== t42) {
36552
+ t43 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container: finalContainer, children: t42 });
36553
+ $[94] = finalContainer;
36554
+ $[95] = t42;
36555
+ $[96] = t43;
36556
+ } else {
36557
+ t43 = $[96];
36558
+ }
36559
+ let t44;
36560
+ if ($[97] !== modalPopover || $[98] !== onPopoverOpenChange || $[99] !== t13 || $[100] !== t28 || $[101] !== t43) {
36561
+ t44 = /* @__PURE__ */ jsxRuntime.jsxs(PopoverPrimitive__namespace.Root, { open: t13, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
36562
+ t28,
36563
+ t43
36564
+ ] });
36565
+ $[97] = modalPopover;
36566
+ $[98] = onPopoverOpenChange;
36567
+ $[99] = t13;
36568
+ $[100] = t28;
36569
+ $[101] = t43;
36570
+ $[102] = t44;
36571
+ } else {
36572
+ t44 = $[102];
36573
+ }
36574
+ let t45;
36575
+ if ($[103] !== t12 || $[104] !== t44) {
36576
+ t45 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
36577
+ t12,
36578
+ t44
36579
+ ] });
36580
+ $[103] = t12;
36581
+ $[104] = t44;
36582
+ $[105] = t45;
36583
+ } else {
36584
+ t45 = $[105];
36585
+ }
36586
+ return t45;
36587
+ });
36588
+ SearchableSelect.displayName = "SearchableSelect";
36589
+ function SearchableSelectItem(_props) {
36590
+ return null;
36591
+ }
36592
+ function _temp$2(e_0) {
36593
+ e_0.preventDefault();
36594
+ e_0.stopPropagation();
36595
+ }
36596
+ const Select = React.forwardRef((t0, ref) => {
36597
+ const $ = reactCompilerRuntime.c(121);
36598
+ let children;
36599
+ let className;
36600
+ let disabled;
36601
+ let endAdornment;
36602
+ let error;
36603
+ let id;
36604
+ let inputClassName;
36605
+ let inputRef;
36606
+ let invisible;
36607
+ let label;
36608
+ let manualContainer;
36609
+ let name;
36610
+ let onChange;
36611
+ let onOpenChange;
36612
+ let onValueChange;
36613
+ let open;
36614
+ let placeholder;
36615
+ let props;
36616
+ let renderValue;
36617
+ let t1;
36618
+ let t2;
36619
+ let t3;
36620
+ let t4;
36621
+ let t5;
36622
+ let value;
36623
+ let viewportClassName;
36624
+ if ($[0] !== t0) {
36625
+ ({
36626
+ inputRef,
36627
+ open,
36628
+ name,
36629
+ fullWidth: t1,
36630
+ id,
36631
+ onOpenChange,
36632
+ value,
36633
+ onChange,
36634
+ onValueChange,
36635
+ className,
36636
+ inputClassName,
36637
+ viewportClassName,
36638
+ placeholder,
36639
+ renderValue,
36640
+ label,
36641
+ size: t2,
36642
+ error,
36643
+ disabled,
36644
+ padding: t3,
36645
+ position: t4,
36646
+ endAdornment,
36647
+ invisible,
36648
+ children,
36649
+ dataType: t5,
36650
+ portalContainer: manualContainer,
36651
+ ...props
36652
+ } = t0);
36653
+ $[0] = t0;
36654
+ $[1] = children;
36655
+ $[2] = className;
36656
+ $[3] = disabled;
36657
+ $[4] = endAdornment;
36658
+ $[5] = error;
36659
+ $[6] = id;
36660
+ $[7] = inputClassName;
36661
+ $[8] = inputRef;
36662
+ $[9] = invisible;
36663
+ $[10] = label;
36664
+ $[11] = manualContainer;
36665
+ $[12] = name;
36666
+ $[13] = onChange;
36667
+ $[14] = onOpenChange;
36668
+ $[15] = onValueChange;
36669
+ $[16] = open;
36670
+ $[17] = placeholder;
36671
+ $[18] = props;
36672
+ $[19] = renderValue;
36673
+ $[20] = t1;
36674
+ $[21] = t2;
36675
+ $[22] = t3;
36676
+ $[23] = t4;
36677
+ $[24] = t5;
36678
+ $[25] = value;
36679
+ $[26] = viewportClassName;
36680
+ } else {
36681
+ children = $[1];
36682
+ className = $[2];
36683
+ disabled = $[3];
36684
+ endAdornment = $[4];
36685
+ error = $[5];
36686
+ id = $[6];
36687
+ inputClassName = $[7];
36688
+ inputRef = $[8];
36689
+ invisible = $[9];
36690
+ label = $[10];
36691
+ manualContainer = $[11];
36692
+ name = $[12];
36693
+ onChange = $[13];
36694
+ onOpenChange = $[14];
36695
+ onValueChange = $[15];
36696
+ open = $[16];
36697
+ placeholder = $[17];
36698
+ props = $[18];
36699
+ renderValue = $[19];
36700
+ t1 = $[20];
36701
+ t2 = $[21];
36702
+ t3 = $[22];
36703
+ t4 = $[23];
36704
+ t5 = $[24];
36705
+ value = $[25];
36706
+ viewportClassName = $[26];
36707
+ }
36708
+ const fullWidth = t1 === void 0 ? false : t1;
36709
+ const size = t2 === void 0 ? "large" : t2;
36710
+ const padding = t3 === void 0 ? true : t3;
36711
+ const position = t4 === void 0 ? "item-aligned" : t4;
36712
+ const dataType = t5 === void 0 ? "string" : t5;
36713
+ const [openInternal, setOpenInternal] = React.useState(open ?? false);
36714
+ let t6;
36715
+ let t7;
36716
+ if ($[27] !== open) {
36717
+ t6 = () => {
36718
+ setOpenInternal(open ?? false);
36719
+ };
36720
+ t7 = [open];
36721
+ $[27] = open;
36722
+ $[28] = t6;
36723
+ $[29] = t7;
36724
+ } else {
36725
+ t6 = $[28];
36726
+ t7 = $[29];
36727
+ }
36728
+ React.useEffect(t6, t7);
36729
+ const contextContainer = usePortalContainer();
36730
+ const finalContainer = manualContainer ?? contextContainer ?? void 0;
36731
+ let t8;
36732
+ if ($[30] !== dataType || $[31] !== name || $[32] !== onChange || $[33] !== onValueChange) {
36733
+ t8 = (newValue) => {
36734
+ let typedValue = newValue;
36735
+ if (dataType === "boolean") {
36736
+ if (newValue === "true") {
36737
+ typedValue = true;
36738
+ } else {
36739
+ if (newValue === "false") {
36740
+ typedValue = false;
36741
+ }
36742
+ }
36743
+ } else {
36744
+ if (dataType === "number") {
36745
+ if (!isNaN(Number(newValue)) && newValue.trim() !== "") {
36746
+ typedValue = Number(newValue);
36747
+ }
36748
+ }
36749
+ }
36750
+ onValueChange?.(typedValue);
36751
+ if (onChange) {
36752
+ const event = {
36753
+ target: {
36754
+ name,
36755
+ value: typedValue
36756
+ }
36757
+ };
36758
+ onChange(event);
36759
+ }
36760
+ };
36761
+ $[30] = dataType;
36762
+ $[31] = name;
36763
+ $[32] = onChange;
36764
+ $[33] = onValueChange;
36765
+ $[34] = t8;
36766
+ } else {
36767
+ t8 = $[34];
36768
+ }
36769
+ const onValueChangeInternal = t8;
35393
36770
  const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
35394
36771
  const stringValue = value !== void 0 ? String(value) : void 0;
35395
- const selectedChild = React.useMemo(() => {
35396
- if (!hasValue || renderValue) return null;
35397
- const childrenProps = React.Children.map(children, (child) => {
35398
- if (React.isValidElement(child)) {
35399
- return child.props;
35400
- }
35401
- }).filter(Boolean);
35402
- const option = childrenProps.find((o) => String(o.value) === String(value));
35403
- return option?.children;
35404
- }, [children, hasValue, renderValue, value]);
35405
- return /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Root, { name, value: stringValue, open: openInternal, disabled, onValueChange: onValueChangeInternal, onOpenChange: (open_0) => {
35406
- onOpenChange?.(open_0);
35407
- setOpenInternal(open_0);
35408
- }, ...props, children: [
35409
- typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label,
35410
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls("select-none rounded-md text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
36772
+ let t9;
36773
+ bb0: {
36774
+ if (!hasValue || renderValue) {
36775
+ t9 = null;
36776
+ break bb0;
36777
+ }
36778
+ let found;
36779
+ if ($[35] !== children || $[36] !== value) {
36780
+ found = null;
36781
+ React.Children.forEach(children, (child) => {
36782
+ if (React.isValidElement(child) && String(child.props.value) === String(value)) {
36783
+ found = child.props.children;
36784
+ }
36785
+ });
36786
+ $[35] = children;
36787
+ $[36] = value;
36788
+ $[37] = found;
36789
+ } else {
36790
+ found = $[37];
36791
+ }
36792
+ t9 = found;
36793
+ }
36794
+ const displayChildren = t9;
36795
+ let t10;
36796
+ if ($[38] !== onOpenChange) {
36797
+ t10 = (open_0) => {
36798
+ onOpenChange?.(open_0);
36799
+ setOpenInternal(open_0);
36800
+ };
36801
+ $[38] = onOpenChange;
36802
+ $[39] = t10;
36803
+ } else {
36804
+ t10 = $[39];
36805
+ }
36806
+ let t11;
36807
+ if ($[40] !== error || $[41] !== label) {
36808
+ t11 = typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label;
36809
+ $[40] = error;
36810
+ $[41] = label;
36811
+ $[42] = t11;
36812
+ } else {
36813
+ t11 = $[42];
36814
+ }
36815
+ const t12 = invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin;
36816
+ const t13 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
36817
+ const t14 = size === "smallest";
36818
+ const t15 = size === "small";
36819
+ const t16 = size === "medium";
36820
+ const t17 = size === "large";
36821
+ const t18 = !fullWidth;
36822
+ let t19;
36823
+ if ($[43] !== className || $[44] !== fullWidth || $[45] !== t12 || $[46] !== t13 || $[47] !== t14 || $[48] !== t15 || $[49] !== t16 || $[50] !== t17 || $[51] !== t18) {
36824
+ t19 = cls("select-none rounded-md text-sm", t12, t13, "relative flex items-center", className, {
36825
+ "min-h-[28px]": t14,
36826
+ "min-h-[32px]": t15,
36827
+ "min-h-[44px]": t16,
36828
+ "min-h-[64px]": t17,
36829
+ "w-fit": t18,
36830
+ "w-full": fullWidth
36831
+ });
36832
+ $[43] = className;
36833
+ $[44] = fullWidth;
36834
+ $[45] = t12;
36835
+ $[46] = t13;
36836
+ $[47] = t14;
36837
+ $[48] = t15;
36838
+ $[49] = t16;
36839
+ $[50] = t17;
36840
+ $[51] = t18;
36841
+ $[52] = t19;
36842
+ } else {
36843
+ t19 = $[52];
36844
+ }
36845
+ let t20;
36846
+ if ($[53] !== disabled || $[54] !== error || $[55] !== fullWidth || $[56] !== inputClassName || $[57] !== padding || $[58] !== size) {
36847
+ t20 = cls("h-full", padding ? {
36848
+ "px-4": size === "large",
36849
+ "px-3": size === "medium",
36850
+ "px-2": size === "small" || size === "smallest"
36851
+ } : "", "outline-hidden focus:outline-hidden", "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", {
35411
36852
  "min-h-[28px]": size === "smallest",
35412
36853
  "min-h-[32px]": size === "small",
35413
36854
  "min-h-[44px]": size === "medium",
35414
36855
  "min-h-[64px]": size === "large",
35415
- "w-fit": !fullWidth,
35416
- "w-full": fullWidth
35417
- }), children: [
35418
- /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Trigger, { ref: inputRef, id, asChild: false, type: "button", className: cls("h-full", padding ? {
35419
- "px-4": size === "large",
35420
- "px-3": size === "medium",
35421
- "px-2": size === "small" || size === "smallest"
35422
- } : "", "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", {
35423
- "min-h-[28px]": size === "smallest",
35424
- "min-h-[32px]": size === "small",
35425
- "min-h-[44px]": size === "medium",
35426
- "min-h-[64px]": size === "large",
35427
- "w-full": fullWidth,
35428
- "w-fit": !fullWidth
35429
- }, inputClassName), children: [
35430
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
35431
- "min-h-[28px]": size === "smallest",
35432
- "min-h-[32px]": size === "small",
35433
- "min-h-[44px]": size === "medium",
35434
- "min-h-[64px]": size === "large"
35435
- }), children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Value, { onClick: (e) => {
35436
- e.preventDefault();
35437
- e.stopPropagation();
35438
- }, placeholder, className: "w-full", children: [
35439
- hasValue && value !== void 0 && renderValue ? renderValue(value) : placeholder,
35440
- hasValue && !renderValue && selectedChild
35441
- ] }) }),
35442
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: size === "large" ? "medium" : "small", className: cls("transition", open ? "rotate-180" : "", {
35443
- "px-2": size === "large",
35444
- "px-1": size === "medium" || size === "small"
35445
- }) }) })
35446
- ] }),
35447
- endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("h-full flex items-center absolute right-0 pr-12"), onClick: (e_0) => {
35448
- e_0.preventDefault();
35449
- e_0.stopPropagation();
35450
- }, children: endAdornment })
35451
- ] }),
35452
- /* @__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: cls("p-1", viewportClassName), style: {
36856
+ "w-full": fullWidth,
36857
+ "w-fit": !fullWidth
36858
+ }, inputClassName);
36859
+ $[53] = disabled;
36860
+ $[54] = error;
36861
+ $[55] = fullWidth;
36862
+ $[56] = inputClassName;
36863
+ $[57] = padding;
36864
+ $[58] = size;
36865
+ $[59] = t20;
36866
+ } else {
36867
+ t20 = $[59];
36868
+ }
36869
+ const t21 = size === "smallest";
36870
+ const t22 = size === "small";
36871
+ const t23 = size === "medium";
36872
+ const t24 = size === "large";
36873
+ let t25;
36874
+ if ($[60] !== t21 || $[61] !== t22 || $[62] !== t23 || $[63] !== t24) {
36875
+ t25 = cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
36876
+ "min-h-[28px]": t21,
36877
+ "min-h-[32px]": t22,
36878
+ "min-h-[44px]": t23,
36879
+ "min-h-[64px]": t24
36880
+ });
36881
+ $[60] = t21;
36882
+ $[61] = t22;
36883
+ $[62] = t23;
36884
+ $[63] = t24;
36885
+ $[64] = t25;
36886
+ } else {
36887
+ t25 = $[64];
36888
+ }
36889
+ let t26;
36890
+ if ($[65] !== displayChildren || $[66] !== hasValue || $[67] !== placeholder || $[68] !== renderValue || $[69] !== value) {
36891
+ t26 = hasValue && value !== void 0 && renderValue ? renderValue(value) : displayChildren || placeholder;
36892
+ $[65] = displayChildren;
36893
+ $[66] = hasValue;
36894
+ $[67] = placeholder;
36895
+ $[68] = renderValue;
36896
+ $[69] = value;
36897
+ $[70] = t26;
36898
+ } else {
36899
+ t26 = $[70];
36900
+ }
36901
+ let t27;
36902
+ if ($[71] !== placeholder || $[72] !== t26) {
36903
+ t27 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { onClick: _temp$1, placeholder, className: "w-full", children: t26 });
36904
+ $[71] = placeholder;
36905
+ $[72] = t26;
36906
+ $[73] = t27;
36907
+ } else {
36908
+ t27 = $[73];
36909
+ }
36910
+ let t28;
36911
+ if ($[74] !== ref || $[75] !== t25 || $[76] !== t27) {
36912
+ t28 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: t25, children: t27 });
36913
+ $[74] = ref;
36914
+ $[75] = t25;
36915
+ $[76] = t27;
36916
+ $[77] = t28;
36917
+ } else {
36918
+ t28 = $[77];
36919
+ }
36920
+ const t29 = size === "large" ? "medium" : "small";
36921
+ const t30 = open ? "rotate-180" : "";
36922
+ const t31 = size === "large";
36923
+ const t32 = size === "medium" || size === "small";
36924
+ let t33;
36925
+ if ($[78] !== t30 || $[79] !== t31 || $[80] !== t32) {
36926
+ t33 = cls("transition", t30, {
36927
+ "px-2": t31,
36928
+ "px-1": t32
36929
+ });
36930
+ $[78] = t30;
36931
+ $[79] = t31;
36932
+ $[80] = t32;
36933
+ $[81] = t33;
36934
+ } else {
36935
+ t33 = $[81];
36936
+ }
36937
+ let t34;
36938
+ if ($[82] !== t29 || $[83] !== t33) {
36939
+ t34 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: t29, className: t33 }) });
36940
+ $[82] = t29;
36941
+ $[83] = t33;
36942
+ $[84] = t34;
36943
+ } else {
36944
+ t34 = $[84];
36945
+ }
36946
+ let t35;
36947
+ if ($[85] !== id || $[86] !== inputRef || $[87] !== t20 || $[88] !== t28 || $[89] !== t34) {
36948
+ t35 = /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Trigger, { ref: inputRef, id, asChild: false, type: "button", className: t20, children: [
36949
+ t28,
36950
+ t34
36951
+ ] });
36952
+ $[85] = id;
36953
+ $[86] = inputRef;
36954
+ $[87] = t20;
36955
+ $[88] = t28;
36956
+ $[89] = t34;
36957
+ $[90] = t35;
36958
+ } else {
36959
+ t35 = $[90];
36960
+ }
36961
+ let t36;
36962
+ if ($[91] !== endAdornment) {
36963
+ t36 = endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("h-full flex items-center absolute right-0 pr-12"), onClick: _temp2, children: endAdornment });
36964
+ $[91] = endAdornment;
36965
+ $[92] = t36;
36966
+ } else {
36967
+ t36 = $[92];
36968
+ }
36969
+ let t37;
36970
+ if ($[93] !== t19 || $[94] !== t35 || $[95] !== t36) {
36971
+ t37 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
36972
+ t35,
36973
+ t36
36974
+ ] });
36975
+ $[93] = t19;
36976
+ $[94] = t35;
36977
+ $[95] = t36;
36978
+ $[96] = t37;
36979
+ } else {
36980
+ t37 = $[96];
36981
+ }
36982
+ let t38;
36983
+ if ($[97] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36984
+ t38 = cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin);
36985
+ $[97] = t38;
36986
+ } else {
36987
+ t38 = $[97];
36988
+ }
36989
+ let t39;
36990
+ if ($[98] !== viewportClassName) {
36991
+ t39 = cls("p-1", viewportClassName);
36992
+ $[98] = viewportClassName;
36993
+ $[99] = t39;
36994
+ } else {
36995
+ t39 = $[99];
36996
+ }
36997
+ let t40;
36998
+ if ($[100] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36999
+ t40 = {
35453
37000
  maxHeight: "var(--radix-select-content-available-height)"
35454
- }, children }) }) })
35455
- ] });
37001
+ };
37002
+ $[100] = t40;
37003
+ } else {
37004
+ t40 = $[100];
37005
+ }
37006
+ let t41;
37007
+ if ($[101] !== children || $[102] !== t39) {
37008
+ t41 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: t39, style: t40, children });
37009
+ $[101] = children;
37010
+ $[102] = t39;
37011
+ $[103] = t41;
37012
+ } else {
37013
+ t41 = $[103];
37014
+ }
37015
+ let t42;
37016
+ if ($[104] !== position || $[105] !== t41) {
37017
+ t42 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Content, { position, className: t38, children: t41 });
37018
+ $[104] = position;
37019
+ $[105] = t41;
37020
+ $[106] = t42;
37021
+ } else {
37022
+ t42 = $[106];
37023
+ }
37024
+ let t43;
37025
+ if ($[107] !== finalContainer || $[108] !== t42) {
37026
+ t43 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { container: finalContainer, children: t42 });
37027
+ $[107] = finalContainer;
37028
+ $[108] = t42;
37029
+ $[109] = t43;
37030
+ } else {
37031
+ t43 = $[109];
37032
+ }
37033
+ let t44;
37034
+ if ($[110] !== disabled || $[111] !== name || $[112] !== onValueChangeInternal || $[113] !== openInternal || $[114] !== props || $[115] !== stringValue || $[116] !== t10 || $[117] !== t11 || $[118] !== t37 || $[119] !== t43) {
37035
+ t44 = /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Root, { name, value: stringValue, open: openInternal, disabled, onValueChange: onValueChangeInternal, onOpenChange: t10, ...props, children: [
37036
+ t11,
37037
+ t37,
37038
+ t43
37039
+ ] });
37040
+ $[110] = disabled;
37041
+ $[111] = name;
37042
+ $[112] = onValueChangeInternal;
37043
+ $[113] = openInternal;
37044
+ $[114] = props;
37045
+ $[115] = stringValue;
37046
+ $[116] = t10;
37047
+ $[117] = t11;
37048
+ $[118] = t37;
37049
+ $[119] = t43;
37050
+ $[120] = t44;
37051
+ } else {
37052
+ t44 = $[120];
37053
+ }
37054
+ return t44;
35456
37055
  });
35457
37056
  Select.displayName = "Select";
35458
37057
  const SelectItem = React.memo(function SelectItem2(t0) {
@@ -35543,6 +37142,14 @@
35543
37142
  }
35544
37143
  return t3;
35545
37144
  });
37145
+ function _temp$1(e) {
37146
+ e.preventDefault();
37147
+ e.stopPropagation();
37148
+ }
37149
+ function _temp2(e_0) {
37150
+ e_0.preventDefault();
37151
+ e_0.stopPropagation();
37152
+ }
35546
37153
  function SliderThumb(props) {
35547
37154
  const $ = reactCompilerRuntime.c(13);
35548
37155
  const t0 = props.hovered;
@@ -35552,7 +37159,7 @@
35552
37159
  t2 = cls({
35553
37160
  "border-primary bg-primary outline-none": t1,
35554
37161
  "border-surface-accent-300 bg-surface-accent-300 dark:border-surface-700 dark:bg-surface-700": props.props.disabled
35555
- }, props.classes, "focus-visible:ring-4 focus-visible:ring-primary focus-visible:ring-opacity-50", "hover:ring-4 hover:ring-primary hover:ring-opacity-25", "block rounded-full transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50");
37162
+ }, props.classes, "focus-visible:ring-4 focus-visible:ring-primary focus-visible:ring-opacity-50 focus-visible:ring-primary/50", "hover:ring-4 hover:ring-primary hover:ring-opacity-25 hover:ring-primary/25", "block rounded-full transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50");
35556
37163
  $[0] = props.classes;
35557
37164
  $[1] = props.props.disabled;
35558
37165
  $[2] = t1;
@@ -35570,7 +37177,7 @@
35570
37177
  }
35571
37178
  let t4;
35572
37179
  if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35573
- t4 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100");
37180
+ t4 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 bg-surface-accent-700/90 dark:bg-surface-accent-800/90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100");
35574
37181
  $[6] = t4;
35575
37182
  } else {
35576
37183
  t4 = $[6];
@@ -35675,7 +37282,7 @@
35675
37282
  }
35676
37283
  let t10;
35677
37284
  if ($[15] !== t6 || $[16] !== t9) {
35678
- t10 = /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Track, { style: t6, className: "relative w-full grow overflow-hidden rounded-full bg-surface-accent-300 bg-opacity-40 dark:bg-surface-700 dark:bg-opacity-40", children: t9 });
37285
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Track, { style: t6, className: "relative w-full grow overflow-hidden rounded-full bg-surface-accent-300 bg-opacity-40 bg-surface-accent-300/40 dark:bg-surface-700 dark:bg-opacity-40 dark:bg-surface-700/40", children: t9 });
35679
37286
  $[15] = t6;
35680
37287
  $[16] = t9;
35681
37288
  $[17] = t10;
@@ -35730,13 +37337,14 @@
35730
37337
  });
35731
37338
  Slider.displayName = "Slider";
35732
37339
  const Sheet = (t0) => {
35733
- const $ = reactCompilerRuntime.c(66);
37340
+ const $ = reactCompilerRuntime.c(70);
35734
37341
  let children;
35735
37342
  let className;
35736
37343
  let onOpenChange;
35737
37344
  let open;
35738
37345
  let overlayClassName;
35739
37346
  let overlayStyle;
37347
+ let portalContainer;
35740
37348
  let props;
35741
37349
  let style;
35742
37350
  let t1;
@@ -35758,6 +37366,7 @@
35758
37366
  style,
35759
37367
  overlayClassName,
35760
37368
  overlayStyle,
37369
+ portalContainer,
35761
37370
  ...props
35762
37371
  } = t0);
35763
37372
  $[0] = t0;
@@ -35767,13 +37376,14 @@
35767
37376
  $[4] = open;
35768
37377
  $[5] = overlayClassName;
35769
37378
  $[6] = overlayStyle;
35770
- $[7] = props;
35771
- $[8] = style;
35772
- $[9] = t1;
35773
- $[10] = t2;
35774
- $[11] = t3;
35775
- $[12] = title;
35776
- $[13] = transparent;
37379
+ $[7] = portalContainer;
37380
+ $[8] = props;
37381
+ $[9] = style;
37382
+ $[10] = t1;
37383
+ $[11] = t2;
37384
+ $[12] = t3;
37385
+ $[13] = title;
37386
+ $[14] = transparent;
35777
37387
  } else {
35778
37388
  children = $[1];
35779
37389
  className = $[2];
@@ -35781,21 +37391,24 @@
35781
37391
  open = $[4];
35782
37392
  overlayClassName = $[5];
35783
37393
  overlayStyle = $[6];
35784
- props = $[7];
35785
- style = $[8];
35786
- t1 = $[9];
35787
- t2 = $[10];
35788
- t3 = $[11];
35789
- title = $[12];
35790
- transparent = $[13];
37394
+ portalContainer = $[7];
37395
+ props = $[8];
37396
+ style = $[9];
37397
+ t1 = $[10];
37398
+ t2 = $[11];
37399
+ t3 = $[12];
37400
+ title = $[13];
37401
+ transparent = $[14];
35791
37402
  }
35792
37403
  const side = t1 === void 0 ? "right" : t1;
35793
37404
  const modal = t2 === void 0 ? true : t2;
35794
37405
  const includeBackgroundOverlay = t3 === void 0 ? true : t3;
35795
37406
  const [displayed, setDisplayed] = React.useState(false);
37407
+ const contextContainer = usePortalContainer();
37408
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
35796
37409
  let t4;
35797
37410
  let t5;
35798
- if ($[14] !== open) {
37411
+ if ($[15] !== open) {
35799
37412
  t4 = () => {
35800
37413
  const timeout = setTimeout(() => {
35801
37414
  setDisplayed(open);
@@ -35803,12 +37416,12 @@
35803
37416
  return () => clearTimeout(timeout);
35804
37417
  };
35805
37418
  t5 = [open];
35806
- $[14] = open;
35807
- $[15] = t4;
35808
- $[16] = t5;
37419
+ $[15] = open;
37420
+ $[16] = t4;
37421
+ $[17] = t5;
35809
37422
  } else {
35810
- t4 = $[15];
35811
- t5 = $[16];
37423
+ t4 = $[16];
37424
+ t5 = $[17];
35812
37425
  }
35813
37426
  React.useEffect(t4, t5);
35814
37427
  let T0;
@@ -35818,11 +37431,12 @@
35818
37431
  let t11;
35819
37432
  let t12;
35820
37433
  let t13;
37434
+ let t14;
35821
37435
  let t6;
35822
37436
  let t7;
35823
37437
  let t8;
35824
37438
  let t9;
35825
- if ($[17] !== className || $[18] !== displayed || $[19] !== includeBackgroundOverlay || $[20] !== modal || $[21] !== onOpenChange || $[22] !== open || $[23] !== overlayClassName || $[24] !== overlayStyle || $[25] !== props || $[26] !== side || $[27] !== title || $[28] !== transparent) {
37439
+ if ($[18] !== className || $[19] !== displayed || $[20] !== finalContainer || $[21] !== includeBackgroundOverlay || $[22] !== modal || $[23] !== onOpenChange || $[24] !== open || $[25] !== overlayClassName || $[26] !== overlayStyle || $[27] !== props || $[28] !== side || $[29] !== title || $[30] !== transparent) {
35826
37440
  const transformValue = {
35827
37441
  top: "-translate-y-full",
35828
37442
  bottom: "translate-y-full",
@@ -35836,113 +37450,118 @@
35836
37450
  right: "border-l"
35837
37451
  };
35838
37452
  T2 = DialogPrimitive__namespace.Root;
35839
- t11 = displayed || open;
35840
- t12 = modal;
35841
- t13 = onOpenChange;
37453
+ t12 = displayed || open;
37454
+ t13 = modal;
37455
+ t14 = onOpenChange;
35842
37456
  T1 = DialogPrimitive__namespace.Portal;
35843
- const t142 = title ?? "Sheet";
35844
- if ($[40] !== t142) {
35845
- t9 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { autoFocus: true, tabIndex: 0, children: t142 });
35846
- $[40] = t142;
35847
- $[41] = t9;
37457
+ t9 = finalContainer;
37458
+ const t152 = title ?? "Sheet";
37459
+ if ($[43] !== t152) {
37460
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { autoFocus: true, tabIndex: 0, children: t152 });
37461
+ $[43] = t152;
37462
+ $[44] = t10;
35848
37463
  } else {
35849
- t9 = $[41];
37464
+ t10 = $[44];
35850
37465
  }
35851
- if ($[42] !== displayed || $[43] !== includeBackgroundOverlay || $[44] !== open || $[45] !== overlayClassName || $[46] !== overlayStyle) {
35852
- t10 = includeBackgroundOverlay && /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, { className: cls("outline-none", "fixed inset-0 transition-opacity z-20 ease-in-out duration-100 backdrop-blur-sm", "bg-black bg-opacity-50", "dark:bg-surface-900 dark:bg-opacity-60", displayed && open ? "opacity-100" : "opacity-0", overlayClassName), style: {
37466
+ if ($[45] !== displayed || $[46] !== includeBackgroundOverlay || $[47] !== open || $[48] !== overlayClassName || $[49] !== overlayStyle) {
37467
+ t11 = includeBackgroundOverlay && /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, { className: cls("outline-none", "fixed inset-0 transition-opacity z-20 ease-in-out duration-100 backdrop-blur-sm", "bg-black bg-opacity-50 bg-black/50", "dark:bg-surface-900 dark:bg-opacity-60 dark:bg-surface-900/60", displayed && open ? "opacity-100" : "opacity-0", overlayClassName), style: {
35853
37468
  pointerEvents: displayed ? "auto" : "none",
35854
37469
  ...overlayStyle
35855
37470
  } });
35856
- $[42] = displayed;
35857
- $[43] = includeBackgroundOverlay;
35858
- $[44] = open;
35859
- $[45] = overlayClassName;
35860
- $[46] = overlayStyle;
35861
- $[47] = t10;
37471
+ $[45] = displayed;
37472
+ $[46] = includeBackgroundOverlay;
37473
+ $[47] = open;
37474
+ $[48] = overlayClassName;
37475
+ $[49] = overlayStyle;
37476
+ $[50] = t11;
35862
37477
  } else {
35863
- t10 = $[47];
37478
+ t11 = $[50];
35864
37479
  }
35865
37480
  T0 = DialogPrimitive__namespace.Content;
35866
37481
  t6 = props;
35867
37482
  t7 = _temp;
35868
37483
  t8 = cls("outline-none", borderClass[side], defaultBorderMixin, "transform-gpu", "will-change-transform", "text-surface-accent-900 dark:text-white", "fixed transform z-20 transition-all ease-in-out", !displayed ? "duration-150" : "duration-100", "outline-none focus:outline-none", transparent ? "" : "shadow-md bg-white dark:bg-surface-950", side === "top" || side === "bottom" ? "w-full" : "h-full", side === "left" || side === "top" ? "left-0 top-0" : "right-0 bottom-0", displayed && open ? "opacity-100" : "opacity-50", !displayed || !open ? transformValue[side] : "", className);
35869
- $[17] = className;
35870
- $[18] = displayed;
35871
- $[19] = includeBackgroundOverlay;
35872
- $[20] = modal;
35873
- $[21] = onOpenChange;
35874
- $[22] = open;
35875
- $[23] = overlayClassName;
35876
- $[24] = overlayStyle;
35877
- $[25] = props;
35878
- $[26] = side;
35879
- $[27] = title;
35880
- $[28] = transparent;
35881
- $[29] = T0;
35882
- $[30] = T1;
35883
- $[31] = T2;
35884
- $[32] = t10;
35885
- $[33] = t11;
35886
- $[34] = t12;
35887
- $[35] = t13;
35888
- $[36] = t6;
35889
- $[37] = t7;
35890
- $[38] = t8;
35891
- $[39] = t9;
35892
- } else {
35893
- T0 = $[29];
35894
- T1 = $[30];
35895
- T2 = $[31];
35896
- t10 = $[32];
35897
- t11 = $[33];
35898
- t12 = $[34];
35899
- t13 = $[35];
35900
- t6 = $[36];
35901
- t7 = $[37];
35902
- t8 = $[38];
35903
- t9 = $[39];
35904
- }
35905
- let t14;
35906
- if ($[48] !== T0 || $[49] !== children || $[50] !== style || $[51] !== t6 || $[52] !== t7 || $[53] !== t8) {
35907
- t14 = /* @__PURE__ */ jsxRuntime.jsx(T0, { ...t6, onFocusCapture: t7, className: t8, style, children });
35908
- $[48] = T0;
35909
- $[49] = children;
35910
- $[50] = style;
35911
- $[51] = t6;
35912
- $[52] = t7;
35913
- $[53] = t8;
35914
- $[54] = t14;
35915
- } else {
35916
- t14 = $[54];
37484
+ $[18] = className;
37485
+ $[19] = displayed;
37486
+ $[20] = finalContainer;
37487
+ $[21] = includeBackgroundOverlay;
37488
+ $[22] = modal;
37489
+ $[23] = onOpenChange;
37490
+ $[24] = open;
37491
+ $[25] = overlayClassName;
37492
+ $[26] = overlayStyle;
37493
+ $[27] = props;
37494
+ $[28] = side;
37495
+ $[29] = title;
37496
+ $[30] = transparent;
37497
+ $[31] = T0;
37498
+ $[32] = T1;
37499
+ $[33] = T2;
37500
+ $[34] = t10;
37501
+ $[35] = t11;
37502
+ $[36] = t12;
37503
+ $[37] = t13;
37504
+ $[38] = t14;
37505
+ $[39] = t6;
37506
+ $[40] = t7;
37507
+ $[41] = t8;
37508
+ $[42] = t9;
37509
+ } else {
37510
+ T0 = $[31];
37511
+ T1 = $[32];
37512
+ T2 = $[33];
37513
+ t10 = $[34];
37514
+ t11 = $[35];
37515
+ t12 = $[36];
37516
+ t13 = $[37];
37517
+ t14 = $[38];
37518
+ t6 = $[39];
37519
+ t7 = $[40];
37520
+ t8 = $[41];
37521
+ t9 = $[42];
35917
37522
  }
35918
37523
  let t15;
35919
- if ($[55] !== T1 || $[56] !== t10 || $[57] !== t14 || $[58] !== t9) {
35920
- t15 = /* @__PURE__ */ jsxRuntime.jsxs(T1, { children: [
35921
- t9,
37524
+ if ($[51] !== T0 || $[52] !== children || $[53] !== style || $[54] !== t6 || $[55] !== t7 || $[56] !== t8) {
37525
+ t15 = /* @__PURE__ */ jsxRuntime.jsx(T0, { ...t6, onFocusCapture: t7, className: t8, style, children });
37526
+ $[51] = T0;
37527
+ $[52] = children;
37528
+ $[53] = style;
37529
+ $[54] = t6;
37530
+ $[55] = t7;
37531
+ $[56] = t8;
37532
+ $[57] = t15;
37533
+ } else {
37534
+ t15 = $[57];
37535
+ }
37536
+ let t16;
37537
+ if ($[58] !== T1 || $[59] !== t10 || $[60] !== t11 || $[61] !== t15 || $[62] !== t9) {
37538
+ t16 = /* @__PURE__ */ jsxRuntime.jsxs(T1, { container: t9, children: [
35922
37539
  t10,
35923
- t14
37540
+ t11,
37541
+ t15
35924
37542
  ] });
35925
- $[55] = T1;
35926
- $[56] = t10;
35927
- $[57] = t14;
35928
- $[58] = t9;
35929
- $[59] = t15;
37543
+ $[58] = T1;
37544
+ $[59] = t10;
37545
+ $[60] = t11;
37546
+ $[61] = t15;
37547
+ $[62] = t9;
37548
+ $[63] = t16;
35930
37549
  } else {
35931
- t15 = $[59];
37550
+ t16 = $[63];
35932
37551
  }
35933
- let t16;
35934
- if ($[60] !== T2 || $[61] !== t11 || $[62] !== t12 || $[63] !== t13 || $[64] !== t15) {
35935
- t16 = /* @__PURE__ */ jsxRuntime.jsx(T2, { open: t11, modal: t12, onOpenChange: t13, children: t15 });
35936
- $[60] = T2;
35937
- $[61] = t11;
35938
- $[62] = t12;
35939
- $[63] = t13;
35940
- $[64] = t15;
35941
- $[65] = t16;
35942
- } else {
35943
- t16 = $[65];
35944
- }
35945
- return t16;
37552
+ let t17;
37553
+ if ($[64] !== T2 || $[65] !== t12 || $[66] !== t13 || $[67] !== t14 || $[68] !== t16) {
37554
+ t17 = /* @__PURE__ */ jsxRuntime.jsx(T2, { open: t12, modal: t13, onOpenChange: t14, children: t16 });
37555
+ $[64] = T2;
37556
+ $[65] = t12;
37557
+ $[66] = t13;
37558
+ $[67] = t14;
37559
+ $[68] = t16;
37560
+ $[69] = t17;
37561
+ } else {
37562
+ t17 = $[69];
37563
+ }
37564
+ return t17;
35946
37565
  };
35947
37566
  function _temp(event) {
35948
37567
  return event.preventDefault();
@@ -35950,203 +37569,222 @@
35950
37569
  function getStyleValue(value) {
35951
37570
  return parseInt(value, 10) || 0;
35952
37571
  }
35953
- const styles$1 = {
35954
- shadow: {
35955
- // Visibility needed to hide the extra text area on iPads
35956
- visibility: "hidden",
35957
- // Remove from the content flow
35958
- position: "absolute",
35959
- // Ignore the scrollbar width
35960
- overflow: "hidden",
35961
- height: 0,
35962
- top: 0,
35963
- left: 0,
35964
- // Create a new layer, increase the isolation of the computed values
35965
- transform: "translateZ(0)"
35966
- }
35967
- };
35968
- function isEmpty(obj) {
35969
- return obj === void 0 || obj === null || Object.keys(obj).length === 0 || obj.outerHeightStyle === 0 && !obj.overflow;
35970
- }
35971
37572
  const TextareaAutosize = React__namespace.forwardRef(function TextareaAutosize2(props, ref) {
35972
- const {
35973
- onChange,
35974
- onScroll,
35975
- onResize,
35976
- maxRows,
35977
- minRows = 1,
35978
- style,
35979
- value,
35980
- onFocus,
35981
- onBlur,
35982
- sizeRef,
35983
- ignoreBoxSizing,
35984
- ...other
35985
- } = props;
37573
+ const $ = reactCompilerRuntime.c(38);
37574
+ let ignoreBoxSizing;
37575
+ let maxRows;
37576
+ let onBlur;
37577
+ let onChange;
37578
+ let onFocus;
37579
+ let onResize;
37580
+ let onScroll;
37581
+ let other;
37582
+ let style;
37583
+ let t0;
37584
+ let value;
37585
+ if ($[0] !== props) {
37586
+ const {
37587
+ onChange: t12,
37588
+ onScroll: t22,
37589
+ onResize: t32,
37590
+ maxRows: t42,
37591
+ minRows: t52,
37592
+ style: t62,
37593
+ value: t72,
37594
+ onFocus: t82,
37595
+ onBlur: t9,
37596
+ sizeRef,
37597
+ ignoreBoxSizing: t10,
37598
+ ...t11
37599
+ } = props;
37600
+ onChange = t12;
37601
+ onScroll = t22;
37602
+ onResize = t32;
37603
+ maxRows = t42;
37604
+ t0 = t52;
37605
+ style = t62;
37606
+ value = t72;
37607
+ onFocus = t82;
37608
+ onBlur = t9;
37609
+ ignoreBoxSizing = t10;
37610
+ other = t11;
37611
+ $[0] = props;
37612
+ $[1] = ignoreBoxSizing;
37613
+ $[2] = maxRows;
37614
+ $[3] = onBlur;
37615
+ $[4] = onChange;
37616
+ $[5] = onFocus;
37617
+ $[6] = onResize;
37618
+ $[7] = onScroll;
37619
+ $[8] = other;
37620
+ $[9] = style;
37621
+ $[10] = t0;
37622
+ $[11] = value;
37623
+ } else {
37624
+ ignoreBoxSizing = $[1];
37625
+ maxRows = $[2];
37626
+ onBlur = $[3];
37627
+ onChange = $[4];
37628
+ onFocus = $[5];
37629
+ onResize = $[6];
37630
+ onScroll = $[7];
37631
+ other = $[8];
37632
+ style = $[9];
37633
+ t0 = $[10];
37634
+ value = $[11];
37635
+ }
37636
+ const minRows = t0 === void 0 ? 1 : t0;
35986
37637
  const {
35987
37638
  current: isControlled
35988
37639
  } = React__namespace.useRef(value != null);
35989
37640
  const inputRef = React__namespace.useRef(null);
35990
37641
  const handleRef = useForkRef(ref, inputRef);
35991
- const shadowRef = React__namespace.useRef(null);
35992
- const renders = React__namespace.useRef(0);
35993
- const [state, setState] = React__namespace.useState({
35994
- outerHeightStyle: 0
35995
- });
35996
- const getUpdatedState = React__namespace.useCallback(() => {
35997
- const input = inputRef.current;
35998
- if (typeof window === "undefined") {
35999
- return {
36000
- outerHeightStyle: 0
36001
- };
36002
- }
36003
- const containerWindow = window;
36004
- const computedStyle = containerWindow.getComputedStyle(input);
36005
- if (computedStyle.width === "0px") {
36006
- return {
36007
- outerHeightStyle: 0
36008
- };
36009
- }
36010
- const sizeReferenceElement = sizeRef?.current ?? shadowRef.current;
36011
- const inputShallow = shadowRef.current;
36012
- sizeReferenceElement.style.width = computedStyle.width;
36013
- inputShallow.value = input.value || props.placeholder || "x";
36014
- if (inputShallow.value.slice(-1) === "\n") {
36015
- inputShallow.value += " ";
36016
- }
36017
- const boxSizing = computedStyle.boxSizing;
36018
- const padding = getStyleValue(computedStyle.paddingBottom) + getStyleValue(computedStyle.paddingTop);
36019
- const border = getStyleValue(computedStyle.borderBottomWidth) + getStyleValue(computedStyle.borderTopWidth);
36020
- const minHeight = getStyleValue(computedStyle.minHeight);
36021
- const innerHeight = sizeReferenceElement.scrollHeight;
36022
- inputShallow.value = "x";
36023
- const singleRowHeight = sizeReferenceElement.scrollHeight;
36024
- let outerHeight = innerHeight;
36025
- if (minRows) {
36026
- outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);
36027
- }
36028
- if (maxRows) {
36029
- outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);
36030
- }
36031
- outerHeight = Math.max(outerHeight, singleRowHeight, minHeight);
36032
- const outerHeightStyle = outerHeight + (!ignoreBoxSizing && boxSizing === "border-box" ? padding + border : 0);
36033
- const overflow = Math.abs(outerHeight - innerHeight) <= 1;
36034
- return {
36035
- outerHeightStyle,
36036
- overflow
36037
- };
36038
- }, [maxRows, minRows, props.placeholder]);
36039
- const updateState = React__namespace.useCallback((prevState, newState) => {
36040
- const {
36041
- outerHeightStyle: outerHeightStyle_0,
36042
- overflow: overflow_0
36043
- } = newState;
36044
- if (renders.current < 20 && (outerHeightStyle_0 > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle_0) > 1 || prevState.overflow !== overflow_0)) {
36045
- renders.current += 1;
36046
- return {
36047
- overflow: overflow_0,
36048
- outerHeightStyle: outerHeightStyle_0
36049
- };
36050
- }
36051
- if (process.env.NODE_ENV !== "production") {
36052
- if (renders.current === 20) {
36053
- console.error(["MUI: Too many re-renders. The layout is unstable.", "TextareaAutosize limits the number of renders to prevent an infinite loop."].join("\n"));
37642
+ let t1;
37643
+ if ($[12] !== ignoreBoxSizing || $[13] !== maxRows || $[14] !== minRows || $[15] !== onResize) {
37644
+ t1 = () => {
37645
+ const el = inputRef.current;
37646
+ if (!el || typeof window === "undefined") {
37647
+ return;
36054
37648
  }
36055
- }
36056
- return prevState;
36057
- }, []);
36058
- const syncHeight = React__namespace.useCallback(() => {
36059
- const newState_0 = getUpdatedState();
36060
- if (isEmpty(newState_0)) {
36061
- return;
36062
- }
36063
- if (onResize) {
36064
- onResize(newState_0);
36065
- }
36066
- setState((prevState_0) => {
36067
- return updateState(prevState_0, newState_0);
36068
- });
36069
- }, [getUpdatedState, onResize, updateState]);
36070
- const syncHeightWithFlushSync = React__namespace.useCallback(() => {
36071
- const newState_1 = getUpdatedState();
36072
- if (isEmpty(newState_1)) {
36073
- return;
36074
- }
36075
- ReactDOM__namespace.flushSync(() => {
36076
- setState((prevState_1) => {
36077
- return updateState(prevState_1, newState_1);
36078
- });
36079
- });
36080
- }, [getUpdatedState, updateState]);
36081
- React__namespace.useEffect(() => {
36082
- const handleResize = debounce(() => {
36083
- renders.current = 0;
36084
- if (inputRef.current) {
36085
- syncHeightWithFlushSync();
37649
+ if (el.offsetWidth === 0) {
37650
+ return;
36086
37651
  }
36087
- });
36088
- let resizeObserver;
36089
- const input_0 = inputRef.current;
36090
- const containerWindow_0 = window;
36091
- if (typeof window === "undefined") {
36092
- return;
36093
- }
36094
- containerWindow_0.addEventListener("resize", handleResize);
36095
- if (typeof ResizeObserver !== "undefined") {
36096
- resizeObserver = new ResizeObserver(handleResize);
36097
- resizeObserver.observe(input_0);
36098
- }
36099
- return () => {
36100
- handleResize.clear();
36101
- containerWindow_0.removeEventListener("resize", handleResize);
36102
- if (resizeObserver) {
36103
- resizeObserver.disconnect();
37652
+ const cs = window.getComputedStyle(el);
37653
+ const paddingY = getStyleValue(cs.paddingTop) + getStyleValue(cs.paddingBottom);
37654
+ const borderY = getStyleValue(cs.borderTopWidth) + getStyleValue(cs.borderBottomWidth);
37655
+ const boxSizing = cs.boxSizing;
37656
+ const prevHeight = el.style.height;
37657
+ const prevOverflow = el.style.overflowY;
37658
+ el.style.overflowY = "hidden";
37659
+ el.style.height = "0px";
37660
+ const scrollH = el.scrollHeight;
37661
+ const prevValue = el.value;
37662
+ el.value = "x";
37663
+ const singleRowScrollH = el.scrollHeight;
37664
+ el.value = prevValue;
37665
+ el.style.height = prevHeight;
37666
+ el.style.overflowY = prevOverflow;
37667
+ const lineHeight = singleRowScrollH - paddingY;
37668
+ let targetHeight = scrollH;
37669
+ if (minRows) {
37670
+ targetHeight = Math.max(Number(minRows) * lineHeight + paddingY, targetHeight);
37671
+ }
37672
+ const unclampedHeight = targetHeight;
37673
+ if (maxRows) {
37674
+ targetHeight = Math.min(Number(maxRows) * lineHeight + paddingY, targetHeight);
37675
+ }
37676
+ const extra = !ignoreBoxSizing && boxSizing === "border-box" ? borderY : 0;
37677
+ const finalHeight = Math.ceil(targetHeight + extra);
37678
+ const shouldScroll = Math.abs(unclampedHeight - targetHeight) > 1;
37679
+ el.style.height = `${finalHeight}px`;
37680
+ el.style.overflowY = shouldScroll ? "auto" : "hidden";
37681
+ if (onResize) {
37682
+ onResize({
37683
+ outerHeightStyle: finalHeight,
37684
+ overflow: !shouldScroll
37685
+ });
36104
37686
  }
36105
37687
  };
36106
- }, [syncHeightWithFlushSync]);
36107
- React.useLayoutEffect(() => {
36108
- syncHeight();
36109
- });
36110
- React__namespace.useEffect(() => {
36111
- renders.current = 0;
36112
- }, [value]);
36113
- const handleChange = (event) => {
36114
- renders.current = 0;
36115
- if (!isControlled) {
37688
+ $[12] = ignoreBoxSizing;
37689
+ $[13] = maxRows;
37690
+ $[14] = minRows;
37691
+ $[15] = onResize;
37692
+ $[16] = t1;
37693
+ } else {
37694
+ t1 = $[16];
37695
+ }
37696
+ const syncHeight = t1;
37697
+ let t2;
37698
+ if ($[17] !== syncHeight) {
37699
+ t2 = () => {
36116
37700
  syncHeight();
36117
- }
36118
- if (onChange) {
36119
- onChange(event);
36120
- }
36121
- };
36122
- return /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
36123
- /* @__PURE__ */ jsxRuntime.jsx(
36124
- "textarea",
36125
- {
36126
- value,
36127
- onChange: handleChange,
36128
- className: props.className,
36129
- ref: handleRef,
36130
- onFocus,
36131
- onBlur,
36132
- rows: minRows,
36133
- style: {
36134
- height: state.outerHeightStyle,
36135
- // Need a large enough difference to allow scrolling.
36136
- // This prevents infinite rendering loop.
36137
- overflow: state.overflow ? "hidden" : void 0,
36138
- ...style
36139
- },
36140
- onScroll,
36141
- ...other
37701
+ };
37702
+ $[17] = syncHeight;
37703
+ $[18] = t2;
37704
+ } else {
37705
+ t2 = $[18];
37706
+ }
37707
+ React.useLayoutEffect(t2);
37708
+ let t3;
37709
+ let t4;
37710
+ if ($[19] !== syncHeight) {
37711
+ t3 = () => {
37712
+ const handleResize = debounce(() => {
37713
+ if (inputRef.current) {
37714
+ syncHeight();
37715
+ }
37716
+ });
37717
+ const input = inputRef.current;
37718
+ if (typeof window === "undefined") {
37719
+ return;
36142
37720
  }
36143
- ),
36144
- /* @__PURE__ */ jsxRuntime.jsx("textarea", { "aria-hidden": true, className: cls(props.className, props.shadowClassName), readOnly: true, ref: shadowRef, tabIndex: -1, style: {
36145
- padding: 0,
36146
- ...styles$1.shadow,
37721
+ window.addEventListener("resize", handleResize);
37722
+ let resizeObserver;
37723
+ if (typeof ResizeObserver !== "undefined") {
37724
+ resizeObserver = new ResizeObserver(handleResize);
37725
+ resizeObserver.observe(input);
37726
+ }
37727
+ return () => {
37728
+ handleResize.clear();
37729
+ window.removeEventListener("resize", handleResize);
37730
+ resizeObserver?.disconnect();
37731
+ };
37732
+ };
37733
+ t4 = [syncHeight];
37734
+ $[19] = syncHeight;
37735
+ $[20] = t3;
37736
+ $[21] = t4;
37737
+ } else {
37738
+ t3 = $[20];
37739
+ t4 = $[21];
37740
+ }
37741
+ React__namespace.useEffect(t3, t4);
37742
+ let t5;
37743
+ if ($[22] !== onChange || $[23] !== syncHeight) {
37744
+ t5 = (event) => {
37745
+ if (!isControlled) {
37746
+ syncHeight();
37747
+ }
37748
+ if (onChange) {
37749
+ onChange(event);
37750
+ }
37751
+ };
37752
+ $[22] = onChange;
37753
+ $[23] = syncHeight;
37754
+ $[24] = t5;
37755
+ } else {
37756
+ t5 = $[24];
37757
+ }
37758
+ const handleChange = t5;
37759
+ const t6 = minRows;
37760
+ let t7;
37761
+ if ($[25] !== style) {
37762
+ t7 = {
36147
37763
  ...style
36148
- } })
36149
- ] });
37764
+ };
37765
+ $[25] = style;
37766
+ $[26] = t7;
37767
+ } else {
37768
+ t7 = $[26];
37769
+ }
37770
+ let t8;
37771
+ if ($[27] !== handleChange || $[28] !== handleRef || $[29] !== onBlur || $[30] !== onFocus || $[31] !== onScroll || $[32] !== other || $[33] !== props.className || $[34] !== t6 || $[35] !== t7 || $[36] !== value) {
37772
+ t8 = /* @__PURE__ */ jsxRuntime.jsx("textarea", { value, onChange: handleChange, className: props.className, ref: handleRef, onFocus, onBlur, rows: t6, style: t7, onScroll, ...other });
37773
+ $[27] = handleChange;
37774
+ $[28] = handleRef;
37775
+ $[29] = onBlur;
37776
+ $[30] = onFocus;
37777
+ $[31] = onScroll;
37778
+ $[32] = other;
37779
+ $[33] = props.className;
37780
+ $[34] = t6;
37781
+ $[35] = t7;
37782
+ $[36] = value;
37783
+ $[37] = t8;
37784
+ } else {
37785
+ t8 = $[37];
37786
+ }
37787
+ return t8;
36150
37788
  });
36151
37789
  function useForkRef(...refs) {
36152
37790
  return React__namespace.useMemo(() => {
@@ -36190,8 +37828,13 @@
36190
37828
  ...inputProps
36191
37829
  }, ref) => {
36192
37830
  const inputRef = inputRefProp ?? React.useRef(null);
36193
- const [focused, setFocused] = React.useState(document.activeElement === inputRef.current);
37831
+ const [focused, setFocused] = React.useState(false);
36194
37832
  const hasValue = value !== void 0 && value !== null && value !== "";
37833
+ React.useEffect(() => {
37834
+ if (inputRef.current && document.activeElement === inputRef.current) {
37835
+ setFocused(true);
37836
+ }
37837
+ }, []);
36195
37838
  React.useEffect(() => {
36196
37839
  if (type !== "number") return;
36197
37840
  const handleWheel = (event) => {
@@ -36203,12 +37846,12 @@
36203
37846
  element?.removeEventListener("wheel", handleWheel);
36204
37847
  };
36205
37848
  }, [inputRef, type]);
36206
- 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, {
37849
+ const input = multiline ? /* @__PURE__ */ jsxRuntime.jsx("textarea", { ...inputProps, ref: inputRef, placeholder: focused || hasValue || !label ? placeholder : void 0, autoFocus, rows: typeof minRows === "string" ? parseInt(minRows) : minRows ?? 3, value: value ?? "", onChange, onFocus: () => setFocused(true), onBlur: () => setFocused(false), style: inputStyle, className: cls(invisible ? focusedInvisibleMixin : "", "rounded-md resize-none w-full outline-none text-base bg-transparent min-h-[64px] px-3", label ? "pt-8 pb-2" : "py-2", 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, {
36207
37850
  "min-h-[28px]": size === "smallest",
36208
37851
  "min-h-[32px]": size === "small",
36209
37852
  "min-h-[44px]": size === "medium",
36210
37853
  "min-h-[64px]": size === "large"
36211
- }, label ? size === "large" ? "pt-8 pb-2" : "pt-4 pb-2" : "py-2", endAdornment ? "pr-12" : "pr-3", disabled && "outline-none opacity-65 dark:opacity-60 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 });
37854
+ }, label ? size === "large" ? "pt-8 pb-2" : "pt-4 pb-2" : size === "smallest" ? "py-0.5" : size === "small" ? "py-1" : "py-2", endAdornment ? "pr-12" : "pr-3", disabled && "outline-none opacity-65 dark:opacity-60 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 });
36212
37855
  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" : "", {
36213
37856
  "min-h-[28px]": size === "smallest",
36214
37857
  "min-h-[32px]": size === "small",
@@ -36225,215 +37868,183 @@
36225
37868
  ] });
36226
37869
  });
36227
37870
  TextField.displayName = "TextField";
36228
- const Tooltip = (t0) => {
36229
- const $ = reactCompilerRuntime.c(28);
37871
+ const TabsModeContext = React.createContext("primary");
37872
+ function Tabs(t0) {
37873
+ const $ = reactCompilerRuntime.c(35);
36230
37874
  const {
36231
- open,
36232
- defaultOpen,
36233
- side: t1,
36234
- delayDuration: t2,
36235
- sideOffset,
36236
- align,
36237
- onOpenChange,
36238
- title,
36239
- tooltipClassName,
36240
- tooltipStyle,
36241
- children,
36242
- asChild: t3,
36243
- container,
37875
+ value,
37876
+ onValueChange,
36244
37877
  className,
36245
- style
37878
+ innerClassName,
37879
+ children,
37880
+ mode: t1
36246
37881
  } = t0;
36247
- const side = t1 === void 0 ? "bottom" : t1;
36248
- const delayDuration = t2 === void 0 ? 200 : t2;
36249
- const asChild = t3 === void 0 ? false : t3;
36250
- useInjectStyles("Tooltip", styles);
36251
- if (!title) {
36252
- let t42;
36253
- if ($[0] !== children) {
36254
- t42 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
36255
- $[0] = children;
36256
- $[1] = t42;
36257
- } else {
36258
- t42 = $[1];
36259
- }
36260
- return t42;
37882
+ const mode = t1 === void 0 ? "primary" : t1;
37883
+ const scrollContainerRef = React.useRef(null);
37884
+ const [showLeftScroll, setShowLeftScroll] = React.useState(false);
37885
+ const [showRightScroll, setShowRightScroll] = React.useState(false);
37886
+ const [isScrollable, setIsScrollable] = React.useState(false);
37887
+ let t2;
37888
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
37889
+ t2 = () => {
37890
+ if (scrollContainerRef.current) {
37891
+ const {
37892
+ scrollLeft,
37893
+ scrollWidth,
37894
+ clientWidth
37895
+ } = scrollContainerRef.current;
37896
+ setShowLeftScroll(scrollLeft > 0);
37897
+ setShowRightScroll(Math.ceil(scrollLeft + clientWidth) < scrollWidth);
37898
+ setIsScrollable(scrollWidth > clientWidth);
37899
+ }
37900
+ };
37901
+ $[0] = t2;
37902
+ } else {
37903
+ t2 = $[0];
37904
+ }
37905
+ const checkScroll = t2;
37906
+ let t3;
37907
+ if ($[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
37908
+ t3 = () => {
37909
+ checkScroll();
37910
+ window.addEventListener("resize", checkScroll);
37911
+ let observer;
37912
+ if (scrollContainerRef.current) {
37913
+ observer = new ResizeObserver(checkScroll);
37914
+ observer.observe(scrollContainerRef.current);
37915
+ if (scrollContainerRef.current.firstElementChild) {
37916
+ observer.observe(scrollContainerRef.current.firstElementChild);
37917
+ }
37918
+ }
37919
+ return () => {
37920
+ window.removeEventListener("resize", checkScroll);
37921
+ observer?.disconnect();
37922
+ };
37923
+ };
37924
+ $[1] = t3;
37925
+ } else {
37926
+ t3 = $[1];
36261
37927
  }
36262
37928
  let t4;
36263
- if ($[2] !== asChild || $[3] !== children || $[4] !== className || $[5] !== style) {
36264
- t4 = asChild ? /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { asChild: true, children }) : /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style, className, children }) });
36265
- $[2] = asChild;
36266
- $[3] = children;
36267
- $[4] = className;
36268
- $[5] = style;
36269
- $[6] = t4;
37929
+ if ($[2] !== children) {
37930
+ t4 = [children];
37931
+ $[2] = children;
37932
+ $[3] = t4;
36270
37933
  } else {
36271
- t4 = $[6];
37934
+ t4 = $[3];
36272
37935
  }
36273
- const trigger = t4;
37936
+ React.useEffect(t3, t4);
36274
37937
  let t5;
36275
- if ($[7] !== tooltipClassName) {
36276
- t5 = cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100", tooltipClassName);
36277
- $[7] = tooltipClassName;
36278
- $[8] = t5;
37938
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
37939
+ t5 = (direction) => {
37940
+ if (scrollContainerRef.current) {
37941
+ const container = scrollContainerRef.current;
37942
+ const scrollAmount = Math.max(container.clientWidth / 2, 200);
37943
+ const targetScroll = container.scrollLeft + (direction === "left" ? -scrollAmount : scrollAmount);
37944
+ container.scrollTo({
37945
+ left: targetScroll,
37946
+ behavior: "smooth"
37947
+ });
37948
+ }
37949
+ };
37950
+ $[4] = t5;
36279
37951
  } else {
36280
- t5 = $[8];
37952
+ t5 = $[4];
37953
+ }
37954
+ const scroll = t5;
37955
+ let t6;
37956
+ if ($[5] !== className) {
37957
+ t6 = cls("flex flex-row items-center min-w-0", className);
37958
+ $[5] = className;
37959
+ $[6] = t6;
37960
+ } else {
37961
+ t6 = $[6];
36281
37962
  }
36282
- const t6 = sideOffset === void 0 ? 4 : sideOffset;
36283
37963
  let t7;
36284
- if ($[9] !== align || $[10] !== side || $[11] !== t5 || $[12] !== t6 || $[13] !== title || $[14] !== tooltipStyle) {
36285
- t7 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Content, { className: t5, style: tooltipStyle, sideOffset: t6, align, side, children: title });
36286
- $[9] = align;
36287
- $[10] = side;
36288
- $[11] = t5;
36289
- $[12] = t6;
36290
- $[13] = title;
36291
- $[14] = tooltipStyle;
36292
- $[15] = t7;
37964
+ if ($[7] !== isScrollable || $[8] !== mode || $[9] !== showLeftScroll) {
37965
+ t7 = isScrollable && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", disabled: !showLeftScroll, onClick: () => scroll("left"), className: cls("flex-shrink-0 z-10 flex items-center justify-center rounded-md px-0.5 py-1.5 transition-all h-10 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", "disabled:pointer-events-none disabled:opacity-0", "text-surface-600 dark:text-surface-400 hover:bg-surface-200 dark:hover:bg-surface-800", mode === "primary" && "mr-1 bg-surface-50 dark:bg-surface-900 border", mode === "primary" && defaultBorderMixin, mode === "secondary" && "mr-1"), children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { size: "small" }) });
37966
+ $[7] = isScrollable;
37967
+ $[8] = mode;
37968
+ $[9] = showLeftScroll;
37969
+ $[10] = t7;
36293
37970
  } else {
36294
- t7 = $[15];
37971
+ t7 = $[10];
36295
37972
  }
36296
37973
  let t8;
36297
- if ($[16] !== container || $[17] !== t7) {
36298
- t8 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { container, children: t7 });
36299
- $[16] = container;
36300
- $[17] = t7;
36301
- $[18] = t8;
37974
+ if ($[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
37975
+ t8 = {
37976
+ scrollbarWidth: "none",
37977
+ msOverflowStyle: "none"
37978
+ };
37979
+ $[11] = t8;
36302
37980
  } else {
36303
- t8 = $[18];
37981
+ t8 = $[11];
36304
37982
  }
36305
- let t9;
36306
- if ($[19] !== defaultOpen || $[20] !== onOpenChange || $[21] !== open || $[22] !== t8 || $[23] !== trigger) {
36307
- t9 = /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { open, onOpenChange, defaultOpen, children: [
36308
- trigger,
36309
- t8
36310
- ] });
36311
- $[19] = defaultOpen;
36312
- $[20] = onOpenChange;
36313
- $[21] = open;
36314
- $[22] = t8;
36315
- $[23] = trigger;
36316
- $[24] = t9;
37983
+ const t9 = mode === "primary" && "border";
37984
+ const t10 = mode === "primary" && defaultBorderMixin;
37985
+ const t11 = mode === "primary" && "gap-2 inline-flex h-10 items-center justify-center rounded-md bg-surface-50 p-1 text-surface-600 dark:bg-surface-900 dark:text-surface-400";
37986
+ const t12 = mode === "secondary" && "gap-1 inline-flex h-9 items-center text-surface-500 dark:text-surface-400";
37987
+ let t13;
37988
+ if ($[12] !== innerClassName || $[13] !== t10 || $[14] !== t11 || $[15] !== t12 || $[16] !== t9) {
37989
+ t13 = cls(t9, t10, t11, t12, innerClassName);
37990
+ $[12] = innerClassName;
37991
+ $[13] = t10;
37992
+ $[14] = t11;
37993
+ $[15] = t12;
37994
+ $[16] = t9;
37995
+ $[17] = t13;
36317
37996
  } else {
36318
- t9 = $[24];
37997
+ t13 = $[17];
36319
37998
  }
36320
- let t10;
36321
- if ($[25] !== delayDuration || $[26] !== t9) {
36322
- t10 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { delayDuration, children: t9 });
36323
- $[25] = delayDuration;
36324
- $[26] = t9;
36325
- $[27] = t10;
37999
+ let t14;
38000
+ if ($[18] !== children || $[19] !== t13) {
38001
+ t14 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollContainerRef, className: "flex-1 overflow-x-auto no-scrollbar min-w-0", onScroll: checkScroll, style: t8, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.List, { className: t13, children }) });
38002
+ $[18] = children;
38003
+ $[19] = t13;
38004
+ $[20] = t14;
36326
38005
  } else {
36327
- t10 = $[27];
38006
+ t14 = $[20];
36328
38007
  }
36329
- return t10;
36330
- };
36331
- const styles = `
36332
-
36333
- .TooltipContent {
36334
- animation-duration: 220ms;
36335
- animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
36336
- will-change: transform, opacity;
36337
- }
36338
-
36339
- .TooltipContent[data-state='delayed-open'][data-side='top'] {
36340
- animation-name: slideDownAndFade;
36341
- }
36342
- .TooltipContent[data-state='delayed-open'][data-side='right'] {
36343
- animation-name: slideLeftAndFade;
36344
- }
36345
- .TooltipContent[data-state='delayed-open'][data-side='bottom'] {
36346
- animation-name: slideUpAndFade;
36347
- }
36348
- .TooltipContent[data-state='delayed-open'][data-side='left'] {
36349
- animation-name: slideRightAndFade;
36350
- }
36351
-
36352
-
36353
- @keyframes slideUpAndFade {
36354
- from {
36355
- opacity: 0;
36356
- transform: translateY(4px);
36357
- }
36358
- to {
36359
- opacity: 1;
36360
- transform: translateY(0);
36361
- }
36362
- }
36363
-
36364
- @keyframes slideRightAndFade {
36365
- from {
36366
- opacity: 0;
36367
- transform: translateX(-4px);
36368
- }
36369
- to {
36370
- opacity: 1;
36371
- transform: translateX(0);
36372
- }
36373
- }
36374
-
36375
- @keyframes slideDownAndFade {
36376
- from {
36377
- opacity: 0;
36378
- transform: translateY(-4px);
36379
- }
36380
- to {
36381
- opacity: 1;
36382
- transform: translateY(0);
36383
- }
36384
- }
36385
-
36386
- @keyframes slideLeftAndFade {
36387
- from {
36388
- opacity: 0;
36389
- transform: translateX(4px);
36390
- }
36391
- to {
36392
- opacity: 1;
36393
- transform: translateX(0);
36394
- }
36395
- }`;
36396
- function Tabs(t0) {
36397
- const $ = reactCompilerRuntime.c(10);
36398
- const {
36399
- value,
36400
- onValueChange,
36401
- className,
36402
- innerClassName,
36403
- children
36404
- } = t0;
36405
- let t1;
36406
- if ($[0] !== innerClassName) {
36407
- t1 = cls("w-max", "flex text-sm font-medium text-center text-surface-accent-800 dark:text-white max-w-full overflow-auto no-scrollbar items-end", innerClassName);
36408
- $[0] = innerClassName;
36409
- $[1] = t1;
38008
+ let t15;
38009
+ if ($[21] !== isScrollable || $[22] !== mode || $[23] !== showRightScroll) {
38010
+ t15 = isScrollable && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", disabled: !showRightScroll, onClick: () => scroll("right"), className: cls("flex-shrink-0 z-10 flex items-center justify-center rounded-md px-0.5 py-1.5 transition-all h-10 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", "disabled:pointer-events-none disabled:opacity-0", "text-surface-600 dark:text-surface-400 hover:bg-surface-200 dark:hover:bg-surface-800", mode === "primary" && "ml-1 bg-surface-50 dark:bg-surface-900 border", mode === "primary" && defaultBorderMixin, mode === "secondary" && "ml-1"), children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, { size: "small" }) });
38011
+ $[21] = isScrollable;
38012
+ $[22] = mode;
38013
+ $[23] = showRightScroll;
38014
+ $[24] = t15;
36410
38015
  } else {
36411
- t1 = $[1];
38016
+ t15 = $[24];
36412
38017
  }
36413
- let t2;
36414
- if ($[2] !== children || $[3] !== t1) {
36415
- t2 = /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.List, { className: t1, children });
36416
- $[2] = children;
36417
- $[3] = t1;
36418
- $[4] = t2;
38018
+ let t16;
38019
+ if ($[25] !== onValueChange || $[26] !== t14 || $[27] !== t15 || $[28] !== t6 || $[29] !== t7 || $[30] !== value) {
38020
+ t16 = /* @__PURE__ */ jsxRuntime.jsxs(TabsPrimitive__namespace.Root, { value, onValueChange, className: t6, children: [
38021
+ t7,
38022
+ t14,
38023
+ t15
38024
+ ] });
38025
+ $[25] = onValueChange;
38026
+ $[26] = t14;
38027
+ $[27] = t15;
38028
+ $[28] = t6;
38029
+ $[29] = t7;
38030
+ $[30] = value;
38031
+ $[31] = t16;
36419
38032
  } else {
36420
- t2 = $[4];
38033
+ t16 = $[31];
36421
38034
  }
36422
- let t3;
36423
- if ($[5] !== className || $[6] !== onValueChange || $[7] !== t2 || $[8] !== value) {
36424
- t3 = /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { value, onValueChange, className, children: t2 });
36425
- $[5] = className;
36426
- $[6] = onValueChange;
36427
- $[7] = t2;
36428
- $[8] = value;
36429
- $[9] = t3;
38035
+ let t17;
38036
+ if ($[32] !== mode || $[33] !== t16) {
38037
+ t17 = /* @__PURE__ */ jsxRuntime.jsx(TabsModeContext.Provider, { value: mode, children: t16 });
38038
+ $[32] = mode;
38039
+ $[33] = t16;
38040
+ $[34] = t17;
36430
38041
  } else {
36431
- t3 = $[9];
38042
+ t17 = $[34];
36432
38043
  }
36433
- return t3;
38044
+ return t17;
36434
38045
  }
36435
38046
  function Tab(t0) {
36436
- const $ = reactCompilerRuntime.c(13);
38047
+ const $ = reactCompilerRuntime.c(15);
36437
38048
  const {
36438
38049
  value,
36439
38050
  className,
@@ -36441,42 +38052,44 @@
36441
38052
  children,
36442
38053
  disabled
36443
38054
  } = t0;
38055
+ const mode = React.useContext(TabsModeContext);
38056
+ let T0;
36444
38057
  let t1;
36445
- if ($[0] !== className || $[1] !== disabled) {
36446
- t1 = cls("border-b-2 border-transparent", "data-[state=active]:border-secondary", disabled ? "text-surface-accent-400 dark:text-surface-accent-500" : cls("text-surface-accent-700 dark:text-surface-accent-300", "data-[state=active]:text-surface-accent-900 data-[state=active]:dark:text-white", "hover:text-surface-accent-800 dark:hover:text-surface-accent-200"), className);
36447
- $[0] = className;
36448
- $[1] = disabled;
36449
- $[2] = t1;
36450
- } else {
36451
- t1 = $[2];
36452
- }
36453
38058
  let t2;
36454
- if ($[3] !== innerClassName) {
36455
- t2 = cls("line-clamp-1", "uppercase inline-block p-2 px-4 rounded", "hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800", innerClassName);
36456
- $[3] = innerClassName;
36457
- $[4] = t2;
36458
- } else {
36459
- t2 = $[4];
36460
- }
36461
38059
  let t3;
36462
- if ($[5] !== children || $[6] !== t2) {
36463
- t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t2, children });
36464
- $[5] = children;
36465
- $[6] = t2;
36466
- $[7] = t3;
38060
+ if ($[0] !== className || $[1] !== disabled || $[2] !== innerClassName || $[3] !== mode || $[4] !== value) {
38061
+ const primaryClasses = cls("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400 focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", "data-[state=active]:bg-white data-[state=active]:text-surface-900 dark:data-[state=active]:bg-surface-950 dark:data-[state=active]:text-surface-50");
38062
+ const secondaryClasses = cls("inline-flex items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all", "border-b-2 border-transparent -mb-px", "focus-visible:outline-none", "disabled:pointer-events-none disabled:opacity-50", "hover:text-surface-700 dark:hover:text-surface-300", "data-[state=active]:border-b-primary data-[state=active]:text-primary dark:data-[state=active]:border-b-primary dark:data-[state=active]:text-primary-dark");
38063
+ T0 = TabsPrimitive__namespace.Trigger;
38064
+ t1 = value;
38065
+ t2 = disabled;
38066
+ t3 = cls(mode === "secondary" ? secondaryClasses : primaryClasses, className, innerClassName);
38067
+ $[0] = className;
38068
+ $[1] = disabled;
38069
+ $[2] = innerClassName;
38070
+ $[3] = mode;
38071
+ $[4] = value;
38072
+ $[5] = T0;
38073
+ $[6] = t1;
38074
+ $[7] = t2;
38075
+ $[8] = t3;
36467
38076
  } else {
36468
- t3 = $[7];
38077
+ T0 = $[5];
38078
+ t1 = $[6];
38079
+ t2 = $[7];
38080
+ t3 = $[8];
36469
38081
  }
36470
38082
  let t4;
36471
- if ($[8] !== disabled || $[9] !== t1 || $[10] !== t3 || $[11] !== value) {
36472
- t4 = /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Trigger, { value, disabled, className: t1, children: t3 });
36473
- $[8] = disabled;
36474
- $[9] = t1;
36475
- $[10] = t3;
36476
- $[11] = value;
36477
- $[12] = t4;
38083
+ if ($[9] !== T0 || $[10] !== children || $[11] !== t1 || $[12] !== t2 || $[13] !== t3) {
38084
+ t4 = /* @__PURE__ */ jsxRuntime.jsx(T0, { value: t1, disabled: t2, className: t3, children });
38085
+ $[9] = T0;
38086
+ $[10] = children;
38087
+ $[11] = t1;
38088
+ $[12] = t2;
38089
+ $[13] = t3;
38090
+ $[14] = t4;
36478
38091
  } else {
36479
- t4 = $[12];
38092
+ t4 = $[14];
36480
38093
  }
36481
38094
  return t4;
36482
38095
  }
@@ -36547,7 +38160,7 @@
36547
38160
  }
36548
38161
  let t1;
36549
38162
  if ($[4] !== className) {
36550
- t1 = cls("bg-white dark:bg-surface-950 text-sm divide-y divide-surface-100 dark:divide-surface-700 dark:divide-opacity-70", className);
38163
+ t1 = cls("bg-white dark:bg-surface-950 text-sm divide-y divide-surface-100 dark:divide-surface-700 dark:divide-opacity-70 dark:divide-surface-700/70", className);
36551
38164
  $[4] = className;
36552
38165
  $[5] = t1;
36553
38166
  } else {
@@ -36722,6 +38335,8 @@
36722
38335
  const enabled = t2 === void 0 ? true : t2;
36723
38336
  const modal = t3 === void 0 ? false : t3;
36724
38337
  useInjectStyles("Popover", popoverStyles);
38338
+ const contextContainer = usePortalContainer();
38339
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
36725
38340
  if (!enabled) {
36726
38341
  let t42;
36727
38342
  if ($[0] !== trigger) {
@@ -36777,9 +38392,9 @@
36777
38392
  t7 = $[17];
36778
38393
  }
36779
38394
  let t8;
36780
- if ($[18] !== portalContainer || $[19] !== t7) {
36781
- t8 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container: portalContainer, children: t7 });
36782
- $[18] = portalContainer;
38395
+ if ($[18] !== finalContainer || $[19] !== t7) {
38396
+ t8 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container: finalContainer, children: t7 });
38397
+ $[18] = finalContainer;
36783
38398
  $[19] = t7;
36784
38399
  $[20] = t8;
36785
38400
  } else {
@@ -36803,7 +38418,7 @@
36803
38418
  return t9;
36804
38419
  }
36805
38420
  const popoverStyles = `
36806
-
38421
+ /* ... (styles remain unchanged) ... */
36807
38422
  .PopoverContent {
36808
38423
  animation-duration: 400ms;
36809
38424
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
@@ -36822,7 +38437,6 @@
36822
38437
  animation-name: slideRightAndFade;
36823
38438
  }
36824
38439
 
36825
-
36826
38440
  @keyframes slideUpAndFade {
36827
38441
  from {
36828
38442
  opacity: 0;
@@ -36920,7 +38534,7 @@
36920
38534
  Badge.displayName = "Badge";
36921
38535
  function DebouncedTextField(props) {
36922
38536
  const $ = reactCompilerRuntime.c(13);
36923
- const previousEventRef = React.useRef();
38537
+ const previousEventRef = React.useRef(void 0);
36924
38538
  const [internalValue, setInternalValue] = React.useState(props.value);
36925
38539
  const deferredValue = React.useDeferredValue(internalValue);
36926
38540
  let t0;
@@ -36988,14 +38602,14 @@
36988
38602
  return t5;
36989
38603
  }
36990
38604
  function Skeleton(t0) {
36991
- const $ = reactCompilerRuntime.c(8);
38605
+ const $ = reactCompilerRuntime.c(10);
36992
38606
  const {
36993
38607
  width,
36994
38608
  height,
36995
38609
  className
36996
38610
  } = t0;
36997
- const t1 = width ? `${width}px` : "100%";
36998
- const t2 = height ? `${height}px` : "12px";
38611
+ const t1 = width !== void 0 ? `${width}px` : void 0;
38612
+ const t2 = height !== void 0 ? `${height}px` : void 0;
36999
38613
  let t3;
37000
38614
  if ($[0] !== t1 || $[1] !== t2) {
37001
38615
  t3 = {
@@ -37008,24 +38622,82 @@
37008
38622
  } else {
37009
38623
  t3 = $[2];
37010
38624
  }
37011
- let t4;
37012
- if ($[3] !== className) {
37013
- t4 = cls("block", "bg-surface-accent-200 dark:bg-surface-accent-800 rounded-md", "animate-pulse", "max-w-full max-h-full", className);
38625
+ const t4 = width === void 0 ? "w-full" : "";
38626
+ const t5 = height === void 0 ? "h-3" : "";
38627
+ let t6;
38628
+ if ($[3] !== className || $[4] !== t4 || $[5] !== t5) {
38629
+ t6 = cls("block", "bg-surface-accent-200 dark:bg-surface-accent-800 rounded-md", "animate-pulse", "max-w-full max-h-full", t4, t5, className);
37014
38630
  $[3] = className;
37015
38631
  $[4] = t4;
38632
+ $[5] = t5;
38633
+ $[6] = t6;
37016
38634
  } else {
37017
- t4 = $[4];
38635
+ t6 = $[6];
37018
38636
  }
37019
- let t5;
37020
- if ($[5] !== t3 || $[6] !== t4) {
37021
- t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { style: t3, className: t4 });
37022
- $[5] = t3;
37023
- $[6] = t4;
37024
- $[7] = t5;
38637
+ let t7;
38638
+ if ($[7] !== t3 || $[8] !== t6) {
38639
+ t7 = /* @__PURE__ */ jsxRuntime.jsx("span", { style: t3, className: t6 });
38640
+ $[7] = t3;
38641
+ $[8] = t6;
38642
+ $[9] = t7;
37025
38643
  } else {
37026
- t5 = $[7];
38644
+ t7 = $[9];
37027
38645
  }
37028
- return t5;
38646
+ return t7;
38647
+ }
38648
+ function ToggleButtonGroup(t0) {
38649
+ const $ = reactCompilerRuntime.c(12);
38650
+ const {
38651
+ value,
38652
+ onValueChange,
38653
+ options,
38654
+ className
38655
+ } = t0;
38656
+ let t1;
38657
+ if ($[0] !== className) {
38658
+ t1 = cls("inline-flex flex-row bg-surface-100 dark:bg-surface-800 rounded-lg p-1 gap-1", className);
38659
+ $[0] = className;
38660
+ $[1] = t1;
38661
+ } else {
38662
+ t1 = $[1];
38663
+ }
38664
+ let t2;
38665
+ if ($[2] !== onValueChange || $[3] !== options || $[4] !== value) {
38666
+ let t32;
38667
+ if ($[6] !== onValueChange || $[7] !== value) {
38668
+ t32 = (option) => /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: (e) => {
38669
+ e.stopPropagation();
38670
+ if (!option.disabled) {
38671
+ onValueChange(option.value);
38672
+ }
38673
+ }, disabled: option.disabled, className: cls("flex flex-row items-center justify-center gap-2 py-3 px-4 rounded-md transition-colors", value === option.value ? "bg-white dark:bg-surface-950 text-primary dark:text-primary-300" : "text-surface-500 dark:text-surface-400 hover:bg-surface-100 dark:hover:bg-surface-700", option.disabled && "opacity-50 cursor-not-allowed"), children: [
38674
+ option.icon,
38675
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: option.label })
38676
+ ] }, option.value);
38677
+ $[6] = onValueChange;
38678
+ $[7] = value;
38679
+ $[8] = t32;
38680
+ } else {
38681
+ t32 = $[8];
38682
+ }
38683
+ t2 = options.map(t32);
38684
+ $[2] = onValueChange;
38685
+ $[3] = options;
38686
+ $[4] = value;
38687
+ $[5] = t2;
38688
+ } else {
38689
+ t2 = $[5];
38690
+ }
38691
+ let t3;
38692
+ if ($[9] !== t1 || $[10] !== t2) {
38693
+ t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t1, children: t2 });
38694
+ $[9] = t1;
38695
+ $[10] = t2;
38696
+ $[11] = t3;
38697
+ } else {
38698
+ t3 = $[11];
38699
+ }
38700
+ return t3;
37029
38701
  }
37030
38702
  exports2.AbcIcon = AbcIcon;
37031
38703
  exports2.AcUnitIcon = AcUnitIcon;
@@ -37414,6 +39086,7 @@
37414
39086
  exports2.CollectionsBookmarkIcon = CollectionsBookmarkIcon;
37415
39087
  exports2.CollectionsIcon = CollectionsIcon;
37416
39088
  exports2.ColorLensIcon = ColorLensIcon;
39089
+ exports2.ColorPicker = ColorPicker;
37417
39090
  exports2.ColorizeIcon = ColorizeIcon;
37418
39091
  exports2.CommentBankIcon = CommentBankIcon;
37419
39092
  exports2.CommentIcon = CommentIcon;
@@ -37503,6 +39176,7 @@
37503
39176
  exports2.DataSaverOnIcon = DataSaverOnIcon;
37504
39177
  exports2.DataThresholdingIcon = DataThresholdingIcon;
37505
39178
  exports2.DataUsageIcon = DataUsageIcon;
39179
+ exports2.DatabaseIcon = DatabaseIcon;
37506
39180
  exports2.DatasetIcon = DatasetIcon;
37507
39181
  exports2.DatasetLinkedIcon = DatasetLinkedIcon;
37508
39182
  exports2.DateRangeIcon = DateRangeIcon;
@@ -37775,6 +39449,7 @@
37775
39449
  exports2.FireHydrantAltIcon = FireHydrantAltIcon;
37776
39450
  exports2.FireTruckIcon = FireTruckIcon;
37777
39451
  exports2.FireplaceIcon = FireplaceIcon;
39452
+ exports2.FirestoreIcon = FirestoreIcon;
37778
39453
  exports2.FirstPageIcon = FirstPageIcon;
37779
39454
  exports2.FitScreenIcon = FitScreenIcon;
37780
39455
  exports2.FitbitIcon = FitbitIcon;
@@ -38530,6 +40205,7 @@
38530
40205
  exports2.PoolIcon = PoolIcon;
38531
40206
  exports2.Popover = Popover;
38532
40207
  exports2.PortableWifiOffIcon = PortableWifiOffIcon;
40208
+ exports2.PortalContainerProvider = PortalContainerProvider;
38533
40209
  exports2.PortraitIcon = PortraitIcon;
38534
40210
  exports2.PostAddIcon = PostAddIcon;
38535
40211
  exports2.PowerIcon = PowerIcon;
@@ -38633,6 +40309,7 @@
38633
40309
  exports2.RequestPageIcon = RequestPageIcon;
38634
40310
  exports2.RequestQuoteIcon = RequestQuoteIcon;
38635
40311
  exports2.ResetTvIcon = ResetTvIcon;
40312
+ exports2.ResizablePanels = ResizablePanels;
38636
40313
  exports2.RestartAltIcon = RestartAltIcon;
38637
40314
  exports2.RestaurantIcon = RestaurantIcon;
38638
40315
  exports2.RestaurantMenuIcon = RestaurantMenuIcon;
@@ -38707,6 +40384,8 @@
38707
40384
  exports2.SearchBar = SearchBar;
38708
40385
  exports2.SearchIcon = SearchIcon;
38709
40386
  exports2.SearchOffIcon = SearchOffIcon;
40387
+ exports2.SearchableSelect = SearchableSelect;
40388
+ exports2.SearchableSelectItem = SearchableSelectItem;
38710
40389
  exports2.SecurityIcon = SecurityIcon;
38711
40390
  exports2.SecurityUpdateGoodIcon = SecurityUpdateGoodIcon;
38712
40391
  exports2.SecurityUpdateIcon = SecurityUpdateIcon;
@@ -39036,6 +40715,7 @@
39036
40715
  exports2.TitleIcon = TitleIcon;
39037
40716
  exports2.TocIcon = TocIcon;
39038
40717
  exports2.TodayIcon = TodayIcon;
40718
+ exports2.ToggleButtonGroup = ToggleButtonGroup;
39039
40719
  exports2.ToggleOffIcon = ToggleOffIcon;
39040
40720
  exports2.ToggleOnIcon = ToggleOnIcon;
39041
40721
  exports2.TokenIcon = TokenIcon;
@@ -39326,6 +41006,7 @@
39326
41006
  exports2.useIconStyles = useIconStyles;
39327
41007
  exports2.useInjectStyles = useInjectStyles;
39328
41008
  exports2.useOutsideAlerter = useOutsideAlerter;
41009
+ exports2.usePortalContainer = usePortalContainer;
39329
41010
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
39330
41011
  }));
39331
41012
  //# sourceMappingURL=index.umd.js.map