@firecms/ui 3.0.1 → 3.1.0-canary.24c8270

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 (59) hide show
  1. package/README.md +9 -7
  2. package/dist/components/Card.d.ts +1 -1
  3. package/dist/components/ColorPicker.d.ts +30 -0
  4. package/dist/components/DateTimeField.d.ts +7 -0
  5. package/dist/components/Dialog.d.ts +2 -1
  6. package/dist/components/FileUpload.d.ts +1 -1
  7. package/dist/components/Menu.d.ts +2 -1
  8. package/dist/components/Menubar.d.ts +2 -1
  9. package/dist/components/MultiSelect.d.ts +2 -1
  10. package/dist/components/SearchBar.d.ts +11 -1
  11. package/dist/components/Select.d.ts +2 -1
  12. package/dist/components/Sheet.d.ts +1 -0
  13. package/dist/components/ToggleButtonGroup.d.ts +30 -0
  14. package/dist/components/index.d.ts +2 -0
  15. package/dist/hooks/PortalContainerContext.d.ts +31 -0
  16. package/dist/hooks/index.d.ts +1 -0
  17. package/dist/hooks/useOutsideAlerter.d.ts +1 -1
  18. package/dist/index.css +57 -6
  19. package/dist/index.es.js +1731 -949
  20. package/dist/index.es.js.map +1 -1
  21. package/dist/index.umd.js +1731 -949
  22. package/dist/index.umd.js.map +1 -1
  23. package/dist/styles.d.ts +11 -11
  24. package/package.json +7 -7
  25. package/src/components/BooleanSwitch.tsx +3 -3
  26. package/src/components/Button.tsx +5 -5
  27. package/src/components/Card.tsx +7 -7
  28. package/src/components/Checkbox.tsx +1 -1
  29. package/src/components/ColorPicker.tsx +134 -0
  30. package/src/components/DateTimeField.tsx +123 -34
  31. package/src/components/DebouncedTextField.tsx +3 -3
  32. package/src/components/Dialog.tsx +25 -16
  33. package/src/components/DialogActions.tsx +1 -1
  34. package/src/components/ExpandablePanel.tsx +1 -1
  35. package/src/components/FileUpload.tsx +25 -24
  36. package/src/components/IconButton.tsx +3 -2
  37. package/src/components/Menu.tsx +44 -30
  38. package/src/components/Menubar.tsx +14 -3
  39. package/src/components/MultiSelect.tsx +91 -74
  40. package/src/components/Popover.tsx +11 -3
  41. package/src/components/SearchBar.tsx +37 -19
  42. package/src/components/Select.tsx +86 -73
  43. package/src/components/Separator.tsx +2 -2
  44. package/src/components/Sheet.tsx +12 -3
  45. package/src/components/Slider.tsx +4 -4
  46. package/src/components/Table.tsx +1 -1
  47. package/src/components/Tabs.tsx +121 -36
  48. package/src/components/TextField.tsx +19 -8
  49. package/src/components/ToggleButtonGroup.tsx +67 -0
  50. package/src/components/Tooltip.tsx +9 -2
  51. package/src/components/index.tsx +2 -0
  52. package/src/hooks/PortalContainerContext.tsx +48 -0
  53. package/src/hooks/index.ts +1 -0
  54. package/src/hooks/useInjectStyles.tsx +12 -3
  55. package/src/hooks/useOutsideAlerter.tsx +1 -1
  56. package/src/index.css +57 -6
  57. package/src/styles.ts +11 -11
  58. package/src/util/cls.ts +1 -1
  59. 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("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-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", "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.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.ReactDOM, 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, ReactDOM, 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,20 @@
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
36
  const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
37
37
  const TabsPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TabsPrimitive);
38
38
  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";
39
+ 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";
40
+ const focusedClasses = "z-30 outline-hidden outline-none ring-2 ring-primary ring-opacity-75 ring-primary/75 ring-offset-2 ring-offset-transparent ";
41
+ 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";
42
+ 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";
43
+ const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-opacity-90 bg-surface-accent-200/50 dark:bg-surface-800/90";
44
+ 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";
45
+ 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 ";
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 border-surface-200/40 dark:border-surface-700/40";
47
+ const cardMixin = "bg-white dark:bg-surface-950 rounded-md border border-surface-200/40 dark:border-surface-700/40 m-1 -p-1";
48
+ 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 ";
49
+ 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
50
  function cls(...classes) {
51
51
  return tailwindMerge.twMerge(clsx.clsx(classes));
52
52
  }
@@ -257,31 +257,69 @@
257
257
  }).join("") + "Icon";
258
258
  return componentName;
259
259
  }
260
+ const PortalContainerContext = React.createContext(void 0);
261
+ function PortalContainerProvider(t0) {
262
+ const $ = reactCompilerRuntime.c(5);
263
+ const {
264
+ container,
265
+ children
266
+ } = t0;
267
+ let t1;
268
+ if ($[0] !== container) {
269
+ t1 = {
270
+ container
271
+ };
272
+ $[0] = container;
273
+ $[1] = t1;
274
+ } else {
275
+ t1 = $[1];
276
+ }
277
+ let t2;
278
+ if ($[2] !== children || $[3] !== t1) {
279
+ t2 = /* @__PURE__ */ jsxRuntime.jsx(PortalContainerContext.Provider, { value: t1, children });
280
+ $[2] = children;
281
+ $[3] = t1;
282
+ $[4] = t2;
283
+ } else {
284
+ t2 = $[4];
285
+ }
286
+ return t2;
287
+ }
288
+ function usePortalContainer() {
289
+ const context = React.useContext(PortalContainerContext);
290
+ return context?.container ?? null;
291
+ }
260
292
  function useInjectStyles(key, styles2) {
261
- const $ = reactCompilerRuntime.c(4);
293
+ const $ = reactCompilerRuntime.c(5);
294
+ const portalContainer = usePortalContainer();
262
295
  let t0;
263
- if ($[0] !== key || $[1] !== styles2) {
296
+ if ($[0] !== key || $[1] !== portalContainer || $[2] !== styles2) {
264
297
  t0 = () => {
265
- const styleElement = document.getElementById(key);
266
- if (!styleElement) {
298
+ if (typeof document === "undefined") {
299
+ return;
300
+ }
301
+ const targetContainer = portalContainer ?? document.head;
302
+ const existingStyle = targetContainer.querySelector?.(`#${key}`);
303
+ if (!existingStyle) {
267
304
  const style = document.createElement("style");
268
305
  style.id = key;
269
306
  style.innerHTML = styles2;
270
- document.head.appendChild(style);
307
+ (targetContainer || document.head).appendChild(style);
271
308
  }
272
309
  };
273
310
  $[0] = key;
274
- $[1] = styles2;
275
- $[2] = t0;
311
+ $[1] = portalContainer;
312
+ $[2] = styles2;
313
+ $[3] = t0;
276
314
  } else {
277
- t0 = $[2];
315
+ t0 = $[3];
278
316
  }
279
317
  let t1;
280
- if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
318
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
281
319
  t1 = [];
282
- $[3] = t1;
320
+ $[4] = t1;
283
321
  } else {
284
- t1 = $[3];
322
+ t1 = $[4];
285
323
  }
286
324
  React.useEffect(t0, t1);
287
325
  }
@@ -752,7 +790,7 @@
752
790
  } else {
753
791
  onValueChange?.(!value);
754
792
  }
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: [
793
+ }, 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
794
  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
795
  "w-[21px] h-[10px]": size === "medium" || size === "large",
758
796
  "w-[19px] h-[8px]": size === "small",
@@ -901,12 +939,12 @@
901
939
  "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
940
  "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
941
  "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,
942
+ "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,
943
+ "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,
944
+ "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
945
  "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
946
  "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,
947
+ "border border-primary text-primary hover:text-primary hover:bg-primary-bg hover:bg-primary/10": t18,
910
948
  "border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": t19,
911
949
  "border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": t20,
912
950
  "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 +952,7 @@
914
952
  "text-text-disabled dark:text-text-disabled-dark": disabled,
915
953
  "border border-transparent opacity-50": t23,
916
954
  "border border-surface-500 opacity-50": t24,
917
- "border border-transparent bg-surface-300 dark:bg-surface-500 opacity-40": t25
955
+ "border border-transparent bg-surface-300 dark:bg-surface-500 opacity-40 bg-surface-300/40 dark:bg-surface-500/40": t25
918
956
  });
919
957
  const sizeClasses2 = cls({
920
958
  "py-1 px-2": size === "small",
@@ -32182,7 +32220,7 @@
32182
32220
  const t6 = disabled ? void 0 : onCheckedChange;
32183
32221
  const t7 = padding ? paddingClasses[size] : "";
32184
32222
  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" : "";
32223
+ 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
32224
  const t10 = onCheckedChange ? "cursor-pointer" : "cursor-default";
32187
32225
  let t11;
32188
32226
  if ($[0] !== t10 || $[1] !== t7 || $[2] !== t8 || $[3] !== t9) {
@@ -32328,7 +32366,258 @@
32328
32366
  }
32329
32367
  return t11;
32330
32368
  }
32331
- const buttonClasses = "hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800 hover:scale-105 transition-transform";
32369
+ const Tooltip = (t0) => {
32370
+ const $ = reactCompilerRuntime.c(28);
32371
+ const {
32372
+ open,
32373
+ defaultOpen,
32374
+ side: t1,
32375
+ delayDuration: t2,
32376
+ sideOffset,
32377
+ align,
32378
+ onOpenChange,
32379
+ title,
32380
+ tooltipClassName,
32381
+ tooltipStyle,
32382
+ children,
32383
+ asChild: t3,
32384
+ container,
32385
+ className,
32386
+ style
32387
+ } = t0;
32388
+ const side = t1 === void 0 ? "bottom" : t1;
32389
+ const delayDuration = t2 === void 0 ? 200 : t2;
32390
+ const asChild = t3 === void 0 ? false : t3;
32391
+ useInjectStyles("Tooltip", styles$1);
32392
+ const contextContainer = usePortalContainer();
32393
+ const finalContainer = container ?? contextContainer ?? void 0;
32394
+ if (!title) {
32395
+ let t42;
32396
+ if ($[0] !== children) {
32397
+ t42 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
32398
+ $[0] = children;
32399
+ $[1] = t42;
32400
+ } else {
32401
+ t42 = $[1];
32402
+ }
32403
+ return t42;
32404
+ }
32405
+ let t4;
32406
+ if ($[2] !== asChild || $[3] !== children || $[4] !== className || $[5] !== style) {
32407
+ 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 }) });
32408
+ $[2] = asChild;
32409
+ $[3] = children;
32410
+ $[4] = className;
32411
+ $[5] = style;
32412
+ $[6] = t4;
32413
+ } else {
32414
+ t4 = $[6];
32415
+ }
32416
+ const trigger = t4;
32417
+ let t5;
32418
+ if ($[7] !== tooltipClassName) {
32419
+ 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);
32420
+ $[7] = tooltipClassName;
32421
+ $[8] = t5;
32422
+ } else {
32423
+ t5 = $[8];
32424
+ }
32425
+ const t6 = sideOffset === void 0 ? 4 : sideOffset;
32426
+ let t7;
32427
+ if ($[9] !== align || $[10] !== side || $[11] !== t5 || $[12] !== t6 || $[13] !== title || $[14] !== tooltipStyle) {
32428
+ t7 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Content, { className: t5, style: tooltipStyle, sideOffset: t6, align, side, children: title });
32429
+ $[9] = align;
32430
+ $[10] = side;
32431
+ $[11] = t5;
32432
+ $[12] = t6;
32433
+ $[13] = title;
32434
+ $[14] = tooltipStyle;
32435
+ $[15] = t7;
32436
+ } else {
32437
+ t7 = $[15];
32438
+ }
32439
+ let t8;
32440
+ if ($[16] !== finalContainer || $[17] !== t7) {
32441
+ t8 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { container: finalContainer, children: t7 });
32442
+ $[16] = finalContainer;
32443
+ $[17] = t7;
32444
+ $[18] = t8;
32445
+ } else {
32446
+ t8 = $[18];
32447
+ }
32448
+ let t9;
32449
+ if ($[19] !== defaultOpen || $[20] !== onOpenChange || $[21] !== open || $[22] !== t8 || $[23] !== trigger) {
32450
+ t9 = /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { open, onOpenChange, defaultOpen, children: [
32451
+ trigger,
32452
+ t8
32453
+ ] });
32454
+ $[19] = defaultOpen;
32455
+ $[20] = onOpenChange;
32456
+ $[21] = open;
32457
+ $[22] = t8;
32458
+ $[23] = trigger;
32459
+ $[24] = t9;
32460
+ } else {
32461
+ t9 = $[24];
32462
+ }
32463
+ let t10;
32464
+ if ($[25] !== delayDuration || $[26] !== t9) {
32465
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { delayDuration, children: t9 });
32466
+ $[25] = delayDuration;
32467
+ $[26] = t9;
32468
+ $[27] = t10;
32469
+ } else {
32470
+ t10 = $[27];
32471
+ }
32472
+ return t10;
32473
+ };
32474
+ const styles$1 = `
32475
+
32476
+ .TooltipContent {
32477
+ animation-duration: 220ms;
32478
+ animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
32479
+ will-change: transform, opacity;
32480
+ }
32481
+
32482
+ .TooltipContent[data-state='delayed-open'][data-side='top'] {
32483
+ animation-name: slideDownAndFade;
32484
+ }
32485
+ .TooltipContent[data-state='delayed-open'][data-side='right'] {
32486
+ animation-name: slideLeftAndFade;
32487
+ }
32488
+ .TooltipContent[data-state='delayed-open'][data-side='bottom'] {
32489
+ animation-name: slideUpAndFade;
32490
+ }
32491
+ .TooltipContent[data-state='delayed-open'][data-side='left'] {
32492
+ animation-name: slideRightAndFade;
32493
+ }
32494
+
32495
+
32496
+ @keyframes slideUpAndFade {
32497
+ from {
32498
+ opacity: 0;
32499
+ transform: translateY(4px);
32500
+ }
32501
+ to {
32502
+ opacity: 1;
32503
+ transform: translateY(0);
32504
+ }
32505
+ }
32506
+
32507
+ @keyframes slideRightAndFade {
32508
+ from {
32509
+ opacity: 0;
32510
+ transform: translateX(-4px);
32511
+ }
32512
+ to {
32513
+ opacity: 1;
32514
+ transform: translateX(0);
32515
+ }
32516
+ }
32517
+
32518
+ @keyframes slideDownAndFade {
32519
+ from {
32520
+ opacity: 0;
32521
+ transform: translateY(-4px);
32522
+ }
32523
+ to {
32524
+ opacity: 1;
32525
+ transform: translateY(0);
32526
+ }
32527
+ }
32528
+
32529
+ @keyframes slideLeftAndFade {
32530
+ from {
32531
+ opacity: 0;
32532
+ transform: translateX(4px);
32533
+ }
32534
+ to {
32535
+ opacity: 1;
32536
+ transform: translateX(0);
32537
+ }
32538
+ }`;
32539
+ const BASE_COLORS = ["blue", "cyan", "teal", "green", "yellow", "orange", "red", "pink", "purple", "gray"];
32540
+ const VARIANTS = ["Darker", "Dark", "Light", "Lighter"];
32541
+ function getColorDisplayName(colorKey) {
32542
+ const base = colorKey.replace(/(Lighter|Light|Dark|Darker)$/, "");
32543
+ const variant = colorKey.replace(base, "");
32544
+ return `${base.charAt(0).toUpperCase()}${base.slice(1)} ${variant}`;
32545
+ }
32546
+ function ColorPicker(t0) {
32547
+ const $ = reactCompilerRuntime.c(18);
32548
+ const {
32549
+ value,
32550
+ onChange,
32551
+ size: t1,
32552
+ allowClear: t2,
32553
+ disabled: t3
32554
+ } = t0;
32555
+ const size = t1 === void 0 ? "medium" : t1;
32556
+ const allowClear = t2 === void 0 ? true : t2;
32557
+ const disabled = t3 === void 0 ? false : t3;
32558
+ const swatchSize = size === "small" ? "w-5 h-5" : "w-6 h-6";
32559
+ const checkSize = size === "small" ? 12 : 14;
32560
+ let t4;
32561
+ if ($[0] !== allowClear || $[1] !== checkSize || $[2] !== disabled || $[3] !== onChange || $[4] !== swatchSize || $[5] !== value) {
32562
+ 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: [
32563
+ /* @__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 }) }),
32564
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-surface-accent-700 dark:text-surface-accent-300", children: "Auto (based on ID)" })
32565
+ ] });
32566
+ $[0] = allowClear;
32567
+ $[1] = checkSize;
32568
+ $[2] = disabled;
32569
+ $[3] = onChange;
32570
+ $[4] = swatchSize;
32571
+ $[5] = value;
32572
+ $[6] = t4;
32573
+ } else {
32574
+ t4 = $[6];
32575
+ }
32576
+ let t5;
32577
+ if ($[7] !== checkSize || $[8] !== disabled || $[9] !== onChange || $[10] !== swatchSize || $[11] !== value) {
32578
+ t5 = VARIANTS.map((variant) => BASE_COLORS.map((base) => {
32579
+ const colorKey = `${base}${variant}`;
32580
+ const colorScheme = CHIP_COLORS[colorKey];
32581
+ const isSelected = value === colorKey;
32582
+ const displayName = getColorDisplayName(colorKey);
32583
+ 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: {
32584
+ backgroundColor: colorScheme.color
32585
+ }, "aria-label": displayName, "aria-pressed": isSelected, children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size: checkSize, style: {
32586
+ color: colorScheme.text
32587
+ } }) }) }, colorKey);
32588
+ }));
32589
+ $[7] = checkSize;
32590
+ $[8] = disabled;
32591
+ $[9] = onChange;
32592
+ $[10] = swatchSize;
32593
+ $[11] = value;
32594
+ $[12] = t5;
32595
+ } else {
32596
+ t5 = $[12];
32597
+ }
32598
+ let t6;
32599
+ if ($[13] !== t5) {
32600
+ t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-10 gap-1", children: t5 });
32601
+ $[13] = t5;
32602
+ $[14] = t6;
32603
+ } else {
32604
+ t6 = $[14];
32605
+ }
32606
+ let t7;
32607
+ if ($[15] !== t4 || $[16] !== t6) {
32608
+ t7 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
32609
+ t4,
32610
+ t6
32611
+ ] });
32612
+ $[15] = t4;
32613
+ $[16] = t6;
32614
+ $[17] = t7;
32615
+ } else {
32616
+ t7 = $[17];
32617
+ }
32618
+ return t7;
32619
+ }
32620
+ 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
32621
  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
32622
  const colorClasses$1 = "text-surface-accent-600 visited:text-surface-accent-600 dark:text-surface-accent-300 dark:visited:text-surface-300";
32334
32623
  const sizeClasses = {
@@ -32388,7 +32677,7 @@
32388
32677
  const size = t1 === void 0 ? "medium" : t1;
32389
32678
  const variant = t2 === void 0 ? "ghost" : t2;
32390
32679
  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";
32680
+ 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
32681
  const Component = component || "button";
32393
32682
  const t4 = disabled ? "opacity-50 pointer-events-none" : "cursor-pointer";
32394
32683
  const t5 = toggled ? "outline outline-2 outline-primary" : "";
@@ -32396,7 +32685,7 @@
32396
32685
  const t7 = sizeClasses[size];
32397
32686
  let t8;
32398
32687
  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);
32688
+ t8 = cls(t4, t5, "text-inherit dark:text-inherit", colorClasses$1, bgClasses, baseClasses, buttonClasses, t6, t7, className);
32400
32689
  $[10] = bgClasses;
32401
32690
  $[11] = className;
32402
32691
  $[12] = t4;
@@ -32647,7 +32936,8 @@
32647
32936
  className,
32648
32937
  style,
32649
32938
  inputClassName,
32650
- invisible
32939
+ invisible,
32940
+ timezone
32651
32941
  }) => {
32652
32942
  const inputRef = React.useRef(null);
32653
32943
  const [focused, setFocused] = React.useState(false);
@@ -32665,18 +32955,59 @@
32665
32955
  if (!dateValue) {
32666
32956
  return "";
32667
32957
  }
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());
32958
+ const options = {
32959
+ year: "numeric",
32960
+ month: "2-digit",
32961
+ day: "2-digit",
32962
+ hour: "2-digit",
32963
+ minute: "2-digit",
32964
+ hour12: false,
32965
+ timeZone: timezone
32966
+ // undefined = local timezone
32967
+ };
32968
+ const formatter = new Intl.DateTimeFormat("en-CA", options);
32969
+ const parts = formatter.formatToParts(dateValue);
32970
+ const getPart = (type) => parts.find((p) => p.type === type)?.value ?? "";
32971
+ const year = getPart("year");
32972
+ const month = getPart("month");
32973
+ const day = getPart("day");
32672
32974
  if (mode_0 === "date") {
32673
32975
  return `${year}-${month}-${day}`;
32674
32976
  } else {
32675
- const hours = pad(dateValue.getHours());
32676
- const minutes = pad(dateValue.getMinutes());
32977
+ const hours = getPart("hour");
32978
+ const minutes = getPart("minute");
32677
32979
  return `${year}-${month}-${day}T${hours}:${minutes}`;
32678
32980
  }
32679
32981
  };
32982
+ const getTimezoneOffsetMinutes = (date, tz) => {
32983
+ if (!tz) {
32984
+ return -date.getTimezoneOffset();
32985
+ }
32986
+ const utcFormatter = new Intl.DateTimeFormat("en-CA", {
32987
+ year: "numeric",
32988
+ month: "2-digit",
32989
+ day: "2-digit",
32990
+ hour: "2-digit",
32991
+ minute: "2-digit",
32992
+ hour12: false,
32993
+ timeZone: "UTC"
32994
+ });
32995
+ const tzFormatter = new Intl.DateTimeFormat("en-CA", {
32996
+ year: "numeric",
32997
+ month: "2-digit",
32998
+ day: "2-digit",
32999
+ hour: "2-digit",
33000
+ minute: "2-digit",
33001
+ hour12: false,
33002
+ timeZone: tz
33003
+ });
33004
+ const utcParts = utcFormatter.formatToParts(date);
33005
+ const tzParts = tzFormatter.formatToParts(date);
33006
+ const getPart_0 = (parts_0, type_0) => parseInt(parts_0.find((p_0) => p_0.type === type_0)?.value ?? "0", 10);
33007
+ 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")));
33008
+ 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")));
33009
+ return (tzDate.getTime() - utcDate.getTime()) / 6e4;
33010
+ };
32680
33011
  const handleInputChange = (e_0) => {
32681
33012
  const inputValue = e_0.target.value;
32682
33013
  setInternalValue(inputValue);
@@ -32686,18 +33017,26 @@
32686
33017
  return;
32687
33018
  }
32688
33019
  try {
32689
- const parsed = new Date(inputValue);
32690
- if (isNaN(parsed.getTime())) {
32691
- throw new Error("Invalid date");
32692
- }
32693
- let newDate;
33020
+ let year_0, month_0, day_0, hours_0 = 0, minutes_0 = 0;
32694
33021
  if (mode === "date") {
32695
- const userTimezoneOffset = parsed.getTimezoneOffset() * 6e4;
32696
- newDate = new Date(parsed.getTime() + userTimezoneOffset);
33022
+ [year_0, month_0, day_0] = inputValue.split("-").map(Number);
33023
+ } else {
33024
+ const [datePart, timePart] = inputValue.split("T");
33025
+ [year_0, month_0, day_0] = datePart.split("-").map(Number);
33026
+ [hours_0, minutes_0] = timePart.split(":").map(Number);
33027
+ }
33028
+ let resultDate;
33029
+ if (!timezone) {
33030
+ resultDate = new Date(year_0, month_0 - 1, day_0, hours_0, minutes_0);
32697
33031
  } else {
32698
- newDate = parsed;
33032
+ const refUtcDate = new Date(Date.UTC(year_0, month_0 - 1, day_0, hours_0, minutes_0));
33033
+ const offsetMinutes = getTimezoneOffsetMinutes(refUtcDate, timezone);
33034
+ resultDate = new Date(Date.UTC(year_0, month_0 - 1, day_0, hours_0, minutes_0) - offsetMinutes * 6e4);
33035
+ }
33036
+ if (isNaN(resultDate.getTime())) {
33037
+ throw new Error("Invalid date");
32699
33038
  }
32700
- onChange?.(newDate);
33039
+ onChange?.(resultDate);
32701
33040
  } catch (e_1) {
32702
33041
  return;
32703
33042
  }
@@ -32766,21 +33105,21 @@
32766
33105
  }
32767
33106
  `;
32768
33107
  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"
33108
+ xs: "max-w-xs w-xs",
33109
+ sm: "max-w-sm w-sm",
33110
+ md: "max-w-md w-md",
33111
+ lg: "max-w-lg w-lg",
33112
+ xl: "max-w-xl w-xl",
33113
+ "2xl": "max-w-2xl w-2xl",
33114
+ "3xl": "max-w-3xl w-3xl",
33115
+ "4xl": "max-w-4xl w-4xl",
33116
+ "5xl": "max-w-5xl w-5xl",
33117
+ "6xl": "max-w-6xl w-6xl",
33118
+ "7xl": "max-w-7xl w-7xl",
33119
+ full: "max-w-full w-full"
32781
33120
  };
32782
33121
  const Dialog = (t0) => {
32783
- const $ = reactCompilerRuntime.c(42);
33122
+ const $ = reactCompilerRuntime.c(45);
32784
33123
  const {
32785
33124
  open,
32786
33125
  onOpenChange,
@@ -32797,7 +33136,8 @@
32797
33136
  onEscapeKeyDown,
32798
33137
  onPointerDownOutside,
32799
33138
  onInteractOutside,
32800
- disableInitialFocus: t5
33139
+ disableInitialFocus: t5,
33140
+ portalContainer
32801
33141
  } = t0;
32802
33142
  const fullWidth = t1 === void 0 ? true : t1;
32803
33143
  const scrollable = t2 === void 0 ? true : t2;
@@ -32805,6 +33145,8 @@
32805
33145
  const modal = t4 === void 0 ? true : t4;
32806
33146
  const disableInitialFocus = t5 === void 0 ? true : t5;
32807
33147
  const [displayed, setDisplayed] = React.useState(false);
33148
+ const contextContainer = usePortalContainer();
33149
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
32808
33150
  let t6;
32809
33151
  let t7;
32810
33152
  if ($[0] !== open) {
@@ -32812,11 +33154,11 @@
32812
33154
  if (!open) {
32813
33155
  const timeout = setTimeout(() => {
32814
33156
  setDisplayed(false);
32815
- }, 150);
33157
+ }, 100);
32816
33158
  return () => clearTimeout(timeout);
32817
33159
  } else {
32818
33160
  setDisplayed(true);
32819
- return _temp$2;
33161
+ return _temp$3;
32820
33162
  }
32821
33163
  };
32822
33164
  t7 = [open];
@@ -32840,7 +33182,7 @@
32840
33182
  const t10 = displayed && open ? "opacity-100" : "opacity-0";
32841
33183
  let t11;
32842
33184
  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");
33185
+ 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
33186
  $[5] = t10;
32845
33187
  $[6] = t11;
32846
33188
  } else {
@@ -32930,10 +33272,10 @@
32930
33272
  }
32931
33273
  let t26;
32932
33274
  if ($[33] !== t14 || $[34] !== t25 || $[35] !== t9) {
32933
- t26 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t9, children: [
33275
+ t26 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t9, children: [
32934
33276
  t14,
32935
33277
  t25
32936
- ] }) });
33278
+ ] });
32937
33279
  $[33] = t14;
32938
33280
  $[34] = t25;
32939
33281
  $[35] = t9;
@@ -32942,19 +33284,28 @@
32942
33284
  t26 = $[36];
32943
33285
  }
32944
33286
  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;
33287
+ if ($[37] !== finalContainer || $[38] !== t26) {
33288
+ t27 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { container: finalContainer, children: t26 });
33289
+ $[37] = finalContainer;
33290
+ $[38] = t26;
33291
+ $[39] = t27;
33292
+ } else {
33293
+ t27 = $[39];
33294
+ }
33295
+ let t28;
33296
+ if ($[40] !== modal || $[41] !== onOpenChange || $[42] !== t27 || $[43] !== t8) {
33297
+ t28 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { open: t8, modal, onOpenChange, children: t27 });
33298
+ $[40] = modal;
33299
+ $[41] = onOpenChange;
33300
+ $[42] = t27;
33301
+ $[43] = t8;
33302
+ $[44] = t28;
32952
33303
  } else {
32953
- t27 = $[41];
33304
+ t28 = $[44];
32954
33305
  }
32955
- return t27;
33306
+ return t28;
32956
33307
  };
32957
- function _temp$2() {
33308
+ function _temp$3() {
32958
33309
  }
32959
33310
  function DialogActions(t0) {
32960
33311
  const $ = reactCompilerRuntime.c(7);
@@ -32969,7 +33320,7 @@
32969
33320
  const t3 = translucent ? "backdrop-blur-sm" : "";
32970
33321
  let t4;
32971
33322
  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);
33323
+ 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
33324
  $[0] = className;
32974
33325
  $[1] = position;
32975
33326
  $[2] = t3;
@@ -33217,7 +33568,7 @@
33217
33568
  const t13 = asField && fieldBackgroundMixin;
33218
33569
  let t14;
33219
33570
  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");
33571
+ 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
33572
  $[11] = t10;
33222
33573
  $[12] = t11;
33223
33574
  $[13] = t12;
@@ -33311,7 +33662,7 @@
33311
33662
  return t24;
33312
33663
  }
33313
33664
  function FileUpload(t0) {
33314
- const $ = reactCompilerRuntime.c(32);
33665
+ const $ = reactCompilerRuntime.c(33);
33315
33666
  const {
33316
33667
  accept,
33317
33668
  onFilesAdded,
@@ -33366,15 +33717,17 @@
33366
33717
  }
33367
33718
  const t4 = size === "large";
33368
33719
  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", {
33720
+ const t6 = size === "small";
33721
+ const t7 = !disabled;
33722
+ const t8 = !isDragActive;
33723
+ let t9;
33724
+ if ($[10] !== isDragAccept || $[11] !== isDragReject || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7 || $[16] !== t8) {
33725
+ 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
33726
  "h-44": t4,
33375
33727
  "h-28": t5,
33376
- "cursor-pointer": t6,
33377
- [fieldBackgroundHoverMixin]: t7,
33728
+ "h-16": t6,
33729
+ "cursor-pointer": t7,
33730
+ [fieldBackgroundHoverMixin]: t8,
33378
33731
  "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-red-500": isDragReject,
33379
33732
  "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-green-500": isDragAccept
33380
33733
  });
@@ -33385,60 +33738,61 @@
33385
33738
  $[14] = t6;
33386
33739
  $[15] = t7;
33387
33740
  $[16] = t8;
33741
+ $[17] = t9;
33388
33742
  } 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];
33743
+ t9 = $[17];
33398
33744
  }
33399
33745
  let t10;
33400
- if ($[19] !== getInputProps) {
33401
- t10 = getInputProps();
33402
- $[19] = getInputProps;
33403
- $[20] = t10;
33746
+ if ($[18] !== title) {
33747
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "secondary", className: "absolute top-2 left-3.5 cursor-inherit", children: title });
33748
+ $[18] = title;
33749
+ $[19] = t10;
33404
33750
  } else {
33405
- t10 = $[20];
33751
+ t10 = $[19];
33406
33752
  }
33407
33753
  let t11;
33408
- if ($[21] !== t10) {
33409
- t11 = /* @__PURE__ */ jsxRuntime.jsx("input", { ...t10 });
33410
- $[21] = t10;
33411
- $[22] = t11;
33754
+ if ($[20] !== getInputProps) {
33755
+ t11 = getInputProps();
33756
+ $[20] = getInputProps;
33757
+ $[21] = t11;
33412
33758
  } else {
33413
- t11 = $[22];
33759
+ t11 = $[21];
33414
33760
  }
33415
33761
  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;
33762
+ if ($[22] !== t11) {
33763
+ t12 = /* @__PURE__ */ jsxRuntime.jsx("input", { ...t11 });
33764
+ $[22] = t11;
33765
+ $[23] = t12;
33420
33766
  } else {
33421
- t12 = $[24];
33767
+ t12 = $[23];
33422
33768
  }
33423
33769
  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,
33770
+ if ($[24] !== uploadDescription) {
33771
+ 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 }) });
33772
+ $[24] = uploadDescription;
33773
+ $[25] = t13;
33774
+ } else {
33775
+ t13 = $[25];
33776
+ }
33777
+ let t14;
33778
+ if ($[26] !== children || $[27] !== t10 || $[28] !== t12 || $[29] !== t13 || $[30] !== t3 || $[31] !== t9) {
33779
+ t14 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ...t3, className: t9, children: [
33780
+ t10,
33781
+ t12,
33428
33782
  children,
33429
- t12
33783
+ t13
33430
33784
  ] });
33431
- $[25] = children;
33432
- $[26] = t11;
33433
- $[27] = t12;
33434
- $[28] = t3;
33435
- $[29] = t8;
33436
- $[30] = t9;
33437
- $[31] = t13;
33785
+ $[26] = children;
33786
+ $[27] = t10;
33787
+ $[28] = t12;
33788
+ $[29] = t13;
33789
+ $[30] = t3;
33790
+ $[31] = t9;
33791
+ $[32] = t14;
33438
33792
  } else {
33439
- t13 = $[31];
33793
+ t14 = $[32];
33440
33794
  }
33441
- return t13;
33795
+ return t14;
33442
33796
  }
33443
33797
  const colorClasses = {
33444
33798
  info: "bg-sky-200 dark:bg-teal-900",
@@ -33659,6 +34013,8 @@
33659
34013
  className
33660
34014
  } = t0;
33661
34015
  const sideOffset = t1 === void 0 ? 4 : t1;
34016
+ const contextContainer = usePortalContainer();
34017
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
33662
34018
  let t2;
33663
34019
  if ($[0] !== ref || $[1] !== trigger) {
33664
34020
  t2 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, { ref, asChild: true, children: trigger });
@@ -33689,9 +34045,9 @@
33689
34045
  t4 = $[10];
33690
34046
  }
33691
34047
  let t5;
33692
- if ($[11] !== portalContainer || $[12] !== t4) {
33693
- t5 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { container: portalContainer, children: t4 });
33694
- $[11] = portalContainer;
34048
+ if ($[11] !== finalContainer || $[12] !== t4) {
34049
+ t5 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { container: finalContainer, children: t4 });
34050
+ $[11] = finalContainer;
33695
34051
  $[12] = t4;
33696
34052
  $[13] = t5;
33697
34053
  } else {
@@ -33716,38 +34072,46 @@
33716
34072
  });
33717
34073
  Menu.displayName = "Menu";
33718
34074
  const MenuItem = React.memo((t0) => {
33719
- const $ = reactCompilerRuntime.c(8);
34075
+ const $ = reactCompilerRuntime.c(11);
33720
34076
  const {
33721
34077
  children,
33722
34078
  dense: t1,
34079
+ disabled: t2,
33723
34080
  onClick,
33724
34081
  className
33725
34082
  } = t0;
33726
34083
  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);
34084
+ const disabled = t2 === void 0 ? false : t2;
34085
+ const t3 = onClick && !disabled && "cursor-pointer";
34086
+ const t4 = disabled && "opacity-50 cursor-not-allowed";
34087
+ const t5 = !disabled && "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-900";
34088
+ const t6 = dense ? "px-4 py-1.5" : "px-4 py-2";
34089
+ let t7;
34090
+ if ($[0] !== className || $[1] !== t3 || $[2] !== t4 || $[3] !== t5 || $[4] !== t6) {
34091
+ 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
34092
  $[0] = className;
33733
- $[1] = t2;
33734
- $[2] = t3;
33735
- $[3] = t4;
34093
+ $[1] = t3;
34094
+ $[2] = t4;
34095
+ $[3] = t5;
34096
+ $[4] = t6;
34097
+ $[5] = t7;
33736
34098
  } else {
33737
- t4 = $[3];
34099
+ t7 = $[5];
33738
34100
  }
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;
34101
+ const classNames = t7;
34102
+ const t8 = disabled ? void 0 : onClick;
34103
+ let t9;
34104
+ if ($[6] !== children || $[7] !== classNames || $[8] !== disabled || $[9] !== t8) {
34105
+ t9 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Item, { className: classNames, disabled, onClick: t8, children });
34106
+ $[6] = children;
34107
+ $[7] = classNames;
34108
+ $[8] = disabled;
34109
+ $[9] = t8;
34110
+ $[10] = t9;
33747
34111
  } else {
33748
- t5 = $[7];
34112
+ t9 = $[10];
33749
34113
  }
33750
- return t5;
34114
+ return t9;
33751
34115
  });
33752
34116
  function Menubar(t0) {
33753
34117
  const $ = reactCompilerRuntime.c(6);
@@ -33800,7 +34164,7 @@
33800
34164
  } = t0;
33801
34165
  let t1;
33802
34166
  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);
34167
+ 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
34168
  $[0] = className;
33805
34169
  $[1] = t1;
33806
34170
  } else {
@@ -33819,17 +34183,21 @@
33819
34183
  return t2;
33820
34184
  }
33821
34185
  function MenubarPortal(t0) {
33822
- const $ = reactCompilerRuntime.c(2);
34186
+ const $ = reactCompilerRuntime.c(3);
33823
34187
  const {
33824
- children
34188
+ children,
34189
+ portalContainer
33825
34190
  } = t0;
34191
+ const contextContainer = usePortalContainer();
34192
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
33826
34193
  let t1;
33827
- if ($[0] !== children) {
33828
- t1 = /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { children });
34194
+ if ($[0] !== children || $[1] !== finalContainer) {
34195
+ t1 = /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { container: finalContainer, children });
33829
34196
  $[0] = children;
33830
- $[1] = t1;
34197
+ $[1] = finalContainer;
34198
+ $[2] = t1;
33831
34199
  } else {
33832
- t1 = $[1];
34200
+ t1 = $[2];
33833
34201
  }
33834
34202
  return t1;
33835
34203
  }
@@ -34402,7 +34770,7 @@
34402
34770
  if (orientation === "horizontal") {
34403
34771
  let t1;
34404
34772
  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);
34773
+ 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
34774
  $[0] = className;
34407
34775
  $[1] = t1;
34408
34776
  } else {
@@ -34421,7 +34789,7 @@
34421
34789
  } else {
34422
34790
  let t1;
34423
34791
  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);
34792
+ 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
34793
  $[5] = className;
34426
34794
  $[6] = t1;
34427
34795
  } else {
@@ -34467,7 +34835,7 @@
34467
34835
  }
34468
34836
  const MultiSelectContext = React__namespace.createContext({});
34469
34837
  const MultiSelect = React__namespace.forwardRef((t0, ref) => {
34470
- const $ = reactCompilerRuntime.c(105);
34838
+ const $ = reactCompilerRuntime.c(111);
34471
34839
  const {
34472
34840
  value,
34473
34841
  size: t1,
@@ -34482,17 +34850,21 @@
34482
34850
  includeSelectAll: t4,
34483
34851
  useChips: t5,
34484
34852
  className,
34853
+ inputClassName,
34854
+ inputRef,
34485
34855
  children,
34486
34856
  renderValues,
34487
34857
  open,
34488
- onOpenChange
34858
+ onOpenChange,
34859
+ portalContainer
34489
34860
  } = t0;
34490
34861
  const size = t1 === void 0 ? "large" : t1;
34491
34862
  const modalPopover = t2 === void 0 ? true : t2;
34492
34863
  const includeClear = t3 === void 0 ? true : t3;
34493
34864
  const includeSelectAll = t4 === void 0 ? true : t4;
34494
34865
  const useChips = t5 === void 0 ? true : t5;
34495
- const [isPopoverOpen, setIsPopoverOpen] = React__namespace.useState(open ?? false);
34866
+ const [isMounted, setIsMounted] = React.useState(false);
34867
+ const [isPopoverOpen, setIsPopoverOpen] = React.useState(open ?? false);
34496
34868
  let t6;
34497
34869
  if ($[0] !== value) {
34498
34870
  t6 = value ?? [];
@@ -34501,79 +34873,95 @@
34501
34873
  } else {
34502
34874
  t6 = $[1];
34503
34875
  }
34504
- const [selectedValues, setSelectedValues] = React__namespace.useState(t6);
34876
+ const [selectedValues, setSelectedValues] = React.useState(t6);
34877
+ const contextContainer = usePortalContainer();
34878
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
34505
34879
  let t7;
34506
- if ($[2] !== onOpenChange) {
34507
- t7 = (open_0) => {
34508
- setIsPopoverOpen(open_0);
34509
- onOpenChange?.(open_0);
34880
+ let t8;
34881
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
34882
+ t7 = () => {
34883
+ setIsMounted(true);
34510
34884
  };
34511
- $[2] = onOpenChange;
34512
- $[3] = t7;
34885
+ t8 = [];
34886
+ $[2] = t7;
34887
+ $[3] = t8;
34513
34888
  } else {
34514
- t7 = $[3];
34889
+ t7 = $[2];
34890
+ t8 = $[3];
34515
34891
  }
34516
- const onPopoverOpenChange = t7;
34517
- let t8;
34892
+ React.useEffect(t7, t8);
34518
34893
  let t9;
34519
- if ($[4] !== open) {
34520
- t8 = () => {
34521
- setIsPopoverOpen(open ?? false);
34894
+ if ($[4] !== onOpenChange) {
34895
+ t9 = (open_0) => {
34896
+ setIsPopoverOpen(open_0);
34897
+ onOpenChange?.(open_0);
34522
34898
  };
34523
- t9 = [open];
34524
- $[4] = open;
34525
- $[5] = t8;
34526
- $[6] = t9;
34899
+ $[4] = onOpenChange;
34900
+ $[5] = t9;
34527
34901
  } else {
34528
- t8 = $[5];
34529
- t9 = $[6];
34902
+ t9 = $[5];
34530
34903
  }
34531
- React.useEffect(t8, t9);
34904
+ const onPopoverOpenChange = t9;
34532
34905
  let t10;
34533
34906
  let t11;
34534
- if ($[7] !== children) {
34535
- t11 = children ? React.Children.map(children, _temp$1).filter(Boolean) : [];
34536
- $[7] = children;
34907
+ if ($[6] !== open) {
34908
+ t10 = () => {
34909
+ setIsPopoverOpen(open ?? false);
34910
+ };
34911
+ t11 = [open];
34912
+ $[6] = open;
34913
+ $[7] = t10;
34537
34914
  $[8] = t11;
34538
34915
  } else {
34916
+ t10 = $[7];
34539
34917
  t11 = $[8];
34540
34918
  }
34541
- t10 = t11;
34542
- const allValues = t10;
34919
+ React.useEffect(t10, t11);
34543
34920
  let t12;
34544
- let map;
34921
+ let t13;
34545
34922
  if ($[9] !== children) {
34923
+ t13 = children ? React.Children.map(children, _temp$2)?.filter(Boolean) ?? [] : [];
34924
+ $[9] = children;
34925
+ $[10] = t13;
34926
+ } else {
34927
+ t13 = $[10];
34928
+ }
34929
+ t12 = t13;
34930
+ const allValues = t12;
34931
+ let t14;
34932
+ let map;
34933
+ if ($[11] !== children) {
34546
34934
  map = /* @__PURE__ */ new Map();
34547
34935
  React.Children.forEach(children, (child_0) => {
34548
34936
  if (React__namespace.isValidElement(child_0)) {
34549
34937
  map.set(String(child_0.props.value), child_0.props.children);
34550
34938
  }
34551
34939
  });
34552
- $[9] = children;
34553
- $[10] = map;
34940
+ $[11] = children;
34941
+ $[12] = map;
34554
34942
  } else {
34555
- map = $[10];
34943
+ map = $[12];
34556
34944
  }
34557
- t12 = map;
34558
- const optionsMap = t12;
34559
- let t13;
34560
- let t14;
34561
- if ($[11] !== value) {
34562
- t13 = () => {
34945
+ t14 = map;
34946
+ const optionsMap = t14;
34947
+ let t15;
34948
+ let t16;
34949
+ if ($[13] !== value) {
34950
+ t15 = () => {
34563
34951
  setSelectedValues(value ?? []);
34564
34952
  };
34565
- t14 = [value];
34566
- $[11] = value;
34567
- $[12] = t13;
34568
- $[13] = t14;
34953
+ t16 = [value];
34954
+ $[13] = value;
34955
+ $[14] = t15;
34956
+ $[15] = t16;
34569
34957
  } else {
34570
- t13 = $[12];
34571
- t14 = $[13];
34958
+ t15 = $[14];
34959
+ t16 = $[15];
34572
34960
  }
34573
- React__namespace.useEffect(t13, t14);
34961
+ React__namespace.useEffect(t15, t16);
34574
34962
  let onItemClick;
34575
34963
  let updateValues;
34576
- if ($[14] !== onValueChange || $[15] !== selectedValues) {
34964
+ if ($[16] !== onValueChange || $[17] !== selectedValues) {
34577
34965
  onItemClick = function onItemClick2(newValue) {
34578
34966
  let newSelectedValues;
34579
34967
  if (selectedValues.some((v_0) => String(v_0) === String(newValue))) {
@@ -34587,17 +34975,17 @@
34587
34975
  setSelectedValues(values);
34588
34976
  onValueChange?.(values);
34589
34977
  };
34590
- $[14] = onValueChange;
34591
- $[15] = selectedValues;
34592
- $[16] = onItemClick;
34593
- $[17] = updateValues;
34978
+ $[16] = onValueChange;
34979
+ $[17] = selectedValues;
34980
+ $[18] = onItemClick;
34981
+ $[19] = updateValues;
34594
34982
  } else {
34595
- onItemClick = $[16];
34596
- updateValues = $[17];
34983
+ onItemClick = $[18];
34984
+ updateValues = $[19];
34597
34985
  }
34598
- let t15;
34599
- if ($[18] !== onPopoverOpenChange || $[19] !== selectedValues || $[20] !== updateValues) {
34600
- t15 = (event) => {
34986
+ let t17;
34987
+ if ($[20] !== onPopoverOpenChange || $[21] !== selectedValues || $[22] !== updateValues) {
34988
+ t17 = (event) => {
34601
34989
  if (event.key === "Enter") {
34602
34990
  onPopoverOpenChange(true);
34603
34991
  } else {
@@ -34608,53 +34996,53 @@
34608
34996
  }
34609
34997
  }
34610
34998
  };
34611
- $[18] = onPopoverOpenChange;
34612
- $[19] = selectedValues;
34613
- $[20] = updateValues;
34614
- $[21] = t15;
34999
+ $[20] = onPopoverOpenChange;
35000
+ $[21] = selectedValues;
35001
+ $[22] = updateValues;
35002
+ $[23] = t17;
34615
35003
  } else {
34616
- t15 = $[21];
35004
+ t17 = $[23];
34617
35005
  }
34618
- const handleInputKeyDown = t15;
34619
- let t16;
34620
- if ($[22] !== selectedValues || $[23] !== updateValues) {
34621
- t16 = (value_0) => {
35006
+ const handleInputKeyDown = t17;
35007
+ let t18;
35008
+ if ($[24] !== selectedValues || $[25] !== updateValues) {
35009
+ t18 = (value_0) => {
34622
35010
  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
35011
  updateValues(newSelectedValues_1);
34624
35012
  };
34625
- $[22] = selectedValues;
34626
- $[23] = updateValues;
34627
- $[24] = t16;
35013
+ $[24] = selectedValues;
35014
+ $[25] = updateValues;
35015
+ $[26] = t18;
34628
35016
  } else {
34629
- t16 = $[24];
35017
+ t18 = $[26];
34630
35018
  }
34631
- const toggleOption = t16;
34632
- let t17;
34633
- if ($[25] !== updateValues) {
34634
- t17 = () => {
35019
+ const toggleOption = t18;
35020
+ let t19;
35021
+ if ($[27] !== updateValues) {
35022
+ t19 = () => {
34635
35023
  updateValues([]);
34636
35024
  };
34637
- $[25] = updateValues;
34638
- $[26] = t17;
35025
+ $[27] = updateValues;
35026
+ $[28] = t19;
34639
35027
  } else {
34640
- t17 = $[26];
35028
+ t19 = $[28];
34641
35029
  }
34642
- const handleClear = t17;
34643
- let t18;
34644
- if ($[27] !== isPopoverOpen || $[28] !== onPopoverOpenChange) {
34645
- t18 = () => {
35030
+ const handleClear = t19;
35031
+ let t20;
35032
+ if ($[29] !== isPopoverOpen || $[30] !== onPopoverOpenChange) {
35033
+ t20 = () => {
34646
35034
  onPopoverOpenChange(!isPopoverOpen);
34647
35035
  };
34648
- $[27] = isPopoverOpen;
34649
- $[28] = onPopoverOpenChange;
34650
- $[29] = t18;
35036
+ $[29] = isPopoverOpen;
35037
+ $[30] = onPopoverOpenChange;
35038
+ $[31] = t20;
34651
35039
  } else {
34652
- t18 = $[29];
35040
+ t20 = $[31];
34653
35041
  }
34654
- const handleTogglePopover = t18;
34655
- let t19;
34656
- if ($[30] !== allValues || $[31] !== handleClear || $[32] !== onPopoverOpenChange || $[33] !== selectedValues.length || $[34] !== updateValues) {
34657
- t19 = () => {
35042
+ const handleTogglePopover = t20;
35043
+ let t21;
35044
+ if ($[32] !== allValues || $[33] !== handleClear || $[34] !== onPopoverOpenChange || $[35] !== selectedValues.length || $[36] !== updateValues) {
35045
+ t21 = () => {
34658
35046
  if (selectedValues.length === allValues.length) {
34659
35047
  handleClear();
34660
35048
  } else {
@@ -34662,76 +35050,79 @@
34662
35050
  }
34663
35051
  onPopoverOpenChange(false);
34664
35052
  };
34665
- $[30] = allValues;
34666
- $[31] = handleClear;
34667
- $[32] = onPopoverOpenChange;
34668
- $[33] = selectedValues.length;
34669
- $[34] = updateValues;
34670
- $[35] = t19;
35053
+ $[32] = allValues;
35054
+ $[33] = handleClear;
35055
+ $[34] = onPopoverOpenChange;
35056
+ $[35] = selectedValues.length;
35057
+ $[36] = updateValues;
35058
+ $[37] = t21;
34671
35059
  } else {
34672
- t19 = $[35];
35060
+ t21 = $[37];
34673
35061
  }
34674
- const toggleAll = t19;
35062
+ const toggleAll = t21;
34675
35063
  useInjectStyles("MultiSelect", `
34676
35064
  [cmdk-group] {
34677
35065
  max-height: 45vh;
34678
35066
  overflow-y: auto;
34679
35067
  // width: 400px;
34680
35068
  } `);
34681
- let t20;
34682
- if ($[36] !== onItemClick || $[37] !== selectedValues) {
34683
- t20 = {
35069
+ let t22;
35070
+ if ($[38] !== onItemClick || $[39] !== selectedValues) {
35071
+ t22 = {
34684
35072
  fieldValue: selectedValues,
34685
35073
  onItemClick
34686
35074
  };
34687
- $[36] = onItemClick;
34688
- $[37] = selectedValues;
34689
- $[38] = t20;
35075
+ $[38] = onItemClick;
35076
+ $[39] = selectedValues;
35077
+ $[40] = t22;
34690
35078
  } else {
34691
- t20 = $[38];
35079
+ t22 = $[40];
34692
35080
  }
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
35081
+ let t23;
35082
+ if ($[41] !== error || $[42] !== label) {
35083
+ t23 = typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label;
35084
+ $[41] = error;
35085
+ $[42] = label;
35086
+ $[43] = t23;
35087
+ } else {
35088
+ t23 = $[43];
35089
+ }
35090
+ const t24 = isMounted && isPopoverOpen;
35091
+ const t25 = inputRef ?? ref;
35092
+ const t26 = size === "smallest";
35093
+ const t27 = size === "small";
35094
+ const t28 = size === "medium";
35095
+ const t29 = size === "large";
35096
+ let t30;
35097
+ if ($[44] !== className || $[45] !== disabled || $[46] !== inputClassName || $[47] !== invisible || $[48] !== size || $[49] !== t26 || $[50] !== t27 || $[51] !== t28 || $[52] !== t29) {
35098
+ t30 = cls({
35099
+ "min-h-[28px]": t26,
35100
+ "min-h-[32px]": t27,
35101
+ "min-h-[44px]": t28,
35102
+ "min-h-[64px]": t29
34713
35103
  }, {
34714
35104
  "py-1": size === "small" || size === "smallest",
34715
35105
  "py-2": size === "medium" || size === "large"
34716
35106
  }, {
34717
35107
  "px-2": size === "small" || size === "smallest",
34718
35108
  "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;
35109
+ }, "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);
35110
+ $[44] = className;
35111
+ $[45] = disabled;
35112
+ $[46] = inputClassName;
35113
+ $[47] = invisible;
35114
+ $[48] = size;
35115
+ $[49] = t26;
35116
+ $[50] = t27;
35117
+ $[51] = t28;
35118
+ $[52] = t29;
35119
+ $[53] = t30;
34729
35120
  } else {
34730
- t26 = $[50];
35121
+ t30 = $[53];
34731
35122
  }
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: [
35123
+ let t31;
35124
+ if ($[54] !== handleClear || $[55] !== includeClear || $[56] !== isPopoverOpen || $[57] !== optionsMap || $[58] !== placeholder || $[59] !== renderValues || $[60] !== selectedValues || $[61] !== size || $[62] !== toggleOption || $[63] !== useChips) {
35125
+ t31 = selectedValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center w-full", children: [
34735
35126
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-start", children: [
34736
35127
  renderValues && renderValues(selectedValues),
34737
35128
  !renderValues && selectedValues.map((value_1) => {
@@ -34759,176 +35150,185 @@
34759
35150
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: placeholder }),
34760
35151
  /* @__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" : "") }) })
34761
35152
  ] });
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];
35153
+ $[54] = handleClear;
35154
+ $[55] = includeClear;
35155
+ $[56] = isPopoverOpen;
35156
+ $[57] = optionsMap;
35157
+ $[58] = placeholder;
35158
+ $[59] = renderValues;
35159
+ $[60] = selectedValues;
35160
+ $[61] = size;
35161
+ $[62] = toggleOption;
35162
+ $[63] = useChips;
35163
+ $[64] = t31;
35164
+ } else {
35165
+ t31 = $[64];
34775
35166
  }
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;
35167
+ let t32;
35168
+ if ($[65] !== handleTogglePopover || $[66] !== t25 || $[67] !== t30 || $[68] !== t31) {
35169
+ t32 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { ref: t25, onClick: handleTogglePopover, className: t30, children: t31 }) });
35170
+ $[65] = handleTogglePopover;
35171
+ $[66] = t25;
35172
+ $[67] = t30;
35173
+ $[68] = t31;
35174
+ $[69] = t32;
34784
35175
  } else {
34785
- t28 = $[66];
35176
+ t32 = $[69];
34786
35177
  }
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;
35178
+ let t33;
35179
+ if ($[70] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35180
+ t33 = cls("z-50 overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin);
35181
+ $[70] = t33;
34791
35182
  } else {
34792
- t29 = $[67];
35183
+ t33 = $[70];
34793
35184
  }
34794
- let t30;
34795
- if ($[68] !== onPopoverOpenChange) {
34796
- t30 = () => onPopoverOpenChange(false);
34797
- $[68] = onPopoverOpenChange;
34798
- $[69] = t30;
35185
+ let t34;
35186
+ if ($[71] !== onPopoverOpenChange) {
35187
+ t34 = () => onPopoverOpenChange(false);
35188
+ $[71] = onPopoverOpenChange;
35189
+ $[72] = t34;
34799
35190
  } else {
34800
- t30 = $[69];
35191
+ t34 = $[72];
34801
35192
  }
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;
35193
+ let t35;
35194
+ if ($[73] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35195
+ t35 = cls(focusedDisabled, "bg-transparent outline-none flex-1 h-full w-full m-4 flex-grow text-surface-accent-900 dark:text-white");
35196
+ $[73] = t35;
34806
35197
  } else {
34807
- t31 = $[70];
35198
+ t35 = $[73];
34808
35199
  }
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;
35200
+ let t36;
35201
+ if ($[74] !== handleInputKeyDown) {
35202
+ t36 = /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Input, { className: t35, placeholder: "Search...", onKeyDown: handleInputKeyDown });
35203
+ $[74] = handleInputKeyDown;
35204
+ $[75] = t36;
34814
35205
  } else {
34815
- t32 = $[72];
35206
+ t36 = $[75];
34816
35207
  }
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;
35208
+ let t37;
35209
+ if ($[76] !== handleClear || $[77] !== selectedValues.length) {
35210
+ 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" });
35211
+ $[76] = handleClear;
35212
+ $[77] = selectedValues.length;
35213
+ $[78] = t37;
34823
35214
  } else {
34824
- t33 = $[75];
35215
+ t37 = $[78];
34825
35216
  }
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
35217
+ let t38;
35218
+ if ($[79] !== t36 || $[80] !== t37) {
35219
+ t38 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center", children: [
35220
+ t36,
35221
+ t37
34831
35222
  ] });
34832
- $[76] = t32;
34833
- $[77] = t33;
34834
- $[78] = t34;
35223
+ $[79] = t36;
35224
+ $[80] = t37;
35225
+ $[81] = t38;
34835
35226
  } else {
34836
- t34 = $[78];
35227
+ t38 = $[81];
34837
35228
  }
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;
35229
+ let t39;
35230
+ if ($[82] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35231
+ t39 = /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "horizontal", className: "my-0" });
35232
+ $[82] = t39;
34842
35233
  } else {
34843
- t35 = $[79];
35234
+ t39 = $[82];
34844
35235
  }
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;
35236
+ let t40;
35237
+ if ($[83] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35238
+ 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." });
35239
+ $[83] = t40;
34849
35240
  } else {
34850
- t36 = $[80];
35241
+ t40 = $[83];
34851
35242
  }
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: [
35243
+ let t41;
35244
+ if ($[84] !== allValues.length || $[85] !== includeSelectAll || $[86] !== selectedValues.length || $[87] !== toggleAll) {
35245
+ 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
35246
  /* @__PURE__ */ jsxRuntime.jsx(InnerCheckBox, { checked: selectedValues.length === allValues.length }),
34856
35247
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: "(Select All)" })
34857
35248
  ] }, "all");
34858
- $[81] = allValues.length;
34859
- $[82] = includeSelectAll;
34860
- $[83] = selectedValues.length;
34861
- $[84] = toggleAll;
34862
- $[85] = t37;
35249
+ $[84] = allValues.length;
35250
+ $[85] = includeSelectAll;
35251
+ $[86] = selectedValues.length;
35252
+ $[87] = toggleAll;
35253
+ $[88] = t41;
34863
35254
  } else {
34864
- t37 = $[85];
35255
+ t41 = $[88];
34865
35256
  }
34866
- let t38;
34867
- if ($[86] !== children || $[87] !== t37) {
34868
- t38 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
34869
- t36,
35257
+ let t42;
35258
+ if ($[89] !== children || $[90] !== t41) {
35259
+ t42 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.List, { children: [
35260
+ t40,
34870
35261
  /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Group, { children: [
34871
- t37,
35262
+ t41,
34872
35263
  children
34873
35264
  ] })
34874
35265
  ] });
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
35266
+ $[89] = children;
35267
+ $[90] = t41;
35268
+ $[91] = t42;
35269
+ } else {
35270
+ t42 = $[91];
35271
+ }
35272
+ let t43;
35273
+ if ($[92] !== t38 || $[93] !== t42) {
35274
+ t43 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command, { children: [
35275
+ t38,
35276
+ t39,
35277
+ t42
34887
35278
  ] });
34888
- $[89] = t34;
34889
- $[90] = t38;
34890
- $[91] = t39;
35279
+ $[92] = t38;
35280
+ $[93] = t42;
35281
+ $[94] = t43;
34891
35282
  } else {
34892
- t39 = $[91];
35283
+ t43 = $[94];
34893
35284
  }
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;
35285
+ let t44;
35286
+ if ($[95] !== t34 || $[96] !== t43) {
35287
+ t44 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Content, { className: t33, align: "start", sideOffset: 8, onEscapeKeyDown: t34, children: t43 });
35288
+ $[95] = t34;
35289
+ $[96] = t43;
35290
+ $[97] = t44;
34900
35291
  } else {
34901
- t40 = $[94];
35292
+ t44 = $[97];
34902
35293
  }
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;
35294
+ let t45;
35295
+ if ($[98] !== finalContainer || $[99] !== t44) {
35296
+ t45 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container: finalContainer, children: t44 });
35297
+ $[98] = finalContainer;
35298
+ $[99] = t44;
35299
+ $[100] = t45;
34915
35300
  } else {
34916
- t41 = $[100];
35301
+ t45 = $[100];
34917
35302
  }
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
35303
+ let t46;
35304
+ if ($[101] !== modalPopover || $[102] !== onPopoverOpenChange || $[103] !== t24 || $[104] !== t32 || $[105] !== t45) {
35305
+ t46 = /* @__PURE__ */ jsxRuntime.jsxs(PopoverPrimitive__namespace.Root, { open: t24, onOpenChange: onPopoverOpenChange, modal: modalPopover, children: [
35306
+ t32,
35307
+ t45
34923
35308
  ] });
34924
- $[101] = t20;
34925
- $[102] = t21;
34926
- $[103] = t41;
34927
- $[104] = t42;
35309
+ $[101] = modalPopover;
35310
+ $[102] = onPopoverOpenChange;
35311
+ $[103] = t24;
35312
+ $[104] = t32;
35313
+ $[105] = t45;
35314
+ $[106] = t46;
35315
+ } else {
35316
+ t46 = $[106];
35317
+ }
35318
+ let t47;
35319
+ if ($[107] !== t22 || $[108] !== t23 || $[109] !== t46) {
35320
+ t47 = /* @__PURE__ */ jsxRuntime.jsxs(MultiSelectContext.Provider, { value: t22, children: [
35321
+ t23,
35322
+ t46
35323
+ ] });
35324
+ $[107] = t22;
35325
+ $[108] = t23;
35326
+ $[109] = t46;
35327
+ $[110] = t47;
34928
35328
  } else {
34929
- t42 = $[104];
35329
+ t47 = $[110];
34930
35330
  }
34931
- return t42;
35331
+ return t47;
34932
35332
  });
34933
35333
  MultiSelect.displayName = "MultiSelect";
34934
35334
  const MultiSelectItem = React__namespace.memo(function MultiSelectItem2(t0) {
@@ -34986,7 +35386,7 @@
34986
35386
  const t4 = isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "";
34987
35387
  let t5;
34988
35388
  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);
35389
+ 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
35390
  $[10] = className;
34991
35391
  $[11] = t4;
34992
35392
  $[12] = t5;
@@ -35003,7 +35403,7 @@
35003
35403
  }
35004
35404
  let t7;
35005
35405
  if ($[15] !== children || $[16] !== t3 || $[17] !== t5 || $[18] !== t6) {
35006
- t7 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Item, { onMouseDown: _temp2, onSelect: t3, className: t5, children: [
35406
+ t7 = /* @__PURE__ */ jsxRuntime.jsxs(cmdk.Command.Item, { onMouseDown: _temp2$1, onSelect: t3, className: t5, children: [
35007
35407
  t6,
35008
35408
  children
35009
35409
  ] });
@@ -35061,13 +35461,13 @@
35061
35461
  }
35062
35462
  return t7;
35063
35463
  });
35064
- function _temp$1(child) {
35464
+ function _temp$2(child) {
35065
35465
  if (React__namespace.isValidElement(child)) {
35066
35466
  return child.props.value;
35067
35467
  }
35068
35468
  return null;
35069
35469
  }
35070
- function _temp2(e) {
35470
+ function _temp2$1(e) {
35071
35471
  e.preventDefault();
35072
35472
  e.stopPropagation();
35073
35473
  }
@@ -35180,13 +35580,13 @@
35180
35580
  });
35181
35581
  RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
35182
35582
  function SearchBar(t0) {
35183
- const $ = reactCompilerRuntime.c(39);
35583
+ const $ = reactCompilerRuntime.c(47);
35184
35584
  const {
35185
35585
  onClick,
35186
35586
  onTextSearch,
35187
35587
  placeholder: t1,
35188
35588
  expandable: t2,
35189
- large: t3,
35589
+ size: t3,
35190
35590
  innerClassName,
35191
35591
  className,
35192
35592
  autoFocus,
@@ -35196,7 +35596,7 @@
35196
35596
  } = t0;
35197
35597
  const placeholder = t1 === void 0 ? "Search" : t1;
35198
35598
  const expandable = t2 === void 0 ? false : t2;
35199
- const large = t3 === void 0 ? false : t3;
35599
+ const size = t3 === void 0 ? "medium" : t3;
35200
35600
  const [searchText, setSearchText] = React.useState("");
35201
35601
  const [active, setActive] = React.useState(false);
35202
35602
  const deferredValues = useDebounceValue(searchText, 200);
@@ -35242,217 +35642,586 @@
35242
35642
  t6 = $[6];
35243
35643
  }
35244
35644
  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);
35645
+ const heightClass = size === "small" ? "h-[36px]" : "h-[44px]";
35646
+ const iconPaddingClass = size === "small" ? "px-2" : "px-4";
35647
+ const inputPaddingClass = size === "small" ? "pl-8" : "pl-12";
35648
+ let t7;
35649
+ if ($[7] !== className || $[8] !== heightClass) {
35650
+ t7 = cls("relative", heightClass, "bg-surface-accent-50 dark:bg-surface-800 border", defaultBorderMixin, "rounded-lg", className);
35249
35651
  $[7] = className;
35250
- $[8] = t7;
35251
- $[9] = t8;
35652
+ $[8] = heightClass;
35653
+ $[9] = t7;
35252
35654
  } else {
35253
- t8 = $[9];
35655
+ t7 = $[9];
35656
+ }
35657
+ let t8;
35658
+ if ($[10] !== iconPaddingClass) {
35659
+ t8 = cls("absolute p-0 h-full pointer-events-none flex items-center justify-center top-0", iconPaddingClass);
35660
+ $[10] = iconPaddingClass;
35661
+ $[11] = t8;
35662
+ } else {
35663
+ t8 = $[11];
35254
35664
  }
35255
35665
  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;
35666
+ if ($[12] !== loading || $[13] !== size) {
35667
+ 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" });
35668
+ $[12] = loading;
35669
+ $[13] = size;
35670
+ $[14] = t9;
35260
35671
  } else {
35261
- t9 = $[11];
35672
+ t9 = $[14];
35262
35673
  }
35263
- const t10 = searchText ?? "";
35264
- const t11 = !onTextSearch;
35265
- let t12;
35266
- if ($[12] !== onTextSearch) {
35267
- t12 = onTextSearch ? (event) => {
35674
+ let t10;
35675
+ if ($[15] !== t8 || $[16] !== t9) {
35676
+ t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t8, children: t9 });
35677
+ $[15] = t8;
35678
+ $[16] = t9;
35679
+ $[17] = t10;
35680
+ } else {
35681
+ t10 = $[17];
35682
+ }
35683
+ const t11 = searchText ?? "";
35684
+ const t12 = !onTextSearch;
35685
+ let t13;
35686
+ if ($[18] !== onTextSearch) {
35687
+ t13 = onTextSearch ? (event) => {
35268
35688
  setSearchText(event.target.value);
35269
35689
  } : void 0;
35270
- $[12] = onTextSearch;
35271
- $[13] = t12;
35690
+ $[18] = onTextSearch;
35691
+ $[19] = t13;
35272
35692
  } else {
35273
- t12 = $[13];
35693
+ t13 = $[19];
35274
35694
  }
35275
- let t13;
35276
35695
  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;
35696
+ let t15;
35697
+ if ($[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
35698
+ t14 = () => setActive(true);
35699
+ t15 = () => setActive(false);
35700
+ $[20] = t14;
35701
+ $[21] = t15;
35282
35702
  } else {
35283
- t13 = $[14];
35284
- t14 = $[15];
35703
+ t14 = $[20];
35704
+ t15 = $[21];
35285
35705
  }
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;
35706
+ const t16 = (disabled || loading) && "pointer-events-none";
35707
+ const t17 = size === "small" ? "text-sm" : "";
35708
+ const t18 = expandable ? active ? "w-[220px]" : "w-[180px]" : "";
35709
+ let t19;
35710
+ if ($[22] !== innerClassName || $[23] !== inputPaddingClass || $[24] !== t16 || $[25] !== t17 || $[26] !== t18) {
35711
+ 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);
35712
+ $[22] = innerClassName;
35713
+ $[23] = inputPaddingClass;
35714
+ $[24] = t16;
35715
+ $[25] = t17;
35716
+ $[26] = t18;
35717
+ $[27] = t19;
35295
35718
  } else {
35296
- t17 = $[19];
35719
+ t19 = $[27];
35297
35720
  }
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;
35721
+ let t20;
35722
+ if ($[28] !== autoFocus || $[29] !== inputRef || $[30] !== onClick || $[31] !== placeholder || $[32] !== t11 || $[33] !== t12 || $[34] !== t13 || $[35] !== t19) {
35723
+ t20 = /* @__PURE__ */ jsxRuntime.jsx("input", { value: t11, ref: inputRef, onClick, placeholder, readOnly: t12, onChange: t13, autoFocus, onFocus: t14, onBlur: t15, className: t19 });
35724
+ $[28] = autoFocus;
35725
+ $[29] = inputRef;
35726
+ $[30] = onClick;
35727
+ $[31] = placeholder;
35728
+ $[32] = t11;
35729
+ $[33] = t12;
35730
+ $[34] = t13;
35731
+ $[35] = t19;
35732
+ $[36] = t20;
35310
35733
  } else {
35311
- t18 = $[28];
35734
+ t20 = $[36];
35312
35735
  }
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: {
35736
+ let t21;
35737
+ if ($[37] !== clearText || $[38] !== searchText || $[39] !== size) {
35738
+ 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
35739
  width: 26
35317
35740
  } });
35318
- $[29] = clearText;
35319
- $[30] = large;
35320
- $[31] = searchText;
35321
- $[32] = t19;
35741
+ $[37] = clearText;
35742
+ $[38] = searchText;
35743
+ $[39] = size;
35744
+ $[40] = t21;
35322
35745
  } else {
35323
- t19 = $[32];
35746
+ t21 = $[40];
35324
35747
  }
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
35748
+ let t22;
35749
+ if ($[41] !== onClick || $[42] !== t10 || $[43] !== t20 || $[44] !== t21 || $[45] !== t7) {
35750
+ t22 = /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick, className: t7, children: [
35751
+ t10,
35752
+ t20,
35753
+ t21
35331
35754
  ] });
35332
- $[33] = onClick;
35333
- $[34] = t18;
35334
- $[35] = t19;
35335
- $[36] = t8;
35336
- $[37] = t9;
35337
- $[38] = t20;
35755
+ $[41] = onClick;
35756
+ $[42] = t10;
35757
+ $[43] = t20;
35758
+ $[44] = t21;
35759
+ $[45] = t7;
35760
+ $[46] = t22;
35338
35761
  } else {
35339
- t20 = $[38];
35762
+ t22 = $[46];
35340
35763
  }
35341
- return t20;
35764
+ return t22;
35342
35765
  }
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) => {
35766
+ const Select = React.forwardRef((t0, ref) => {
35767
+ const $ = reactCompilerRuntime.c(121);
35768
+ let children;
35769
+ let className;
35770
+ let disabled;
35771
+ let endAdornment;
35772
+ let error;
35773
+ let id;
35774
+ let inputClassName;
35775
+ let inputRef;
35776
+ let invisible;
35777
+ let label;
35778
+ let manualContainer;
35779
+ let name;
35780
+ let onChange;
35781
+ let onOpenChange;
35782
+ let onValueChange;
35783
+ let open;
35784
+ let placeholder;
35785
+ let props;
35786
+ let renderValue;
35787
+ let t1;
35788
+ let t2;
35789
+ let t3;
35790
+ let t4;
35791
+ let t5;
35792
+ let value;
35793
+ let viewportClassName;
35794
+ if ($[0] !== t0) {
35795
+ ({
35796
+ inputRef,
35797
+ open,
35798
+ name,
35799
+ fullWidth: t1,
35800
+ id,
35801
+ onOpenChange,
35802
+ value,
35803
+ onChange,
35804
+ onValueChange,
35805
+ className,
35806
+ inputClassName,
35807
+ viewportClassName,
35808
+ placeholder,
35809
+ renderValue,
35810
+ label,
35811
+ size: t2,
35812
+ error,
35813
+ disabled,
35814
+ padding: t3,
35815
+ position: t4,
35816
+ endAdornment,
35817
+ invisible,
35818
+ children,
35819
+ dataType: t5,
35820
+ portalContainer: manualContainer,
35821
+ ...props
35822
+ } = t0);
35823
+ $[0] = t0;
35824
+ $[1] = children;
35825
+ $[2] = className;
35826
+ $[3] = disabled;
35827
+ $[4] = endAdornment;
35828
+ $[5] = error;
35829
+ $[6] = id;
35830
+ $[7] = inputClassName;
35831
+ $[8] = inputRef;
35832
+ $[9] = invisible;
35833
+ $[10] = label;
35834
+ $[11] = manualContainer;
35835
+ $[12] = name;
35836
+ $[13] = onChange;
35837
+ $[14] = onOpenChange;
35838
+ $[15] = onValueChange;
35839
+ $[16] = open;
35840
+ $[17] = placeholder;
35841
+ $[18] = props;
35842
+ $[19] = renderValue;
35843
+ $[20] = t1;
35844
+ $[21] = t2;
35845
+ $[22] = t3;
35846
+ $[23] = t4;
35847
+ $[24] = t5;
35848
+ $[25] = value;
35849
+ $[26] = viewportClassName;
35850
+ } else {
35851
+ children = $[1];
35852
+ className = $[2];
35853
+ disabled = $[3];
35854
+ endAdornment = $[4];
35855
+ error = $[5];
35856
+ id = $[6];
35857
+ inputClassName = $[7];
35858
+ inputRef = $[8];
35859
+ invisible = $[9];
35860
+ label = $[10];
35861
+ manualContainer = $[11];
35862
+ name = $[12];
35863
+ onChange = $[13];
35864
+ onOpenChange = $[14];
35865
+ onValueChange = $[15];
35866
+ open = $[16];
35867
+ placeholder = $[17];
35868
+ props = $[18];
35869
+ renderValue = $[19];
35870
+ t1 = $[20];
35871
+ t2 = $[21];
35872
+ t3 = $[22];
35873
+ t4 = $[23];
35874
+ t5 = $[24];
35875
+ value = $[25];
35876
+ viewportClassName = $[26];
35877
+ }
35878
+ const fullWidth = t1 === void 0 ? false : t1;
35879
+ const size = t2 === void 0 ? "large" : t2;
35880
+ const padding = t3 === void 0 ? true : t3;
35881
+ const position = t4 === void 0 ? "item-aligned" : t4;
35882
+ const dataType = t5 === void 0 ? "string" : t5;
35370
35883
  const [openInternal, setOpenInternal] = React.useState(open ?? false);
35371
- 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);
35381
- }
35382
- onValueChange?.(typedValue);
35383
- if (onChange) {
35384
- const event = {
35385
- target: {
35386
- name,
35387
- value: typedValue
35884
+ let t6;
35885
+ let t7;
35886
+ if ($[27] !== open) {
35887
+ t6 = () => {
35888
+ setOpenInternal(open ?? false);
35889
+ };
35890
+ t7 = [open];
35891
+ $[27] = open;
35892
+ $[28] = t6;
35893
+ $[29] = t7;
35894
+ } else {
35895
+ t6 = $[28];
35896
+ t7 = $[29];
35897
+ }
35898
+ React.useEffect(t6, t7);
35899
+ const contextContainer = usePortalContainer();
35900
+ const finalContainer = manualContainer ?? contextContainer ?? void 0;
35901
+ let t8;
35902
+ if ($[30] !== dataType || $[31] !== name || $[32] !== onChange || $[33] !== onValueChange) {
35903
+ t8 = (newValue) => {
35904
+ let typedValue = newValue;
35905
+ if (dataType === "boolean") {
35906
+ if (newValue === "true") {
35907
+ typedValue = true;
35908
+ } else {
35909
+ if (newValue === "false") {
35910
+ typedValue = false;
35911
+ }
35388
35912
  }
35389
- };
35390
- onChange(event);
35391
- }
35392
- }, [onChange, onValueChange, name]);
35913
+ } else {
35914
+ if (dataType === "number") {
35915
+ if (!isNaN(Number(newValue)) && newValue.trim() !== "") {
35916
+ typedValue = Number(newValue);
35917
+ }
35918
+ }
35919
+ }
35920
+ onValueChange?.(typedValue);
35921
+ if (onChange) {
35922
+ const event = {
35923
+ target: {
35924
+ name,
35925
+ value: typedValue
35926
+ }
35927
+ };
35928
+ onChange(event);
35929
+ }
35930
+ };
35931
+ $[30] = dataType;
35932
+ $[31] = name;
35933
+ $[32] = onChange;
35934
+ $[33] = onValueChange;
35935
+ $[34] = t8;
35936
+ } else {
35937
+ t8 = $[34];
35938
+ }
35939
+ const onValueChangeInternal = t8;
35393
35940
  const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
35394
35941
  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, {
35942
+ let t9;
35943
+ bb0: {
35944
+ if (!hasValue || renderValue) {
35945
+ t9 = null;
35946
+ break bb0;
35947
+ }
35948
+ let found;
35949
+ if ($[35] !== children || $[36] !== value) {
35950
+ found = null;
35951
+ React.Children.forEach(children, (child) => {
35952
+ if (React.isValidElement(child) && String(child.props.value) === String(value)) {
35953
+ found = child.props.children;
35954
+ }
35955
+ });
35956
+ $[35] = children;
35957
+ $[36] = value;
35958
+ $[37] = found;
35959
+ } else {
35960
+ found = $[37];
35961
+ }
35962
+ t9 = found;
35963
+ }
35964
+ const displayChildren = t9;
35965
+ let t10;
35966
+ if ($[38] !== onOpenChange) {
35967
+ t10 = (open_0) => {
35968
+ onOpenChange?.(open_0);
35969
+ setOpenInternal(open_0);
35970
+ };
35971
+ $[38] = onOpenChange;
35972
+ $[39] = t10;
35973
+ } else {
35974
+ t10 = $[39];
35975
+ }
35976
+ let t11;
35977
+ if ($[40] !== error || $[41] !== label) {
35978
+ t11 = typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label;
35979
+ $[40] = error;
35980
+ $[41] = label;
35981
+ $[42] = t11;
35982
+ } else {
35983
+ t11 = $[42];
35984
+ }
35985
+ const t12 = invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin;
35986
+ const t13 = disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin;
35987
+ const t14 = size === "smallest";
35988
+ const t15 = size === "small";
35989
+ const t16 = size === "medium";
35990
+ const t17 = size === "large";
35991
+ const t18 = !fullWidth;
35992
+ let t19;
35993
+ if ($[43] !== className || $[44] !== fullWidth || $[45] !== t12 || $[46] !== t13 || $[47] !== t14 || $[48] !== t15 || $[49] !== t16 || $[50] !== t17 || $[51] !== t18) {
35994
+ t19 = cls("select-none rounded-md text-sm", t12, t13, "relative flex items-center", className, {
35995
+ "min-h-[28px]": t14,
35996
+ "min-h-[32px]": t15,
35997
+ "min-h-[44px]": t16,
35998
+ "min-h-[64px]": t17,
35999
+ "w-fit": t18,
36000
+ "w-full": fullWidth
36001
+ });
36002
+ $[43] = className;
36003
+ $[44] = fullWidth;
36004
+ $[45] = t12;
36005
+ $[46] = t13;
36006
+ $[47] = t14;
36007
+ $[48] = t15;
36008
+ $[49] = t16;
36009
+ $[50] = t17;
36010
+ $[51] = t18;
36011
+ $[52] = t19;
36012
+ } else {
36013
+ t19 = $[52];
36014
+ }
36015
+ let t20;
36016
+ if ($[53] !== disabled || $[54] !== error || $[55] !== fullWidth || $[56] !== inputClassName || $[57] !== padding || $[58] !== size) {
36017
+ t20 = cls("h-full", padding ? {
36018
+ "px-4": size === "large",
36019
+ "px-3": size === "medium",
36020
+ "px-2": size === "small" || size === "smallest"
36021
+ } : "", "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
36022
  "min-h-[28px]": size === "smallest",
35412
36023
  "min-h-[32px]": size === "small",
35413
36024
  "min-h-[44px]": size === "medium",
35414
36025
  "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: {
36026
+ "w-full": fullWidth,
36027
+ "w-fit": !fullWidth
36028
+ }, inputClassName);
36029
+ $[53] = disabled;
36030
+ $[54] = error;
36031
+ $[55] = fullWidth;
36032
+ $[56] = inputClassName;
36033
+ $[57] = padding;
36034
+ $[58] = size;
36035
+ $[59] = t20;
36036
+ } else {
36037
+ t20 = $[59];
36038
+ }
36039
+ const t21 = size === "smallest";
36040
+ const t22 = size === "small";
36041
+ const t23 = size === "medium";
36042
+ const t24 = size === "large";
36043
+ let t25;
36044
+ if ($[60] !== t21 || $[61] !== t22 || $[62] !== t23 || $[63] !== t24) {
36045
+ t25 = cls("flex-grow max-w-full flex flex-row gap-2 items-center", "overflow-visible", {
36046
+ "min-h-[28px]": t21,
36047
+ "min-h-[32px]": t22,
36048
+ "min-h-[44px]": t23,
36049
+ "min-h-[64px]": t24
36050
+ });
36051
+ $[60] = t21;
36052
+ $[61] = t22;
36053
+ $[62] = t23;
36054
+ $[63] = t24;
36055
+ $[64] = t25;
36056
+ } else {
36057
+ t25 = $[64];
36058
+ }
36059
+ let t26;
36060
+ if ($[65] !== displayChildren || $[66] !== hasValue || $[67] !== placeholder || $[68] !== renderValue || $[69] !== value) {
36061
+ t26 = hasValue && value !== void 0 && renderValue ? renderValue(value) : displayChildren || placeholder;
36062
+ $[65] = displayChildren;
36063
+ $[66] = hasValue;
36064
+ $[67] = placeholder;
36065
+ $[68] = renderValue;
36066
+ $[69] = value;
36067
+ $[70] = t26;
36068
+ } else {
36069
+ t26 = $[70];
36070
+ }
36071
+ let t27;
36072
+ if ($[71] !== placeholder || $[72] !== t26) {
36073
+ t27 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { onClick: _temp$1, placeholder, className: "w-full", children: t26 });
36074
+ $[71] = placeholder;
36075
+ $[72] = t26;
36076
+ $[73] = t27;
36077
+ } else {
36078
+ t27 = $[73];
36079
+ }
36080
+ let t28;
36081
+ if ($[74] !== ref || $[75] !== t25 || $[76] !== t27) {
36082
+ t28 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: t25, children: t27 });
36083
+ $[74] = ref;
36084
+ $[75] = t25;
36085
+ $[76] = t27;
36086
+ $[77] = t28;
36087
+ } else {
36088
+ t28 = $[77];
36089
+ }
36090
+ const t29 = size === "large" ? "medium" : "small";
36091
+ const t30 = open ? "rotate-180" : "";
36092
+ const t31 = size === "large";
36093
+ const t32 = size === "medium" || size === "small";
36094
+ let t33;
36095
+ if ($[78] !== t30 || $[79] !== t31 || $[80] !== t32) {
36096
+ t33 = cls("transition", t30, {
36097
+ "px-2": t31,
36098
+ "px-1": t32
36099
+ });
36100
+ $[78] = t30;
36101
+ $[79] = t31;
36102
+ $[80] = t32;
36103
+ $[81] = t33;
36104
+ } else {
36105
+ t33 = $[81];
36106
+ }
36107
+ let t34;
36108
+ if ($[82] !== t29 || $[83] !== t33) {
36109
+ t34 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(KeyboardArrowDownIcon, { size: t29, className: t33 }) });
36110
+ $[82] = t29;
36111
+ $[83] = t33;
36112
+ $[84] = t34;
36113
+ } else {
36114
+ t34 = $[84];
36115
+ }
36116
+ let t35;
36117
+ if ($[85] !== id || $[86] !== inputRef || $[87] !== t20 || $[88] !== t28 || $[89] !== t34) {
36118
+ t35 = /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Trigger, { ref: inputRef, id, asChild: false, type: "button", className: t20, children: [
36119
+ t28,
36120
+ t34
36121
+ ] });
36122
+ $[85] = id;
36123
+ $[86] = inputRef;
36124
+ $[87] = t20;
36125
+ $[88] = t28;
36126
+ $[89] = t34;
36127
+ $[90] = t35;
36128
+ } else {
36129
+ t35 = $[90];
36130
+ }
36131
+ let t36;
36132
+ if ($[91] !== endAdornment) {
36133
+ t36 = endAdornment && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls("h-full flex items-center absolute right-0 pr-12"), onClick: _temp2, children: endAdornment });
36134
+ $[91] = endAdornment;
36135
+ $[92] = t36;
36136
+ } else {
36137
+ t36 = $[92];
36138
+ }
36139
+ let t37;
36140
+ if ($[93] !== t19 || $[94] !== t35 || $[95] !== t36) {
36141
+ t37 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
36142
+ t35,
36143
+ t36
36144
+ ] });
36145
+ $[93] = t19;
36146
+ $[94] = t35;
36147
+ $[95] = t36;
36148
+ $[96] = t37;
36149
+ } else {
36150
+ t37 = $[96];
36151
+ }
36152
+ let t38;
36153
+ if ($[97] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36154
+ t38 = cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin);
36155
+ $[97] = t38;
36156
+ } else {
36157
+ t38 = $[97];
36158
+ }
36159
+ let t39;
36160
+ if ($[98] !== viewportClassName) {
36161
+ t39 = cls("p-1", viewportClassName);
36162
+ $[98] = viewportClassName;
36163
+ $[99] = t39;
36164
+ } else {
36165
+ t39 = $[99];
36166
+ }
36167
+ let t40;
36168
+ if ($[100] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36169
+ t40 = {
35453
36170
  maxHeight: "var(--radix-select-content-available-height)"
35454
- }, children }) }) })
35455
- ] });
36171
+ };
36172
+ $[100] = t40;
36173
+ } else {
36174
+ t40 = $[100];
36175
+ }
36176
+ let t41;
36177
+ if ($[101] !== children || $[102] !== t39) {
36178
+ t41 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: t39, style: t40, children });
36179
+ $[101] = children;
36180
+ $[102] = t39;
36181
+ $[103] = t41;
36182
+ } else {
36183
+ t41 = $[103];
36184
+ }
36185
+ let t42;
36186
+ if ($[104] !== position || $[105] !== t41) {
36187
+ t42 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Content, { position, className: t38, children: t41 });
36188
+ $[104] = position;
36189
+ $[105] = t41;
36190
+ $[106] = t42;
36191
+ } else {
36192
+ t42 = $[106];
36193
+ }
36194
+ let t43;
36195
+ if ($[107] !== finalContainer || $[108] !== t42) {
36196
+ t43 = /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { container: finalContainer, children: t42 });
36197
+ $[107] = finalContainer;
36198
+ $[108] = t42;
36199
+ $[109] = t43;
36200
+ } else {
36201
+ t43 = $[109];
36202
+ }
36203
+ let t44;
36204
+ if ($[110] !== disabled || $[111] !== name || $[112] !== onValueChangeInternal || $[113] !== openInternal || $[114] !== props || $[115] !== stringValue || $[116] !== t10 || $[117] !== t11 || $[118] !== t37 || $[119] !== t43) {
36205
+ t44 = /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Root, { name, value: stringValue, open: openInternal, disabled, onValueChange: onValueChangeInternal, onOpenChange: t10, ...props, children: [
36206
+ t11,
36207
+ t37,
36208
+ t43
36209
+ ] });
36210
+ $[110] = disabled;
36211
+ $[111] = name;
36212
+ $[112] = onValueChangeInternal;
36213
+ $[113] = openInternal;
36214
+ $[114] = props;
36215
+ $[115] = stringValue;
36216
+ $[116] = t10;
36217
+ $[117] = t11;
36218
+ $[118] = t37;
36219
+ $[119] = t43;
36220
+ $[120] = t44;
36221
+ } else {
36222
+ t44 = $[120];
36223
+ }
36224
+ return t44;
35456
36225
  });
35457
36226
  Select.displayName = "Select";
35458
36227
  const SelectItem = React.memo(function SelectItem2(t0) {
@@ -35543,6 +36312,14 @@
35543
36312
  }
35544
36313
  return t3;
35545
36314
  });
36315
+ function _temp$1(e) {
36316
+ e.preventDefault();
36317
+ e.stopPropagation();
36318
+ }
36319
+ function _temp2(e_0) {
36320
+ e_0.preventDefault();
36321
+ e_0.stopPropagation();
36322
+ }
35546
36323
  function SliderThumb(props) {
35547
36324
  const $ = reactCompilerRuntime.c(13);
35548
36325
  const t0 = props.hovered;
@@ -35552,7 +36329,7 @@
35552
36329
  t2 = cls({
35553
36330
  "border-primary bg-primary outline-none": t1,
35554
36331
  "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");
36332
+ }, 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
36333
  $[0] = props.classes;
35557
36334
  $[1] = props.props.disabled;
35558
36335
  $[2] = t1;
@@ -35570,7 +36347,7 @@
35570
36347
  }
35571
36348
  let t4;
35572
36349
  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");
36350
+ 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
36351
  $[6] = t4;
35575
36352
  } else {
35576
36353
  t4 = $[6];
@@ -35675,7 +36452,7 @@
35675
36452
  }
35676
36453
  let t10;
35677
36454
  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 });
36455
+ 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
36456
  $[15] = t6;
35680
36457
  $[16] = t9;
35681
36458
  $[17] = t10;
@@ -35730,13 +36507,14 @@
35730
36507
  });
35731
36508
  Slider.displayName = "Slider";
35732
36509
  const Sheet = (t0) => {
35733
- const $ = reactCompilerRuntime.c(66);
36510
+ const $ = reactCompilerRuntime.c(70);
35734
36511
  let children;
35735
36512
  let className;
35736
36513
  let onOpenChange;
35737
36514
  let open;
35738
36515
  let overlayClassName;
35739
36516
  let overlayStyle;
36517
+ let portalContainer;
35740
36518
  let props;
35741
36519
  let style;
35742
36520
  let t1;
@@ -35758,6 +36536,7 @@
35758
36536
  style,
35759
36537
  overlayClassName,
35760
36538
  overlayStyle,
36539
+ portalContainer,
35761
36540
  ...props
35762
36541
  } = t0);
35763
36542
  $[0] = t0;
@@ -35767,13 +36546,14 @@
35767
36546
  $[4] = open;
35768
36547
  $[5] = overlayClassName;
35769
36548
  $[6] = overlayStyle;
35770
- $[7] = props;
35771
- $[8] = style;
35772
- $[9] = t1;
35773
- $[10] = t2;
35774
- $[11] = t3;
35775
- $[12] = title;
35776
- $[13] = transparent;
36549
+ $[7] = portalContainer;
36550
+ $[8] = props;
36551
+ $[9] = style;
36552
+ $[10] = t1;
36553
+ $[11] = t2;
36554
+ $[12] = t3;
36555
+ $[13] = title;
36556
+ $[14] = transparent;
35777
36557
  } else {
35778
36558
  children = $[1];
35779
36559
  className = $[2];
@@ -35781,21 +36561,24 @@
35781
36561
  open = $[4];
35782
36562
  overlayClassName = $[5];
35783
36563
  overlayStyle = $[6];
35784
- props = $[7];
35785
- style = $[8];
35786
- t1 = $[9];
35787
- t2 = $[10];
35788
- t3 = $[11];
35789
- title = $[12];
35790
- transparent = $[13];
36564
+ portalContainer = $[7];
36565
+ props = $[8];
36566
+ style = $[9];
36567
+ t1 = $[10];
36568
+ t2 = $[11];
36569
+ t3 = $[12];
36570
+ title = $[13];
36571
+ transparent = $[14];
35791
36572
  }
35792
36573
  const side = t1 === void 0 ? "right" : t1;
35793
36574
  const modal = t2 === void 0 ? true : t2;
35794
36575
  const includeBackgroundOverlay = t3 === void 0 ? true : t3;
35795
36576
  const [displayed, setDisplayed] = React.useState(false);
36577
+ const contextContainer = usePortalContainer();
36578
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
35796
36579
  let t4;
35797
36580
  let t5;
35798
- if ($[14] !== open) {
36581
+ if ($[15] !== open) {
35799
36582
  t4 = () => {
35800
36583
  const timeout = setTimeout(() => {
35801
36584
  setDisplayed(open);
@@ -35803,12 +36586,12 @@
35803
36586
  return () => clearTimeout(timeout);
35804
36587
  };
35805
36588
  t5 = [open];
35806
- $[14] = open;
35807
- $[15] = t4;
35808
- $[16] = t5;
36589
+ $[15] = open;
36590
+ $[16] = t4;
36591
+ $[17] = t5;
35809
36592
  } else {
35810
- t4 = $[15];
35811
- t5 = $[16];
36593
+ t4 = $[16];
36594
+ t5 = $[17];
35812
36595
  }
35813
36596
  React.useEffect(t4, t5);
35814
36597
  let T0;
@@ -35818,11 +36601,12 @@
35818
36601
  let t11;
35819
36602
  let t12;
35820
36603
  let t13;
36604
+ let t14;
35821
36605
  let t6;
35822
36606
  let t7;
35823
36607
  let t8;
35824
36608
  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) {
36609
+ 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
36610
  const transformValue = {
35827
36611
  top: "-translate-y-full",
35828
36612
  bottom: "translate-y-full",
@@ -35836,113 +36620,118 @@
35836
36620
  right: "border-l"
35837
36621
  };
35838
36622
  T2 = DialogPrimitive__namespace.Root;
35839
- t11 = displayed || open;
35840
- t12 = modal;
35841
- t13 = onOpenChange;
36623
+ t12 = displayed || open;
36624
+ t13 = modal;
36625
+ t14 = onOpenChange;
35842
36626
  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;
36627
+ t9 = finalContainer;
36628
+ const t152 = title ?? "Sheet";
36629
+ if ($[43] !== t152) {
36630
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { autoFocus: true, tabIndex: 0, children: t152 });
36631
+ $[43] = t152;
36632
+ $[44] = t10;
35848
36633
  } else {
35849
- t9 = $[41];
36634
+ t10 = $[44];
35850
36635
  }
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: {
36636
+ if ($[45] !== displayed || $[46] !== includeBackgroundOverlay || $[47] !== open || $[48] !== overlayClassName || $[49] !== overlayStyle) {
36637
+ 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
36638
  pointerEvents: displayed ? "auto" : "none",
35854
36639
  ...overlayStyle
35855
36640
  } });
35856
- $[42] = displayed;
35857
- $[43] = includeBackgroundOverlay;
35858
- $[44] = open;
35859
- $[45] = overlayClassName;
35860
- $[46] = overlayStyle;
35861
- $[47] = t10;
36641
+ $[45] = displayed;
36642
+ $[46] = includeBackgroundOverlay;
36643
+ $[47] = open;
36644
+ $[48] = overlayClassName;
36645
+ $[49] = overlayStyle;
36646
+ $[50] = t11;
35862
36647
  } else {
35863
- t10 = $[47];
36648
+ t11 = $[50];
35864
36649
  }
35865
36650
  T0 = DialogPrimitive__namespace.Content;
35866
36651
  t6 = props;
35867
36652
  t7 = _temp;
35868
36653
  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];
36654
+ $[18] = className;
36655
+ $[19] = displayed;
36656
+ $[20] = finalContainer;
36657
+ $[21] = includeBackgroundOverlay;
36658
+ $[22] = modal;
36659
+ $[23] = onOpenChange;
36660
+ $[24] = open;
36661
+ $[25] = overlayClassName;
36662
+ $[26] = overlayStyle;
36663
+ $[27] = props;
36664
+ $[28] = side;
36665
+ $[29] = title;
36666
+ $[30] = transparent;
36667
+ $[31] = T0;
36668
+ $[32] = T1;
36669
+ $[33] = T2;
36670
+ $[34] = t10;
36671
+ $[35] = t11;
36672
+ $[36] = t12;
36673
+ $[37] = t13;
36674
+ $[38] = t14;
36675
+ $[39] = t6;
36676
+ $[40] = t7;
36677
+ $[41] = t8;
36678
+ $[42] = t9;
36679
+ } else {
36680
+ T0 = $[31];
36681
+ T1 = $[32];
36682
+ T2 = $[33];
36683
+ t10 = $[34];
36684
+ t11 = $[35];
36685
+ t12 = $[36];
36686
+ t13 = $[37];
36687
+ t14 = $[38];
36688
+ t6 = $[39];
36689
+ t7 = $[40];
36690
+ t8 = $[41];
36691
+ t9 = $[42];
35917
36692
  }
35918
36693
  let t15;
35919
- if ($[55] !== T1 || $[56] !== t10 || $[57] !== t14 || $[58] !== t9) {
35920
- t15 = /* @__PURE__ */ jsxRuntime.jsxs(T1, { children: [
35921
- t9,
36694
+ if ($[51] !== T0 || $[52] !== children || $[53] !== style || $[54] !== t6 || $[55] !== t7 || $[56] !== t8) {
36695
+ t15 = /* @__PURE__ */ jsxRuntime.jsx(T0, { ...t6, onFocusCapture: t7, className: t8, style, children });
36696
+ $[51] = T0;
36697
+ $[52] = children;
36698
+ $[53] = style;
36699
+ $[54] = t6;
36700
+ $[55] = t7;
36701
+ $[56] = t8;
36702
+ $[57] = t15;
36703
+ } else {
36704
+ t15 = $[57];
36705
+ }
36706
+ let t16;
36707
+ if ($[58] !== T1 || $[59] !== t10 || $[60] !== t11 || $[61] !== t15 || $[62] !== t9) {
36708
+ t16 = /* @__PURE__ */ jsxRuntime.jsxs(T1, { container: t9, children: [
35922
36709
  t10,
35923
- t14
36710
+ t11,
36711
+ t15
35924
36712
  ] });
35925
- $[55] = T1;
35926
- $[56] = t10;
35927
- $[57] = t14;
35928
- $[58] = t9;
35929
- $[59] = t15;
36713
+ $[58] = T1;
36714
+ $[59] = t10;
36715
+ $[60] = t11;
36716
+ $[61] = t15;
36717
+ $[62] = t9;
36718
+ $[63] = t16;
35930
36719
  } else {
35931
- t15 = $[59];
36720
+ t16 = $[63];
35932
36721
  }
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;
36722
+ let t17;
36723
+ if ($[64] !== T2 || $[65] !== t12 || $[66] !== t13 || $[67] !== t14 || $[68] !== t16) {
36724
+ t17 = /* @__PURE__ */ jsxRuntime.jsx(T2, { open: t12, modal: t13, onOpenChange: t14, children: t16 });
36725
+ $[64] = T2;
36726
+ $[65] = t12;
36727
+ $[66] = t13;
36728
+ $[67] = t14;
36729
+ $[68] = t16;
36730
+ $[69] = t17;
36731
+ } else {
36732
+ t17 = $[69];
36733
+ }
36734
+ return t17;
35946
36735
  };
35947
36736
  function _temp(event) {
35948
36737
  return event.preventDefault();
@@ -35950,7 +36739,7 @@
35950
36739
  function getStyleValue(value) {
35951
36740
  return parseInt(value, 10) || 0;
35952
36741
  }
35953
- const styles$1 = {
36742
+ const styles = {
35954
36743
  shadow: {
35955
36744
  // Visibility needed to hide the extra text area on iPads
35956
36745
  visibility: "hidden",
@@ -36143,7 +36932,7 @@
36143
36932
  ),
36144
36933
  /* @__PURE__ */ jsxRuntime.jsx("textarea", { "aria-hidden": true, className: cls(props.className, props.shadowClassName), readOnly: true, ref: shadowRef, tabIndex: -1, style: {
36145
36934
  padding: 0,
36146
- ...styles$1.shadow,
36935
+ ...styles.shadow,
36147
36936
  ...style
36148
36937
  } })
36149
36938
  ] });
@@ -36190,8 +36979,13 @@
36190
36979
  ...inputProps
36191
36980
  }, ref) => {
36192
36981
  const inputRef = inputRefProp ?? React.useRef(null);
36193
- const [focused, setFocused] = React.useState(document.activeElement === inputRef.current);
36982
+ const [focused, setFocused] = React.useState(false);
36194
36983
  const hasValue = value !== void 0 && value !== null && value !== "";
36984
+ React.useEffect(() => {
36985
+ if (inputRef.current && document.activeElement === inputRef.current) {
36986
+ setFocused(true);
36987
+ }
36988
+ }, []);
36195
36989
  React.useEffect(() => {
36196
36990
  if (type !== "number") return;
36197
36991
  const handleWheel = (event) => {
@@ -36203,12 +36997,12 @@
36203
36997
  element?.removeEventListener("wheel", handleWheel);
36204
36998
  };
36205
36999
  }, [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, {
37000
+ 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
37001
  "min-h-[28px]": size === "smallest",
36208
37002
  "min-h-[32px]": size === "small",
36209
37003
  "min-h-[44px]": size === "medium",
36210
37004
  "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 });
37005
+ }, 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
37006
  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
37007
  "min-h-[28px]": size === "smallest",
36214
37008
  "min-h-[32px]": size === "small",
@@ -36225,215 +37019,161 @@
36225
37019
  ] });
36226
37020
  });
36227
37021
  TextField.displayName = "TextField";
36228
- const Tooltip = (t0) => {
36229
- const $ = reactCompilerRuntime.c(28);
37022
+ function Tabs(t0) {
37023
+ const $ = reactCompilerRuntime.c(26);
36230
37024
  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,
37025
+ value,
37026
+ onValueChange,
36244
37027
  className,
36245
- style
37028
+ innerClassName,
37029
+ children
36246
37030
  } = 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;
37031
+ const scrollContainerRef = React.useRef(null);
37032
+ const [showLeftScroll, setShowLeftScroll] = React.useState(false);
37033
+ const [showRightScroll, setShowRightScroll] = React.useState(false);
37034
+ const [isScrollable, setIsScrollable] = React.useState(false);
37035
+ let t1;
37036
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
37037
+ t1 = () => {
37038
+ if (scrollContainerRef.current) {
37039
+ const {
37040
+ scrollLeft,
37041
+ scrollWidth,
37042
+ clientWidth
37043
+ } = scrollContainerRef.current;
37044
+ setShowLeftScroll(scrollLeft > 0);
37045
+ setShowRightScroll(Math.ceil(scrollLeft + clientWidth) < scrollWidth);
37046
+ setIsScrollable(scrollWidth > clientWidth);
37047
+ }
37048
+ };
37049
+ $[0] = t1;
37050
+ } else {
37051
+ t1 = $[0];
37052
+ }
37053
+ const checkScroll = t1;
37054
+ let t2;
37055
+ if ($[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
37056
+ t2 = () => {
37057
+ checkScroll();
37058
+ window.addEventListener("resize", checkScroll);
37059
+ let observer;
37060
+ if (scrollContainerRef.current) {
37061
+ observer = new ResizeObserver(checkScroll);
37062
+ observer.observe(scrollContainerRef.current);
37063
+ if (scrollContainerRef.current.firstElementChild) {
37064
+ observer.observe(scrollContainerRef.current.firstElementChild);
37065
+ }
37066
+ }
37067
+ return () => {
37068
+ window.removeEventListener("resize", checkScroll);
37069
+ observer?.disconnect();
37070
+ };
37071
+ };
37072
+ $[1] = t2;
37073
+ } else {
37074
+ t2 = $[1];
37075
+ }
37076
+ let t3;
37077
+ if ($[2] !== children) {
37078
+ t3 = [children];
37079
+ $[2] = children;
37080
+ $[3] = t3;
37081
+ } else {
37082
+ t3 = $[3];
36261
37083
  }
37084
+ React.useEffect(t2, t3);
36262
37085
  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;
37086
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
37087
+ t4 = (direction) => {
37088
+ if (scrollContainerRef.current) {
37089
+ const container = scrollContainerRef.current;
37090
+ const scrollAmount = Math.max(container.clientWidth / 2, 200);
37091
+ const targetScroll = container.scrollLeft + (direction === "left" ? -scrollAmount : scrollAmount);
37092
+ container.scrollTo({
37093
+ left: targetScroll,
37094
+ behavior: "smooth"
37095
+ });
37096
+ }
37097
+ };
37098
+ $[4] = t4;
36270
37099
  } else {
36271
- t4 = $[6];
37100
+ t4 = $[4];
36272
37101
  }
36273
- const trigger = t4;
37102
+ const scroll = t4;
36274
37103
  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;
37104
+ if ($[5] !== className) {
37105
+ t5 = cls("flex flex-row items-center min-w-0", className);
37106
+ $[5] = className;
37107
+ $[6] = t5;
36279
37108
  } else {
36280
- t5 = $[8];
37109
+ t5 = $[6];
37110
+ }
37111
+ let t6;
37112
+ if ($[7] !== isScrollable || $[8] !== showLeftScroll) {
37113
+ t6 = 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", "mr-1 bg-surface-50 dark:bg-surface-900 border", defaultBorderMixin), children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { size: "small" }) });
37114
+ $[7] = isScrollable;
37115
+ $[8] = showLeftScroll;
37116
+ $[9] = t6;
37117
+ } else {
37118
+ t6 = $[9];
36281
37119
  }
36282
- const t6 = sideOffset === void 0 ? 4 : sideOffset;
36283
37120
  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;
37121
+ if ($[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
37122
+ t7 = {
37123
+ scrollbarWidth: "none",
37124
+ msOverflowStyle: "none"
37125
+ };
37126
+ $[10] = t7;
36293
37127
  } else {
36294
- t7 = $[15];
37128
+ t7 = $[10];
36295
37129
  }
36296
37130
  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;
37131
+ if ($[11] !== innerClassName) {
37132
+ t8 = cls("border", defaultBorderMixin, "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", innerClassName);
37133
+ $[11] = innerClassName;
37134
+ $[12] = t8;
36302
37135
  } else {
36303
- t8 = $[18];
37136
+ t8 = $[12];
36304
37137
  }
36305
37138
  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;
37139
+ if ($[13] !== children || $[14] !== t8) {
37140
+ t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollContainerRef, className: "flex-1 overflow-x-auto no-scrollbar min-w-0", onScroll: checkScroll, style: t7, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.List, { className: t8, children }) });
37141
+ $[13] = children;
37142
+ $[14] = t8;
37143
+ $[15] = t9;
36317
37144
  } else {
36318
- t9 = $[24];
37145
+ t9 = $[15];
36319
37146
  }
36320
37147
  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;
37148
+ if ($[16] !== isScrollable || $[17] !== showRightScroll) {
37149
+ t10 = 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", "ml-1 bg-surface-50 dark:bg-surface-900 border", defaultBorderMixin), children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, { size: "small" }) });
37150
+ $[16] = isScrollable;
37151
+ $[17] = showRightScroll;
37152
+ $[18] = t10;
36326
37153
  } else {
36327
- t10 = $[27];
37154
+ t10 = $[18];
36328
37155
  }
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;
36410
- } else {
36411
- t1 = $[1];
36412
- }
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;
36419
- } else {
36420
- t2 = $[4];
36421
- }
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;
37156
+ let t11;
37157
+ if ($[19] !== onValueChange || $[20] !== t10 || $[21] !== t5 || $[22] !== t6 || $[23] !== t9 || $[24] !== value) {
37158
+ t11 = /* @__PURE__ */ jsxRuntime.jsxs(TabsPrimitive__namespace.Root, { value, onValueChange, className: t5, children: [
37159
+ t6,
37160
+ t9,
37161
+ t10
37162
+ ] });
37163
+ $[19] = onValueChange;
37164
+ $[20] = t10;
37165
+ $[21] = t5;
37166
+ $[22] = t6;
37167
+ $[23] = t9;
37168
+ $[24] = value;
37169
+ $[25] = t11;
36430
37170
  } else {
36431
- t3 = $[9];
37171
+ t11 = $[25];
36432
37172
  }
36433
- return t3;
37173
+ return t11;
36434
37174
  }
36435
37175
  function Tab(t0) {
36436
- const $ = reactCompilerRuntime.c(13);
37176
+ const $ = reactCompilerRuntime.c(8);
36437
37177
  const {
36438
37178
  value,
36439
37179
  className,
@@ -36442,43 +37182,26 @@
36442
37182
  disabled
36443
37183
  } = t0;
36444
37184
  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);
37185
+ if ($[0] !== className || $[1] !== innerClassName) {
37186
+ t1 = 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", className, innerClassName);
36447
37187
  $[0] = className;
36448
- $[1] = disabled;
37188
+ $[1] = innerClassName;
36449
37189
  $[2] = t1;
36450
37190
  } else {
36451
37191
  t1 = $[2];
36452
37192
  }
36453
37193
  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
- 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;
36467
- } else {
36468
- t3 = $[7];
36469
- }
36470
- 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;
37194
+ if ($[3] !== children || $[4] !== disabled || $[5] !== t1 || $[6] !== value) {
37195
+ t2 = /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Trigger, { value, disabled, className: t1, children });
37196
+ $[3] = children;
37197
+ $[4] = disabled;
37198
+ $[5] = t1;
37199
+ $[6] = value;
37200
+ $[7] = t2;
36478
37201
  } else {
36479
- t4 = $[12];
37202
+ t2 = $[7];
36480
37203
  }
36481
- return t4;
37204
+ return t2;
36482
37205
  }
36483
37206
  const Table = React.memo((t0) => {
36484
37207
  const $ = reactCompilerRuntime.c(12);
@@ -36547,7 +37270,7 @@
36547
37270
  }
36548
37271
  let t1;
36549
37272
  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);
37273
+ 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
37274
  $[4] = className;
36552
37275
  $[5] = t1;
36553
37276
  } else {
@@ -36722,6 +37445,8 @@
36722
37445
  const enabled = t2 === void 0 ? true : t2;
36723
37446
  const modal = t3 === void 0 ? false : t3;
36724
37447
  useInjectStyles("Popover", popoverStyles);
37448
+ const contextContainer = usePortalContainer();
37449
+ const finalContainer = portalContainer ?? contextContainer ?? void 0;
36725
37450
  if (!enabled) {
36726
37451
  let t42;
36727
37452
  if ($[0] !== trigger) {
@@ -36777,9 +37502,9 @@
36777
37502
  t7 = $[17];
36778
37503
  }
36779
37504
  let t8;
36780
- if ($[18] !== portalContainer || $[19] !== t7) {
36781
- t8 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container: portalContainer, children: t7 });
36782
- $[18] = portalContainer;
37505
+ if ($[18] !== finalContainer || $[19] !== t7) {
37506
+ t8 = /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container: finalContainer, children: t7 });
37507
+ $[18] = finalContainer;
36783
37508
  $[19] = t7;
36784
37509
  $[20] = t8;
36785
37510
  } else {
@@ -36803,7 +37528,7 @@
36803
37528
  return t9;
36804
37529
  }
36805
37530
  const popoverStyles = `
36806
-
37531
+ /* ... (styles remain unchanged) ... */
36807
37532
  .PopoverContent {
36808
37533
  animation-duration: 400ms;
36809
37534
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
@@ -36822,7 +37547,6 @@
36822
37547
  animation-name: slideRightAndFade;
36823
37548
  }
36824
37549
 
36825
-
36826
37550
  @keyframes slideUpAndFade {
36827
37551
  from {
36828
37552
  opacity: 0;
@@ -36920,7 +37644,7 @@
36920
37644
  Badge.displayName = "Badge";
36921
37645
  function DebouncedTextField(props) {
36922
37646
  const $ = reactCompilerRuntime.c(13);
36923
- const previousEventRef = React.useRef();
37647
+ const previousEventRef = React.useRef(void 0);
36924
37648
  const [internalValue, setInternalValue] = React.useState(props.value);
36925
37649
  const deferredValue = React.useDeferredValue(internalValue);
36926
37650
  let t0;
@@ -37027,6 +37751,60 @@
37027
37751
  }
37028
37752
  return t5;
37029
37753
  }
37754
+ function ToggleButtonGroup(t0) {
37755
+ const $ = reactCompilerRuntime.c(12);
37756
+ const {
37757
+ value,
37758
+ onValueChange,
37759
+ options,
37760
+ className
37761
+ } = t0;
37762
+ let t1;
37763
+ if ($[0] !== className) {
37764
+ t1 = cls("inline-flex flex-row bg-surface-100 dark:bg-surface-800 rounded-lg p-1 gap-1", className);
37765
+ $[0] = className;
37766
+ $[1] = t1;
37767
+ } else {
37768
+ t1 = $[1];
37769
+ }
37770
+ let t2;
37771
+ if ($[2] !== onValueChange || $[3] !== options || $[4] !== value) {
37772
+ let t32;
37773
+ if ($[6] !== onValueChange || $[7] !== value) {
37774
+ t32 = (option) => /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: (e) => {
37775
+ e.stopPropagation();
37776
+ if (!option.disabled) {
37777
+ onValueChange(option.value);
37778
+ }
37779
+ }, 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: [
37780
+ option.icon,
37781
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: option.label })
37782
+ ] }, option.value);
37783
+ $[6] = onValueChange;
37784
+ $[7] = value;
37785
+ $[8] = t32;
37786
+ } else {
37787
+ t32 = $[8];
37788
+ }
37789
+ t2 = options.map(t32);
37790
+ $[2] = onValueChange;
37791
+ $[3] = options;
37792
+ $[4] = value;
37793
+ $[5] = t2;
37794
+ } else {
37795
+ t2 = $[5];
37796
+ }
37797
+ let t3;
37798
+ if ($[9] !== t1 || $[10] !== t2) {
37799
+ t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t1, children: t2 });
37800
+ $[9] = t1;
37801
+ $[10] = t2;
37802
+ $[11] = t3;
37803
+ } else {
37804
+ t3 = $[11];
37805
+ }
37806
+ return t3;
37807
+ }
37030
37808
  exports2.AbcIcon = AbcIcon;
37031
37809
  exports2.AcUnitIcon = AcUnitIcon;
37032
37810
  exports2.AccessAlarmIcon = AccessAlarmIcon;
@@ -37414,6 +38192,7 @@
37414
38192
  exports2.CollectionsBookmarkIcon = CollectionsBookmarkIcon;
37415
38193
  exports2.CollectionsIcon = CollectionsIcon;
37416
38194
  exports2.ColorLensIcon = ColorLensIcon;
38195
+ exports2.ColorPicker = ColorPicker;
37417
38196
  exports2.ColorizeIcon = ColorizeIcon;
37418
38197
  exports2.CommentBankIcon = CommentBankIcon;
37419
38198
  exports2.CommentIcon = CommentIcon;
@@ -38530,6 +39309,7 @@
38530
39309
  exports2.PoolIcon = PoolIcon;
38531
39310
  exports2.Popover = Popover;
38532
39311
  exports2.PortableWifiOffIcon = PortableWifiOffIcon;
39312
+ exports2.PortalContainerProvider = PortalContainerProvider;
38533
39313
  exports2.PortraitIcon = PortraitIcon;
38534
39314
  exports2.PostAddIcon = PostAddIcon;
38535
39315
  exports2.PowerIcon = PowerIcon;
@@ -39036,6 +39816,7 @@
39036
39816
  exports2.TitleIcon = TitleIcon;
39037
39817
  exports2.TocIcon = TocIcon;
39038
39818
  exports2.TodayIcon = TodayIcon;
39819
+ exports2.ToggleButtonGroup = ToggleButtonGroup;
39039
39820
  exports2.ToggleOffIcon = ToggleOffIcon;
39040
39821
  exports2.ToggleOnIcon = ToggleOnIcon;
39041
39822
  exports2.TokenIcon = TokenIcon;
@@ -39326,6 +40107,7 @@
39326
40107
  exports2.useIconStyles = useIconStyles;
39327
40108
  exports2.useInjectStyles = useInjectStyles;
39328
40109
  exports2.useOutsideAlerter = useOutsideAlerter;
40110
+ exports2.usePortalContainer = usePortalContainer;
39329
40111
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
39330
40112
  }));
39331
40113
  //# sourceMappingURL=index.umd.js.map