@refineui/react 0.1.0 → 0.1.2

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.js CHANGED
@@ -798,7 +798,7 @@ var componentTypographyTokens = {
798
798
  shortcut: role("bodyXs")
799
799
  },
800
800
  dialog: {
801
- title: role("subtitleMd"),
801
+ title: role("subtitleLg"),
802
802
  description: role("bodyXs")
803
803
  },
804
804
  drawer: {
@@ -945,7 +945,6 @@ var componentTokens = {
945
945
  color: componentColorTokens.toast,
946
946
  typography: componentTypographyTokens.toast,
947
947
  size: {
948
- minWidth: componentSizes.toastMinWidth,
949
948
  maxWidth: componentSizes.toastMaxWidth
950
949
  },
951
950
  elevation: {
@@ -11325,25 +11324,222 @@ import {
11325
11324
  createContext as createContext21,
11326
11325
  useCallback as useCallback17,
11327
11326
  useContext as useContext23,
11328
- useEffect as useEffect15,
11327
+ useEffect as useEffect16,
11329
11328
  useId as useId14,
11330
11329
  useMemo as useMemo17,
11331
11330
  useRef as useRef17,
11332
- useState as useState21
11331
+ useState as useState22
11333
11332
  } from "react";
11334
- import { spacings as spacings5, strokeWidths as strokeWidths2 } from "@refineui/tokens";
11333
+ import { borderRadii, spacings as spacings6 } from "@refineui/tokens";
11335
11334
  import { resolveColorTokenValue as resolveColorTokenValue10 } from "@refineui/utilities/color";
11336
11335
  import { Slot as Slot4, getMergeableTriggerChild as getMergeableTriggerChild3 } from "@refineui/utilities/react";
11337
11336
 
11337
+ // src/components/shared/FloatingSurface.tsx
11338
+ import { useEffect as useEffect15, useLayoutEffect as useLayoutEffect9, useState as useState21 } from "react";
11339
+ import { spacings as spacings5, strokeWidths as strokeWidths2 } from "@refineui/tokens";
11340
+
11341
+ // src/components/shared/floatingOutline.ts
11342
+ var PATH_PRECISION = 100;
11343
+ function fmt(n) {
11344
+ return String(Math.round(n * PATH_PRECISION) / PATH_PRECISION);
11345
+ }
11346
+ function pt(p) {
11347
+ return `${fmt(p.x)} ${fmt(p.y)}`;
11348
+ }
11349
+ function towards(from, to, distance) {
11350
+ const length = Math.hypot(to.x - from.x, to.y - from.y);
11351
+ if (length === 0) return from;
11352
+ const t = distance / length;
11353
+ return { x: from.x + (to.x - from.x) * t, y: from.y + (to.y - from.y) * t };
11354
+ }
11355
+ function floatingShapeSize(panelWidth, panelHeight, side, beakHeight) {
11356
+ const vertical = side === "top" || side === "bottom";
11357
+ return {
11358
+ width: vertical ? panelWidth : panelWidth + beakHeight,
11359
+ height: vertical ? panelHeight + beakHeight : panelHeight
11360
+ };
11361
+ }
11362
+ function resolveBeakCenter(edgeLength, align, beakWidth, radius2, insetStart, insetEnd) {
11363
+ const half = beakWidth / 2;
11364
+ const min = radius2 + half;
11365
+ const max = edgeLength - radius2 - half;
11366
+ if (max < min) return edgeLength / 2;
11367
+ const wanted = align === "center" ? edgeLength / 2 : align === "start" ? insetStart + half : edgeLength - insetEnd - half;
11368
+ return Math.min(max, Math.max(min, wanted));
11369
+ }
11370
+ function buildFloatingOutline({
11371
+ panelWidth,
11372
+ panelHeight,
11373
+ radius: radius2,
11374
+ side,
11375
+ beakCenter,
11376
+ beakWidth,
11377
+ beakHeight,
11378
+ tipRadius,
11379
+ inset = 0
11380
+ }) {
11381
+ const offsetX = side === "left" ? beakHeight : 0;
11382
+ const offsetY = side === "top" ? beakHeight : 0;
11383
+ const x0 = offsetX + inset;
11384
+ const y0 = offsetY + inset;
11385
+ const x1 = offsetX + panelWidth - inset;
11386
+ const y1 = offsetY + panelHeight - inset;
11387
+ const r = Math.max(0, Math.min(radius2 - inset, (x1 - x0) / 2, (y1 - y0) / 2));
11388
+ const half = beakWidth / 2;
11389
+ const sinHalfAngle = half / Math.hypot(half, beakHeight);
11390
+ const reach = beakHeight + inset - inset / sinHalfAngle;
11391
+ const spread = half * reach / beakHeight;
11392
+ const edgeCenter = (side === "top" || side === "bottom" ? offsetX : offsetY) + beakCenter;
11393
+ const beak = (first, tip, second) => {
11394
+ const before = towards(tip, first, tipRadius);
11395
+ const after = towards(tip, second, tipRadius);
11396
+ return ` L ${pt(first)} L ${pt(before)} Q ${pt(tip)} ${pt(after)} L ${pt(second)}`;
11397
+ };
11398
+ let d = `M ${pt({ x: x0 + r, y: y0 })}`;
11399
+ if (side === "top") {
11400
+ d += beak(
11401
+ { x: edgeCenter - spread, y: y0 },
11402
+ { x: edgeCenter, y: y0 - reach },
11403
+ { x: edgeCenter + spread, y: y0 }
11404
+ );
11405
+ }
11406
+ d += ` L ${pt({ x: x1 - r, y: y0 })} A ${fmt(r)} ${fmt(r)} 0 0 1 ${pt({ x: x1, y: y0 + r })}`;
11407
+ if (side === "right") {
11408
+ d += beak(
11409
+ { x: x1, y: edgeCenter - spread },
11410
+ { x: x1 + reach, y: edgeCenter },
11411
+ { x: x1, y: edgeCenter + spread }
11412
+ );
11413
+ }
11414
+ d += ` L ${pt({ x: x1, y: y1 - r })} A ${fmt(r)} ${fmt(r)} 0 0 1 ${pt({ x: x1 - r, y: y1 })}`;
11415
+ if (side === "bottom") {
11416
+ d += beak(
11417
+ { x: edgeCenter + spread, y: y1 },
11418
+ { x: edgeCenter, y: y1 + reach },
11419
+ { x: edgeCenter - spread, y: y1 }
11420
+ );
11421
+ }
11422
+ d += ` L ${pt({ x: x0 + r, y: y1 })} A ${fmt(r)} ${fmt(r)} 0 0 1 ${pt({ x: x0, y: y1 - r })}`;
11423
+ if (side === "left") {
11424
+ d += beak(
11425
+ { x: x0, y: edgeCenter + spread },
11426
+ { x: x0 - reach, y: edgeCenter },
11427
+ { x: x0, y: edgeCenter - spread }
11428
+ );
11429
+ }
11430
+ d += ` L ${pt({ x: x0, y: y0 + r })} A ${fmt(r)} ${fmt(r)} 0 0 1 ${pt({ x: x0 + r, y: y0 })} Z`;
11431
+ return d;
11432
+ }
11433
+
11434
+ // src/components/shared/FloatingSurface.tsx
11435
+ import { jsx as jsx64, jsxs as jsxs24 } from "react/jsx-runtime";
11436
+ var useIsomorphicLayoutEffect6 = typeof document !== "undefined" ? useLayoutEffect9 : useEffect15;
11437
+ var SHADOW_BLEED = parseFloat(spacings5.sizeXXXLarge);
11438
+ var STROKE = parseFloat(strokeWidths2.strokeWidthThin);
11439
+ function usePanelSize(panelRef) {
11440
+ const [size, setSize] = useState21(null);
11441
+ useIsomorphicLayoutEffect6(() => {
11442
+ const panel = panelRef.current;
11443
+ if (!panel) return;
11444
+ const measure = () => {
11445
+ const style = getComputedStyle(panel);
11446
+ const next = { width: parseFloat(style.width), height: parseFloat(style.height) };
11447
+ setSize((prev) => prev && prev.width === next.width && prev.height === next.height ? prev : next);
11448
+ };
11449
+ measure();
11450
+ if (typeof ResizeObserver === "undefined") return;
11451
+ const observer = new ResizeObserver(measure);
11452
+ observer.observe(panel);
11453
+ return () => observer.disconnect();
11454
+ }, [panelRef]);
11455
+ return size;
11456
+ }
11457
+ function FloatingSurface({
11458
+ panelRef,
11459
+ side,
11460
+ align,
11461
+ radius: radius2,
11462
+ beakWidth,
11463
+ beakHeight,
11464
+ tipRadius,
11465
+ beakInsetStart,
11466
+ beakInsetEnd,
11467
+ backgroundColor,
11468
+ borderColor
11469
+ }) {
11470
+ const size = usePanelSize(panelRef);
11471
+ if (!size) return null;
11472
+ const r = parseFloat(radius2);
11473
+ const bw = parseFloat(beakWidth);
11474
+ const bh = parseFloat(beakHeight);
11475
+ const vertical = side === "top" || side === "bottom";
11476
+ const beakCenter = resolveBeakCenter(
11477
+ vertical ? size.width : size.height,
11478
+ align,
11479
+ bw,
11480
+ r,
11481
+ parseFloat(beakInsetStart),
11482
+ parseFloat(beakInsetEnd)
11483
+ );
11484
+ const geometry = {
11485
+ panelWidth: size.width,
11486
+ panelHeight: size.height,
11487
+ radius: r,
11488
+ side,
11489
+ beakCenter,
11490
+ beakWidth: bw,
11491
+ beakHeight: bh,
11492
+ tipRadius: parseFloat(tipRadius)
11493
+ };
11494
+ const shape = buildFloatingOutline(geometry);
11495
+ const outline = buildFloatingOutline({ ...geometry, inset: STROKE / 2 });
11496
+ const box = floatingShapeSize(size.width, size.height, side, bh);
11497
+ const holeSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="${box.width + SHADOW_BLEED * 2}" height="${box.height + SHADOW_BLEED * 2}"><path transform="translate(${SHADOW_BLEED} ${SHADOW_BLEED})" d="${shape}"/></svg>`;
11498
+ const holeMask = `linear-gradient(#000 0 0), url("data:image/svg+xml,${encodeURIComponent(holeSvg)}")`;
11499
+ const rootStyle = {
11500
+ width: box.width,
11501
+ height: box.height,
11502
+ top: side === "top" ? -bh : 0,
11503
+ left: side === "left" ? -bh : 0
11504
+ };
11505
+ const shadowStyle = {
11506
+ inset: -SHADOW_BLEED,
11507
+ maskImage: holeMask,
11508
+ WebkitMaskImage: holeMask,
11509
+ maskComposite: "exclude",
11510
+ WebkitMaskComposite: "xor",
11511
+ maskSize: "100% 100%",
11512
+ WebkitMaskSize: "100% 100%",
11513
+ maskRepeat: "no-repeat",
11514
+ WebkitMaskRepeat: "no-repeat"
11515
+ };
11516
+ const clip = `path("${shape}")`;
11517
+ return /* @__PURE__ */ jsxs24("div", { "data-refineui": "floating-chrome", "aria-hidden": true, className: "pointer-events-none absolute -z-1", style: rootStyle, children: [
11518
+ /* @__PURE__ */ jsx64("div", { className: "absolute", style: shadowStyle, children: /* @__PURE__ */ jsx64("div", { "data-refineui": "floating-shadow", className: "absolute", style: { inset: SHADOW_BLEED }, children: /* @__PURE__ */ jsx64("div", { className: "absolute inset-0", style: { clipPath: clip, backgroundColor: borderColor } }) }) }),
11519
+ /* @__PURE__ */ jsx64("div", { "data-refineui": "floating-surface", className: "absolute inset-0", style: { clipPath: clip, backgroundColor } }),
11520
+ /* @__PURE__ */ jsx64(
11521
+ "svg",
11522
+ {
11523
+ "data-refineui": "floating-outline",
11524
+ className: "absolute inset-0 overflow-visible",
11525
+ width: box.width,
11526
+ height: box.height,
11527
+ viewBox: `0 0 ${box.width} ${box.height}`,
11528
+ fill: "none",
11529
+ children: /* @__PURE__ */ jsx64("path", { d: outline, stroke: borderColor, strokeWidth: STROKE, strokeLinejoin: "round" })
11530
+ }
11531
+ )
11532
+ ] });
11533
+ }
11534
+
11338
11535
  // src/components/PopOver/style.ts
11339
11536
  var popoverStyles = {
11340
11537
  root: "relative inline-block",
11341
11538
  fallbackTrigger: "cursor-pointer border-none bg-transparent p-0 font-inherit text-inherit",
11342
11539
  floatingRoot: "absolute z-refineui-popup",
11343
11540
  panelWrap: "relative inline-block min-w-refineui-popover-panel-width",
11344
- beakWrap: "pointer-events-none absolute z-[1]",
11345
- panel: "relative z-0 box-border min-w-refineui-popover-panel-width rounded-refineui-xx-large border-refineui-thin outline-none",
11346
- panelShadowDefault: "shadow-refineui-8"
11541
+ /** Fill, stroke, and shadow come from `FloatingSurface`; the transparent border keeps the box size. */
11542
+ panel: "relative z-0 box-border min-w-refineui-popover-panel-width rounded-refineui-xx-large border-refineui-thin border-transparent outline-none"
11347
11543
  };
11348
11544
  function popoverFloatingClasses(placement, align) {
11349
11545
  if (placement === "bottom") {
@@ -11367,58 +11563,22 @@ function popoverFloatingClasses(placement, align) {
11367
11563
  }
11368
11564
 
11369
11565
  // src/components/PopOver/PopOver.tsx
11370
- import { jsx as jsx64, jsxs as jsxs24 } from "react/jsx-runtime";
11566
+ import { jsx as jsx65, jsxs as jsxs25 } from "react/jsx-runtime";
11371
11567
  var PopoverContext = createContext21(null);
11372
11568
  function usePopoverContext(component) {
11373
11569
  const ctx = useContext23(PopoverContext);
11374
11570
  if (!ctx) throw new Error(`${component} must be used within <Popover>`);
11375
11571
  return ctx;
11376
11572
  }
11377
- var BEAK_W = foundationSizes.foundationSize160;
11378
- var BEAK_H = foundationSizes.foundationSize80;
11379
- var BEAK_OFFSET = foundationSizes.foundationSize80;
11380
- var BEAK_BORDER_OVERLAP = strokeWidths2.strokeWidthThin;
11381
- var POPOVER_GAP = spacings5.sizeMedium;
11382
- function beakWrapperStyle(placement, align) {
11383
- const insetStart = componentSizes2.popoverBeakInsetFromStartEdge;
11384
- const insetEnd = componentSizes2.popoverBeakInsetFromEndEdge;
11385
- const edge = spacings5.sizeMedium;
11386
- const overlapOffset = `calc(-1 * ${BEAK_OFFSET} + ${BEAK_BORDER_OVERLAP})`;
11387
- switch (placement) {
11388
- case "bottom":
11389
- if (align === "center") return { top: overlapOffset, left: `calc(50% - ${BEAK_W} / 2)` };
11390
- if (align === "start") return { top: overlapOffset, left: insetStart };
11391
- return { top: overlapOffset, right: insetEnd };
11392
- case "top":
11393
- if (align === "center") return { bottom: overlapOffset, left: `calc(50% - ${BEAK_W} / 2)` };
11394
- if (align === "start") return { bottom: overlapOffset, left: insetStart };
11395
- return { bottom: overlapOffset, right: insetEnd };
11396
- case "left":
11397
- if (align === "center") return { right: overlapOffset, top: `calc(50% - ${BEAK_W} / 2)` };
11398
- if (align === "start") return { right: overlapOffset, top: edge };
11399
- return { right: overlapOffset, bottom: edge };
11400
- case "right":
11401
- if (align === "center") return { left: overlapOffset, top: `calc(50% - ${BEAK_W} / 2)` };
11402
- if (align === "start") return { left: overlapOffset, top: edge };
11403
- return { left: overlapOffset, bottom: edge };
11404
- default:
11405
- return {};
11406
- }
11407
- }
11408
- function beakRotateDeg(placement) {
11409
- switch (placement) {
11410
- case "bottom":
11411
- return 0;
11412
- case "top":
11413
- return 180;
11414
- case "left":
11415
- return -90;
11416
- case "right":
11417
- return 90;
11418
- default:
11419
- return 0;
11420
- }
11421
- }
11573
+ var BEAK_TIP_GAP = spacings6.sizeXXSmall;
11574
+ var POPOVER_GAP = `calc(${componentSizes2.popoverBeakHeight} + ${BEAK_TIP_GAP})`;
11575
+ var SIDE_BEAK_INSET = spacings6.sizeMedium;
11576
+ var beakSideByPlacement = {
11577
+ bottom: "top",
11578
+ top: "bottom",
11579
+ left: "right",
11580
+ right: "left"
11581
+ };
11422
11582
  function floatingGapStyle(placement) {
11423
11583
  if (placement === "top") return { marginBottom: POPOVER_GAP };
11424
11584
  if (placement === "bottom") return { marginTop: POPOVER_GAP };
@@ -11426,7 +11586,7 @@ function floatingGapStyle(placement) {
11426
11586
  return { marginLeft: POPOVER_GAP };
11427
11587
  }
11428
11588
  function Popover({ children, className, open: openProp, defaultOpen = false, onOpenChange, ...props }) {
11429
- const [internalOpen, setInternalOpen] = useState21(defaultOpen);
11589
+ const [internalOpen, setInternalOpen] = useState22(defaultOpen);
11430
11590
  const open = openProp ?? internalOpen;
11431
11591
  const setOpen = useCallback17(
11432
11592
  (next) => {
@@ -11440,14 +11600,14 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
11440
11600
  const contentRef = useRef17(null);
11441
11601
  const triggerRef = useRef17(null);
11442
11602
  const contentId = useId14();
11443
- useEffect15(() => {
11603
+ useEffect16(() => {
11444
11604
  const handler = (e) => {
11445
11605
  if (containerRef.current && !containerRef.current.contains(e.target)) setOpen(false);
11446
11606
  };
11447
11607
  if (open) document.addEventListener("mousedown", handler);
11448
11608
  return () => document.removeEventListener("mousedown", handler);
11449
11609
  }, [open, setOpen]);
11450
- useEffect15(() => {
11610
+ useEffect16(() => {
11451
11611
  const onKey = (e) => {
11452
11612
  if (e instanceof KeyboardEvent && e.key === "Escape") setOpen(false);
11453
11613
  };
@@ -11476,7 +11636,7 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
11476
11636
  }),
11477
11637
  [open, setOpen, toggle, contentId, onTriggerKeyDown]
11478
11638
  );
11479
- return /* @__PURE__ */ jsx64(PopoverContext.Provider, { value, children: /* @__PURE__ */ jsx64(
11639
+ return /* @__PURE__ */ jsx65(PopoverContext.Provider, { value, children: /* @__PURE__ */ jsx65(
11480
11640
  "div",
11481
11641
  {
11482
11642
  ref: containerRef,
@@ -11492,7 +11652,7 @@ function PopoverTrigger({ children, className, ...props }) {
11492
11652
  const mergeEl = getMergeableTriggerChild3(children);
11493
11653
  if (mergeEl) {
11494
11654
  const passthrough = props;
11495
- return /* @__PURE__ */ jsx64(
11655
+ return /* @__PURE__ */ jsx65(
11496
11656
  Slot4,
11497
11657
  {
11498
11658
  ref: triggerRef,
@@ -11514,7 +11674,7 @@ function PopoverTrigger({ children, className, ...props }) {
11514
11674
  );
11515
11675
  }
11516
11676
  const passthroughBtn = props;
11517
- return /* @__PURE__ */ jsx64(
11677
+ return /* @__PURE__ */ jsx65(
11518
11678
  "button",
11519
11679
  {
11520
11680
  type: "button",
@@ -11553,11 +11713,10 @@ function PopoverContent({
11553
11713
  const palette = componentColorTokens.popover.default;
11554
11714
  const bg = resolveColorTokenValue10(palette.background);
11555
11715
  const borderCol = resolveColorTokenValue10(palette.border);
11556
- const bw = beakWrapperStyle(placement, align);
11557
- const rot = beakRotateDeg(placement);
11558
11716
  const gapStyle = floatingGapStyle(placement);
11717
+ const vertical = placement === "top" || placement === "bottom";
11559
11718
  if (!open) return null;
11560
- return /* @__PURE__ */ jsx64(
11719
+ return /* @__PURE__ */ jsx65(
11561
11720
  "div",
11562
11721
  {
11563
11722
  className: clsx85(
@@ -11565,34 +11724,8 @@ function PopoverContent({
11565
11724
  popoverFloatingClasses(placement, align)
11566
11725
  ),
11567
11726
  style: gapStyle,
11568
- children: /* @__PURE__ */ jsxs24("div", { className: popoverStyles.panelWrap, children: [
11569
- /* @__PURE__ */ jsx64("div", { className: popoverStyles.beakWrap, style: { ...bw, width: BEAK_W, height: BEAK_H }, "aria-hidden": true, children: /* @__PURE__ */ jsx64(
11570
- "div",
11571
- {
11572
- style: {
11573
- width: BEAK_W,
11574
- height: BEAK_H,
11575
- transform: `rotate(${rot}deg)`,
11576
- transformOrigin: "center center"
11577
- },
11578
- children: /* @__PURE__ */ jsxs24(
11579
- "svg",
11580
- {
11581
- width: BEAK_W,
11582
- height: BEAK_H,
11583
- viewBox: "0 0 16 8",
11584
- fill: "none",
11585
- xmlns: "http://www.w3.org/2000/svg",
11586
- style: { display: "block" },
11587
- children: [
11588
- /* @__PURE__ */ jsx64("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
11589
- /* @__PURE__ */ jsx64("polygon", { points: "8,2 2,8 14,8", fill: bg })
11590
- ]
11591
- }
11592
- )
11593
- }
11594
- ) }),
11595
- /* @__PURE__ */ jsx64(
11727
+ children: /* @__PURE__ */ jsxs25("div", { className: popoverStyles.panelWrap, children: [
11728
+ /* @__PURE__ */ jsx65(
11596
11729
  "div",
11597
11730
  {
11598
11731
  ref: contentRef,
@@ -11603,22 +11736,32 @@ function PopoverContent({
11603
11736
  "data-refineui": "popover",
11604
11737
  "data-placement": placement,
11605
11738
  "data-align": align,
11606
- className: clsx85(
11607
- popoverStyles.panel,
11608
- popoverStyles.panelShadowDefault,
11609
- className
11610
- ),
11739
+ className: clsx85(popoverStyles.panel, className),
11611
11740
  style: {
11612
11741
  ...styleProp && typeof styleProp === "object" ? styleProp : {},
11613
11742
  minWidth: componentSizes2.popoverPanelWidth,
11614
- padding: spacings5.sizeLarge,
11615
- backgroundColor: bg,
11616
- color: resolveColorTokenValue10(palette.foreground),
11617
- borderColor: borderCol
11743
+ padding: spacings6.sizeLarge,
11744
+ color: resolveColorTokenValue10(palette.foreground)
11618
11745
  },
11619
11746
  ...props,
11620
11747
  children
11621
11748
  }
11749
+ ),
11750
+ /* @__PURE__ */ jsx65(
11751
+ FloatingSurface,
11752
+ {
11753
+ panelRef: contentRef,
11754
+ side: beakSideByPlacement[placement],
11755
+ align,
11756
+ radius: borderRadii.roundedXXLarge,
11757
+ beakWidth: componentSizes2.popoverBeakWidth,
11758
+ beakHeight: componentSizes2.popoverBeakHeight,
11759
+ tipRadius: componentSizes2.popoverBeakTipRadius,
11760
+ beakInsetStart: vertical ? componentSizes2.popoverBeakInsetFromStartEdge : SIDE_BEAK_INSET,
11761
+ beakInsetEnd: vertical ? componentSizes2.popoverBeakInsetFromEndEdge : SIDE_BEAK_INSET,
11762
+ backgroundColor: bg,
11763
+ borderColor: borderCol
11764
+ }
11622
11765
  )
11623
11766
  ] })
11624
11767
  }
@@ -11632,9 +11775,9 @@ function PopOver({
11632
11775
  className,
11633
11776
  ...props
11634
11777
  }) {
11635
- return /* @__PURE__ */ jsxs24(Popover, { className, ...props, children: [
11636
- /* @__PURE__ */ jsx64(PopoverTrigger, { children: trigger }),
11637
- /* @__PURE__ */ jsx64(PopoverContent, { placement, align, children: content })
11778
+ return /* @__PURE__ */ jsxs25(Popover, { className, ...props, children: [
11779
+ /* @__PURE__ */ jsx65(PopoverTrigger, { children: trigger }),
11780
+ /* @__PURE__ */ jsx65(PopoverContent, { placement, align, children: content })
11638
11781
  ] });
11639
11782
  }
11640
11783
 
@@ -11650,7 +11793,7 @@ var skeletonStyles = {
11650
11793
  };
11651
11794
 
11652
11795
  // src/components/Skeleton/Skeleton.tsx
11653
- import { jsx as jsx65 } from "react/jsx-runtime";
11796
+ import { jsx as jsx66 } from "react/jsx-runtime";
11654
11797
  function Skeleton({
11655
11798
  width,
11656
11799
  height,
@@ -11682,7 +11825,7 @@ function Skeleton({
11682
11825
  w = width ?? "100%";
11683
11826
  }
11684
11827
  const dimStyle = { width: w, height: h };
11685
- return /* @__PURE__ */ jsx65(
11828
+ return /* @__PURE__ */ jsx66(
11686
11829
  "div",
11687
11830
  {
11688
11831
  "data-refineui": "skeleton",
@@ -11700,7 +11843,7 @@ function Skeleton({
11700
11843
 
11701
11844
  // src/components/Slider/Slider.tsx
11702
11845
  import { clsx as clsx87 } from "clsx";
11703
- import { useState as useState22 } from "react";
11846
+ import { useState as useState23 } from "react";
11704
11847
 
11705
11848
  // src/components/Slider/style.ts
11706
11849
  var sliderStyles = {
@@ -11708,7 +11851,7 @@ var sliderStyles = {
11708
11851
  };
11709
11852
 
11710
11853
  // src/components/Slider/Slider.tsx
11711
- import { jsx as jsx66 } from "react/jsx-runtime";
11854
+ import { jsx as jsx67 } from "react/jsx-runtime";
11712
11855
  function clampPct(n) {
11713
11856
  if (Number.isNaN(n)) return 0;
11714
11857
  return Math.min(100, Math.max(0, n));
@@ -11726,12 +11869,12 @@ function Slider({
11726
11869
  style,
11727
11870
  ...props
11728
11871
  }) {
11729
- const [internalFillPct, setInternalFillPct] = useState22(() => {
11872
+ const [internalFillPct, setInternalFillPct] = useState23(() => {
11730
11873
  const v = defaultValue !== void 0 ? Number(defaultValue) : (min + max) / 2;
11731
11874
  return clampPct((v - min) / (max - min) * 100);
11732
11875
  });
11733
11876
  const fillPct = value !== void 0 ? clampPct((Number(value) - min) / (max - min) * 100) : internalFillPct;
11734
- return /* @__PURE__ */ jsx66(
11877
+ return /* @__PURE__ */ jsx67(
11735
11878
  "input",
11736
11879
  {
11737
11880
  type: "range",
@@ -11776,11 +11919,11 @@ import {
11776
11919
  isValidElement as isValidElement5,
11777
11920
  useCallback as useCallback18,
11778
11921
  useContext as useContext24,
11779
- useEffect as useEffect16,
11780
- useLayoutEffect as useLayoutEffect9,
11922
+ useEffect as useEffect17,
11923
+ useLayoutEffect as useLayoutEffect10,
11781
11924
  useMemo as useMemo18,
11782
11925
  useRef as useRef18,
11783
- useState as useState23
11926
+ useState as useState24
11784
11927
  } from "react";
11785
11928
 
11786
11929
  // src/components/Carousel/style.ts
@@ -11813,7 +11956,7 @@ var carouselStyles = {
11813
11956
  };
11814
11957
 
11815
11958
  // src/components/Carousel/Carousel.tsx
11816
- import { jsx as jsx67, jsxs as jsxs25 } from "react/jsx-runtime";
11959
+ import { jsx as jsx68, jsxs as jsxs26 } from "react/jsx-runtime";
11817
11960
  var DRAG_COMMIT_RATIO = 0.18;
11818
11961
  var CarouselContext = createContext22(null);
11819
11962
  function useCarouselContext(component) {
@@ -11836,10 +11979,10 @@ function Carousel({
11836
11979
  ...props
11837
11980
  }) {
11838
11981
  const isControlled = indexControlled !== void 0;
11839
- const [internalIndex, setInternalIndex] = useState23(defaultIndex);
11840
- const [count, setCount] = useState23(0);
11841
- const [trackIndex, setTrackIndex] = useState23(defaultIndex);
11842
- const [instant, setInstant] = useState23(false);
11982
+ const [internalIndex, setInternalIndex] = useState24(defaultIndex);
11983
+ const [count, setCount] = useState24(0);
11984
+ const [trackIndex, setTrackIndex] = useState24(defaultIndex);
11985
+ const [instant, setInstant] = useState24(false);
11843
11986
  const index = isControlled ? indexControlled : internalIndex;
11844
11987
  const loopActive = loop && count > 1;
11845
11988
  const commitLogical = useCallback18(
@@ -11850,13 +11993,13 @@ function Carousel({
11850
11993
  },
11851
11994
  [count, isControlled, onIndexChange]
11852
11995
  );
11853
- useLayoutEffect9(() => {
11996
+ useLayoutEffect10(() => {
11854
11997
  if (count <= 0) return;
11855
11998
  const logical = clampIndex(index, count);
11856
11999
  if (logical !== index) commitLogical(logical);
11857
12000
  setTrackIndex(loopActive ? logical + 1 : logical);
11858
12001
  }, [count, loopActive]);
11859
- useEffect16(() => {
12002
+ useEffect17(() => {
11860
12003
  if (count <= 0) return;
11861
12004
  if (!loopActive) {
11862
12005
  setTrackIndex(clampIndex(index, count));
@@ -11976,7 +12119,7 @@ function Carousel({
11976
12119
  break;
11977
12120
  }
11978
12121
  };
11979
- return /* @__PURE__ */ jsx67(CarouselContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx67(
12122
+ return /* @__PURE__ */ jsx68(CarouselContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx68(
11980
12123
  "div",
11981
12124
  {
11982
12125
  "data-refineui": "carousel",
@@ -12002,11 +12145,11 @@ function CarouselContent({ className, children, ...props }) {
12002
12145
  } = useCarouselContext("CarouselContent");
12003
12146
  const viewportRef = useRef18(null);
12004
12147
  const dragStartX = useRef18(null);
12005
- const [dragPx, setDragPx] = useState23(0);
12006
- const [dragging, setDragging] = useState23(false);
12148
+ const [dragPx, setDragPx] = useState24(0);
12149
+ const [dragging, setDragging] = useState24(false);
12007
12150
  const slides = Children6.toArray(children).filter(isValidElement5);
12008
12151
  const slideCount = slides.length;
12009
- useEffect16(() => {
12152
+ useEffect17(() => {
12010
12153
  setCount(slideCount);
12011
12154
  }, [setCount, slideCount]);
12012
12155
  const trackSlides = loop && slides.length > 1 ? [
@@ -12063,7 +12206,7 @@ function CarouselContent({ className, children, ...props }) {
12063
12206
  };
12064
12207
  const animated = !dragging && !instant;
12065
12208
  const transform = dragPx !== 0 ? `translate3d(calc(-${trackIndex * 100}% + ${dragPx}px), 0, 0)` : `translate3d(-${trackIndex * 100}%, 0, 0)`;
12066
- return /* @__PURE__ */ jsx67(
12209
+ return /* @__PURE__ */ jsx68(
12067
12210
  "div",
12068
12211
  {
12069
12212
  ref: viewportRef,
@@ -12074,7 +12217,7 @@ function CarouselContent({ className, children, ...props }) {
12074
12217
  onPointerMove,
12075
12218
  onPointerUp,
12076
12219
  onPointerCancel,
12077
- children: /* @__PURE__ */ jsx67(
12220
+ children: /* @__PURE__ */ jsx68(
12078
12221
  "div",
12079
12222
  {
12080
12223
  "data-refineui": "carousel-track",
@@ -12091,7 +12234,7 @@ function CarouselContent({ className, children, ...props }) {
12091
12234
  }
12092
12235
  var CarouselItem = forwardRef15(function CarouselItem2({ className, children, ...props }, ref) {
12093
12236
  useCarouselContext("CarouselItem");
12094
- return /* @__PURE__ */ jsx67(
12237
+ return /* @__PURE__ */ jsx68(
12095
12238
  "div",
12096
12239
  {
12097
12240
  ref,
@@ -12106,12 +12249,12 @@ var CarouselItem = forwardRef15(function CarouselItem2({ className, children, ..
12106
12249
  });
12107
12250
  function CarouselControls({ className, children, ...props }) {
12108
12251
  useCarouselContext("CarouselControls");
12109
- return /* @__PURE__ */ jsx67("div", { "data-refineui": "carousel-controls", className: clsx89(carouselStyles.controls, className), ...props, children });
12252
+ return /* @__PURE__ */ jsx68("div", { "data-refineui": "carousel-controls", className: clsx89(carouselStyles.controls, className), ...props, children });
12110
12253
  }
12111
12254
  function CarouselPrevious({ className, disabled, onClick, ...props }) {
12112
12255
  const { scrollPrev, canScrollPrev } = useCarouselContext("CarouselPrevious");
12113
12256
  const isDisabled = disabled || !canScrollPrev;
12114
- return /* @__PURE__ */ jsx67(
12257
+ return /* @__PURE__ */ jsx68(
12115
12258
  Button,
12116
12259
  {
12117
12260
  variant: "outline",
@@ -12127,7 +12270,7 @@ function CarouselPrevious({ className, disabled, onClick, ...props }) {
12127
12270
  onClick?.(e);
12128
12271
  if (!e.defaultPrevented && !isDisabled) scrollPrev();
12129
12272
  },
12130
- children: /* @__PURE__ */ jsx67(
12273
+ children: /* @__PURE__ */ jsx68(
12131
12274
  WebIcon,
12132
12275
  {
12133
12276
  name: "chevron-left",
@@ -12143,7 +12286,7 @@ function CarouselPrevious({ className, disabled, onClick, ...props }) {
12143
12286
  function CarouselNext({ className, disabled, onClick, ...props }) {
12144
12287
  const { scrollNext, canScrollNext } = useCarouselContext("CarouselNext");
12145
12288
  const isDisabled = disabled || !canScrollNext;
12146
- return /* @__PURE__ */ jsx67(
12289
+ return /* @__PURE__ */ jsx68(
12147
12290
  Button,
12148
12291
  {
12149
12292
  variant: "outline",
@@ -12159,7 +12302,7 @@ function CarouselNext({ className, disabled, onClick, ...props }) {
12159
12302
  onClick?.(e);
12160
12303
  if (!e.defaultPrevented && !isDisabled) scrollNext();
12161
12304
  },
12162
- children: /* @__PURE__ */ jsx67(
12305
+ children: /* @__PURE__ */ jsx68(
12163
12306
  WebIcon,
12164
12307
  {
12165
12308
  name: "chevron-right",
@@ -12175,7 +12318,7 @@ function CarouselNext({ className, disabled, onClick, ...props }) {
12175
12318
  function CarouselIndicators({ className, ...props }) {
12176
12319
  const { count, index, scrollTo } = useCarouselContext("CarouselIndicators");
12177
12320
  const trackRef = useRef18(null);
12178
- const [thumb, setThumb] = useState23({ width: 0, x: 0, ready: false });
12321
+ const [thumb, setThumb] = useState24({ width: 0, x: 0, ready: false });
12179
12322
  const updateThumb = useCallback18(() => {
12180
12323
  const el = trackRef.current;
12181
12324
  if (!el || count <= 0) {
@@ -12191,10 +12334,10 @@ function CarouselIndicators({ className, ...props }) {
12191
12334
  ready: true
12192
12335
  });
12193
12336
  }, [count, index]);
12194
- useLayoutEffect9(() => {
12337
+ useLayoutEffect10(() => {
12195
12338
  updateThumb();
12196
12339
  }, [updateThumb]);
12197
- useEffect16(() => {
12340
+ useEffect17(() => {
12198
12341
  const el = trackRef.current;
12199
12342
  if (!el) return;
12200
12343
  const ro = new ResizeObserver(() => updateThumb());
@@ -12206,7 +12349,7 @@ function CarouselIndicators({ className, ...props }) {
12206
12349
  width: thumb.width,
12207
12350
  transform: `translate3d(${thumb.x}px, 0, 0)`
12208
12351
  };
12209
- return /* @__PURE__ */ jsxs25(
12352
+ return /* @__PURE__ */ jsxs26(
12210
12353
  "div",
12211
12354
  {
12212
12355
  ref: trackRef,
@@ -12216,7 +12359,7 @@ function CarouselIndicators({ className, ...props }) {
12216
12359
  className: clsx89(carouselStyles.indicators, className),
12217
12360
  ...props,
12218
12361
  children: [
12219
- /* @__PURE__ */ jsx67(
12362
+ /* @__PURE__ */ jsx68(
12220
12363
  "span",
12221
12364
  {
12222
12365
  "data-refineui": "carousel-indicator-thumb",
@@ -12226,7 +12369,7 @@ function CarouselIndicators({ className, ...props }) {
12226
12369
  style: thumbStyle
12227
12370
  }
12228
12371
  ),
12229
- /* @__PURE__ */ jsx67("div", { "data-refineui": "carousel-indicator-hits", className: carouselStyles.indicatorHitRow, children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx67(
12372
+ /* @__PURE__ */ jsx68("div", { "data-refineui": "carousel-indicator-hits", className: carouselStyles.indicatorHitRow, children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx68(
12230
12373
  "button",
12231
12374
  {
12232
12375
  type: "button",
@@ -12317,7 +12460,7 @@ var bubbleContentVariantClass = {
12317
12460
  };
12318
12461
 
12319
12462
  // src/components/Bubble/Bubble.tsx
12320
- import { jsx as jsx68, jsxs as jsxs26 } from "react/jsx-runtime";
12463
+ import { jsx as jsx69, jsxs as jsxs27 } from "react/jsx-runtime";
12321
12464
  var BubbleContext = createContext23(null);
12322
12465
  function useBubbleContext(component) {
12323
12466
  const value = useContext25(BubbleContext);
@@ -12349,7 +12492,7 @@ function partitionBubbleChildren(children) {
12349
12492
  };
12350
12493
  }
12351
12494
  function BubbleGroup({ className, ...props }) {
12352
- return /* @__PURE__ */ jsx68(
12495
+ return /* @__PURE__ */ jsx69(
12353
12496
  "div",
12354
12497
  {
12355
12498
  "data-refineui": "bubble-group",
@@ -12368,7 +12511,7 @@ function Bubble({
12368
12511
  }) {
12369
12512
  const rootStyle = variant === "ghost" ? style : { maxWidth: BUBBLE_MAX_WIDTH, ...style };
12370
12513
  const { top, middle, bottom, hasTop, hasBottom } = partitionBubbleChildren(children);
12371
- return /* @__PURE__ */ jsx68(BubbleContext.Provider, { value: { variant, align }, children: /* @__PURE__ */ jsx68(
12514
+ return /* @__PURE__ */ jsx69(BubbleContext.Provider, { value: { variant, align }, children: /* @__PURE__ */ jsx69(
12372
12515
  "div",
12373
12516
  {
12374
12517
  "data-refineui": "bubble",
@@ -12383,7 +12526,7 @@ function Bubble({
12383
12526
  ),
12384
12527
  style: rootStyle,
12385
12528
  ...props,
12386
- children: /* @__PURE__ */ jsxs26("div", { "data-refineui": "bubble-surface", className: bubbleStyles.surface, children: [
12529
+ children: /* @__PURE__ */ jsxs27("div", { "data-refineui": "bubble-surface", className: bubbleStyles.surface, children: [
12387
12530
  middle,
12388
12531
  top,
12389
12532
  bottom
@@ -12393,7 +12536,7 @@ function Bubble({
12393
12536
  }
12394
12537
  function BubbleContent({ className, ...props }) {
12395
12538
  const { variant } = useBubbleContext("BubbleContent");
12396
- return /* @__PURE__ */ jsx68(
12539
+ return /* @__PURE__ */ jsx69(
12397
12540
  "div",
12398
12541
  {
12399
12542
  "data-refineui": "bubble-content",
@@ -12414,7 +12557,7 @@ function BubbleReactions({
12414
12557
  }) {
12415
12558
  const { align: bubbleAlign } = useBubbleContext("BubbleReactions");
12416
12559
  const align = alignProp ?? (bubbleAlign === "start" ? "end" : "start");
12417
- return /* @__PURE__ */ jsx68(
12560
+ return /* @__PURE__ */ jsx69(
12418
12561
  "div",
12419
12562
  {
12420
12563
  "data-refineui": "bubble-reactions",
@@ -12440,7 +12583,7 @@ import {
12440
12583
  useContext as useContext26,
12441
12584
  useMemo as useMemo19,
12442
12585
  useRef as useRef19,
12443
- useState as useState24
12586
+ useState as useState25
12444
12587
  } from "react";
12445
12588
 
12446
12589
  // src/components/Stepper/style.ts
@@ -12549,7 +12692,7 @@ var stepperConnectorVars = {
12549
12692
  };
12550
12693
 
12551
12694
  // src/components/Stepper/Stepper.tsx
12552
- import { jsx as jsx69, jsxs as jsxs27 } from "react/jsx-runtime";
12695
+ import { jsx as jsx70, jsxs as jsxs28 } from "react/jsx-runtime";
12553
12696
  var StepperContext = createContext24(null);
12554
12697
  var StepperItemContext = createContext24(null);
12555
12698
  var StepperListRegistryContext = createContext24(null);
@@ -12579,7 +12722,7 @@ function Stepper({
12579
12722
  ...props
12580
12723
  }) {
12581
12724
  const isControlled = valueControlled !== void 0;
12582
- const [internalValue, setInternalValue] = useState24(defaultValue);
12725
+ const [internalValue, setInternalValue] = useState25(defaultValue);
12583
12726
  const value = isControlled ? valueControlled : internalValue;
12584
12727
  const setValue = useCallback19(
12585
12728
  (next) => {
@@ -12597,7 +12740,7 @@ function Stepper({
12597
12740
  }),
12598
12741
  [value, setValue, orientation, onValueChange, isControlled]
12599
12742
  );
12600
- return /* @__PURE__ */ jsx69(StepperContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx69(
12743
+ return /* @__PURE__ */ jsx70(StepperContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx70(
12601
12744
  "div",
12602
12745
  {
12603
12746
  "data-refineui": "stepper",
@@ -12625,7 +12768,7 @@ function StepperList({ className, children, ...props }) {
12625
12768
  }),
12626
12769
  [value]
12627
12770
  );
12628
- return /* @__PURE__ */ jsx69(StepperListRegistryContext.Provider, { value: registry, children: /* @__PURE__ */ jsx69(
12771
+ return /* @__PURE__ */ jsx70(StepperListRegistryContext.Provider, { value: registry, children: /* @__PURE__ */ jsx70(
12629
12772
  "ol",
12630
12773
  {
12631
12774
  "data-refineui": "stepper-list",
@@ -12670,7 +12813,7 @@ function StepperItem({
12670
12813
  () => ({ state, disabled }),
12671
12814
  [state, disabled]
12672
12815
  );
12673
- return /* @__PURE__ */ jsx69(StepperItemContext.Provider, { value: itemCtx, children: /* @__PURE__ */ jsx69(
12816
+ return /* @__PURE__ */ jsx70(StepperItemContext.Provider, { value: itemCtx, children: /* @__PURE__ */ jsx70(
12674
12817
  "li",
12675
12818
  {
12676
12819
  "data-refineui": "stepper-item",
@@ -12698,7 +12841,7 @@ function StepperItem({
12698
12841
  function StepperIndicator({ className, children, ...props }) {
12699
12842
  const { state } = useStepperItemContext("StepperIndicator");
12700
12843
  const stateClass = state === "complete" ? stepperStyles.indicatorComplete : state === "current" ? stepperStyles.indicatorCurrent : stepperStyles.indicatorUpcoming;
12701
- const content = state === "upcoming" ? children : /* @__PURE__ */ jsx69(
12844
+ const content = state === "upcoming" ? children : /* @__PURE__ */ jsx70(
12702
12845
  WebIcon,
12703
12846
  {
12704
12847
  name: "checkmark",
@@ -12709,7 +12852,7 @@ function StepperIndicator({ className, children, ...props }) {
12709
12852
  className: "items-center justify-center"
12710
12853
  }
12711
12854
  );
12712
- return /* @__PURE__ */ jsx69(
12855
+ return /* @__PURE__ */ jsx70(
12713
12856
  "span",
12714
12857
  {
12715
12858
  "data-refineui": "stepper-indicator",
@@ -12724,7 +12867,7 @@ function StepperIndicator({ className, children, ...props }) {
12724
12867
  function StepperContent({ className, ...props }) {
12725
12868
  const { orientation } = useStepperContext("StepperContent");
12726
12869
  useStepperItemContext("StepperContent");
12727
- return /* @__PURE__ */ jsx69(
12870
+ return /* @__PURE__ */ jsx70(
12728
12871
  "div",
12729
12872
  {
12730
12873
  "data-refineui": "stepper-content",
@@ -12740,7 +12883,7 @@ function StepperContent({ className, ...props }) {
12740
12883
  function StepperTitle({ className, ...props }) {
12741
12884
  const { state } = useStepperItemContext("StepperTitle");
12742
12885
  const stateClass = state === "complete" ? stepperStyles.titleComplete : state === "current" ? stepperStyles.titleCurrent : stepperStyles.titleUpcoming;
12743
- return /* @__PURE__ */ jsx69(
12886
+ return /* @__PURE__ */ jsx70(
12744
12887
  "span",
12745
12888
  {
12746
12889
  "data-refineui": "stepper-title",
@@ -12753,7 +12896,7 @@ function StepperTitle({ className, ...props }) {
12753
12896
  function StepperDescription({ className, ...props }) {
12754
12897
  const { state } = useStepperItemContext("StepperDescription");
12755
12898
  const stateClass = state === "complete" ? stepperStyles.descriptionComplete : state === "current" ? stepperStyles.descriptionCurrent : stepperStyles.descriptionUpcoming;
12756
- return /* @__PURE__ */ jsx69(
12899
+ return /* @__PURE__ */ jsx70(
12757
12900
  "span",
12758
12901
  {
12759
12902
  "data-refineui": "stepper-description",
@@ -12768,7 +12911,7 @@ function StepperSeparator({ className, ...props }) {
12768
12911
  const registry = useContext26(StepperListRegistryContext);
12769
12912
  const state = registry?.takeSeparatorState() ?? "upcoming";
12770
12913
  const vertical = orientation === "vertical";
12771
- return /* @__PURE__ */ jsx69(
12914
+ return /* @__PURE__ */ jsx70(
12772
12915
  "li",
12773
12916
  {
12774
12917
  "data-refineui": "stepper-separator",
@@ -12782,7 +12925,7 @@ function StepperSeparator({ className, ...props }) {
12782
12925
  className
12783
12926
  ),
12784
12927
  ...props,
12785
- children: /* @__PURE__ */ jsxs27(
12928
+ children: /* @__PURE__ */ jsxs28(
12786
12929
  "span",
12787
12930
  {
12788
12931
  "data-refineui": "stepper-separator-rail",
@@ -12791,14 +12934,14 @@ function StepperSeparator({ className, ...props }) {
12791
12934
  vertical ? stepperStyles.separatorRailVertical : stepperStyles.separatorRailHorizontal
12792
12935
  ),
12793
12936
  children: [
12794
- /* @__PURE__ */ jsx69(
12937
+ /* @__PURE__ */ jsx70(
12795
12938
  "span",
12796
12939
  {
12797
12940
  "data-refineui": "stepper-separator-track",
12798
12941
  className: stepperStyles.separatorTrack
12799
12942
  }
12800
12943
  ),
12801
- /* @__PURE__ */ jsx69(
12944
+ /* @__PURE__ */ jsx70(
12802
12945
  "span",
12803
12946
  {
12804
12947
  "data-refineui": "stepper-separator-fill",
@@ -12831,10 +12974,10 @@ import {
12831
12974
  useCallback as useCallback20,
12832
12975
  useContext as useContext27,
12833
12976
  useId as useId15,
12834
- useLayoutEffect as useLayoutEffect10,
12977
+ useLayoutEffect as useLayoutEffect11,
12835
12978
  useMemo as useMemo20,
12836
12979
  useRef as useRef20,
12837
- useState as useState25
12980
+ useState as useState26
12838
12981
  } from "react";
12839
12982
 
12840
12983
  // src/components/Resizable/style.ts
@@ -12870,7 +13013,7 @@ var resizableStyles = {
12870
13013
  };
12871
13014
 
12872
13015
  // src/components/Resizable/Resizable.tsx
12873
- import { jsx as jsx70 } from "react/jsx-runtime";
13016
+ import { jsx as jsx71 } from "react/jsx-runtime";
12874
13017
  var KEYBOARD_STEP = 2;
12875
13018
  var KEYBOARD_STEP_LARGE = 10;
12876
13019
  var DEFAULT_SIZE = 50;
@@ -12940,7 +13083,7 @@ function ResizablePanelGroup({
12940
13083
  const groupRef = useRef20(null);
12941
13084
  const panelsRef = useRef20(/* @__PURE__ */ new Map());
12942
13085
  const orderCounterRef = useRef20(0);
12943
- const [sizes, setSizes] = useState25({});
13086
+ const [sizes, setSizes] = useState26({});
12944
13087
  const onLayoutRef = useRef20(onLayout);
12945
13088
  onLayoutRef.current = onLayout;
12946
13089
  const syncInitialSizes = useCallback20(() => {
@@ -13044,7 +13187,7 @@ function ResizablePanelGroup({
13044
13187
  },
13045
13188
  [emitPanelResize]
13046
13189
  );
13047
- useLayoutEffect10(() => {
13190
+ useLayoutEffect11(() => {
13048
13191
  const ids = orderedPanelIds(panelsRef.current);
13049
13192
  if (ids.length === 0) return;
13050
13193
  if (ids.some((id) => sizes[id] === void 0)) return;
@@ -13071,7 +13214,7 @@ function ResizablePanelGroup({
13071
13214
  setBetween
13072
13215
  ]
13073
13216
  );
13074
- return /* @__PURE__ */ jsx70(ResizableContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx70(
13217
+ return /* @__PURE__ */ jsx71(ResizableContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx71(
13075
13218
  "div",
13076
13219
  {
13077
13220
  ref: groupRef,
@@ -13103,7 +13246,7 @@ function ResizablePanel({
13103
13246
  const { orientation, sizes, registerPanel, unregisterPanel } = useResizableContext("ResizablePanel");
13104
13247
  const onResizeRef = useRef20(onResize);
13105
13248
  onResizeRef.current = onResize;
13106
- useLayoutEffect10(() => {
13249
+ useLayoutEffect11(() => {
13107
13250
  registerPanel({
13108
13251
  id,
13109
13252
  defaultSize,
@@ -13130,7 +13273,7 @@ function ResizablePanel({
13130
13273
  flexBasis: 0,
13131
13274
  ...orientation === "horizontal" ? { minWidth: `${minSize}%` } : { minHeight: `${minSize}%` }
13132
13275
  };
13133
- return /* @__PURE__ */ jsx70(
13276
+ return /* @__PURE__ */ jsx71(
13134
13277
  "div",
13135
13278
  {
13136
13279
  "data-refineui": "resizable-panel",
@@ -13162,10 +13305,10 @@ function ResizableHandle({
13162
13305
  setBetween
13163
13306
  } = useResizableContext("ResizableHandle");
13164
13307
  const handleRef = useRef20(null);
13165
- const [active, setActive] = useState25(false);
13166
- const [, setAdjacentReady] = useState25(false);
13308
+ const [active, setActive] = useState26(false);
13309
+ const [, setAdjacentReady] = useState26(false);
13167
13310
  const dragRef = useRef20(null);
13168
- useLayoutEffect10(() => {
13311
+ useLayoutEffect11(() => {
13169
13312
  setAdjacentReady(true);
13170
13313
  }, []);
13171
13314
  const adjacent = handleRef.current ? findAdjacentPanelIds(handleRef.current) : { leftId: null, rightId: null };
@@ -13275,7 +13418,7 @@ function ResizableHandle({
13275
13418
  resizeBetween(leftId, rightId, delta);
13276
13419
  queueMicrotask(keepFocus);
13277
13420
  };
13278
- return /* @__PURE__ */ jsx70(
13421
+ return /* @__PURE__ */ jsx71(
13279
13422
  "div",
13280
13423
  {
13281
13424
  ref: handleRef,
@@ -13305,7 +13448,7 @@ function ResizableHandle({
13305
13448
  onPointerUp: handlePointerUp,
13306
13449
  onPointerCancel: handlePointerUp,
13307
13450
  onKeyDown: handleKeyDown,
13308
- children: withHandle ? /* @__PURE__ */ jsx70(
13451
+ children: withHandle ? /* @__PURE__ */ jsx71(
13309
13452
  "span",
13310
13453
  {
13311
13454
  "aria-hidden": true,
@@ -13321,7 +13464,7 @@ function ResizableHandle({
13321
13464
 
13322
13465
  // src/components/SpinButton/SpinButton.tsx
13323
13466
  import { clsx as clsx96 } from "clsx";
13324
- import { useEffect as useEffect17, useState as useState26 } from "react";
13467
+ import { useEffect as useEffect18, useState as useState27 } from "react";
13325
13468
  import { iconSizes as iconSizes20 } from "@refineui/tokens";
13326
13469
 
13327
13470
  // src/components/SpinButton/style.ts
@@ -13345,7 +13488,7 @@ var spinButtonShellClass = formControlShellHeightClass;
13345
13488
  var spinButtonValueTypo = formControlTypoClass;
13346
13489
 
13347
13490
  // src/components/SpinButton/SpinButton.tsx
13348
- import { jsx as jsx71, jsxs as jsxs28 } from "react/jsx-runtime";
13491
+ import { jsx as jsx72, jsxs as jsxs29 } from "react/jsx-runtime";
13349
13492
  function SpinButton({
13350
13493
  value,
13351
13494
  onChange,
@@ -13359,8 +13502,8 @@ function SpinButton({
13359
13502
  onKeyDown,
13360
13503
  ...props
13361
13504
  }) {
13362
- const [draftValue, setDraftValue] = useState26(String(value));
13363
- useEffect17(() => {
13505
+ const [draftValue, setDraftValue] = useState27(String(value));
13506
+ useEffect18(() => {
13364
13507
  setDraftValue(String(value));
13365
13508
  }, [value]);
13366
13509
  const clampValue2 = (next) => {
@@ -13448,7 +13591,7 @@ function SpinButton({
13448
13591
  const atMax = max !== void 0 && value >= max;
13449
13592
  const atMin = min !== void 0 && value <= min;
13450
13593
  const borderClass = disabled ? spinButtonStyles.borderDisabled : spinButtonStyles.borderDefault;
13451
- return /* @__PURE__ */ jsxs28(
13594
+ return /* @__PURE__ */ jsxs29(
13452
13595
  "div",
13453
13596
  {
13454
13597
  role: "spinbutton",
@@ -13471,7 +13614,7 @@ function SpinButton({
13471
13614
  ...props,
13472
13615
  onKeyDown: handleKeyDown,
13473
13616
  children: [
13474
- /* @__PURE__ */ jsx71(
13617
+ /* @__PURE__ */ jsx72(
13475
13618
  "div",
13476
13619
  {
13477
13620
  "aria-live": "polite",
@@ -13482,7 +13625,7 @@ function SpinButton({
13482
13625
  disabled ? spinButtonStyles.valueTextDisabled : spinButtonStyles.valueTextDefault,
13483
13626
  disabled ? spinButtonStyles.bgDisabled : spinButtonStyles.bgDefault
13484
13627
  ),
13485
- children: /* @__PURE__ */ jsx71(
13628
+ children: /* @__PURE__ */ jsx72(
13486
13629
  "input",
13487
13630
  {
13488
13631
  type: "text",
@@ -13507,7 +13650,7 @@ function SpinButton({
13507
13650
  )
13508
13651
  }
13509
13652
  ),
13510
- /* @__PURE__ */ jsxs28(
13653
+ /* @__PURE__ */ jsxs29(
13511
13654
  "div",
13512
13655
  {
13513
13656
  className: clsx96(
@@ -13515,7 +13658,7 @@ function SpinButton({
13515
13658
  disabled ? spinButtonStyles.bgDisabled : spinButtonStyles.bgDefault
13516
13659
  ),
13517
13660
  children: [
13518
- /* @__PURE__ */ jsx71(
13661
+ /* @__PURE__ */ jsx72(
13519
13662
  "button",
13520
13663
  {
13521
13664
  type: "button",
@@ -13527,7 +13670,7 @@ function SpinButton({
13527
13670
  spinButtonStyles.stepButtonBase,
13528
13671
  disabled || atMax ? spinButtonStyles.stepButtonDisabled : spinButtonStyles.stepButtonEnabled
13529
13672
  ),
13530
- children: /* @__PURE__ */ jsx71(
13673
+ children: /* @__PURE__ */ jsx72(
13531
13674
  WebIcon,
13532
13675
  {
13533
13676
  name: "chevron-up",
@@ -13539,7 +13682,7 @@ function SpinButton({
13539
13682
  )
13540
13683
  }
13541
13684
  ),
13542
- /* @__PURE__ */ jsx71(
13685
+ /* @__PURE__ */ jsx72(
13543
13686
  "button",
13544
13687
  {
13545
13688
  type: "button",
@@ -13551,7 +13694,7 @@ function SpinButton({
13551
13694
  spinButtonStyles.stepButtonBase,
13552
13695
  disabled || atMin ? spinButtonStyles.stepButtonDisabled : spinButtonStyles.stepButtonEnabled
13553
13696
  ),
13554
- children: /* @__PURE__ */ jsx71(
13697
+ children: /* @__PURE__ */ jsx72(
13555
13698
  WebIcon,
13556
13699
  {
13557
13700
  name: "chevron-down",
@@ -13576,14 +13719,14 @@ import { clsx as clsx98 } from "clsx";
13576
13719
  import {
13577
13720
  forwardRef as forwardRef16,
13578
13721
  useCallback as useCallback21,
13579
- useEffect as useEffect18,
13580
- useLayoutEffect as useLayoutEffect11,
13722
+ useEffect as useEffect19,
13723
+ useLayoutEffect as useLayoutEffect12,
13581
13724
  useRef as useRef21,
13582
- useState as useState27,
13725
+ useState as useState28,
13583
13726
  useSyncExternalStore
13584
13727
  } from "react";
13585
13728
  import { createPortal as createPortal7 } from "react-dom";
13586
- import { iconSizes as iconSizes21, spacings as spacings6 } from "@refineui/tokens";
13729
+ import { iconSizes as iconSizes21, spacings as spacings7 } from "@refineui/tokens";
13587
13730
  import { motionMsToNumber as motionMsToNumber6 } from "@refineui/utilities/animation";
13588
13731
  import { resolveColorTokenValue as resolveColorTokenValue11 } from "@refineui/utilities/color";
13589
13732
 
@@ -13591,7 +13734,7 @@ import { resolveColorTokenValue as resolveColorTokenValue11 } from "@refineui/ut
13591
13734
  import { clsx as clsx97 } from "clsx";
13592
13735
  var toastRecipe = defineRecipe({
13593
13736
  name: "toast",
13594
- base: "relative isolate box-border flex w-fit min-w-refineui-toast-min-width max-w-refineui-toast-max-width cursor-grab items-center gap-refineui-size-small rounded-refineui-x-large border-refineui-hairline border-refineui-alias-border-default bg-refineui-alias-background-primary py-refineui-size-medium ps-refineui-size-medium pe-refineui-size-large select-none",
13737
+ base: "relative isolate box-border flex w-fit max-w-refineui-toast-max-width cursor-grab items-center gap-refineui-size-small rounded-refineui-x-large border-refineui-hairline border-refineui-alias-border-default bg-refineui-alias-background-primary py-refineui-size-medium ps-refineui-size-medium pe-refineui-size-large select-none",
13595
13738
  variants: {
13596
13739
  variant: {
13597
13740
  default: "",
@@ -13618,8 +13761,8 @@ var toastStyles = {
13618
13761
  };
13619
13762
 
13620
13763
  // src/components/Toast/Toast.tsx
13621
- import { jsx as jsx72, jsxs as jsxs29 } from "react/jsx-runtime";
13622
- var useIsomorphicLayoutEffect6 = typeof document !== "undefined" ? useLayoutEffect11 : useEffect18;
13764
+ import { jsx as jsx73, jsxs as jsxs30 } from "react/jsx-runtime";
13765
+ var useIsomorphicLayoutEffect7 = typeof document !== "undefined" ? useLayoutEffect12 : useEffect19;
13623
13766
  var ENTER_MS = 20;
13624
13767
  var LEAVE_MS = motionMsToNumber6(componentTokens.toast.motion.leave) + 60;
13625
13768
  var DEFAULT_DURATION = 4200;
@@ -13642,10 +13785,10 @@ function gapPxFromSpacingToken(token) {
13642
13785
  var TOAST_NARROW_STACK_MQ = "(max-width: 480px), (hover: none)";
13643
13786
  function readToastStackGapPx() {
13644
13787
  if (typeof globalThis.matchMedia === "undefined") {
13645
- return gapPxFromSpacingToken(String(spacings6.sizeLarge));
13788
+ return gapPxFromSpacingToken(String(spacings7.sizeLarge));
13646
13789
  }
13647
13790
  const mq = globalThis.matchMedia(TOAST_NARROW_STACK_MQ);
13648
- return gapPxFromSpacingToken(mq.matches ? String(spacings6.sizeMedium) : String(spacings6.sizeLarge));
13791
+ return gapPxFromSpacingToken(mq.matches ? String(spacings7.sizeMedium) : String(spacings7.sizeLarge));
13649
13792
  }
13650
13793
  function subscribeToastStackGap(onChange) {
13651
13794
  if (typeof globalThis.matchMedia === "undefined") return () => {
@@ -13658,7 +13801,7 @@ function useToastStackGapPx() {
13658
13801
  return useSyncExternalStore(
13659
13802
  subscribeToastStackGap,
13660
13803
  readToastStackGapPx,
13661
- () => gapPxFromSpacingToken(String(spacings6.sizeLarge))
13804
+ () => gapPxFromSpacingToken(String(spacings7.sizeLarge))
13662
13805
  );
13663
13806
  }
13664
13807
  function readToastNaturalHeight(li) {
@@ -13806,7 +13949,7 @@ var Toast = forwardRef16(function Toast2(props, ref) {
13806
13949
  const liveRole = variant === "error" ? "alert" : "status";
13807
13950
  const ariaLive = variant === "error" ? void 0 : variant === "warning" ? "assertive" : "polite";
13808
13951
  const resolvedIconName = iconName ?? variantIconNames[variant];
13809
- const iconContent = icon ?? /* @__PURE__ */ jsx72(
13952
+ const iconContent = icon ?? /* @__PURE__ */ jsx73(
13810
13953
  WebIcon,
13811
13954
  {
13812
13955
  name: resolvedIconName,
@@ -13816,7 +13959,7 @@ var Toast = forwardRef16(function Toast2(props, ref) {
13816
13959
  }
13817
13960
  );
13818
13961
  const isPrimaryAction = !action || typeof action !== "object" || !("variant" in action) || action.variant === "primary";
13819
- const actionEl = typeof action === "object" && action !== null && "label" in action ? /* @__PURE__ */ jsx72(
13962
+ const actionEl = typeof action === "object" && action !== null && "label" in action ? /* @__PURE__ */ jsx73(
13820
13963
  Button,
13821
13964
  {
13822
13965
  variant: isPrimaryAction ? "primary" : "outline",
@@ -13832,7 +13975,7 @@ var Toast = forwardRef16(function Toast2(props, ref) {
13832
13975
  borderColor: resolveColorTokenValue11(color.border),
13833
13976
  color: resolveColorTokenValue11(color.message)
13834
13977
  };
13835
- return /* @__PURE__ */ jsxs29(
13978
+ return /* @__PURE__ */ jsxs30(
13836
13979
  "div",
13837
13980
  {
13838
13981
  ref,
@@ -13845,8 +13988,8 @@ var Toast = forwardRef16(function Toast2(props, ref) {
13845
13988
  style: { ...tokenStyle, ...style },
13846
13989
  className: clsx98(toastStyles.card, className),
13847
13990
  children: [
13848
- /* @__PURE__ */ jsx72("div", { "data-refineui": "toast-icon", className: toastStyles.iconWrap, children: iconContent }),
13849
- /* @__PURE__ */ jsx72("div", { className: toastStyles.contentWrap, children: message != null && message !== "" ? /* @__PURE__ */ jsx72("div", { className: toastStyles.message, children: message }) : null }),
13991
+ /* @__PURE__ */ jsx73("div", { "data-refineui": "toast-icon", className: toastStyles.iconWrap, children: iconContent }),
13992
+ /* @__PURE__ */ jsx73("div", { className: toastStyles.contentWrap, children: message != null && message !== "" ? /* @__PURE__ */ jsx73("div", { className: toastStyles.message, children: message }) : null }),
13850
13993
  action != null && actionEl
13851
13994
  ]
13852
13995
  }
@@ -13857,7 +14000,7 @@ function SwipeableToast({ record, index, swipeDirections, onSwipeStart, onSwipeE
13857
14000
  const dragStartRef = useRef21(null);
13858
14001
  const axisRef = useRef21(null);
13859
14002
  const offsetRef = useRef21({ x: 0, y: 0 });
13860
- const [swiping, setSwiping] = useState27(false);
14003
+ const [swiping, setSwiping] = useState28(false);
13861
14004
  const clearSwipeOffset = useCallback21(() => {
13862
14005
  const el = toastRef.current;
13863
14006
  offsetRef.current = { x: 0, y: 0 };
@@ -13933,7 +14076,7 @@ function SwipeableToast({ record, index, swipeDirections, onSwipeStart, onSwipeE
13933
14076
  clearSwipeOffset();
13934
14077
  onSwipeEnd();
13935
14078
  };
13936
- return /* @__PURE__ */ jsx72(
14079
+ return /* @__PURE__ */ jsx73(
13937
14080
  Toast,
13938
14081
  {
13939
14082
  ref: toastRef,
@@ -13968,15 +14111,15 @@ function Toaster({
13968
14111
  () => activeToasterKey === toasterKeyRef.current,
13969
14112
  () => false
13970
14113
  );
13971
- const [records, setRecords] = useState27([]);
14114
+ const [records, setRecords] = useState28([]);
13972
14115
  const timerMapRef = useRef21({});
13973
14116
  const pausedRef = useRef21(/* @__PURE__ */ new Set());
13974
14117
  const rootRef = useRef21(null);
13975
14118
  const itemRefs = useRef21({});
13976
- const [layoutTick, setLayoutTick] = useState27(0);
14119
+ const [layoutTick, setLayoutTick] = useState28(0);
13977
14120
  const stackGapPx = useToastStackGapPx();
13978
14121
  const resolvedSwipe = swipeDirections ?? DEFAULT_SWIPE_DIRECTIONS;
13979
- useIsomorphicLayoutEffect6(() => {
14122
+ useIsomorphicLayoutEffect7(() => {
13980
14123
  const key = toasterKeyRef.current;
13981
14124
  activeToasterKey = key;
13982
14125
  notifyToasterOwners();
@@ -13987,13 +14130,13 @@ function Toaster({
13987
14130
  }
13988
14131
  };
13989
14132
  }, []);
13990
- useEffect18(() => {
14133
+ useEffect19(() => {
13991
14134
  if (!isPortalOwner) return;
13992
14135
  return subscribeToasts((next) => {
13993
14136
  setRecords(next.slice(0, Math.max(1, maxToasts)));
13994
14137
  });
13995
14138
  }, [isPortalOwner, maxToasts]);
13996
- useEffect18(() => {
14139
+ useEffect19(() => {
13997
14140
  if (!isPortalOwner) return;
13998
14141
  for (const rec of records) {
13999
14142
  if (rec.phase === "leaving") continue;
@@ -14015,7 +14158,7 @@ function Toaster({
14015
14158
  }
14016
14159
  }
14017
14160
  }, [isPortalOwner, records]);
14018
- useEffect18(() => {
14161
+ useEffect19(() => {
14019
14162
  return () => {
14020
14163
  for (const handle of Object.values(timerMapRef.current)) {
14021
14164
  clearTimeout(handle);
@@ -14023,7 +14166,7 @@ function Toaster({
14023
14166
  timerMapRef.current = {};
14024
14167
  };
14025
14168
  }, []);
14026
- useIsomorphicLayoutEffect6(() => {
14169
+ useIsomorphicLayoutEffect7(() => {
14027
14170
  if (!isPortalOwner) return;
14028
14171
  const root = rootRef.current;
14029
14172
  if (!root) return;
@@ -14041,7 +14184,7 @@ function Toaster({
14041
14184
  li.style.height = `${slotHeight(idx)}px`;
14042
14185
  }
14043
14186
  }, [isPortalOwner, layoutTick, records, stackGapPx]);
14044
- useEffect18(() => {
14187
+ useEffect19(() => {
14045
14188
  if (!isPortalOwner) return;
14046
14189
  const root = rootRef.current;
14047
14190
  if (!root) return;
@@ -14075,7 +14218,7 @@ function Toaster({
14075
14218
  return null;
14076
14219
  }
14077
14220
  return createPortal7(
14078
- /* @__PURE__ */ jsx72(
14221
+ /* @__PURE__ */ jsx73(
14079
14222
  "ol",
14080
14223
  {
14081
14224
  ref: rootRef,
@@ -14086,7 +14229,7 @@ function Toaster({
14086
14229
  style: {
14087
14230
  ["--refineui-toast-gap"]: `${stackGapPx}px`
14088
14231
  },
14089
- children: records.map((rec, index) => /* @__PURE__ */ jsx72(
14232
+ children: records.map((rec, index) => /* @__PURE__ */ jsx73(
14090
14233
  "li",
14091
14234
  {
14092
14235
  ref: (node) => {
@@ -14100,7 +14243,7 @@ function Toaster({
14100
14243
  ["--refineui-toast-z-index"]: String(STACK_Z_BASE - index),
14101
14244
  ["--refineui-toast-stack-index"]: String(index)
14102
14245
  },
14103
- children: /* @__PURE__ */ jsx72("div", { "data-refineui": "toast-scale-layer", children: /* @__PURE__ */ jsx72(
14246
+ children: /* @__PURE__ */ jsx73("div", { "data-refineui": "toast-scale-layer", children: /* @__PURE__ */ jsx73(
14104
14247
  SwipeableToast,
14105
14248
  {
14106
14249
  record: rec,
@@ -14125,11 +14268,11 @@ import {
14125
14268
  useCallback as useCallback22,
14126
14269
  useMemo as useMemo21,
14127
14270
  useRef as useRef22,
14128
- useState as useState29
14271
+ useState as useState30
14129
14272
  } from "react";
14130
14273
 
14131
14274
  // src/components/Tree/context.ts
14132
- import { createContext as createContext26, useEffect as useEffect19, useState as useState28 } from "react";
14275
+ import { createContext as createContext26, useEffect as useEffect20, useState as useState29 } from "react";
14133
14276
  import { semanticInteraction as semanticInteraction8 } from "@refineui/tokens";
14134
14277
  import { getReducedMotionQuery as getReducedMotionQuery2 } from "@refineui/utilities/animation";
14135
14278
  var TREE_PANEL_MS = Number.parseFloat(semanticInteraction8.duration.accordionPanel) / 1e3;
@@ -14139,8 +14282,8 @@ var TREE_CONTENT_EASE = semanticInteraction8.easing.content;
14139
14282
  var TreeContext = createContext26(null);
14140
14283
  var TreeItemContext = createContext26(null);
14141
14284
  function usePrefersReducedMotion2() {
14142
- const [reduce, setReduce] = useState28(false);
14143
- useEffect19(() => {
14285
+ const [reduce, setReduce] = useState29(false);
14286
+ useEffect20(() => {
14144
14287
  const mql = window.matchMedia(getReducedMotionQuery2().replace("@media ", ""));
14145
14288
  const sync = () => setReduce(mql.matches);
14146
14289
  sync();
@@ -14195,7 +14338,7 @@ var treeItemTypo = {
14195
14338
  };
14196
14339
 
14197
14340
  // src/components/Tree/Tree.tsx
14198
- import { jsx as jsx73 } from "react/jsx-runtime";
14341
+ import { jsx as jsx74 } from "react/jsx-runtime";
14199
14342
  function Tree({
14200
14343
  size = "md",
14201
14344
  defaultExpanded,
@@ -14209,8 +14352,8 @@ function Tree({
14209
14352
  ...props
14210
14353
  }) {
14211
14354
  const reduceMotion = usePrefersReducedMotion2();
14212
- const [uncontrolledExpanded, setUncontrolledExpanded] = useState29(() => toExpandedSet(defaultExpanded));
14213
- const [uncontrolledSelected, setUncontrolledSelected] = useState29(defaultSelected ?? null);
14355
+ const [uncontrolledExpanded, setUncontrolledExpanded] = useState30(() => toExpandedSet(defaultExpanded));
14356
+ const [uncontrolledSelected, setUncontrolledSelected] = useState30(defaultSelected ?? null);
14214
14357
  const expanded = expandedProp === void 0 ? uncontrolledExpanded : toExpandedSet(expandedProp);
14215
14358
  const selected = selectedProp === void 0 ? uncontrolledSelected : selectedProp;
14216
14359
  const orderRef = useRef22([]);
@@ -14347,7 +14490,7 @@ function Tree({
14347
14490
  toggleExpanded
14348
14491
  ]
14349
14492
  );
14350
- return /* @__PURE__ */ jsx73(TreeContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx73(
14493
+ return /* @__PURE__ */ jsx74(TreeContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx74(
14351
14494
  "ul",
14352
14495
  {
14353
14496
  "data-refineui": "tree",
@@ -14361,13 +14504,13 @@ function Tree({
14361
14504
 
14362
14505
  // src/components/Tree/TreeItem.tsx
14363
14506
  import { clsx as clsx101 } from "clsx";
14364
- import { useContext as useContext28, useId as useId16, useMemo as useMemo22, useState as useState30 } from "react";
14365
- import { jsx as jsx74 } from "react/jsx-runtime";
14507
+ import { useContext as useContext28, useId as useId16, useMemo as useMemo22, useState as useState31 } from "react";
14508
+ import { jsx as jsx75 } from "react/jsx-runtime";
14366
14509
  function TreeItem({ value, disabled = false, className, children, ...props }) {
14367
14510
  const tree = useContext28(TreeContext);
14368
14511
  const parent = useContext28(TreeItemContext);
14369
14512
  if (!tree) throw new Error("TreeItem must be used within Tree.");
14370
- const [hasBranch, setHasBranch] = useState30(false);
14513
+ const [hasBranch, setHasBranch] = useState31(false);
14371
14514
  const uid = useId16().replace(/:/g, "");
14372
14515
  const depth = parent ? parent.depth + 1 : 0;
14373
14516
  const parentValue = parent?.value ?? null;
@@ -14390,7 +14533,7 @@ function TreeItem({ value, disabled = false, className, children, ...props }) {
14390
14533
  }),
14391
14534
  [value, depth, parentValue, expanded, selected, disabled, hasBranch, triggerId, groupId]
14392
14535
  );
14393
- return /* @__PURE__ */ jsx74(TreeItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx74(
14536
+ return /* @__PURE__ */ jsx75(TreeItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx75(
14394
14537
  "li",
14395
14538
  {
14396
14539
  "data-refineui": "tree-item",
@@ -14413,9 +14556,9 @@ function TreeItem({ value, disabled = false, className, children, ...props }) {
14413
14556
  import { clsx as clsx102 } from "clsx";
14414
14557
  import {
14415
14558
  useContext as useContext29,
14416
- useEffect as useEffect20
14559
+ useEffect as useEffect21
14417
14560
  } from "react";
14418
- import { jsx as jsx75, jsxs as jsxs30 } from "react/jsx-runtime";
14561
+ import { jsx as jsx76, jsxs as jsxs31 } from "react/jsx-runtime";
14419
14562
  function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props }) {
14420
14563
  const tree = useContext29(TreeContext);
14421
14564
  const item = useContext29(TreeItemContext);
@@ -14425,7 +14568,7 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14425
14568
  const mainStyle = {
14426
14569
  paddingInlineStart: item.depth > 0 ? `calc(${depthIndent} * ${item.depth})` : void 0
14427
14570
  };
14428
- useEffect20(() => {
14571
+ useEffect21(() => {
14429
14572
  return () => {
14430
14573
  tree.registerItem(item.value, null, {
14431
14574
  parentValue: item.parentValue,
@@ -14501,7 +14644,7 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14501
14644
  break;
14502
14645
  }
14503
14646
  };
14504
- return /* @__PURE__ */ jsx75(
14647
+ return /* @__PURE__ */ jsx76(
14505
14648
  "div",
14506
14649
  {
14507
14650
  ref: setRowRef,
@@ -14520,8 +14663,8 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14520
14663
  className
14521
14664
  ),
14522
14665
  ...props,
14523
- children: /* @__PURE__ */ jsxs30("div", { "data-refineui": "tree-item-main", className: treeStyles.rowMain, style: mainStyle, children: [
14524
- item.hasBranch ? /* @__PURE__ */ jsx75(
14666
+ children: /* @__PURE__ */ jsxs31("div", { "data-refineui": "tree-item-main", className: treeStyles.rowMain, style: mainStyle, children: [
14667
+ item.hasBranch ? /* @__PURE__ */ jsx76(
14525
14668
  "button",
14526
14669
  {
14527
14670
  type: "button",
@@ -14535,10 +14678,10 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14535
14678
  item.expanded && treeStyles.chevronExpanded,
14536
14679
  tree.reduceMotion && "transition-none"
14537
14680
  ),
14538
- children: /* @__PURE__ */ jsx75(WebIcon, { name: "chevron-right", size: iconSize, color: "currentColor", fallback: "\u203A" })
14681
+ children: /* @__PURE__ */ jsx76(WebIcon, { name: "chevron-right", size: iconSize, color: "currentColor", fallback: "\u203A" })
14539
14682
  }
14540
- ) : /* @__PURE__ */ jsx75("span", { className: treeStyles.chevronSpacer, "aria-hidden": "true" }),
14541
- /* @__PURE__ */ jsx75("span", { className: treeStyles.label, children })
14683
+ ) : /* @__PURE__ */ jsx76("span", { className: treeStyles.chevronSpacer, "aria-hidden": "true" }),
14684
+ /* @__PURE__ */ jsx76("span", { className: treeStyles.label, children })
14542
14685
  ] })
14543
14686
  }
14544
14687
  );
@@ -14546,14 +14689,14 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14546
14689
 
14547
14690
  // src/components/Tree/TreeItemContent.tsx
14548
14691
  import { clsx as clsx103 } from "clsx";
14549
- import { useContext as useContext30, useLayoutEffect as useLayoutEffect12 } from "react";
14550
- import { jsx as jsx76 } from "react/jsx-runtime";
14692
+ import { useContext as useContext30, useLayoutEffect as useLayoutEffect13 } from "react";
14693
+ import { jsx as jsx77 } from "react/jsx-runtime";
14551
14694
  function TreeItemContent({ className, children, ...props }) {
14552
14695
  const tree = useContext30(TreeContext);
14553
14696
  const item = useContext30(TreeItemContext);
14554
14697
  if (!tree || !item) throw new Error("TreeItemContent must be used within TreeItem.");
14555
14698
  const { setHasBranch, expanded, groupId, triggerId } = item;
14556
- useLayoutEffect12(() => {
14699
+ useLayoutEffect13(() => {
14557
14700
  setHasBranch(true);
14558
14701
  return () => setHasBranch(false);
14559
14702
  }, [setHasBranch]);
@@ -14568,7 +14711,7 @@ function TreeItemContent({ className, children, ...props }) {
14568
14711
  transition: tree.reduceMotion ? void 0 : `opacity ${TREE_CONTENT_MS}s ${TREE_CONTENT_EASE}, transform ${TREE_CONTENT_MS}s ${TREE_CONTENT_EASE}`,
14569
14712
  pointerEvents: expanded ? void 0 : "none"
14570
14713
  };
14571
- return /* @__PURE__ */ jsx76(
14714
+ return /* @__PURE__ */ jsx77(
14572
14715
  "div",
14573
14716
  {
14574
14717
  ref: (el) => {
@@ -14579,7 +14722,7 @@ function TreeItemContent({ className, children, ...props }) {
14579
14722
  "data-refineui": "tree-item-panel",
14580
14723
  "aria-hidden": !expanded,
14581
14724
  style: gridStyle,
14582
- children: /* @__PURE__ */ jsx76("div", { className: treeStyles.panel, children: /* @__PURE__ */ jsx76("div", { className: treeStyles.panelInner, style: innerMotionStyle, children: /* @__PURE__ */ jsx76(
14725
+ children: /* @__PURE__ */ jsx77("div", { className: treeStyles.panel, children: /* @__PURE__ */ jsx77("div", { className: treeStyles.panelInner, style: innerMotionStyle, children: /* @__PURE__ */ jsx77(
14583
14726
  "ul",
14584
14727
  {
14585
14728
  id: groupId,
@@ -14597,82 +14740,26 @@ function TreeItemContent({ className, children, ...props }) {
14597
14740
 
14598
14741
  // src/components/Tooltip/Tooltip.tsx
14599
14742
  import { clsx as clsx105 } from "clsx";
14600
- import { useId as useId17, useRef as useRef23, useState as useState31 } from "react";
14743
+ import { useId as useId17, useRef as useRef23, useState as useState32 } from "react";
14744
+ import { borderRadii as borderRadii2 } from "@refineui/tokens";
14601
14745
  import { resolveColorTokenValue as resolveColorTokenValue12 } from "@refineui/utilities/color";
14602
14746
  import { Slot as Slot5, getMergeableTriggerChild as getMergeableTriggerChild4 } from "@refineui/utilities/react";
14603
14747
 
14604
- // src/components/shared/FrostedBeak.tsx
14605
- import { strokeWidths as strokeWidths3 } from "@refineui/tokens";
14606
- import { jsx as jsx77, jsxs as jsxs31 } from "react/jsx-runtime";
14607
- var triangleClipPath = "polygon(50% 0, 0 100%, 100% 100%)";
14608
- function FrostedBeak({ width, height, rotateDeg, borderColor }) {
14609
- const surfaceStyle = {
14610
- position: "absolute",
14611
- inset: 0,
14612
- clipPath: triangleClipPath
14613
- };
14614
- return /* @__PURE__ */ jsxs31(
14615
- "div",
14616
- {
14617
- style: {
14618
- position: "relative",
14619
- width,
14620
- height,
14621
- transform: `rotate(${rotateDeg}deg)`,
14622
- transformOrigin: "center center"
14623
- },
14624
- children: [
14625
- /* @__PURE__ */ jsx77(
14626
- "span",
14627
- {
14628
- "data-refineui": "floating-beak-surface",
14629
- style: surfaceStyle
14630
- }
14631
- ),
14632
- /* @__PURE__ */ jsx77(
14633
- "svg",
14634
- {
14635
- width,
14636
- height,
14637
- viewBox: "0 0 16 8",
14638
- fill: "none",
14639
- "aria-hidden": true,
14640
- style: { position: "absolute", inset: 0, overflow: "visible" },
14641
- children: /* @__PURE__ */ jsx77(
14642
- "path",
14643
- {
14644
- d: "M0 8L8 0L16 8",
14645
- stroke: borderColor,
14646
- strokeWidth: strokeWidths3.strokeWidthThin,
14647
- strokeLinejoin: "round"
14648
- }
14649
- )
14650
- }
14651
- )
14652
- ]
14653
- }
14654
- );
14655
- }
14656
-
14657
14748
  // src/components/Tooltip/style.ts
14658
- import { spacings as spacings7, strokeWidths as strokeWidths4 } from "@refineui/tokens";
14749
+ import { spacings as spacings8 } from "@refineui/tokens";
14659
14750
  import { clsx as clsx104 } from "clsx";
14660
- var TOOLTIP_BEAK_W = foundationSizes.foundationSize160;
14661
- var TOOLTIP_BEAK_H = foundationSizes.foundationSize80;
14662
- var TOOLTIP_BEAK_OFFSET = foundationSizes.foundationSize80;
14663
- var BEAK_BORDER_OVERLAP2 = strokeWidths4.strokeWidthThin;
14664
- var gap = spacings7.sizeXSmall;
14665
- var edgeInset = spacings7.sizeMedium;
14751
+ var gap = `calc(${componentSizes2.tooltipBeakHeight} + ${spacings8.sizeXXSmall})`;
14752
+ var TOOLTIP_BEAK_INSET = spacings8.sizeMedium;
14666
14753
  var tooltipStyles = {
14667
14754
  root: "relative inline-block",
14668
14755
  fallbackTrigger: "inline-flex outline-none",
14669
- /** Positions the floating stack (beak + panel), like PopOver `floatingRoot`. */
14756
+ /** Positions the floating stack (surface + panel), like PopOver `floatingRoot`. */
14670
14757
  floating: "pointer-events-none absolute z-refineui-popup",
14671
14758
  panelWrap: "relative inline-block max-w-refineui-tooltip-max-width",
14672
- beakWrap: "pointer-events-none absolute z-[1]",
14759
+ /** Fill, stroke, and shadow come from `FloatingSurface`; the transparent border keeps the box size. */
14673
14760
  panel: clsx104(
14674
14761
  componentTextClass(componentTypographyTokens.tooltip),
14675
- "relative z-0 box-border max-w-refineui-tooltip-max-width whitespace-nowrap rounded-refineui-medium border-refineui-thin px-refineui-size-medium py-refineui-size-small shadow-refineui-8"
14762
+ "relative z-0 box-border max-w-refineui-tooltip-max-width whitespace-nowrap rounded-refineui-medium border-refineui-thin border-transparent px-refineui-size-medium py-refineui-size-small"
14676
14763
  )
14677
14764
  };
14678
14765
  function tooltipPlacement(position) {
@@ -14693,6 +14780,15 @@ function tooltipAlignKey(align) {
14693
14780
  if (align === "End") return "end";
14694
14781
  return "center";
14695
14782
  }
14783
+ var beakSideByPlacement2 = {
14784
+ bottom: "top",
14785
+ top: "bottom",
14786
+ left: "right",
14787
+ right: "left"
14788
+ };
14789
+ function tooltipBeakSide(position) {
14790
+ return beakSideByPlacement2[tooltipPlacement(position)];
14791
+ }
14696
14792
  function tooltipFloatingStyle(position, align) {
14697
14793
  switch (position) {
14698
14794
  case "Top":
@@ -14715,45 +14811,6 @@ function tooltipFloatingStyle(position, align) {
14715
14811
  return {};
14716
14812
  }
14717
14813
  }
14718
- function tooltipBeakWrapperStyle(position, align) {
14719
- const overlapOffset = `calc(-1 * ${TOOLTIP_BEAK_OFFSET} + ${BEAK_BORDER_OVERLAP2})`;
14720
- const placement = tooltipPlacement(position);
14721
- const a = tooltipAlignKey(align);
14722
- switch (placement) {
14723
- case "bottom":
14724
- if (a === "center") return { top: overlapOffset, left: `calc(50% - ${TOOLTIP_BEAK_W} / 2)` };
14725
- if (a === "start") return { top: overlapOffset, left: edgeInset };
14726
- return { top: overlapOffset, right: edgeInset };
14727
- case "top":
14728
- if (a === "center") return { bottom: overlapOffset, left: `calc(50% - ${TOOLTIP_BEAK_W} / 2)` };
14729
- if (a === "start") return { bottom: overlapOffset, left: edgeInset };
14730
- return { bottom: overlapOffset, right: edgeInset };
14731
- case "left":
14732
- if (a === "center") return { right: overlapOffset, top: `calc(50% - ${TOOLTIP_BEAK_W} / 2)` };
14733
- if (a === "start") return { right: overlapOffset, top: edgeInset };
14734
- return { right: overlapOffset, bottom: edgeInset };
14735
- case "right":
14736
- if (a === "center") return { left: overlapOffset, top: `calc(50% - ${TOOLTIP_BEAK_W} / 2)` };
14737
- if (a === "start") return { left: overlapOffset, top: edgeInset };
14738
- return { left: overlapOffset, bottom: edgeInset };
14739
- default:
14740
- return {};
14741
- }
14742
- }
14743
- function tooltipBeakRotateDeg(position) {
14744
- switch (tooltipPlacement(position)) {
14745
- case "bottom":
14746
- return 0;
14747
- case "top":
14748
- return 180;
14749
- case "left":
14750
- return -90;
14751
- case "right":
14752
- return 90;
14753
- default:
14754
- return 0;
14755
- }
14756
- }
14757
14814
 
14758
14815
  // src/components/Tooltip/Tooltip.tsx
14759
14816
  import { jsx as jsx78, jsxs as jsxs32 } from "react/jsx-runtime";
@@ -14769,10 +14826,11 @@ function Tooltip({
14769
14826
  className,
14770
14827
  ...props
14771
14828
  }) {
14772
- const [innerOpen, setInnerOpen] = useState31(defaultOpen);
14829
+ const [innerOpen, setInnerOpen] = useState32(defaultOpen);
14773
14830
  const open = ctrlOpen !== void 0 ? ctrlOpen : innerOpen;
14774
14831
  const tooltipId = useId17();
14775
14832
  const showTimer = useRef23(null);
14833
+ const panelRef = useRef23(null);
14776
14834
  const setOpen = (next) => {
14777
14835
  if (ctrlOpen === void 0) setInnerOpen(next);
14778
14836
  onOpenChange?.(next);
@@ -14796,8 +14854,6 @@ function Tooltip({
14796
14854
  setOpen(false);
14797
14855
  };
14798
14856
  const floatingStyle = tooltipFloatingStyle(position, align);
14799
- const beakWrapStyle = tooltipBeakWrapperStyle(position, align);
14800
- const beakRot = tooltipBeakRotateDeg(position);
14801
14857
  const describedBy = open ? tooltipId : void 0;
14802
14858
  const mergeEl = getMergeableTriggerChild4(trigger);
14803
14859
  let triggerNode;
@@ -14842,36 +14898,32 @@ function Tooltip({
14842
14898
  /* @__PURE__ */ jsx78(
14843
14899
  "div",
14844
14900
  {
14845
- className: tooltipStyles.beakWrap,
14846
- style: { ...beakWrapStyle, width: TOOLTIP_BEAK_W, height: TOOLTIP_BEAK_H },
14847
- "aria-hidden": true,
14848
- children: /* @__PURE__ */ jsx78(
14849
- FrostedBeak,
14850
- {
14851
- width: TOOLTIP_BEAK_W,
14852
- height: TOOLTIP_BEAK_H,
14853
- rotateDeg: beakRot,
14854
- borderColor: borderCol
14855
- }
14856
- )
14857
- }
14858
- ),
14859
- /* @__PURE__ */ jsx78(
14860
- "div",
14861
- {
14901
+ ref: panelRef,
14862
14902
  id: tooltipId,
14863
14903
  role: "tooltip",
14864
14904
  "data-refineui": "tooltip-panel",
14865
14905
  "data-position": position,
14866
14906
  "data-align": align,
14867
14907
  className: tooltipStyles.panel,
14868
- style: {
14869
- backgroundColor: bg,
14870
- color: fg,
14871
- borderColor: borderCol
14872
- },
14908
+ style: { color: fg },
14873
14909
  children: content
14874
14910
  }
14911
+ ),
14912
+ /* @__PURE__ */ jsx78(
14913
+ FloatingSurface,
14914
+ {
14915
+ panelRef,
14916
+ side: tooltipBeakSide(position),
14917
+ align: tooltipAlignKey(align),
14918
+ radius: borderRadii2.roundedMedium,
14919
+ beakWidth: componentSizes2.tooltipBeakWidth,
14920
+ beakHeight: componentSizes2.tooltipBeakHeight,
14921
+ tipRadius: componentSizes2.tooltipBeakTipRadius,
14922
+ beakInsetStart: TOOLTIP_BEAK_INSET,
14923
+ beakInsetEnd: TOOLTIP_BEAK_INSET,
14924
+ backgroundColor: bg,
14925
+ borderColor: borderCol
14926
+ }
14875
14927
  )
14876
14928
  ] }) })
14877
14929
  ] });
@@ -14885,9 +14937,9 @@ import {
14885
14937
  isValidElement as isValidElement7,
14886
14938
  useContext as useContext31,
14887
14939
  useId as useId18,
14888
- useLayoutEffect as useLayoutEffect13,
14940
+ useLayoutEffect as useLayoutEffect14,
14889
14941
  useMemo as useMemo23,
14890
- useState as useState32
14942
+ useState as useState33
14891
14943
  } from "react";
14892
14944
  import { opacities } from "@refineui/tokens";
14893
14945
  import { resolveColorTokenValue as resolveColorTokenValue13 } from "@refineui/utilities/color";
@@ -14934,13 +14986,13 @@ var chartStyles = {
14934
14986
  };
14935
14987
 
14936
14988
  // src/components/Chart/utils.ts
14937
- import { borderRadii, foundationSizes as foundationSizes3, spacings as spacings8 } from "@refineui/tokens";
14989
+ import { borderRadii as borderRadii3, foundationSizes as foundationSizes3, spacings as spacings9 } from "@refineui/tokens";
14938
14990
  var CHART_VIEWBOX_WIDTH = 800;
14939
14991
  var CHART_VIEWBOX_HEIGHT = 320;
14940
- var CHART_PLOT_PADDING_TOP = parseFloat(spacings8.sizeMedium);
14941
- var CHART_PLOT_PADDING_BOTTOM = parseFloat(spacings8.sizeXXSmall);
14942
- var CHART_PLOT_PADDING_X = parseFloat(spacings8.sizeMedium);
14943
- var CHART_BAR_RADIUS = parseFloat(borderRadii.roundedXLarge);
14992
+ var CHART_PLOT_PADDING_TOP = parseFloat(spacings9.sizeMedium);
14993
+ var CHART_PLOT_PADDING_BOTTOM = parseFloat(spacings9.sizeXXSmall);
14994
+ var CHART_PLOT_PADDING_X = parseFloat(spacings9.sizeMedium);
14995
+ var CHART_BAR_RADIUS = parseFloat(borderRadii3.roundedXLarge);
14944
14996
  var CHART_BAR_BAND_FILL = 0.5;
14945
14997
  var CHART_POINT_RADIUS = parseFloat(foundationSizes3.foundationSize40);
14946
14998
  var CHART_POINT_STROKE = parseFloat(foundationSizes3.foundationSize20);
@@ -15151,11 +15203,11 @@ function isChartTooltipElement(node) {
15151
15203
  return isValidElement7(node) && node.type === ChartTooltip;
15152
15204
  }
15153
15205
  function Chart({ className, children, ...props }) {
15154
- const [hoverIndex, setHoverIndex] = useState32(null);
15155
- const [selectedIndex, setSelectedIndex] = useState32(null);
15156
- const [pointer, setPointer] = useState32(null);
15157
- const [labels, setLabels] = useState32([]);
15158
- const [series, setSeries] = useState32(null);
15206
+ const [hoverIndex, setHoverIndex] = useState33(null);
15207
+ const [selectedIndex, setSelectedIndex] = useState33(null);
15208
+ const [pointer, setPointer] = useState33(null);
15209
+ const [labels, setLabels] = useState33([]);
15210
+ const [series, setSeries] = useState33(null);
15159
15211
  const context = useMemo23(
15160
15212
  () => ({
15161
15213
  hoverIndex,
@@ -15390,7 +15442,7 @@ function ChartBars({
15390
15442
  const barRadius = Math.min(CHART_BAR_RADIUS, barWidth / 2);
15391
15443
  const baselineY = plotBaselineY();
15392
15444
  const trackHeight = plotHeight();
15393
- useLayoutEffect13(() => {
15445
+ useLayoutEffect14(() => {
15394
15446
  setSeries({ values, seriesColor, max, align: "bar" });
15395
15447
  }, [values, seriesColor, max, setSeries]);
15396
15448
  return /* @__PURE__ */ jsxs33("g", { "data-refineui": "chart-bars", "data-series-color": seriesColor, className, ...props, children: [
@@ -15448,7 +15500,7 @@ function ChartLine({
15448
15500
  const baselineY = plotBaselineY();
15449
15501
  const pointRing = pointStrokeColor();
15450
15502
  const linePath = monotoneLinePath(coords);
15451
- useLayoutEffect13(() => {
15503
+ useLayoutEffect14(() => {
15452
15504
  setSeries({ values, seriesColor, max, align: "line" });
15453
15505
  }, [values, seriesColor, max, setSeries]);
15454
15506
  return /* @__PURE__ */ jsxs33("g", { "data-refineui": "chart-line", "data-series-color": seriesColor, className, ...props, children: [
@@ -15517,7 +15569,7 @@ function ChartAxisLabels({
15517
15569
  const { hoverIndex, selectedIndex, setLabels } = useChartContext("ChartAxisLabels");
15518
15570
  const count = labels.length;
15519
15571
  const centerAt = align === "line" ? linePointCenterRatio : barBandCenterRatio;
15520
- useLayoutEffect13(() => {
15572
+ useLayoutEffect14(() => {
15521
15573
  setLabels(labels);
15522
15574
  }, [labels, setLabels]);
15523
15575
  return /* @__PURE__ */ jsx79(
@@ -15594,13 +15646,13 @@ import {
15594
15646
  useCallback as useCallback23,
15595
15647
  useId as useId19,
15596
15648
  useMemo as useMemo24,
15597
- useState as useState34
15649
+ useState as useState35
15598
15650
  } from "react";
15599
15651
  import { clsx as clsx108 } from "clsx";
15600
15652
  import { Slot as Slot7 } from "@refineui/utilities/react";
15601
15653
 
15602
15654
  // src/components/Collapsible/context.ts
15603
- import { createContext as createContext28, useContext as useContext32, useEffect as useEffect21, useState as useState33 } from "react";
15655
+ import { createContext as createContext28, useContext as useContext32, useEffect as useEffect22, useState as useState34 } from "react";
15604
15656
  import { semanticInteraction as semanticInteraction9 } from "@refineui/tokens";
15605
15657
  import { getReducedMotionQuery as getReducedMotionQuery3 } from "@refineui/utilities/animation";
15606
15658
  var CollapsibleContext = createContext28(null);
@@ -15610,8 +15662,8 @@ function useCollapsibleContext(part) {
15610
15662
  return value;
15611
15663
  }
15612
15664
  function usePrefersReducedMotion3() {
15613
- const [reduce, setReduce] = useState33(false);
15614
- useEffect21(() => {
15665
+ const [reduce, setReduce] = useState34(false);
15666
+ useEffect22(() => {
15615
15667
  const mql = window.matchMedia(getReducedMotionQuery3().replace("@media ", ""));
15616
15668
  const sync = () => setReduce(mql.matches);
15617
15669
  sync();
@@ -15633,7 +15685,7 @@ var collapsibleStyles = {
15633
15685
  // src/components/Collapsible/Collapsible.tsx
15634
15686
  import { jsx as jsx80 } from "react/jsx-runtime";
15635
15687
  var Collapsible = forwardRef17(function Collapsible2({ open: openProp, defaultOpen = false, onOpenChange, asChild = false, className, children, ...props }, ref) {
15636
- const [uncontrolled, setUncontrolled] = useState34(defaultOpen);
15688
+ const [uncontrolled, setUncontrolled] = useState35(defaultOpen);
15637
15689
  const open = openProp ?? uncontrolled;
15638
15690
  const reactId = useId19();
15639
15691
  const reduceMotion = usePrefersReducedMotion3();
@@ -15742,11 +15794,11 @@ import {
15742
15794
  forwardRef as forwardRef18,
15743
15795
  useCallback as useCallback24,
15744
15796
  useContext as useContext33,
15745
- useEffect as useEffect22,
15746
- useLayoutEffect as useLayoutEffect14,
15797
+ useEffect as useEffect23,
15798
+ useLayoutEffect as useLayoutEffect15,
15747
15799
  useMemo as useMemo25,
15748
15800
  useRef as useRef24,
15749
- useState as useState35
15801
+ useState as useState36
15750
15802
  } from "react";
15751
15803
  import { createPortal as createPortal8 } from "react-dom";
15752
15804
  import { clsx as clsx109 } from "clsx";
@@ -15776,8 +15828,8 @@ function placeInView(element, x, y) {
15776
15828
  }
15777
15829
  function ContextMenu({ modal = true, onOpenChange, children }) {
15778
15830
  void modal;
15779
- const [open, setOpen] = useState35(false);
15780
- const [point, setPoint] = useState35({ x: 0, y: 0 });
15831
+ const [open, setOpen] = useState36(false);
15832
+ const [point, setPoint] = useState36({ x: 0, y: 0 });
15781
15833
  const openRef = useRef24(false);
15782
15834
  const onOpenChangeRef = useRef24(onOpenChange);
15783
15835
  openRef.current = open;
@@ -15820,9 +15872,9 @@ function ContextMenuPortal({ children }) {
15820
15872
  var ContextMenuContent = forwardRef18(function ContextMenuContent2({ className, style, onPointerDown, children, ...props }, ref) {
15821
15873
  const { open, point, close } = useMenu();
15822
15874
  const localRef = useRef24(null);
15823
- const [shouldRender, setShouldRender] = useState35(open);
15824
- const [isClosing, setIsClosing] = useState35(false);
15825
- useEffect22(() => {
15875
+ const [shouldRender, setShouldRender] = useState36(open);
15876
+ const [isClosing, setIsClosing] = useState36(false);
15877
+ useEffect23(() => {
15826
15878
  if (open) {
15827
15879
  setShouldRender(true);
15828
15880
  setIsClosing(false);
@@ -15836,11 +15888,11 @@ var ContextMenuContent = forwardRef18(function ContextMenuContent2({ className,
15836
15888
  }, CLOSE_MS);
15837
15889
  return () => window.clearTimeout(timeout);
15838
15890
  }, [open, shouldRender]);
15839
- useLayoutEffect14(() => {
15891
+ useLayoutEffect15(() => {
15840
15892
  if (!shouldRender || !localRef.current) return;
15841
15893
  placeInView(localRef.current, point.x, point.y);
15842
15894
  }, [shouldRender, point.x, point.y]);
15843
- useEffect22(() => {
15895
+ useEffect23(() => {
15844
15896
  if (!open) return;
15845
15897
  const onKey = (event) => {
15846
15898
  if (event.key === "Escape") close();
@@ -15982,14 +16034,14 @@ function ContextMenuLabel({ className, children, ...props }) {
15982
16034
  return /* @__PURE__ */ jsx81("div", { "data-refineui": "menu-label", className: clsx109(menuStyles.section, className), ...props, children: /* @__PURE__ */ jsx81("span", { className: menuStyles.sectionText, children }) });
15983
16035
  }
15984
16036
  function ContextMenuSub({ children }) {
15985
- const [open, setOpen] = useState35(false);
16037
+ const [open, setOpen] = useState36(false);
15986
16038
  const triggerRef = useRef24(null);
15987
16039
  const timer = useRef24(null);
15988
16040
  const clear = () => {
15989
16041
  if (timer.current != null) window.clearTimeout(timer.current);
15990
16042
  timer.current = null;
15991
16043
  };
15992
- useEffect22(() => clear, []);
16044
+ useEffect23(() => clear, []);
15993
16045
  const value = useMemo25(
15994
16046
  () => ({
15995
16047
  open,
@@ -16077,8 +16129,8 @@ var ContextMenuSubContent = forwardRef18(
16077
16129
  function ContextMenuSubContent2({ className, style, onPointerDown, onMouseEnter, onMouseLeave, ...props }, ref) {
16078
16130
  const sub = useSub2();
16079
16131
  const localRef = useRef24(null);
16080
- const [side, setSide] = useState35("right");
16081
- useLayoutEffect14(() => {
16132
+ const [side, setSide] = useState36("right");
16133
+ useLayoutEffect15(() => {
16082
16134
  const trigger = sub.triggerRef.current;
16083
16135
  const element = localRef.current;
16084
16136
  if (!sub.open || !trigger || !element) return;