@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.js CHANGED
@@ -35,14 +35,13 @@ var componentColorTokens = {
35
35
  states: buttonPrimaryColorTokens.states
36
36
  },
37
37
  secondary: {
38
- background: semanticToken("backgroundPrimary"),
38
+ background: semanticToken("backgroundSurfaceHover"),
39
39
  foreground: semanticToken("foregroundPrimary"),
40
- border: semanticToken("borderDefault"),
41
- hoverBackground: semanticToken("backgroundSurfaceHover"),
42
- hoverBorder: semanticToken("borderStrong"),
40
+ hoverBackground: semanticToken("backgroundSurfaceActive"),
41
+ hoverForeground: semanticToken("foregroundPrimaryHover"),
43
42
  activeBackground: semanticToken("backgroundSurfaceActive"),
43
+ activeForeground: semanticToken("foregroundPrimary"),
44
44
  disabledBackground: semanticToken("backgroundSurfaceDisabled"),
45
- disabledBorder: semanticToken("borderDisabled"),
46
45
  disabledForeground: semanticToken("foregroundDisabled")
47
46
  },
48
47
  outline: {
@@ -1198,7 +1197,7 @@ function resolveSlotClasses(recipe, slot, variants = {}) {
1198
1197
  // src/recipes/button.recipe.ts
1199
1198
  var buttonVariantClass = {
1200
1199
  primary: "border-refineui-none border border-transparent bg-refineui-alias-background-brand text-refineui-alias-foreground-inversed",
1201
- secondary: "border-refineui-thin border-refineui-alias-border-default bg-refineui-alias-background-surface text-refineui-alias-foreground-primary",
1200
+ secondary: "border-refineui-none border border-transparent bg-refineui-alias-background-surface-hover text-refineui-alias-foreground-primary",
1202
1201
  outline: "border-refineui-thin border-refineui-alias-border-default bg-transparent text-refineui-alias-foreground-primary",
1203
1202
  ghost: "border-refineui-none border border-transparent bg-transparent text-refineui-alias-foreground-primary"
1204
1203
  };
@@ -1236,6 +1235,10 @@ var buttonRecipe = defineRecipe({
1236
1235
  match: { layout: "icon", variant: "primary" },
1237
1236
  className: "border-0"
1238
1237
  },
1238
+ {
1239
+ match: { layout: "icon", variant: "secondary" },
1240
+ className: "border-0"
1241
+ },
1239
1242
  {
1240
1243
  match: { layout: "icon", variant: "ghost" },
1241
1244
  className: "border-0"
@@ -1270,7 +1273,7 @@ var Button = forwardRef(function Button2({
1270
1273
  const inactive = Boolean(disabled) || ariaDisabledProp === true || ariaDisabledProp === "true";
1271
1274
  const variantStyles = variant === "ghost" && layout === "icon" ? buttonStyles.iconGhost : buttonVariantClass[variant];
1272
1275
  const sizeStyles = layout === "icon" ? buttonIconSizeClass[size] : buttonLabelSizeClass[size];
1273
- const iconNoStroke = layout === "icon" && (variant === "primary" || variant === "ghost") ? "border-0" : null;
1276
+ const iconNoStroke = layout === "icon" && (variant === "primary" || variant === "secondary" || variant === "ghost") ? "border-0" : null;
1274
1277
  return /* @__PURE__ */ jsx2(
1275
1278
  "button",
1276
1279
  {
@@ -2937,13 +2940,26 @@ var selectStyles = {
2937
2940
  "border-refineui-hairline border-refineui-alias-border-default",
2938
2941
  "bg-refineui-alias-background-primary px-refineui-size-medium py-refineui-size-x-small",
2939
2942
  "text-refineui-alias-foreground-primary outline-none",
2940
- "transition-[color,background-color,border-color] duration-[var(--refineui-motion-duration-fast)]"
2943
+ "transition-[color,background-color,border-color,transform] duration-[var(--refineui-motion-duration-fast)] ease-[var(--refineui-motion-easing-ease-out)]"
2944
+ ),
2945
+ /** Ghost plate — same gap/radius as filled, no field border (Button ghost-like). */
2946
+ triggerGhost: clsx27(
2947
+ "box-border inline-flex cursor-pointer items-center justify-between",
2948
+ "gap-refineui-size-x-small rounded-refineui-large",
2949
+ "border-refineui-none border-transparent bg-transparent",
2950
+ "px-refineui-size-x-small py-refineui-size-xx-small",
2951
+ "text-refineui-alias-foreground-primary outline-none",
2952
+ "transition-[color,background-color,transform] duration-[var(--refineui-motion-duration-fast)] ease-[var(--refineui-motion-easing-ease-out)]"
2941
2953
  ),
2942
2954
  /** Flush shell — consumer / parent owns padding, radius, surface. */
2943
- triggerPlain: "box-border inline-flex cursor-pointer items-center outline-none",
2955
+ triggerPlain: clsx27(
2956
+ "box-border inline-flex cursor-pointer items-center outline-none",
2957
+ "transition-[transform] duration-[var(--refineui-motion-duration-fast)] ease-[var(--refineui-motion-easing-ease-out)]"
2958
+ ),
2944
2959
  triggerInner: "min-w-0 flex-1 overflow-hidden text-start",
2945
2960
  triggerOpen: "text-refineui-alias-foreground-primary",
2946
2961
  triggerDisabled: "cursor-not-allowed border-refineui-alias-border-disabled bg-refineui-alias-background-surface-disabled text-refineui-alias-foreground-disabled",
2962
+ triggerGhostDisabled: "cursor-not-allowed text-refineui-alias-foreground-disabled",
2947
2963
  triggerPlainDisabled: "cursor-not-allowed text-refineui-alias-foreground-disabled",
2948
2964
  value: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-start",
2949
2965
  iconWrap: "inline-flex size-refineui-icon-xsmall shrink-0 items-center justify-center",
@@ -3224,9 +3240,12 @@ function Select({
3224
3240
  }
3225
3241
  var SelectTrigger = forwardRef6(function SelectTrigger2(props, forwardedRef) {
3226
3242
  const { className, children, style, appearance = "filled", ...triggerRest } = props;
3227
- const { open, setOpen, triggerRef, onKeyDown, size, fullWidth, disabled, value, getLabelByValue } = useSelectCtx();
3228
- const hasLabel = Boolean(getLabelByValue(value));
3243
+ const { open, setOpen, triggerRef, onKeyDown, size, fullWidth, disabled, value } = useSelectCtx();
3244
+ const isPlaceholder = value === "";
3229
3245
  const isPlain = appearance === "plain";
3246
+ const isGhost = appearance === "ghost";
3247
+ const isFilled = appearance === "filled";
3248
+ const [pressed, setPressed] = useState5(false);
3230
3249
  const setRefs = useCallback4(
3231
3250
  (node) => {
3232
3251
  triggerRef.current = node;
@@ -3235,6 +3254,7 @@ var SelectTrigger = forwardRef6(function SelectTrigger2(props, forwardedRef) {
3235
3254
  },
3236
3255
  [forwardedRef, triggerRef]
3237
3256
  );
3257
+ const clearPressed = useCallback4(() => setPressed(false), []);
3238
3258
  return /* @__PURE__ */ jsxs4(
3239
3259
  "button",
3240
3260
  {
@@ -3247,20 +3267,31 @@ var SelectTrigger = forwardRef6(function SelectTrigger2(props, forwardedRef) {
3247
3267
  "data-appearance": appearance,
3248
3268
  "data-size": size,
3249
3269
  "data-state": open ? "open" : "closed",
3250
- "data-placeholder": hasLabel ? void 0 : "",
3270
+ "data-pressed": pressed ? "" : void 0,
3271
+ "data-placeholder": isPlaceholder ? "" : void 0,
3251
3272
  disabled,
3273
+ onPointerDown: (event) => {
3274
+ if (disabled || event.button !== 0) return;
3275
+ setPressed(true);
3276
+ },
3277
+ onPointerUp: clearPressed,
3278
+ onPointerLeave: clearPressed,
3279
+ onPointerCancel: clearPressed,
3252
3280
  onMouseDown: (event) => {
3253
3281
  event.preventDefault();
3282
+ if (disabled) return;
3254
3283
  setOpen(!open);
3255
3284
  triggerRef.current?.focus();
3256
3285
  },
3257
3286
  onKeyDown,
3258
3287
  className: clsx28(
3259
3288
  "data-[placeholder]:[&_[data-refineui-select-value]]:text-refineui-alias-foreground-placeholder",
3260
- isPlain ? selectStyles.triggerPlain : selectStyles.trigger,
3261
- !isPlain && selectTriggerSizeClass[size],
3262
- !isPlain && open && selectStyles.triggerOpen,
3263
- disabled && (isPlain ? selectStyles.triggerPlainDisabled : selectStyles.triggerDisabled),
3289
+ isPlain && selectStyles.triggerPlain,
3290
+ isGhost && selectStyles.triggerGhost,
3291
+ isFilled && selectStyles.trigger,
3292
+ (isFilled || isGhost) && selectTriggerSizeClass[size],
3293
+ isFilled && open && selectStyles.triggerOpen,
3294
+ disabled && (isPlain ? selectStyles.triggerPlainDisabled : isGhost ? selectStyles.triggerGhostDisabled : selectStyles.triggerDisabled),
3264
3295
  fullWidth && "w-full",
3265
3296
  className
3266
3297
  ),
@@ -3286,7 +3317,20 @@ SelectTrigger.displayName = "SelectTrigger";
3286
3317
  function SelectValue({ placeholder, className, ...props }) {
3287
3318
  const { value, getLabelByValue, placeholder: rootPlaceholder } = useSelectCtx();
3288
3319
  const label = getLabelByValue(value);
3289
- return /* @__PURE__ */ jsx22("span", { "data-refineui-select-value": "", className: clsx28(selectStyles.value, !label && "text-refineui-alias-foreground-placeholder", className), ...props, children: label || placeholder || rootPlaceholder || "Select..." });
3320
+ const isPlaceholder = value === "";
3321
+ return /* @__PURE__ */ jsx22(
3322
+ "span",
3323
+ {
3324
+ "data-refineui-select-value": "",
3325
+ className: clsx28(
3326
+ selectStyles.value,
3327
+ isPlaceholder && "text-refineui-alias-foreground-placeholder",
3328
+ className
3329
+ ),
3330
+ ...props,
3331
+ children: label || placeholder || rootPlaceholder || "Select..."
3332
+ }
3333
+ );
3290
3334
  }
3291
3335
  function SelectIcon({ children, className, ...props }) {
3292
3336
  return /* @__PURE__ */ jsx22("span", { className: clsx28(selectStyles.iconWrap, className), ...props, children: children ?? /* @__PURE__ */ jsx22(WebIcon, { name: "chevron-down", size: iconSizes4.xsmall }) });
@@ -7394,15 +7438,10 @@ var calendarStyles = {
7394
7438
  dayWrapEndpoint: "box-border flex size-refineui-calendar-day-size items-center justify-center bg-refineui-alias-background-primary-hover",
7395
7439
  dayWrapEndpointStart: "rounded-s-refineui-large",
7396
7440
  dayWrapEndpointEnd: "rounded-e-refineui-large",
7397
- 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",
7441
+ 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",
7398
7442
  header: "flex w-full min-w-0 items-center justify-between pb-refineui-size-large",
7399
7443
  navButton: "shrink-0 text-refineui-alias-foreground-primary",
7400
- captionButton: clsx58(
7401
- "shrink-0",
7402
- "border-refineui-none border-transparent bg-transparent",
7403
- "px-refineui-size-x-small py-refineui-size-xx-small",
7404
- "text-refineui-alias-foreground-primary"
7405
- ),
7444
+ captionButton: "shrink-0",
7406
7445
  body: "flex flex-col gap-refineui-size-small",
7407
7446
  weekday: clsx58(
7408
7447
  componentTextClass(componentTypographyTokens.calendar.weekday),
@@ -7431,12 +7470,15 @@ function normalizeRange(start, end) {
7431
7470
  function getWeekdayLabels(weekStartsOn) {
7432
7471
  return [...WEEKDAYS.slice(weekStartsOn), ...WEEKDAYS.slice(0, weekStartsOn)];
7433
7472
  }
7434
- function formatMonthName(year, month) {
7473
+ function formatMonthLabel(year, month) {
7474
+ return new Intl.DateTimeFormat("en-US", { month: "short" }).format(new Date(year, month, 1));
7475
+ }
7476
+ function formatMonthNameLong(year, month) {
7435
7477
  return new Intl.DateTimeFormat("en-US", { month: "long" }).format(new Date(year, month, 1));
7436
7478
  }
7437
7479
  var MONTH_LABELS = Array.from(
7438
7480
  { length: MONTH_COUNT },
7439
- (_, monthIndex) => formatMonthName(2e3, monthIndex)
7481
+ (_, monthIndex) => formatMonthLabel(2e3, monthIndex)
7440
7482
  );
7441
7483
  function yearOptionsForView(viewYear) {
7442
7484
  const referenceYear = (/* @__PURE__ */ new Date()).getFullYear();
@@ -7457,16 +7499,16 @@ function CalendarCaptionSelect({
7457
7499
  children
7458
7500
  }) {
7459
7501
  return /* @__PURE__ */ jsxs16(Select, { value, onValueChange, "aria-label": ariaLabel, size: "sm", children: [
7460
- /* @__PURE__ */ jsxs16(
7502
+ /* @__PURE__ */ jsx45(
7461
7503
  SelectTrigger,
7462
7504
  {
7463
- appearance: "plain",
7505
+ appearance: "ghost",
7464
7506
  "data-calendar-header": header,
7465
- className: calendarStyles.captionButton,
7466
- children: [
7467
- " ",
7468
- /* @__PURE__ */ jsx45(SelectValue, { placeholder })
7469
- ]
7507
+ className: clsx59(
7508
+ calendarStyles.captionButton,
7509
+ header === "caption-year" && "tabular-nums"
7510
+ ),
7511
+ children: /* @__PURE__ */ jsx45(SelectValue, { placeholder })
7470
7512
  }
7471
7513
  ),
7472
7514
  /* @__PURE__ */ jsx45(SelectPortal, { children: /* @__PURE__ */ jsx45(SelectContent, { children: /* @__PURE__ */ jsx45(SelectGroup, { children }) }) })
@@ -7522,7 +7564,9 @@ function Calendar({
7522
7564
  const cells = getMonthGrid(year, month, weekStartsOn);
7523
7565
  const weeks = chunkWeeks(cells);
7524
7566
  const weekdayLabels = getWeekdayLabels(weekStartsOn);
7525
- const monthName = formatMonthName(year, month);
7567
+ const monthLabel = formatMonthLabel(year, month);
7568
+ const monthNameLong = formatMonthNameLong(year, month);
7569
+ const yearOptions = yearOptionsForView(year);
7526
7570
  const getDateFromCell = (d, monthOffset) => new Date(year, month + monthOffset, d);
7527
7571
  const setRange = (start, end) => {
7528
7572
  if (onRangeChange) onRangeChange(start, end);
@@ -7713,8 +7757,8 @@ function Calendar({
7713
7757
  CalendarCaptionSelect,
7714
7758
  {
7715
7759
  value: String(month),
7716
- placeholder: monthName,
7717
- ariaLabel: `Month: ${monthName}`,
7760
+ placeholder: monthLabel,
7761
+ ariaLabel: `Month: ${monthNameLong}`,
7718
7762
  header: "caption-month",
7719
7763
  onValueChange: (nextMonth) => {
7720
7764
  setView(new Date(year, Number.parseInt(nextMonth, 10), 1));
@@ -7732,7 +7776,7 @@ function Calendar({
7732
7776
  onValueChange: (nextYear) => {
7733
7777
  setView(new Date(Number.parseInt(nextYear, 10), month, 1));
7734
7778
  },
7735
- children: yearOptionsForView(year).map((yearOption) => /* @__PURE__ */ jsx45(SelectItem, { value: String(yearOption), children: String(yearOption) }, yearOption))
7779
+ children: yearOptions.map((yearOption) => /* @__PURE__ */ jsx45(SelectItem, { value: String(yearOption), children: String(yearOption) }, yearOption))
7736
7780
  }
7737
7781
  ),
7738
7782
  /* @__PURE__ */ jsx45(
@@ -11000,6 +11044,89 @@ function useSidebarPeek() {
11000
11044
  return useSidebarPeekContext("useSidebarPeek");
11001
11045
  }
11002
11046
 
11047
+ // src/components/Sidebar/SidebarProvider.tsx
11048
+ import {
11049
+ createContext as createContext20,
11050
+ forwardRef as forwardRef14,
11051
+ useCallback as useCallback16,
11052
+ useContext as useContext22,
11053
+ useId as useId13,
11054
+ useMemo as useMemo16,
11055
+ useState as useState20
11056
+ } from "react";
11057
+ import { Slot as Slot3 } from "@refineui/utilities/react";
11058
+ import { jsx as jsx62 } from "react/jsx-runtime";
11059
+ var SidebarContext = createContext20(null);
11060
+ function useSidebarContext(component) {
11061
+ const value = useContext22(SidebarContext);
11062
+ if (!value) throw new Error(`${component} must be used within <SidebarProvider>.`);
11063
+ return value;
11064
+ }
11065
+ function useSidebar() {
11066
+ return useSidebarContext("useSidebar");
11067
+ }
11068
+ function SidebarProvider({
11069
+ open: openProp,
11070
+ defaultOpen = true,
11071
+ onOpenChange,
11072
+ id,
11073
+ children
11074
+ }) {
11075
+ const [uncontrolled, setUncontrolled] = useState20(defaultOpen);
11076
+ const open = openProp ?? uncontrolled;
11077
+ const generatedId = useId13();
11078
+ const sidebarId = id ?? generatedId;
11079
+ const toggle = useCallback16(() => {
11080
+ const next = !open;
11081
+ if (openProp === void 0) setUncontrolled(next);
11082
+ onOpenChange?.(next);
11083
+ }, [onOpenChange, open, openProp]);
11084
+ const value = useMemo16(
11085
+ () => ({ open, sidebarId, toggle }),
11086
+ [open, sidebarId, toggle]
11087
+ );
11088
+ return /* @__PURE__ */ jsx62(SidebarContext.Provider, { value, children });
11089
+ }
11090
+ var SidebarTrigger = forwardRef14(function SidebarTrigger2({
11091
+ asChild = false,
11092
+ onClick,
11093
+ className,
11094
+ children,
11095
+ variant = "secondary",
11096
+ size,
11097
+ layout,
11098
+ fullWidth,
11099
+ type = "button",
11100
+ ...props
11101
+ }, ref) {
11102
+ const { open, toggle, sidebarId } = useSidebarContext("SidebarTrigger");
11103
+ const shared = {
11104
+ ...props,
11105
+ ref,
11106
+ "aria-expanded": open,
11107
+ "aria-controls": sidebarId,
11108
+ "data-state": open ? "open" : "closed",
11109
+ className,
11110
+ onClick: (event) => {
11111
+ onClick?.(event);
11112
+ if (!event.defaultPrevented) toggle();
11113
+ }
11114
+ };
11115
+ if (asChild) return /* @__PURE__ */ jsx62(Slot3, { ...shared, children });
11116
+ return /* @__PURE__ */ jsx62(
11117
+ Button,
11118
+ {
11119
+ ...shared,
11120
+ type,
11121
+ variant,
11122
+ size,
11123
+ layout,
11124
+ fullWidth,
11125
+ children
11126
+ }
11127
+ );
11128
+ });
11129
+
11003
11130
  // src/components/Pagination/Pagination.tsx
11004
11131
  import { clsx as clsx84 } from "clsx";
11005
11132
  import { iconSizes as iconSizes17 } from "@refineui/tokens";
@@ -11020,18 +11147,18 @@ var paginationStyles = {
11020
11147
  };
11021
11148
 
11022
11149
  // src/components/Pagination/Pagination.tsx
11023
- import { jsx as jsx62 } from "react/jsx-runtime";
11150
+ import { jsx as jsx63 } from "react/jsx-runtime";
11024
11151
  function PaginationRoot({ className, ...props }) {
11025
- return /* @__PURE__ */ jsx62("nav", { "aria-label": "Pagination", className: clsx84(paginationStyles.root, className), ...props });
11152
+ return /* @__PURE__ */ jsx63("nav", { "aria-label": "Pagination", className: clsx84(paginationStyles.root, className), ...props });
11026
11153
  }
11027
11154
  function PaginationContent({ className, ...props }) {
11028
- return /* @__PURE__ */ jsx62("ul", { className: clsx84(paginationStyles.listWrap, className), ...props });
11155
+ return /* @__PURE__ */ jsx63("ul", { className: clsx84(paginationStyles.listWrap, className), ...props });
11029
11156
  }
11030
11157
  function PaginationItem({ className, ...props }) {
11031
- return /* @__PURE__ */ jsx62("li", { className, ...props });
11158
+ return /* @__PURE__ */ jsx63("li", { className, ...props });
11032
11159
  }
11033
11160
  function PaginationLink({ className, isActive, ...props }) {
11034
- return /* @__PURE__ */ jsx62(
11161
+ return /* @__PURE__ */ jsx63(
11035
11162
  "a",
11036
11163
  {
11037
11164
  "data-refineui": "pagination",
@@ -11051,7 +11178,7 @@ function PaginationNavButton({
11051
11178
  }) {
11052
11179
  const isPrev = direction === "prev";
11053
11180
  const iconColor = disabled ? resolveColorTokenValue9(componentColorTokens.pagination.navIcon.disabled) : resolveColorTokenValue9(componentColorTokens.pagination.navIcon.default);
11054
- return /* @__PURE__ */ jsx62(
11181
+ return /* @__PURE__ */ jsx63(
11055
11182
  "button",
11056
11183
  {
11057
11184
  type: "button",
@@ -11061,7 +11188,7 @@ function PaginationNavButton({
11061
11188
  "aria-label": isPrev ? "Previous page" : "Next page",
11062
11189
  className: clsx84(paginationStyles.itemShell, paginationStyles.nav, className),
11063
11190
  ...props,
11064
- children: /* @__PURE__ */ jsx62(
11191
+ children: /* @__PURE__ */ jsx63(
11065
11192
  WebIcon,
11066
11193
  {
11067
11194
  name: isPrev ? "chevron-left" : "chevron-right",
@@ -11074,13 +11201,13 @@ function PaginationNavButton({
11074
11201
  );
11075
11202
  }
11076
11203
  function PaginationPrevious(props) {
11077
- return /* @__PURE__ */ jsx62(PaginationNavButton, { direction: "prev", ...props });
11204
+ return /* @__PURE__ */ jsx63(PaginationNavButton, { direction: "prev", ...props });
11078
11205
  }
11079
11206
  function PaginationNext(props) {
11080
- return /* @__PURE__ */ jsx62(PaginationNavButton, { direction: "next", ...props });
11207
+ return /* @__PURE__ */ jsx63(PaginationNavButton, { direction: "next", ...props });
11081
11208
  }
11082
11209
  function PaginationEllipsis({ className, ...props }) {
11083
- return /* @__PURE__ */ jsx62(
11210
+ return /* @__PURE__ */ jsx63(
11084
11211
  "span",
11085
11212
  {
11086
11213
  "aria-hidden": true,
@@ -11088,7 +11215,7 @@ function PaginationEllipsis({ className, ...props }) {
11088
11215
  "data-ellipsis": "true",
11089
11216
  className: clsx84(paginationStyles.itemShell, paginationStyles.ellipsis, className),
11090
11217
  ...props,
11091
- children: /* @__PURE__ */ jsx62(
11218
+ children: /* @__PURE__ */ jsx63(
11092
11219
  WebIcon,
11093
11220
  {
11094
11221
  name: "more-horizontal",
@@ -11101,24 +11228,24 @@ function PaginationEllipsis({ className, ...props }) {
11101
11228
  );
11102
11229
  }
11103
11230
  function Pagination(props) {
11104
- return /* @__PURE__ */ jsx62(PaginationRoot, { ...props });
11231
+ return /* @__PURE__ */ jsx63(PaginationRoot, { ...props });
11105
11232
  }
11106
11233
 
11107
11234
  // src/components/PopOver/PopOver.tsx
11108
11235
  import { clsx as clsx85 } from "clsx";
11109
11236
  import {
11110
- createContext as createContext20,
11111
- useCallback as useCallback16,
11112
- useContext as useContext22,
11237
+ createContext as createContext21,
11238
+ useCallback as useCallback17,
11239
+ useContext as useContext23,
11113
11240
  useEffect as useEffect15,
11114
- useId as useId13,
11115
- useMemo as useMemo16,
11241
+ useId as useId14,
11242
+ useMemo as useMemo17,
11116
11243
  useRef as useRef17,
11117
- useState as useState20
11244
+ useState as useState21
11118
11245
  } from "react";
11119
11246
  import { spacings as spacings4, strokeWidths as strokeWidths2 } from "@refineui/tokens";
11120
11247
  import { resolveColorTokenValue as resolveColorTokenValue10 } from "@refineui/utilities/color";
11121
- import { Slot as Slot3, getMergeableTriggerChild as getMergeableTriggerChild3 } from "@refineui/utilities/react";
11248
+ import { Slot as Slot4, getMergeableTriggerChild as getMergeableTriggerChild3 } from "@refineui/utilities/react";
11122
11249
 
11123
11250
  // src/components/PopOver/style.ts
11124
11251
  var popoverStyles = {
@@ -11152,10 +11279,10 @@ function popoverFloatingClasses(placement, align) {
11152
11279
  }
11153
11280
 
11154
11281
  // src/components/PopOver/PopOver.tsx
11155
- import { jsx as jsx63, jsxs as jsxs24 } from "react/jsx-runtime";
11156
- var PopoverContext = createContext20(null);
11282
+ import { jsx as jsx64, jsxs as jsxs24 } from "react/jsx-runtime";
11283
+ var PopoverContext = createContext21(null);
11157
11284
  function usePopoverContext(component) {
11158
- const ctx = useContext22(PopoverContext);
11285
+ const ctx = useContext23(PopoverContext);
11159
11286
  if (!ctx) throw new Error(`${component} must be used within <Popover>`);
11160
11287
  return ctx;
11161
11288
  }
@@ -11211,20 +11338,20 @@ function floatingGapStyle(placement) {
11211
11338
  return { marginLeft: POPOVER_GAP };
11212
11339
  }
11213
11340
  function Popover({ children, className, open: openProp, defaultOpen = false, onOpenChange, ...props }) {
11214
- const [internalOpen, setInternalOpen] = useState20(defaultOpen);
11341
+ const [internalOpen, setInternalOpen] = useState21(defaultOpen);
11215
11342
  const open = openProp ?? internalOpen;
11216
- const setOpen = useCallback16(
11343
+ const setOpen = useCallback17(
11217
11344
  (next) => {
11218
11345
  if (openProp === void 0) setInternalOpen(next);
11219
11346
  onOpenChange?.(next);
11220
11347
  },
11221
11348
  [openProp, onOpenChange]
11222
11349
  );
11223
- const toggle = useCallback16(() => setOpen(!open), [open, setOpen]);
11350
+ const toggle = useCallback17(() => setOpen(!open), [open, setOpen]);
11224
11351
  const containerRef = useRef17(null);
11225
11352
  const contentRef = useRef17(null);
11226
11353
  const triggerRef = useRef17(null);
11227
- const contentId = useId13();
11354
+ const contentId = useId14();
11228
11355
  useEffect15(() => {
11229
11356
  const handler = (e) => {
11230
11357
  if (containerRef.current && !containerRef.current.contains(e.target)) setOpen(false);
@@ -11239,7 +11366,7 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
11239
11366
  if (open) document.addEventListener("keydown", onKey);
11240
11367
  return () => document.removeEventListener("keydown", onKey);
11241
11368
  }, [open, setOpen]);
11242
- const onTriggerKeyDown = useCallback16(
11369
+ const onTriggerKeyDown = useCallback17(
11243
11370
  (e) => {
11244
11371
  if (e.key === "Enter" || e.key === " ") {
11245
11372
  e.preventDefault();
@@ -11248,7 +11375,7 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
11248
11375
  },
11249
11376
  [toggle]
11250
11377
  );
11251
- const value = useMemo16(
11378
+ const value = useMemo17(
11252
11379
  () => ({
11253
11380
  open,
11254
11381
  setOpen,
@@ -11261,7 +11388,7 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
11261
11388
  }),
11262
11389
  [open, setOpen, toggle, contentId, onTriggerKeyDown]
11263
11390
  );
11264
- return /* @__PURE__ */ jsx63(PopoverContext.Provider, { value, children: /* @__PURE__ */ jsx63(
11391
+ return /* @__PURE__ */ jsx64(PopoverContext.Provider, { value, children: /* @__PURE__ */ jsx64(
11265
11392
  "div",
11266
11393
  {
11267
11394
  ref: containerRef,
@@ -11277,8 +11404,8 @@ function PopoverTrigger({ children, className, ...props }) {
11277
11404
  const mergeEl = getMergeableTriggerChild3(children);
11278
11405
  if (mergeEl) {
11279
11406
  const passthrough = props;
11280
- return /* @__PURE__ */ jsx63(
11281
- Slot3,
11407
+ return /* @__PURE__ */ jsx64(
11408
+ Slot4,
11282
11409
  {
11283
11410
  ref: triggerRef,
11284
11411
  ...props,
@@ -11299,7 +11426,7 @@ function PopoverTrigger({ children, className, ...props }) {
11299
11426
  );
11300
11427
  }
11301
11428
  const passthroughBtn = props;
11302
- return /* @__PURE__ */ jsx63(
11429
+ return /* @__PURE__ */ jsx64(
11303
11430
  "button",
11304
11431
  {
11305
11432
  type: "button",
@@ -11342,7 +11469,7 @@ function PopoverContent({
11342
11469
  const rot = beakRotateDeg(placement);
11343
11470
  const gapStyle = floatingGapStyle(placement);
11344
11471
  if (!open) return null;
11345
- return /* @__PURE__ */ jsx63(
11472
+ return /* @__PURE__ */ jsx64(
11346
11473
  "div",
11347
11474
  {
11348
11475
  className: clsx85(
@@ -11351,7 +11478,7 @@ function PopoverContent({
11351
11478
  ),
11352
11479
  style: gapStyle,
11353
11480
  children: /* @__PURE__ */ jsxs24("div", { className: popoverStyles.panelWrap, children: [
11354
- /* @__PURE__ */ jsx63("div", { className: popoverStyles.beakWrap, style: { ...bw, width: BEAK_W, height: BEAK_H }, "aria-hidden": true, children: /* @__PURE__ */ jsx63(
11481
+ /* @__PURE__ */ jsx64("div", { className: popoverStyles.beakWrap, style: { ...bw, width: BEAK_W, height: BEAK_H }, "aria-hidden": true, children: /* @__PURE__ */ jsx64(
11355
11482
  "div",
11356
11483
  {
11357
11484
  style: {
@@ -11370,14 +11497,14 @@ function PopoverContent({
11370
11497
  xmlns: "http://www.w3.org/2000/svg",
11371
11498
  style: { display: "block" },
11372
11499
  children: [
11373
- /* @__PURE__ */ jsx63("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
11374
- /* @__PURE__ */ jsx63("polygon", { points: "8,2 2,8 14,8", fill: bg })
11500
+ /* @__PURE__ */ jsx64("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
11501
+ /* @__PURE__ */ jsx64("polygon", { points: "8,2 2,8 14,8", fill: bg })
11375
11502
  ]
11376
11503
  }
11377
11504
  )
11378
11505
  }
11379
11506
  ) }),
11380
- /* @__PURE__ */ jsx63(
11507
+ /* @__PURE__ */ jsx64(
11381
11508
  "div",
11382
11509
  {
11383
11510
  ref: contentRef,
@@ -11418,8 +11545,8 @@ function PopOver({
11418
11545
  ...props
11419
11546
  }) {
11420
11547
  return /* @__PURE__ */ jsxs24(Popover, { className, ...props, children: [
11421
- /* @__PURE__ */ jsx63(PopoverTrigger, { children: trigger }),
11422
- /* @__PURE__ */ jsx63(PopoverContent, { placement, align, children: content })
11548
+ /* @__PURE__ */ jsx64(PopoverTrigger, { children: trigger }),
11549
+ /* @__PURE__ */ jsx64(PopoverContent, { placement, align, children: content })
11423
11550
  ] });
11424
11551
  }
11425
11552
 
@@ -11435,7 +11562,7 @@ var skeletonStyles = {
11435
11562
  };
11436
11563
 
11437
11564
  // src/components/Skeleton/Skeleton.tsx
11438
- import { jsx as jsx64 } from "react/jsx-runtime";
11565
+ import { jsx as jsx65 } from "react/jsx-runtime";
11439
11566
  function Skeleton({
11440
11567
  width,
11441
11568
  height,
@@ -11467,7 +11594,7 @@ function Skeleton({
11467
11594
  w = width ?? "100%";
11468
11595
  }
11469
11596
  const dimStyle = { width: w, height: h };
11470
- return /* @__PURE__ */ jsx64(
11597
+ return /* @__PURE__ */ jsx65(
11471
11598
  "div",
11472
11599
  {
11473
11600
  "data-refineui": "skeleton",
@@ -11485,7 +11612,7 @@ function Skeleton({
11485
11612
 
11486
11613
  // src/components/Slider/Slider.tsx
11487
11614
  import { clsx as clsx87 } from "clsx";
11488
- import { useState as useState21 } from "react";
11615
+ import { useState as useState22 } from "react";
11489
11616
 
11490
11617
  // src/components/Slider/style.ts
11491
11618
  var sliderStyles = {
@@ -11493,7 +11620,7 @@ var sliderStyles = {
11493
11620
  };
11494
11621
 
11495
11622
  // src/components/Slider/Slider.tsx
11496
- import { jsx as jsx65 } from "react/jsx-runtime";
11623
+ import { jsx as jsx66 } from "react/jsx-runtime";
11497
11624
  function clampPct(n) {
11498
11625
  if (Number.isNaN(n)) return 0;
11499
11626
  return Math.min(100, Math.max(0, n));
@@ -11511,12 +11638,12 @@ function Slider({
11511
11638
  style,
11512
11639
  ...props
11513
11640
  }) {
11514
- const [internalFillPct, setInternalFillPct] = useState21(() => {
11641
+ const [internalFillPct, setInternalFillPct] = useState22(() => {
11515
11642
  const v = defaultValue !== void 0 ? Number(defaultValue) : (min + max) / 2;
11516
11643
  return clampPct((v - min) / (max - min) * 100);
11517
11644
  });
11518
11645
  const fillPct = value !== void 0 ? clampPct((Number(value) - min) / (max - min) * 100) : internalFillPct;
11519
- return /* @__PURE__ */ jsx65(
11646
+ return /* @__PURE__ */ jsx66(
11520
11647
  "input",
11521
11648
  {
11522
11649
  type: "range",
@@ -11556,16 +11683,16 @@ import { iconSizes as iconSizes18 } from "@refineui/tokens";
11556
11683
  import {
11557
11684
  Children as Children6,
11558
11685
  cloneElement as cloneElement2,
11559
- createContext as createContext21,
11560
- forwardRef as forwardRef14,
11686
+ createContext as createContext22,
11687
+ forwardRef as forwardRef15,
11561
11688
  isValidElement as isValidElement5,
11562
- useCallback as useCallback17,
11563
- useContext as useContext23,
11689
+ useCallback as useCallback18,
11690
+ useContext as useContext24,
11564
11691
  useEffect as useEffect16,
11565
11692
  useLayoutEffect as useLayoutEffect9,
11566
- useMemo as useMemo17,
11693
+ useMemo as useMemo18,
11567
11694
  useRef as useRef18,
11568
- useState as useState22
11695
+ useState as useState23
11569
11696
  } from "react";
11570
11697
 
11571
11698
  // src/components/Carousel/style.ts
@@ -11598,11 +11725,11 @@ var carouselStyles = {
11598
11725
  };
11599
11726
 
11600
11727
  // src/components/Carousel/Carousel.tsx
11601
- import { jsx as jsx66, jsxs as jsxs25 } from "react/jsx-runtime";
11728
+ import { jsx as jsx67, jsxs as jsxs25 } from "react/jsx-runtime";
11602
11729
  var DRAG_COMMIT_RATIO = 0.18;
11603
- var CarouselContext = createContext21(null);
11730
+ var CarouselContext = createContext22(null);
11604
11731
  function useCarouselContext(component) {
11605
- const v = useContext23(CarouselContext);
11732
+ const v = useContext24(CarouselContext);
11606
11733
  if (!v) throw new Error(`${component} must be used within Carousel.`);
11607
11734
  return v;
11608
11735
  }
@@ -11621,13 +11748,13 @@ function Carousel({
11621
11748
  ...props
11622
11749
  }) {
11623
11750
  const isControlled = indexControlled !== void 0;
11624
- const [internalIndex, setInternalIndex] = useState22(defaultIndex);
11625
- const [count, setCount] = useState22(0);
11626
- const [trackIndex, setTrackIndex] = useState22(defaultIndex);
11627
- const [instant, setInstant] = useState22(false);
11751
+ const [internalIndex, setInternalIndex] = useState23(defaultIndex);
11752
+ const [count, setCount] = useState23(0);
11753
+ const [trackIndex, setTrackIndex] = useState23(defaultIndex);
11754
+ const [instant, setInstant] = useState23(false);
11628
11755
  const index = isControlled ? indexControlled : internalIndex;
11629
11756
  const loopActive = loop && count > 1;
11630
- const commitLogical = useCallback17(
11757
+ const commitLogical = useCallback18(
11631
11758
  (next) => {
11632
11759
  const normalized = clampIndex(next, Math.max(count, 1));
11633
11760
  if (!isControlled) setInternalIndex(normalized);
@@ -11655,7 +11782,7 @@ function Carousel({
11655
11782
  }, [index, count, loopActive]);
11656
11783
  const canScrollPrev = loopActive ? true : index > 0;
11657
11784
  const canScrollNext = loopActive ? true : index < count - 1;
11658
- const scrollTo = useCallback17(
11785
+ const scrollTo = useCallback18(
11659
11786
  (i) => {
11660
11787
  if (count <= 0) return;
11661
11788
  const next = clampIndex(i, count);
@@ -11664,7 +11791,7 @@ function Carousel({
11664
11791
  },
11665
11792
  [commitLogical, count, loopActive]
11666
11793
  );
11667
- const scrollPrev = useCallback17(() => {
11794
+ const scrollPrev = useCallback18(() => {
11668
11795
  if (count <= 0) return;
11669
11796
  if (loopActive) {
11670
11797
  if (trackIndex < 1 || trackIndex > count) return;
@@ -11677,7 +11804,7 @@ function Carousel({
11677
11804
  setTrackIndex(index - 1);
11678
11805
  }
11679
11806
  }, [commitLogical, count, index, loopActive, trackIndex]);
11680
- const scrollNext = useCallback17(() => {
11807
+ const scrollNext = useCallback18(() => {
11681
11808
  if (count <= 0) return;
11682
11809
  if (loopActive) {
11683
11810
  if (trackIndex < 1 || trackIndex > count) return;
@@ -11690,7 +11817,7 @@ function Carousel({
11690
11817
  setTrackIndex(index + 1);
11691
11818
  }
11692
11819
  }, [commitLogical, count, index, loopActive, trackIndex]);
11693
- const onTrackSettled = useCallback17(() => {
11820
+ const onTrackSettled = useCallback18(() => {
11694
11821
  if (!loopActive) return;
11695
11822
  if (trackIndex === 0) {
11696
11823
  setInstant(true);
@@ -11706,7 +11833,7 @@ function Carousel({
11706
11833
  });
11707
11834
  }
11708
11835
  }, [count, loopActive, trackIndex]);
11709
- const ctx = useMemo17(
11836
+ const ctx = useMemo18(
11710
11837
  () => ({
11711
11838
  index,
11712
11839
  count,
@@ -11761,7 +11888,7 @@ function Carousel({
11761
11888
  break;
11762
11889
  }
11763
11890
  };
11764
- return /* @__PURE__ */ jsx66(CarouselContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx66(
11891
+ return /* @__PURE__ */ jsx67(CarouselContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx67(
11765
11892
  "div",
11766
11893
  {
11767
11894
  "data-refineui": "carousel",
@@ -11787,8 +11914,8 @@ function CarouselContent({ className, children, ...props }) {
11787
11914
  } = useCarouselContext("CarouselContent");
11788
11915
  const viewportRef = useRef18(null);
11789
11916
  const dragStartX = useRef18(null);
11790
- const [dragPx, setDragPx] = useState22(0);
11791
- const [dragging, setDragging] = useState22(false);
11917
+ const [dragPx, setDragPx] = useState23(0);
11918
+ const [dragging, setDragging] = useState23(false);
11792
11919
  const slides = Children6.toArray(children).filter(isValidElement5);
11793
11920
  const slideCount = slides.length;
11794
11921
  useEffect16(() => {
@@ -11799,7 +11926,7 @@ function CarouselContent({ className, children, ...props }) {
11799
11926
  ...slides,
11800
11927
  cloneElement2(slides[0], { key: "__carousel-clone-first" })
11801
11928
  ] : slides;
11802
- const endDrag = useCallback17(
11929
+ const endDrag = useCallback18(
11803
11930
  (clientX) => {
11804
11931
  if (dragStartX.current == null) return;
11805
11932
  const width = viewportRef.current?.offsetWidth ?? 1;
@@ -11848,7 +11975,7 @@ function CarouselContent({ className, children, ...props }) {
11848
11975
  };
11849
11976
  const animated = !dragging && !instant;
11850
11977
  const transform = dragPx !== 0 ? `translate3d(calc(-${trackIndex * 100}% + ${dragPx}px), 0, 0)` : `translate3d(-${trackIndex * 100}%, 0, 0)`;
11851
- return /* @__PURE__ */ jsx66(
11978
+ return /* @__PURE__ */ jsx67(
11852
11979
  "div",
11853
11980
  {
11854
11981
  ref: viewportRef,
@@ -11859,7 +11986,7 @@ function CarouselContent({ className, children, ...props }) {
11859
11986
  onPointerMove,
11860
11987
  onPointerUp,
11861
11988
  onPointerCancel,
11862
- children: /* @__PURE__ */ jsx66(
11989
+ children: /* @__PURE__ */ jsx67(
11863
11990
  "div",
11864
11991
  {
11865
11992
  "data-refineui": "carousel-track",
@@ -11874,9 +12001,9 @@ function CarouselContent({ className, children, ...props }) {
11874
12001
  }
11875
12002
  );
11876
12003
  }
11877
- var CarouselItem = forwardRef14(function CarouselItem2({ className, children, ...props }, ref) {
12004
+ var CarouselItem = forwardRef15(function CarouselItem2({ className, children, ...props }, ref) {
11878
12005
  useCarouselContext("CarouselItem");
11879
- return /* @__PURE__ */ jsx66(
12006
+ return /* @__PURE__ */ jsx67(
11880
12007
  "div",
11881
12008
  {
11882
12009
  ref,
@@ -11891,12 +12018,12 @@ var CarouselItem = forwardRef14(function CarouselItem2({ className, children, ..
11891
12018
  });
11892
12019
  function CarouselControls({ className, children, ...props }) {
11893
12020
  useCarouselContext("CarouselControls");
11894
- return /* @__PURE__ */ jsx66("div", { "data-refineui": "carousel-controls", className: clsx89(carouselStyles.controls, className), ...props, children });
12021
+ return /* @__PURE__ */ jsx67("div", { "data-refineui": "carousel-controls", className: clsx89(carouselStyles.controls, className), ...props, children });
11895
12022
  }
11896
12023
  function CarouselPrevious({ className, disabled, onClick, ...props }) {
11897
12024
  const { scrollPrev, canScrollPrev } = useCarouselContext("CarouselPrevious");
11898
12025
  const isDisabled = disabled || !canScrollPrev;
11899
- return /* @__PURE__ */ jsx66(
12026
+ return /* @__PURE__ */ jsx67(
11900
12027
  Button,
11901
12028
  {
11902
12029
  variant: "outline",
@@ -11912,7 +12039,7 @@ function CarouselPrevious({ className, disabled, onClick, ...props }) {
11912
12039
  onClick?.(e);
11913
12040
  if (!e.defaultPrevented && !isDisabled) scrollPrev();
11914
12041
  },
11915
- children: /* @__PURE__ */ jsx66(
12042
+ children: /* @__PURE__ */ jsx67(
11916
12043
  WebIcon,
11917
12044
  {
11918
12045
  name: "chevron-left",
@@ -11928,7 +12055,7 @@ function CarouselPrevious({ className, disabled, onClick, ...props }) {
11928
12055
  function CarouselNext({ className, disabled, onClick, ...props }) {
11929
12056
  const { scrollNext, canScrollNext } = useCarouselContext("CarouselNext");
11930
12057
  const isDisabled = disabled || !canScrollNext;
11931
- return /* @__PURE__ */ jsx66(
12058
+ return /* @__PURE__ */ jsx67(
11932
12059
  Button,
11933
12060
  {
11934
12061
  variant: "outline",
@@ -11944,7 +12071,7 @@ function CarouselNext({ className, disabled, onClick, ...props }) {
11944
12071
  onClick?.(e);
11945
12072
  if (!e.defaultPrevented && !isDisabled) scrollNext();
11946
12073
  },
11947
- children: /* @__PURE__ */ jsx66(
12074
+ children: /* @__PURE__ */ jsx67(
11948
12075
  WebIcon,
11949
12076
  {
11950
12077
  name: "chevron-right",
@@ -11960,8 +12087,8 @@ function CarouselNext({ className, disabled, onClick, ...props }) {
11960
12087
  function CarouselIndicators({ className, ...props }) {
11961
12088
  const { count, index, scrollTo } = useCarouselContext("CarouselIndicators");
11962
12089
  const trackRef = useRef18(null);
11963
- const [thumb, setThumb] = useState22({ width: 0, x: 0, ready: false });
11964
- const updateThumb = useCallback17(() => {
12090
+ const [thumb, setThumb] = useState23({ width: 0, x: 0, ready: false });
12091
+ const updateThumb = useCallback18(() => {
11965
12092
  const el = trackRef.current;
11966
12093
  if (!el || count <= 0) {
11967
12094
  setThumb({ width: 0, x: 0, ready: false });
@@ -12001,7 +12128,7 @@ function CarouselIndicators({ className, ...props }) {
12001
12128
  className: clsx89(carouselStyles.indicators, className),
12002
12129
  ...props,
12003
12130
  children: [
12004
- /* @__PURE__ */ jsx66(
12131
+ /* @__PURE__ */ jsx67(
12005
12132
  "span",
12006
12133
  {
12007
12134
  "data-refineui": "carousel-indicator-thumb",
@@ -12011,7 +12138,7 @@ function CarouselIndicators({ className, ...props }) {
12011
12138
  style: thumbStyle
12012
12139
  }
12013
12140
  ),
12014
- /* @__PURE__ */ jsx66("div", { "data-refineui": "carousel-indicator-hits", className: carouselStyles.indicatorHitRow, children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx66(
12141
+ /* @__PURE__ */ jsx67("div", { "data-refineui": "carousel-indicator-hits", className: carouselStyles.indicatorHitRow, children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx67(
12015
12142
  "button",
12016
12143
  {
12017
12144
  type: "button",
@@ -12034,9 +12161,9 @@ function CarouselIndicators({ className, ...props }) {
12034
12161
  import { clsx as clsx91 } from "clsx";
12035
12162
  import {
12036
12163
  Children as Children7,
12037
- createContext as createContext22,
12164
+ createContext as createContext23,
12038
12165
  isValidElement as isValidElement6,
12039
- useContext as useContext24
12166
+ useContext as useContext25
12040
12167
  } from "react";
12041
12168
 
12042
12169
  // src/components/Bubble/style.ts
@@ -12102,10 +12229,10 @@ var bubbleContentVariantClass = {
12102
12229
  };
12103
12230
 
12104
12231
  // src/components/Bubble/Bubble.tsx
12105
- import { jsx as jsx67, jsxs as jsxs26 } from "react/jsx-runtime";
12106
- var BubbleContext = createContext22(null);
12232
+ import { jsx as jsx68, jsxs as jsxs26 } from "react/jsx-runtime";
12233
+ var BubbleContext = createContext23(null);
12107
12234
  function useBubbleContext(component) {
12108
- const value = useContext24(BubbleContext);
12235
+ const value = useContext25(BubbleContext);
12109
12236
  if (!value) throw new Error(`${component} must be used within Bubble.`);
12110
12237
  return value;
12111
12238
  }
@@ -12134,7 +12261,7 @@ function partitionBubbleChildren(children) {
12134
12261
  };
12135
12262
  }
12136
12263
  function BubbleGroup({ className, ...props }) {
12137
- return /* @__PURE__ */ jsx67(
12264
+ return /* @__PURE__ */ jsx68(
12138
12265
  "div",
12139
12266
  {
12140
12267
  "data-refineui": "bubble-group",
@@ -12153,7 +12280,7 @@ function Bubble({
12153
12280
  }) {
12154
12281
  const rootStyle = variant === "ghost" ? style : { maxWidth: BUBBLE_MAX_WIDTH, ...style };
12155
12282
  const { top, middle, bottom, hasTop, hasBottom } = partitionBubbleChildren(children);
12156
- return /* @__PURE__ */ jsx67(BubbleContext.Provider, { value: { variant, align }, children: /* @__PURE__ */ jsx67(
12283
+ return /* @__PURE__ */ jsx68(BubbleContext.Provider, { value: { variant, align }, children: /* @__PURE__ */ jsx68(
12157
12284
  "div",
12158
12285
  {
12159
12286
  "data-refineui": "bubble",
@@ -12178,7 +12305,7 @@ function Bubble({
12178
12305
  }
12179
12306
  function BubbleContent({ className, ...props }) {
12180
12307
  const { variant } = useBubbleContext("BubbleContent");
12181
- return /* @__PURE__ */ jsx67(
12308
+ return /* @__PURE__ */ jsx68(
12182
12309
  "div",
12183
12310
  {
12184
12311
  "data-refineui": "bubble-content",
@@ -12199,7 +12326,7 @@ function BubbleReactions({
12199
12326
  }) {
12200
12327
  const { align: bubbleAlign } = useBubbleContext("BubbleReactions");
12201
12328
  const align = alignProp ?? (bubbleAlign === "start" ? "end" : "start");
12202
- return /* @__PURE__ */ jsx67(
12329
+ return /* @__PURE__ */ jsx68(
12203
12330
  "div",
12204
12331
  {
12205
12332
  "data-refineui": "bubble-reactions",
@@ -12220,12 +12347,12 @@ function BubbleReactions({
12220
12347
  import { clsx as clsx93 } from "clsx";
12221
12348
  import { iconSizes as iconSizes19 } from "@refineui/tokens";
12222
12349
  import {
12223
- createContext as createContext23,
12224
- useCallback as useCallback18,
12225
- useContext as useContext25,
12226
- useMemo as useMemo18,
12350
+ createContext as createContext24,
12351
+ useCallback as useCallback19,
12352
+ useContext as useContext26,
12353
+ useMemo as useMemo19,
12227
12354
  useRef as useRef19,
12228
- useState as useState23
12355
+ useState as useState24
12229
12356
  } from "react";
12230
12357
 
12231
12358
  // src/components/Stepper/style.ts
@@ -12334,17 +12461,17 @@ var stepperConnectorVars = {
12334
12461
  };
12335
12462
 
12336
12463
  // src/components/Stepper/Stepper.tsx
12337
- import { jsx as jsx68, jsxs as jsxs27 } from "react/jsx-runtime";
12338
- var StepperContext = createContext23(null);
12339
- var StepperItemContext = createContext23(null);
12340
- var StepperListRegistryContext = createContext23(null);
12464
+ import { jsx as jsx69, jsxs as jsxs27 } from "react/jsx-runtime";
12465
+ var StepperContext = createContext24(null);
12466
+ var StepperItemContext = createContext24(null);
12467
+ var StepperListRegistryContext = createContext24(null);
12341
12468
  function useStepperContext(component) {
12342
- const v = useContext25(StepperContext);
12469
+ const v = useContext26(StepperContext);
12343
12470
  if (!v) throw new Error(`${component} must be used within Stepper.`);
12344
12471
  return v;
12345
12472
  }
12346
12473
  function useStepperItemContext(component) {
12347
- const v = useContext25(StepperItemContext);
12474
+ const v = useContext26(StepperItemContext);
12348
12475
  if (!v) throw new Error(`${component} must be used within StepperItem.`);
12349
12476
  return v;
12350
12477
  }
@@ -12364,16 +12491,16 @@ function Stepper({
12364
12491
  ...props
12365
12492
  }) {
12366
12493
  const isControlled = valueControlled !== void 0;
12367
- const [internalValue, setInternalValue] = useState23(defaultValue);
12494
+ const [internalValue, setInternalValue] = useState24(defaultValue);
12368
12495
  const value = isControlled ? valueControlled : internalValue;
12369
- const setValue = useCallback18(
12496
+ const setValue = useCallback19(
12370
12497
  (next) => {
12371
12498
  if (!isControlled) setInternalValue(next);
12372
12499
  onValueChange?.(next);
12373
12500
  },
12374
12501
  [isControlled, onValueChange]
12375
12502
  );
12376
- const ctx = useMemo18(
12503
+ const ctx = useMemo19(
12377
12504
  () => ({
12378
12505
  value,
12379
12506
  setValue,
@@ -12382,7 +12509,7 @@ function Stepper({
12382
12509
  }),
12383
12510
  [value, setValue, orientation, onValueChange, isControlled]
12384
12511
  );
12385
- return /* @__PURE__ */ jsx68(StepperContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx68(
12512
+ return /* @__PURE__ */ jsx69(StepperContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx69(
12386
12513
  "div",
12387
12514
  {
12388
12515
  "data-refineui": "stepper",
@@ -12398,7 +12525,7 @@ function StepperList({ className, children, ...props }) {
12398
12525
  const { orientation, value } = useStepperContext("StepperList");
12399
12526
  const cursorRef = useRef19(null);
12400
12527
  cursorRef.current = null;
12401
- const registry = useMemo18(
12528
+ const registry = useMemo19(
12402
12529
  () => ({
12403
12530
  noteItem(itemValue) {
12404
12531
  cursorRef.current = itemValue;
@@ -12410,7 +12537,7 @@ function StepperList({ className, children, ...props }) {
12410
12537
  }),
12411
12538
  [value]
12412
12539
  );
12413
- return /* @__PURE__ */ jsx68(StepperListRegistryContext.Provider, { value: registry, children: /* @__PURE__ */ jsx68(
12540
+ return /* @__PURE__ */ jsx69(StepperListRegistryContext.Provider, { value: registry, children: /* @__PURE__ */ jsx69(
12414
12541
  "ol",
12415
12542
  {
12416
12543
  "data-refineui": "stepper-list",
@@ -12435,7 +12562,7 @@ function StepperItem({
12435
12562
  ...props
12436
12563
  }) {
12437
12564
  const { value, setValue, orientation, interactive } = useStepperContext("StepperItem");
12438
- const registry = useContext25(StepperListRegistryContext);
12565
+ const registry = useContext26(StepperListRegistryContext);
12439
12566
  registry?.noteItem(itemValue);
12440
12567
  const state = resolveState2(itemValue, value);
12441
12568
  const canActivate = interactive && !disabled;
@@ -12451,11 +12578,11 @@ function StepperItem({
12451
12578
  activate();
12452
12579
  }
12453
12580
  };
12454
- const itemCtx = useMemo18(
12581
+ const itemCtx = useMemo19(
12455
12582
  () => ({ state, disabled }),
12456
12583
  [state, disabled]
12457
12584
  );
12458
- return /* @__PURE__ */ jsx68(StepperItemContext.Provider, { value: itemCtx, children: /* @__PURE__ */ jsx68(
12585
+ return /* @__PURE__ */ jsx69(StepperItemContext.Provider, { value: itemCtx, children: /* @__PURE__ */ jsx69(
12459
12586
  "li",
12460
12587
  {
12461
12588
  "data-refineui": "stepper-item",
@@ -12483,7 +12610,7 @@ function StepperItem({
12483
12610
  function StepperIndicator({ className, children, ...props }) {
12484
12611
  const { state } = useStepperItemContext("StepperIndicator");
12485
12612
  const stateClass = state === "complete" ? stepperStyles.indicatorComplete : state === "current" ? stepperStyles.indicatorCurrent : stepperStyles.indicatorUpcoming;
12486
- const content = state === "upcoming" ? children : /* @__PURE__ */ jsx68(
12613
+ const content = state === "upcoming" ? children : /* @__PURE__ */ jsx69(
12487
12614
  WebIcon,
12488
12615
  {
12489
12616
  name: "checkmark",
@@ -12494,7 +12621,7 @@ function StepperIndicator({ className, children, ...props }) {
12494
12621
  className: "items-center justify-center"
12495
12622
  }
12496
12623
  );
12497
- return /* @__PURE__ */ jsx68(
12624
+ return /* @__PURE__ */ jsx69(
12498
12625
  "span",
12499
12626
  {
12500
12627
  "data-refineui": "stepper-indicator",
@@ -12509,7 +12636,7 @@ function StepperIndicator({ className, children, ...props }) {
12509
12636
  function StepperContent({ className, ...props }) {
12510
12637
  const { orientation } = useStepperContext("StepperContent");
12511
12638
  useStepperItemContext("StepperContent");
12512
- return /* @__PURE__ */ jsx68(
12639
+ return /* @__PURE__ */ jsx69(
12513
12640
  "div",
12514
12641
  {
12515
12642
  "data-refineui": "stepper-content",
@@ -12525,7 +12652,7 @@ function StepperContent({ className, ...props }) {
12525
12652
  function StepperTitle({ className, ...props }) {
12526
12653
  const { state } = useStepperItemContext("StepperTitle");
12527
12654
  const stateClass = state === "complete" ? stepperStyles.titleComplete : state === "current" ? stepperStyles.titleCurrent : stepperStyles.titleUpcoming;
12528
- return /* @__PURE__ */ jsx68(
12655
+ return /* @__PURE__ */ jsx69(
12529
12656
  "span",
12530
12657
  {
12531
12658
  "data-refineui": "stepper-title",
@@ -12538,7 +12665,7 @@ function StepperTitle({ className, ...props }) {
12538
12665
  function StepperDescription({ className, ...props }) {
12539
12666
  const { state } = useStepperItemContext("StepperDescription");
12540
12667
  const stateClass = state === "complete" ? stepperStyles.descriptionComplete : state === "current" ? stepperStyles.descriptionCurrent : stepperStyles.descriptionUpcoming;
12541
- return /* @__PURE__ */ jsx68(
12668
+ return /* @__PURE__ */ jsx69(
12542
12669
  "span",
12543
12670
  {
12544
12671
  "data-refineui": "stepper-description",
@@ -12550,10 +12677,10 @@ function StepperDescription({ className, ...props }) {
12550
12677
  }
12551
12678
  function StepperSeparator({ className, ...props }) {
12552
12679
  const { orientation } = useStepperContext("StepperSeparator");
12553
- const registry = useContext25(StepperListRegistryContext);
12680
+ const registry = useContext26(StepperListRegistryContext);
12554
12681
  const state = registry?.takeSeparatorState() ?? "upcoming";
12555
12682
  const vertical = orientation === "vertical";
12556
- return /* @__PURE__ */ jsx68(
12683
+ return /* @__PURE__ */ jsx69(
12557
12684
  "li",
12558
12685
  {
12559
12686
  "data-refineui": "stepper-separator",
@@ -12576,14 +12703,14 @@ function StepperSeparator({ className, ...props }) {
12576
12703
  vertical ? stepperStyles.separatorRailVertical : stepperStyles.separatorRailHorizontal
12577
12704
  ),
12578
12705
  children: [
12579
- /* @__PURE__ */ jsx68(
12706
+ /* @__PURE__ */ jsx69(
12580
12707
  "span",
12581
12708
  {
12582
12709
  "data-refineui": "stepper-separator-track",
12583
12710
  className: stepperStyles.separatorTrack
12584
12711
  }
12585
12712
  ),
12586
- /* @__PURE__ */ jsx68(
12713
+ /* @__PURE__ */ jsx69(
12587
12714
  "span",
12588
12715
  {
12589
12716
  "data-refineui": "stepper-separator-fill",
@@ -12612,14 +12739,14 @@ StepperSeparator.displayName = "StepperSeparator";
12612
12739
  // src/components/Resizable/Resizable.tsx
12613
12740
  import { clsx as clsx95 } from "clsx";
12614
12741
  import {
12615
- createContext as createContext24,
12616
- useCallback as useCallback19,
12617
- useContext as useContext26,
12618
- useId as useId14,
12742
+ createContext as createContext25,
12743
+ useCallback as useCallback20,
12744
+ useContext as useContext27,
12745
+ useId as useId15,
12619
12746
  useLayoutEffect as useLayoutEffect10,
12620
- useMemo as useMemo19,
12747
+ useMemo as useMemo20,
12621
12748
  useRef as useRef20,
12622
- useState as useState24
12749
+ useState as useState25
12623
12750
  } from "react";
12624
12751
 
12625
12752
  // src/components/Resizable/style.ts
@@ -12655,15 +12782,15 @@ var resizableStyles = {
12655
12782
  };
12656
12783
 
12657
12784
  // src/components/Resizable/Resizable.tsx
12658
- import { jsx as jsx69 } from "react/jsx-runtime";
12785
+ import { jsx as jsx70 } from "react/jsx-runtime";
12659
12786
  var KEYBOARD_STEP = 2;
12660
12787
  var KEYBOARD_STEP_LARGE = 10;
12661
12788
  var DEFAULT_SIZE = 50;
12662
12789
  var DEFAULT_MIN_SIZE = 10;
12663
12790
  var DEFAULT_MAX_SIZE = 100;
12664
- var ResizableContext = createContext24(null);
12791
+ var ResizableContext = createContext25(null);
12665
12792
  function useResizableContext(component) {
12666
- const v = useContext26(ResizableContext);
12793
+ const v = useContext27(ResizableContext);
12667
12794
  if (!v) throw new Error(`${component} must be used within ResizablePanelGroup.`);
12668
12795
  return v;
12669
12796
  }
@@ -12725,10 +12852,10 @@ function ResizablePanelGroup({
12725
12852
  const groupRef = useRef20(null);
12726
12853
  const panelsRef = useRef20(/* @__PURE__ */ new Map());
12727
12854
  const orderCounterRef = useRef20(0);
12728
- const [sizes, setSizes] = useState24({});
12855
+ const [sizes, setSizes] = useState25({});
12729
12856
  const onLayoutRef = useRef20(onLayout);
12730
12857
  onLayoutRef.current = onLayout;
12731
- const syncInitialSizes = useCallback19(() => {
12858
+ const syncInitialSizes = useCallback20(() => {
12732
12859
  const panels = [...panelsRef.current.values()].sort((a, b) => a.order - b.order);
12733
12860
  if (panels.length === 0) return;
12734
12861
  setSizes((prev) => {
@@ -12763,7 +12890,7 @@ function ResizablePanelGroup({
12763
12890
  return base;
12764
12891
  });
12765
12892
  }, []);
12766
- const registerPanel = useCallback19(
12893
+ const registerPanel = useCallback20(
12767
12894
  (panel) => {
12768
12895
  const existing = panelsRef.current.get(panel.id);
12769
12896
  const order = existing?.order ?? orderCounterRef.current++;
@@ -12772,7 +12899,7 @@ function ResizablePanelGroup({
12772
12899
  },
12773
12900
  [syncInitialSizes]
12774
12901
  );
12775
- const unregisterPanel = useCallback19((id) => {
12902
+ const unregisterPanel = useCallback20((id) => {
12776
12903
  panelsRef.current.delete(id);
12777
12904
  setSizes((prev) => {
12778
12905
  if (!(id in prev)) return prev;
@@ -12781,13 +12908,13 @@ function ResizablePanelGroup({
12781
12908
  return next;
12782
12909
  });
12783
12910
  }, []);
12784
- const getPanel = useCallback19((id) => panelsRef.current.get(id), []);
12785
- const emitPanelResize = useCallback19((next) => {
12911
+ const getPanel = useCallback20((id) => panelsRef.current.get(id), []);
12912
+ const emitPanelResize = useCallback20((next) => {
12786
12913
  for (const [id, size] of Object.entries(next)) {
12787
12914
  panelsRef.current.get(id)?.onResize?.(size);
12788
12915
  }
12789
12916
  }, []);
12790
- const resizeBetween = useCallback19(
12917
+ const resizeBetween = useCallback20(
12791
12918
  (leftId, rightId, deltaPct) => {
12792
12919
  setSizes((prev) => {
12793
12920
  const next = applyResize(
@@ -12804,7 +12931,7 @@ function ResizablePanelGroup({
12804
12931
  },
12805
12932
  [emitPanelResize]
12806
12933
  );
12807
- const setBetween = useCallback19(
12934
+ const setBetween = useCallback20(
12808
12935
  (leftId, rightId, leftSize) => {
12809
12936
  setSizes((prev) => {
12810
12937
  const left = panelsRef.current.get(leftId);
@@ -12835,7 +12962,7 @@ function ResizablePanelGroup({
12835
12962
  if (ids.some((id) => sizes[id] === void 0)) return;
12836
12963
  onLayoutRef.current?.(ids.map((id) => sizes[id]));
12837
12964
  }, [sizes]);
12838
- const ctx = useMemo19(
12965
+ const ctx = useMemo20(
12839
12966
  () => ({
12840
12967
  orientation,
12841
12968
  groupRef,
@@ -12856,7 +12983,7 @@ function ResizablePanelGroup({
12856
12983
  setBetween
12857
12984
  ]
12858
12985
  );
12859
- return /* @__PURE__ */ jsx69(ResizableContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx69(
12986
+ return /* @__PURE__ */ jsx70(ResizableContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx70(
12860
12987
  "div",
12861
12988
  {
12862
12989
  ref: groupRef,
@@ -12884,7 +13011,7 @@ function ResizablePanel({
12884
13011
  onResize,
12885
13012
  ...props
12886
13013
  }) {
12887
- const id = useId14();
13014
+ const id = useId15();
12888
13015
  const { orientation, sizes, registerPanel, unregisterPanel } = useResizableContext("ResizablePanel");
12889
13016
  const onResizeRef = useRef20(onResize);
12890
13017
  onResizeRef.current = onResize;
@@ -12915,7 +13042,7 @@ function ResizablePanel({
12915
13042
  flexBasis: 0,
12916
13043
  ...orientation === "horizontal" ? { minWidth: `${minSize}%` } : { minHeight: `${minSize}%` }
12917
13044
  };
12918
- return /* @__PURE__ */ jsx69(
13045
+ return /* @__PURE__ */ jsx70(
12919
13046
  "div",
12920
13047
  {
12921
13048
  "data-refineui": "resizable-panel",
@@ -12947,8 +13074,8 @@ function ResizableHandle({
12947
13074
  setBetween
12948
13075
  } = useResizableContext("ResizableHandle");
12949
13076
  const handleRef = useRef20(null);
12950
- const [active, setActive] = useState24(false);
12951
- const [, setAdjacentReady] = useState24(false);
13077
+ const [active, setActive] = useState25(false);
13078
+ const [, setAdjacentReady] = useState25(false);
12952
13079
  const dragRef = useRef20(null);
12953
13080
  useLayoutEffect10(() => {
12954
13081
  setAdjacentReady(true);
@@ -12961,7 +13088,7 @@ function ResizableHandle({
12961
13088
  const ariaMin = leftPanel?.minSize ?? 0;
12962
13089
  const ariaMax = leftPanel?.maxSize ?? DEFAULT_MAX_SIZE;
12963
13090
  const defaultKeyshortcuts = orientation === "horizontal" ? "ArrowLeft ArrowRight Home End" : "ArrowUp ArrowDown Home End";
12964
- const keepFocus = useCallback19(() => {
13091
+ const keepFocus = useCallback20(() => {
12965
13092
  const el = handleRef.current;
12966
13093
  if (el && document.activeElement !== el) {
12967
13094
  el.focus({ preventScroll: true });
@@ -13060,7 +13187,7 @@ function ResizableHandle({
13060
13187
  resizeBetween(leftId, rightId, delta);
13061
13188
  queueMicrotask(keepFocus);
13062
13189
  };
13063
- return /* @__PURE__ */ jsx69(
13190
+ return /* @__PURE__ */ jsx70(
13064
13191
  "div",
13065
13192
  {
13066
13193
  ref: handleRef,
@@ -13090,7 +13217,7 @@ function ResizableHandle({
13090
13217
  onPointerUp: handlePointerUp,
13091
13218
  onPointerCancel: handlePointerUp,
13092
13219
  onKeyDown: handleKeyDown,
13093
- children: withHandle ? /* @__PURE__ */ jsx69(
13220
+ children: withHandle ? /* @__PURE__ */ jsx70(
13094
13221
  "span",
13095
13222
  {
13096
13223
  "aria-hidden": true,
@@ -13106,7 +13233,7 @@ function ResizableHandle({
13106
13233
 
13107
13234
  // src/components/SpinButton/SpinButton.tsx
13108
13235
  import { clsx as clsx96 } from "clsx";
13109
- import { useEffect as useEffect17, useState as useState25 } from "react";
13236
+ import { useEffect as useEffect17, useState as useState26 } from "react";
13110
13237
  import { iconSizes as iconSizes20 } from "@refineui/tokens";
13111
13238
 
13112
13239
  // src/components/SpinButton/style.ts
@@ -13130,7 +13257,7 @@ var spinButtonShellClass = formControlShellHeightClass;
13130
13257
  var spinButtonValueTypo = formControlTypoClass;
13131
13258
 
13132
13259
  // src/components/SpinButton/SpinButton.tsx
13133
- import { jsx as jsx70, jsxs as jsxs28 } from "react/jsx-runtime";
13260
+ import { jsx as jsx71, jsxs as jsxs28 } from "react/jsx-runtime";
13134
13261
  function SpinButton({
13135
13262
  value,
13136
13263
  onChange,
@@ -13144,7 +13271,7 @@ function SpinButton({
13144
13271
  onKeyDown,
13145
13272
  ...props
13146
13273
  }) {
13147
- const [draftValue, setDraftValue] = useState25(String(value));
13274
+ const [draftValue, setDraftValue] = useState26(String(value));
13148
13275
  useEffect17(() => {
13149
13276
  setDraftValue(String(value));
13150
13277
  }, [value]);
@@ -13256,7 +13383,7 @@ function SpinButton({
13256
13383
  ...props,
13257
13384
  onKeyDown: handleKeyDown,
13258
13385
  children: [
13259
- /* @__PURE__ */ jsx70(
13386
+ /* @__PURE__ */ jsx71(
13260
13387
  "div",
13261
13388
  {
13262
13389
  "aria-live": "polite",
@@ -13267,7 +13394,7 @@ function SpinButton({
13267
13394
  disabled ? spinButtonStyles.valueTextDisabled : spinButtonStyles.valueTextDefault,
13268
13395
  disabled ? spinButtonStyles.bgDisabled : spinButtonStyles.bgDefault
13269
13396
  ),
13270
- children: /* @__PURE__ */ jsx70(
13397
+ children: /* @__PURE__ */ jsx71(
13271
13398
  "input",
13272
13399
  {
13273
13400
  type: "text",
@@ -13300,7 +13427,7 @@ function SpinButton({
13300
13427
  disabled ? spinButtonStyles.bgDisabled : spinButtonStyles.bgDefault
13301
13428
  ),
13302
13429
  children: [
13303
- /* @__PURE__ */ jsx70(
13430
+ /* @__PURE__ */ jsx71(
13304
13431
  "button",
13305
13432
  {
13306
13433
  type: "button",
@@ -13312,7 +13439,7 @@ function SpinButton({
13312
13439
  spinButtonStyles.stepButtonBase,
13313
13440
  disabled || atMax ? spinButtonStyles.stepButtonDisabled : spinButtonStyles.stepButtonEnabled
13314
13441
  ),
13315
- children: /* @__PURE__ */ jsx70(
13442
+ children: /* @__PURE__ */ jsx71(
13316
13443
  WebIcon,
13317
13444
  {
13318
13445
  name: "chevron-up",
@@ -13324,7 +13451,7 @@ function SpinButton({
13324
13451
  )
13325
13452
  }
13326
13453
  ),
13327
- /* @__PURE__ */ jsx70(
13454
+ /* @__PURE__ */ jsx71(
13328
13455
  "button",
13329
13456
  {
13330
13457
  type: "button",
@@ -13336,7 +13463,7 @@ function SpinButton({
13336
13463
  spinButtonStyles.stepButtonBase,
13337
13464
  disabled || atMin ? spinButtonStyles.stepButtonDisabled : spinButtonStyles.stepButtonEnabled
13338
13465
  ),
13339
- children: /* @__PURE__ */ jsx70(
13466
+ children: /* @__PURE__ */ jsx71(
13340
13467
  WebIcon,
13341
13468
  {
13342
13469
  name: "chevron-down",
@@ -13359,12 +13486,12 @@ function SpinButton({
13359
13486
  // src/components/Toast/Toast.tsx
13360
13487
  import { clsx as clsx98 } from "clsx";
13361
13488
  import {
13362
- forwardRef as forwardRef15,
13363
- useCallback as useCallback20,
13489
+ forwardRef as forwardRef16,
13490
+ useCallback as useCallback21,
13364
13491
  useEffect as useEffect18,
13365
13492
  useLayoutEffect as useLayoutEffect11,
13366
13493
  useRef as useRef21,
13367
- useState as useState26,
13494
+ useState as useState27,
13368
13495
  useSyncExternalStore
13369
13496
  } from "react";
13370
13497
  import { createPortal as createPortal6 } from "react-dom";
@@ -13403,7 +13530,7 @@ var toastStyles = {
13403
13530
  };
13404
13531
 
13405
13532
  // src/components/Toast/Toast.tsx
13406
- import { jsx as jsx71, jsxs as jsxs29 } from "react/jsx-runtime";
13533
+ import { jsx as jsx72, jsxs as jsxs29 } from "react/jsx-runtime";
13407
13534
  var useIsomorphicLayoutEffect6 = typeof document !== "undefined" ? useLayoutEffect11 : useEffect18;
13408
13535
  var ENTER_MS = 20;
13409
13536
  var LEAVE_MS = motionMsToNumber6(componentTokens.toast.motion.leave) + 60;
@@ -13582,7 +13709,7 @@ var variantIconNames = {
13582
13709
  error: "error-circle",
13583
13710
  warning: "warning"
13584
13711
  };
13585
- var Toast = forwardRef15(function Toast2(props, ref) {
13712
+ var Toast = forwardRef16(function Toast2(props, ref) {
13586
13713
  const { variant = "default", message, iconName, icon, action, className, stackState, style, ...rest } = props;
13587
13714
  const domProps = { ...rest };
13588
13715
  delete domProps.iconName;
@@ -13591,7 +13718,7 @@ var Toast = forwardRef15(function Toast2(props, ref) {
13591
13718
  const liveRole = variant === "error" ? "alert" : "status";
13592
13719
  const ariaLive = variant === "error" ? void 0 : variant === "warning" ? "assertive" : "polite";
13593
13720
  const resolvedIconName = iconName ?? variantIconNames[variant];
13594
- const iconContent = icon ?? /* @__PURE__ */ jsx71(
13721
+ const iconContent = icon ?? /* @__PURE__ */ jsx72(
13595
13722
  WebIcon,
13596
13723
  {
13597
13724
  name: resolvedIconName,
@@ -13601,7 +13728,7 @@ var Toast = forwardRef15(function Toast2(props, ref) {
13601
13728
  }
13602
13729
  );
13603
13730
  const isPrimaryAction = !action || typeof action !== "object" || !("variant" in action) || action.variant === "primary";
13604
- const actionEl = typeof action === "object" && action !== null && "label" in action ? /* @__PURE__ */ jsx71(
13731
+ const actionEl = typeof action === "object" && action !== null && "label" in action ? /* @__PURE__ */ jsx72(
13605
13732
  Button,
13606
13733
  {
13607
13734
  variant: isPrimaryAction ? "primary" : "outline",
@@ -13630,8 +13757,8 @@ var Toast = forwardRef15(function Toast2(props, ref) {
13630
13757
  style: { ...tokenStyle, ...style },
13631
13758
  className: clsx98(toastStyles.card, className),
13632
13759
  children: [
13633
- /* @__PURE__ */ jsx71("div", { "data-refineui": "toast-icon", className: toastStyles.iconWrap, children: iconContent }),
13634
- /* @__PURE__ */ jsx71("div", { className: toastStyles.contentWrap, children: message != null && message !== "" ? /* @__PURE__ */ jsx71("div", { className: toastStyles.message, children: message }) : null }),
13760
+ /* @__PURE__ */ jsx72("div", { "data-refineui": "toast-icon", className: toastStyles.iconWrap, children: iconContent }),
13761
+ /* @__PURE__ */ jsx72("div", { className: toastStyles.contentWrap, children: message != null && message !== "" ? /* @__PURE__ */ jsx72("div", { className: toastStyles.message, children: message }) : null }),
13635
13762
  action != null && actionEl
13636
13763
  ]
13637
13764
  }
@@ -13642,8 +13769,8 @@ function SwipeableToast({ record, index, swipeDirections, onSwipeStart, onSwipeE
13642
13769
  const dragStartRef = useRef21(null);
13643
13770
  const axisRef = useRef21(null);
13644
13771
  const offsetRef = useRef21({ x: 0, y: 0 });
13645
- const [swiping, setSwiping] = useState26(false);
13646
- const clearSwipeOffset = useCallback20(() => {
13772
+ const [swiping, setSwiping] = useState27(false);
13773
+ const clearSwipeOffset = useCallback21(() => {
13647
13774
  const el = toastRef.current;
13648
13775
  offsetRef.current = { x: 0, y: 0 };
13649
13776
  if (!el) return;
@@ -13718,7 +13845,7 @@ function SwipeableToast({ record, index, swipeDirections, onSwipeStart, onSwipeE
13718
13845
  clearSwipeOffset();
13719
13846
  onSwipeEnd();
13720
13847
  };
13721
- return /* @__PURE__ */ jsx71(
13848
+ return /* @__PURE__ */ jsx72(
13722
13849
  Toast,
13723
13850
  {
13724
13851
  ref: toastRef,
@@ -13753,12 +13880,12 @@ function Toaster({
13753
13880
  () => activeToasterKey === toasterKeyRef.current,
13754
13881
  () => false
13755
13882
  );
13756
- const [records, setRecords] = useState26([]);
13883
+ const [records, setRecords] = useState27([]);
13757
13884
  const timerMapRef = useRef21({});
13758
13885
  const pausedRef = useRef21(/* @__PURE__ */ new Set());
13759
13886
  const rootRef = useRef21(null);
13760
13887
  const itemRefs = useRef21({});
13761
- const [layoutTick, setLayoutTick] = useState26(0);
13888
+ const [layoutTick, setLayoutTick] = useState27(0);
13762
13889
  const stackGapPx = useToastStackGapPx();
13763
13890
  const resolvedSwipe = swipeDirections ?? DEFAULT_SWIPE_DIRECTIONS;
13764
13891
  useIsomorphicLayoutEffect6(() => {
@@ -13860,7 +13987,7 @@ function Toaster({
13860
13987
  return null;
13861
13988
  }
13862
13989
  return createPortal6(
13863
- /* @__PURE__ */ jsx71(
13990
+ /* @__PURE__ */ jsx72(
13864
13991
  "ol",
13865
13992
  {
13866
13993
  ref: rootRef,
@@ -13871,7 +13998,7 @@ function Toaster({
13871
13998
  style: {
13872
13999
  ["--refineui-toast-gap"]: `${stackGapPx}px`
13873
14000
  },
13874
- children: records.map((rec, index) => /* @__PURE__ */ jsx71(
14001
+ children: records.map((rec, index) => /* @__PURE__ */ jsx72(
13875
14002
  "li",
13876
14003
  {
13877
14004
  ref: (node) => {
@@ -13885,7 +14012,7 @@ function Toaster({
13885
14012
  ["--refineui-toast-z-index"]: String(STACK_Z_BASE - index),
13886
14013
  ["--refineui-toast-stack-index"]: String(index)
13887
14014
  },
13888
- children: /* @__PURE__ */ jsx71("div", { "data-refineui": "toast-scale-layer", children: /* @__PURE__ */ jsx71(
14015
+ children: /* @__PURE__ */ jsx72("div", { "data-refineui": "toast-scale-layer", children: /* @__PURE__ */ jsx72(
13889
14016
  SwipeableToast,
13890
14017
  {
13891
14018
  record: rec,
@@ -13907,24 +14034,24 @@ function Toaster({
13907
14034
  // src/components/Tree/Tree.tsx
13908
14035
  import { clsx as clsx100 } from "clsx";
13909
14036
  import {
13910
- useCallback as useCallback21,
13911
- useMemo as useMemo20,
14037
+ useCallback as useCallback22,
14038
+ useMemo as useMemo21,
13912
14039
  useRef as useRef22,
13913
- useState as useState28
14040
+ useState as useState29
13914
14041
  } from "react";
13915
14042
 
13916
14043
  // src/components/Tree/context.ts
13917
- import { createContext as createContext25, useEffect as useEffect19, useState as useState27 } from "react";
14044
+ import { createContext as createContext26, useEffect as useEffect19, useState as useState28 } from "react";
13918
14045
  import { semanticInteraction as semanticInteraction8 } from "@refineui/tokens";
13919
14046
  import { getReducedMotionQuery as getReducedMotionQuery2 } from "@refineui/utilities/animation";
13920
14047
  var TREE_PANEL_MS = Number.parseFloat(semanticInteraction8.duration.accordionPanel) / 1e3;
13921
14048
  var TREE_CONTENT_MS = Number.parseFloat(semanticInteraction8.duration.accordionContent) / 1e3;
13922
14049
  var TREE_PANEL_EASE = semanticInteraction8.easing.panel;
13923
14050
  var TREE_CONTENT_EASE = semanticInteraction8.easing.content;
13924
- var TreeContext = createContext25(null);
13925
- var TreeItemContext = createContext25(null);
14051
+ var TreeContext = createContext26(null);
14052
+ var TreeItemContext = createContext26(null);
13926
14053
  function usePrefersReducedMotion2() {
13927
- const [reduce, setReduce] = useState27(false);
14054
+ const [reduce, setReduce] = useState28(false);
13928
14055
  useEffect19(() => {
13929
14056
  const mql = window.matchMedia(getReducedMotionQuery2().replace("@media ", ""));
13930
14057
  const sync = () => setReduce(mql.matches);
@@ -13980,7 +14107,7 @@ var treeItemTypo = {
13980
14107
  };
13981
14108
 
13982
14109
  // src/components/Tree/Tree.tsx
13983
- import { jsx as jsx72 } from "react/jsx-runtime";
14110
+ import { jsx as jsx73 } from "react/jsx-runtime";
13984
14111
  function Tree({
13985
14112
  size = "md",
13986
14113
  defaultExpanded,
@@ -13994,29 +14121,29 @@ function Tree({
13994
14121
  ...props
13995
14122
  }) {
13996
14123
  const reduceMotion = usePrefersReducedMotion2();
13997
- const [uncontrolledExpanded, setUncontrolledExpanded] = useState28(() => toExpandedSet(defaultExpanded));
13998
- const [uncontrolledSelected, setUncontrolledSelected] = useState28(defaultSelected ?? null);
14124
+ const [uncontrolledExpanded, setUncontrolledExpanded] = useState29(() => toExpandedSet(defaultExpanded));
14125
+ const [uncontrolledSelected, setUncontrolledSelected] = useState29(defaultSelected ?? null);
13999
14126
  const expanded = expandedProp === void 0 ? uncontrolledExpanded : toExpandedSet(expandedProp);
14000
14127
  const selected = selectedProp === void 0 ? uncontrolledSelected : selectedProp;
14001
14128
  const orderRef = useRef22([]);
14002
14129
  const elMapRef = useRef22(/* @__PURE__ */ new Map());
14003
14130
  const metaMapRef = useRef22(/* @__PURE__ */ new Map());
14004
- const emitExpanded = useCallback21(
14131
+ const emitExpanded = useCallback22(
14005
14132
  (next) => {
14006
14133
  if (expandedProp === void 0) setUncontrolledExpanded(next);
14007
14134
  onExpandedChange?.(Array.from(next));
14008
14135
  },
14009
14136
  [expandedProp, onExpandedChange]
14010
14137
  );
14011
- const emitSelected = useCallback21(
14138
+ const emitSelected = useCallback22(
14012
14139
  (next) => {
14013
14140
  if (selectedProp === void 0) setUncontrolledSelected(next);
14014
14141
  onSelectedChange?.(next);
14015
14142
  },
14016
14143
  [onSelectedChange, selectedProp]
14017
14144
  );
14018
- const isExpanded = useCallback21((value) => expanded.has(value), [expanded]);
14019
- const toggleExpanded = useCallback21(
14145
+ const isExpanded = useCallback22((value) => expanded.has(value), [expanded]);
14146
+ const toggleExpanded = useCallback22(
14020
14147
  (value) => {
14021
14148
  const next = new Set(expanded);
14022
14149
  if (next.has(value)) next.delete(value);
@@ -14025,7 +14152,7 @@ function Tree({
14025
14152
  },
14026
14153
  [emitExpanded, expanded]
14027
14154
  );
14028
- const expand = useCallback21(
14155
+ const expand = useCallback22(
14029
14156
  (value) => {
14030
14157
  if (expanded.has(value)) return;
14031
14158
  const next = new Set(expanded);
@@ -14034,7 +14161,7 @@ function Tree({
14034
14161
  },
14035
14162
  [emitExpanded, expanded]
14036
14163
  );
14037
- const collapse = useCallback21(
14164
+ const collapse = useCallback22(
14038
14165
  (value) => {
14039
14166
  if (!expanded.has(value)) return;
14040
14167
  const next = new Set(expanded);
@@ -14043,13 +14170,13 @@ function Tree({
14043
14170
  },
14044
14171
  [emitExpanded, expanded]
14045
14172
  );
14046
- const select = useCallback21(
14173
+ const select = useCallback22(
14047
14174
  (value) => {
14048
14175
  emitSelected(value);
14049
14176
  },
14050
14177
  [emitSelected]
14051
14178
  );
14052
- const registerItem = useCallback21((value, el, meta) => {
14179
+ const registerItem = useCallback22((value, el, meta) => {
14053
14180
  metaMapRef.current.set(value, meta);
14054
14181
  if (!orderRef.current.includes(value)) {
14055
14182
  orderRef.current.push(value);
@@ -14061,10 +14188,10 @@ function Tree({
14061
14188
  orderRef.current = orderRef.current.filter((v) => v !== value);
14062
14189
  }
14063
14190
  }, []);
14064
- const focusItem = useCallback21((value) => {
14191
+ const focusItem = useCallback22((value) => {
14065
14192
  elMapRef.current.get(value)?.focus();
14066
14193
  }, []);
14067
- const visibleValues = useCallback21(() => {
14194
+ const visibleValues = useCallback22(() => {
14068
14195
  const result = [];
14069
14196
  const walk = (parent) => {
14070
14197
  for (const value of orderRef.current) {
@@ -14078,7 +14205,7 @@ function Tree({
14078
14205
  walk(null);
14079
14206
  return result;
14080
14207
  }, [expanded]);
14081
- const focusByDelta = useCallback21(
14208
+ const focusByDelta = useCallback22(
14082
14209
  (currentValue, delta) => {
14083
14210
  const list = visibleValues();
14084
14211
  const idx = list.indexOf(currentValue);
@@ -14088,17 +14215,17 @@ function Tree({
14088
14215
  },
14089
14216
  [focusItem, visibleValues]
14090
14217
  );
14091
- const focusFirst = useCallback21(() => {
14218
+ const focusFirst = useCallback22(() => {
14092
14219
  const list = visibleValues();
14093
14220
  if (list[0]) focusItem(list[0]);
14094
14221
  }, [focusItem, visibleValues]);
14095
- const focusLast = useCallback21(() => {
14222
+ const focusLast = useCallback22(() => {
14096
14223
  const list = visibleValues();
14097
14224
  const last = list[list.length - 1];
14098
14225
  if (last) focusItem(last);
14099
14226
  }, [focusItem, visibleValues]);
14100
- const getParent = useCallback21((value) => metaMapRef.current.get(value)?.parentValue ?? null, []);
14101
- const contextValue = useMemo20(
14227
+ const getParent = useCallback22((value) => metaMapRef.current.get(value)?.parentValue ?? null, []);
14228
+ const contextValue = useMemo21(
14102
14229
  () => ({
14103
14230
  size,
14104
14231
  isExpanded,
@@ -14132,7 +14259,7 @@ function Tree({
14132
14259
  toggleExpanded
14133
14260
  ]
14134
14261
  );
14135
- return /* @__PURE__ */ jsx72(TreeContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx72(
14262
+ return /* @__PURE__ */ jsx73(TreeContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx73(
14136
14263
  "ul",
14137
14264
  {
14138
14265
  "data-refineui": "tree",
@@ -14146,21 +14273,21 @@ function Tree({
14146
14273
 
14147
14274
  // src/components/Tree/TreeItem.tsx
14148
14275
  import { clsx as clsx101 } from "clsx";
14149
- import { useContext as useContext27, useId as useId15, useMemo as useMemo21, useState as useState29 } from "react";
14150
- import { jsx as jsx73 } from "react/jsx-runtime";
14276
+ import { useContext as useContext28, useId as useId16, useMemo as useMemo22, useState as useState30 } from "react";
14277
+ import { jsx as jsx74 } from "react/jsx-runtime";
14151
14278
  function TreeItem({ value, disabled = false, className, children, ...props }) {
14152
- const tree = useContext27(TreeContext);
14153
- const parent = useContext27(TreeItemContext);
14279
+ const tree = useContext28(TreeContext);
14280
+ const parent = useContext28(TreeItemContext);
14154
14281
  if (!tree) throw new Error("TreeItem must be used within Tree.");
14155
- const [hasBranch, setHasBranch] = useState29(false);
14156
- const uid = useId15().replace(/:/g, "");
14282
+ const [hasBranch, setHasBranch] = useState30(false);
14283
+ const uid = useId16().replace(/:/g, "");
14157
14284
  const depth = parent ? parent.depth + 1 : 0;
14158
14285
  const parentValue = parent?.value ?? null;
14159
14286
  const expanded = tree.isExpanded(value);
14160
14287
  const selected = tree.selected === value;
14161
14288
  const triggerId = `tree-trigger-${uid}-${value}`;
14162
14289
  const groupId = `tree-group-${uid}-${value}`;
14163
- const itemContext = useMemo21(
14290
+ const itemContext = useMemo22(
14164
14291
  () => ({
14165
14292
  value,
14166
14293
  depth,
@@ -14175,7 +14302,7 @@ function TreeItem({ value, disabled = false, className, children, ...props }) {
14175
14302
  }),
14176
14303
  [value, depth, parentValue, expanded, selected, disabled, hasBranch, triggerId, groupId]
14177
14304
  );
14178
- return /* @__PURE__ */ jsx73(TreeItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx73(
14305
+ return /* @__PURE__ */ jsx74(TreeItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx74(
14179
14306
  "li",
14180
14307
  {
14181
14308
  "data-refineui": "tree-item",
@@ -14197,13 +14324,13 @@ function TreeItem({ value, disabled = false, className, children, ...props }) {
14197
14324
  // src/components/Tree/TreeItemTrigger.tsx
14198
14325
  import { clsx as clsx102 } from "clsx";
14199
14326
  import {
14200
- useContext as useContext28,
14327
+ useContext as useContext29,
14201
14328
  useEffect as useEffect20
14202
14329
  } from "react";
14203
- import { jsx as jsx74, jsxs as jsxs30 } from "react/jsx-runtime";
14330
+ import { jsx as jsx75, jsxs as jsxs30 } from "react/jsx-runtime";
14204
14331
  function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props }) {
14205
- const tree = useContext28(TreeContext);
14206
- const item = useContext28(TreeItemContext);
14332
+ const tree = useContext29(TreeContext);
14333
+ const item = useContext29(TreeItemContext);
14207
14334
  if (!tree || !item) throw new Error("TreeItemTrigger must be used within TreeItem.");
14208
14335
  const iconSize = treeIconSize[tree.size];
14209
14336
  const depthIndent = "calc(var(--refineui-spacing-size-large) + var(--refineui-spacing-size-x-small))";
@@ -14286,7 +14413,7 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14286
14413
  break;
14287
14414
  }
14288
14415
  };
14289
- return /* @__PURE__ */ jsx74(
14416
+ return /* @__PURE__ */ jsx75(
14290
14417
  "div",
14291
14418
  {
14292
14419
  ref: setRowRef,
@@ -14306,7 +14433,7 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14306
14433
  ),
14307
14434
  ...props,
14308
14435
  children: /* @__PURE__ */ jsxs30("div", { "data-refineui": "tree-item-main", className: treeStyles.rowMain, style: mainStyle, children: [
14309
- item.hasBranch ? /* @__PURE__ */ jsx74(
14436
+ item.hasBranch ? /* @__PURE__ */ jsx75(
14310
14437
  "button",
14311
14438
  {
14312
14439
  type: "button",
@@ -14320,10 +14447,10 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14320
14447
  item.expanded && treeStyles.chevronExpanded,
14321
14448
  tree.reduceMotion && "transition-none"
14322
14449
  ),
14323
- children: /* @__PURE__ */ jsx74(WebIcon, { name: "chevron-right", size: iconSize, color: "currentColor", fallback: "\u203A" })
14450
+ children: /* @__PURE__ */ jsx75(WebIcon, { name: "chevron-right", size: iconSize, color: "currentColor", fallback: "\u203A" })
14324
14451
  }
14325
- ) : /* @__PURE__ */ jsx74("span", { className: treeStyles.chevronSpacer, "aria-hidden": "true" }),
14326
- /* @__PURE__ */ jsx74("span", { className: treeStyles.label, children })
14452
+ ) : /* @__PURE__ */ jsx75("span", { className: treeStyles.chevronSpacer, "aria-hidden": "true" }),
14453
+ /* @__PURE__ */ jsx75("span", { className: treeStyles.label, children })
14327
14454
  ] })
14328
14455
  }
14329
14456
  );
@@ -14331,11 +14458,11 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
14331
14458
 
14332
14459
  // src/components/Tree/TreeItemContent.tsx
14333
14460
  import { clsx as clsx103 } from "clsx";
14334
- import { useContext as useContext29, useLayoutEffect as useLayoutEffect12 } from "react";
14335
- import { jsx as jsx75 } from "react/jsx-runtime";
14461
+ import { useContext as useContext30, useLayoutEffect as useLayoutEffect12 } from "react";
14462
+ import { jsx as jsx76 } from "react/jsx-runtime";
14336
14463
  function TreeItemContent({ className, children, ...props }) {
14337
- const tree = useContext29(TreeContext);
14338
- const item = useContext29(TreeItemContext);
14464
+ const tree = useContext30(TreeContext);
14465
+ const item = useContext30(TreeItemContext);
14339
14466
  if (!tree || !item) throw new Error("TreeItemContent must be used within TreeItem.");
14340
14467
  const { setHasBranch, expanded, groupId, triggerId } = item;
14341
14468
  useLayoutEffect12(() => {
@@ -14353,7 +14480,7 @@ function TreeItemContent({ className, children, ...props }) {
14353
14480
  transition: tree.reduceMotion ? void 0 : `opacity ${TREE_CONTENT_MS}s ${TREE_CONTENT_EASE}, transform ${TREE_CONTENT_MS}s ${TREE_CONTENT_EASE}`,
14354
14481
  pointerEvents: expanded ? void 0 : "none"
14355
14482
  };
14356
- return /* @__PURE__ */ jsx75(
14483
+ return /* @__PURE__ */ jsx76(
14357
14484
  "div",
14358
14485
  {
14359
14486
  ref: (el) => {
@@ -14364,7 +14491,7 @@ function TreeItemContent({ className, children, ...props }) {
14364
14491
  "data-refineui": "tree-item-panel",
14365
14492
  "aria-hidden": !expanded,
14366
14493
  style: gridStyle,
14367
- children: /* @__PURE__ */ jsx75("div", { className: treeStyles.panel, children: /* @__PURE__ */ jsx75("div", { className: treeStyles.panelInner, style: innerMotionStyle, children: /* @__PURE__ */ jsx75(
14494
+ children: /* @__PURE__ */ jsx76("div", { className: treeStyles.panel, children: /* @__PURE__ */ jsx76("div", { className: treeStyles.panelInner, style: innerMotionStyle, children: /* @__PURE__ */ jsx76(
14368
14495
  "ul",
14369
14496
  {
14370
14497
  id: groupId,
@@ -14382,9 +14509,9 @@ function TreeItemContent({ className, children, ...props }) {
14382
14509
 
14383
14510
  // src/components/Tooltip/Tooltip.tsx
14384
14511
  import { clsx as clsx105 } from "clsx";
14385
- import { useId as useId16, useRef as useRef23, useState as useState30 } from "react";
14512
+ import { useId as useId17, useRef as useRef23, useState as useState31 } from "react";
14386
14513
  import { resolveColorTokenValue as resolveColorTokenValue12 } from "@refineui/utilities/color";
14387
- import { Slot as Slot4, getMergeableTriggerChild as getMergeableTriggerChild4 } from "@refineui/utilities/react";
14514
+ import { Slot as Slot5, getMergeableTriggerChild as getMergeableTriggerChild4 } from "@refineui/utilities/react";
14388
14515
 
14389
14516
  // src/components/Tooltip/style.ts
14390
14517
  import { spacings as spacings6, strokeWidths as strokeWidths3 } from "@refineui/tokens";
@@ -14488,7 +14615,7 @@ function tooltipBeakRotateDeg(position) {
14488
14615
  }
14489
14616
 
14490
14617
  // src/components/Tooltip/Tooltip.tsx
14491
- import { jsx as jsx76, jsxs as jsxs31 } from "react/jsx-runtime";
14618
+ import { jsx as jsx77, jsxs as jsxs31 } from "react/jsx-runtime";
14492
14619
  function Tooltip({
14493
14620
  trigger,
14494
14621
  content,
@@ -14501,9 +14628,9 @@ function Tooltip({
14501
14628
  className,
14502
14629
  ...props
14503
14630
  }) {
14504
- const [innerOpen, setInnerOpen] = useState30(defaultOpen);
14631
+ const [innerOpen, setInnerOpen] = useState31(defaultOpen);
14505
14632
  const open = ctrlOpen !== void 0 ? ctrlOpen : innerOpen;
14506
- const tooltipId = useId16();
14633
+ const tooltipId = useId17();
14507
14634
  const showTimer = useRef23(null);
14508
14635
  const setOpen = (next) => {
14509
14636
  if (ctrlOpen === void 0) setInnerOpen(next);
@@ -14534,8 +14661,8 @@ function Tooltip({
14534
14661
  const mergeEl = getMergeableTriggerChild4(trigger);
14535
14662
  let triggerNode;
14536
14663
  if (mergeEl != null) {
14537
- triggerNode = /* @__PURE__ */ jsx76(
14538
- Slot4,
14664
+ triggerNode = /* @__PURE__ */ jsx77(
14665
+ Slot5,
14539
14666
  {
14540
14667
  "aria-describedby": describedBy,
14541
14668
  onMouseEnter: scheduleShow,
@@ -14551,7 +14678,7 @@ function Tooltip({
14551
14678
  }
14552
14679
  );
14553
14680
  } else {
14554
- triggerNode = /* @__PURE__ */ jsx76(
14681
+ triggerNode = /* @__PURE__ */ jsx77(
14555
14682
  "span",
14556
14683
  {
14557
14684
  tabIndex: 0,
@@ -14570,14 +14697,14 @@ function Tooltip({
14570
14697
  }
14571
14698
  return /* @__PURE__ */ jsxs31("div", { "data-refineui": "tooltip", className: clsx105(tooltipStyles.root, className), ...props, children: [
14572
14699
  triggerNode,
14573
- open && /* @__PURE__ */ jsx76("div", { className: tooltipStyles.floating, style: floatingStyle, children: /* @__PURE__ */ jsxs31("div", { className: tooltipStyles.panelWrap, children: [
14574
- /* @__PURE__ */ jsx76(
14700
+ open && /* @__PURE__ */ jsx77("div", { className: tooltipStyles.floating, style: floatingStyle, children: /* @__PURE__ */ jsxs31("div", { className: tooltipStyles.panelWrap, children: [
14701
+ /* @__PURE__ */ jsx77(
14575
14702
  "div",
14576
14703
  {
14577
14704
  className: tooltipStyles.beakWrap,
14578
14705
  style: { ...beakWrapStyle, width: TOOLTIP_BEAK_W, height: TOOLTIP_BEAK_H },
14579
14706
  "aria-hidden": true,
14580
- children: /* @__PURE__ */ jsx76(
14707
+ children: /* @__PURE__ */ jsx77(
14581
14708
  "div",
14582
14709
  {
14583
14710
  style: {
@@ -14596,8 +14723,8 @@ function Tooltip({
14596
14723
  xmlns: "http://www.w3.org/2000/svg",
14597
14724
  style: { display: "block" },
14598
14725
  children: [
14599
- /* @__PURE__ */ jsx76("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
14600
- /* @__PURE__ */ jsx76("polygon", { points: "8,2 2,8 14,8", fill: bg })
14726
+ /* @__PURE__ */ jsx77("polygon", { points: "8,0 0,8 16,8", fill: borderCol }),
14727
+ /* @__PURE__ */ jsx77("polygon", { points: "8,2 2,8 14,8", fill: bg })
14601
14728
  ]
14602
14729
  }
14603
14730
  )
@@ -14605,7 +14732,7 @@ function Tooltip({
14605
14732
  )
14606
14733
  }
14607
14734
  ),
14608
- /* @__PURE__ */ jsx76(
14735
+ /* @__PURE__ */ jsx77(
14609
14736
  "div",
14610
14737
  {
14611
14738
  id: tooltipId,
@@ -14630,13 +14757,13 @@ function Tooltip({
14630
14757
  import { clsx as clsx107 } from "clsx";
14631
14758
  import {
14632
14759
  Children as Children8,
14633
- createContext as createContext26,
14760
+ createContext as createContext27,
14634
14761
  isValidElement as isValidElement7,
14635
- useContext as useContext30,
14636
- useId as useId17,
14762
+ useContext as useContext31,
14763
+ useId as useId18,
14637
14764
  useLayoutEffect as useLayoutEffect13,
14638
- useMemo as useMemo22,
14639
- useState as useState31
14765
+ useMemo as useMemo23,
14766
+ useState as useState32
14640
14767
  } from "react";
14641
14768
  import { opacities } from "@refineui/tokens";
14642
14769
  import { resolveColorTokenValue as resolveColorTokenValue13 } from "@refineui/utilities/color";
@@ -14864,10 +14991,10 @@ function formatAxisTick(value) {
14864
14991
  }
14865
14992
 
14866
14993
  // src/components/Chart/Chart.tsx
14867
- import { Fragment as Fragment4, jsx as jsx77, jsxs as jsxs32 } from "react/jsx-runtime";
14868
- var ChartContext = createContext26(null);
14994
+ import { Fragment as Fragment4, jsx as jsx78, jsxs as jsxs32 } from "react/jsx-runtime";
14995
+ var ChartContext = createContext27(null);
14869
14996
  function useChartContext(component) {
14870
- const value = useContext30(ChartContext);
14997
+ const value = useContext31(ChartContext);
14871
14998
  if (!value) throw new Error(`${component} must be used within Chart.`);
14872
14999
  return value;
14873
15000
  }
@@ -14900,12 +15027,12 @@ function isChartTooltipElement(node) {
14900
15027
  return isValidElement7(node) && node.type === ChartTooltip;
14901
15028
  }
14902
15029
  function Chart({ className, children, ...props }) {
14903
- const [hoverIndex, setHoverIndex] = useState31(null);
14904
- const [selectedIndex, setSelectedIndex] = useState31(null);
14905
- const [pointer, setPointer] = useState31(null);
14906
- const [labels, setLabels] = useState31([]);
14907
- const [series, setSeries] = useState31(null);
14908
- const context = useMemo22(
15030
+ const [hoverIndex, setHoverIndex] = useState32(null);
15031
+ const [selectedIndex, setSelectedIndex] = useState32(null);
15032
+ const [pointer, setPointer] = useState32(null);
15033
+ const [labels, setLabels] = useState32([]);
15034
+ const [series, setSeries] = useState32(null);
15035
+ const context = useMemo23(
14909
15036
  () => ({
14910
15037
  hoverIndex,
14911
15038
  selectedIndex,
@@ -14920,7 +15047,7 @@ function Chart({ className, children, ...props }) {
14920
15047
  }),
14921
15048
  [hoverIndex, selectedIndex, pointer, labels, series]
14922
15049
  );
14923
- return /* @__PURE__ */ jsx77(ChartContext.Provider, { value: context, children: /* @__PURE__ */ jsx77(
15050
+ return /* @__PURE__ */ jsx78(ChartContext.Provider, { value: context, children: /* @__PURE__ */ jsx78(
14924
15051
  "div",
14925
15052
  {
14926
15053
  "data-refineui": "chart",
@@ -14931,7 +15058,7 @@ function Chart({ className, children, ...props }) {
14931
15058
  ) });
14932
15059
  }
14933
15060
  function ChartBody({ className, ...props }) {
14934
- return /* @__PURE__ */ jsx77(
15061
+ return /* @__PURE__ */ jsx78(
14935
15062
  "div",
14936
15063
  {
14937
15064
  "data-refineui": "chart-body",
@@ -14941,7 +15068,7 @@ function ChartBody({ className, ...props }) {
14941
15068
  );
14942
15069
  }
14943
15070
  function ChartContent({ className, ...props }) {
14944
- return /* @__PURE__ */ jsx77(
15071
+ return /* @__PURE__ */ jsx78(
14945
15072
  "div",
14946
15073
  {
14947
15074
  "data-refineui": "chart-content",
@@ -14966,7 +15093,7 @@ function ChartHitArea() {
14966
15093
  setHoverIndex(hoverIndexFromPlotX(next.x, count, series.align));
14967
15094
  return next;
14968
15095
  };
14969
- return /* @__PURE__ */ jsx77(
15096
+ return /* @__PURE__ */ jsx78(
14970
15097
  "rect",
14971
15098
  {
14972
15099
  "data-refineui": "chart-hit-area",
@@ -15024,7 +15151,7 @@ function ChartPlot({
15024
15151
  className: chartStyles.plot,
15025
15152
  children: [
15026
15153
  svgChildren,
15027
- /* @__PURE__ */ jsx77(ChartHitArea, {})
15154
+ /* @__PURE__ */ jsx78(ChartHitArea, {})
15028
15155
  ]
15029
15156
  }
15030
15157
  ),
@@ -15042,7 +15169,7 @@ function ChartTooltip({ className, children, style, ...props }) {
15042
15169
  const flipY = pointer.y < CHART_PLOT_PADDING_TOP + plotHeight() * CHART_TOOLTIP_FLIP_Y;
15043
15170
  const offsetX = flipX ? "calc(-100% - var(--refineui-spacing-size-small))" : "var(--refineui-spacing-size-small)";
15044
15171
  const offsetY = flipY ? "var(--refineui-spacing-size-small)" : "calc(-100% - var(--refineui-spacing-size-x-small))";
15045
- return /* @__PURE__ */ jsx77(
15172
+ return /* @__PURE__ */ jsx78(
15046
15173
  "div",
15047
15174
  {
15048
15175
  "data-refineui": "chart-tooltip",
@@ -15056,8 +15183,8 @@ function ChartTooltip({ className, children, style, ...props }) {
15056
15183
  },
15057
15184
  ...props,
15058
15185
  children: children ?? /* @__PURE__ */ jsxs32(Fragment4, { children: [
15059
- label ? /* @__PURE__ */ jsx77("span", { className: chartStyles.tooltipLabel, children: label }) : null,
15060
- /* @__PURE__ */ jsx77("span", { className: chartStyles.tooltipValue, children: formatAxisTick(value) })
15186
+ label ? /* @__PURE__ */ jsx78("span", { className: chartStyles.tooltipLabel, children: label }) : null,
15187
+ /* @__PURE__ */ jsx78("span", { className: chartStyles.tooltipValue, children: formatAxisTick(value) })
15061
15188
  ] })
15062
15189
  }
15063
15190
  );
@@ -15072,14 +15199,14 @@ function ChartYAxisLabels({
15072
15199
  }) {
15073
15200
  const scaleMax = resolveScale(values, max);
15074
15201
  const ticks = yAxisTicks(scaleMax, lines).slice().reverse();
15075
- return /* @__PURE__ */ jsx77(
15202
+ return /* @__PURE__ */ jsx78(
15076
15203
  "div",
15077
15204
  {
15078
15205
  "data-refineui": "chart-y-axis",
15079
15206
  className: clsx107(chartStyles.yAxis, className),
15080
15207
  "aria-hidden": true,
15081
15208
  ...props,
15082
- children: ticks.map((tick) => /* @__PURE__ */ jsx77(
15209
+ children: ticks.map((tick) => /* @__PURE__ */ jsx78(
15083
15210
  "span",
15084
15211
  {
15085
15212
  className: chartStyles.yAxisTick,
@@ -15102,12 +15229,12 @@ function ChartGrid({
15102
15229
  const ticks = yAxisTicks(scaleMax, lines);
15103
15230
  const gridColor = gridStroke();
15104
15231
  const baselineColor = gridBaselineStroke();
15105
- return /* @__PURE__ */ jsx77("g", { "data-refineui": "chart-grid", className, ...props, children: ticks.map((tick, index) => {
15232
+ return /* @__PURE__ */ jsx78("g", { "data-refineui": "chart-grid", className, ...props, children: ticks.map((tick, index) => {
15106
15233
  const y = gridLineY(scaleMax, tick);
15107
15234
  const isBaseline = index === 0;
15108
15235
  const isTop = index === ticks.length - 1;
15109
15236
  if (isTop) return null;
15110
- return /* @__PURE__ */ jsx77(
15237
+ return /* @__PURE__ */ jsx78(
15111
15238
  "line",
15112
15239
  {
15113
15240
  x1: CHART_PLOT_PADDING_X,
@@ -15145,7 +15272,7 @@ function ChartBars({
15145
15272
  return /* @__PURE__ */ jsxs32("g", { "data-refineui": "chart-bars", "data-series-color": seriesColor, className, ...props, children: [
15146
15273
  showTrack ? values.map((_, index) => {
15147
15274
  const x = barX(index, values.length);
15148
- return /* @__PURE__ */ jsx77(
15275
+ return /* @__PURE__ */ jsx78(
15149
15276
  "path",
15150
15277
  {
15151
15278
  "data-refineui": "chart-bar-track",
@@ -15167,7 +15294,7 @@ function ChartBars({
15167
15294
  const height = baselineY - y;
15168
15295
  if (height <= 0) return null;
15169
15296
  const state = itemState(index, hoverIndex, selectedIndex);
15170
- return /* @__PURE__ */ jsx77(
15297
+ return /* @__PURE__ */ jsx78(
15171
15298
  "path",
15172
15299
  {
15173
15300
  "data-refineui": "chart-bar",
@@ -15190,7 +15317,7 @@ function ChartLine({
15190
15317
  ...props
15191
15318
  }) {
15192
15319
  const { hoverIndex, selectedIndex, setSeries } = useChartContext("ChartLine");
15193
- const gradientId = useId17().replace(/:/g, "");
15320
+ const gradientId = useId18().replace(/:/g, "");
15194
15321
  const scaleMax = resolveChartScale(values, max);
15195
15322
  const stroke = seriesColorToken(seriesColor);
15196
15323
  const coords = linePointCoords(values, scaleMax);
@@ -15202,8 +15329,8 @@ function ChartLine({
15202
15329
  }, [values, seriesColor, max, setSeries]);
15203
15330
  return /* @__PURE__ */ jsxs32("g", { "data-refineui": "chart-line", "data-series-color": seriesColor, className, ...props, children: [
15204
15331
  showArea && coords.length > 1 ? /* @__PURE__ */ jsxs32(Fragment4, { children: [
15205
- /* @__PURE__ */ jsx77("defs", { children: /* @__PURE__ */ jsxs32("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
15206
- /* @__PURE__ */ jsx77(
15332
+ /* @__PURE__ */ jsx78("defs", { children: /* @__PURE__ */ jsxs32("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
15333
+ /* @__PURE__ */ jsx78(
15207
15334
  "stop",
15208
15335
  {
15209
15336
  offset: "0%",
@@ -15211,9 +15338,9 @@ function ChartLine({
15211
15338
  stopOpacity: opacities.opacityDisabled
15212
15339
  }
15213
15340
  ),
15214
- /* @__PURE__ */ jsx77("stop", { offset: "100%", stopColor: stroke, stopOpacity: "0" })
15341
+ /* @__PURE__ */ jsx78("stop", { offset: "100%", stopColor: stroke, stopOpacity: "0" })
15215
15342
  ] }) }),
15216
- /* @__PURE__ */ jsx77(
15343
+ /* @__PURE__ */ jsx78(
15217
15344
  "path",
15218
15345
  {
15219
15346
  "data-refineui": "chart-line-area",
@@ -15222,7 +15349,7 @@ function ChartLine({
15222
15349
  }
15223
15350
  )
15224
15351
  ] }) : null,
15225
- /* @__PURE__ */ jsx77(
15352
+ /* @__PURE__ */ jsx78(
15226
15353
  "path",
15227
15354
  {
15228
15355
  "data-refineui": "chart-line-stroke",
@@ -15240,7 +15367,7 @@ function ChartLine({
15240
15367
  const state = itemState(index, hoverIndex, selectedIndex);
15241
15368
  const visible = showPoints || state !== "default";
15242
15369
  if (!visible) return null;
15243
- return /* @__PURE__ */ jsx77(
15370
+ return /* @__PURE__ */ jsx78(
15244
15371
  "circle",
15245
15372
  {
15246
15373
  "data-refineui": "chart-point",
@@ -15269,7 +15396,7 @@ function ChartAxisLabels({
15269
15396
  useLayoutEffect13(() => {
15270
15397
  setLabels(labels);
15271
15398
  }, [labels, setLabels]);
15272
- return /* @__PURE__ */ jsx77(
15399
+ return /* @__PURE__ */ jsx78(
15273
15400
  "div",
15274
15401
  {
15275
15402
  "data-refineui": "chart-axis-labels",
@@ -15278,7 +15405,7 @@ function ChartAxisLabels({
15278
15405
  ...props,
15279
15406
  children: labels.map((label, index) => {
15280
15407
  const state = itemState(index, hoverIndex, selectedIndex);
15281
- return /* @__PURE__ */ jsx77(
15408
+ return /* @__PURE__ */ jsx78(
15282
15409
  "span",
15283
15410
  {
15284
15411
  "data-state": state,
@@ -15296,7 +15423,7 @@ function ChartAxisLabels({
15296
15423
  );
15297
15424
  }
15298
15425
  function ChartLegend({ className, ...props }) {
15299
- return /* @__PURE__ */ jsx77(
15426
+ return /* @__PURE__ */ jsx78(
15300
15427
  "ul",
15301
15428
  {
15302
15429
  "data-refineui": "chart-legend",
@@ -15320,7 +15447,7 @@ function ChartLegendItem({
15320
15447
  className: clsx107(chartStyles.legendItem, className),
15321
15448
  ...props,
15322
15449
  children: [
15323
- /* @__PURE__ */ jsx77(
15450
+ /* @__PURE__ */ jsx78(
15324
15451
  "span",
15325
15452
  {
15326
15453
  "aria-hidden": true,
@@ -15335,31 +15462,31 @@ function ChartLegendItem({
15335
15462
  }
15336
15463
 
15337
15464
  // src/components/Slot/Slot.tsx
15338
- import { Slot as Slot5 } from "@refineui/utilities/react";
15465
+ import { Slot as Slot6 } from "@refineui/utilities/react";
15339
15466
 
15340
15467
  // src/components/Collapsible/Collapsible.tsx
15341
15468
  import {
15342
- forwardRef as forwardRef16,
15343
- useCallback as useCallback22,
15344
- useId as useId18,
15345
- useMemo as useMemo23,
15346
- useState as useState33
15469
+ forwardRef as forwardRef17,
15470
+ useCallback as useCallback23,
15471
+ useId as useId19,
15472
+ useMemo as useMemo24,
15473
+ useState as useState34
15347
15474
  } from "react";
15348
15475
  import { clsx as clsx108 } from "clsx";
15349
- import { Slot as Slot6 } from "@refineui/utilities/react";
15476
+ import { Slot as Slot7 } from "@refineui/utilities/react";
15350
15477
 
15351
15478
  // src/components/Collapsible/context.ts
15352
- import { createContext as createContext27, useContext as useContext31, useEffect as useEffect21, useState as useState32 } from "react";
15479
+ import { createContext as createContext28, useContext as useContext32, useEffect as useEffect21, useState as useState33 } from "react";
15353
15480
  import { semanticInteraction as semanticInteraction9 } from "@refineui/tokens";
15354
15481
  import { getReducedMotionQuery as getReducedMotionQuery3 } from "@refineui/utilities/animation";
15355
- var CollapsibleContext = createContext27(null);
15482
+ var CollapsibleContext = createContext28(null);
15356
15483
  function useCollapsibleContext(part) {
15357
- const value = useContext31(CollapsibleContext);
15484
+ const value = useContext32(CollapsibleContext);
15358
15485
  if (!value) throw new Error(`${part} must be used within Collapsible`);
15359
15486
  return value;
15360
15487
  }
15361
15488
  function usePrefersReducedMotion3() {
15362
- const [reduce, setReduce] = useState32(false);
15489
+ const [reduce, setReduce] = useState33(false);
15363
15490
  useEffect21(() => {
15364
15491
  const mql = window.matchMedia(getReducedMotionQuery3().replace("@media ", ""));
15365
15492
  const sync = () => setReduce(mql.matches);
@@ -15380,18 +15507,18 @@ var collapsibleStyles = {
15380
15507
  };
15381
15508
 
15382
15509
  // src/components/Collapsible/Collapsible.tsx
15383
- import { jsx as jsx78 } from "react/jsx-runtime";
15384
- var Collapsible = forwardRef16(function Collapsible2({ open: openProp, defaultOpen = false, onOpenChange, asChild = false, className, children, ...props }, ref) {
15385
- const [uncontrolled, setUncontrolled] = useState33(defaultOpen);
15510
+ import { jsx as jsx79 } from "react/jsx-runtime";
15511
+ var Collapsible = forwardRef17(function Collapsible2({ open: openProp, defaultOpen = false, onOpenChange, asChild = false, className, children, ...props }, ref) {
15512
+ const [uncontrolled, setUncontrolled] = useState34(defaultOpen);
15386
15513
  const open = openProp ?? uncontrolled;
15387
- const reactId = useId18();
15514
+ const reactId = useId19();
15388
15515
  const reduceMotion = usePrefersReducedMotion3();
15389
- const toggle = useCallback22(() => {
15516
+ const toggle = useCallback23(() => {
15390
15517
  const next = !(openProp ?? uncontrolled);
15391
15518
  if (openProp === void 0) setUncontrolled(next);
15392
15519
  onOpenChange?.(next);
15393
15520
  }, [onOpenChange, openProp, uncontrolled]);
15394
- const contextValue = useMemo23(
15521
+ const contextValue = useMemo24(
15395
15522
  () => ({
15396
15523
  open,
15397
15524
  toggle,
@@ -15408,9 +15535,9 @@ var Collapsible = forwardRef16(function Collapsible2({ open: openProp, defaultOp
15408
15535
  "data-refineui": "collapsible",
15409
15536
  className
15410
15537
  };
15411
- return /* @__PURE__ */ jsx78(CollapsibleContext.Provider, { value: contextValue, children: asChild ? /* @__PURE__ */ jsx78(Slot6, { ...shared, children }) : /* @__PURE__ */ jsx78("div", { ...shared, children }) });
15538
+ return /* @__PURE__ */ jsx79(CollapsibleContext.Provider, { value: contextValue, children: asChild ? /* @__PURE__ */ jsx79(Slot7, { ...shared, children }) : /* @__PURE__ */ jsx79("div", { ...shared, children }) });
15412
15539
  });
15413
- var CollapsibleTrigger = forwardRef16(
15540
+ var CollapsibleTrigger = forwardRef17(
15414
15541
  function CollapsibleTrigger2({
15415
15542
  asChild = false,
15416
15543
  onClick,
@@ -15437,8 +15564,8 @@ var CollapsibleTrigger = forwardRef16(
15437
15564
  if (!event.defaultPrevented) toggle();
15438
15565
  }
15439
15566
  };
15440
- if (asChild) return /* @__PURE__ */ jsx78(Slot6, { ...shared, children });
15441
- return /* @__PURE__ */ jsx78(
15567
+ if (asChild) return /* @__PURE__ */ jsx79(Slot7, { ...shared, children });
15568
+ return /* @__PURE__ */ jsx79(
15442
15569
  Button,
15443
15570
  {
15444
15571
  ...shared,
@@ -15452,7 +15579,7 @@ var CollapsibleTrigger = forwardRef16(
15452
15579
  );
15453
15580
  }
15454
15581
  );
15455
- var CollapsibleContent = forwardRef16(
15582
+ var CollapsibleContent = forwardRef17(
15456
15583
  function CollapsibleContent2({ className, children, style, ...props }, ref) {
15457
15584
  const { open, contentId, triggerId, reduceMotion } = useCollapsibleContext("CollapsibleContent");
15458
15585
  const gridStyle = {
@@ -15467,7 +15594,7 @@ var CollapsibleContent = forwardRef16(
15467
15594
  pointerEvents: open ? void 0 : "none",
15468
15595
  ...style
15469
15596
  };
15470
- return /* @__PURE__ */ jsx78(
15597
+ return /* @__PURE__ */ jsx79(
15471
15598
  "div",
15472
15599
  {
15473
15600
  ...props,
@@ -15479,7 +15606,7 @@ var CollapsibleContent = forwardRef16(
15479
15606
  "data-state": open ? "open" : "closed",
15480
15607
  "data-refineui": "collapsible-content",
15481
15608
  style: gridStyle,
15482
- children: /* @__PURE__ */ jsx78("div", { className: collapsibleStyles.panelOuter, children: /* @__PURE__ */ jsx78("div", { className: clsx108(className), style: innerMotionStyle, children }) })
15609
+ children: /* @__PURE__ */ jsx79("div", { className: collapsibleStyles.panelOuter, children: /* @__PURE__ */ jsx79("div", { className: clsx108(className), style: innerMotionStyle, children }) })
15483
15610
  }
15484
15611
  );
15485
15612
  }
@@ -15487,28 +15614,28 @@ var CollapsibleContent = forwardRef16(
15487
15614
 
15488
15615
  // src/components/ContextMenu/ContextMenu.tsx
15489
15616
  import {
15490
- createContext as createContext28,
15491
- forwardRef as forwardRef17,
15492
- useCallback as useCallback23,
15493
- useContext as useContext32,
15617
+ createContext as createContext29,
15618
+ forwardRef as forwardRef18,
15619
+ useCallback as useCallback24,
15620
+ useContext as useContext33,
15494
15621
  useEffect as useEffect22,
15495
15622
  useLayoutEffect as useLayoutEffect14,
15496
- useMemo as useMemo24,
15623
+ useMemo as useMemo25,
15497
15624
  useRef as useRef24,
15498
- useState as useState34
15625
+ useState as useState35
15499
15626
  } from "react";
15500
15627
  import { createPortal as createPortal7 } from "react-dom";
15501
15628
  import { clsx as clsx109 } from "clsx";
15502
15629
  import { componentSizes as componentSizes3, iconSizes as iconSizes23, semanticInteraction as semanticInteraction10 } from "@refineui/tokens";
15503
15630
  import { motionMsToNumber as motionMsToNumber7 } from "@refineui/utilities/animation";
15504
- import { Slot as Slot7 } from "@refineui/utilities/react";
15505
- import { Fragment as Fragment5, jsx as jsx79, jsxs as jsxs33 } from "react/jsx-runtime";
15631
+ import { Slot as Slot8 } from "@refineui/utilities/react";
15632
+ import { Fragment as Fragment5, jsx as jsx80, jsxs as jsxs33 } from "react/jsx-runtime";
15506
15633
  var MENU_ATTR = "data-refineui-context-menu";
15507
15634
  var CLOSE_MS = motionMsToNumber7(semanticInteraction10.duration.normal);
15508
- var MenuContext2 = createContext28(null);
15509
- var SubContext = createContext28(null);
15635
+ var MenuContext2 = createContext29(null);
15636
+ var SubContext = createContext29(null);
15510
15637
  function useMenu() {
15511
- const value = useContext32(MenuContext2);
15638
+ const value = useContext33(MenuContext2);
15512
15639
  if (!value) throw new Error("Context menu parts must be used within ContextMenu");
15513
15640
  return value;
15514
15641
  }
@@ -15525,29 +15652,29 @@ function placeInView(element, x, y) {
15525
15652
  }
15526
15653
  function ContextMenu({ modal = true, onOpenChange, children }) {
15527
15654
  void modal;
15528
- const [open, setOpen] = useState34(false);
15529
- const [point, setPoint] = useState34({ x: 0, y: 0 });
15655
+ const [open, setOpen] = useState35(false);
15656
+ const [point, setPoint] = useState35({ x: 0, y: 0 });
15530
15657
  const openRef = useRef24(false);
15531
15658
  const onOpenChangeRef = useRef24(onOpenChange);
15532
15659
  openRef.current = open;
15533
15660
  onOpenChangeRef.current = onOpenChange;
15534
- const close = useCallback23(() => {
15661
+ const close = useCallback24(() => {
15535
15662
  if (!openRef.current) return;
15536
15663
  openRef.current = false;
15537
15664
  setOpen(false);
15538
15665
  onOpenChangeRef.current?.(false);
15539
15666
  }, []);
15540
- const openAt = useCallback23((x, y) => {
15667
+ const openAt = useCallback24((x, y) => {
15541
15668
  setPoint({ x, y });
15542
15669
  const wasOpen = openRef.current;
15543
15670
  openRef.current = true;
15544
15671
  setOpen(true);
15545
15672
  if (!wasOpen) onOpenChangeRef.current?.(true);
15546
15673
  }, []);
15547
- const value = useMemo24(() => ({ open, point, openAt, close }), [open, point, openAt, close]);
15548
- return /* @__PURE__ */ jsx79(MenuContext2.Provider, { value, children });
15674
+ const value = useMemo25(() => ({ open, point, openAt, close }), [open, point, openAt, close]);
15675
+ return /* @__PURE__ */ jsx80(MenuContext2.Provider, { value, children });
15549
15676
  }
15550
- var ContextMenuTrigger = forwardRef17(function ContextMenuTrigger2({ asChild = false, onContextMenu, children, ...props }, ref) {
15677
+ var ContextMenuTrigger = forwardRef18(function ContextMenuTrigger2({ asChild = false, onContextMenu, children, ...props }, ref) {
15551
15678
  const { openAt } = useMenu();
15552
15679
  const shared = {
15553
15680
  ...props,
@@ -15560,17 +15687,17 @@ var ContextMenuTrigger = forwardRef17(function ContextMenuTrigger2({ asChild = f
15560
15687
  openAt(event.clientX, event.clientY);
15561
15688
  }
15562
15689
  };
15563
- if (asChild) return /* @__PURE__ */ jsx79(Slot7, { ...shared, children });
15564
- return /* @__PURE__ */ jsx79("span", { ...shared, className: clsx109(menuStyles.triggerFallback, props.className), children });
15690
+ if (asChild) return /* @__PURE__ */ jsx80(Slot8, { ...shared, children });
15691
+ return /* @__PURE__ */ jsx80("span", { ...shared, className: clsx109(menuStyles.triggerFallback, props.className), children });
15565
15692
  });
15566
15693
  function ContextMenuPortal({ children }) {
15567
- return /* @__PURE__ */ jsx79(Fragment5, { children });
15694
+ return /* @__PURE__ */ jsx80(Fragment5, { children });
15568
15695
  }
15569
- var ContextMenuContent = forwardRef17(function ContextMenuContent2({ className, style, onPointerDown, children, ...props }, ref) {
15696
+ var ContextMenuContent = forwardRef18(function ContextMenuContent2({ className, style, onPointerDown, children, ...props }, ref) {
15570
15697
  const { open, point, close } = useMenu();
15571
15698
  const localRef = useRef24(null);
15572
- const [shouldRender, setShouldRender] = useState34(open);
15573
- const [isClosing, setIsClosing] = useState34(false);
15699
+ const [shouldRender, setShouldRender] = useState35(open);
15700
+ const [isClosing, setIsClosing] = useState35(false);
15574
15701
  useEffect22(() => {
15575
15702
  if (open) {
15576
15703
  setShouldRender(true);
@@ -15608,7 +15735,7 @@ var ContextMenuContent = forwardRef17(function ContextMenuContent2({ className,
15608
15735
  }, [open, close]);
15609
15736
  if (!shouldRender || typeof document === "undefined") return null;
15610
15737
  return createPortal7(
15611
- /* @__PURE__ */ jsx79(
15738
+ /* @__PURE__ */ jsx80(
15612
15739
  "div",
15613
15740
  {
15614
15741
  ...props,
@@ -15635,7 +15762,7 @@ var ContextMenuContent = forwardRef17(function ContextMenuContent2({ className,
15635
15762
  onPointerDown?.(event);
15636
15763
  },
15637
15764
  onContextMenu: (event) => event.preventDefault(),
15638
- children: /* @__PURE__ */ jsx79("div", { role: "menu", "data-refineui": "menu", className: clsx109(menuStyles.list, className), children })
15765
+ children: /* @__PURE__ */ jsx80("div", { role: "menu", "data-refineui": "menu", className: clsx109(menuStyles.list, className), children })
15639
15766
  }
15640
15767
  ),
15641
15768
  document.body
@@ -15652,11 +15779,11 @@ function runSelect(onSelect, close, disabled) {
15652
15779
  onSelect?.(selectEvent);
15653
15780
  if (!selectEvent.defaultPrevented) close();
15654
15781
  }
15655
- var ContextMenuItem = forwardRef17(function ContextMenuItem2({ disabled = false, description, shortcut, startIcon, endIcon, state = "default", onSelect, className, onClick, onKeyDown, children, ...props }, ref) {
15782
+ var ContextMenuItem = forwardRef18(function ContextMenuItem2({ disabled = false, description, shortcut, startIcon, endIcon, state = "default", onSelect, className, onClick, onKeyDown, children, ...props }, ref) {
15656
15783
  const { close } = useMenu();
15657
15784
  const isDisabled = disabled || state === "disabled";
15658
15785
  const slotted = startIcon != null || description != null || shortcut != null || endIcon != null;
15659
- return /* @__PURE__ */ jsx79(
15786
+ return /* @__PURE__ */ jsx80(
15660
15787
  "button",
15661
15788
  {
15662
15789
  ref,
@@ -15683,7 +15810,7 @@ var ContextMenuItem = forwardRef17(function ContextMenuItem2({ disabled = false,
15683
15810
  }
15684
15811
  },
15685
15812
  children: slotted ? /* @__PURE__ */ jsxs33("span", { className: menuStyles.row, children: [
15686
- startIcon ? /* @__PURE__ */ jsx79(
15813
+ startIcon ? /* @__PURE__ */ jsx80(
15687
15814
  "span",
15688
15815
  {
15689
15816
  className: menuStyles.iconWrap,
@@ -15692,12 +15819,12 @@ var ContextMenuItem = forwardRef17(function ContextMenuItem2({ disabled = false,
15692
15819
  }
15693
15820
  ) : null,
15694
15821
  /* @__PURE__ */ jsxs33("span", { className: menuStyles.textCol, children: [
15695
- /* @__PURE__ */ jsx79("span", { className: menuStyles.title, children }),
15696
- description ? /* @__PURE__ */ jsx79("span", { className: clsx109(menuStyles.description, isDisabled ? menuStyles.descriptionDisabled : menuStyles.descriptionEnabled), children: description }) : null
15822
+ /* @__PURE__ */ jsx80("span", { className: menuStyles.title, children }),
15823
+ description ? /* @__PURE__ */ jsx80("span", { className: clsx109(menuStyles.description, isDisabled ? menuStyles.descriptionDisabled : menuStyles.descriptionEnabled), children: description }) : null
15697
15824
  ] }),
15698
15825
  (shortcut || endIcon) && /* @__PURE__ */ jsxs33("span", { className: menuStyles.rightWrap, children: [
15699
- shortcut ? /* @__PURE__ */ jsx79("span", { className: menuStyles.shortcut, children: shortcut }) : null,
15700
- endIcon ? /* @__PURE__ */ jsx79(
15826
+ shortcut ? /* @__PURE__ */ jsx80("span", { className: menuStyles.shortcut, children: shortcut }) : null,
15827
+ endIcon ? /* @__PURE__ */ jsx80(
15701
15828
  "span",
15702
15829
  {
15703
15830
  className: menuStyles.iconWrap,
@@ -15706,13 +15833,13 @@ var ContextMenuItem = forwardRef17(function ContextMenuItem2({ disabled = false,
15706
15833
  }
15707
15834
  ) : null
15708
15835
  ] })
15709
- ] }) : /* @__PURE__ */ jsx79("span", { className: menuStyles.row, children })
15836
+ ] }) : /* @__PURE__ */ jsx80("span", { className: menuStyles.row, children })
15710
15837
  }
15711
15838
  );
15712
15839
  });
15713
- var ContextMenuSeparator = forwardRef17(
15840
+ var ContextMenuSeparator = forwardRef18(
15714
15841
  function ContextMenuSeparator2({ className, ...props }, ref) {
15715
- return /* @__PURE__ */ jsx79(
15842
+ return /* @__PURE__ */ jsx80(
15716
15843
  "div",
15717
15844
  {
15718
15845
  ref,
@@ -15722,16 +15849,16 @@ var ContextMenuSeparator = forwardRef17(
15722
15849
  ...{ [MENU_ATTR]: "" },
15723
15850
  className: clsx109(menuStyles.dividerWrap, className),
15724
15851
  ...props,
15725
- children: /* @__PURE__ */ jsx79("div", { className: menuStyles.dividerLine })
15852
+ children: /* @__PURE__ */ jsx80("div", { className: menuStyles.dividerLine })
15726
15853
  }
15727
15854
  );
15728
15855
  }
15729
15856
  );
15730
15857
  function ContextMenuLabel({ className, children, ...props }) {
15731
- return /* @__PURE__ */ jsx79("div", { "data-refineui": "menu-label", className: clsx109(menuStyles.section, className), ...props, children: /* @__PURE__ */ jsx79("span", { className: menuStyles.sectionText, children }) });
15858
+ return /* @__PURE__ */ jsx80("div", { "data-refineui": "menu-label", className: clsx109(menuStyles.section, className), ...props, children: /* @__PURE__ */ jsx80("span", { className: menuStyles.sectionText, children }) });
15732
15859
  }
15733
15860
  function ContextMenuSub({ children }) {
15734
- const [open, setOpen] = useState34(false);
15861
+ const [open, setOpen] = useState35(false);
15735
15862
  const triggerRef = useRef24(null);
15736
15863
  const timer = useRef24(null);
15737
15864
  const clear = () => {
@@ -15739,7 +15866,7 @@ function ContextMenuSub({ children }) {
15739
15866
  timer.current = null;
15740
15867
  };
15741
15868
  useEffect22(() => clear, []);
15742
- const value = useMemo24(
15869
+ const value = useMemo25(
15743
15870
  () => ({
15744
15871
  open,
15745
15872
  triggerRef,
@@ -15754,14 +15881,14 @@ function ContextMenuSub({ children }) {
15754
15881
  }),
15755
15882
  [open]
15756
15883
  );
15757
- return /* @__PURE__ */ jsx79(SubContext.Provider, { value, children });
15884
+ return /* @__PURE__ */ jsx80(SubContext.Provider, { value, children });
15758
15885
  }
15759
15886
  function useSub2() {
15760
- const value = useContext32(SubContext);
15887
+ const value = useContext33(SubContext);
15761
15888
  if (!value) throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");
15762
15889
  return value;
15763
15890
  }
15764
- var ContextMenuSubTrigger = forwardRef17(
15891
+ var ContextMenuSubTrigger = forwardRef18(
15765
15892
  function ContextMenuSubTrigger2({ asChild = false, description, startIcon, onMouseEnter, onMouseLeave, onClick, className, children, ...props }, ref) {
15766
15893
  const sub = useSub2();
15767
15894
  const shared = {
@@ -15797,9 +15924,9 @@ var ContextMenuSubTrigger = forwardRef17(
15797
15924
  if (!event.defaultPrevented) sub.show();
15798
15925
  }
15799
15926
  };
15800
- if (asChild) return /* @__PURE__ */ jsx79(Slot7, { ...shared, children });
15801
- return /* @__PURE__ */ jsx79("button", { ...shared, children: /* @__PURE__ */ jsxs33("span", { className: menuStyles.row, children: [
15802
- startIcon ? /* @__PURE__ */ jsx79(
15927
+ if (asChild) return /* @__PURE__ */ jsx80(Slot8, { ...shared, children });
15928
+ return /* @__PURE__ */ jsx80("button", { ...shared, children: /* @__PURE__ */ jsxs33("span", { className: menuStyles.row, children: [
15929
+ startIcon ? /* @__PURE__ */ jsx80(
15803
15930
  "span",
15804
15931
  {
15805
15932
  className: menuStyles.iconWrap,
@@ -15808,25 +15935,25 @@ var ContextMenuSubTrigger = forwardRef17(
15808
15935
  }
15809
15936
  ) : null,
15810
15937
  /* @__PURE__ */ jsxs33("span", { className: menuStyles.textCol, children: [
15811
- /* @__PURE__ */ jsx79("span", { className: menuStyles.title, children }),
15812
- description ? /* @__PURE__ */ jsx79("span", { className: clsx109(menuStyles.description, menuStyles.descriptionEnabled), children: description }) : null
15938
+ /* @__PURE__ */ jsx80("span", { className: menuStyles.title, children }),
15939
+ description ? /* @__PURE__ */ jsx80("span", { className: clsx109(menuStyles.description, menuStyles.descriptionEnabled), children: description }) : null
15813
15940
  ] }),
15814
- /* @__PURE__ */ jsx79("span", { className: menuStyles.rightWrap, children: /* @__PURE__ */ jsx79(
15941
+ /* @__PURE__ */ jsx80("span", { className: menuStyles.rightWrap, children: /* @__PURE__ */ jsx80(
15815
15942
  "span",
15816
15943
  {
15817
15944
  className: menuStyles.iconWrap,
15818
15945
  style: { width: iconSizes23.small, minWidth: iconSizes23.small, height: iconSizes23.small },
15819
- children: /* @__PURE__ */ jsx79(WebIcon, { name: "chevron-right", size: iconSizes23.small, color: "currentColor", "aria-hidden": true })
15946
+ children: /* @__PURE__ */ jsx80(WebIcon, { name: "chevron-right", size: iconSizes23.small, color: "currentColor", "aria-hidden": true })
15820
15947
  }
15821
15948
  ) })
15822
15949
  ] }) });
15823
15950
  }
15824
15951
  );
15825
- var ContextMenuSubContent = forwardRef17(
15952
+ var ContextMenuSubContent = forwardRef18(
15826
15953
  function ContextMenuSubContent2({ className, style, onPointerDown, onMouseEnter, onMouseLeave, ...props }, ref) {
15827
15954
  const sub = useSub2();
15828
15955
  const localRef = useRef24(null);
15829
- const [side, setSide] = useState34("right");
15956
+ const [side, setSide] = useState35("right");
15830
15957
  useLayoutEffect14(() => {
15831
15958
  const trigger = sub.triggerRef.current;
15832
15959
  const element = localRef.current;
@@ -15845,7 +15972,7 @@ var ContextMenuSubContent = forwardRef17(
15845
15972
  }, [sub.open, sub.triggerRef]);
15846
15973
  if (!sub.open || typeof document === "undefined") return null;
15847
15974
  return createPortal7(
15848
- /* @__PURE__ */ jsx79(
15975
+ /* @__PURE__ */ jsx80(
15849
15976
  "div",
15850
15977
  {
15851
15978
  ...props,
@@ -16112,9 +16239,11 @@ export {
16112
16239
  SidebarPeekInset,
16113
16240
  SidebarPeekPanel,
16114
16241
  SidebarPeekPin,
16242
+ SidebarProvider,
16243
+ SidebarTrigger,
16115
16244
  Skeleton,
16116
16245
  Slider,
16117
- Slot5 as Slot,
16246
+ Slot6 as Slot,
16118
16247
  Spacer,
16119
16248
  SpinButton,
16120
16249
  Spinner,
@@ -16169,6 +16298,7 @@ export {
16169
16298
  semanticTextClass,
16170
16299
  sizedComponentTextClass,
16171
16300
  toast,
16301
+ useSidebar,
16172
16302
  useSidebarPeek
16173
16303
  };
16174
16304
  //# sourceMappingURL=index.js.map