@refineui/react 0.0.8 → 0.0.10

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
@@ -250,9 +250,11 @@ __export(index_exports, {
250
250
  SidebarPeekInset: () => SidebarPeekInset,
251
251
  SidebarPeekPanel: () => SidebarPeekPanel,
252
252
  SidebarPeekPin: () => SidebarPeekPin,
253
+ SidebarProvider: () => SidebarProvider,
254
+ SidebarTrigger: () => SidebarTrigger,
253
255
  Skeleton: () => Skeleton,
254
256
  Slider: () => Slider,
255
- Slot: () => import_react57.Slot,
257
+ Slot: () => import_react59.Slot,
256
258
  Spacer: () => Spacer,
257
259
  SpinButton: () => SpinButton,
258
260
  Spinner: () => Spinner,
@@ -307,6 +309,7 @@ __export(index_exports, {
307
309
  semanticTextClass: () => semanticTextClass,
308
310
  sizedComponentTextClass: () => sizedComponentTextClass,
309
311
  toast: () => toast,
312
+ useSidebar: () => useSidebar,
310
313
  useSidebarPeek: () => useSidebarPeek
311
314
  });
312
315
  module.exports = __toCommonJS(index_exports);
@@ -348,14 +351,13 @@ var componentColorTokens = {
348
351
  states: buttonPrimaryColorTokens.states
349
352
  },
350
353
  secondary: {
351
- background: semanticToken("backgroundPrimary"),
354
+ background: semanticToken("backgroundSurfaceHover"),
352
355
  foreground: semanticToken("foregroundPrimary"),
353
- border: semanticToken("borderDefault"),
354
- hoverBackground: semanticToken("backgroundSurfaceHover"),
355
- hoverBorder: semanticToken("borderStrong"),
356
+ hoverBackground: semanticToken("backgroundSurfaceActive"),
357
+ hoverForeground: semanticToken("foregroundPrimaryHover"),
356
358
  activeBackground: semanticToken("backgroundSurfaceActive"),
359
+ activeForeground: semanticToken("foregroundPrimary"),
357
360
  disabledBackground: semanticToken("backgroundSurfaceDisabled"),
358
- disabledBorder: semanticToken("borderDisabled"),
359
361
  disabledForeground: semanticToken("foregroundDisabled")
360
362
  },
361
363
  outline: {
@@ -1504,7 +1506,7 @@ function resolveSlotClasses(recipe, slot, variants = {}) {
1504
1506
  // src/recipes/button.recipe.ts
1505
1507
  var buttonVariantClass = {
1506
1508
  primary: "border-refineui-none border border-transparent bg-refineui-alias-background-brand text-refineui-alias-foreground-inversed",
1507
- secondary: "border-refineui-thin border-refineui-alias-border-default bg-refineui-alias-background-surface text-refineui-alias-foreground-primary",
1509
+ secondary: "border-refineui-none border border-transparent bg-refineui-alias-background-surface-hover text-refineui-alias-foreground-primary",
1508
1510
  outline: "border-refineui-thin border-refineui-alias-border-default bg-transparent text-refineui-alias-foreground-primary",
1509
1511
  ghost: "border-refineui-none border border-transparent bg-transparent text-refineui-alias-foreground-primary"
1510
1512
  };
@@ -1542,6 +1544,10 @@ var buttonRecipe = defineRecipe({
1542
1544
  match: { layout: "icon", variant: "primary" },
1543
1545
  className: "border-0"
1544
1546
  },
1547
+ {
1548
+ match: { layout: "icon", variant: "secondary" },
1549
+ className: "border-0"
1550
+ },
1545
1551
  {
1546
1552
  match: { layout: "icon", variant: "ghost" },
1547
1553
  className: "border-0"
@@ -1576,7 +1582,7 @@ var Button = (0, import_react.forwardRef)(function Button2({
1576
1582
  const inactive = Boolean(disabled) || ariaDisabledProp === true || ariaDisabledProp === "true";
1577
1583
  const variantStyles = variant === "ghost" && layout === "icon" ? buttonStyles.iconGhost : buttonVariantClass[variant];
1578
1584
  const sizeStyles = layout === "icon" ? buttonIconSizeClass[size] : buttonLabelSizeClass[size];
1579
- const iconNoStroke = layout === "icon" && (variant === "primary" || variant === "ghost") ? "border-0" : null;
1585
+ const iconNoStroke = layout === "icon" && (variant === "primary" || variant === "secondary" || variant === "ghost") ? "border-0" : null;
1580
1586
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1581
1587
  "button",
1582
1588
  {
@@ -3204,13 +3210,26 @@ var selectStyles = {
3204
3210
  "border-refineui-hairline border-refineui-alias-border-default",
3205
3211
  "bg-refineui-alias-background-primary px-refineui-size-medium py-refineui-size-x-small",
3206
3212
  "text-refineui-alias-foreground-primary outline-none",
3207
- "transition-[color,background-color,border-color] duration-[var(--refineui-motion-duration-fast)]"
3213
+ "transition-[color,background-color,border-color,transform] duration-[var(--refineui-motion-duration-fast)] ease-[var(--refineui-motion-easing-ease-out)]"
3214
+ ),
3215
+ /** Ghost plate — same gap/radius as filled, no field border (Button ghost-like). */
3216
+ triggerGhost: (0, import_clsx27.clsx)(
3217
+ "box-border inline-flex cursor-pointer items-center justify-between",
3218
+ "gap-refineui-size-x-small rounded-refineui-large",
3219
+ "border-refineui-none border-transparent bg-transparent",
3220
+ "px-refineui-size-x-small py-refineui-size-xx-small",
3221
+ "text-refineui-alias-foreground-primary outline-none",
3222
+ "transition-[color,background-color,transform] duration-[var(--refineui-motion-duration-fast)] ease-[var(--refineui-motion-easing-ease-out)]"
3208
3223
  ),
3209
3224
  /** Flush shell — consumer / parent owns padding, radius, surface. */
3210
- triggerPlain: "box-border inline-flex cursor-pointer items-center outline-none",
3225
+ triggerPlain: (0, import_clsx27.clsx)(
3226
+ "box-border inline-flex cursor-pointer items-center outline-none",
3227
+ "transition-[transform] duration-[var(--refineui-motion-duration-fast)] ease-[var(--refineui-motion-easing-ease-out)]"
3228
+ ),
3211
3229
  triggerInner: "min-w-0 flex-1 overflow-hidden text-start",
3212
3230
  triggerOpen: "text-refineui-alias-foreground-primary",
3213
3231
  triggerDisabled: "cursor-not-allowed border-refineui-alias-border-disabled bg-refineui-alias-background-surface-disabled text-refineui-alias-foreground-disabled",
3232
+ triggerGhostDisabled: "cursor-not-allowed text-refineui-alias-foreground-disabled",
3214
3233
  triggerPlainDisabled: "cursor-not-allowed text-refineui-alias-foreground-disabled",
3215
3234
  value: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-start",
3216
3235
  iconWrap: "inline-flex size-refineui-icon-xsmall shrink-0 items-center justify-center",
@@ -3491,9 +3510,12 @@ function Select({
3491
3510
  }
3492
3511
  var SelectTrigger = (0, import_react11.forwardRef)(function SelectTrigger2(props, forwardedRef) {
3493
3512
  const { className, children, style, appearance = "filled", ...triggerRest } = props;
3494
- const { open, setOpen, triggerRef, onKeyDown, size, fullWidth, disabled, value, getLabelByValue } = useSelectCtx();
3495
- const hasLabel = Boolean(getLabelByValue(value));
3513
+ const { open, setOpen, triggerRef, onKeyDown, size, fullWidth, disabled, value } = useSelectCtx();
3514
+ const isPlaceholder = value === "";
3496
3515
  const isPlain = appearance === "plain";
3516
+ const isGhost = appearance === "ghost";
3517
+ const isFilled = appearance === "filled";
3518
+ const [pressed, setPressed] = (0, import_react11.useState)(false);
3497
3519
  const setRefs = (0, import_react11.useCallback)(
3498
3520
  (node) => {
3499
3521
  triggerRef.current = node;
@@ -3502,6 +3524,7 @@ var SelectTrigger = (0, import_react11.forwardRef)(function SelectTrigger2(props
3502
3524
  },
3503
3525
  [forwardedRef, triggerRef]
3504
3526
  );
3527
+ const clearPressed = (0, import_react11.useCallback)(() => setPressed(false), []);
3505
3528
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3506
3529
  "button",
3507
3530
  {
@@ -3514,20 +3537,31 @@ var SelectTrigger = (0, import_react11.forwardRef)(function SelectTrigger2(props
3514
3537
  "data-appearance": appearance,
3515
3538
  "data-size": size,
3516
3539
  "data-state": open ? "open" : "closed",
3517
- "data-placeholder": hasLabel ? void 0 : "",
3540
+ "data-pressed": pressed ? "" : void 0,
3541
+ "data-placeholder": isPlaceholder ? "" : void 0,
3518
3542
  disabled,
3543
+ onPointerDown: (event) => {
3544
+ if (disabled || event.button !== 0) return;
3545
+ setPressed(true);
3546
+ },
3547
+ onPointerUp: clearPressed,
3548
+ onPointerLeave: clearPressed,
3549
+ onPointerCancel: clearPressed,
3519
3550
  onMouseDown: (event) => {
3520
3551
  event.preventDefault();
3552
+ if (disabled) return;
3521
3553
  setOpen(!open);
3522
3554
  triggerRef.current?.focus();
3523
3555
  },
3524
3556
  onKeyDown,
3525
3557
  className: (0, import_clsx28.clsx)(
3526
3558
  "data-[placeholder]:[&_[data-refineui-select-value]]:text-refineui-alias-foreground-placeholder",
3527
- isPlain ? selectStyles.triggerPlain : selectStyles.trigger,
3528
- !isPlain && selectTriggerSizeClass[size],
3529
- !isPlain && open && selectStyles.triggerOpen,
3530
- disabled && (isPlain ? selectStyles.triggerPlainDisabled : selectStyles.triggerDisabled),
3559
+ isPlain && selectStyles.triggerPlain,
3560
+ isGhost && selectStyles.triggerGhost,
3561
+ isFilled && selectStyles.trigger,
3562
+ (isFilled || isGhost) && selectTriggerSizeClass[size],
3563
+ isFilled && open && selectStyles.triggerOpen,
3564
+ disabled && (isPlain ? selectStyles.triggerPlainDisabled : isGhost ? selectStyles.triggerGhostDisabled : selectStyles.triggerDisabled),
3531
3565
  fullWidth && "w-full",
3532
3566
  className
3533
3567
  ),
@@ -3553,7 +3587,20 @@ SelectTrigger.displayName = "SelectTrigger";
3553
3587
  function SelectValue({ placeholder, className, ...props }) {
3554
3588
  const { value, getLabelByValue, placeholder: rootPlaceholder } = useSelectCtx();
3555
3589
  const label = getLabelByValue(value);
3556
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { "data-refineui-select-value": "", className: (0, import_clsx28.clsx)(selectStyles.value, !label && "text-refineui-alias-foreground-placeholder", className), ...props, children: label || placeholder || rootPlaceholder || "Select..." });
3590
+ const isPlaceholder = value === "";
3591
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3592
+ "span",
3593
+ {
3594
+ "data-refineui-select-value": "",
3595
+ className: (0, import_clsx28.clsx)(
3596
+ selectStyles.value,
3597
+ isPlaceholder && "text-refineui-alias-foreground-placeholder",
3598
+ className
3599
+ ),
3600
+ ...props,
3601
+ children: label || placeholder || rootPlaceholder || "Select..."
3602
+ }
3603
+ );
3557
3604
  }
3558
3605
  function SelectIcon({ children, className, ...props }) {
3559
3606
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: (0, import_clsx28.clsx)(selectStyles.iconWrap, className), ...props, children: children ?? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(WebIcon, { name: "chevron-down", size: import_tokens8.iconSizes.xsmall }) });
@@ -7609,15 +7656,10 @@ var calendarStyles = {
7609
7656
  dayWrapEndpoint: "box-border flex size-refineui-calendar-day-size items-center justify-center bg-refineui-alias-background-primary-hover",
7610
7657
  dayWrapEndpointStart: "rounded-s-refineui-large",
7611
7658
  dayWrapEndpointEnd: "rounded-e-refineui-large",
7612
- root: "box-border flex w-fit min-w-refineui-calendar-min-width flex-col gap-refineui-size-none rounded-refineui-large bg-refineui-alias-background-primary p-refineui-size-x-large",
7659
+ root: "box-border flex w-fit min-w-refineui-calendar-min-width flex-col gap-refineui-size-none rounded-refineui-xx-large border-refineui-thin border-refineui-alias-border-default bg-refineui-alias-background-primary p-refineui-size-x-large",
7613
7660
  header: "flex w-full min-w-0 items-center justify-between pb-refineui-size-large",
7614
7661
  navButton: "shrink-0 text-refineui-alias-foreground-primary",
7615
- captionButton: (0, import_clsx58.clsx)(
7616
- "shrink-0",
7617
- "border-refineui-none border-transparent bg-transparent",
7618
- "px-refineui-size-x-small py-refineui-size-xx-small",
7619
- "text-refineui-alias-foreground-primary"
7620
- ),
7662
+ captionButton: "shrink-0",
7621
7663
  body: "flex flex-col gap-refineui-size-small",
7622
7664
  weekday: (0, import_clsx58.clsx)(
7623
7665
  componentTextClass(componentTypographyTokens.calendar.weekday),
@@ -7646,12 +7688,15 @@ function normalizeRange(start, end) {
7646
7688
  function getWeekdayLabels(weekStartsOn) {
7647
7689
  return [...WEEKDAYS.slice(weekStartsOn), ...WEEKDAYS.slice(0, weekStartsOn)];
7648
7690
  }
7649
- function formatMonthName(year, month) {
7691
+ function formatMonthLabel(year, month) {
7692
+ return new Intl.DateTimeFormat("en-US", { month: "short" }).format(new Date(year, month, 1));
7693
+ }
7694
+ function formatMonthNameLong(year, month) {
7650
7695
  return new Intl.DateTimeFormat("en-US", { month: "long" }).format(new Date(year, month, 1));
7651
7696
  }
7652
7697
  var MONTH_LABELS = Array.from(
7653
7698
  { length: MONTH_COUNT },
7654
- (_, monthIndex) => formatMonthName(2e3, monthIndex)
7699
+ (_, monthIndex) => formatMonthLabel(2e3, monthIndex)
7655
7700
  );
7656
7701
  function yearOptionsForView(viewYear) {
7657
7702
  const referenceYear = (/* @__PURE__ */ new Date()).getFullYear();
@@ -7672,16 +7717,16 @@ function CalendarCaptionSelect({
7672
7717
  children
7673
7718
  }) {
7674
7719
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Select, { value, onValueChange, "aria-label": ariaLabel, size: "sm", children: [
7675
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
7720
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7676
7721
  SelectTrigger,
7677
7722
  {
7678
- appearance: "plain",
7723
+ appearance: "ghost",
7679
7724
  "data-calendar-header": header,
7680
- className: calendarStyles.captionButton,
7681
- children: [
7682
- " ",
7683
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectValue, { placeholder })
7684
- ]
7725
+ className: (0, import_clsx59.clsx)(
7726
+ calendarStyles.captionButton,
7727
+ header === "caption-year" && "tabular-nums"
7728
+ ),
7729
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectValue, { placeholder })
7685
7730
  }
7686
7731
  ),
7687
7732
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectContent, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectGroup, { children }) }) })
@@ -7737,7 +7782,9 @@ function Calendar({
7737
7782
  const cells = getMonthGrid(year, month, weekStartsOn);
7738
7783
  const weeks = chunkWeeks(cells);
7739
7784
  const weekdayLabels = getWeekdayLabels(weekStartsOn);
7740
- const monthName = formatMonthName(year, month);
7785
+ const monthLabel = formatMonthLabel(year, month);
7786
+ const monthNameLong = formatMonthNameLong(year, month);
7787
+ const yearOptions = yearOptionsForView(year);
7741
7788
  const getDateFromCell = (d, monthOffset) => new Date(year, month + monthOffset, d);
7742
7789
  const setRange = (start, end) => {
7743
7790
  if (onRangeChange) onRangeChange(start, end);
@@ -7928,8 +7975,8 @@ function Calendar({
7928
7975
  CalendarCaptionSelect,
7929
7976
  {
7930
7977
  value: String(month),
7931
- placeholder: monthName,
7932
- ariaLabel: `Month: ${monthName}`,
7978
+ placeholder: monthLabel,
7979
+ ariaLabel: `Month: ${monthNameLong}`,
7933
7980
  header: "caption-month",
7934
7981
  onValueChange: (nextMonth) => {
7935
7982
  setView(new Date(year, Number.parseInt(nextMonth, 10), 1));
@@ -7947,7 +7994,7 @@ function Calendar({
7947
7994
  onValueChange: (nextYear) => {
7948
7995
  setView(new Date(Number.parseInt(nextYear, 10), month, 1));
7949
7996
  },
7950
- children: yearOptionsForView(year).map((yearOption) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectItem, { value: String(yearOption), children: String(yearOption) }, yearOption))
7997
+ children: yearOptions.map((yearOption) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectItem, { value: String(yearOption), children: String(yearOption) }, yearOption))
7951
7998
  }
7952
7999
  ),
7953
8000
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
@@ -11168,6 +11215,81 @@ function useSidebarPeek() {
11168
11215
  return useSidebarPeekContext("useSidebarPeek");
11169
11216
  }
11170
11217
 
11218
+ // src/components/Sidebar/SidebarProvider.tsx
11219
+ var import_react40 = require("react");
11220
+ var import_react41 = require("@refineui/utilities/react");
11221
+ var import_jsx_runtime62 = require("react/jsx-runtime");
11222
+ var SidebarContext = (0, import_react40.createContext)(null);
11223
+ function useSidebarContext(component) {
11224
+ const value = (0, import_react40.useContext)(SidebarContext);
11225
+ if (!value) throw new Error(`${component} must be used within <SidebarProvider>.`);
11226
+ return value;
11227
+ }
11228
+ function useSidebar() {
11229
+ return useSidebarContext("useSidebar");
11230
+ }
11231
+ function SidebarProvider({
11232
+ open: openProp,
11233
+ defaultOpen = true,
11234
+ onOpenChange,
11235
+ id,
11236
+ children
11237
+ }) {
11238
+ const [uncontrolled, setUncontrolled] = (0, import_react40.useState)(defaultOpen);
11239
+ const open = openProp ?? uncontrolled;
11240
+ const generatedId = (0, import_react40.useId)();
11241
+ const sidebarId = id ?? generatedId;
11242
+ const toggle = (0, import_react40.useCallback)(() => {
11243
+ const next = !open;
11244
+ if (openProp === void 0) setUncontrolled(next);
11245
+ onOpenChange?.(next);
11246
+ }, [onOpenChange, open, openProp]);
11247
+ const value = (0, import_react40.useMemo)(
11248
+ () => ({ open, sidebarId, toggle }),
11249
+ [open, sidebarId, toggle]
11250
+ );
11251
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SidebarContext.Provider, { value, children });
11252
+ }
11253
+ var SidebarTrigger = (0, import_react40.forwardRef)(function SidebarTrigger2({
11254
+ asChild = false,
11255
+ onClick,
11256
+ className,
11257
+ children,
11258
+ variant = "secondary",
11259
+ size,
11260
+ layout,
11261
+ fullWidth,
11262
+ type = "button",
11263
+ ...props
11264
+ }, ref) {
11265
+ const { open, toggle, sidebarId } = useSidebarContext("SidebarTrigger");
11266
+ const shared = {
11267
+ ...props,
11268
+ ref,
11269
+ "aria-expanded": open,
11270
+ "aria-controls": sidebarId,
11271
+ "data-state": open ? "open" : "closed",
11272
+ className,
11273
+ onClick: (event) => {
11274
+ onClick?.(event);
11275
+ if (!event.defaultPrevented) toggle();
11276
+ }
11277
+ };
11278
+ if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react41.Slot, { ...shared, children });
11279
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
11280
+ Button,
11281
+ {
11282
+ ...shared,
11283
+ type,
11284
+ variant,
11285
+ size,
11286
+ layout,
11287
+ fullWidth,
11288
+ children
11289
+ }
11290
+ );
11291
+ });
11292
+
11171
11293
  // src/components/Pagination/Pagination.tsx
11172
11294
  var import_clsx84 = require("clsx");
11173
11295
  var import_tokens25 = require("@refineui/tokens");
@@ -11188,18 +11310,18 @@ var paginationStyles = {
11188
11310
  };
11189
11311
 
11190
11312
  // src/components/Pagination/Pagination.tsx
11191
- var import_jsx_runtime62 = require("react/jsx-runtime");
11313
+ var import_jsx_runtime63 = require("react/jsx-runtime");
11192
11314
  function PaginationRoot({ className, ...props }) {
11193
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("nav", { "aria-label": "Pagination", className: (0, import_clsx84.clsx)(paginationStyles.root, className), ...props });
11315
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("nav", { "aria-label": "Pagination", className: (0, import_clsx84.clsx)(paginationStyles.root, className), ...props });
11194
11316
  }
11195
11317
  function PaginationContent({ className, ...props }) {
11196
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("ul", { className: (0, import_clsx84.clsx)(paginationStyles.listWrap, className), ...props });
11318
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("ul", { className: (0, import_clsx84.clsx)(paginationStyles.listWrap, className), ...props });
11197
11319
  }
11198
11320
  function PaginationItem({ className, ...props }) {
11199
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("li", { className, ...props });
11321
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("li", { className, ...props });
11200
11322
  }
11201
11323
  function PaginationLink({ className, isActive, ...props }) {
11202
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
11324
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11203
11325
  "a",
11204
11326
  {
11205
11327
  "data-refineui": "pagination",
@@ -11219,7 +11341,7 @@ function PaginationNavButton({
11219
11341
  }) {
11220
11342
  const isPrev = direction === "prev";
11221
11343
  const iconColor = disabled ? (0, import_color10.resolveColorTokenValue)(componentColorTokens.pagination.navIcon.disabled) : (0, import_color10.resolveColorTokenValue)(componentColorTokens.pagination.navIcon.default);
11222
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
11344
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11223
11345
  "button",
11224
11346
  {
11225
11347
  type: "button",
@@ -11229,7 +11351,7 @@ function PaginationNavButton({
11229
11351
  "aria-label": isPrev ? "Previous page" : "Next page",
11230
11352
  className: (0, import_clsx84.clsx)(paginationStyles.itemShell, paginationStyles.nav, className),
11231
11353
  ...props,
11232
- children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
11354
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11233
11355
  WebIcon,
11234
11356
  {
11235
11357
  name: isPrev ? "chevron-left" : "chevron-right",
@@ -11242,13 +11364,13 @@ function PaginationNavButton({
11242
11364
  );
11243
11365
  }
11244
11366
  function PaginationPrevious(props) {
11245
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(PaginationNavButton, { direction: "prev", ...props });
11367
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(PaginationNavButton, { direction: "prev", ...props });
11246
11368
  }
11247
11369
  function PaginationNext(props) {
11248
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(PaginationNavButton, { direction: "next", ...props });
11370
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(PaginationNavButton, { direction: "next", ...props });
11249
11371
  }
11250
11372
  function PaginationEllipsis({ className, ...props }) {
11251
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
11373
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11252
11374
  "span",
11253
11375
  {
11254
11376
  "aria-hidden": true,
@@ -11256,7 +11378,7 @@ function PaginationEllipsis({ className, ...props }) {
11256
11378
  "data-ellipsis": "true",
11257
11379
  className: (0, import_clsx84.clsx)(paginationStyles.itemShell, paginationStyles.ellipsis, className),
11258
11380
  ...props,
11259
- children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
11381
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11260
11382
  WebIcon,
11261
11383
  {
11262
11384
  name: "more-horizontal",
@@ -11269,15 +11391,15 @@ function PaginationEllipsis({ className, ...props }) {
11269
11391
  );
11270
11392
  }
11271
11393
  function Pagination(props) {
11272
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(PaginationRoot, { ...props });
11394
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(PaginationRoot, { ...props });
11273
11395
  }
11274
11396
 
11275
11397
  // src/components/PopOver/PopOver.tsx
11276
11398
  var import_clsx85 = require("clsx");
11277
- var import_react40 = require("react");
11399
+ var import_react42 = require("react");
11278
11400
  var import_tokens26 = require("@refineui/tokens");
11279
11401
  var import_color11 = require("@refineui/utilities/color");
11280
- var import_react41 = require("@refineui/utilities/react");
11402
+ var import_react43 = require("@refineui/utilities/react");
11281
11403
 
11282
11404
  // src/components/PopOver/style.ts
11283
11405
  var popoverStyles = {
@@ -11311,10 +11433,10 @@ function popoverFloatingClasses(placement, align) {
11311
11433
  }
11312
11434
 
11313
11435
  // src/components/PopOver/PopOver.tsx
11314
- var import_jsx_runtime63 = require("react/jsx-runtime");
11315
- var PopoverContext = (0, import_react40.createContext)(null);
11436
+ var import_jsx_runtime64 = require("react/jsx-runtime");
11437
+ var PopoverContext = (0, import_react42.createContext)(null);
11316
11438
  function usePopoverContext(component) {
11317
- const ctx = (0, import_react40.useContext)(PopoverContext);
11439
+ const ctx = (0, import_react42.useContext)(PopoverContext);
11318
11440
  if (!ctx) throw new Error(`${component} must be used within <Popover>`);
11319
11441
  return ctx;
11320
11442
  }
@@ -11370,35 +11492,35 @@ function floatingGapStyle(placement) {
11370
11492
  return { marginLeft: POPOVER_GAP };
11371
11493
  }
11372
11494
  function Popover({ children, className, open: openProp, defaultOpen = false, onOpenChange, ...props }) {
11373
- const [internalOpen, setInternalOpen] = (0, import_react40.useState)(defaultOpen);
11495
+ const [internalOpen, setInternalOpen] = (0, import_react42.useState)(defaultOpen);
11374
11496
  const open = openProp ?? internalOpen;
11375
- const setOpen = (0, import_react40.useCallback)(
11497
+ const setOpen = (0, import_react42.useCallback)(
11376
11498
  (next) => {
11377
11499
  if (openProp === void 0) setInternalOpen(next);
11378
11500
  onOpenChange?.(next);
11379
11501
  },
11380
11502
  [openProp, onOpenChange]
11381
11503
  );
11382
- const toggle = (0, import_react40.useCallback)(() => setOpen(!open), [open, setOpen]);
11383
- const containerRef = (0, import_react40.useRef)(null);
11384
- const contentRef = (0, import_react40.useRef)(null);
11385
- const triggerRef = (0, import_react40.useRef)(null);
11386
- const contentId = (0, import_react40.useId)();
11387
- (0, import_react40.useEffect)(() => {
11504
+ const toggle = (0, import_react42.useCallback)(() => setOpen(!open), [open, setOpen]);
11505
+ const containerRef = (0, import_react42.useRef)(null);
11506
+ const contentRef = (0, import_react42.useRef)(null);
11507
+ const triggerRef = (0, import_react42.useRef)(null);
11508
+ const contentId = (0, import_react42.useId)();
11509
+ (0, import_react42.useEffect)(() => {
11388
11510
  const handler = (e) => {
11389
11511
  if (containerRef.current && !containerRef.current.contains(e.target)) setOpen(false);
11390
11512
  };
11391
11513
  if (open) document.addEventListener("mousedown", handler);
11392
11514
  return () => document.removeEventListener("mousedown", handler);
11393
11515
  }, [open, setOpen]);
11394
- (0, import_react40.useEffect)(() => {
11516
+ (0, import_react42.useEffect)(() => {
11395
11517
  const onKey = (e) => {
11396
11518
  if (e instanceof KeyboardEvent && e.key === "Escape") setOpen(false);
11397
11519
  };
11398
11520
  if (open) document.addEventListener("keydown", onKey);
11399
11521
  return () => document.removeEventListener("keydown", onKey);
11400
11522
  }, [open, setOpen]);
11401
- const onTriggerKeyDown = (0, import_react40.useCallback)(
11523
+ const onTriggerKeyDown = (0, import_react42.useCallback)(
11402
11524
  (e) => {
11403
11525
  if (e.key === "Enter" || e.key === " ") {
11404
11526
  e.preventDefault();
@@ -11407,7 +11529,7 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
11407
11529
  },
11408
11530
  [toggle]
11409
11531
  );
11410
- const value = (0, import_react40.useMemo)(
11532
+ const value = (0, import_react42.useMemo)(
11411
11533
  () => ({
11412
11534
  open,
11413
11535
  setOpen,
@@ -11420,7 +11542,7 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
11420
11542
  }),
11421
11543
  [open, setOpen, toggle, contentId, onTriggerKeyDown]
11422
11544
  );
11423
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(PopoverContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11545
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(PopoverContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
11424
11546
  "div",
11425
11547
  {
11426
11548
  ref: containerRef,
@@ -11433,11 +11555,11 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
11433
11555
  }
11434
11556
  function PopoverTrigger({ children, className, ...props }) {
11435
11557
  const { open, toggle, triggerRef, contentId, onTriggerKeyDown } = usePopoverContext("PopoverTrigger");
11436
- const mergeEl = (0, import_react41.getMergeableTriggerChild)(children);
11558
+ const mergeEl = (0, import_react43.getMergeableTriggerChild)(children);
11437
11559
  if (mergeEl) {
11438
11560
  const passthrough = props;
11439
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11440
- import_react41.Slot,
11561
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
11562
+ import_react43.Slot,
11441
11563
  {
11442
11564
  ref: triggerRef,
11443
11565
  ...props,
@@ -11458,7 +11580,7 @@ function PopoverTrigger({ children, className, ...props }) {
11458
11580
  );
11459
11581
  }
11460
11582
  const passthroughBtn = props;
11461
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11583
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
11462
11584
  "button",
11463
11585
  {
11464
11586
  type: "button",
@@ -11501,7 +11623,7 @@ function PopoverContent({
11501
11623
  const rot = beakRotateDeg(placement);
11502
11624
  const gapStyle = floatingGapStyle(placement);
11503
11625
  if (!open) return null;
11504
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11626
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
11505
11627
  "div",
11506
11628
  {
11507
11629
  className: (0, import_clsx85.clsx)(
@@ -11509,8 +11631,8 @@ function PopoverContent({
11509
11631
  popoverFloatingClasses(placement, align)
11510
11632
  ),
11511
11633
  style: gapStyle,
11512
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: popoverStyles.panelWrap, children: [
11513
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: popoverStyles.beakWrap, style: { ...bw, width: BEAK_W, height: BEAK_H }, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11634
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: popoverStyles.panelWrap, children: [
11635
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: popoverStyles.beakWrap, style: { ...bw, width: BEAK_W, height: BEAK_H }, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
11514
11636
  "div",
11515
11637
  {
11516
11638
  style: {
@@ -11519,7 +11641,7 @@ function PopoverContent({
11519
11641
  transform: `rotate(${rot}deg)`,
11520
11642
  transformOrigin: "center center"
11521
11643
  },
11522
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
11644
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
11523
11645
  "svg",
11524
11646
  {
11525
11647
  width: BEAK_W,
@@ -11529,14 +11651,14 @@ function PopoverContent({
11529
11651
  xmlns: "http://www.w3.org/2000/svg",
11530
11652
  style: { display: "block" },
11531
11653
  children: [
11532
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
11533
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("polygon", { points: "8,2 2,8 14,8", fill: bg })
11654
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
11655
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("polygon", { points: "8,2 2,8 14,8", fill: bg })
11534
11656
  ]
11535
11657
  }
11536
11658
  )
11537
11659
  }
11538
11660
  ) }),
11539
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
11661
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
11540
11662
  "div",
11541
11663
  {
11542
11664
  ref: contentRef,
@@ -11576,9 +11698,9 @@ function PopOver({
11576
11698
  className,
11577
11699
  ...props
11578
11700
  }) {
11579
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Popover, { className, ...props, children: [
11580
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(PopoverTrigger, { children: trigger }),
11581
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(PopoverContent, { placement, align, children: content })
11701
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Popover, { className, ...props, children: [
11702
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(PopoverTrigger, { children: trigger }),
11703
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(PopoverContent, { placement, align, children: content })
11582
11704
  ] });
11583
11705
  }
11584
11706
 
@@ -11594,7 +11716,7 @@ var skeletonStyles = {
11594
11716
  };
11595
11717
 
11596
11718
  // src/components/Skeleton/Skeleton.tsx
11597
- var import_jsx_runtime64 = require("react/jsx-runtime");
11719
+ var import_jsx_runtime65 = require("react/jsx-runtime");
11598
11720
  function Skeleton({
11599
11721
  width,
11600
11722
  height,
@@ -11626,7 +11748,7 @@ function Skeleton({
11626
11748
  w = width ?? "100%";
11627
11749
  }
11628
11750
  const dimStyle = { width: w, height: h };
11629
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
11751
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
11630
11752
  "div",
11631
11753
  {
11632
11754
  "data-refineui": "skeleton",
@@ -11644,7 +11766,7 @@ function Skeleton({
11644
11766
 
11645
11767
  // src/components/Slider/Slider.tsx
11646
11768
  var import_clsx87 = require("clsx");
11647
- var import_react42 = require("react");
11769
+ var import_react44 = require("react");
11648
11770
 
11649
11771
  // src/components/Slider/style.ts
11650
11772
  var sliderStyles = {
@@ -11652,7 +11774,7 @@ var sliderStyles = {
11652
11774
  };
11653
11775
 
11654
11776
  // src/components/Slider/Slider.tsx
11655
- var import_jsx_runtime65 = require("react/jsx-runtime");
11777
+ var import_jsx_runtime66 = require("react/jsx-runtime");
11656
11778
  function clampPct(n) {
11657
11779
  if (Number.isNaN(n)) return 0;
11658
11780
  return Math.min(100, Math.max(0, n));
@@ -11670,12 +11792,12 @@ function Slider({
11670
11792
  style,
11671
11793
  ...props
11672
11794
  }) {
11673
- const [internalFillPct, setInternalFillPct] = (0, import_react42.useState)(() => {
11795
+ const [internalFillPct, setInternalFillPct] = (0, import_react44.useState)(() => {
11674
11796
  const v = defaultValue !== void 0 ? Number(defaultValue) : (min + max) / 2;
11675
11797
  return clampPct((v - min) / (max - min) * 100);
11676
11798
  });
11677
11799
  const fillPct = value !== void 0 ? clampPct((Number(value) - min) / (max - min) * 100) : internalFillPct;
11678
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
11800
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
11679
11801
  "input",
11680
11802
  {
11681
11803
  type: "range",
@@ -11712,7 +11834,7 @@ function Slider({
11712
11834
  // src/components/Carousel/Carousel.tsx
11713
11835
  var import_clsx89 = require("clsx");
11714
11836
  var import_tokens27 = require("@refineui/tokens");
11715
- var import_react43 = require("react");
11837
+ var import_react45 = require("react");
11716
11838
 
11717
11839
  // src/components/Carousel/style.ts
11718
11840
  var import_clsx88 = require("clsx");
@@ -11744,11 +11866,11 @@ var carouselStyles = {
11744
11866
  };
11745
11867
 
11746
11868
  // src/components/Carousel/Carousel.tsx
11747
- var import_jsx_runtime66 = require("react/jsx-runtime");
11869
+ var import_jsx_runtime67 = require("react/jsx-runtime");
11748
11870
  var DRAG_COMMIT_RATIO = 0.18;
11749
- var CarouselContext = (0, import_react43.createContext)(null);
11871
+ var CarouselContext = (0, import_react45.createContext)(null);
11750
11872
  function useCarouselContext(component) {
11751
- const v = (0, import_react43.useContext)(CarouselContext);
11873
+ const v = (0, import_react45.useContext)(CarouselContext);
11752
11874
  if (!v) throw new Error(`${component} must be used within Carousel.`);
11753
11875
  return v;
11754
11876
  }
@@ -11767,13 +11889,13 @@ function Carousel({
11767
11889
  ...props
11768
11890
  }) {
11769
11891
  const isControlled = indexControlled !== void 0;
11770
- const [internalIndex, setInternalIndex] = (0, import_react43.useState)(defaultIndex);
11771
- const [count, setCount] = (0, import_react43.useState)(0);
11772
- const [trackIndex, setTrackIndex] = (0, import_react43.useState)(defaultIndex);
11773
- const [instant, setInstant] = (0, import_react43.useState)(false);
11892
+ const [internalIndex, setInternalIndex] = (0, import_react45.useState)(defaultIndex);
11893
+ const [count, setCount] = (0, import_react45.useState)(0);
11894
+ const [trackIndex, setTrackIndex] = (0, import_react45.useState)(defaultIndex);
11895
+ const [instant, setInstant] = (0, import_react45.useState)(false);
11774
11896
  const index = isControlled ? indexControlled : internalIndex;
11775
11897
  const loopActive = loop && count > 1;
11776
- const commitLogical = (0, import_react43.useCallback)(
11898
+ const commitLogical = (0, import_react45.useCallback)(
11777
11899
  (next) => {
11778
11900
  const normalized = clampIndex(next, Math.max(count, 1));
11779
11901
  if (!isControlled) setInternalIndex(normalized);
@@ -11781,13 +11903,13 @@ function Carousel({
11781
11903
  },
11782
11904
  [count, isControlled, onIndexChange]
11783
11905
  );
11784
- (0, import_react43.useLayoutEffect)(() => {
11906
+ (0, import_react45.useLayoutEffect)(() => {
11785
11907
  if (count <= 0) return;
11786
11908
  const logical = clampIndex(index, count);
11787
11909
  if (logical !== index) commitLogical(logical);
11788
11910
  setTrackIndex(loopActive ? logical + 1 : logical);
11789
11911
  }, [count, loopActive]);
11790
- (0, import_react43.useEffect)(() => {
11912
+ (0, import_react45.useEffect)(() => {
11791
11913
  if (count <= 0) return;
11792
11914
  if (!loopActive) {
11793
11915
  setTrackIndex(clampIndex(index, count));
@@ -11801,7 +11923,7 @@ function Carousel({
11801
11923
  }, [index, count, loopActive]);
11802
11924
  const canScrollPrev = loopActive ? true : index > 0;
11803
11925
  const canScrollNext = loopActive ? true : index < count - 1;
11804
- const scrollTo = (0, import_react43.useCallback)(
11926
+ const scrollTo = (0, import_react45.useCallback)(
11805
11927
  (i) => {
11806
11928
  if (count <= 0) return;
11807
11929
  const next = clampIndex(i, count);
@@ -11810,7 +11932,7 @@ function Carousel({
11810
11932
  },
11811
11933
  [commitLogical, count, loopActive]
11812
11934
  );
11813
- const scrollPrev = (0, import_react43.useCallback)(() => {
11935
+ const scrollPrev = (0, import_react45.useCallback)(() => {
11814
11936
  if (count <= 0) return;
11815
11937
  if (loopActive) {
11816
11938
  if (trackIndex < 1 || trackIndex > count) return;
@@ -11823,7 +11945,7 @@ function Carousel({
11823
11945
  setTrackIndex(index - 1);
11824
11946
  }
11825
11947
  }, [commitLogical, count, index, loopActive, trackIndex]);
11826
- const scrollNext = (0, import_react43.useCallback)(() => {
11948
+ const scrollNext = (0, import_react45.useCallback)(() => {
11827
11949
  if (count <= 0) return;
11828
11950
  if (loopActive) {
11829
11951
  if (trackIndex < 1 || trackIndex > count) return;
@@ -11836,7 +11958,7 @@ function Carousel({
11836
11958
  setTrackIndex(index + 1);
11837
11959
  }
11838
11960
  }, [commitLogical, count, index, loopActive, trackIndex]);
11839
- const onTrackSettled = (0, import_react43.useCallback)(() => {
11961
+ const onTrackSettled = (0, import_react45.useCallback)(() => {
11840
11962
  if (!loopActive) return;
11841
11963
  if (trackIndex === 0) {
11842
11964
  setInstant(true);
@@ -11852,7 +11974,7 @@ function Carousel({
11852
11974
  });
11853
11975
  }
11854
11976
  }, [count, loopActive, trackIndex]);
11855
- const ctx = (0, import_react43.useMemo)(
11977
+ const ctx = (0, import_react45.useMemo)(
11856
11978
  () => ({
11857
11979
  index,
11858
11980
  count,
@@ -11907,7 +12029,7 @@ function Carousel({
11907
12029
  break;
11908
12030
  }
11909
12031
  };
11910
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(CarouselContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12032
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(CarouselContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
11911
12033
  "div",
11912
12034
  {
11913
12035
  "data-refineui": "carousel",
@@ -11931,21 +12053,21 @@ function CarouselContent({ className, children, ...props }) {
11931
12053
  instant,
11932
12054
  onTrackSettled
11933
12055
  } = useCarouselContext("CarouselContent");
11934
- const viewportRef = (0, import_react43.useRef)(null);
11935
- const dragStartX = (0, import_react43.useRef)(null);
11936
- const [dragPx, setDragPx] = (0, import_react43.useState)(0);
11937
- const [dragging, setDragging] = (0, import_react43.useState)(false);
11938
- const slides = import_react43.Children.toArray(children).filter(import_react43.isValidElement);
12056
+ const viewportRef = (0, import_react45.useRef)(null);
12057
+ const dragStartX = (0, import_react45.useRef)(null);
12058
+ const [dragPx, setDragPx] = (0, import_react45.useState)(0);
12059
+ const [dragging, setDragging] = (0, import_react45.useState)(false);
12060
+ const slides = import_react45.Children.toArray(children).filter(import_react45.isValidElement);
11939
12061
  const slideCount = slides.length;
11940
- (0, import_react43.useEffect)(() => {
12062
+ (0, import_react45.useEffect)(() => {
11941
12063
  setCount(slideCount);
11942
12064
  }, [setCount, slideCount]);
11943
12065
  const trackSlides = loop && slides.length > 1 ? [
11944
- (0, import_react43.cloneElement)(slides[slides.length - 1], { key: "__carousel-clone-last" }),
12066
+ (0, import_react45.cloneElement)(slides[slides.length - 1], { key: "__carousel-clone-last" }),
11945
12067
  ...slides,
11946
- (0, import_react43.cloneElement)(slides[0], { key: "__carousel-clone-first" })
12068
+ (0, import_react45.cloneElement)(slides[0], { key: "__carousel-clone-first" })
11947
12069
  ] : slides;
11948
- const endDrag = (0, import_react43.useCallback)(
12070
+ const endDrag = (0, import_react45.useCallback)(
11949
12071
  (clientX) => {
11950
12072
  if (dragStartX.current == null) return;
11951
12073
  const width = viewportRef.current?.offsetWidth ?? 1;
@@ -11994,7 +12116,7 @@ function CarouselContent({ className, children, ...props }) {
11994
12116
  };
11995
12117
  const animated = !dragging && !instant;
11996
12118
  const transform = dragPx !== 0 ? `translate3d(calc(-${trackIndex * 100}% + ${dragPx}px), 0, 0)` : `translate3d(-${trackIndex * 100}%, 0, 0)`;
11997
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12119
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
11998
12120
  "div",
11999
12121
  {
12000
12122
  ref: viewportRef,
@@ -12005,7 +12127,7 @@ function CarouselContent({ className, children, ...props }) {
12005
12127
  onPointerMove,
12006
12128
  onPointerUp,
12007
12129
  onPointerCancel,
12008
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12130
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12009
12131
  "div",
12010
12132
  {
12011
12133
  "data-refineui": "carousel-track",
@@ -12020,9 +12142,9 @@ function CarouselContent({ className, children, ...props }) {
12020
12142
  }
12021
12143
  );
12022
12144
  }
12023
- var CarouselItem = (0, import_react43.forwardRef)(function CarouselItem2({ className, children, ...props }, ref) {
12145
+ var CarouselItem = (0, import_react45.forwardRef)(function CarouselItem2({ className, children, ...props }, ref) {
12024
12146
  useCarouselContext("CarouselItem");
12025
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12147
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12026
12148
  "div",
12027
12149
  {
12028
12150
  ref,
@@ -12037,12 +12159,12 @@ var CarouselItem = (0, import_react43.forwardRef)(function CarouselItem2({ class
12037
12159
  });
12038
12160
  function CarouselControls({ className, children, ...props }) {
12039
12161
  useCarouselContext("CarouselControls");
12040
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { "data-refineui": "carousel-controls", className: (0, import_clsx89.clsx)(carouselStyles.controls, className), ...props, children });
12162
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { "data-refineui": "carousel-controls", className: (0, import_clsx89.clsx)(carouselStyles.controls, className), ...props, children });
12041
12163
  }
12042
12164
  function CarouselPrevious({ className, disabled, onClick, ...props }) {
12043
12165
  const { scrollPrev, canScrollPrev } = useCarouselContext("CarouselPrevious");
12044
12166
  const isDisabled = disabled || !canScrollPrev;
12045
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12167
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12046
12168
  Button,
12047
12169
  {
12048
12170
  variant: "outline",
@@ -12058,7 +12180,7 @@ function CarouselPrevious({ className, disabled, onClick, ...props }) {
12058
12180
  onClick?.(e);
12059
12181
  if (!e.defaultPrevented && !isDisabled) scrollPrev();
12060
12182
  },
12061
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12183
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12062
12184
  WebIcon,
12063
12185
  {
12064
12186
  name: "chevron-left",
@@ -12074,7 +12196,7 @@ function CarouselPrevious({ className, disabled, onClick, ...props }) {
12074
12196
  function CarouselNext({ className, disabled, onClick, ...props }) {
12075
12197
  const { scrollNext, canScrollNext } = useCarouselContext("CarouselNext");
12076
12198
  const isDisabled = disabled || !canScrollNext;
12077
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12199
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12078
12200
  Button,
12079
12201
  {
12080
12202
  variant: "outline",
@@ -12090,7 +12212,7 @@ function CarouselNext({ className, disabled, onClick, ...props }) {
12090
12212
  onClick?.(e);
12091
12213
  if (!e.defaultPrevented && !isDisabled) scrollNext();
12092
12214
  },
12093
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12215
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12094
12216
  WebIcon,
12095
12217
  {
12096
12218
  name: "chevron-right",
@@ -12105,9 +12227,9 @@ function CarouselNext({ className, disabled, onClick, ...props }) {
12105
12227
  }
12106
12228
  function CarouselIndicators({ className, ...props }) {
12107
12229
  const { count, index, scrollTo } = useCarouselContext("CarouselIndicators");
12108
- const trackRef = (0, import_react43.useRef)(null);
12109
- const [thumb, setThumb] = (0, import_react43.useState)({ width: 0, x: 0, ready: false });
12110
- const updateThumb = (0, import_react43.useCallback)(() => {
12230
+ const trackRef = (0, import_react45.useRef)(null);
12231
+ const [thumb, setThumb] = (0, import_react45.useState)({ width: 0, x: 0, ready: false });
12232
+ const updateThumb = (0, import_react45.useCallback)(() => {
12111
12233
  const el = trackRef.current;
12112
12234
  if (!el || count <= 0) {
12113
12235
  setThumb({ width: 0, x: 0, ready: false });
@@ -12122,10 +12244,10 @@ function CarouselIndicators({ className, ...props }) {
12122
12244
  ready: true
12123
12245
  });
12124
12246
  }, [count, index]);
12125
- (0, import_react43.useLayoutEffect)(() => {
12247
+ (0, import_react45.useLayoutEffect)(() => {
12126
12248
  updateThumb();
12127
12249
  }, [updateThumb]);
12128
- (0, import_react43.useEffect)(() => {
12250
+ (0, import_react45.useEffect)(() => {
12129
12251
  const el = trackRef.current;
12130
12252
  if (!el) return;
12131
12253
  const ro = new ResizeObserver(() => updateThumb());
@@ -12137,7 +12259,7 @@ function CarouselIndicators({ className, ...props }) {
12137
12259
  width: thumb.width,
12138
12260
  transform: `translate3d(${thumb.x}px, 0, 0)`
12139
12261
  };
12140
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
12262
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
12141
12263
  "div",
12142
12264
  {
12143
12265
  ref: trackRef,
@@ -12147,7 +12269,7 @@ function CarouselIndicators({ className, ...props }) {
12147
12269
  className: (0, import_clsx89.clsx)(carouselStyles.indicators, className),
12148
12270
  ...props,
12149
12271
  children: [
12150
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12272
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12151
12273
  "span",
12152
12274
  {
12153
12275
  "data-refineui": "carousel-indicator-thumb",
@@ -12157,7 +12279,7 @@ function CarouselIndicators({ className, ...props }) {
12157
12279
  style: thumbStyle
12158
12280
  }
12159
12281
  ),
12160
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { "data-refineui": "carousel-indicator-hits", className: carouselStyles.indicatorHitRow, children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
12282
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { "data-refineui": "carousel-indicator-hits", className: carouselStyles.indicatorHitRow, children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12161
12283
  "button",
12162
12284
  {
12163
12285
  type: "button",
@@ -12178,7 +12300,7 @@ function CarouselIndicators({ className, ...props }) {
12178
12300
 
12179
12301
  // src/components/Bubble/Bubble.tsx
12180
12302
  var import_clsx91 = require("clsx");
12181
- var import_react44 = require("react");
12303
+ var import_react46 = require("react");
12182
12304
 
12183
12305
  // src/components/Bubble/style.ts
12184
12306
  var import_clsx90 = require("clsx");
@@ -12243,21 +12365,21 @@ var bubbleContentVariantClass = {
12243
12365
  };
12244
12366
 
12245
12367
  // src/components/Bubble/Bubble.tsx
12246
- var import_jsx_runtime67 = require("react/jsx-runtime");
12247
- var BubbleContext = (0, import_react44.createContext)(null);
12368
+ var import_jsx_runtime68 = require("react/jsx-runtime");
12369
+ var BubbleContext = (0, import_react46.createContext)(null);
12248
12370
  function useBubbleContext(component) {
12249
- const value = (0, import_react44.useContext)(BubbleContext);
12371
+ const value = (0, import_react46.useContext)(BubbleContext);
12250
12372
  if (!value) throw new Error(`${component} must be used within Bubble.`);
12251
12373
  return value;
12252
12374
  }
12253
12375
  function isBubbleReactionsElement(node) {
12254
- return (0, import_react44.isValidElement)(node) && node.type === BubbleReactions;
12376
+ return (0, import_react46.isValidElement)(node) && node.type === BubbleReactions;
12255
12377
  }
12256
12378
  function partitionBubbleChildren(children) {
12257
12379
  const top = [];
12258
12380
  const middle = [];
12259
12381
  const bottom = [];
12260
- import_react44.Children.forEach(children, (child) => {
12382
+ import_react46.Children.forEach(children, (child) => {
12261
12383
  if (!isBubbleReactionsElement(child)) {
12262
12384
  middle.push(child);
12263
12385
  return;
@@ -12275,7 +12397,7 @@ function partitionBubbleChildren(children) {
12275
12397
  };
12276
12398
  }
12277
12399
  function BubbleGroup({ className, ...props }) {
12278
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12400
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12279
12401
  "div",
12280
12402
  {
12281
12403
  "data-refineui": "bubble-group",
@@ -12294,7 +12416,7 @@ function Bubble({
12294
12416
  }) {
12295
12417
  const rootStyle = variant === "ghost" ? style : { maxWidth: BUBBLE_MAX_WIDTH, ...style };
12296
12418
  const { top, middle, bottom, hasTop, hasBottom } = partitionBubbleChildren(children);
12297
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BubbleContext.Provider, { value: { variant, align }, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12419
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(BubbleContext.Provider, { value: { variant, align }, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12298
12420
  "div",
12299
12421
  {
12300
12422
  "data-refineui": "bubble",
@@ -12309,7 +12431,7 @@ function Bubble({
12309
12431
  ),
12310
12432
  style: rootStyle,
12311
12433
  ...props,
12312
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { "data-refineui": "bubble-surface", className: bubbleStyles.surface, children: [
12434
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { "data-refineui": "bubble-surface", className: bubbleStyles.surface, children: [
12313
12435
  middle,
12314
12436
  top,
12315
12437
  bottom
@@ -12319,7 +12441,7 @@ function Bubble({
12319
12441
  }
12320
12442
  function BubbleContent({ className, ...props }) {
12321
12443
  const { variant } = useBubbleContext("BubbleContent");
12322
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12444
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12323
12445
  "div",
12324
12446
  {
12325
12447
  "data-refineui": "bubble-content",
@@ -12340,7 +12462,7 @@ function BubbleReactions({
12340
12462
  }) {
12341
12463
  const { align: bubbleAlign } = useBubbleContext("BubbleReactions");
12342
12464
  const align = alignProp ?? (bubbleAlign === "start" ? "end" : "start");
12343
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
12465
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12344
12466
  "div",
12345
12467
  {
12346
12468
  "data-refineui": "bubble-reactions",
@@ -12360,7 +12482,7 @@ function BubbleReactions({
12360
12482
  // src/components/Stepper/Stepper.tsx
12361
12483
  var import_clsx93 = require("clsx");
12362
12484
  var import_tokens28 = require("@refineui/tokens");
12363
- var import_react45 = require("react");
12485
+ var import_react47 = require("react");
12364
12486
 
12365
12487
  // src/components/Stepper/style.ts
12366
12488
  var import_clsx92 = require("clsx");
@@ -12468,17 +12590,17 @@ var stepperConnectorVars = {
12468
12590
  };
12469
12591
 
12470
12592
  // src/components/Stepper/Stepper.tsx
12471
- var import_jsx_runtime68 = require("react/jsx-runtime");
12472
- var StepperContext = (0, import_react45.createContext)(null);
12473
- var StepperItemContext = (0, import_react45.createContext)(null);
12474
- var StepperListRegistryContext = (0, import_react45.createContext)(null);
12593
+ var import_jsx_runtime69 = require("react/jsx-runtime");
12594
+ var StepperContext = (0, import_react47.createContext)(null);
12595
+ var StepperItemContext = (0, import_react47.createContext)(null);
12596
+ var StepperListRegistryContext = (0, import_react47.createContext)(null);
12475
12597
  function useStepperContext(component) {
12476
- const v = (0, import_react45.useContext)(StepperContext);
12598
+ const v = (0, import_react47.useContext)(StepperContext);
12477
12599
  if (!v) throw new Error(`${component} must be used within Stepper.`);
12478
12600
  return v;
12479
12601
  }
12480
12602
  function useStepperItemContext(component) {
12481
- const v = (0, import_react45.useContext)(StepperItemContext);
12603
+ const v = (0, import_react47.useContext)(StepperItemContext);
12482
12604
  if (!v) throw new Error(`${component} must be used within StepperItem.`);
12483
12605
  return v;
12484
12606
  }
@@ -12498,16 +12620,16 @@ function Stepper({
12498
12620
  ...props
12499
12621
  }) {
12500
12622
  const isControlled = valueControlled !== void 0;
12501
- const [internalValue, setInternalValue] = (0, import_react45.useState)(defaultValue);
12623
+ const [internalValue, setInternalValue] = (0, import_react47.useState)(defaultValue);
12502
12624
  const value = isControlled ? valueControlled : internalValue;
12503
- const setValue = (0, import_react45.useCallback)(
12625
+ const setValue = (0, import_react47.useCallback)(
12504
12626
  (next) => {
12505
12627
  if (!isControlled) setInternalValue(next);
12506
12628
  onValueChange?.(next);
12507
12629
  },
12508
12630
  [isControlled, onValueChange]
12509
12631
  );
12510
- const ctx = (0, import_react45.useMemo)(
12632
+ const ctx = (0, import_react47.useMemo)(
12511
12633
  () => ({
12512
12634
  value,
12513
12635
  setValue,
@@ -12516,7 +12638,7 @@ function Stepper({
12516
12638
  }),
12517
12639
  [value, setValue, orientation, onValueChange, isControlled]
12518
12640
  );
12519
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(StepperContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12641
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(StepperContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12520
12642
  "div",
12521
12643
  {
12522
12644
  "data-refineui": "stepper",
@@ -12530,9 +12652,9 @@ function Stepper({
12530
12652
  }
12531
12653
  function StepperList({ className, children, ...props }) {
12532
12654
  const { orientation, value } = useStepperContext("StepperList");
12533
- const cursorRef = (0, import_react45.useRef)(null);
12655
+ const cursorRef = (0, import_react47.useRef)(null);
12534
12656
  cursorRef.current = null;
12535
- const registry = (0, import_react45.useMemo)(
12657
+ const registry = (0, import_react47.useMemo)(
12536
12658
  () => ({
12537
12659
  noteItem(itemValue) {
12538
12660
  cursorRef.current = itemValue;
@@ -12544,7 +12666,7 @@ function StepperList({ className, children, ...props }) {
12544
12666
  }),
12545
12667
  [value]
12546
12668
  );
12547
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(StepperListRegistryContext.Provider, { value: registry, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12669
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(StepperListRegistryContext.Provider, { value: registry, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12548
12670
  "ol",
12549
12671
  {
12550
12672
  "data-refineui": "stepper-list",
@@ -12569,7 +12691,7 @@ function StepperItem({
12569
12691
  ...props
12570
12692
  }) {
12571
12693
  const { value, setValue, orientation, interactive } = useStepperContext("StepperItem");
12572
- const registry = (0, import_react45.useContext)(StepperListRegistryContext);
12694
+ const registry = (0, import_react47.useContext)(StepperListRegistryContext);
12573
12695
  registry?.noteItem(itemValue);
12574
12696
  const state = resolveState2(itemValue, value);
12575
12697
  const canActivate = interactive && !disabled;
@@ -12585,11 +12707,11 @@ function StepperItem({
12585
12707
  activate();
12586
12708
  }
12587
12709
  };
12588
- const itemCtx = (0, import_react45.useMemo)(
12710
+ const itemCtx = (0, import_react47.useMemo)(
12589
12711
  () => ({ state, disabled }),
12590
12712
  [state, disabled]
12591
12713
  );
12592
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(StepperItemContext.Provider, { value: itemCtx, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12714
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(StepperItemContext.Provider, { value: itemCtx, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12593
12715
  "li",
12594
12716
  {
12595
12717
  "data-refineui": "stepper-item",
@@ -12617,7 +12739,7 @@ function StepperItem({
12617
12739
  function StepperIndicator({ className, children, ...props }) {
12618
12740
  const { state } = useStepperItemContext("StepperIndicator");
12619
12741
  const stateClass = state === "complete" ? stepperStyles.indicatorComplete : state === "current" ? stepperStyles.indicatorCurrent : stepperStyles.indicatorUpcoming;
12620
- const content = state === "upcoming" ? children : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12742
+ const content = state === "upcoming" ? children : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12621
12743
  WebIcon,
12622
12744
  {
12623
12745
  name: "checkmark",
@@ -12628,7 +12750,7 @@ function StepperIndicator({ className, children, ...props }) {
12628
12750
  className: "items-center justify-center"
12629
12751
  }
12630
12752
  );
12631
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12753
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12632
12754
  "span",
12633
12755
  {
12634
12756
  "data-refineui": "stepper-indicator",
@@ -12643,7 +12765,7 @@ function StepperIndicator({ className, children, ...props }) {
12643
12765
  function StepperContent({ className, ...props }) {
12644
12766
  const { orientation } = useStepperContext("StepperContent");
12645
12767
  useStepperItemContext("StepperContent");
12646
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12768
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12647
12769
  "div",
12648
12770
  {
12649
12771
  "data-refineui": "stepper-content",
@@ -12659,7 +12781,7 @@ function StepperContent({ className, ...props }) {
12659
12781
  function StepperTitle({ className, ...props }) {
12660
12782
  const { state } = useStepperItemContext("StepperTitle");
12661
12783
  const stateClass = state === "complete" ? stepperStyles.titleComplete : state === "current" ? stepperStyles.titleCurrent : stepperStyles.titleUpcoming;
12662
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12784
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12663
12785
  "span",
12664
12786
  {
12665
12787
  "data-refineui": "stepper-title",
@@ -12672,7 +12794,7 @@ function StepperTitle({ className, ...props }) {
12672
12794
  function StepperDescription({ className, ...props }) {
12673
12795
  const { state } = useStepperItemContext("StepperDescription");
12674
12796
  const stateClass = state === "complete" ? stepperStyles.descriptionComplete : state === "current" ? stepperStyles.descriptionCurrent : stepperStyles.descriptionUpcoming;
12675
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12797
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12676
12798
  "span",
12677
12799
  {
12678
12800
  "data-refineui": "stepper-description",
@@ -12684,10 +12806,10 @@ function StepperDescription({ className, ...props }) {
12684
12806
  }
12685
12807
  function StepperSeparator({ className, ...props }) {
12686
12808
  const { orientation } = useStepperContext("StepperSeparator");
12687
- const registry = (0, import_react45.useContext)(StepperListRegistryContext);
12809
+ const registry = (0, import_react47.useContext)(StepperListRegistryContext);
12688
12810
  const state = registry?.takeSeparatorState() ?? "upcoming";
12689
12811
  const vertical = orientation === "vertical";
12690
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12812
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12691
12813
  "li",
12692
12814
  {
12693
12815
  "data-refineui": "stepper-separator",
@@ -12701,7 +12823,7 @@ function StepperSeparator({ className, ...props }) {
12701
12823
  className
12702
12824
  ),
12703
12825
  ...props,
12704
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
12826
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
12705
12827
  "span",
12706
12828
  {
12707
12829
  "data-refineui": "stepper-separator-rail",
@@ -12710,14 +12832,14 @@ function StepperSeparator({ className, ...props }) {
12710
12832
  vertical ? stepperStyles.separatorRailVertical : stepperStyles.separatorRailHorizontal
12711
12833
  ),
12712
12834
  children: [
12713
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12835
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12714
12836
  "span",
12715
12837
  {
12716
12838
  "data-refineui": "stepper-separator-track",
12717
12839
  className: stepperStyles.separatorTrack
12718
12840
  }
12719
12841
  ),
12720
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
12842
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12721
12843
  "span",
12722
12844
  {
12723
12845
  "data-refineui": "stepper-separator-fill",
@@ -12745,7 +12867,7 @@ StepperSeparator.displayName = "StepperSeparator";
12745
12867
 
12746
12868
  // src/components/Resizable/Resizable.tsx
12747
12869
  var import_clsx95 = require("clsx");
12748
- var import_react46 = require("react");
12870
+ var import_react48 = require("react");
12749
12871
 
12750
12872
  // src/components/Resizable/style.ts
12751
12873
  var import_clsx94 = require("clsx");
@@ -12780,15 +12902,15 @@ var resizableStyles = {
12780
12902
  };
12781
12903
 
12782
12904
  // src/components/Resizable/Resizable.tsx
12783
- var import_jsx_runtime69 = require("react/jsx-runtime");
12905
+ var import_jsx_runtime70 = require("react/jsx-runtime");
12784
12906
  var KEYBOARD_STEP = 2;
12785
12907
  var KEYBOARD_STEP_LARGE = 10;
12786
12908
  var DEFAULT_SIZE = 50;
12787
12909
  var DEFAULT_MIN_SIZE = 10;
12788
12910
  var DEFAULT_MAX_SIZE = 100;
12789
- var ResizableContext = (0, import_react46.createContext)(null);
12911
+ var ResizableContext = (0, import_react48.createContext)(null);
12790
12912
  function useResizableContext(component) {
12791
- const v = (0, import_react46.useContext)(ResizableContext);
12913
+ const v = (0, import_react48.useContext)(ResizableContext);
12792
12914
  if (!v) throw new Error(`${component} must be used within ResizablePanelGroup.`);
12793
12915
  return v;
12794
12916
  }
@@ -12847,13 +12969,13 @@ function ResizablePanelGroup({
12847
12969
  onLayout,
12848
12970
  ...props
12849
12971
  }) {
12850
- const groupRef = (0, import_react46.useRef)(null);
12851
- const panelsRef = (0, import_react46.useRef)(/* @__PURE__ */ new Map());
12852
- const orderCounterRef = (0, import_react46.useRef)(0);
12853
- const [sizes, setSizes] = (0, import_react46.useState)({});
12854
- const onLayoutRef = (0, import_react46.useRef)(onLayout);
12972
+ const groupRef = (0, import_react48.useRef)(null);
12973
+ const panelsRef = (0, import_react48.useRef)(/* @__PURE__ */ new Map());
12974
+ const orderCounterRef = (0, import_react48.useRef)(0);
12975
+ const [sizes, setSizes] = (0, import_react48.useState)({});
12976
+ const onLayoutRef = (0, import_react48.useRef)(onLayout);
12855
12977
  onLayoutRef.current = onLayout;
12856
- const syncInitialSizes = (0, import_react46.useCallback)(() => {
12978
+ const syncInitialSizes = (0, import_react48.useCallback)(() => {
12857
12979
  const panels = [...panelsRef.current.values()].sort((a, b) => a.order - b.order);
12858
12980
  if (panels.length === 0) return;
12859
12981
  setSizes((prev) => {
@@ -12888,7 +13010,7 @@ function ResizablePanelGroup({
12888
13010
  return base;
12889
13011
  });
12890
13012
  }, []);
12891
- const registerPanel = (0, import_react46.useCallback)(
13013
+ const registerPanel = (0, import_react48.useCallback)(
12892
13014
  (panel) => {
12893
13015
  const existing = panelsRef.current.get(panel.id);
12894
13016
  const order = existing?.order ?? orderCounterRef.current++;
@@ -12897,7 +13019,7 @@ function ResizablePanelGroup({
12897
13019
  },
12898
13020
  [syncInitialSizes]
12899
13021
  );
12900
- const unregisterPanel = (0, import_react46.useCallback)((id) => {
13022
+ const unregisterPanel = (0, import_react48.useCallback)((id) => {
12901
13023
  panelsRef.current.delete(id);
12902
13024
  setSizes((prev) => {
12903
13025
  if (!(id in prev)) return prev;
@@ -12906,13 +13028,13 @@ function ResizablePanelGroup({
12906
13028
  return next;
12907
13029
  });
12908
13030
  }, []);
12909
- const getPanel = (0, import_react46.useCallback)((id) => panelsRef.current.get(id), []);
12910
- const emitPanelResize = (0, import_react46.useCallback)((next) => {
13031
+ const getPanel = (0, import_react48.useCallback)((id) => panelsRef.current.get(id), []);
13032
+ const emitPanelResize = (0, import_react48.useCallback)((next) => {
12911
13033
  for (const [id, size] of Object.entries(next)) {
12912
13034
  panelsRef.current.get(id)?.onResize?.(size);
12913
13035
  }
12914
13036
  }, []);
12915
- const resizeBetween = (0, import_react46.useCallback)(
13037
+ const resizeBetween = (0, import_react48.useCallback)(
12916
13038
  (leftId, rightId, deltaPct) => {
12917
13039
  setSizes((prev) => {
12918
13040
  const next = applyResize(
@@ -12929,7 +13051,7 @@ function ResizablePanelGroup({
12929
13051
  },
12930
13052
  [emitPanelResize]
12931
13053
  );
12932
- const setBetween = (0, import_react46.useCallback)(
13054
+ const setBetween = (0, import_react48.useCallback)(
12933
13055
  (leftId, rightId, leftSize) => {
12934
13056
  setSizes((prev) => {
12935
13057
  const left = panelsRef.current.get(leftId);
@@ -12954,13 +13076,13 @@ function ResizablePanelGroup({
12954
13076
  },
12955
13077
  [emitPanelResize]
12956
13078
  );
12957
- (0, import_react46.useLayoutEffect)(() => {
13079
+ (0, import_react48.useLayoutEffect)(() => {
12958
13080
  const ids = orderedPanelIds(panelsRef.current);
12959
13081
  if (ids.length === 0) return;
12960
13082
  if (ids.some((id) => sizes[id] === void 0)) return;
12961
13083
  onLayoutRef.current?.(ids.map((id) => sizes[id]));
12962
13084
  }, [sizes]);
12963
- const ctx = (0, import_react46.useMemo)(
13085
+ const ctx = (0, import_react48.useMemo)(
12964
13086
  () => ({
12965
13087
  orientation,
12966
13088
  groupRef,
@@ -12981,7 +13103,7 @@ function ResizablePanelGroup({
12981
13103
  setBetween
12982
13104
  ]
12983
13105
  );
12984
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ResizableContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
13106
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ResizableContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
12985
13107
  "div",
12986
13108
  {
12987
13109
  ref: groupRef,
@@ -13009,11 +13131,11 @@ function ResizablePanel({
13009
13131
  onResize,
13010
13132
  ...props
13011
13133
  }) {
13012
- const id = (0, import_react46.useId)();
13134
+ const id = (0, import_react48.useId)();
13013
13135
  const { orientation, sizes, registerPanel, unregisterPanel } = useResizableContext("ResizablePanel");
13014
- const onResizeRef = (0, import_react46.useRef)(onResize);
13136
+ const onResizeRef = (0, import_react48.useRef)(onResize);
13015
13137
  onResizeRef.current = onResize;
13016
- (0, import_react46.useLayoutEffect)(() => {
13138
+ (0, import_react48.useLayoutEffect)(() => {
13017
13139
  registerPanel({
13018
13140
  id,
13019
13141
  defaultSize,
@@ -13040,7 +13162,7 @@ function ResizablePanel({
13040
13162
  flexBasis: 0,
13041
13163
  ...orientation === "horizontal" ? { minWidth: `${minSize}%` } : { minHeight: `${minSize}%` }
13042
13164
  };
13043
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
13165
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
13044
13166
  "div",
13045
13167
  {
13046
13168
  "data-refineui": "resizable-panel",
@@ -13071,11 +13193,11 @@ function ResizableHandle({
13071
13193
  resizeBetween,
13072
13194
  setBetween
13073
13195
  } = useResizableContext("ResizableHandle");
13074
- const handleRef = (0, import_react46.useRef)(null);
13075
- const [active, setActive] = (0, import_react46.useState)(false);
13076
- const [, setAdjacentReady] = (0, import_react46.useState)(false);
13077
- const dragRef = (0, import_react46.useRef)(null);
13078
- (0, import_react46.useLayoutEffect)(() => {
13196
+ const handleRef = (0, import_react48.useRef)(null);
13197
+ const [active, setActive] = (0, import_react48.useState)(false);
13198
+ const [, setAdjacentReady] = (0, import_react48.useState)(false);
13199
+ const dragRef = (0, import_react48.useRef)(null);
13200
+ (0, import_react48.useLayoutEffect)(() => {
13079
13201
  setAdjacentReady(true);
13080
13202
  }, []);
13081
13203
  const adjacent = handleRef.current ? findAdjacentPanelIds(handleRef.current) : { leftId: null, rightId: null };
@@ -13086,7 +13208,7 @@ function ResizableHandle({
13086
13208
  const ariaMin = leftPanel?.minSize ?? 0;
13087
13209
  const ariaMax = leftPanel?.maxSize ?? DEFAULT_MAX_SIZE;
13088
13210
  const defaultKeyshortcuts = orientation === "horizontal" ? "ArrowLeft ArrowRight Home End" : "ArrowUp ArrowDown Home End";
13089
- const keepFocus = (0, import_react46.useCallback)(() => {
13211
+ const keepFocus = (0, import_react48.useCallback)(() => {
13090
13212
  const el = handleRef.current;
13091
13213
  if (el && document.activeElement !== el) {
13092
13214
  el.focus({ preventScroll: true });
@@ -13185,7 +13307,7 @@ function ResizableHandle({
13185
13307
  resizeBetween(leftId, rightId, delta);
13186
13308
  queueMicrotask(keepFocus);
13187
13309
  };
13188
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
13310
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
13189
13311
  "div",
13190
13312
  {
13191
13313
  ref: handleRef,
@@ -13215,7 +13337,7 @@ function ResizableHandle({
13215
13337
  onPointerUp: handlePointerUp,
13216
13338
  onPointerCancel: handlePointerUp,
13217
13339
  onKeyDown: handleKeyDown,
13218
- children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
13340
+ children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
13219
13341
  "span",
13220
13342
  {
13221
13343
  "aria-hidden": true,
@@ -13231,7 +13353,7 @@ function ResizableHandle({
13231
13353
 
13232
13354
  // src/components/SpinButton/SpinButton.tsx
13233
13355
  var import_clsx96 = require("clsx");
13234
- var import_react47 = require("react");
13356
+ var import_react49 = require("react");
13235
13357
  var import_tokens29 = require("@refineui/tokens");
13236
13358
 
13237
13359
  // src/components/SpinButton/style.ts
@@ -13255,7 +13377,7 @@ var spinButtonShellClass = formControlShellHeightClass;
13255
13377
  var spinButtonValueTypo = formControlTypoClass;
13256
13378
 
13257
13379
  // src/components/SpinButton/SpinButton.tsx
13258
- var import_jsx_runtime70 = require("react/jsx-runtime");
13380
+ var import_jsx_runtime71 = require("react/jsx-runtime");
13259
13381
  function SpinButton({
13260
13382
  value,
13261
13383
  onChange,
@@ -13269,8 +13391,8 @@ function SpinButton({
13269
13391
  onKeyDown,
13270
13392
  ...props
13271
13393
  }) {
13272
- const [draftValue, setDraftValue] = (0, import_react47.useState)(String(value));
13273
- (0, import_react47.useEffect)(() => {
13394
+ const [draftValue, setDraftValue] = (0, import_react49.useState)(String(value));
13395
+ (0, import_react49.useEffect)(() => {
13274
13396
  setDraftValue(String(value));
13275
13397
  }, [value]);
13276
13398
  const clampValue2 = (next) => {
@@ -13358,7 +13480,7 @@ function SpinButton({
13358
13480
  const atMax = max !== void 0 && value >= max;
13359
13481
  const atMin = min !== void 0 && value <= min;
13360
13482
  const borderClass = disabled ? spinButtonStyles.borderDisabled : spinButtonStyles.borderDefault;
13361
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
13483
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
13362
13484
  "div",
13363
13485
  {
13364
13486
  role: "spinbutton",
@@ -13381,7 +13503,7 @@ function SpinButton({
13381
13503
  ...props,
13382
13504
  onKeyDown: handleKeyDown,
13383
13505
  children: [
13384
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
13506
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
13385
13507
  "div",
13386
13508
  {
13387
13509
  "aria-live": "polite",
@@ -13392,7 +13514,7 @@ function SpinButton({
13392
13514
  disabled ? spinButtonStyles.valueTextDisabled : spinButtonStyles.valueTextDefault,
13393
13515
  disabled ? spinButtonStyles.bgDisabled : spinButtonStyles.bgDefault
13394
13516
  ),
13395
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
13517
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
13396
13518
  "input",
13397
13519
  {
13398
13520
  type: "text",
@@ -13417,7 +13539,7 @@ function SpinButton({
13417
13539
  )
13418
13540
  }
13419
13541
  ),
13420
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
13542
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
13421
13543
  "div",
13422
13544
  {
13423
13545
  className: (0, import_clsx96.clsx)(
@@ -13425,7 +13547,7 @@ function SpinButton({
13425
13547
  disabled ? spinButtonStyles.bgDisabled : spinButtonStyles.bgDefault
13426
13548
  ),
13427
13549
  children: [
13428
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
13550
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
13429
13551
  "button",
13430
13552
  {
13431
13553
  type: "button",
@@ -13437,7 +13559,7 @@ function SpinButton({
13437
13559
  spinButtonStyles.stepButtonBase,
13438
13560
  disabled || atMax ? spinButtonStyles.stepButtonDisabled : spinButtonStyles.stepButtonEnabled
13439
13561
  ),
13440
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
13562
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
13441
13563
  WebIcon,
13442
13564
  {
13443
13565
  name: "chevron-up",
@@ -13449,7 +13571,7 @@ function SpinButton({
13449
13571
  )
13450
13572
  }
13451
13573
  ),
13452
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
13574
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
13453
13575
  "button",
13454
13576
  {
13455
13577
  type: "button",
@@ -13461,7 +13583,7 @@ function SpinButton({
13461
13583
  spinButtonStyles.stepButtonBase,
13462
13584
  disabled || atMin ? spinButtonStyles.stepButtonDisabled : spinButtonStyles.stepButtonEnabled
13463
13585
  ),
13464
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
13586
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
13465
13587
  WebIcon,
13466
13588
  {
13467
13589
  name: "chevron-down",
@@ -13483,7 +13605,7 @@ function SpinButton({
13483
13605
 
13484
13606
  // src/components/Toast/Toast.tsx
13485
13607
  var import_clsx98 = require("clsx");
13486
- var import_react48 = require("react");
13608
+ var import_react50 = require("react");
13487
13609
  var import_react_dom6 = require("react-dom");
13488
13610
  var import_tokens30 = require("@refineui/tokens");
13489
13611
  var import_animation7 = require("@refineui/utilities/animation");
@@ -13520,8 +13642,8 @@ var toastStyles = {
13520
13642
  };
13521
13643
 
13522
13644
  // src/components/Toast/Toast.tsx
13523
- var import_jsx_runtime71 = require("react/jsx-runtime");
13524
- var useIsomorphicLayoutEffect6 = typeof document !== "undefined" ? import_react48.useLayoutEffect : import_react48.useEffect;
13645
+ var import_jsx_runtime72 = require("react/jsx-runtime");
13646
+ var useIsomorphicLayoutEffect6 = typeof document !== "undefined" ? import_react50.useLayoutEffect : import_react50.useEffect;
13525
13647
  var ENTER_MS = 20;
13526
13648
  var LEAVE_MS = (0, import_animation7.motionMsToNumber)(componentTokens.toast.motion.leave) + 60;
13527
13649
  var DEFAULT_DURATION = 4200;
@@ -13557,7 +13679,7 @@ function subscribeToastStackGap(onChange) {
13557
13679
  return () => mq.removeEventListener("change", onChange);
13558
13680
  }
13559
13681
  function useToastStackGapPx() {
13560
- return (0, import_react48.useSyncExternalStore)(
13682
+ return (0, import_react50.useSyncExternalStore)(
13561
13683
  subscribeToastStackGap,
13562
13684
  readToastStackGapPx,
13563
13685
  () => gapPxFromSpacingToken(String(import_tokens30.spacings.sizeLarge))
@@ -13699,7 +13821,7 @@ var variantIconNames = {
13699
13821
  error: "error-circle",
13700
13822
  warning: "warning"
13701
13823
  };
13702
- var Toast = (0, import_react48.forwardRef)(function Toast2(props, ref) {
13824
+ var Toast = (0, import_react50.forwardRef)(function Toast2(props, ref) {
13703
13825
  const { variant = "default", message, iconName, icon, action, className, stackState, style, ...rest } = props;
13704
13826
  const domProps = { ...rest };
13705
13827
  delete domProps.iconName;
@@ -13708,7 +13830,7 @@ var Toast = (0, import_react48.forwardRef)(function Toast2(props, ref) {
13708
13830
  const liveRole = variant === "error" ? "alert" : "status";
13709
13831
  const ariaLive = variant === "error" ? void 0 : variant === "warning" ? "assertive" : "polite";
13710
13832
  const resolvedIconName = iconName ?? variantIconNames[variant];
13711
- const iconContent = icon ?? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
13833
+ const iconContent = icon ?? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
13712
13834
  WebIcon,
13713
13835
  {
13714
13836
  name: resolvedIconName,
@@ -13718,7 +13840,7 @@ var Toast = (0, import_react48.forwardRef)(function Toast2(props, ref) {
13718
13840
  }
13719
13841
  );
13720
13842
  const isPrimaryAction = !action || typeof action !== "object" || !("variant" in action) || action.variant === "primary";
13721
- const actionEl = typeof action === "object" && action !== null && "label" in action ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
13843
+ const actionEl = typeof action === "object" && action !== null && "label" in action ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
13722
13844
  Button,
13723
13845
  {
13724
13846
  variant: isPrimaryAction ? "primary" : "outline",
@@ -13734,7 +13856,7 @@ var Toast = (0, import_react48.forwardRef)(function Toast2(props, ref) {
13734
13856
  borderColor: (0, import_color12.resolveColorTokenValue)(color.border),
13735
13857
  color: (0, import_color12.resolveColorTokenValue)(color.message)
13736
13858
  };
13737
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
13859
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
13738
13860
  "div",
13739
13861
  {
13740
13862
  ref,
@@ -13747,20 +13869,20 @@ var Toast = (0, import_react48.forwardRef)(function Toast2(props, ref) {
13747
13869
  style: { ...tokenStyle, ...style },
13748
13870
  className: (0, import_clsx98.clsx)(toastStyles.card, className),
13749
13871
  children: [
13750
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { "data-refineui": "toast-icon", className: toastStyles.iconWrap, children: iconContent }),
13751
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: toastStyles.contentWrap, children: message != null && message !== "" ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: toastStyles.message, children: message }) : null }),
13872
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { "data-refineui": "toast-icon", className: toastStyles.iconWrap, children: iconContent }),
13873
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: toastStyles.contentWrap, children: message != null && message !== "" ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: toastStyles.message, children: message }) : null }),
13752
13874
  action != null && actionEl
13753
13875
  ]
13754
13876
  }
13755
13877
  );
13756
13878
  });
13757
13879
  function SwipeableToast({ record, index, swipeDirections, onSwipeStart, onSwipeEnd }) {
13758
- const toastRef = (0, import_react48.useRef)(null);
13759
- const dragStartRef = (0, import_react48.useRef)(null);
13760
- const axisRef = (0, import_react48.useRef)(null);
13761
- const offsetRef = (0, import_react48.useRef)({ x: 0, y: 0 });
13762
- const [swiping, setSwiping] = (0, import_react48.useState)(false);
13763
- const clearSwipeOffset = (0, import_react48.useCallback)(() => {
13880
+ const toastRef = (0, import_react50.useRef)(null);
13881
+ const dragStartRef = (0, import_react50.useRef)(null);
13882
+ const axisRef = (0, import_react50.useRef)(null);
13883
+ const offsetRef = (0, import_react50.useRef)({ x: 0, y: 0 });
13884
+ const [swiping, setSwiping] = (0, import_react50.useState)(false);
13885
+ const clearSwipeOffset = (0, import_react50.useCallback)(() => {
13764
13886
  const el = toastRef.current;
13765
13887
  offsetRef.current = { x: 0, y: 0 };
13766
13888
  if (!el) return;
@@ -13835,7 +13957,7 @@ function SwipeableToast({ record, index, swipeDirections, onSwipeStart, onSwipeE
13835
13957
  clearSwipeOffset();
13836
13958
  onSwipeEnd();
13837
13959
  };
13838
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
13960
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
13839
13961
  Toast,
13840
13962
  {
13841
13963
  ref: toastRef,
@@ -13861,8 +13983,8 @@ function Toaster({
13861
13983
  swipeDirections,
13862
13984
  className
13863
13985
  }) {
13864
- const toasterKeyRef = (0, import_react48.useRef)(/* @__PURE__ */ Symbol("refineui-toaster"));
13865
- const isPortalOwner = (0, import_react48.useSyncExternalStore)(
13986
+ const toasterKeyRef = (0, import_react50.useRef)(/* @__PURE__ */ Symbol("refineui-toaster"));
13987
+ const isPortalOwner = (0, import_react50.useSyncExternalStore)(
13866
13988
  (onStoreChange) => {
13867
13989
  toasterOwnerListeners.add(onStoreChange);
13868
13990
  return () => toasterOwnerListeners.delete(onStoreChange);
@@ -13870,12 +13992,12 @@ function Toaster({
13870
13992
  () => activeToasterKey === toasterKeyRef.current,
13871
13993
  () => false
13872
13994
  );
13873
- const [records, setRecords] = (0, import_react48.useState)([]);
13874
- const timerMapRef = (0, import_react48.useRef)({});
13875
- const pausedRef = (0, import_react48.useRef)(/* @__PURE__ */ new Set());
13876
- const rootRef = (0, import_react48.useRef)(null);
13877
- const itemRefs = (0, import_react48.useRef)({});
13878
- const [layoutTick, setLayoutTick] = (0, import_react48.useState)(0);
13995
+ const [records, setRecords] = (0, import_react50.useState)([]);
13996
+ const timerMapRef = (0, import_react50.useRef)({});
13997
+ const pausedRef = (0, import_react50.useRef)(/* @__PURE__ */ new Set());
13998
+ const rootRef = (0, import_react50.useRef)(null);
13999
+ const itemRefs = (0, import_react50.useRef)({});
14000
+ const [layoutTick, setLayoutTick] = (0, import_react50.useState)(0);
13879
14001
  const stackGapPx = useToastStackGapPx();
13880
14002
  const resolvedSwipe = swipeDirections ?? DEFAULT_SWIPE_DIRECTIONS;
13881
14003
  useIsomorphicLayoutEffect6(() => {
@@ -13889,13 +14011,13 @@ function Toaster({
13889
14011
  }
13890
14012
  };
13891
14013
  }, []);
13892
- (0, import_react48.useEffect)(() => {
14014
+ (0, import_react50.useEffect)(() => {
13893
14015
  if (!isPortalOwner) return;
13894
14016
  return subscribeToasts((next) => {
13895
14017
  setRecords(next.slice(0, Math.max(1, maxToasts)));
13896
14018
  });
13897
14019
  }, [isPortalOwner, maxToasts]);
13898
- (0, import_react48.useEffect)(() => {
14020
+ (0, import_react50.useEffect)(() => {
13899
14021
  if (!isPortalOwner) return;
13900
14022
  for (const rec of records) {
13901
14023
  if (rec.phase === "leaving") continue;
@@ -13917,7 +14039,7 @@ function Toaster({
13917
14039
  }
13918
14040
  }
13919
14041
  }, [isPortalOwner, records]);
13920
- (0, import_react48.useEffect)(() => {
14042
+ (0, import_react50.useEffect)(() => {
13921
14043
  return () => {
13922
14044
  for (const handle of Object.values(timerMapRef.current)) {
13923
14045
  clearTimeout(handle);
@@ -13943,7 +14065,7 @@ function Toaster({
13943
14065
  li.style.height = `${slotHeight(idx)}px`;
13944
14066
  }
13945
14067
  }, [isPortalOwner, layoutTick, records, stackGapPx]);
13946
- (0, import_react48.useEffect)(() => {
14068
+ (0, import_react50.useEffect)(() => {
13947
14069
  if (!isPortalOwner) return;
13948
14070
  const root = rootRef.current;
13949
14071
  if (!root) return;
@@ -13977,7 +14099,7 @@ function Toaster({
13977
14099
  return null;
13978
14100
  }
13979
14101
  return (0, import_react_dom6.createPortal)(
13980
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
14102
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
13981
14103
  "ol",
13982
14104
  {
13983
14105
  ref: rootRef,
@@ -13988,7 +14110,7 @@ function Toaster({
13988
14110
  style: {
13989
14111
  ["--refineui-toast-gap"]: `${stackGapPx}px`
13990
14112
  },
13991
- children: records.map((rec, index) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
14113
+ children: records.map((rec, index) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
13992
14114
  "li",
13993
14115
  {
13994
14116
  ref: (node) => {
@@ -14002,7 +14124,7 @@ function Toaster({
14002
14124
  ["--refineui-toast-z-index"]: String(STACK_Z_BASE - index),
14003
14125
  ["--refineui-toast-stack-index"]: String(index)
14004
14126
  },
14005
- children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { "data-refineui": "toast-scale-layer", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
14127
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { "data-refineui": "toast-scale-layer", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
14006
14128
  SwipeableToast,
14007
14129
  {
14008
14130
  record: rec,
@@ -14023,21 +14145,21 @@ function Toaster({
14023
14145
 
14024
14146
  // src/components/Tree/Tree.tsx
14025
14147
  var import_clsx100 = require("clsx");
14026
- var import_react50 = require("react");
14148
+ var import_react52 = require("react");
14027
14149
 
14028
14150
  // src/components/Tree/context.ts
14029
- var import_react49 = require("react");
14151
+ var import_react51 = require("react");
14030
14152
  var import_tokens31 = require("@refineui/tokens");
14031
14153
  var import_animation8 = require("@refineui/utilities/animation");
14032
14154
  var TREE_PANEL_MS = Number.parseFloat(import_tokens31.semanticInteraction.duration.accordionPanel) / 1e3;
14033
14155
  var TREE_CONTENT_MS = Number.parseFloat(import_tokens31.semanticInteraction.duration.accordionContent) / 1e3;
14034
14156
  var TREE_PANEL_EASE = import_tokens31.semanticInteraction.easing.panel;
14035
14157
  var TREE_CONTENT_EASE = import_tokens31.semanticInteraction.easing.content;
14036
- var TreeContext = (0, import_react49.createContext)(null);
14037
- var TreeItemContext = (0, import_react49.createContext)(null);
14158
+ var TreeContext = (0, import_react51.createContext)(null);
14159
+ var TreeItemContext = (0, import_react51.createContext)(null);
14038
14160
  function usePrefersReducedMotion2() {
14039
- const [reduce, setReduce] = (0, import_react49.useState)(false);
14040
- (0, import_react49.useEffect)(() => {
14161
+ const [reduce, setReduce] = (0, import_react51.useState)(false);
14162
+ (0, import_react51.useEffect)(() => {
14041
14163
  const mql = window.matchMedia((0, import_animation8.getReducedMotionQuery)().replace("@media ", ""));
14042
14164
  const sync = () => setReduce(mql.matches);
14043
14165
  sync();
@@ -14092,7 +14214,7 @@ var treeItemTypo = {
14092
14214
  };
14093
14215
 
14094
14216
  // src/components/Tree/Tree.tsx
14095
- var import_jsx_runtime72 = require("react/jsx-runtime");
14217
+ var import_jsx_runtime73 = require("react/jsx-runtime");
14096
14218
  function Tree({
14097
14219
  size = "md",
14098
14220
  defaultExpanded,
@@ -14106,29 +14228,29 @@ function Tree({
14106
14228
  ...props
14107
14229
  }) {
14108
14230
  const reduceMotion = usePrefersReducedMotion2();
14109
- const [uncontrolledExpanded, setUncontrolledExpanded] = (0, import_react50.useState)(() => toExpandedSet(defaultExpanded));
14110
- const [uncontrolledSelected, setUncontrolledSelected] = (0, import_react50.useState)(defaultSelected ?? null);
14231
+ const [uncontrolledExpanded, setUncontrolledExpanded] = (0, import_react52.useState)(() => toExpandedSet(defaultExpanded));
14232
+ const [uncontrolledSelected, setUncontrolledSelected] = (0, import_react52.useState)(defaultSelected ?? null);
14111
14233
  const expanded = expandedProp === void 0 ? uncontrolledExpanded : toExpandedSet(expandedProp);
14112
14234
  const selected = selectedProp === void 0 ? uncontrolledSelected : selectedProp;
14113
- const orderRef = (0, import_react50.useRef)([]);
14114
- const elMapRef = (0, import_react50.useRef)(/* @__PURE__ */ new Map());
14115
- const metaMapRef = (0, import_react50.useRef)(/* @__PURE__ */ new Map());
14116
- const emitExpanded = (0, import_react50.useCallback)(
14235
+ const orderRef = (0, import_react52.useRef)([]);
14236
+ const elMapRef = (0, import_react52.useRef)(/* @__PURE__ */ new Map());
14237
+ const metaMapRef = (0, import_react52.useRef)(/* @__PURE__ */ new Map());
14238
+ const emitExpanded = (0, import_react52.useCallback)(
14117
14239
  (next) => {
14118
14240
  if (expandedProp === void 0) setUncontrolledExpanded(next);
14119
14241
  onExpandedChange?.(Array.from(next));
14120
14242
  },
14121
14243
  [expandedProp, onExpandedChange]
14122
14244
  );
14123
- const emitSelected = (0, import_react50.useCallback)(
14245
+ const emitSelected = (0, import_react52.useCallback)(
14124
14246
  (next) => {
14125
14247
  if (selectedProp === void 0) setUncontrolledSelected(next);
14126
14248
  onSelectedChange?.(next);
14127
14249
  },
14128
14250
  [onSelectedChange, selectedProp]
14129
14251
  );
14130
- const isExpanded = (0, import_react50.useCallback)((value) => expanded.has(value), [expanded]);
14131
- const toggleExpanded = (0, import_react50.useCallback)(
14252
+ const isExpanded = (0, import_react52.useCallback)((value) => expanded.has(value), [expanded]);
14253
+ const toggleExpanded = (0, import_react52.useCallback)(
14132
14254
  (value) => {
14133
14255
  const next = new Set(expanded);
14134
14256
  if (next.has(value)) next.delete(value);
@@ -14137,7 +14259,7 @@ function Tree({
14137
14259
  },
14138
14260
  [emitExpanded, expanded]
14139
14261
  );
14140
- const expand = (0, import_react50.useCallback)(
14262
+ const expand = (0, import_react52.useCallback)(
14141
14263
  (value) => {
14142
14264
  if (expanded.has(value)) return;
14143
14265
  const next = new Set(expanded);
@@ -14146,7 +14268,7 @@ function Tree({
14146
14268
  },
14147
14269
  [emitExpanded, expanded]
14148
14270
  );
14149
- const collapse = (0, import_react50.useCallback)(
14271
+ const collapse = (0, import_react52.useCallback)(
14150
14272
  (value) => {
14151
14273
  if (!expanded.has(value)) return;
14152
14274
  const next = new Set(expanded);
@@ -14155,13 +14277,13 @@ function Tree({
14155
14277
  },
14156
14278
  [emitExpanded, expanded]
14157
14279
  );
14158
- const select = (0, import_react50.useCallback)(
14280
+ const select = (0, import_react52.useCallback)(
14159
14281
  (value) => {
14160
14282
  emitSelected(value);
14161
14283
  },
14162
14284
  [emitSelected]
14163
14285
  );
14164
- const registerItem = (0, import_react50.useCallback)((value, el, meta) => {
14286
+ const registerItem = (0, import_react52.useCallback)((value, el, meta) => {
14165
14287
  metaMapRef.current.set(value, meta);
14166
14288
  if (!orderRef.current.includes(value)) {
14167
14289
  orderRef.current.push(value);
@@ -14173,10 +14295,10 @@ function Tree({
14173
14295
  orderRef.current = orderRef.current.filter((v) => v !== value);
14174
14296
  }
14175
14297
  }, []);
14176
- const focusItem = (0, import_react50.useCallback)((value) => {
14298
+ const focusItem = (0, import_react52.useCallback)((value) => {
14177
14299
  elMapRef.current.get(value)?.focus();
14178
14300
  }, []);
14179
- const visibleValues = (0, import_react50.useCallback)(() => {
14301
+ const visibleValues = (0, import_react52.useCallback)(() => {
14180
14302
  const result = [];
14181
14303
  const walk = (parent) => {
14182
14304
  for (const value of orderRef.current) {
@@ -14190,7 +14312,7 @@ function Tree({
14190
14312
  walk(null);
14191
14313
  return result;
14192
14314
  }, [expanded]);
14193
- const focusByDelta = (0, import_react50.useCallback)(
14315
+ const focusByDelta = (0, import_react52.useCallback)(
14194
14316
  (currentValue, delta) => {
14195
14317
  const list = visibleValues();
14196
14318
  const idx = list.indexOf(currentValue);
@@ -14200,17 +14322,17 @@ function Tree({
14200
14322
  },
14201
14323
  [focusItem, visibleValues]
14202
14324
  );
14203
- const focusFirst = (0, import_react50.useCallback)(() => {
14325
+ const focusFirst = (0, import_react52.useCallback)(() => {
14204
14326
  const list = visibleValues();
14205
14327
  if (list[0]) focusItem(list[0]);
14206
14328
  }, [focusItem, visibleValues]);
14207
- const focusLast = (0, import_react50.useCallback)(() => {
14329
+ const focusLast = (0, import_react52.useCallback)(() => {
14208
14330
  const list = visibleValues();
14209
14331
  const last = list[list.length - 1];
14210
14332
  if (last) focusItem(last);
14211
14333
  }, [focusItem, visibleValues]);
14212
- const getParent = (0, import_react50.useCallback)((value) => metaMapRef.current.get(value)?.parentValue ?? null, []);
14213
- const contextValue = (0, import_react50.useMemo)(
14334
+ const getParent = (0, import_react52.useCallback)((value) => metaMapRef.current.get(value)?.parentValue ?? null, []);
14335
+ const contextValue = (0, import_react52.useMemo)(
14214
14336
  () => ({
14215
14337
  size,
14216
14338
  isExpanded,
@@ -14244,7 +14366,7 @@ function Tree({
14244
14366
  toggleExpanded
14245
14367
  ]
14246
14368
  );
14247
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(TreeContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
14369
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TreeContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
14248
14370
  "ul",
14249
14371
  {
14250
14372
  "data-refineui": "tree",
@@ -14258,21 +14380,21 @@ function Tree({
14258
14380
 
14259
14381
  // src/components/Tree/TreeItem.tsx
14260
14382
  var import_clsx101 = require("clsx");
14261
- var import_react51 = require("react");
14262
- var import_jsx_runtime73 = require("react/jsx-runtime");
14383
+ var import_react53 = require("react");
14384
+ var import_jsx_runtime74 = require("react/jsx-runtime");
14263
14385
  function TreeItem({ value, disabled = false, className, children, ...props }) {
14264
- const tree = (0, import_react51.useContext)(TreeContext);
14265
- const parent = (0, import_react51.useContext)(TreeItemContext);
14386
+ const tree = (0, import_react53.useContext)(TreeContext);
14387
+ const parent = (0, import_react53.useContext)(TreeItemContext);
14266
14388
  if (!tree) throw new Error("TreeItem must be used within Tree.");
14267
- const [hasBranch, setHasBranch] = (0, import_react51.useState)(false);
14268
- const uid = (0, import_react51.useId)().replace(/:/g, "");
14389
+ const [hasBranch, setHasBranch] = (0, import_react53.useState)(false);
14390
+ const uid = (0, import_react53.useId)().replace(/:/g, "");
14269
14391
  const depth = parent ? parent.depth + 1 : 0;
14270
14392
  const parentValue = parent?.value ?? null;
14271
14393
  const expanded = tree.isExpanded(value);
14272
14394
  const selected = tree.selected === value;
14273
14395
  const triggerId = `tree-trigger-${uid}-${value}`;
14274
14396
  const groupId = `tree-group-${uid}-${value}`;
14275
- const itemContext = (0, import_react51.useMemo)(
14397
+ const itemContext = (0, import_react53.useMemo)(
14276
14398
  () => ({
14277
14399
  value,
14278
14400
  depth,
@@ -14287,7 +14409,7 @@ function TreeItem({ value, disabled = false, className, children, ...props }) {
14287
14409
  }),
14288
14410
  [value, depth, parentValue, expanded, selected, disabled, hasBranch, triggerId, groupId]
14289
14411
  );
14290
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TreeItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
14412
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TreeItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
14291
14413
  "li",
14292
14414
  {
14293
14415
  "data-refineui": "tree-item",
@@ -14308,18 +14430,18 @@ function TreeItem({ value, disabled = false, className, children, ...props }) {
14308
14430
 
14309
14431
  // src/components/Tree/TreeItemTrigger.tsx
14310
14432
  var import_clsx102 = require("clsx");
14311
- var import_react52 = require("react");
14312
- var import_jsx_runtime74 = require("react/jsx-runtime");
14433
+ var import_react54 = require("react");
14434
+ var import_jsx_runtime75 = require("react/jsx-runtime");
14313
14435
  function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props }) {
14314
- const tree = (0, import_react52.useContext)(TreeContext);
14315
- const item = (0, import_react52.useContext)(TreeItemContext);
14436
+ const tree = (0, import_react54.useContext)(TreeContext);
14437
+ const item = (0, import_react54.useContext)(TreeItemContext);
14316
14438
  if (!tree || !item) throw new Error("TreeItemTrigger must be used within TreeItem.");
14317
14439
  const iconSize = treeIconSize[tree.size];
14318
14440
  const depthIndent = "calc(var(--refineui-spacing-size-large) + var(--refineui-spacing-size-x-small))";
14319
14441
  const mainStyle = {
14320
14442
  paddingInlineStart: item.depth > 0 ? `calc(${depthIndent} * ${item.depth})` : void 0
14321
14443
  };
14322
- (0, import_react52.useEffect)(() => {
14444
+ (0, import_react54.useEffect)(() => {
14323
14445
  return () => {
14324
14446
  tree.registerItem(item.value, null, {
14325
14447
  parentValue: item.parentValue,
@@ -14395,7 +14517,7 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14395
14517
  break;
14396
14518
  }
14397
14519
  };
14398
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
14520
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
14399
14521
  "div",
14400
14522
  {
14401
14523
  ref: setRowRef,
@@ -14414,8 +14536,8 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14414
14536
  className
14415
14537
  ),
14416
14538
  ...props,
14417
- children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { "data-refineui": "tree-item-main", className: treeStyles.rowMain, style: mainStyle, children: [
14418
- item.hasBranch ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
14539
+ children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { "data-refineui": "tree-item-main", className: treeStyles.rowMain, style: mainStyle, children: [
14540
+ item.hasBranch ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
14419
14541
  "button",
14420
14542
  {
14421
14543
  type: "button",
@@ -14429,10 +14551,10 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14429
14551
  item.expanded && treeStyles.chevronExpanded,
14430
14552
  tree.reduceMotion && "transition-none"
14431
14553
  ),
14432
- children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(WebIcon, { name: "chevron-right", size: iconSize, color: "currentColor", fallback: "\u203A" })
14554
+ children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(WebIcon, { name: "chevron-right", size: iconSize, color: "currentColor", fallback: "\u203A" })
14433
14555
  }
14434
- ) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: treeStyles.chevronSpacer, "aria-hidden": "true" }),
14435
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: treeStyles.label, children })
14556
+ ) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: treeStyles.chevronSpacer, "aria-hidden": "true" }),
14557
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: treeStyles.label, children })
14436
14558
  ] })
14437
14559
  }
14438
14560
  );
@@ -14440,14 +14562,14 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14440
14562
 
14441
14563
  // src/components/Tree/TreeItemContent.tsx
14442
14564
  var import_clsx103 = require("clsx");
14443
- var import_react53 = require("react");
14444
- var import_jsx_runtime75 = require("react/jsx-runtime");
14565
+ var import_react55 = require("react");
14566
+ var import_jsx_runtime76 = require("react/jsx-runtime");
14445
14567
  function TreeItemContent({ className, children, ...props }) {
14446
- const tree = (0, import_react53.useContext)(TreeContext);
14447
- const item = (0, import_react53.useContext)(TreeItemContext);
14568
+ const tree = (0, import_react55.useContext)(TreeContext);
14569
+ const item = (0, import_react55.useContext)(TreeItemContext);
14448
14570
  if (!tree || !item) throw new Error("TreeItemContent must be used within TreeItem.");
14449
14571
  const { setHasBranch, expanded, groupId, triggerId } = item;
14450
- (0, import_react53.useLayoutEffect)(() => {
14572
+ (0, import_react55.useLayoutEffect)(() => {
14451
14573
  setHasBranch(true);
14452
14574
  return () => setHasBranch(false);
14453
14575
  }, [setHasBranch]);
@@ -14462,7 +14584,7 @@ function TreeItemContent({ className, children, ...props }) {
14462
14584
  transition: tree.reduceMotion ? void 0 : `opacity ${TREE_CONTENT_MS}s ${TREE_CONTENT_EASE}, transform ${TREE_CONTENT_MS}s ${TREE_CONTENT_EASE}`,
14463
14585
  pointerEvents: expanded ? void 0 : "none"
14464
14586
  };
14465
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
14587
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
14466
14588
  "div",
14467
14589
  {
14468
14590
  ref: (el) => {
@@ -14473,7 +14595,7 @@ function TreeItemContent({ className, children, ...props }) {
14473
14595
  "data-refineui": "tree-item-panel",
14474
14596
  "aria-hidden": !expanded,
14475
14597
  style: gridStyle,
14476
- children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: treeStyles.panel, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: treeStyles.panelInner, style: innerMotionStyle, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
14598
+ children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: treeStyles.panel, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: treeStyles.panelInner, style: innerMotionStyle, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
14477
14599
  "ul",
14478
14600
  {
14479
14601
  id: groupId,
@@ -14491,9 +14613,9 @@ function TreeItemContent({ className, children, ...props }) {
14491
14613
 
14492
14614
  // src/components/Tooltip/Tooltip.tsx
14493
14615
  var import_clsx105 = require("clsx");
14494
- var import_react54 = require("react");
14616
+ var import_react56 = require("react");
14495
14617
  var import_color13 = require("@refineui/utilities/color");
14496
- var import_react55 = require("@refineui/utilities/react");
14618
+ var import_react57 = require("@refineui/utilities/react");
14497
14619
 
14498
14620
  // src/components/Tooltip/style.ts
14499
14621
  var import_tokens33 = require("@refineui/tokens");
@@ -14597,7 +14719,7 @@ function tooltipBeakRotateDeg(position) {
14597
14719
  }
14598
14720
 
14599
14721
  // src/components/Tooltip/Tooltip.tsx
14600
- var import_jsx_runtime76 = require("react/jsx-runtime");
14722
+ var import_jsx_runtime77 = require("react/jsx-runtime");
14601
14723
  function Tooltip({
14602
14724
  trigger,
14603
14725
  content,
@@ -14610,10 +14732,10 @@ function Tooltip({
14610
14732
  className,
14611
14733
  ...props
14612
14734
  }) {
14613
- const [innerOpen, setInnerOpen] = (0, import_react54.useState)(defaultOpen);
14735
+ const [innerOpen, setInnerOpen] = (0, import_react56.useState)(defaultOpen);
14614
14736
  const open = ctrlOpen !== void 0 ? ctrlOpen : innerOpen;
14615
- const tooltipId = (0, import_react54.useId)();
14616
- const showTimer = (0, import_react54.useRef)(null);
14737
+ const tooltipId = (0, import_react56.useId)();
14738
+ const showTimer = (0, import_react56.useRef)(null);
14617
14739
  const setOpen = (next) => {
14618
14740
  if (ctrlOpen === void 0) setInnerOpen(next);
14619
14741
  onOpenChange?.(next);
@@ -14640,11 +14762,11 @@ function Tooltip({
14640
14762
  const beakWrapStyle = tooltipBeakWrapperStyle(position, align);
14641
14763
  const beakRot = tooltipBeakRotateDeg(position);
14642
14764
  const describedBy = open ? tooltipId : void 0;
14643
- const mergeEl = (0, import_react55.getMergeableTriggerChild)(trigger);
14765
+ const mergeEl = (0, import_react57.getMergeableTriggerChild)(trigger);
14644
14766
  let triggerNode;
14645
14767
  if (mergeEl != null) {
14646
- triggerNode = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
14647
- import_react55.Slot,
14768
+ triggerNode = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14769
+ import_react57.Slot,
14648
14770
  {
14649
14771
  "aria-describedby": describedBy,
14650
14772
  onMouseEnter: scheduleShow,
@@ -14660,7 +14782,7 @@ function Tooltip({
14660
14782
  }
14661
14783
  );
14662
14784
  } else {
14663
- triggerNode = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
14785
+ triggerNode = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14664
14786
  "span",
14665
14787
  {
14666
14788
  tabIndex: 0,
@@ -14677,16 +14799,16 @@ function Tooltip({
14677
14799
  }
14678
14800
  );
14679
14801
  }
14680
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { "data-refineui": "tooltip", className: (0, import_clsx105.clsx)(tooltipStyles.root, className), ...props, children: [
14802
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { "data-refineui": "tooltip", className: (0, import_clsx105.clsx)(tooltipStyles.root, className), ...props, children: [
14681
14803
  triggerNode,
14682
- open && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: tooltipStyles.floating, style: floatingStyle, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: tooltipStyles.panelWrap, children: [
14683
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
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)(
14684
14806
  "div",
14685
14807
  {
14686
14808
  className: tooltipStyles.beakWrap,
14687
14809
  style: { ...beakWrapStyle, width: TOOLTIP_BEAK_W, height: TOOLTIP_BEAK_H },
14688
14810
  "aria-hidden": true,
14689
- children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
14811
+ children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14690
14812
  "div",
14691
14813
  {
14692
14814
  style: {
@@ -14695,7 +14817,7 @@ function Tooltip({
14695
14817
  transform: `rotate(${beakRot}deg)`,
14696
14818
  transformOrigin: "center center"
14697
14819
  },
14698
- children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
14820
+ children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
14699
14821
  "svg",
14700
14822
  {
14701
14823
  width: TOOLTIP_BEAK_W,
@@ -14705,8 +14827,8 @@ function Tooltip({
14705
14827
  xmlns: "http://www.w3.org/2000/svg",
14706
14828
  style: { display: "block" },
14707
14829
  children: [
14708
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
14709
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("polygon", { points: "8,2 2,8 14,8", fill: bg })
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 })
14710
14832
  ]
14711
14833
  }
14712
14834
  )
@@ -14714,7 +14836,7 @@ function Tooltip({
14714
14836
  )
14715
14837
  }
14716
14838
  ),
14717
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
14839
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14718
14840
  "div",
14719
14841
  {
14720
14842
  id: tooltipId,
@@ -14737,7 +14859,7 @@ function Tooltip({
14737
14859
 
14738
14860
  // src/components/Chart/Chart.tsx
14739
14861
  var import_clsx107 = require("clsx");
14740
- var import_react56 = require("react");
14862
+ var import_react58 = require("react");
14741
14863
  var import_tokens35 = require("@refineui/tokens");
14742
14864
  var import_color14 = require("@refineui/utilities/color");
14743
14865
 
@@ -14964,10 +15086,10 @@ function formatAxisTick(value) {
14964
15086
  }
14965
15087
 
14966
15088
  // src/components/Chart/Chart.tsx
14967
- var import_jsx_runtime77 = require("react/jsx-runtime");
14968
- var ChartContext = (0, import_react56.createContext)(null);
15089
+ var import_jsx_runtime78 = require("react/jsx-runtime");
15090
+ var ChartContext = (0, import_react58.createContext)(null);
14969
15091
  function useChartContext(component) {
14970
- const value = (0, import_react56.useContext)(ChartContext);
15092
+ const value = (0, import_react58.useContext)(ChartContext);
14971
15093
  if (!value) throw new Error(`${component} must be used within Chart.`);
14972
15094
  return value;
14973
15095
  }
@@ -14997,15 +15119,15 @@ function itemState(index, hoverIndex, selectedIndex) {
14997
15119
  return "default";
14998
15120
  }
14999
15121
  function isChartTooltipElement(node) {
15000
- return (0, import_react56.isValidElement)(node) && node.type === ChartTooltip;
15122
+ return (0, import_react58.isValidElement)(node) && node.type === ChartTooltip;
15001
15123
  }
15002
15124
  function Chart({ className, children, ...props }) {
15003
- const [hoverIndex, setHoverIndex] = (0, import_react56.useState)(null);
15004
- const [selectedIndex, setSelectedIndex] = (0, import_react56.useState)(null);
15005
- const [pointer, setPointer] = (0, import_react56.useState)(null);
15006
- const [labels, setLabels] = (0, import_react56.useState)([]);
15007
- const [series, setSeries] = (0, import_react56.useState)(null);
15008
- const context = (0, import_react56.useMemo)(
15125
+ const [hoverIndex, setHoverIndex] = (0, import_react58.useState)(null);
15126
+ const [selectedIndex, setSelectedIndex] = (0, import_react58.useState)(null);
15127
+ const [pointer, setPointer] = (0, import_react58.useState)(null);
15128
+ const [labels, setLabels] = (0, import_react58.useState)([]);
15129
+ const [series, setSeries] = (0, import_react58.useState)(null);
15130
+ const context = (0, import_react58.useMemo)(
15009
15131
  () => ({
15010
15132
  hoverIndex,
15011
15133
  selectedIndex,
@@ -15020,7 +15142,7 @@ function Chart({ className, children, ...props }) {
15020
15142
  }),
15021
15143
  [hoverIndex, selectedIndex, pointer, labels, series]
15022
15144
  );
15023
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ChartContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15145
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ChartContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15024
15146
  "div",
15025
15147
  {
15026
15148
  "data-refineui": "chart",
@@ -15031,7 +15153,7 @@ function Chart({ className, children, ...props }) {
15031
15153
  ) });
15032
15154
  }
15033
15155
  function ChartBody({ className, ...props }) {
15034
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15156
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15035
15157
  "div",
15036
15158
  {
15037
15159
  "data-refineui": "chart-body",
@@ -15041,7 +15163,7 @@ function ChartBody({ className, ...props }) {
15041
15163
  );
15042
15164
  }
15043
15165
  function ChartContent({ className, ...props }) {
15044
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15166
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15045
15167
  "div",
15046
15168
  {
15047
15169
  "data-refineui": "chart-content",
@@ -15066,7 +15188,7 @@ function ChartHitArea() {
15066
15188
  setHoverIndex(hoverIndexFromPlotX(next.x, count, series.align));
15067
15189
  return next;
15068
15190
  };
15069
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15191
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15070
15192
  "rect",
15071
15193
  {
15072
15194
  "data-refineui": "chart-hit-area",
@@ -15100,11 +15222,11 @@ function ChartPlot({
15100
15222
  const { pointer, selectedIndex } = useChartContext("ChartPlot");
15101
15223
  const svgChildren = [];
15102
15224
  const tooltipNodes = [];
15103
- import_react56.Children.forEach(children, (child) => {
15225
+ import_react58.Children.forEach(children, (child) => {
15104
15226
  if (isChartTooltipElement(child)) tooltipNodes.push(child);
15105
15227
  else svgChildren.push(child);
15106
15228
  });
15107
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
15229
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
15108
15230
  "div",
15109
15231
  {
15110
15232
  "data-refineui": "chart-plot-frame",
@@ -15113,7 +15235,7 @@ function ChartPlot({
15113
15235
  className: (0, import_clsx107.clsx)(chartStyles.plotFrame, className),
15114
15236
  ...props,
15115
15237
  children: [
15116
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
15238
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
15117
15239
  "svg",
15118
15240
  {
15119
15241
  "data-refineui": "chart-plot",
@@ -15124,7 +15246,7 @@ function ChartPlot({
15124
15246
  className: chartStyles.plot,
15125
15247
  children: [
15126
15248
  svgChildren,
15127
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ChartHitArea, {})
15249
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ChartHitArea, {})
15128
15250
  ]
15129
15251
  }
15130
15252
  ),
@@ -15142,7 +15264,7 @@ function ChartTooltip({ className, children, style, ...props }) {
15142
15264
  const flipY = pointer.y < CHART_PLOT_PADDING_TOP + plotHeight() * CHART_TOOLTIP_FLIP_Y;
15143
15265
  const offsetX = flipX ? "calc(-100% - var(--refineui-spacing-size-small))" : "var(--refineui-spacing-size-small)";
15144
15266
  const offsetY = flipY ? "var(--refineui-spacing-size-small)" : "calc(-100% - var(--refineui-spacing-size-x-small))";
15145
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15267
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15146
15268
  "div",
15147
15269
  {
15148
15270
  "data-refineui": "chart-tooltip",
@@ -15155,9 +15277,9 @@ function ChartTooltip({ className, children, style, ...props }) {
15155
15277
  ...style
15156
15278
  },
15157
15279
  ...props,
15158
- children: children ?? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
15159
- label ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: chartStyles.tooltipLabel, children: label }) : null,
15160
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: chartStyles.tooltipValue, children: formatAxisTick(value) })
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) })
15161
15283
  ] })
15162
15284
  }
15163
15285
  );
@@ -15172,14 +15294,14 @@ function ChartYAxisLabels({
15172
15294
  }) {
15173
15295
  const scaleMax = resolveScale(values, max);
15174
15296
  const ticks = yAxisTicks(scaleMax, lines).slice().reverse();
15175
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15297
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15176
15298
  "div",
15177
15299
  {
15178
15300
  "data-refineui": "chart-y-axis",
15179
15301
  className: (0, import_clsx107.clsx)(chartStyles.yAxis, className),
15180
15302
  "aria-hidden": true,
15181
15303
  ...props,
15182
- children: ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15304
+ children: ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15183
15305
  "span",
15184
15306
  {
15185
15307
  className: chartStyles.yAxisTick,
@@ -15202,12 +15324,12 @@ function ChartGrid({
15202
15324
  const ticks = yAxisTicks(scaleMax, lines);
15203
15325
  const gridColor = gridStroke();
15204
15326
  const baselineColor = gridBaselineStroke();
15205
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("g", { "data-refineui": "chart-grid", className, ...props, children: ticks.map((tick, index) => {
15327
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("g", { "data-refineui": "chart-grid", className, ...props, children: ticks.map((tick, index) => {
15206
15328
  const y = gridLineY(scaleMax, tick);
15207
15329
  const isBaseline = index === 0;
15208
15330
  const isTop = index === ticks.length - 1;
15209
15331
  if (isTop) return null;
15210
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15332
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15211
15333
  "line",
15212
15334
  {
15213
15335
  x1: CHART_PLOT_PADDING_X,
@@ -15239,13 +15361,13 @@ function ChartBars({
15239
15361
  const barRadius = Math.min(CHART_BAR_RADIUS, barWidth / 2);
15240
15362
  const baselineY = plotBaselineY();
15241
15363
  const trackHeight = plotHeight();
15242
- (0, import_react56.useLayoutEffect)(() => {
15364
+ (0, import_react58.useLayoutEffect)(() => {
15243
15365
  setSeries({ values, seriesColor, max, align: "bar" });
15244
15366
  }, [values, seriesColor, max, setSeries]);
15245
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("g", { "data-refineui": "chart-bars", "data-series-color": seriesColor, className, ...props, children: [
15367
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("g", { "data-refineui": "chart-bars", "data-series-color": seriesColor, className, ...props, children: [
15246
15368
  showTrack ? values.map((_, index) => {
15247
15369
  const x = barX(index, values.length);
15248
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15370
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15249
15371
  "path",
15250
15372
  {
15251
15373
  "data-refineui": "chart-bar-track",
@@ -15267,7 +15389,7 @@ function ChartBars({
15267
15389
  const height = baselineY - y;
15268
15390
  if (height <= 0) return null;
15269
15391
  const state = itemState(index, hoverIndex, selectedIndex);
15270
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15392
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15271
15393
  "path",
15272
15394
  {
15273
15395
  "data-refineui": "chart-bar",
@@ -15290,20 +15412,20 @@ function ChartLine({
15290
15412
  ...props
15291
15413
  }) {
15292
15414
  const { hoverIndex, selectedIndex, setSeries } = useChartContext("ChartLine");
15293
- const gradientId = (0, import_react56.useId)().replace(/:/g, "");
15415
+ const gradientId = (0, import_react58.useId)().replace(/:/g, "");
15294
15416
  const scaleMax = resolveChartScale(values, max);
15295
15417
  const stroke = seriesColorToken(seriesColor);
15296
15418
  const coords = linePointCoords(values, scaleMax);
15297
15419
  const baselineY = plotBaselineY();
15298
15420
  const pointRing = pointStrokeColor();
15299
15421
  const linePath = monotoneLinePath(coords);
15300
- (0, import_react56.useLayoutEffect)(() => {
15422
+ (0, import_react58.useLayoutEffect)(() => {
15301
15423
  setSeries({ values, seriesColor, max, align: "line" });
15302
15424
  }, [values, seriesColor, max, setSeries]);
15303
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("g", { "data-refineui": "chart-line", "data-series-color": seriesColor, className, ...props, children: [
15304
- showArea && coords.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
15305
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
15306
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
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)(
15307
15429
  "stop",
15308
15430
  {
15309
15431
  offset: "0%",
@@ -15311,9 +15433,9 @@ function ChartLine({
15311
15433
  stopOpacity: import_tokens35.opacities.opacityDisabled
15312
15434
  }
15313
15435
  ),
15314
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("stop", { offset: "100%", stopColor: stroke, stopOpacity: "0" })
15436
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("stop", { offset: "100%", stopColor: stroke, stopOpacity: "0" })
15315
15437
  ] }) }),
15316
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15438
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15317
15439
  "path",
15318
15440
  {
15319
15441
  "data-refineui": "chart-line-area",
@@ -15322,7 +15444,7 @@ function ChartLine({
15322
15444
  }
15323
15445
  )
15324
15446
  ] }) : null,
15325
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15447
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15326
15448
  "path",
15327
15449
  {
15328
15450
  "data-refineui": "chart-line-stroke",
@@ -15340,7 +15462,7 @@ function ChartLine({
15340
15462
  const state = itemState(index, hoverIndex, selectedIndex);
15341
15463
  const visible = showPoints || state !== "default";
15342
15464
  if (!visible) return null;
15343
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15465
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15344
15466
  "circle",
15345
15467
  {
15346
15468
  "data-refineui": "chart-point",
@@ -15366,10 +15488,10 @@ function ChartAxisLabels({
15366
15488
  const { hoverIndex, selectedIndex, setLabels } = useChartContext("ChartAxisLabels");
15367
15489
  const count = labels.length;
15368
15490
  const centerAt = align === "line" ? linePointCenterRatio : barBandCenterRatio;
15369
- (0, import_react56.useLayoutEffect)(() => {
15491
+ (0, import_react58.useLayoutEffect)(() => {
15370
15492
  setLabels(labels);
15371
15493
  }, [labels, setLabels]);
15372
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15494
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15373
15495
  "div",
15374
15496
  {
15375
15497
  "data-refineui": "chart-axis-labels",
@@ -15378,7 +15500,7 @@ function ChartAxisLabels({
15378
15500
  ...props,
15379
15501
  children: labels.map((label, index) => {
15380
15502
  const state = itemState(index, hoverIndex, selectedIndex);
15381
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15503
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15382
15504
  "span",
15383
15505
  {
15384
15506
  "data-state": state,
@@ -15396,7 +15518,7 @@ function ChartAxisLabels({
15396
15518
  );
15397
15519
  }
15398
15520
  function ChartLegend({ className, ...props }) {
15399
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15521
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15400
15522
  "ul",
15401
15523
  {
15402
15524
  "data-refineui": "chart-legend",
@@ -15412,7 +15534,7 @@ function ChartLegendItem({
15412
15534
  style,
15413
15535
  ...props
15414
15536
  }) {
15415
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
15537
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
15416
15538
  "li",
15417
15539
  {
15418
15540
  "data-refineui": "chart-legend-item",
@@ -15420,7 +15542,7 @@ function ChartLegendItem({
15420
15542
  className: (0, import_clsx107.clsx)(chartStyles.legendItem, className),
15421
15543
  ...props,
15422
15544
  children: [
15423
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15545
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15424
15546
  "span",
15425
15547
  {
15426
15548
  "aria-hidden": true,
@@ -15435,26 +15557,26 @@ function ChartLegendItem({
15435
15557
  }
15436
15558
 
15437
15559
  // src/components/Slot/Slot.tsx
15438
- var import_react57 = require("@refineui/utilities/react");
15560
+ var import_react59 = require("@refineui/utilities/react");
15439
15561
 
15440
15562
  // src/components/Collapsible/Collapsible.tsx
15441
- var import_react59 = require("react");
15563
+ var import_react61 = require("react");
15442
15564
  var import_clsx108 = require("clsx");
15443
- var import_react60 = require("@refineui/utilities/react");
15565
+ var import_react62 = require("@refineui/utilities/react");
15444
15566
 
15445
15567
  // src/components/Collapsible/context.ts
15446
- var import_react58 = require("react");
15568
+ var import_react60 = require("react");
15447
15569
  var import_tokens36 = require("@refineui/tokens");
15448
15570
  var import_animation9 = require("@refineui/utilities/animation");
15449
- var CollapsibleContext = (0, import_react58.createContext)(null);
15571
+ var CollapsibleContext = (0, import_react60.createContext)(null);
15450
15572
  function useCollapsibleContext(part) {
15451
- const value = (0, import_react58.useContext)(CollapsibleContext);
15573
+ const value = (0, import_react60.useContext)(CollapsibleContext);
15452
15574
  if (!value) throw new Error(`${part} must be used within Collapsible`);
15453
15575
  return value;
15454
15576
  }
15455
15577
  function usePrefersReducedMotion3() {
15456
- const [reduce, setReduce] = (0, import_react58.useState)(false);
15457
- (0, import_react58.useEffect)(() => {
15578
+ const [reduce, setReduce] = (0, import_react60.useState)(false);
15579
+ (0, import_react60.useEffect)(() => {
15458
15580
  const mql = window.matchMedia((0, import_animation9.getReducedMotionQuery)().replace("@media ", ""));
15459
15581
  const sync = () => setReduce(mql.matches);
15460
15582
  sync();
@@ -15474,18 +15596,18 @@ var collapsibleStyles = {
15474
15596
  };
15475
15597
 
15476
15598
  // src/components/Collapsible/Collapsible.tsx
15477
- var import_jsx_runtime78 = require("react/jsx-runtime");
15478
- var Collapsible = (0, import_react59.forwardRef)(function Collapsible2({ open: openProp, defaultOpen = false, onOpenChange, asChild = false, className, children, ...props }, ref) {
15479
- const [uncontrolled, setUncontrolled] = (0, import_react59.useState)(defaultOpen);
15599
+ var import_jsx_runtime79 = require("react/jsx-runtime");
15600
+ var Collapsible = (0, import_react61.forwardRef)(function Collapsible2({ open: openProp, defaultOpen = false, onOpenChange, asChild = false, className, children, ...props }, ref) {
15601
+ const [uncontrolled, setUncontrolled] = (0, import_react61.useState)(defaultOpen);
15480
15602
  const open = openProp ?? uncontrolled;
15481
- const reactId = (0, import_react59.useId)();
15603
+ const reactId = (0, import_react61.useId)();
15482
15604
  const reduceMotion = usePrefersReducedMotion3();
15483
- const toggle = (0, import_react59.useCallback)(() => {
15605
+ const toggle = (0, import_react61.useCallback)(() => {
15484
15606
  const next = !(openProp ?? uncontrolled);
15485
15607
  if (openProp === void 0) setUncontrolled(next);
15486
15608
  onOpenChange?.(next);
15487
15609
  }, [onOpenChange, openProp, uncontrolled]);
15488
- const contextValue = (0, import_react59.useMemo)(
15610
+ const contextValue = (0, import_react61.useMemo)(
15489
15611
  () => ({
15490
15612
  open,
15491
15613
  toggle,
@@ -15502,9 +15624,9 @@ var Collapsible = (0, import_react59.forwardRef)(function Collapsible2({ open: o
15502
15624
  "data-refineui": "collapsible",
15503
15625
  className
15504
15626
  };
15505
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CollapsibleContext.Provider, { value: contextValue, children: asChild ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react60.Slot, { ...shared, children }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { ...shared, children }) });
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 }) });
15506
15628
  });
15507
- var CollapsibleTrigger = (0, import_react59.forwardRef)(
15629
+ var CollapsibleTrigger = (0, import_react61.forwardRef)(
15508
15630
  function CollapsibleTrigger2({
15509
15631
  asChild = false,
15510
15632
  onClick,
@@ -15531,8 +15653,8 @@ var CollapsibleTrigger = (0, import_react59.forwardRef)(
15531
15653
  if (!event.defaultPrevented) toggle();
15532
15654
  }
15533
15655
  };
15534
- if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react60.Slot, { ...shared, children });
15535
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15656
+ if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react62.Slot, { ...shared, children });
15657
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15536
15658
  Button,
15537
15659
  {
15538
15660
  ...shared,
@@ -15546,7 +15668,7 @@ var CollapsibleTrigger = (0, import_react59.forwardRef)(
15546
15668
  );
15547
15669
  }
15548
15670
  );
15549
- var CollapsibleContent = (0, import_react59.forwardRef)(
15671
+ var CollapsibleContent = (0, import_react61.forwardRef)(
15550
15672
  function CollapsibleContent2({ className, children, style, ...props }, ref) {
15551
15673
  const { open, contentId, triggerId, reduceMotion } = useCollapsibleContext("CollapsibleContent");
15552
15674
  const gridStyle = {
@@ -15561,7 +15683,7 @@ var CollapsibleContent = (0, import_react59.forwardRef)(
15561
15683
  pointerEvents: open ? void 0 : "none",
15562
15684
  ...style
15563
15685
  };
15564
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15686
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15565
15687
  "div",
15566
15688
  {
15567
15689
  ...props,
@@ -15573,26 +15695,26 @@ var CollapsibleContent = (0, import_react59.forwardRef)(
15573
15695
  "data-state": open ? "open" : "closed",
15574
15696
  "data-refineui": "collapsible-content",
15575
15697
  style: gridStyle,
15576
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: collapsibleStyles.panelOuter, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: (0, import_clsx108.clsx)(className), style: innerMotionStyle, children }) })
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 }) })
15577
15699
  }
15578
15700
  );
15579
15701
  }
15580
15702
  );
15581
15703
 
15582
15704
  // src/components/ContextMenu/ContextMenu.tsx
15583
- var import_react61 = require("react");
15705
+ var import_react63 = require("react");
15584
15706
  var import_react_dom7 = require("react-dom");
15585
15707
  var import_clsx109 = require("clsx");
15586
15708
  var import_tokens37 = require("@refineui/tokens");
15587
15709
  var import_animation10 = require("@refineui/utilities/animation");
15588
- var import_react62 = require("@refineui/utilities/react");
15589
- var import_jsx_runtime79 = require("react/jsx-runtime");
15710
+ var import_react64 = require("@refineui/utilities/react");
15711
+ var import_jsx_runtime80 = require("react/jsx-runtime");
15590
15712
  var MENU_ATTR = "data-refineui-context-menu";
15591
15713
  var CLOSE_MS = (0, import_animation10.motionMsToNumber)(import_tokens37.semanticInteraction.duration.normal);
15592
- var MenuContext2 = (0, import_react61.createContext)(null);
15593
- var SubContext = (0, import_react61.createContext)(null);
15714
+ var MenuContext2 = (0, import_react63.createContext)(null);
15715
+ var SubContext = (0, import_react63.createContext)(null);
15594
15716
  function useMenu() {
15595
- const value = (0, import_react61.useContext)(MenuContext2);
15717
+ const value = (0, import_react63.useContext)(MenuContext2);
15596
15718
  if (!value) throw new Error("Context menu parts must be used within ContextMenu");
15597
15719
  return value;
15598
15720
  }
@@ -15609,29 +15731,29 @@ function placeInView(element, x, y) {
15609
15731
  }
15610
15732
  function ContextMenu({ modal = true, onOpenChange, children }) {
15611
15733
  void modal;
15612
- const [open, setOpen] = (0, import_react61.useState)(false);
15613
- const [point, setPoint] = (0, import_react61.useState)({ x: 0, y: 0 });
15614
- const openRef = (0, import_react61.useRef)(false);
15615
- const onOpenChangeRef = (0, import_react61.useRef)(onOpenChange);
15734
+ const [open, setOpen] = (0, import_react63.useState)(false);
15735
+ const [point, setPoint] = (0, import_react63.useState)({ x: 0, y: 0 });
15736
+ const openRef = (0, import_react63.useRef)(false);
15737
+ const onOpenChangeRef = (0, import_react63.useRef)(onOpenChange);
15616
15738
  openRef.current = open;
15617
15739
  onOpenChangeRef.current = onOpenChange;
15618
- const close = (0, import_react61.useCallback)(() => {
15740
+ const close = (0, import_react63.useCallback)(() => {
15619
15741
  if (!openRef.current) return;
15620
15742
  openRef.current = false;
15621
15743
  setOpen(false);
15622
15744
  onOpenChangeRef.current?.(false);
15623
15745
  }, []);
15624
- const openAt = (0, import_react61.useCallback)((x, y) => {
15746
+ const openAt = (0, import_react63.useCallback)((x, y) => {
15625
15747
  setPoint({ x, y });
15626
15748
  const wasOpen = openRef.current;
15627
15749
  openRef.current = true;
15628
15750
  setOpen(true);
15629
15751
  if (!wasOpen) onOpenChangeRef.current?.(true);
15630
15752
  }, []);
15631
- const value = (0, import_react61.useMemo)(() => ({ open, point, openAt, close }), [open, point, openAt, close]);
15632
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(MenuContext2.Provider, { value, children });
15753
+ 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 });
15633
15755
  }
15634
- var ContextMenuTrigger = (0, import_react61.forwardRef)(function ContextMenuTrigger2({ asChild = false, onContextMenu, children, ...props }, ref) {
15756
+ var ContextMenuTrigger = (0, import_react63.forwardRef)(function ContextMenuTrigger2({ asChild = false, onContextMenu, children, ...props }, ref) {
15635
15757
  const { openAt } = useMenu();
15636
15758
  const shared = {
15637
15759
  ...props,
@@ -15644,18 +15766,18 @@ var ContextMenuTrigger = (0, import_react61.forwardRef)(function ContextMenuTrig
15644
15766
  openAt(event.clientX, event.clientY);
15645
15767
  }
15646
15768
  };
15647
- if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react62.Slot, { ...shared, children });
15648
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { ...shared, className: (0, import_clsx109.clsx)(menuStyles.triggerFallback, props.className), children });
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 });
15649
15771
  });
15650
15772
  function ContextMenuPortal({ children }) {
15651
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, { children });
15773
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_jsx_runtime80.Fragment, { children });
15652
15774
  }
15653
- var ContextMenuContent = (0, import_react61.forwardRef)(function ContextMenuContent2({ className, style, onPointerDown, children, ...props }, ref) {
15775
+ var ContextMenuContent = (0, import_react63.forwardRef)(function ContextMenuContent2({ className, style, onPointerDown, children, ...props }, ref) {
15654
15776
  const { open, point, close } = useMenu();
15655
- const localRef = (0, import_react61.useRef)(null);
15656
- const [shouldRender, setShouldRender] = (0, import_react61.useState)(open);
15657
- const [isClosing, setIsClosing] = (0, import_react61.useState)(false);
15658
- (0, import_react61.useEffect)(() => {
15777
+ const localRef = (0, import_react63.useRef)(null);
15778
+ const [shouldRender, setShouldRender] = (0, import_react63.useState)(open);
15779
+ const [isClosing, setIsClosing] = (0, import_react63.useState)(false);
15780
+ (0, import_react63.useEffect)(() => {
15659
15781
  if (open) {
15660
15782
  setShouldRender(true);
15661
15783
  setIsClosing(false);
@@ -15669,11 +15791,11 @@ var ContextMenuContent = (0, import_react61.forwardRef)(function ContextMenuCont
15669
15791
  }, CLOSE_MS);
15670
15792
  return () => window.clearTimeout(timeout);
15671
15793
  }, [open, shouldRender]);
15672
- (0, import_react61.useLayoutEffect)(() => {
15794
+ (0, import_react63.useLayoutEffect)(() => {
15673
15795
  if (!shouldRender || !localRef.current) return;
15674
15796
  placeInView(localRef.current, point.x, point.y);
15675
15797
  }, [shouldRender, point.x, point.y]);
15676
- (0, import_react61.useEffect)(() => {
15798
+ (0, import_react63.useEffect)(() => {
15677
15799
  if (!open) return;
15678
15800
  const onKey = (event) => {
15679
15801
  if (event.key === "Escape") close();
@@ -15692,7 +15814,7 @@ var ContextMenuContent = (0, import_react61.forwardRef)(function ContextMenuCont
15692
15814
  }, [open, close]);
15693
15815
  if (!shouldRender || typeof document === "undefined") return null;
15694
15816
  return (0, import_react_dom7.createPortal)(
15695
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15817
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15696
15818
  "div",
15697
15819
  {
15698
15820
  ...props,
@@ -15719,7 +15841,7 @@ var ContextMenuContent = (0, import_react61.forwardRef)(function ContextMenuCont
15719
15841
  onPointerDown?.(event);
15720
15842
  },
15721
15843
  onContextMenu: (event) => event.preventDefault(),
15722
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { role: "menu", "data-refineui": "menu", className: (0, import_clsx109.clsx)(menuStyles.list, className), children })
15844
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { role: "menu", "data-refineui": "menu", className: (0, import_clsx109.clsx)(menuStyles.list, className), children })
15723
15845
  }
15724
15846
  ),
15725
15847
  document.body
@@ -15736,11 +15858,11 @@ function runSelect(onSelect, close, disabled) {
15736
15858
  onSelect?.(selectEvent);
15737
15859
  if (!selectEvent.defaultPrevented) close();
15738
15860
  }
15739
- var ContextMenuItem = (0, import_react61.forwardRef)(function ContextMenuItem2({ disabled = false, description, shortcut, startIcon, endIcon, state = "default", onSelect, className, onClick, onKeyDown, children, ...props }, ref) {
15861
+ var ContextMenuItem = (0, import_react63.forwardRef)(function ContextMenuItem2({ disabled = false, description, shortcut, startIcon, endIcon, state = "default", onSelect, className, onClick, onKeyDown, children, ...props }, ref) {
15740
15862
  const { close } = useMenu();
15741
15863
  const isDisabled = disabled || state === "disabled";
15742
15864
  const slotted = startIcon != null || description != null || shortcut != null || endIcon != null;
15743
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15865
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15744
15866
  "button",
15745
15867
  {
15746
15868
  ref,
@@ -15766,8 +15888,8 @@ var ContextMenuItem = (0, import_react61.forwardRef)(function ContextMenuItem2({
15766
15888
  runSelect(onSelect, close, isDisabled);
15767
15889
  }
15768
15890
  },
15769
- children: slotted ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: menuStyles.row, children: [
15770
- startIcon ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15891
+ children: slotted ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: menuStyles.row, children: [
15892
+ startIcon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15771
15893
  "span",
15772
15894
  {
15773
15895
  className: menuStyles.iconWrap,
@@ -15775,13 +15897,13 @@ var ContextMenuItem = (0, import_react61.forwardRef)(function ContextMenuItem2({
15775
15897
  children: startIcon
15776
15898
  }
15777
15899
  ) : null,
15778
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: menuStyles.textCol, children: [
15779
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: menuStyles.title, children }),
15780
- description ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: (0, import_clsx109.clsx)(menuStyles.description, isDisabled ? menuStyles.descriptionDisabled : menuStyles.descriptionEnabled), children: description }) : 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
15781
15903
  ] }),
15782
- (shortcut || endIcon) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: menuStyles.rightWrap, children: [
15783
- shortcut ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: menuStyles.shortcut, children: shortcut }) : null,
15784
- endIcon ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
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)(
15785
15907
  "span",
15786
15908
  {
15787
15909
  className: menuStyles.iconWrap,
@@ -15790,13 +15912,13 @@ var ContextMenuItem = (0, import_react61.forwardRef)(function ContextMenuItem2({
15790
15912
  }
15791
15913
  ) : null
15792
15914
  ] })
15793
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: menuStyles.row, children })
15915
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: menuStyles.row, children })
15794
15916
  }
15795
15917
  );
15796
15918
  });
15797
- var ContextMenuSeparator = (0, import_react61.forwardRef)(
15919
+ var ContextMenuSeparator = (0, import_react63.forwardRef)(
15798
15920
  function ContextMenuSeparator2({ className, ...props }, ref) {
15799
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
15921
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15800
15922
  "div",
15801
15923
  {
15802
15924
  ref,
@@ -15806,24 +15928,24 @@ var ContextMenuSeparator = (0, import_react61.forwardRef)(
15806
15928
  ...{ [MENU_ATTR]: "" },
15807
15929
  className: (0, import_clsx109.clsx)(menuStyles.dividerWrap, className),
15808
15930
  ...props,
15809
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: menuStyles.dividerLine })
15931
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: menuStyles.dividerLine })
15810
15932
  }
15811
15933
  );
15812
15934
  }
15813
15935
  );
15814
15936
  function ContextMenuLabel({ className, children, ...props }) {
15815
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { "data-refineui": "menu-label", className: (0, import_clsx109.clsx)(menuStyles.section, className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: menuStyles.sectionText, children }) });
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 }) });
15816
15938
  }
15817
15939
  function ContextMenuSub({ children }) {
15818
- const [open, setOpen] = (0, import_react61.useState)(false);
15819
- const triggerRef = (0, import_react61.useRef)(null);
15820
- const timer = (0, import_react61.useRef)(null);
15940
+ const [open, setOpen] = (0, import_react63.useState)(false);
15941
+ const triggerRef = (0, import_react63.useRef)(null);
15942
+ const timer = (0, import_react63.useRef)(null);
15821
15943
  const clear = () => {
15822
15944
  if (timer.current != null) window.clearTimeout(timer.current);
15823
15945
  timer.current = null;
15824
15946
  };
15825
- (0, import_react61.useEffect)(() => clear, []);
15826
- const value = (0, import_react61.useMemo)(
15947
+ (0, import_react63.useEffect)(() => clear, []);
15948
+ const value = (0, import_react63.useMemo)(
15827
15949
  () => ({
15828
15950
  open,
15829
15951
  triggerRef,
@@ -15838,14 +15960,14 @@ function ContextMenuSub({ children }) {
15838
15960
  }),
15839
15961
  [open]
15840
15962
  );
15841
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(SubContext.Provider, { value, children });
15963
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SubContext.Provider, { value, children });
15842
15964
  }
15843
15965
  function useSub2() {
15844
- const value = (0, import_react61.useContext)(SubContext);
15966
+ const value = (0, import_react63.useContext)(SubContext);
15845
15967
  if (!value) throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");
15846
15968
  return value;
15847
15969
  }
15848
- var ContextMenuSubTrigger = (0, import_react61.forwardRef)(
15970
+ var ContextMenuSubTrigger = (0, import_react63.forwardRef)(
15849
15971
  function ContextMenuSubTrigger2({ asChild = false, description, startIcon, onMouseEnter, onMouseLeave, onClick, className, children, ...props }, ref) {
15850
15972
  const sub = useSub2();
15851
15973
  const shared = {
@@ -15881,9 +16003,9 @@ var ContextMenuSubTrigger = (0, import_react61.forwardRef)(
15881
16003
  if (!event.defaultPrevented) sub.show();
15882
16004
  }
15883
16005
  };
15884
- if (asChild) return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react62.Slot, { ...shared, children });
15885
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("button", { ...shared, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: menuStyles.row, children: [
15886
- startIcon ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
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)(
15887
16009
  "span",
15888
16010
  {
15889
16011
  className: menuStyles.iconWrap,
@@ -15891,27 +16013,27 @@ var ContextMenuSubTrigger = (0, import_react61.forwardRef)(
15891
16013
  children: startIcon
15892
16014
  }
15893
16015
  ) : null,
15894
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: menuStyles.textCol, children: [
15895
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: menuStyles.title, children }),
15896
- description ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: (0, import_clsx109.clsx)(menuStyles.description, menuStyles.descriptionEnabled), children: description }) : 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
15897
16019
  ] }),
15898
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: menuStyles.rightWrap, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16020
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: menuStyles.rightWrap, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15899
16021
  "span",
15900
16022
  {
15901
16023
  className: menuStyles.iconWrap,
15902
16024
  style: { width: import_tokens37.iconSizes.small, minWidth: import_tokens37.iconSizes.small, height: import_tokens37.iconSizes.small },
15903
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(WebIcon, { name: "chevron-right", size: import_tokens37.iconSizes.small, color: "currentColor", "aria-hidden": true })
16025
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(WebIcon, { name: "chevron-right", size: import_tokens37.iconSizes.small, color: "currentColor", "aria-hidden": true })
15904
16026
  }
15905
16027
  ) })
15906
16028
  ] }) });
15907
16029
  }
15908
16030
  );
15909
- var ContextMenuSubContent = (0, import_react61.forwardRef)(
16031
+ var ContextMenuSubContent = (0, import_react63.forwardRef)(
15910
16032
  function ContextMenuSubContent2({ className, style, onPointerDown, onMouseEnter, onMouseLeave, ...props }, ref) {
15911
16033
  const sub = useSub2();
15912
- const localRef = (0, import_react61.useRef)(null);
15913
- const [side, setSide] = (0, import_react61.useState)("right");
15914
- (0, import_react61.useLayoutEffect)(() => {
16034
+ const localRef = (0, import_react63.useRef)(null);
16035
+ const [side, setSide] = (0, import_react63.useState)("right");
16036
+ (0, import_react63.useLayoutEffect)(() => {
15915
16037
  const trigger = sub.triggerRef.current;
15916
16038
  const element = localRef.current;
15917
16039
  if (!sub.open || !trigger || !element) return;
@@ -15929,7 +16051,7 @@ var ContextMenuSubContent = (0, import_react61.forwardRef)(
15929
16051
  }, [sub.open, sub.triggerRef]);
15930
16052
  if (!sub.open || typeof document === "undefined") return null;
15931
16053
  return (0, import_react_dom7.createPortal)(
15932
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16054
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15933
16055
  "div",
15934
16056
  {
15935
16057
  ...props,
@@ -16197,6 +16319,8 @@ var ContextMenuSubContent = (0, import_react61.forwardRef)(
16197
16319
  SidebarPeekInset,
16198
16320
  SidebarPeekPanel,
16199
16321
  SidebarPeekPin,
16322
+ SidebarProvider,
16323
+ SidebarTrigger,
16200
16324
  Skeleton,
16201
16325
  Slider,
16202
16326
  Slot,
@@ -16254,6 +16378,7 @@ var ContextMenuSubContent = (0, import_react61.forwardRef)(
16254
16378
  semanticTextClass,
16255
16379
  sizedComponentTextClass,
16256
16380
  toast,
16381
+ useSidebar,
16257
16382
  useSidebarPeek
16258
16383
  });
16259
16384
  //# sourceMappingURL=index.cjs.map