@refineui/react 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -209,7 +209,7 @@ __export(index_exports, {
209
209
  ResizableHandle: () => ResizableHandle,
210
210
  ResizablePanel: () => ResizablePanel,
211
211
  ResizablePanelGroup: () => ResizablePanelGroup,
212
- SEMANTIC_TEXT: () => import_tokens38.SEMANTIC_TEXT,
212
+ SEMANTIC_TEXT: () => import_tokens39.SEMANTIC_TEXT,
213
213
  ScrollArea: () => ScrollArea,
214
214
  ScrollAreaScrollbar: () => ScrollAreaScrollbar,
215
215
  ScrollAreaThumb: () => ScrollAreaThumb,
@@ -456,16 +456,16 @@ var componentColorTokens = {
456
456
  },
457
457
  tooltip: {
458
458
  default: {
459
- /** Menu / Select floating panel semantic */
460
- background: semanticToken("backgroundPrimary"),
459
+ /** Frosted floating panel — blur is applied by refineui.css */
460
+ background: semanticToken("surfaceFrosted"),
461
461
  foreground: semanticToken("foregroundPrimary"),
462
462
  border: semanticToken("borderDefault")
463
463
  }
464
464
  },
465
465
  popover: {
466
466
  default: {
467
- /** Menu / Select floating panel semantic */
468
- background: semanticToken("backgroundPrimary"),
467
+ /** Frosted floating panel — blur is applied by refineui.css */
468
+ background: semanticToken("surfaceFrosted"),
469
469
  foreground: semanticToken("foregroundPrimary"),
470
470
  border: semanticToken("borderDefault")
471
471
  },
@@ -1386,7 +1386,7 @@ function buildSemanticTextClassMap(map) {
1386
1386
  }
1387
1387
 
1388
1388
  // src/index.ts
1389
- var import_tokens38 = require("@refineui/tokens");
1389
+ var import_tokens39 = require("@refineui/tokens");
1390
1390
 
1391
1391
  // src/componentSizes.ts
1392
1392
  var import_tokens3 = require("@refineui/tokens");
@@ -9707,8 +9707,12 @@ var menuStyles = {
9707
9707
  row: "flex items-center gap-refineui-size-x-small",
9708
9708
  iconWrap: "inline-flex shrink-0 items-center justify-center text-current [&>span]:leading-none",
9709
9709
  textCol: "flex min-w-0 flex-1 flex-col gap-refineui-size-xxx-small px-refineui-size-xxx-small",
9710
- title: (0, import_clsx75.clsx)(componentTextClass(componentTypographyTokens.menu.item), "truncate"),
9711
- description: (0, import_clsx75.clsx)(componentTextClass(componentTypographyTokens.menu.description), "truncate"),
9710
+ /** Preserve labels and supporting copy by wrapping within the shared panel width. */
9711
+ title: (0, import_clsx75.clsx)(componentTextClass(componentTypographyTokens.menu.item), "break-words whitespace-normal"),
9712
+ description: (0, import_clsx75.clsx)(
9713
+ componentTextClass(componentTypographyTokens.menu.description),
9714
+ "break-words whitespace-normal"
9715
+ ),
9712
9716
  descriptionEnabled: "text-refineui-alias-foreground-tertiary",
9713
9717
  descriptionDisabled: "text-refineui-alias-foreground-disabled",
9714
9718
  rightWrap: "flex shrink-0 items-center gap-refineui-size-x-small",
@@ -10181,7 +10185,7 @@ function MenuSubContent({ className, children, style, ...props }) {
10181
10185
  const [side, setSide] = (0, import_react36.useState)("right");
10182
10186
  const gapPx = parseCssPx(import_tokens22.spacings.sizeXXXSmall, 2);
10183
10187
  const z = (Number.parseInt(String(import_tokens22.zIndex.zIndexMessages), 10) || 1e4) + 100;
10184
- const defaultW = parseCssPx(import_tokens3.componentSizes.menuPanelWidth, 244);
10188
+ const defaultW = parseCssPx(import_tokens3.componentSizes.menuPanelWidth, 200);
10185
10189
  const setPanelEl = (0, import_react36.useCallback)(
10186
10190
  (el) => {
10187
10191
  panelRef.current = el;
@@ -10279,6 +10283,7 @@ function MenuSubContent({ className, children, style, ...props }) {
10279
10283
  // src/components/NavigationMenu/NavigationMenu.tsx
10280
10284
  var import_clsx78 = require("clsx");
10281
10285
  var import_react38 = require("react");
10286
+ var import_react_dom6 = require("react-dom");
10282
10287
  var import_tokens23 = require("@refineui/tokens");
10283
10288
  var import_animation5 = require("@refineui/utilities/animation");
10284
10289
 
@@ -10287,34 +10292,34 @@ var import_clsx77 = require("clsx");
10287
10292
  var topLevelItem = (0, import_clsx77.clsx)(
10288
10293
  componentTextClass(componentTypographyTokens.navigationMenu.trigger),
10289
10294
  "box-border inline-flex h-refineui-button-min-height-md min-w-refineui-navigation-menu-item-min-width cursor-pointer items-center justify-center gap-refineui-size-x-small",
10290
- "rounded-refineui-large border-none bg-transparent px-refineui-size-medium py-refineui-size-x-small",
10295
+ "rounded-refineui-x-large border-none bg-transparent px-refineui-size-medium py-refineui-size-x-small",
10291
10296
  "text-refineui-alias-foreground-tertiary outline-none leading-none",
10292
- "transition-[color,background-color] duration-[var(--refineui-motion-duration-fast)]"
10297
+ "transition-[color,background-color,box-shadow] duration-[var(--refineui-motion-duration-fast)] ease-[var(--refineui-motion-easing-ease-out)]"
10293
10298
  );
10294
10299
  var chevron = (0, import_clsx77.clsx)(
10295
10300
  "shrink-0 transition-transform duration-[var(--refineui-motion-duration-fast)] ease-[var(--refineui-motion-easing-ease-out)]"
10296
10301
  );
10297
10302
  var navigationMenuStyles = {
10298
10303
  root: "relative isolate z-refineui-messages flex w-full max-w-max items-center",
10299
- list: "relative m-0 flex list-none flex-wrap items-center gap-refineui-size-xx-small p-0",
10304
+ list: "relative m-0 flex list-none flex-wrap items-center gap-refineui-size-xxx-small p-0",
10300
10305
  item: "relative inline-flex items-center",
10301
10306
  trigger: (0, import_clsx77.clsx)(topLevelItem, "m-0 appearance-none font-inherit"),
10302
- triggerOpen: "text-refineui-alias-foreground-primary",
10307
+ triggerOpen: "bg-refineui-alias-background-primary-hover text-refineui-alias-foreground-primary",
10303
10308
  triggerDisabled: "cursor-not-allowed text-refineui-alias-foreground-disabled",
10304
10309
  chevron,
10305
10310
  chevronOpen: "rotate-180",
10306
10311
  content: (0, import_clsx77.clsx)(
10307
10312
  /** Flush under trigger so pointer does not leave the item while moving into the panel. */
10308
10313
  "absolute start-0 top-full z-refineui-messages pt-refineui-size-xx-small",
10309
- "box-border min-w-refineui-menu-panel-width",
10314
+ "box-border min-w-refineui-navigation-menu-panel-width",
10310
10315
  "outline-none"
10311
10316
  ),
10312
10317
  contentPanel: (0, import_clsx77.clsx)(
10313
- "box-border overflow-hidden rounded-refineui-large border-refineui-hairline border-refineui-alias-border-default",
10314
- "bg-refineui-alias-background-primary p-refineui-size-xx-small shadow-refineui-2"
10318
+ "box-border flex flex-col gap-px overflow-hidden rounded-refineui-xx-large border-refineui-hairline border-refineui-alias-border-default",
10319
+ "p-refineui-size-xx-small shadow-refineui-2"
10315
10320
  ),
10316
10321
  link: (0, import_clsx77.clsx)(topLevelItem, "no-underline"),
10317
- linkActive: "text-refineui-alias-foreground-primary",
10322
+ linkActive: "bg-refineui-alias-background-primary-hover text-refineui-alias-foreground-primary",
10318
10323
  linkDisabled: "cursor-not-allowed text-refineui-alias-foreground-disabled",
10319
10324
  /** Dense row inside a content panel — same density as Menu item. */
10320
10325
  linkInContent: (0, import_clsx77.clsx)(
@@ -10322,7 +10327,7 @@ var navigationMenuStyles = {
10322
10327
  "box-border flex w-full cursor-pointer items-center gap-refineui-size-x-small",
10323
10328
  "rounded-refineui-large border-none bg-transparent p-refineui-size-x-small text-start no-underline outline-none",
10324
10329
  "text-refineui-alias-foreground-primary",
10325
- "transition-[background-color,color] duration-[var(--refineui-motion-duration-fast)]"
10330
+ "transition-[background-color,color] duration-[var(--refineui-motion-duration-fast)] ease-[var(--refineui-motion-easing-ease-out)]"
10326
10331
  ),
10327
10332
  /** Optional — prefer omitting; kept for API compatibility. */
10328
10333
  indicator: "hidden"
@@ -10374,6 +10379,7 @@ function NavigationMenu({
10374
10379
  const [value, setValue] = useControllableOpen(valueControlled, defaultValue, onValueChange);
10375
10380
  const listRef = (0, import_react38.useRef)(null);
10376
10381
  const triggerMapRef = (0, import_react38.useRef)(/* @__PURE__ */ new Map());
10382
+ const contentMapRef = (0, import_react38.useRef)(/* @__PURE__ */ new Map());
10377
10383
  const openTimerRef = (0, import_react38.useRef)(null);
10378
10384
  const closeTimerRef = (0, import_react38.useRef)(null);
10379
10385
  const rootRef = (0, import_react38.useRef)(null);
@@ -10432,12 +10438,25 @@ function NavigationMenu({
10432
10438
  triggerMapRef.current.delete(itemValue);
10433
10439
  }
10434
10440
  }, []);
10441
+ const registerContent = (0, import_react38.useCallback)((itemValue, el) => {
10442
+ if (el) {
10443
+ contentMapRef.current.set(itemValue, el);
10444
+ } else {
10445
+ contentMapRef.current.delete(itemValue);
10446
+ }
10447
+ }, []);
10448
+ const isContentTarget = (0, import_react38.useCallback)((itemValue, target) => {
10449
+ return target instanceof Node && contentMapRef.current.get(itemValue)?.contains(target) === true;
10450
+ }, []);
10451
+ const isMenuTarget = (0, import_react38.useCallback)((target) => {
10452
+ if (!(target instanceof Node)) return false;
10453
+ return rootRef.current?.contains(target) === true || Array.from(contentMapRef.current.values()).some((content) => content.contains(target));
10454
+ }, []);
10435
10455
  (0, import_react38.useEffect)(() => () => clearTimers(), [clearTimers]);
10436
10456
  (0, import_react38.useEffect)(() => {
10437
10457
  if (!value) return;
10438
10458
  const onPointerDown = (event) => {
10439
- const target = event.target;
10440
- if (rootRef.current?.contains(target)) return;
10459
+ if (isMenuTarget(event.target)) return;
10441
10460
  setValueSafe("");
10442
10461
  };
10443
10462
  const onKeyDown = (event) => {
@@ -10453,7 +10472,7 @@ function NavigationMenu({
10453
10472
  document.removeEventListener("pointerdown", onPointerDown);
10454
10473
  document.removeEventListener("keydown", onKeyDown);
10455
10474
  };
10456
- }, [setValueSafe, value]);
10475
+ }, [isMenuTarget, setValueSafe, value]);
10457
10476
  const ctx = (0, import_react38.useMemo)(
10458
10477
  () => ({
10459
10478
  value,
@@ -10464,9 +10483,23 @@ function NavigationMenu({
10464
10483
  skipDelayDuration,
10465
10484
  listRef,
10466
10485
  registerTrigger,
10486
+ registerContent,
10487
+ isContentTarget,
10488
+ isMenuTarget,
10467
10489
  isInsideContent: false
10468
10490
  }),
10469
- [close, delayDuration, openItem, registerTrigger, setValueSafe, skipDelayDuration, value]
10491
+ [
10492
+ close,
10493
+ delayDuration,
10494
+ isContentTarget,
10495
+ isMenuTarget,
10496
+ openItem,
10497
+ registerContent,
10498
+ registerTrigger,
10499
+ setValueSafe,
10500
+ skipDelayDuration,
10501
+ value
10502
+ ]
10470
10503
  );
10471
10504
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(NavigationMenuContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10472
10505
  "nav",
@@ -10555,6 +10588,7 @@ function NavigationMenuItem({
10555
10588
  onPointerLeave: (event) => {
10556
10589
  onPointerLeave?.(event);
10557
10590
  if (event.defaultPrevented) return;
10591
+ if (menu.isContentTarget(value, event.relatedTarget)) return;
10558
10592
  menu.close();
10559
10593
  },
10560
10594
  ...props,
@@ -10643,12 +10677,22 @@ function NavigationMenuContent({
10643
10677
  children,
10644
10678
  className,
10645
10679
  onKeyDown,
10680
+ style,
10646
10681
  ...props
10647
10682
  }) {
10648
10683
  const menu = useNavigationMenu("NavigationMenuContent");
10649
10684
  const item = useNavigationMenuItem("NavigationMenuContent");
10650
10685
  const [shouldRender, setShouldRender] = (0, import_react38.useState)(item.open);
10651
10686
  const [isClosing, setIsClosing] = (0, import_react38.useState)(false);
10687
+ const contentRef = (0, import_react38.useRef)(null);
10688
+ const [positionStyle, setPositionStyle] = (0, import_react38.useState)(null);
10689
+ const setContentRef = (0, import_react38.useCallback)(
10690
+ (el) => {
10691
+ contentRef.current = el;
10692
+ menu.registerContent(item.value, el);
10693
+ },
10694
+ [item.value, menu]
10695
+ );
10652
10696
  (0, import_react38.useEffect)(() => {
10653
10697
  if (item.open) {
10654
10698
  setShouldRender(true);
@@ -10663,20 +10707,58 @@ function NavigationMenuContent({
10663
10707
  }, (0, import_animation5.motionMsToNumber)(import_tokens23.semanticInteraction.duration.fast));
10664
10708
  return () => window.clearTimeout(timeout);
10665
10709
  }, [item.open, shouldRender]);
10710
+ useIsomorphicLayoutEffect5(() => {
10711
+ if (!shouldRender || !item.open || typeof document === "undefined") return;
10712
+ const trigger = document.getElementById(item.triggerId);
10713
+ if (!trigger) return;
10714
+ const updatePosition = () => {
10715
+ const content2 = contentRef.current;
10716
+ if (!content2) return;
10717
+ const triggerRect = trigger.getBoundingClientRect();
10718
+ const contentWidth = content2.offsetWidth;
10719
+ const edge = Number.parseFloat(import_tokens23.spacings.sizeMedium) || 8;
10720
+ const left = Math.max(
10721
+ edge,
10722
+ Math.min(triggerRect.left, window.innerWidth - contentWidth - edge)
10723
+ );
10724
+ setPositionStyle({
10725
+ position: "fixed",
10726
+ top: triggerRect.bottom,
10727
+ left,
10728
+ zIndex: Number.parseInt(String(import_tokens23.zIndex.zIndexMessages), 10) || 1e4
10729
+ });
10730
+ };
10731
+ updatePosition();
10732
+ const frame = requestAnimationFrame(updatePosition);
10733
+ window.addEventListener("resize", updatePosition);
10734
+ const unsubscribe = subscribeScrollAndScrollableAncestors2(trigger, updatePosition);
10735
+ return () => {
10736
+ cancelAnimationFrame(frame);
10737
+ window.removeEventListener("resize", updatePosition);
10738
+ unsubscribe();
10739
+ };
10740
+ }, [item.open, item.triggerId, shouldRender]);
10666
10741
  const contentCtx = (0, import_react38.useMemo)(
10667
10742
  () => ({ ...menu, isInsideContent: true }),
10668
10743
  [menu]
10669
10744
  );
10670
10745
  if (!shouldRender) return null;
10671
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(NavigationMenuContext.Provider, { value: contentCtx, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10746
+ const content = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(NavigationMenuContext.Provider, { value: contentCtx, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10672
10747
  "div",
10673
10748
  {
10749
+ ref: setContentRef,
10674
10750
  id: item.contentId,
10675
10751
  role: "region",
10676
10752
  "aria-labelledby": item.triggerId,
10677
10753
  "data-refineui": "navigation-menu-content",
10678
10754
  "data-state": isClosing || !item.open ? "closed" : "open",
10679
10755
  className: (0, import_clsx78.clsx)(navigationMenuStyles.content, className),
10756
+ style: { ...positionStyle, ...style },
10757
+ onPointerEnter: () => menu.openItem(item.value, { immediate: true }),
10758
+ onPointerLeave: (event) => {
10759
+ if (menu.isMenuTarget(event.relatedTarget)) return;
10760
+ menu.close();
10761
+ },
10680
10762
  onKeyDown: (event) => {
10681
10763
  onKeyDown?.(event);
10682
10764
  if (event.defaultPrevented) return;
@@ -10689,6 +10771,7 @@ function NavigationMenuContent({
10689
10771
  children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { "data-refineui": "navigation-menu-content-panel", className: navigationMenuStyles.contentPanel, children })
10690
10772
  }
10691
10773
  ) });
10774
+ return typeof document === "undefined" ? content : (0, import_react_dom6.createPortal)(content, document.body);
10692
10775
  }
10693
10776
  function NavigationMenuLink({
10694
10777
  children,
@@ -13606,7 +13689,7 @@ function SpinButton({
13606
13689
  // src/components/Toast/Toast.tsx
13607
13690
  var import_clsx98 = require("clsx");
13608
13691
  var import_react50 = require("react");
13609
- var import_react_dom6 = require("react-dom");
13692
+ var import_react_dom7 = require("react-dom");
13610
13693
  var import_tokens30 = require("@refineui/tokens");
13611
13694
  var import_animation7 = require("@refineui/utilities/animation");
13612
13695
  var import_color12 = require("@refineui/utilities/color");
@@ -14098,7 +14181,7 @@ function Toaster({
14098
14181
  if (typeof document === "undefined" || !isPortalOwner) {
14099
14182
  return null;
14100
14183
  }
14101
- return (0, import_react_dom6.createPortal)(
14184
+ return (0, import_react_dom7.createPortal)(
14102
14185
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
14103
14186
  "ol",
14104
14187
  {
@@ -14617,15 +14700,68 @@ var import_react56 = require("react");
14617
14700
  var import_color13 = require("@refineui/utilities/color");
14618
14701
  var import_react57 = require("@refineui/utilities/react");
14619
14702
 
14620
- // src/components/Tooltip/style.ts
14703
+ // src/components/shared/FrostedBeak.tsx
14621
14704
  var import_tokens33 = require("@refineui/tokens");
14705
+ var import_jsx_runtime77 = require("react/jsx-runtime");
14706
+ var triangleClipPath = "polygon(50% 0, 0 100%, 100% 100%)";
14707
+ function FrostedBeak({ width, height, rotateDeg, borderColor }) {
14708
+ const surfaceStyle = {
14709
+ position: "absolute",
14710
+ inset: 0,
14711
+ clipPath: triangleClipPath
14712
+ };
14713
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
14714
+ "div",
14715
+ {
14716
+ style: {
14717
+ position: "relative",
14718
+ width,
14719
+ height,
14720
+ transform: `rotate(${rotateDeg}deg)`,
14721
+ transformOrigin: "center center"
14722
+ },
14723
+ children: [
14724
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14725
+ "span",
14726
+ {
14727
+ "data-refineui": "floating-beak-surface",
14728
+ style: surfaceStyle
14729
+ }
14730
+ ),
14731
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14732
+ "svg",
14733
+ {
14734
+ width,
14735
+ height,
14736
+ viewBox: "0 0 16 8",
14737
+ fill: "none",
14738
+ "aria-hidden": true,
14739
+ style: { position: "absolute", inset: 0, overflow: "visible" },
14740
+ children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14741
+ "path",
14742
+ {
14743
+ d: "M0 8L8 0L16 8",
14744
+ stroke: borderColor,
14745
+ strokeWidth: import_tokens33.strokeWidths.strokeWidthThin,
14746
+ strokeLinejoin: "round"
14747
+ }
14748
+ )
14749
+ }
14750
+ )
14751
+ ]
14752
+ }
14753
+ );
14754
+ }
14755
+
14756
+ // src/components/Tooltip/style.ts
14757
+ var import_tokens34 = require("@refineui/tokens");
14622
14758
  var import_clsx104 = require("clsx");
14623
14759
  var TOOLTIP_BEAK_W = import_tokens3.foundationSizes.foundationSize160;
14624
14760
  var TOOLTIP_BEAK_H = import_tokens3.foundationSizes.foundationSize80;
14625
14761
  var TOOLTIP_BEAK_OFFSET = import_tokens3.foundationSizes.foundationSize80;
14626
- var BEAK_BORDER_OVERLAP2 = import_tokens33.strokeWidths.strokeWidthThin;
14627
- var gap = import_tokens33.spacings.sizeXSmall;
14628
- var edgeInset = import_tokens33.spacings.sizeMedium;
14762
+ var BEAK_BORDER_OVERLAP2 = import_tokens34.strokeWidths.strokeWidthThin;
14763
+ var gap = import_tokens34.spacings.sizeXSmall;
14764
+ var edgeInset = import_tokens34.spacings.sizeMedium;
14629
14765
  var tooltipStyles = {
14630
14766
  root: "relative inline-block",
14631
14767
  fallbackTrigger: "inline-flex outline-none",
@@ -14719,7 +14855,7 @@ function tooltipBeakRotateDeg(position) {
14719
14855
  }
14720
14856
 
14721
14857
  // src/components/Tooltip/Tooltip.tsx
14722
- var import_jsx_runtime77 = require("react/jsx-runtime");
14858
+ var import_jsx_runtime78 = require("react/jsx-runtime");
14723
14859
  function Tooltip({
14724
14860
  trigger,
14725
14861
  content,
@@ -14765,7 +14901,7 @@ function Tooltip({
14765
14901
  const mergeEl = (0, import_react57.getMergeableTriggerChild)(trigger);
14766
14902
  let triggerNode;
14767
14903
  if (mergeEl != null) {
14768
- triggerNode = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14904
+ triggerNode = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
14769
14905
  import_react57.Slot,
14770
14906
  {
14771
14907
  "aria-describedby": describedBy,
@@ -14782,7 +14918,7 @@ function Tooltip({
14782
14918
  }
14783
14919
  );
14784
14920
  } else {
14785
- triggerNode = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14921
+ triggerNode = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
14786
14922
  "span",
14787
14923
  {
14788
14924
  tabIndex: 0,
@@ -14799,44 +14935,27 @@ function Tooltip({
14799
14935
  }
14800
14936
  );
14801
14937
  }
14802
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { "data-refineui": "tooltip", className: (0, import_clsx105.clsx)(tooltipStyles.root, className), ...props, children: [
14938
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { "data-refineui": "tooltip", className: (0, import_clsx105.clsx)(tooltipStyles.root, className), ...props, children: [
14803
14939
  triggerNode,
14804
- open && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: tooltipStyles.floating, style: floatingStyle, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: tooltipStyles.panelWrap, children: [
14805
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14940
+ open && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: tooltipStyles.floating, style: floatingStyle, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: tooltipStyles.panelWrap, children: [
14941
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
14806
14942
  "div",
14807
14943
  {
14808
14944
  className: tooltipStyles.beakWrap,
14809
14945
  style: { ...beakWrapStyle, width: TOOLTIP_BEAK_W, height: TOOLTIP_BEAK_H },
14810
14946
  "aria-hidden": true,
14811
- children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14812
- "div",
14947
+ children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
14948
+ FrostedBeak,
14813
14949
  {
14814
- style: {
14815
- width: TOOLTIP_BEAK_W,
14816
- height: TOOLTIP_BEAK_H,
14817
- transform: `rotate(${beakRot}deg)`,
14818
- transformOrigin: "center center"
14819
- },
14820
- children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
14821
- "svg",
14822
- {
14823
- width: TOOLTIP_BEAK_W,
14824
- height: TOOLTIP_BEAK_H,
14825
- viewBox: "0 0 16 8",
14826
- fill: "none",
14827
- xmlns: "http://www.w3.org/2000/svg",
14828
- style: { display: "block" },
14829
- children: [
14830
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
14831
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("polygon", { points: "8,2 2,8 14,8", fill: bg })
14832
- ]
14833
- }
14834
- )
14950
+ width: TOOLTIP_BEAK_W,
14951
+ height: TOOLTIP_BEAK_H,
14952
+ rotateDeg: beakRot,
14953
+ borderColor: borderCol
14835
14954
  }
14836
14955
  )
14837
14956
  }
14838
14957
  ),
14839
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14958
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
14840
14959
  "div",
14841
14960
  {
14842
14961
  id: tooltipId,
@@ -14860,7 +14979,7 @@ function Tooltip({
14860
14979
  // src/components/Chart/Chart.tsx
14861
14980
  var import_clsx107 = require("clsx");
14862
14981
  var import_react58 = require("react");
14863
- var import_tokens35 = require("@refineui/tokens");
14982
+ var import_tokens36 = require("@refineui/tokens");
14864
14983
  var import_color14 = require("@refineui/utilities/color");
14865
14984
 
14866
14985
  // src/components/Chart/style.ts
@@ -14905,16 +15024,16 @@ var chartStyles = {
14905
15024
  };
14906
15025
 
14907
15026
  // src/components/Chart/utils.ts
14908
- var import_tokens34 = require("@refineui/tokens");
15027
+ var import_tokens35 = require("@refineui/tokens");
14909
15028
  var CHART_VIEWBOX_WIDTH = 800;
14910
15029
  var CHART_VIEWBOX_HEIGHT = 320;
14911
- var CHART_PLOT_PADDING_TOP = parseFloat(import_tokens34.spacings.sizeMedium);
14912
- var CHART_PLOT_PADDING_BOTTOM = parseFloat(import_tokens34.spacings.sizeXXSmall);
14913
- var CHART_PLOT_PADDING_X = parseFloat(import_tokens34.spacings.sizeMedium);
14914
- var CHART_BAR_RADIUS = parseFloat(import_tokens34.borderRadii.roundedXLarge);
15030
+ var CHART_PLOT_PADDING_TOP = parseFloat(import_tokens35.spacings.sizeMedium);
15031
+ var CHART_PLOT_PADDING_BOTTOM = parseFloat(import_tokens35.spacings.sizeXXSmall);
15032
+ var CHART_PLOT_PADDING_X = parseFloat(import_tokens35.spacings.sizeMedium);
15033
+ var CHART_BAR_RADIUS = parseFloat(import_tokens35.borderRadii.roundedXLarge);
14915
15034
  var CHART_BAR_BAND_FILL = 0.5;
14916
- var CHART_POINT_RADIUS = parseFloat(import_tokens34.foundationSizes.foundationSize40);
14917
- var CHART_POINT_STROKE = parseFloat(import_tokens34.foundationSizes.foundationSize20);
15035
+ var CHART_POINT_RADIUS = parseFloat(import_tokens35.foundationSizes.foundationSize40);
15036
+ var CHART_POINT_STROKE = parseFloat(import_tokens35.foundationSizes.foundationSize20);
14918
15037
  var CHART_TOOLTIP_FLIP_X = 0.75;
14919
15038
  var CHART_TOOLTIP_FLIP_Y = 0.25;
14920
15039
  function clampValue(n) {
@@ -15086,7 +15205,7 @@ function formatAxisTick(value) {
15086
15205
  }
15087
15206
 
15088
15207
  // src/components/Chart/Chart.tsx
15089
- var import_jsx_runtime78 = require("react/jsx-runtime");
15208
+ var import_jsx_runtime79 = require("react/jsx-runtime");
15090
15209
  var ChartContext = (0, import_react58.createContext)(null);
15091
15210
  function useChartContext(component) {
15092
15211
  const value = (0, import_react58.useContext)(ChartContext);
@@ -15142,7 +15261,7 @@ function Chart({ className, children, ...props }) {
15142
15261
  }),
15143
15262
  [hoverIndex, selectedIndex, pointer, labels, series]
15144
15263
  );
15145
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ChartContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15264
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ChartContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15146
15265
  "div",
15147
15266
  {
15148
15267
  "data-refineui": "chart",
@@ -15153,7 +15272,7 @@ function Chart({ className, children, ...props }) {
15153
15272
  ) });
15154
15273
  }
15155
15274
  function ChartBody({ className, ...props }) {
15156
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15275
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15157
15276
  "div",
15158
15277
  {
15159
15278
  "data-refineui": "chart-body",
@@ -15163,7 +15282,7 @@ function ChartBody({ className, ...props }) {
15163
15282
  );
15164
15283
  }
15165
15284
  function ChartContent({ className, ...props }) {
15166
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15285
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15167
15286
  "div",
15168
15287
  {
15169
15288
  "data-refineui": "chart-content",
@@ -15188,7 +15307,7 @@ function ChartHitArea() {
15188
15307
  setHoverIndex(hoverIndexFromPlotX(next.x, count, series.align));
15189
15308
  return next;
15190
15309
  };
15191
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15310
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15192
15311
  "rect",
15193
15312
  {
15194
15313
  "data-refineui": "chart-hit-area",
@@ -15226,7 +15345,7 @@ function ChartPlot({
15226
15345
  if (isChartTooltipElement(child)) tooltipNodes.push(child);
15227
15346
  else svgChildren.push(child);
15228
15347
  });
15229
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
15348
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
15230
15349
  "div",
15231
15350
  {
15232
15351
  "data-refineui": "chart-plot-frame",
@@ -15235,7 +15354,7 @@ function ChartPlot({
15235
15354
  className: (0, import_clsx107.clsx)(chartStyles.plotFrame, className),
15236
15355
  ...props,
15237
15356
  children: [
15238
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
15357
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
15239
15358
  "svg",
15240
15359
  {
15241
15360
  "data-refineui": "chart-plot",
@@ -15246,7 +15365,7 @@ function ChartPlot({
15246
15365
  className: chartStyles.plot,
15247
15366
  children: [
15248
15367
  svgChildren,
15249
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ChartHitArea, {})
15368
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ChartHitArea, {})
15250
15369
  ]
15251
15370
  }
15252
15371
  ),
@@ -15264,7 +15383,7 @@ function ChartTooltip({ className, children, style, ...props }) {
15264
15383
  const flipY = pointer.y < CHART_PLOT_PADDING_TOP + plotHeight() * CHART_TOOLTIP_FLIP_Y;
15265
15384
  const offsetX = flipX ? "calc(-100% - var(--refineui-spacing-size-small))" : "var(--refineui-spacing-size-small)";
15266
15385
  const offsetY = flipY ? "var(--refineui-spacing-size-small)" : "calc(-100% - var(--refineui-spacing-size-x-small))";
15267
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15386
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15268
15387
  "div",
15269
15388
  {
15270
15389
  "data-refineui": "chart-tooltip",
@@ -15277,9 +15396,9 @@ function ChartTooltip({ className, children, style, ...props }) {
15277
15396
  ...style
15278
15397
  },
15279
15398
  ...props,
15280
- children: children ?? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
15281
- label ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: chartStyles.tooltipLabel, children: label }) : null,
15282
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: chartStyles.tooltipValue, children: formatAxisTick(value) })
15399
+ children: children ?? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
15400
+ label ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: chartStyles.tooltipLabel, children: label }) : null,
15401
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: chartStyles.tooltipValue, children: formatAxisTick(value) })
15283
15402
  ] })
15284
15403
  }
15285
15404
  );
@@ -15294,14 +15413,14 @@ function ChartYAxisLabels({
15294
15413
  }) {
15295
15414
  const scaleMax = resolveScale(values, max);
15296
15415
  const ticks = yAxisTicks(scaleMax, lines).slice().reverse();
15297
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15416
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15298
15417
  "div",
15299
15418
  {
15300
15419
  "data-refineui": "chart-y-axis",
15301
15420
  className: (0, import_clsx107.clsx)(chartStyles.yAxis, className),
15302
15421
  "aria-hidden": true,
15303
15422
  ...props,
15304
- children: ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15423
+ children: ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15305
15424
  "span",
15306
15425
  {
15307
15426
  className: chartStyles.yAxisTick,
@@ -15324,12 +15443,12 @@ function ChartGrid({
15324
15443
  const ticks = yAxisTicks(scaleMax, lines);
15325
15444
  const gridColor = gridStroke();
15326
15445
  const baselineColor = gridBaselineStroke();
15327
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("g", { "data-refineui": "chart-grid", className, ...props, children: ticks.map((tick, index) => {
15446
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("g", { "data-refineui": "chart-grid", className, ...props, children: ticks.map((tick, index) => {
15328
15447
  const y = gridLineY(scaleMax, tick);
15329
15448
  const isBaseline = index === 0;
15330
15449
  const isTop = index === ticks.length - 1;
15331
15450
  if (isTop) return null;
15332
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15451
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15333
15452
  "line",
15334
15453
  {
15335
15454
  x1: CHART_PLOT_PADDING_X,
@@ -15338,7 +15457,7 @@ function ChartGrid({
15338
15457
  y2: y,
15339
15458
  stroke: isBaseline ? baselineColor : gridColor,
15340
15459
  strokeWidth: "var(--refineui-stroke-width-thin)",
15341
- strokeOpacity: isBaseline ? import_tokens35.opacities.opacityFull : import_tokens35.opacities.opacityDisabled,
15460
+ strokeOpacity: isBaseline ? import_tokens36.opacities.opacityFull : import_tokens36.opacities.opacityDisabled,
15342
15461
  vectorEffect: "non-scaling-stroke"
15343
15462
  },
15344
15463
  tick
@@ -15364,10 +15483,10 @@ function ChartBars({
15364
15483
  (0, import_react58.useLayoutEffect)(() => {
15365
15484
  setSeries({ values, seriesColor, max, align: "bar" });
15366
15485
  }, [values, seriesColor, max, setSeries]);
15367
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("g", { "data-refineui": "chart-bars", "data-series-color": seriesColor, className, ...props, children: [
15486
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("g", { "data-refineui": "chart-bars", "data-series-color": seriesColor, className, ...props, children: [
15368
15487
  showTrack ? values.map((_, index) => {
15369
15488
  const x = barX(index, values.length);
15370
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15489
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15371
15490
  "path",
15372
15491
  {
15373
15492
  "data-refineui": "chart-bar-track",
@@ -15389,7 +15508,7 @@ function ChartBars({
15389
15508
  const height = baselineY - y;
15390
15509
  if (height <= 0) return null;
15391
15510
  const state = itemState(index, hoverIndex, selectedIndex);
15392
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15511
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15393
15512
  "path",
15394
15513
  {
15395
15514
  "data-refineui": "chart-bar",
@@ -15422,20 +15541,20 @@ function ChartLine({
15422
15541
  (0, import_react58.useLayoutEffect)(() => {
15423
15542
  setSeries({ values, seriesColor, max, align: "line" });
15424
15543
  }, [values, seriesColor, max, setSeries]);
15425
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("g", { "data-refineui": "chart-line", "data-series-color": seriesColor, className, ...props, children: [
15426
- showArea && coords.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
15427
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
15428
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15544
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("g", { "data-refineui": "chart-line", "data-series-color": seriesColor, className, ...props, children: [
15545
+ showArea && coords.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
15546
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
15547
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15429
15548
  "stop",
15430
15549
  {
15431
15550
  offset: "0%",
15432
15551
  stopColor: stroke,
15433
- stopOpacity: import_tokens35.opacities.opacityDisabled
15552
+ stopOpacity: import_tokens36.opacities.opacityDisabled
15434
15553
  }
15435
15554
  ),
15436
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("stop", { offset: "100%", stopColor: stroke, stopOpacity: "0" })
15555
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("stop", { offset: "100%", stopColor: stroke, stopOpacity: "0" })
15437
15556
  ] }) }),
15438
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15557
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15439
15558
  "path",
15440
15559
  {
15441
15560
  "data-refineui": "chart-line-area",
@@ -15444,7 +15563,7 @@ function ChartLine({
15444
15563
  }
15445
15564
  )
15446
15565
  ] }) : null,
15447
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15566
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15448
15567
  "path",
15449
15568
  {
15450
15569
  "data-refineui": "chart-line-stroke",
@@ -15462,7 +15581,7 @@ function ChartLine({
15462
15581
  const state = itemState(index, hoverIndex, selectedIndex);
15463
15582
  const visible = showPoints || state !== "default";
15464
15583
  if (!visible) return null;
15465
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15584
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15466
15585
  "circle",
15467
15586
  {
15468
15587
  "data-refineui": "chart-point",
@@ -15491,7 +15610,7 @@ function ChartAxisLabels({
15491
15610
  (0, import_react58.useLayoutEffect)(() => {
15492
15611
  setLabels(labels);
15493
15612
  }, [labels, setLabels]);
15494
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15613
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15495
15614
  "div",
15496
15615
  {
15497
15616
  "data-refineui": "chart-axis-labels",
@@ -15500,7 +15619,7 @@ function ChartAxisLabels({
15500
15619
  ...props,
15501
15620
  children: labels.map((label, index) => {
15502
15621
  const state = itemState(index, hoverIndex, selectedIndex);
15503
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15622
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15504
15623
  "span",
15505
15624
  {
15506
15625
  "data-state": state,
@@ -15518,7 +15637,7 @@ function ChartAxisLabels({
15518
15637
  );
15519
15638
  }
15520
15639
  function ChartLegend({ className, ...props }) {
15521
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15640
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15522
15641
  "ul",
15523
15642
  {
15524
15643
  "data-refineui": "chart-legend",
@@ -15534,7 +15653,7 @@ function ChartLegendItem({
15534
15653
  style,
15535
15654
  ...props
15536
15655
  }) {
15537
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
15656
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
15538
15657
  "li",
15539
15658
  {
15540
15659
  "data-refineui": "chart-legend-item",
@@ -15542,7 +15661,7 @@ function ChartLegendItem({
15542
15661
  className: (0, import_clsx107.clsx)(chartStyles.legendItem, className),
15543
15662
  ...props,
15544
15663
  children: [
15545
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15664
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15546
15665
  "span",
15547
15666
  {
15548
15667
  "aria-hidden": true,
@@ -15566,7 +15685,7 @@ var import_react62 = require("@refineui/utilities/react");
15566
15685
 
15567
15686
  // src/components/Collapsible/context.ts
15568
15687
  var import_react60 = require("react");
15569
- var import_tokens36 = require("@refineui/tokens");
15688
+ var import_tokens37 = require("@refineui/tokens");
15570
15689
  var import_animation9 = require("@refineui/utilities/animation");
15571
15690
  var CollapsibleContext = (0, import_react60.createContext)(null);
15572
15691
  function useCollapsibleContext(part) {
@@ -15585,10 +15704,10 @@ function usePrefersReducedMotion3() {
15585
15704
  }, []);
15586
15705
  return reduce;
15587
15706
  }
15588
- var PANEL_HEIGHT_MS2 = Number.parseFloat(import_tokens36.semanticInteraction.duration.panel) / 1e3;
15589
- var PANEL_CONTENT_MS2 = Number.parseFloat(import_tokens36.semanticInteraction.duration.normal) / 1e3;
15590
- var PANEL_HEIGHT_EASE2 = import_tokens36.semanticInteraction.easing.panel;
15591
- var PANEL_CONTENT_EASE2 = import_tokens36.semanticInteraction.easing.content;
15707
+ var PANEL_HEIGHT_MS2 = Number.parseFloat(import_tokens37.semanticInteraction.duration.panel) / 1e3;
15708
+ var PANEL_CONTENT_MS2 = Number.parseFloat(import_tokens37.semanticInteraction.duration.normal) / 1e3;
15709
+ var PANEL_HEIGHT_EASE2 = import_tokens37.semanticInteraction.easing.panel;
15710
+ var PANEL_CONTENT_EASE2 = import_tokens37.semanticInteraction.easing.content;
15592
15711
 
15593
15712
  // src/components/Collapsible/style.ts
15594
15713
  var collapsibleStyles = {
@@ -15596,7 +15715,7 @@ var collapsibleStyles = {
15596
15715
  };
15597
15716
 
15598
15717
  // src/components/Collapsible/Collapsible.tsx
15599
- var import_jsx_runtime79 = require("react/jsx-runtime");
15718
+ var import_jsx_runtime80 = require("react/jsx-runtime");
15600
15719
  var Collapsible = (0, import_react61.forwardRef)(function Collapsible2({ open: openProp, defaultOpen = false, onOpenChange, asChild = false, className, children, ...props }, ref) {
15601
15720
  const [uncontrolled, setUncontrolled] = (0, import_react61.useState)(defaultOpen);
15602
15721
  const open = openProp ?? uncontrolled;
@@ -15624,7 +15743,7 @@ var Collapsible = (0, import_react61.forwardRef)(function Collapsible2({ open: o
15624
15743
  "data-refineui": "collapsible",
15625
15744
  className
15626
15745
  };
15627
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CollapsibleContext.Provider, { value: contextValue, children: asChild ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react62.Slot, { ...shared, children }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { ...shared, children }) });
15746
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CollapsibleContext.Provider, { value: contextValue, children: asChild ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react62.Slot, { ...shared, children }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { ...shared, children }) });
15628
15747
  });
15629
15748
  var CollapsibleTrigger = (0, import_react61.forwardRef)(
15630
15749
  function CollapsibleTrigger2({
@@ -15653,8 +15772,8 @@ var CollapsibleTrigger = (0, import_react61.forwardRef)(
15653
15772
  if (!event.defaultPrevented) toggle();
15654
15773
  }
15655
15774
  };
15656
- if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react62.Slot, { ...shared, children });
15657
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15775
+ if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react62.Slot, { ...shared, children });
15776
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15658
15777
  Button,
15659
15778
  {
15660
15779
  ...shared,
@@ -15683,7 +15802,7 @@ var CollapsibleContent = (0, import_react61.forwardRef)(
15683
15802
  pointerEvents: open ? void 0 : "none",
15684
15803
  ...style
15685
15804
  };
15686
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15805
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15687
15806
  "div",
15688
15807
  {
15689
15808
  ...props,
@@ -15695,7 +15814,7 @@ var CollapsibleContent = (0, import_react61.forwardRef)(
15695
15814
  "data-state": open ? "open" : "closed",
15696
15815
  "data-refineui": "collapsible-content",
15697
15816
  style: gridStyle,
15698
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: collapsibleStyles.panelOuter, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: (0, import_clsx108.clsx)(className), style: innerMotionStyle, children }) })
15817
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: collapsibleStyles.panelOuter, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: (0, import_clsx108.clsx)(className), style: innerMotionStyle, children }) })
15699
15818
  }
15700
15819
  );
15701
15820
  }
@@ -15703,14 +15822,14 @@ var CollapsibleContent = (0, import_react61.forwardRef)(
15703
15822
 
15704
15823
  // src/components/ContextMenu/ContextMenu.tsx
15705
15824
  var import_react63 = require("react");
15706
- var import_react_dom7 = require("react-dom");
15825
+ var import_react_dom8 = require("react-dom");
15707
15826
  var import_clsx109 = require("clsx");
15708
- var import_tokens37 = require("@refineui/tokens");
15827
+ var import_tokens38 = require("@refineui/tokens");
15709
15828
  var import_animation10 = require("@refineui/utilities/animation");
15710
15829
  var import_react64 = require("@refineui/utilities/react");
15711
- var import_jsx_runtime80 = require("react/jsx-runtime");
15830
+ var import_jsx_runtime81 = require("react/jsx-runtime");
15712
15831
  var MENU_ATTR = "data-refineui-context-menu";
15713
- var CLOSE_MS = (0, import_animation10.motionMsToNumber)(import_tokens37.semanticInteraction.duration.normal);
15832
+ var CLOSE_MS = (0, import_animation10.motionMsToNumber)(import_tokens38.semanticInteraction.duration.normal);
15714
15833
  var MenuContext2 = (0, import_react63.createContext)(null);
15715
15834
  var SubContext = (0, import_react63.createContext)(null);
15716
15835
  function useMenu() {
@@ -15751,7 +15870,7 @@ function ContextMenu({ modal = true, onOpenChange, children }) {
15751
15870
  if (!wasOpen) onOpenChangeRef.current?.(true);
15752
15871
  }, []);
15753
15872
  const value = (0, import_react63.useMemo)(() => ({ open, point, openAt, close }), [open, point, openAt, close]);
15754
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(MenuContext2.Provider, { value, children });
15873
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MenuContext2.Provider, { value, children });
15755
15874
  }
15756
15875
  var ContextMenuTrigger = (0, import_react63.forwardRef)(function ContextMenuTrigger2({ asChild = false, onContextMenu, children, ...props }, ref) {
15757
15876
  const { openAt } = useMenu();
@@ -15766,11 +15885,11 @@ var ContextMenuTrigger = (0, import_react63.forwardRef)(function ContextMenuTrig
15766
15885
  openAt(event.clientX, event.clientY);
15767
15886
  }
15768
15887
  };
15769
- if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react64.Slot, { ...shared, children });
15770
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { ...shared, className: (0, import_clsx109.clsx)(menuStyles.triggerFallback, props.className), children });
15888
+ if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react64.Slot, { ...shared, children });
15889
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { ...shared, className: (0, import_clsx109.clsx)(menuStyles.triggerFallback, props.className), children });
15771
15890
  });
15772
15891
  function ContextMenuPortal({ children }) {
15773
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_jsx_runtime80.Fragment, { children });
15892
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children });
15774
15893
  }
15775
15894
  var ContextMenuContent = (0, import_react63.forwardRef)(function ContextMenuContent2({ className, style, onPointerDown, children, ...props }, ref) {
15776
15895
  const { open, point, close } = useMenu();
@@ -15813,8 +15932,8 @@ var ContextMenuContent = (0, import_react63.forwardRef)(function ContextMenuCont
15813
15932
  };
15814
15933
  }, [open, close]);
15815
15934
  if (!shouldRender || typeof document === "undefined") return null;
15816
- return (0, import_react_dom7.createPortal)(
15817
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15935
+ return (0, import_react_dom8.createPortal)(
15936
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
15818
15937
  "div",
15819
15938
  {
15820
15939
  ...props,
@@ -15831,8 +15950,8 @@ var ContextMenuContent = (0, import_react63.forwardRef)(function ContextMenuCont
15831
15950
  position: "fixed",
15832
15951
  top: point.y,
15833
15952
  left: point.x,
15834
- width: import_tokens37.componentSizes.menuPanelWidth,
15835
- minWidth: import_tokens37.componentSizes.menuPanelWidth,
15953
+ width: import_tokens38.componentSizes.menuPanelWidth,
15954
+ minWidth: import_tokens38.componentSizes.menuPanelWidth,
15836
15955
  zIndex: 9999,
15837
15956
  ...style
15838
15957
  },
@@ -15841,7 +15960,7 @@ var ContextMenuContent = (0, import_react63.forwardRef)(function ContextMenuCont
15841
15960
  onPointerDown?.(event);
15842
15961
  },
15843
15962
  onContextMenu: (event) => event.preventDefault(),
15844
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { role: "menu", "data-refineui": "menu", className: (0, import_clsx109.clsx)(menuStyles.list, className), children })
15963
+ children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { role: "menu", "data-refineui": "menu", className: (0, import_clsx109.clsx)(menuStyles.list, className), children })
15845
15964
  }
15846
15965
  ),
15847
15966
  document.body
@@ -15862,7 +15981,7 @@ var ContextMenuItem = (0, import_react63.forwardRef)(function ContextMenuItem2({
15862
15981
  const { close } = useMenu();
15863
15982
  const isDisabled = disabled || state === "disabled";
15864
15983
  const slotted = startIcon != null || description != null || shortcut != null || endIcon != null;
15865
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15984
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
15866
15985
  "button",
15867
15986
  {
15868
15987
  ref,
@@ -15888,37 +16007,37 @@ var ContextMenuItem = (0, import_react63.forwardRef)(function ContextMenuItem2({
15888
16007
  runSelect(onSelect, close, isDisabled);
15889
16008
  }
15890
16009
  },
15891
- children: slotted ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: menuStyles.row, children: [
15892
- startIcon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
16010
+ children: slotted ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: menuStyles.row, children: [
16011
+ startIcon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
15893
16012
  "span",
15894
16013
  {
15895
16014
  className: menuStyles.iconWrap,
15896
- style: { width: import_tokens37.iconSizes.small, minWidth: import_tokens37.iconSizes.small, height: import_tokens37.iconSizes.small },
16015
+ style: { width: import_tokens38.iconSizes.small, minWidth: import_tokens38.iconSizes.small, height: import_tokens38.iconSizes.small },
15897
16016
  children: startIcon
15898
16017
  }
15899
16018
  ) : null,
15900
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: menuStyles.textCol, children: [
15901
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: menuStyles.title, children }),
15902
- description ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: (0, import_clsx109.clsx)(menuStyles.description, isDisabled ? menuStyles.descriptionDisabled : menuStyles.descriptionEnabled), children: description }) : null
16019
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: menuStyles.textCol, children: [
16020
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: menuStyles.title, children }),
16021
+ description ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: (0, import_clsx109.clsx)(menuStyles.description, isDisabled ? menuStyles.descriptionDisabled : menuStyles.descriptionEnabled), children: description }) : null
15903
16022
  ] }),
15904
- (shortcut || endIcon) && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: menuStyles.rightWrap, children: [
15905
- shortcut ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: menuStyles.shortcut, children: shortcut }) : null,
15906
- endIcon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
16023
+ (shortcut || endIcon) && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: menuStyles.rightWrap, children: [
16024
+ shortcut ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: menuStyles.shortcut, children: shortcut }) : null,
16025
+ endIcon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
15907
16026
  "span",
15908
16027
  {
15909
16028
  className: menuStyles.iconWrap,
15910
- style: { width: import_tokens37.iconSizes.small, minWidth: import_tokens37.iconSizes.small, height: import_tokens37.iconSizes.small },
16029
+ style: { width: import_tokens38.iconSizes.small, minWidth: import_tokens38.iconSizes.small, height: import_tokens38.iconSizes.small },
15911
16030
  children: endIcon
15912
16031
  }
15913
16032
  ) : null
15914
16033
  ] })
15915
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: menuStyles.row, children })
16034
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: menuStyles.row, children })
15916
16035
  }
15917
16036
  );
15918
16037
  });
15919
16038
  var ContextMenuSeparator = (0, import_react63.forwardRef)(
15920
16039
  function ContextMenuSeparator2({ className, ...props }, ref) {
15921
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
16040
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
15922
16041
  "div",
15923
16042
  {
15924
16043
  ref,
@@ -15928,13 +16047,13 @@ var ContextMenuSeparator = (0, import_react63.forwardRef)(
15928
16047
  ...{ [MENU_ATTR]: "" },
15929
16048
  className: (0, import_clsx109.clsx)(menuStyles.dividerWrap, className),
15930
16049
  ...props,
15931
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: menuStyles.dividerLine })
16050
+ children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: menuStyles.dividerLine })
15932
16051
  }
15933
16052
  );
15934
16053
  }
15935
16054
  );
15936
16055
  function ContextMenuLabel({ className, children, ...props }) {
15937
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { "data-refineui": "menu-label", className: (0, import_clsx109.clsx)(menuStyles.section, className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: menuStyles.sectionText, children }) });
16056
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { "data-refineui": "menu-label", className: (0, import_clsx109.clsx)(menuStyles.section, className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: menuStyles.sectionText, children }) });
15938
16057
  }
15939
16058
  function ContextMenuSub({ children }) {
15940
16059
  const [open, setOpen] = (0, import_react63.useState)(false);
@@ -15960,7 +16079,7 @@ function ContextMenuSub({ children }) {
15960
16079
  }),
15961
16080
  [open]
15962
16081
  );
15963
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SubContext.Provider, { value, children });
16082
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(SubContext.Provider, { value, children });
15964
16083
  }
15965
16084
  function useSub2() {
15966
16085
  const value = (0, import_react63.useContext)(SubContext);
@@ -16003,26 +16122,26 @@ var ContextMenuSubTrigger = (0, import_react63.forwardRef)(
16003
16122
  if (!event.defaultPrevented) sub.show();
16004
16123
  }
16005
16124
  };
16006
- if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react64.Slot, { ...shared, children });
16007
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("button", { ...shared, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: menuStyles.row, children: [
16008
- startIcon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
16125
+ if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react64.Slot, { ...shared, children });
16126
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("button", { ...shared, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: menuStyles.row, children: [
16127
+ startIcon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
16009
16128
  "span",
16010
16129
  {
16011
16130
  className: menuStyles.iconWrap,
16012
- style: { width: import_tokens37.iconSizes.small, minWidth: import_tokens37.iconSizes.small, height: import_tokens37.iconSizes.small },
16131
+ style: { width: import_tokens38.iconSizes.small, minWidth: import_tokens38.iconSizes.small, height: import_tokens38.iconSizes.small },
16013
16132
  children: startIcon
16014
16133
  }
16015
16134
  ) : null,
16016
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: menuStyles.textCol, children: [
16017
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: menuStyles.title, children }),
16018
- description ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: (0, import_clsx109.clsx)(menuStyles.description, menuStyles.descriptionEnabled), children: description }) : null
16135
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: menuStyles.textCol, children: [
16136
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: menuStyles.title, children }),
16137
+ description ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: (0, import_clsx109.clsx)(menuStyles.description, menuStyles.descriptionEnabled), children: description }) : null
16019
16138
  ] }),
16020
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: menuStyles.rightWrap, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
16139
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: menuStyles.rightWrap, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
16021
16140
  "span",
16022
16141
  {
16023
16142
  className: menuStyles.iconWrap,
16024
- style: { width: import_tokens37.iconSizes.small, minWidth: import_tokens37.iconSizes.small, height: import_tokens37.iconSizes.small },
16025
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(WebIcon, { name: "chevron-right", size: import_tokens37.iconSizes.small, color: "currentColor", "aria-hidden": true })
16143
+ style: { width: import_tokens38.iconSizes.small, minWidth: import_tokens38.iconSizes.small, height: import_tokens38.iconSizes.small },
16144
+ children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WebIcon, { name: "chevron-right", size: import_tokens38.iconSizes.small, color: "currentColor", "aria-hidden": true })
16026
16145
  }
16027
16146
  ) })
16028
16147
  ] }) });
@@ -16050,8 +16169,8 @@ var ContextMenuSubContent = (0, import_react63.forwardRef)(
16050
16169
  placeInView(element, left, rect.top);
16051
16170
  }, [sub.open, sub.triggerRef]);
16052
16171
  if (!sub.open || typeof document === "undefined") return null;
16053
- return (0, import_react_dom7.createPortal)(
16054
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
16172
+ return (0, import_react_dom8.createPortal)(
16173
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
16055
16174
  "div",
16056
16175
  {
16057
16176
  ...props,