@refineui/react 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +500 -416
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -22
- package/dist/index.d.ts +33 -22
- package/dist/index.js +447 -358
- package/dist/index.js.map +1 -1
- package/dist/spec/components/sidebar.json +3 -1
- package/dist/spec/contract-index.json +1 -1
- package/dist/spec/token-graph.json +71 -89
- package/dist/spec/token-trace-v2.json +29 -44
- package/package.json +1 -1
- package/refineui.css +2 -4
- package/spec/components/sidebar.json +3 -1
package/dist/index.js
CHANGED
|
@@ -35,14 +35,13 @@ var componentColorTokens = {
|
|
|
35
35
|
states: buttonPrimaryColorTokens.states
|
|
36
36
|
},
|
|
37
37
|
secondary: {
|
|
38
|
-
background: semanticToken("
|
|
38
|
+
background: semanticToken("backgroundSurfaceHover"),
|
|
39
39
|
foreground: semanticToken("foregroundPrimary"),
|
|
40
|
-
|
|
41
|
-
|
|
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-
|
|
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
|
{
|
|
@@ -11041,6 +11044,89 @@ function useSidebarPeek() {
|
|
|
11041
11044
|
return useSidebarPeekContext("useSidebarPeek");
|
|
11042
11045
|
}
|
|
11043
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
|
+
|
|
11044
11130
|
// src/components/Pagination/Pagination.tsx
|
|
11045
11131
|
import { clsx as clsx84 } from "clsx";
|
|
11046
11132
|
import { iconSizes as iconSizes17 } from "@refineui/tokens";
|
|
@@ -11061,18 +11147,18 @@ var paginationStyles = {
|
|
|
11061
11147
|
};
|
|
11062
11148
|
|
|
11063
11149
|
// src/components/Pagination/Pagination.tsx
|
|
11064
|
-
import { jsx as
|
|
11150
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
11065
11151
|
function PaginationRoot({ className, ...props }) {
|
|
11066
|
-
return /* @__PURE__ */
|
|
11152
|
+
return /* @__PURE__ */ jsx63("nav", { "aria-label": "Pagination", className: clsx84(paginationStyles.root, className), ...props });
|
|
11067
11153
|
}
|
|
11068
11154
|
function PaginationContent({ className, ...props }) {
|
|
11069
|
-
return /* @__PURE__ */
|
|
11155
|
+
return /* @__PURE__ */ jsx63("ul", { className: clsx84(paginationStyles.listWrap, className), ...props });
|
|
11070
11156
|
}
|
|
11071
11157
|
function PaginationItem({ className, ...props }) {
|
|
11072
|
-
return /* @__PURE__ */
|
|
11158
|
+
return /* @__PURE__ */ jsx63("li", { className, ...props });
|
|
11073
11159
|
}
|
|
11074
11160
|
function PaginationLink({ className, isActive, ...props }) {
|
|
11075
|
-
return /* @__PURE__ */
|
|
11161
|
+
return /* @__PURE__ */ jsx63(
|
|
11076
11162
|
"a",
|
|
11077
11163
|
{
|
|
11078
11164
|
"data-refineui": "pagination",
|
|
@@ -11092,7 +11178,7 @@ function PaginationNavButton({
|
|
|
11092
11178
|
}) {
|
|
11093
11179
|
const isPrev = direction === "prev";
|
|
11094
11180
|
const iconColor = disabled ? resolveColorTokenValue9(componentColorTokens.pagination.navIcon.disabled) : resolveColorTokenValue9(componentColorTokens.pagination.navIcon.default);
|
|
11095
|
-
return /* @__PURE__ */
|
|
11181
|
+
return /* @__PURE__ */ jsx63(
|
|
11096
11182
|
"button",
|
|
11097
11183
|
{
|
|
11098
11184
|
type: "button",
|
|
@@ -11102,7 +11188,7 @@ function PaginationNavButton({
|
|
|
11102
11188
|
"aria-label": isPrev ? "Previous page" : "Next page",
|
|
11103
11189
|
className: clsx84(paginationStyles.itemShell, paginationStyles.nav, className),
|
|
11104
11190
|
...props,
|
|
11105
|
-
children: /* @__PURE__ */
|
|
11191
|
+
children: /* @__PURE__ */ jsx63(
|
|
11106
11192
|
WebIcon,
|
|
11107
11193
|
{
|
|
11108
11194
|
name: isPrev ? "chevron-left" : "chevron-right",
|
|
@@ -11115,13 +11201,13 @@ function PaginationNavButton({
|
|
|
11115
11201
|
);
|
|
11116
11202
|
}
|
|
11117
11203
|
function PaginationPrevious(props) {
|
|
11118
|
-
return /* @__PURE__ */
|
|
11204
|
+
return /* @__PURE__ */ jsx63(PaginationNavButton, { direction: "prev", ...props });
|
|
11119
11205
|
}
|
|
11120
11206
|
function PaginationNext(props) {
|
|
11121
|
-
return /* @__PURE__ */
|
|
11207
|
+
return /* @__PURE__ */ jsx63(PaginationNavButton, { direction: "next", ...props });
|
|
11122
11208
|
}
|
|
11123
11209
|
function PaginationEllipsis({ className, ...props }) {
|
|
11124
|
-
return /* @__PURE__ */
|
|
11210
|
+
return /* @__PURE__ */ jsx63(
|
|
11125
11211
|
"span",
|
|
11126
11212
|
{
|
|
11127
11213
|
"aria-hidden": true,
|
|
@@ -11129,7 +11215,7 @@ function PaginationEllipsis({ className, ...props }) {
|
|
|
11129
11215
|
"data-ellipsis": "true",
|
|
11130
11216
|
className: clsx84(paginationStyles.itemShell, paginationStyles.ellipsis, className),
|
|
11131
11217
|
...props,
|
|
11132
|
-
children: /* @__PURE__ */
|
|
11218
|
+
children: /* @__PURE__ */ jsx63(
|
|
11133
11219
|
WebIcon,
|
|
11134
11220
|
{
|
|
11135
11221
|
name: "more-horizontal",
|
|
@@ -11142,24 +11228,24 @@ function PaginationEllipsis({ className, ...props }) {
|
|
|
11142
11228
|
);
|
|
11143
11229
|
}
|
|
11144
11230
|
function Pagination(props) {
|
|
11145
|
-
return /* @__PURE__ */
|
|
11231
|
+
return /* @__PURE__ */ jsx63(PaginationRoot, { ...props });
|
|
11146
11232
|
}
|
|
11147
11233
|
|
|
11148
11234
|
// src/components/PopOver/PopOver.tsx
|
|
11149
11235
|
import { clsx as clsx85 } from "clsx";
|
|
11150
11236
|
import {
|
|
11151
|
-
createContext as
|
|
11152
|
-
useCallback as
|
|
11153
|
-
useContext as
|
|
11237
|
+
createContext as createContext21,
|
|
11238
|
+
useCallback as useCallback17,
|
|
11239
|
+
useContext as useContext23,
|
|
11154
11240
|
useEffect as useEffect15,
|
|
11155
|
-
useId as
|
|
11156
|
-
useMemo as
|
|
11241
|
+
useId as useId14,
|
|
11242
|
+
useMemo as useMemo17,
|
|
11157
11243
|
useRef as useRef17,
|
|
11158
|
-
useState as
|
|
11244
|
+
useState as useState21
|
|
11159
11245
|
} from "react";
|
|
11160
11246
|
import { spacings as spacings4, strokeWidths as strokeWidths2 } from "@refineui/tokens";
|
|
11161
11247
|
import { resolveColorTokenValue as resolveColorTokenValue10 } from "@refineui/utilities/color";
|
|
11162
|
-
import { Slot as
|
|
11248
|
+
import { Slot as Slot4, getMergeableTriggerChild as getMergeableTriggerChild3 } from "@refineui/utilities/react";
|
|
11163
11249
|
|
|
11164
11250
|
// src/components/PopOver/style.ts
|
|
11165
11251
|
var popoverStyles = {
|
|
@@ -11193,10 +11279,10 @@ function popoverFloatingClasses(placement, align) {
|
|
|
11193
11279
|
}
|
|
11194
11280
|
|
|
11195
11281
|
// src/components/PopOver/PopOver.tsx
|
|
11196
|
-
import { jsx as
|
|
11197
|
-
var PopoverContext =
|
|
11282
|
+
import { jsx as jsx64, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
11283
|
+
var PopoverContext = createContext21(null);
|
|
11198
11284
|
function usePopoverContext(component) {
|
|
11199
|
-
const ctx =
|
|
11285
|
+
const ctx = useContext23(PopoverContext);
|
|
11200
11286
|
if (!ctx) throw new Error(`${component} must be used within <Popover>`);
|
|
11201
11287
|
return ctx;
|
|
11202
11288
|
}
|
|
@@ -11252,20 +11338,20 @@ function floatingGapStyle(placement) {
|
|
|
11252
11338
|
return { marginLeft: POPOVER_GAP };
|
|
11253
11339
|
}
|
|
11254
11340
|
function Popover({ children, className, open: openProp, defaultOpen = false, onOpenChange, ...props }) {
|
|
11255
|
-
const [internalOpen, setInternalOpen] =
|
|
11341
|
+
const [internalOpen, setInternalOpen] = useState21(defaultOpen);
|
|
11256
11342
|
const open = openProp ?? internalOpen;
|
|
11257
|
-
const setOpen =
|
|
11343
|
+
const setOpen = useCallback17(
|
|
11258
11344
|
(next) => {
|
|
11259
11345
|
if (openProp === void 0) setInternalOpen(next);
|
|
11260
11346
|
onOpenChange?.(next);
|
|
11261
11347
|
},
|
|
11262
11348
|
[openProp, onOpenChange]
|
|
11263
11349
|
);
|
|
11264
|
-
const toggle =
|
|
11350
|
+
const toggle = useCallback17(() => setOpen(!open), [open, setOpen]);
|
|
11265
11351
|
const containerRef = useRef17(null);
|
|
11266
11352
|
const contentRef = useRef17(null);
|
|
11267
11353
|
const triggerRef = useRef17(null);
|
|
11268
|
-
const contentId =
|
|
11354
|
+
const contentId = useId14();
|
|
11269
11355
|
useEffect15(() => {
|
|
11270
11356
|
const handler = (e) => {
|
|
11271
11357
|
if (containerRef.current && !containerRef.current.contains(e.target)) setOpen(false);
|
|
@@ -11280,7 +11366,7 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
|
|
|
11280
11366
|
if (open) document.addEventListener("keydown", onKey);
|
|
11281
11367
|
return () => document.removeEventListener("keydown", onKey);
|
|
11282
11368
|
}, [open, setOpen]);
|
|
11283
|
-
const onTriggerKeyDown =
|
|
11369
|
+
const onTriggerKeyDown = useCallback17(
|
|
11284
11370
|
(e) => {
|
|
11285
11371
|
if (e.key === "Enter" || e.key === " ") {
|
|
11286
11372
|
e.preventDefault();
|
|
@@ -11289,7 +11375,7 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
|
|
|
11289
11375
|
},
|
|
11290
11376
|
[toggle]
|
|
11291
11377
|
);
|
|
11292
|
-
const value =
|
|
11378
|
+
const value = useMemo17(
|
|
11293
11379
|
() => ({
|
|
11294
11380
|
open,
|
|
11295
11381
|
setOpen,
|
|
@@ -11302,7 +11388,7 @@ function Popover({ children, className, open: openProp, defaultOpen = false, onO
|
|
|
11302
11388
|
}),
|
|
11303
11389
|
[open, setOpen, toggle, contentId, onTriggerKeyDown]
|
|
11304
11390
|
);
|
|
11305
|
-
return /* @__PURE__ */
|
|
11391
|
+
return /* @__PURE__ */ jsx64(PopoverContext.Provider, { value, children: /* @__PURE__ */ jsx64(
|
|
11306
11392
|
"div",
|
|
11307
11393
|
{
|
|
11308
11394
|
ref: containerRef,
|
|
@@ -11318,8 +11404,8 @@ function PopoverTrigger({ children, className, ...props }) {
|
|
|
11318
11404
|
const mergeEl = getMergeableTriggerChild3(children);
|
|
11319
11405
|
if (mergeEl) {
|
|
11320
11406
|
const passthrough = props;
|
|
11321
|
-
return /* @__PURE__ */
|
|
11322
|
-
|
|
11407
|
+
return /* @__PURE__ */ jsx64(
|
|
11408
|
+
Slot4,
|
|
11323
11409
|
{
|
|
11324
11410
|
ref: triggerRef,
|
|
11325
11411
|
...props,
|
|
@@ -11340,7 +11426,7 @@ function PopoverTrigger({ children, className, ...props }) {
|
|
|
11340
11426
|
);
|
|
11341
11427
|
}
|
|
11342
11428
|
const passthroughBtn = props;
|
|
11343
|
-
return /* @__PURE__ */
|
|
11429
|
+
return /* @__PURE__ */ jsx64(
|
|
11344
11430
|
"button",
|
|
11345
11431
|
{
|
|
11346
11432
|
type: "button",
|
|
@@ -11383,7 +11469,7 @@ function PopoverContent({
|
|
|
11383
11469
|
const rot = beakRotateDeg(placement);
|
|
11384
11470
|
const gapStyle = floatingGapStyle(placement);
|
|
11385
11471
|
if (!open) return null;
|
|
11386
|
-
return /* @__PURE__ */
|
|
11472
|
+
return /* @__PURE__ */ jsx64(
|
|
11387
11473
|
"div",
|
|
11388
11474
|
{
|
|
11389
11475
|
className: clsx85(
|
|
@@ -11392,7 +11478,7 @@ function PopoverContent({
|
|
|
11392
11478
|
),
|
|
11393
11479
|
style: gapStyle,
|
|
11394
11480
|
children: /* @__PURE__ */ jsxs24("div", { className: popoverStyles.panelWrap, children: [
|
|
11395
|
-
/* @__PURE__ */
|
|
11481
|
+
/* @__PURE__ */ jsx64("div", { className: popoverStyles.beakWrap, style: { ...bw, width: BEAK_W, height: BEAK_H }, "aria-hidden": true, children: /* @__PURE__ */ jsx64(
|
|
11396
11482
|
"div",
|
|
11397
11483
|
{
|
|
11398
11484
|
style: {
|
|
@@ -11411,14 +11497,14 @@ function PopoverContent({
|
|
|
11411
11497
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11412
11498
|
style: { display: "block" },
|
|
11413
11499
|
children: [
|
|
11414
|
-
/* @__PURE__ */
|
|
11415
|
-
/* @__PURE__ */
|
|
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 })
|
|
11416
11502
|
]
|
|
11417
11503
|
}
|
|
11418
11504
|
)
|
|
11419
11505
|
}
|
|
11420
11506
|
) }),
|
|
11421
|
-
/* @__PURE__ */
|
|
11507
|
+
/* @__PURE__ */ jsx64(
|
|
11422
11508
|
"div",
|
|
11423
11509
|
{
|
|
11424
11510
|
ref: contentRef,
|
|
@@ -11459,8 +11545,8 @@ function PopOver({
|
|
|
11459
11545
|
...props
|
|
11460
11546
|
}) {
|
|
11461
11547
|
return /* @__PURE__ */ jsxs24(Popover, { className, ...props, children: [
|
|
11462
|
-
/* @__PURE__ */
|
|
11463
|
-
/* @__PURE__ */
|
|
11548
|
+
/* @__PURE__ */ jsx64(PopoverTrigger, { children: trigger }),
|
|
11549
|
+
/* @__PURE__ */ jsx64(PopoverContent, { placement, align, children: content })
|
|
11464
11550
|
] });
|
|
11465
11551
|
}
|
|
11466
11552
|
|
|
@@ -11476,7 +11562,7 @@ var skeletonStyles = {
|
|
|
11476
11562
|
};
|
|
11477
11563
|
|
|
11478
11564
|
// src/components/Skeleton/Skeleton.tsx
|
|
11479
|
-
import { jsx as
|
|
11565
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
11480
11566
|
function Skeleton({
|
|
11481
11567
|
width,
|
|
11482
11568
|
height,
|
|
@@ -11508,7 +11594,7 @@ function Skeleton({
|
|
|
11508
11594
|
w = width ?? "100%";
|
|
11509
11595
|
}
|
|
11510
11596
|
const dimStyle = { width: w, height: h };
|
|
11511
|
-
return /* @__PURE__ */
|
|
11597
|
+
return /* @__PURE__ */ jsx65(
|
|
11512
11598
|
"div",
|
|
11513
11599
|
{
|
|
11514
11600
|
"data-refineui": "skeleton",
|
|
@@ -11526,7 +11612,7 @@ function Skeleton({
|
|
|
11526
11612
|
|
|
11527
11613
|
// src/components/Slider/Slider.tsx
|
|
11528
11614
|
import { clsx as clsx87 } from "clsx";
|
|
11529
|
-
import { useState as
|
|
11615
|
+
import { useState as useState22 } from "react";
|
|
11530
11616
|
|
|
11531
11617
|
// src/components/Slider/style.ts
|
|
11532
11618
|
var sliderStyles = {
|
|
@@ -11534,7 +11620,7 @@ var sliderStyles = {
|
|
|
11534
11620
|
};
|
|
11535
11621
|
|
|
11536
11622
|
// src/components/Slider/Slider.tsx
|
|
11537
|
-
import { jsx as
|
|
11623
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
11538
11624
|
function clampPct(n) {
|
|
11539
11625
|
if (Number.isNaN(n)) return 0;
|
|
11540
11626
|
return Math.min(100, Math.max(0, n));
|
|
@@ -11552,12 +11638,12 @@ function Slider({
|
|
|
11552
11638
|
style,
|
|
11553
11639
|
...props
|
|
11554
11640
|
}) {
|
|
11555
|
-
const [internalFillPct, setInternalFillPct] =
|
|
11641
|
+
const [internalFillPct, setInternalFillPct] = useState22(() => {
|
|
11556
11642
|
const v = defaultValue !== void 0 ? Number(defaultValue) : (min + max) / 2;
|
|
11557
11643
|
return clampPct((v - min) / (max - min) * 100);
|
|
11558
11644
|
});
|
|
11559
11645
|
const fillPct = value !== void 0 ? clampPct((Number(value) - min) / (max - min) * 100) : internalFillPct;
|
|
11560
|
-
return /* @__PURE__ */
|
|
11646
|
+
return /* @__PURE__ */ jsx66(
|
|
11561
11647
|
"input",
|
|
11562
11648
|
{
|
|
11563
11649
|
type: "range",
|
|
@@ -11597,16 +11683,16 @@ import { iconSizes as iconSizes18 } from "@refineui/tokens";
|
|
|
11597
11683
|
import {
|
|
11598
11684
|
Children as Children6,
|
|
11599
11685
|
cloneElement as cloneElement2,
|
|
11600
|
-
createContext as
|
|
11601
|
-
forwardRef as
|
|
11686
|
+
createContext as createContext22,
|
|
11687
|
+
forwardRef as forwardRef15,
|
|
11602
11688
|
isValidElement as isValidElement5,
|
|
11603
|
-
useCallback as
|
|
11604
|
-
useContext as
|
|
11689
|
+
useCallback as useCallback18,
|
|
11690
|
+
useContext as useContext24,
|
|
11605
11691
|
useEffect as useEffect16,
|
|
11606
11692
|
useLayoutEffect as useLayoutEffect9,
|
|
11607
|
-
useMemo as
|
|
11693
|
+
useMemo as useMemo18,
|
|
11608
11694
|
useRef as useRef18,
|
|
11609
|
-
useState as
|
|
11695
|
+
useState as useState23
|
|
11610
11696
|
} from "react";
|
|
11611
11697
|
|
|
11612
11698
|
// src/components/Carousel/style.ts
|
|
@@ -11639,11 +11725,11 @@ var carouselStyles = {
|
|
|
11639
11725
|
};
|
|
11640
11726
|
|
|
11641
11727
|
// src/components/Carousel/Carousel.tsx
|
|
11642
|
-
import { jsx as
|
|
11728
|
+
import { jsx as jsx67, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
11643
11729
|
var DRAG_COMMIT_RATIO = 0.18;
|
|
11644
|
-
var CarouselContext =
|
|
11730
|
+
var CarouselContext = createContext22(null);
|
|
11645
11731
|
function useCarouselContext(component) {
|
|
11646
|
-
const v =
|
|
11732
|
+
const v = useContext24(CarouselContext);
|
|
11647
11733
|
if (!v) throw new Error(`${component} must be used within Carousel.`);
|
|
11648
11734
|
return v;
|
|
11649
11735
|
}
|
|
@@ -11662,13 +11748,13 @@ function Carousel({
|
|
|
11662
11748
|
...props
|
|
11663
11749
|
}) {
|
|
11664
11750
|
const isControlled = indexControlled !== void 0;
|
|
11665
|
-
const [internalIndex, setInternalIndex] =
|
|
11666
|
-
const [count, setCount] =
|
|
11667
|
-
const [trackIndex, setTrackIndex] =
|
|
11668
|
-
const [instant, setInstant] =
|
|
11751
|
+
const [internalIndex, setInternalIndex] = useState23(defaultIndex);
|
|
11752
|
+
const [count, setCount] = useState23(0);
|
|
11753
|
+
const [trackIndex, setTrackIndex] = useState23(defaultIndex);
|
|
11754
|
+
const [instant, setInstant] = useState23(false);
|
|
11669
11755
|
const index = isControlled ? indexControlled : internalIndex;
|
|
11670
11756
|
const loopActive = loop && count > 1;
|
|
11671
|
-
const commitLogical =
|
|
11757
|
+
const commitLogical = useCallback18(
|
|
11672
11758
|
(next) => {
|
|
11673
11759
|
const normalized = clampIndex(next, Math.max(count, 1));
|
|
11674
11760
|
if (!isControlled) setInternalIndex(normalized);
|
|
@@ -11696,7 +11782,7 @@ function Carousel({
|
|
|
11696
11782
|
}, [index, count, loopActive]);
|
|
11697
11783
|
const canScrollPrev = loopActive ? true : index > 0;
|
|
11698
11784
|
const canScrollNext = loopActive ? true : index < count - 1;
|
|
11699
|
-
const scrollTo =
|
|
11785
|
+
const scrollTo = useCallback18(
|
|
11700
11786
|
(i) => {
|
|
11701
11787
|
if (count <= 0) return;
|
|
11702
11788
|
const next = clampIndex(i, count);
|
|
@@ -11705,7 +11791,7 @@ function Carousel({
|
|
|
11705
11791
|
},
|
|
11706
11792
|
[commitLogical, count, loopActive]
|
|
11707
11793
|
);
|
|
11708
|
-
const scrollPrev =
|
|
11794
|
+
const scrollPrev = useCallback18(() => {
|
|
11709
11795
|
if (count <= 0) return;
|
|
11710
11796
|
if (loopActive) {
|
|
11711
11797
|
if (trackIndex < 1 || trackIndex > count) return;
|
|
@@ -11718,7 +11804,7 @@ function Carousel({
|
|
|
11718
11804
|
setTrackIndex(index - 1);
|
|
11719
11805
|
}
|
|
11720
11806
|
}, [commitLogical, count, index, loopActive, trackIndex]);
|
|
11721
|
-
const scrollNext =
|
|
11807
|
+
const scrollNext = useCallback18(() => {
|
|
11722
11808
|
if (count <= 0) return;
|
|
11723
11809
|
if (loopActive) {
|
|
11724
11810
|
if (trackIndex < 1 || trackIndex > count) return;
|
|
@@ -11731,7 +11817,7 @@ function Carousel({
|
|
|
11731
11817
|
setTrackIndex(index + 1);
|
|
11732
11818
|
}
|
|
11733
11819
|
}, [commitLogical, count, index, loopActive, trackIndex]);
|
|
11734
|
-
const onTrackSettled =
|
|
11820
|
+
const onTrackSettled = useCallback18(() => {
|
|
11735
11821
|
if (!loopActive) return;
|
|
11736
11822
|
if (trackIndex === 0) {
|
|
11737
11823
|
setInstant(true);
|
|
@@ -11747,7 +11833,7 @@ function Carousel({
|
|
|
11747
11833
|
});
|
|
11748
11834
|
}
|
|
11749
11835
|
}, [count, loopActive, trackIndex]);
|
|
11750
|
-
const ctx =
|
|
11836
|
+
const ctx = useMemo18(
|
|
11751
11837
|
() => ({
|
|
11752
11838
|
index,
|
|
11753
11839
|
count,
|
|
@@ -11802,7 +11888,7 @@ function Carousel({
|
|
|
11802
11888
|
break;
|
|
11803
11889
|
}
|
|
11804
11890
|
};
|
|
11805
|
-
return /* @__PURE__ */
|
|
11891
|
+
return /* @__PURE__ */ jsx67(CarouselContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx67(
|
|
11806
11892
|
"div",
|
|
11807
11893
|
{
|
|
11808
11894
|
"data-refineui": "carousel",
|
|
@@ -11828,8 +11914,8 @@ function CarouselContent({ className, children, ...props }) {
|
|
|
11828
11914
|
} = useCarouselContext("CarouselContent");
|
|
11829
11915
|
const viewportRef = useRef18(null);
|
|
11830
11916
|
const dragStartX = useRef18(null);
|
|
11831
|
-
const [dragPx, setDragPx] =
|
|
11832
|
-
const [dragging, setDragging] =
|
|
11917
|
+
const [dragPx, setDragPx] = useState23(0);
|
|
11918
|
+
const [dragging, setDragging] = useState23(false);
|
|
11833
11919
|
const slides = Children6.toArray(children).filter(isValidElement5);
|
|
11834
11920
|
const slideCount = slides.length;
|
|
11835
11921
|
useEffect16(() => {
|
|
@@ -11840,7 +11926,7 @@ function CarouselContent({ className, children, ...props }) {
|
|
|
11840
11926
|
...slides,
|
|
11841
11927
|
cloneElement2(slides[0], { key: "__carousel-clone-first" })
|
|
11842
11928
|
] : slides;
|
|
11843
|
-
const endDrag =
|
|
11929
|
+
const endDrag = useCallback18(
|
|
11844
11930
|
(clientX) => {
|
|
11845
11931
|
if (dragStartX.current == null) return;
|
|
11846
11932
|
const width = viewportRef.current?.offsetWidth ?? 1;
|
|
@@ -11889,7 +11975,7 @@ function CarouselContent({ className, children, ...props }) {
|
|
|
11889
11975
|
};
|
|
11890
11976
|
const animated = !dragging && !instant;
|
|
11891
11977
|
const transform = dragPx !== 0 ? `translate3d(calc(-${trackIndex * 100}% + ${dragPx}px), 0, 0)` : `translate3d(-${trackIndex * 100}%, 0, 0)`;
|
|
11892
|
-
return /* @__PURE__ */
|
|
11978
|
+
return /* @__PURE__ */ jsx67(
|
|
11893
11979
|
"div",
|
|
11894
11980
|
{
|
|
11895
11981
|
ref: viewportRef,
|
|
@@ -11900,7 +11986,7 @@ function CarouselContent({ className, children, ...props }) {
|
|
|
11900
11986
|
onPointerMove,
|
|
11901
11987
|
onPointerUp,
|
|
11902
11988
|
onPointerCancel,
|
|
11903
|
-
children: /* @__PURE__ */
|
|
11989
|
+
children: /* @__PURE__ */ jsx67(
|
|
11904
11990
|
"div",
|
|
11905
11991
|
{
|
|
11906
11992
|
"data-refineui": "carousel-track",
|
|
@@ -11915,9 +12001,9 @@ function CarouselContent({ className, children, ...props }) {
|
|
|
11915
12001
|
}
|
|
11916
12002
|
);
|
|
11917
12003
|
}
|
|
11918
|
-
var CarouselItem =
|
|
12004
|
+
var CarouselItem = forwardRef15(function CarouselItem2({ className, children, ...props }, ref) {
|
|
11919
12005
|
useCarouselContext("CarouselItem");
|
|
11920
|
-
return /* @__PURE__ */
|
|
12006
|
+
return /* @__PURE__ */ jsx67(
|
|
11921
12007
|
"div",
|
|
11922
12008
|
{
|
|
11923
12009
|
ref,
|
|
@@ -11932,12 +12018,12 @@ var CarouselItem = forwardRef14(function CarouselItem2({ className, children, ..
|
|
|
11932
12018
|
});
|
|
11933
12019
|
function CarouselControls({ className, children, ...props }) {
|
|
11934
12020
|
useCarouselContext("CarouselControls");
|
|
11935
|
-
return /* @__PURE__ */
|
|
12021
|
+
return /* @__PURE__ */ jsx67("div", { "data-refineui": "carousel-controls", className: clsx89(carouselStyles.controls, className), ...props, children });
|
|
11936
12022
|
}
|
|
11937
12023
|
function CarouselPrevious({ className, disabled, onClick, ...props }) {
|
|
11938
12024
|
const { scrollPrev, canScrollPrev } = useCarouselContext("CarouselPrevious");
|
|
11939
12025
|
const isDisabled = disabled || !canScrollPrev;
|
|
11940
|
-
return /* @__PURE__ */
|
|
12026
|
+
return /* @__PURE__ */ jsx67(
|
|
11941
12027
|
Button,
|
|
11942
12028
|
{
|
|
11943
12029
|
variant: "outline",
|
|
@@ -11953,7 +12039,7 @@ function CarouselPrevious({ className, disabled, onClick, ...props }) {
|
|
|
11953
12039
|
onClick?.(e);
|
|
11954
12040
|
if (!e.defaultPrevented && !isDisabled) scrollPrev();
|
|
11955
12041
|
},
|
|
11956
|
-
children: /* @__PURE__ */
|
|
12042
|
+
children: /* @__PURE__ */ jsx67(
|
|
11957
12043
|
WebIcon,
|
|
11958
12044
|
{
|
|
11959
12045
|
name: "chevron-left",
|
|
@@ -11969,7 +12055,7 @@ function CarouselPrevious({ className, disabled, onClick, ...props }) {
|
|
|
11969
12055
|
function CarouselNext({ className, disabled, onClick, ...props }) {
|
|
11970
12056
|
const { scrollNext, canScrollNext } = useCarouselContext("CarouselNext");
|
|
11971
12057
|
const isDisabled = disabled || !canScrollNext;
|
|
11972
|
-
return /* @__PURE__ */
|
|
12058
|
+
return /* @__PURE__ */ jsx67(
|
|
11973
12059
|
Button,
|
|
11974
12060
|
{
|
|
11975
12061
|
variant: "outline",
|
|
@@ -11985,7 +12071,7 @@ function CarouselNext({ className, disabled, onClick, ...props }) {
|
|
|
11985
12071
|
onClick?.(e);
|
|
11986
12072
|
if (!e.defaultPrevented && !isDisabled) scrollNext();
|
|
11987
12073
|
},
|
|
11988
|
-
children: /* @__PURE__ */
|
|
12074
|
+
children: /* @__PURE__ */ jsx67(
|
|
11989
12075
|
WebIcon,
|
|
11990
12076
|
{
|
|
11991
12077
|
name: "chevron-right",
|
|
@@ -12001,8 +12087,8 @@ function CarouselNext({ className, disabled, onClick, ...props }) {
|
|
|
12001
12087
|
function CarouselIndicators({ className, ...props }) {
|
|
12002
12088
|
const { count, index, scrollTo } = useCarouselContext("CarouselIndicators");
|
|
12003
12089
|
const trackRef = useRef18(null);
|
|
12004
|
-
const [thumb, setThumb] =
|
|
12005
|
-
const updateThumb =
|
|
12090
|
+
const [thumb, setThumb] = useState23({ width: 0, x: 0, ready: false });
|
|
12091
|
+
const updateThumb = useCallback18(() => {
|
|
12006
12092
|
const el = trackRef.current;
|
|
12007
12093
|
if (!el || count <= 0) {
|
|
12008
12094
|
setThumb({ width: 0, x: 0, ready: false });
|
|
@@ -12042,7 +12128,7 @@ function CarouselIndicators({ className, ...props }) {
|
|
|
12042
12128
|
className: clsx89(carouselStyles.indicators, className),
|
|
12043
12129
|
...props,
|
|
12044
12130
|
children: [
|
|
12045
|
-
/* @__PURE__ */
|
|
12131
|
+
/* @__PURE__ */ jsx67(
|
|
12046
12132
|
"span",
|
|
12047
12133
|
{
|
|
12048
12134
|
"data-refineui": "carousel-indicator-thumb",
|
|
@@ -12052,7 +12138,7 @@ function CarouselIndicators({ className, ...props }) {
|
|
|
12052
12138
|
style: thumbStyle
|
|
12053
12139
|
}
|
|
12054
12140
|
),
|
|
12055
|
-
/* @__PURE__ */
|
|
12141
|
+
/* @__PURE__ */ jsx67("div", { "data-refineui": "carousel-indicator-hits", className: carouselStyles.indicatorHitRow, children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx67(
|
|
12056
12142
|
"button",
|
|
12057
12143
|
{
|
|
12058
12144
|
type: "button",
|
|
@@ -12075,9 +12161,9 @@ function CarouselIndicators({ className, ...props }) {
|
|
|
12075
12161
|
import { clsx as clsx91 } from "clsx";
|
|
12076
12162
|
import {
|
|
12077
12163
|
Children as Children7,
|
|
12078
|
-
createContext as
|
|
12164
|
+
createContext as createContext23,
|
|
12079
12165
|
isValidElement as isValidElement6,
|
|
12080
|
-
useContext as
|
|
12166
|
+
useContext as useContext25
|
|
12081
12167
|
} from "react";
|
|
12082
12168
|
|
|
12083
12169
|
// src/components/Bubble/style.ts
|
|
@@ -12143,10 +12229,10 @@ var bubbleContentVariantClass = {
|
|
|
12143
12229
|
};
|
|
12144
12230
|
|
|
12145
12231
|
// src/components/Bubble/Bubble.tsx
|
|
12146
|
-
import { jsx as
|
|
12147
|
-
var BubbleContext =
|
|
12232
|
+
import { jsx as jsx68, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
12233
|
+
var BubbleContext = createContext23(null);
|
|
12148
12234
|
function useBubbleContext(component) {
|
|
12149
|
-
const value =
|
|
12235
|
+
const value = useContext25(BubbleContext);
|
|
12150
12236
|
if (!value) throw new Error(`${component} must be used within Bubble.`);
|
|
12151
12237
|
return value;
|
|
12152
12238
|
}
|
|
@@ -12175,7 +12261,7 @@ function partitionBubbleChildren(children) {
|
|
|
12175
12261
|
};
|
|
12176
12262
|
}
|
|
12177
12263
|
function BubbleGroup({ className, ...props }) {
|
|
12178
|
-
return /* @__PURE__ */
|
|
12264
|
+
return /* @__PURE__ */ jsx68(
|
|
12179
12265
|
"div",
|
|
12180
12266
|
{
|
|
12181
12267
|
"data-refineui": "bubble-group",
|
|
@@ -12194,7 +12280,7 @@ function Bubble({
|
|
|
12194
12280
|
}) {
|
|
12195
12281
|
const rootStyle = variant === "ghost" ? style : { maxWidth: BUBBLE_MAX_WIDTH, ...style };
|
|
12196
12282
|
const { top, middle, bottom, hasTop, hasBottom } = partitionBubbleChildren(children);
|
|
12197
|
-
return /* @__PURE__ */
|
|
12283
|
+
return /* @__PURE__ */ jsx68(BubbleContext.Provider, { value: { variant, align }, children: /* @__PURE__ */ jsx68(
|
|
12198
12284
|
"div",
|
|
12199
12285
|
{
|
|
12200
12286
|
"data-refineui": "bubble",
|
|
@@ -12219,7 +12305,7 @@ function Bubble({
|
|
|
12219
12305
|
}
|
|
12220
12306
|
function BubbleContent({ className, ...props }) {
|
|
12221
12307
|
const { variant } = useBubbleContext("BubbleContent");
|
|
12222
|
-
return /* @__PURE__ */
|
|
12308
|
+
return /* @__PURE__ */ jsx68(
|
|
12223
12309
|
"div",
|
|
12224
12310
|
{
|
|
12225
12311
|
"data-refineui": "bubble-content",
|
|
@@ -12240,7 +12326,7 @@ function BubbleReactions({
|
|
|
12240
12326
|
}) {
|
|
12241
12327
|
const { align: bubbleAlign } = useBubbleContext("BubbleReactions");
|
|
12242
12328
|
const align = alignProp ?? (bubbleAlign === "start" ? "end" : "start");
|
|
12243
|
-
return /* @__PURE__ */
|
|
12329
|
+
return /* @__PURE__ */ jsx68(
|
|
12244
12330
|
"div",
|
|
12245
12331
|
{
|
|
12246
12332
|
"data-refineui": "bubble-reactions",
|
|
@@ -12261,12 +12347,12 @@ function BubbleReactions({
|
|
|
12261
12347
|
import { clsx as clsx93 } from "clsx";
|
|
12262
12348
|
import { iconSizes as iconSizes19 } from "@refineui/tokens";
|
|
12263
12349
|
import {
|
|
12264
|
-
createContext as
|
|
12265
|
-
useCallback as
|
|
12266
|
-
useContext as
|
|
12267
|
-
useMemo as
|
|
12350
|
+
createContext as createContext24,
|
|
12351
|
+
useCallback as useCallback19,
|
|
12352
|
+
useContext as useContext26,
|
|
12353
|
+
useMemo as useMemo19,
|
|
12268
12354
|
useRef as useRef19,
|
|
12269
|
-
useState as
|
|
12355
|
+
useState as useState24
|
|
12270
12356
|
} from "react";
|
|
12271
12357
|
|
|
12272
12358
|
// src/components/Stepper/style.ts
|
|
@@ -12375,17 +12461,17 @@ var stepperConnectorVars = {
|
|
|
12375
12461
|
};
|
|
12376
12462
|
|
|
12377
12463
|
// src/components/Stepper/Stepper.tsx
|
|
12378
|
-
import { jsx as
|
|
12379
|
-
var StepperContext =
|
|
12380
|
-
var StepperItemContext =
|
|
12381
|
-
var StepperListRegistryContext =
|
|
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);
|
|
12382
12468
|
function useStepperContext(component) {
|
|
12383
|
-
const v =
|
|
12469
|
+
const v = useContext26(StepperContext);
|
|
12384
12470
|
if (!v) throw new Error(`${component} must be used within Stepper.`);
|
|
12385
12471
|
return v;
|
|
12386
12472
|
}
|
|
12387
12473
|
function useStepperItemContext(component) {
|
|
12388
|
-
const v =
|
|
12474
|
+
const v = useContext26(StepperItemContext);
|
|
12389
12475
|
if (!v) throw new Error(`${component} must be used within StepperItem.`);
|
|
12390
12476
|
return v;
|
|
12391
12477
|
}
|
|
@@ -12405,16 +12491,16 @@ function Stepper({
|
|
|
12405
12491
|
...props
|
|
12406
12492
|
}) {
|
|
12407
12493
|
const isControlled = valueControlled !== void 0;
|
|
12408
|
-
const [internalValue, setInternalValue] =
|
|
12494
|
+
const [internalValue, setInternalValue] = useState24(defaultValue);
|
|
12409
12495
|
const value = isControlled ? valueControlled : internalValue;
|
|
12410
|
-
const setValue =
|
|
12496
|
+
const setValue = useCallback19(
|
|
12411
12497
|
(next) => {
|
|
12412
12498
|
if (!isControlled) setInternalValue(next);
|
|
12413
12499
|
onValueChange?.(next);
|
|
12414
12500
|
},
|
|
12415
12501
|
[isControlled, onValueChange]
|
|
12416
12502
|
);
|
|
12417
|
-
const ctx =
|
|
12503
|
+
const ctx = useMemo19(
|
|
12418
12504
|
() => ({
|
|
12419
12505
|
value,
|
|
12420
12506
|
setValue,
|
|
@@ -12423,7 +12509,7 @@ function Stepper({
|
|
|
12423
12509
|
}),
|
|
12424
12510
|
[value, setValue, orientation, onValueChange, isControlled]
|
|
12425
12511
|
);
|
|
12426
|
-
return /* @__PURE__ */
|
|
12512
|
+
return /* @__PURE__ */ jsx69(StepperContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx69(
|
|
12427
12513
|
"div",
|
|
12428
12514
|
{
|
|
12429
12515
|
"data-refineui": "stepper",
|
|
@@ -12439,7 +12525,7 @@ function StepperList({ className, children, ...props }) {
|
|
|
12439
12525
|
const { orientation, value } = useStepperContext("StepperList");
|
|
12440
12526
|
const cursorRef = useRef19(null);
|
|
12441
12527
|
cursorRef.current = null;
|
|
12442
|
-
const registry =
|
|
12528
|
+
const registry = useMemo19(
|
|
12443
12529
|
() => ({
|
|
12444
12530
|
noteItem(itemValue) {
|
|
12445
12531
|
cursorRef.current = itemValue;
|
|
@@ -12451,7 +12537,7 @@ function StepperList({ className, children, ...props }) {
|
|
|
12451
12537
|
}),
|
|
12452
12538
|
[value]
|
|
12453
12539
|
);
|
|
12454
|
-
return /* @__PURE__ */
|
|
12540
|
+
return /* @__PURE__ */ jsx69(StepperListRegistryContext.Provider, { value: registry, children: /* @__PURE__ */ jsx69(
|
|
12455
12541
|
"ol",
|
|
12456
12542
|
{
|
|
12457
12543
|
"data-refineui": "stepper-list",
|
|
@@ -12476,7 +12562,7 @@ function StepperItem({
|
|
|
12476
12562
|
...props
|
|
12477
12563
|
}) {
|
|
12478
12564
|
const { value, setValue, orientation, interactive } = useStepperContext("StepperItem");
|
|
12479
|
-
const registry =
|
|
12565
|
+
const registry = useContext26(StepperListRegistryContext);
|
|
12480
12566
|
registry?.noteItem(itemValue);
|
|
12481
12567
|
const state = resolveState2(itemValue, value);
|
|
12482
12568
|
const canActivate = interactive && !disabled;
|
|
@@ -12492,11 +12578,11 @@ function StepperItem({
|
|
|
12492
12578
|
activate();
|
|
12493
12579
|
}
|
|
12494
12580
|
};
|
|
12495
|
-
const itemCtx =
|
|
12581
|
+
const itemCtx = useMemo19(
|
|
12496
12582
|
() => ({ state, disabled }),
|
|
12497
12583
|
[state, disabled]
|
|
12498
12584
|
);
|
|
12499
|
-
return /* @__PURE__ */
|
|
12585
|
+
return /* @__PURE__ */ jsx69(StepperItemContext.Provider, { value: itemCtx, children: /* @__PURE__ */ jsx69(
|
|
12500
12586
|
"li",
|
|
12501
12587
|
{
|
|
12502
12588
|
"data-refineui": "stepper-item",
|
|
@@ -12524,7 +12610,7 @@ function StepperItem({
|
|
|
12524
12610
|
function StepperIndicator({ className, children, ...props }) {
|
|
12525
12611
|
const { state } = useStepperItemContext("StepperIndicator");
|
|
12526
12612
|
const stateClass = state === "complete" ? stepperStyles.indicatorComplete : state === "current" ? stepperStyles.indicatorCurrent : stepperStyles.indicatorUpcoming;
|
|
12527
|
-
const content = state === "upcoming" ? children : /* @__PURE__ */
|
|
12613
|
+
const content = state === "upcoming" ? children : /* @__PURE__ */ jsx69(
|
|
12528
12614
|
WebIcon,
|
|
12529
12615
|
{
|
|
12530
12616
|
name: "checkmark",
|
|
@@ -12535,7 +12621,7 @@ function StepperIndicator({ className, children, ...props }) {
|
|
|
12535
12621
|
className: "items-center justify-center"
|
|
12536
12622
|
}
|
|
12537
12623
|
);
|
|
12538
|
-
return /* @__PURE__ */
|
|
12624
|
+
return /* @__PURE__ */ jsx69(
|
|
12539
12625
|
"span",
|
|
12540
12626
|
{
|
|
12541
12627
|
"data-refineui": "stepper-indicator",
|
|
@@ -12550,7 +12636,7 @@ function StepperIndicator({ className, children, ...props }) {
|
|
|
12550
12636
|
function StepperContent({ className, ...props }) {
|
|
12551
12637
|
const { orientation } = useStepperContext("StepperContent");
|
|
12552
12638
|
useStepperItemContext("StepperContent");
|
|
12553
|
-
return /* @__PURE__ */
|
|
12639
|
+
return /* @__PURE__ */ jsx69(
|
|
12554
12640
|
"div",
|
|
12555
12641
|
{
|
|
12556
12642
|
"data-refineui": "stepper-content",
|
|
@@ -12566,7 +12652,7 @@ function StepperContent({ className, ...props }) {
|
|
|
12566
12652
|
function StepperTitle({ className, ...props }) {
|
|
12567
12653
|
const { state } = useStepperItemContext("StepperTitle");
|
|
12568
12654
|
const stateClass = state === "complete" ? stepperStyles.titleComplete : state === "current" ? stepperStyles.titleCurrent : stepperStyles.titleUpcoming;
|
|
12569
|
-
return /* @__PURE__ */
|
|
12655
|
+
return /* @__PURE__ */ jsx69(
|
|
12570
12656
|
"span",
|
|
12571
12657
|
{
|
|
12572
12658
|
"data-refineui": "stepper-title",
|
|
@@ -12579,7 +12665,7 @@ function StepperTitle({ className, ...props }) {
|
|
|
12579
12665
|
function StepperDescription({ className, ...props }) {
|
|
12580
12666
|
const { state } = useStepperItemContext("StepperDescription");
|
|
12581
12667
|
const stateClass = state === "complete" ? stepperStyles.descriptionComplete : state === "current" ? stepperStyles.descriptionCurrent : stepperStyles.descriptionUpcoming;
|
|
12582
|
-
return /* @__PURE__ */
|
|
12668
|
+
return /* @__PURE__ */ jsx69(
|
|
12583
12669
|
"span",
|
|
12584
12670
|
{
|
|
12585
12671
|
"data-refineui": "stepper-description",
|
|
@@ -12591,10 +12677,10 @@ function StepperDescription({ className, ...props }) {
|
|
|
12591
12677
|
}
|
|
12592
12678
|
function StepperSeparator({ className, ...props }) {
|
|
12593
12679
|
const { orientation } = useStepperContext("StepperSeparator");
|
|
12594
|
-
const registry =
|
|
12680
|
+
const registry = useContext26(StepperListRegistryContext);
|
|
12595
12681
|
const state = registry?.takeSeparatorState() ?? "upcoming";
|
|
12596
12682
|
const vertical = orientation === "vertical";
|
|
12597
|
-
return /* @__PURE__ */
|
|
12683
|
+
return /* @__PURE__ */ jsx69(
|
|
12598
12684
|
"li",
|
|
12599
12685
|
{
|
|
12600
12686
|
"data-refineui": "stepper-separator",
|
|
@@ -12617,14 +12703,14 @@ function StepperSeparator({ className, ...props }) {
|
|
|
12617
12703
|
vertical ? stepperStyles.separatorRailVertical : stepperStyles.separatorRailHorizontal
|
|
12618
12704
|
),
|
|
12619
12705
|
children: [
|
|
12620
|
-
/* @__PURE__ */
|
|
12706
|
+
/* @__PURE__ */ jsx69(
|
|
12621
12707
|
"span",
|
|
12622
12708
|
{
|
|
12623
12709
|
"data-refineui": "stepper-separator-track",
|
|
12624
12710
|
className: stepperStyles.separatorTrack
|
|
12625
12711
|
}
|
|
12626
12712
|
),
|
|
12627
|
-
/* @__PURE__ */
|
|
12713
|
+
/* @__PURE__ */ jsx69(
|
|
12628
12714
|
"span",
|
|
12629
12715
|
{
|
|
12630
12716
|
"data-refineui": "stepper-separator-fill",
|
|
@@ -12653,14 +12739,14 @@ StepperSeparator.displayName = "StepperSeparator";
|
|
|
12653
12739
|
// src/components/Resizable/Resizable.tsx
|
|
12654
12740
|
import { clsx as clsx95 } from "clsx";
|
|
12655
12741
|
import {
|
|
12656
|
-
createContext as
|
|
12657
|
-
useCallback as
|
|
12658
|
-
useContext as
|
|
12659
|
-
useId as
|
|
12742
|
+
createContext as createContext25,
|
|
12743
|
+
useCallback as useCallback20,
|
|
12744
|
+
useContext as useContext27,
|
|
12745
|
+
useId as useId15,
|
|
12660
12746
|
useLayoutEffect as useLayoutEffect10,
|
|
12661
|
-
useMemo as
|
|
12747
|
+
useMemo as useMemo20,
|
|
12662
12748
|
useRef as useRef20,
|
|
12663
|
-
useState as
|
|
12749
|
+
useState as useState25
|
|
12664
12750
|
} from "react";
|
|
12665
12751
|
|
|
12666
12752
|
// src/components/Resizable/style.ts
|
|
@@ -12696,15 +12782,15 @@ var resizableStyles = {
|
|
|
12696
12782
|
};
|
|
12697
12783
|
|
|
12698
12784
|
// src/components/Resizable/Resizable.tsx
|
|
12699
|
-
import { jsx as
|
|
12785
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
12700
12786
|
var KEYBOARD_STEP = 2;
|
|
12701
12787
|
var KEYBOARD_STEP_LARGE = 10;
|
|
12702
12788
|
var DEFAULT_SIZE = 50;
|
|
12703
12789
|
var DEFAULT_MIN_SIZE = 10;
|
|
12704
12790
|
var DEFAULT_MAX_SIZE = 100;
|
|
12705
|
-
var ResizableContext =
|
|
12791
|
+
var ResizableContext = createContext25(null);
|
|
12706
12792
|
function useResizableContext(component) {
|
|
12707
|
-
const v =
|
|
12793
|
+
const v = useContext27(ResizableContext);
|
|
12708
12794
|
if (!v) throw new Error(`${component} must be used within ResizablePanelGroup.`);
|
|
12709
12795
|
return v;
|
|
12710
12796
|
}
|
|
@@ -12766,10 +12852,10 @@ function ResizablePanelGroup({
|
|
|
12766
12852
|
const groupRef = useRef20(null);
|
|
12767
12853
|
const panelsRef = useRef20(/* @__PURE__ */ new Map());
|
|
12768
12854
|
const orderCounterRef = useRef20(0);
|
|
12769
|
-
const [sizes, setSizes] =
|
|
12855
|
+
const [sizes, setSizes] = useState25({});
|
|
12770
12856
|
const onLayoutRef = useRef20(onLayout);
|
|
12771
12857
|
onLayoutRef.current = onLayout;
|
|
12772
|
-
const syncInitialSizes =
|
|
12858
|
+
const syncInitialSizes = useCallback20(() => {
|
|
12773
12859
|
const panels = [...panelsRef.current.values()].sort((a, b) => a.order - b.order);
|
|
12774
12860
|
if (panels.length === 0) return;
|
|
12775
12861
|
setSizes((prev) => {
|
|
@@ -12804,7 +12890,7 @@ function ResizablePanelGroup({
|
|
|
12804
12890
|
return base;
|
|
12805
12891
|
});
|
|
12806
12892
|
}, []);
|
|
12807
|
-
const registerPanel =
|
|
12893
|
+
const registerPanel = useCallback20(
|
|
12808
12894
|
(panel) => {
|
|
12809
12895
|
const existing = panelsRef.current.get(panel.id);
|
|
12810
12896
|
const order = existing?.order ?? orderCounterRef.current++;
|
|
@@ -12813,7 +12899,7 @@ function ResizablePanelGroup({
|
|
|
12813
12899
|
},
|
|
12814
12900
|
[syncInitialSizes]
|
|
12815
12901
|
);
|
|
12816
|
-
const unregisterPanel =
|
|
12902
|
+
const unregisterPanel = useCallback20((id) => {
|
|
12817
12903
|
panelsRef.current.delete(id);
|
|
12818
12904
|
setSizes((prev) => {
|
|
12819
12905
|
if (!(id in prev)) return prev;
|
|
@@ -12822,13 +12908,13 @@ function ResizablePanelGroup({
|
|
|
12822
12908
|
return next;
|
|
12823
12909
|
});
|
|
12824
12910
|
}, []);
|
|
12825
|
-
const getPanel =
|
|
12826
|
-
const emitPanelResize =
|
|
12911
|
+
const getPanel = useCallback20((id) => panelsRef.current.get(id), []);
|
|
12912
|
+
const emitPanelResize = useCallback20((next) => {
|
|
12827
12913
|
for (const [id, size] of Object.entries(next)) {
|
|
12828
12914
|
panelsRef.current.get(id)?.onResize?.(size);
|
|
12829
12915
|
}
|
|
12830
12916
|
}, []);
|
|
12831
|
-
const resizeBetween =
|
|
12917
|
+
const resizeBetween = useCallback20(
|
|
12832
12918
|
(leftId, rightId, deltaPct) => {
|
|
12833
12919
|
setSizes((prev) => {
|
|
12834
12920
|
const next = applyResize(
|
|
@@ -12845,7 +12931,7 @@ function ResizablePanelGroup({
|
|
|
12845
12931
|
},
|
|
12846
12932
|
[emitPanelResize]
|
|
12847
12933
|
);
|
|
12848
|
-
const setBetween =
|
|
12934
|
+
const setBetween = useCallback20(
|
|
12849
12935
|
(leftId, rightId, leftSize) => {
|
|
12850
12936
|
setSizes((prev) => {
|
|
12851
12937
|
const left = panelsRef.current.get(leftId);
|
|
@@ -12876,7 +12962,7 @@ function ResizablePanelGroup({
|
|
|
12876
12962
|
if (ids.some((id) => sizes[id] === void 0)) return;
|
|
12877
12963
|
onLayoutRef.current?.(ids.map((id) => sizes[id]));
|
|
12878
12964
|
}, [sizes]);
|
|
12879
|
-
const ctx =
|
|
12965
|
+
const ctx = useMemo20(
|
|
12880
12966
|
() => ({
|
|
12881
12967
|
orientation,
|
|
12882
12968
|
groupRef,
|
|
@@ -12897,7 +12983,7 @@ function ResizablePanelGroup({
|
|
|
12897
12983
|
setBetween
|
|
12898
12984
|
]
|
|
12899
12985
|
);
|
|
12900
|
-
return /* @__PURE__ */
|
|
12986
|
+
return /* @__PURE__ */ jsx70(ResizableContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx70(
|
|
12901
12987
|
"div",
|
|
12902
12988
|
{
|
|
12903
12989
|
ref: groupRef,
|
|
@@ -12925,7 +13011,7 @@ function ResizablePanel({
|
|
|
12925
13011
|
onResize,
|
|
12926
13012
|
...props
|
|
12927
13013
|
}) {
|
|
12928
|
-
const id =
|
|
13014
|
+
const id = useId15();
|
|
12929
13015
|
const { orientation, sizes, registerPanel, unregisterPanel } = useResizableContext("ResizablePanel");
|
|
12930
13016
|
const onResizeRef = useRef20(onResize);
|
|
12931
13017
|
onResizeRef.current = onResize;
|
|
@@ -12956,7 +13042,7 @@ function ResizablePanel({
|
|
|
12956
13042
|
flexBasis: 0,
|
|
12957
13043
|
...orientation === "horizontal" ? { minWidth: `${minSize}%` } : { minHeight: `${minSize}%` }
|
|
12958
13044
|
};
|
|
12959
|
-
return /* @__PURE__ */
|
|
13045
|
+
return /* @__PURE__ */ jsx70(
|
|
12960
13046
|
"div",
|
|
12961
13047
|
{
|
|
12962
13048
|
"data-refineui": "resizable-panel",
|
|
@@ -12988,8 +13074,8 @@ function ResizableHandle({
|
|
|
12988
13074
|
setBetween
|
|
12989
13075
|
} = useResizableContext("ResizableHandle");
|
|
12990
13076
|
const handleRef = useRef20(null);
|
|
12991
|
-
const [active, setActive] =
|
|
12992
|
-
const [, setAdjacentReady] =
|
|
13077
|
+
const [active, setActive] = useState25(false);
|
|
13078
|
+
const [, setAdjacentReady] = useState25(false);
|
|
12993
13079
|
const dragRef = useRef20(null);
|
|
12994
13080
|
useLayoutEffect10(() => {
|
|
12995
13081
|
setAdjacentReady(true);
|
|
@@ -13002,7 +13088,7 @@ function ResizableHandle({
|
|
|
13002
13088
|
const ariaMin = leftPanel?.minSize ?? 0;
|
|
13003
13089
|
const ariaMax = leftPanel?.maxSize ?? DEFAULT_MAX_SIZE;
|
|
13004
13090
|
const defaultKeyshortcuts = orientation === "horizontal" ? "ArrowLeft ArrowRight Home End" : "ArrowUp ArrowDown Home End";
|
|
13005
|
-
const keepFocus =
|
|
13091
|
+
const keepFocus = useCallback20(() => {
|
|
13006
13092
|
const el = handleRef.current;
|
|
13007
13093
|
if (el && document.activeElement !== el) {
|
|
13008
13094
|
el.focus({ preventScroll: true });
|
|
@@ -13101,7 +13187,7 @@ function ResizableHandle({
|
|
|
13101
13187
|
resizeBetween(leftId, rightId, delta);
|
|
13102
13188
|
queueMicrotask(keepFocus);
|
|
13103
13189
|
};
|
|
13104
|
-
return /* @__PURE__ */
|
|
13190
|
+
return /* @__PURE__ */ jsx70(
|
|
13105
13191
|
"div",
|
|
13106
13192
|
{
|
|
13107
13193
|
ref: handleRef,
|
|
@@ -13131,7 +13217,7 @@ function ResizableHandle({
|
|
|
13131
13217
|
onPointerUp: handlePointerUp,
|
|
13132
13218
|
onPointerCancel: handlePointerUp,
|
|
13133
13219
|
onKeyDown: handleKeyDown,
|
|
13134
|
-
children: withHandle ? /* @__PURE__ */
|
|
13220
|
+
children: withHandle ? /* @__PURE__ */ jsx70(
|
|
13135
13221
|
"span",
|
|
13136
13222
|
{
|
|
13137
13223
|
"aria-hidden": true,
|
|
@@ -13147,7 +13233,7 @@ function ResizableHandle({
|
|
|
13147
13233
|
|
|
13148
13234
|
// src/components/SpinButton/SpinButton.tsx
|
|
13149
13235
|
import { clsx as clsx96 } from "clsx";
|
|
13150
|
-
import { useEffect as useEffect17, useState as
|
|
13236
|
+
import { useEffect as useEffect17, useState as useState26 } from "react";
|
|
13151
13237
|
import { iconSizes as iconSizes20 } from "@refineui/tokens";
|
|
13152
13238
|
|
|
13153
13239
|
// src/components/SpinButton/style.ts
|
|
@@ -13171,7 +13257,7 @@ var spinButtonShellClass = formControlShellHeightClass;
|
|
|
13171
13257
|
var spinButtonValueTypo = formControlTypoClass;
|
|
13172
13258
|
|
|
13173
13259
|
// src/components/SpinButton/SpinButton.tsx
|
|
13174
|
-
import { jsx as
|
|
13260
|
+
import { jsx as jsx71, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
13175
13261
|
function SpinButton({
|
|
13176
13262
|
value,
|
|
13177
13263
|
onChange,
|
|
@@ -13185,7 +13271,7 @@ function SpinButton({
|
|
|
13185
13271
|
onKeyDown,
|
|
13186
13272
|
...props
|
|
13187
13273
|
}) {
|
|
13188
|
-
const [draftValue, setDraftValue] =
|
|
13274
|
+
const [draftValue, setDraftValue] = useState26(String(value));
|
|
13189
13275
|
useEffect17(() => {
|
|
13190
13276
|
setDraftValue(String(value));
|
|
13191
13277
|
}, [value]);
|
|
@@ -13297,7 +13383,7 @@ function SpinButton({
|
|
|
13297
13383
|
...props,
|
|
13298
13384
|
onKeyDown: handleKeyDown,
|
|
13299
13385
|
children: [
|
|
13300
|
-
/* @__PURE__ */
|
|
13386
|
+
/* @__PURE__ */ jsx71(
|
|
13301
13387
|
"div",
|
|
13302
13388
|
{
|
|
13303
13389
|
"aria-live": "polite",
|
|
@@ -13308,7 +13394,7 @@ function SpinButton({
|
|
|
13308
13394
|
disabled ? spinButtonStyles.valueTextDisabled : spinButtonStyles.valueTextDefault,
|
|
13309
13395
|
disabled ? spinButtonStyles.bgDisabled : spinButtonStyles.bgDefault
|
|
13310
13396
|
),
|
|
13311
|
-
children: /* @__PURE__ */
|
|
13397
|
+
children: /* @__PURE__ */ jsx71(
|
|
13312
13398
|
"input",
|
|
13313
13399
|
{
|
|
13314
13400
|
type: "text",
|
|
@@ -13341,7 +13427,7 @@ function SpinButton({
|
|
|
13341
13427
|
disabled ? spinButtonStyles.bgDisabled : spinButtonStyles.bgDefault
|
|
13342
13428
|
),
|
|
13343
13429
|
children: [
|
|
13344
|
-
/* @__PURE__ */
|
|
13430
|
+
/* @__PURE__ */ jsx71(
|
|
13345
13431
|
"button",
|
|
13346
13432
|
{
|
|
13347
13433
|
type: "button",
|
|
@@ -13353,7 +13439,7 @@ function SpinButton({
|
|
|
13353
13439
|
spinButtonStyles.stepButtonBase,
|
|
13354
13440
|
disabled || atMax ? spinButtonStyles.stepButtonDisabled : spinButtonStyles.stepButtonEnabled
|
|
13355
13441
|
),
|
|
13356
|
-
children: /* @__PURE__ */
|
|
13442
|
+
children: /* @__PURE__ */ jsx71(
|
|
13357
13443
|
WebIcon,
|
|
13358
13444
|
{
|
|
13359
13445
|
name: "chevron-up",
|
|
@@ -13365,7 +13451,7 @@ function SpinButton({
|
|
|
13365
13451
|
)
|
|
13366
13452
|
}
|
|
13367
13453
|
),
|
|
13368
|
-
/* @__PURE__ */
|
|
13454
|
+
/* @__PURE__ */ jsx71(
|
|
13369
13455
|
"button",
|
|
13370
13456
|
{
|
|
13371
13457
|
type: "button",
|
|
@@ -13377,7 +13463,7 @@ function SpinButton({
|
|
|
13377
13463
|
spinButtonStyles.stepButtonBase,
|
|
13378
13464
|
disabled || atMin ? spinButtonStyles.stepButtonDisabled : spinButtonStyles.stepButtonEnabled
|
|
13379
13465
|
),
|
|
13380
|
-
children: /* @__PURE__ */
|
|
13466
|
+
children: /* @__PURE__ */ jsx71(
|
|
13381
13467
|
WebIcon,
|
|
13382
13468
|
{
|
|
13383
13469
|
name: "chevron-down",
|
|
@@ -13400,12 +13486,12 @@ function SpinButton({
|
|
|
13400
13486
|
// src/components/Toast/Toast.tsx
|
|
13401
13487
|
import { clsx as clsx98 } from "clsx";
|
|
13402
13488
|
import {
|
|
13403
|
-
forwardRef as
|
|
13404
|
-
useCallback as
|
|
13489
|
+
forwardRef as forwardRef16,
|
|
13490
|
+
useCallback as useCallback21,
|
|
13405
13491
|
useEffect as useEffect18,
|
|
13406
13492
|
useLayoutEffect as useLayoutEffect11,
|
|
13407
13493
|
useRef as useRef21,
|
|
13408
|
-
useState as
|
|
13494
|
+
useState as useState27,
|
|
13409
13495
|
useSyncExternalStore
|
|
13410
13496
|
} from "react";
|
|
13411
13497
|
import { createPortal as createPortal6 } from "react-dom";
|
|
@@ -13444,7 +13530,7 @@ var toastStyles = {
|
|
|
13444
13530
|
};
|
|
13445
13531
|
|
|
13446
13532
|
// src/components/Toast/Toast.tsx
|
|
13447
|
-
import { jsx as
|
|
13533
|
+
import { jsx as jsx72, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
13448
13534
|
var useIsomorphicLayoutEffect6 = typeof document !== "undefined" ? useLayoutEffect11 : useEffect18;
|
|
13449
13535
|
var ENTER_MS = 20;
|
|
13450
13536
|
var LEAVE_MS = motionMsToNumber6(componentTokens.toast.motion.leave) + 60;
|
|
@@ -13623,7 +13709,7 @@ var variantIconNames = {
|
|
|
13623
13709
|
error: "error-circle",
|
|
13624
13710
|
warning: "warning"
|
|
13625
13711
|
};
|
|
13626
|
-
var Toast =
|
|
13712
|
+
var Toast = forwardRef16(function Toast2(props, ref) {
|
|
13627
13713
|
const { variant = "default", message, iconName, icon, action, className, stackState, style, ...rest } = props;
|
|
13628
13714
|
const domProps = { ...rest };
|
|
13629
13715
|
delete domProps.iconName;
|
|
@@ -13632,7 +13718,7 @@ var Toast = forwardRef15(function Toast2(props, ref) {
|
|
|
13632
13718
|
const liveRole = variant === "error" ? "alert" : "status";
|
|
13633
13719
|
const ariaLive = variant === "error" ? void 0 : variant === "warning" ? "assertive" : "polite";
|
|
13634
13720
|
const resolvedIconName = iconName ?? variantIconNames[variant];
|
|
13635
|
-
const iconContent = icon ?? /* @__PURE__ */
|
|
13721
|
+
const iconContent = icon ?? /* @__PURE__ */ jsx72(
|
|
13636
13722
|
WebIcon,
|
|
13637
13723
|
{
|
|
13638
13724
|
name: resolvedIconName,
|
|
@@ -13642,7 +13728,7 @@ var Toast = forwardRef15(function Toast2(props, ref) {
|
|
|
13642
13728
|
}
|
|
13643
13729
|
);
|
|
13644
13730
|
const isPrimaryAction = !action || typeof action !== "object" || !("variant" in action) || action.variant === "primary";
|
|
13645
|
-
const actionEl = typeof action === "object" && action !== null && "label" in action ? /* @__PURE__ */
|
|
13731
|
+
const actionEl = typeof action === "object" && action !== null && "label" in action ? /* @__PURE__ */ jsx72(
|
|
13646
13732
|
Button,
|
|
13647
13733
|
{
|
|
13648
13734
|
variant: isPrimaryAction ? "primary" : "outline",
|
|
@@ -13671,8 +13757,8 @@ var Toast = forwardRef15(function Toast2(props, ref) {
|
|
|
13671
13757
|
style: { ...tokenStyle, ...style },
|
|
13672
13758
|
className: clsx98(toastStyles.card, className),
|
|
13673
13759
|
children: [
|
|
13674
|
-
/* @__PURE__ */
|
|
13675
|
-
/* @__PURE__ */
|
|
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 }),
|
|
13676
13762
|
action != null && actionEl
|
|
13677
13763
|
]
|
|
13678
13764
|
}
|
|
@@ -13683,8 +13769,8 @@ function SwipeableToast({ record, index, swipeDirections, onSwipeStart, onSwipeE
|
|
|
13683
13769
|
const dragStartRef = useRef21(null);
|
|
13684
13770
|
const axisRef = useRef21(null);
|
|
13685
13771
|
const offsetRef = useRef21({ x: 0, y: 0 });
|
|
13686
|
-
const [swiping, setSwiping] =
|
|
13687
|
-
const clearSwipeOffset =
|
|
13772
|
+
const [swiping, setSwiping] = useState27(false);
|
|
13773
|
+
const clearSwipeOffset = useCallback21(() => {
|
|
13688
13774
|
const el = toastRef.current;
|
|
13689
13775
|
offsetRef.current = { x: 0, y: 0 };
|
|
13690
13776
|
if (!el) return;
|
|
@@ -13759,7 +13845,7 @@ function SwipeableToast({ record, index, swipeDirections, onSwipeStart, onSwipeE
|
|
|
13759
13845
|
clearSwipeOffset();
|
|
13760
13846
|
onSwipeEnd();
|
|
13761
13847
|
};
|
|
13762
|
-
return /* @__PURE__ */
|
|
13848
|
+
return /* @__PURE__ */ jsx72(
|
|
13763
13849
|
Toast,
|
|
13764
13850
|
{
|
|
13765
13851
|
ref: toastRef,
|
|
@@ -13794,12 +13880,12 @@ function Toaster({
|
|
|
13794
13880
|
() => activeToasterKey === toasterKeyRef.current,
|
|
13795
13881
|
() => false
|
|
13796
13882
|
);
|
|
13797
|
-
const [records, setRecords] =
|
|
13883
|
+
const [records, setRecords] = useState27([]);
|
|
13798
13884
|
const timerMapRef = useRef21({});
|
|
13799
13885
|
const pausedRef = useRef21(/* @__PURE__ */ new Set());
|
|
13800
13886
|
const rootRef = useRef21(null);
|
|
13801
13887
|
const itemRefs = useRef21({});
|
|
13802
|
-
const [layoutTick, setLayoutTick] =
|
|
13888
|
+
const [layoutTick, setLayoutTick] = useState27(0);
|
|
13803
13889
|
const stackGapPx = useToastStackGapPx();
|
|
13804
13890
|
const resolvedSwipe = swipeDirections ?? DEFAULT_SWIPE_DIRECTIONS;
|
|
13805
13891
|
useIsomorphicLayoutEffect6(() => {
|
|
@@ -13901,7 +13987,7 @@ function Toaster({
|
|
|
13901
13987
|
return null;
|
|
13902
13988
|
}
|
|
13903
13989
|
return createPortal6(
|
|
13904
|
-
/* @__PURE__ */
|
|
13990
|
+
/* @__PURE__ */ jsx72(
|
|
13905
13991
|
"ol",
|
|
13906
13992
|
{
|
|
13907
13993
|
ref: rootRef,
|
|
@@ -13912,7 +13998,7 @@ function Toaster({
|
|
|
13912
13998
|
style: {
|
|
13913
13999
|
["--refineui-toast-gap"]: `${stackGapPx}px`
|
|
13914
14000
|
},
|
|
13915
|
-
children: records.map((rec, index) => /* @__PURE__ */
|
|
14001
|
+
children: records.map((rec, index) => /* @__PURE__ */ jsx72(
|
|
13916
14002
|
"li",
|
|
13917
14003
|
{
|
|
13918
14004
|
ref: (node) => {
|
|
@@ -13926,7 +14012,7 @@ function Toaster({
|
|
|
13926
14012
|
["--refineui-toast-z-index"]: String(STACK_Z_BASE - index),
|
|
13927
14013
|
["--refineui-toast-stack-index"]: String(index)
|
|
13928
14014
|
},
|
|
13929
|
-
children: /* @__PURE__ */
|
|
14015
|
+
children: /* @__PURE__ */ jsx72("div", { "data-refineui": "toast-scale-layer", children: /* @__PURE__ */ jsx72(
|
|
13930
14016
|
SwipeableToast,
|
|
13931
14017
|
{
|
|
13932
14018
|
record: rec,
|
|
@@ -13948,24 +14034,24 @@ function Toaster({
|
|
|
13948
14034
|
// src/components/Tree/Tree.tsx
|
|
13949
14035
|
import { clsx as clsx100 } from "clsx";
|
|
13950
14036
|
import {
|
|
13951
|
-
useCallback as
|
|
13952
|
-
useMemo as
|
|
14037
|
+
useCallback as useCallback22,
|
|
14038
|
+
useMemo as useMemo21,
|
|
13953
14039
|
useRef as useRef22,
|
|
13954
|
-
useState as
|
|
14040
|
+
useState as useState29
|
|
13955
14041
|
} from "react";
|
|
13956
14042
|
|
|
13957
14043
|
// src/components/Tree/context.ts
|
|
13958
|
-
import { createContext as
|
|
14044
|
+
import { createContext as createContext26, useEffect as useEffect19, useState as useState28 } from "react";
|
|
13959
14045
|
import { semanticInteraction as semanticInteraction8 } from "@refineui/tokens";
|
|
13960
14046
|
import { getReducedMotionQuery as getReducedMotionQuery2 } from "@refineui/utilities/animation";
|
|
13961
14047
|
var TREE_PANEL_MS = Number.parseFloat(semanticInteraction8.duration.accordionPanel) / 1e3;
|
|
13962
14048
|
var TREE_CONTENT_MS = Number.parseFloat(semanticInteraction8.duration.accordionContent) / 1e3;
|
|
13963
14049
|
var TREE_PANEL_EASE = semanticInteraction8.easing.panel;
|
|
13964
14050
|
var TREE_CONTENT_EASE = semanticInteraction8.easing.content;
|
|
13965
|
-
var TreeContext =
|
|
13966
|
-
var TreeItemContext =
|
|
14051
|
+
var TreeContext = createContext26(null);
|
|
14052
|
+
var TreeItemContext = createContext26(null);
|
|
13967
14053
|
function usePrefersReducedMotion2() {
|
|
13968
|
-
const [reduce, setReduce] =
|
|
14054
|
+
const [reduce, setReduce] = useState28(false);
|
|
13969
14055
|
useEffect19(() => {
|
|
13970
14056
|
const mql = window.matchMedia(getReducedMotionQuery2().replace("@media ", ""));
|
|
13971
14057
|
const sync = () => setReduce(mql.matches);
|
|
@@ -14021,7 +14107,7 @@ var treeItemTypo = {
|
|
|
14021
14107
|
};
|
|
14022
14108
|
|
|
14023
14109
|
// src/components/Tree/Tree.tsx
|
|
14024
|
-
import { jsx as
|
|
14110
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
14025
14111
|
function Tree({
|
|
14026
14112
|
size = "md",
|
|
14027
14113
|
defaultExpanded,
|
|
@@ -14035,29 +14121,29 @@ function Tree({
|
|
|
14035
14121
|
...props
|
|
14036
14122
|
}) {
|
|
14037
14123
|
const reduceMotion = usePrefersReducedMotion2();
|
|
14038
|
-
const [uncontrolledExpanded, setUncontrolledExpanded] =
|
|
14039
|
-
const [uncontrolledSelected, setUncontrolledSelected] =
|
|
14124
|
+
const [uncontrolledExpanded, setUncontrolledExpanded] = useState29(() => toExpandedSet(defaultExpanded));
|
|
14125
|
+
const [uncontrolledSelected, setUncontrolledSelected] = useState29(defaultSelected ?? null);
|
|
14040
14126
|
const expanded = expandedProp === void 0 ? uncontrolledExpanded : toExpandedSet(expandedProp);
|
|
14041
14127
|
const selected = selectedProp === void 0 ? uncontrolledSelected : selectedProp;
|
|
14042
14128
|
const orderRef = useRef22([]);
|
|
14043
14129
|
const elMapRef = useRef22(/* @__PURE__ */ new Map());
|
|
14044
14130
|
const metaMapRef = useRef22(/* @__PURE__ */ new Map());
|
|
14045
|
-
const emitExpanded =
|
|
14131
|
+
const emitExpanded = useCallback22(
|
|
14046
14132
|
(next) => {
|
|
14047
14133
|
if (expandedProp === void 0) setUncontrolledExpanded(next);
|
|
14048
14134
|
onExpandedChange?.(Array.from(next));
|
|
14049
14135
|
},
|
|
14050
14136
|
[expandedProp, onExpandedChange]
|
|
14051
14137
|
);
|
|
14052
|
-
const emitSelected =
|
|
14138
|
+
const emitSelected = useCallback22(
|
|
14053
14139
|
(next) => {
|
|
14054
14140
|
if (selectedProp === void 0) setUncontrolledSelected(next);
|
|
14055
14141
|
onSelectedChange?.(next);
|
|
14056
14142
|
},
|
|
14057
14143
|
[onSelectedChange, selectedProp]
|
|
14058
14144
|
);
|
|
14059
|
-
const isExpanded =
|
|
14060
|
-
const toggleExpanded =
|
|
14145
|
+
const isExpanded = useCallback22((value) => expanded.has(value), [expanded]);
|
|
14146
|
+
const toggleExpanded = useCallback22(
|
|
14061
14147
|
(value) => {
|
|
14062
14148
|
const next = new Set(expanded);
|
|
14063
14149
|
if (next.has(value)) next.delete(value);
|
|
@@ -14066,7 +14152,7 @@ function Tree({
|
|
|
14066
14152
|
},
|
|
14067
14153
|
[emitExpanded, expanded]
|
|
14068
14154
|
);
|
|
14069
|
-
const expand =
|
|
14155
|
+
const expand = useCallback22(
|
|
14070
14156
|
(value) => {
|
|
14071
14157
|
if (expanded.has(value)) return;
|
|
14072
14158
|
const next = new Set(expanded);
|
|
@@ -14075,7 +14161,7 @@ function Tree({
|
|
|
14075
14161
|
},
|
|
14076
14162
|
[emitExpanded, expanded]
|
|
14077
14163
|
);
|
|
14078
|
-
const collapse =
|
|
14164
|
+
const collapse = useCallback22(
|
|
14079
14165
|
(value) => {
|
|
14080
14166
|
if (!expanded.has(value)) return;
|
|
14081
14167
|
const next = new Set(expanded);
|
|
@@ -14084,13 +14170,13 @@ function Tree({
|
|
|
14084
14170
|
},
|
|
14085
14171
|
[emitExpanded, expanded]
|
|
14086
14172
|
);
|
|
14087
|
-
const select =
|
|
14173
|
+
const select = useCallback22(
|
|
14088
14174
|
(value) => {
|
|
14089
14175
|
emitSelected(value);
|
|
14090
14176
|
},
|
|
14091
14177
|
[emitSelected]
|
|
14092
14178
|
);
|
|
14093
|
-
const registerItem =
|
|
14179
|
+
const registerItem = useCallback22((value, el, meta) => {
|
|
14094
14180
|
metaMapRef.current.set(value, meta);
|
|
14095
14181
|
if (!orderRef.current.includes(value)) {
|
|
14096
14182
|
orderRef.current.push(value);
|
|
@@ -14102,10 +14188,10 @@ function Tree({
|
|
|
14102
14188
|
orderRef.current = orderRef.current.filter((v) => v !== value);
|
|
14103
14189
|
}
|
|
14104
14190
|
}, []);
|
|
14105
|
-
const focusItem =
|
|
14191
|
+
const focusItem = useCallback22((value) => {
|
|
14106
14192
|
elMapRef.current.get(value)?.focus();
|
|
14107
14193
|
}, []);
|
|
14108
|
-
const visibleValues =
|
|
14194
|
+
const visibleValues = useCallback22(() => {
|
|
14109
14195
|
const result = [];
|
|
14110
14196
|
const walk = (parent) => {
|
|
14111
14197
|
for (const value of orderRef.current) {
|
|
@@ -14119,7 +14205,7 @@ function Tree({
|
|
|
14119
14205
|
walk(null);
|
|
14120
14206
|
return result;
|
|
14121
14207
|
}, [expanded]);
|
|
14122
|
-
const focusByDelta =
|
|
14208
|
+
const focusByDelta = useCallback22(
|
|
14123
14209
|
(currentValue, delta) => {
|
|
14124
14210
|
const list = visibleValues();
|
|
14125
14211
|
const idx = list.indexOf(currentValue);
|
|
@@ -14129,17 +14215,17 @@ function Tree({
|
|
|
14129
14215
|
},
|
|
14130
14216
|
[focusItem, visibleValues]
|
|
14131
14217
|
);
|
|
14132
|
-
const focusFirst =
|
|
14218
|
+
const focusFirst = useCallback22(() => {
|
|
14133
14219
|
const list = visibleValues();
|
|
14134
14220
|
if (list[0]) focusItem(list[0]);
|
|
14135
14221
|
}, [focusItem, visibleValues]);
|
|
14136
|
-
const focusLast =
|
|
14222
|
+
const focusLast = useCallback22(() => {
|
|
14137
14223
|
const list = visibleValues();
|
|
14138
14224
|
const last = list[list.length - 1];
|
|
14139
14225
|
if (last) focusItem(last);
|
|
14140
14226
|
}, [focusItem, visibleValues]);
|
|
14141
|
-
const getParent =
|
|
14142
|
-
const contextValue =
|
|
14227
|
+
const getParent = useCallback22((value) => metaMapRef.current.get(value)?.parentValue ?? null, []);
|
|
14228
|
+
const contextValue = useMemo21(
|
|
14143
14229
|
() => ({
|
|
14144
14230
|
size,
|
|
14145
14231
|
isExpanded,
|
|
@@ -14173,7 +14259,7 @@ function Tree({
|
|
|
14173
14259
|
toggleExpanded
|
|
14174
14260
|
]
|
|
14175
14261
|
);
|
|
14176
|
-
return /* @__PURE__ */
|
|
14262
|
+
return /* @__PURE__ */ jsx73(TreeContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx73(
|
|
14177
14263
|
"ul",
|
|
14178
14264
|
{
|
|
14179
14265
|
"data-refineui": "tree",
|
|
@@ -14187,21 +14273,21 @@ function Tree({
|
|
|
14187
14273
|
|
|
14188
14274
|
// src/components/Tree/TreeItem.tsx
|
|
14189
14275
|
import { clsx as clsx101 } from "clsx";
|
|
14190
|
-
import { useContext as
|
|
14191
|
-
import { jsx as
|
|
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";
|
|
14192
14278
|
function TreeItem({ value, disabled = false, className, children, ...props }) {
|
|
14193
|
-
const tree =
|
|
14194
|
-
const parent =
|
|
14279
|
+
const tree = useContext28(TreeContext);
|
|
14280
|
+
const parent = useContext28(TreeItemContext);
|
|
14195
14281
|
if (!tree) throw new Error("TreeItem must be used within Tree.");
|
|
14196
|
-
const [hasBranch, setHasBranch] =
|
|
14197
|
-
const uid =
|
|
14282
|
+
const [hasBranch, setHasBranch] = useState30(false);
|
|
14283
|
+
const uid = useId16().replace(/:/g, "");
|
|
14198
14284
|
const depth = parent ? parent.depth + 1 : 0;
|
|
14199
14285
|
const parentValue = parent?.value ?? null;
|
|
14200
14286
|
const expanded = tree.isExpanded(value);
|
|
14201
14287
|
const selected = tree.selected === value;
|
|
14202
14288
|
const triggerId = `tree-trigger-${uid}-${value}`;
|
|
14203
14289
|
const groupId = `tree-group-${uid}-${value}`;
|
|
14204
|
-
const itemContext =
|
|
14290
|
+
const itemContext = useMemo22(
|
|
14205
14291
|
() => ({
|
|
14206
14292
|
value,
|
|
14207
14293
|
depth,
|
|
@@ -14216,7 +14302,7 @@ function TreeItem({ value, disabled = false, className, children, ...props }) {
|
|
|
14216
14302
|
}),
|
|
14217
14303
|
[value, depth, parentValue, expanded, selected, disabled, hasBranch, triggerId, groupId]
|
|
14218
14304
|
);
|
|
14219
|
-
return /* @__PURE__ */
|
|
14305
|
+
return /* @__PURE__ */ jsx74(TreeItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx74(
|
|
14220
14306
|
"li",
|
|
14221
14307
|
{
|
|
14222
14308
|
"data-refineui": "tree-item",
|
|
@@ -14238,13 +14324,13 @@ function TreeItem({ value, disabled = false, className, children, ...props }) {
|
|
|
14238
14324
|
// src/components/Tree/TreeItemTrigger.tsx
|
|
14239
14325
|
import { clsx as clsx102 } from "clsx";
|
|
14240
14326
|
import {
|
|
14241
|
-
useContext as
|
|
14327
|
+
useContext as useContext29,
|
|
14242
14328
|
useEffect as useEffect20
|
|
14243
14329
|
} from "react";
|
|
14244
|
-
import { jsx as
|
|
14330
|
+
import { jsx as jsx75, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
14245
14331
|
function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props }) {
|
|
14246
|
-
const tree =
|
|
14247
|
-
const item =
|
|
14332
|
+
const tree = useContext29(TreeContext);
|
|
14333
|
+
const item = useContext29(TreeItemContext);
|
|
14248
14334
|
if (!tree || !item) throw new Error("TreeItemTrigger must be used within TreeItem.");
|
|
14249
14335
|
const iconSize = treeIconSize[tree.size];
|
|
14250
14336
|
const depthIndent = "calc(var(--refineui-spacing-size-large) + var(--refineui-spacing-size-x-small))";
|
|
@@ -14327,7 +14413,7 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
|
|
|
14327
14413
|
break;
|
|
14328
14414
|
}
|
|
14329
14415
|
};
|
|
14330
|
-
return /* @__PURE__ */
|
|
14416
|
+
return /* @__PURE__ */ jsx75(
|
|
14331
14417
|
"div",
|
|
14332
14418
|
{
|
|
14333
14419
|
ref: setRowRef,
|
|
@@ -14347,7 +14433,7 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
|
|
|
14347
14433
|
),
|
|
14348
14434
|
...props,
|
|
14349
14435
|
children: /* @__PURE__ */ jsxs30("div", { "data-refineui": "tree-item-main", className: treeStyles.rowMain, style: mainStyle, children: [
|
|
14350
|
-
item.hasBranch ? /* @__PURE__ */
|
|
14436
|
+
item.hasBranch ? /* @__PURE__ */ jsx75(
|
|
14351
14437
|
"button",
|
|
14352
14438
|
{
|
|
14353
14439
|
type: "button",
|
|
@@ -14361,10 +14447,10 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
|
|
|
14361
14447
|
item.expanded && treeStyles.chevronExpanded,
|
|
14362
14448
|
tree.reduceMotion && "transition-none"
|
|
14363
14449
|
),
|
|
14364
|
-
children: /* @__PURE__ */
|
|
14450
|
+
children: /* @__PURE__ */ jsx75(WebIcon, { name: "chevron-right", size: iconSize, color: "currentColor", fallback: "\u203A" })
|
|
14365
14451
|
}
|
|
14366
|
-
) : /* @__PURE__ */
|
|
14367
|
-
/* @__PURE__ */
|
|
14452
|
+
) : /* @__PURE__ */ jsx75("span", { className: treeStyles.chevronSpacer, "aria-hidden": "true" }),
|
|
14453
|
+
/* @__PURE__ */ jsx75("span", { className: treeStyles.label, children })
|
|
14368
14454
|
] })
|
|
14369
14455
|
}
|
|
14370
14456
|
);
|
|
@@ -14372,11 +14458,11 @@ function TreeItemTrigger({ className, children, onClick, onKeyDown, ...props })
|
|
|
14372
14458
|
|
|
14373
14459
|
// src/components/Tree/TreeItemContent.tsx
|
|
14374
14460
|
import { clsx as clsx103 } from "clsx";
|
|
14375
|
-
import { useContext as
|
|
14376
|
-
import { jsx as
|
|
14461
|
+
import { useContext as useContext30, useLayoutEffect as useLayoutEffect12 } from "react";
|
|
14462
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
14377
14463
|
function TreeItemContent({ className, children, ...props }) {
|
|
14378
|
-
const tree =
|
|
14379
|
-
const item =
|
|
14464
|
+
const tree = useContext30(TreeContext);
|
|
14465
|
+
const item = useContext30(TreeItemContext);
|
|
14380
14466
|
if (!tree || !item) throw new Error("TreeItemContent must be used within TreeItem.");
|
|
14381
14467
|
const { setHasBranch, expanded, groupId, triggerId } = item;
|
|
14382
14468
|
useLayoutEffect12(() => {
|
|
@@ -14394,7 +14480,7 @@ function TreeItemContent({ className, children, ...props }) {
|
|
|
14394
14480
|
transition: tree.reduceMotion ? void 0 : `opacity ${TREE_CONTENT_MS}s ${TREE_CONTENT_EASE}, transform ${TREE_CONTENT_MS}s ${TREE_CONTENT_EASE}`,
|
|
14395
14481
|
pointerEvents: expanded ? void 0 : "none"
|
|
14396
14482
|
};
|
|
14397
|
-
return /* @__PURE__ */
|
|
14483
|
+
return /* @__PURE__ */ jsx76(
|
|
14398
14484
|
"div",
|
|
14399
14485
|
{
|
|
14400
14486
|
ref: (el) => {
|
|
@@ -14405,7 +14491,7 @@ function TreeItemContent({ className, children, ...props }) {
|
|
|
14405
14491
|
"data-refineui": "tree-item-panel",
|
|
14406
14492
|
"aria-hidden": !expanded,
|
|
14407
14493
|
style: gridStyle,
|
|
14408
|
-
children: /* @__PURE__ */
|
|
14494
|
+
children: /* @__PURE__ */ jsx76("div", { className: treeStyles.panel, children: /* @__PURE__ */ jsx76("div", { className: treeStyles.panelInner, style: innerMotionStyle, children: /* @__PURE__ */ jsx76(
|
|
14409
14495
|
"ul",
|
|
14410
14496
|
{
|
|
14411
14497
|
id: groupId,
|
|
@@ -14423,9 +14509,9 @@ function TreeItemContent({ className, children, ...props }) {
|
|
|
14423
14509
|
|
|
14424
14510
|
// src/components/Tooltip/Tooltip.tsx
|
|
14425
14511
|
import { clsx as clsx105 } from "clsx";
|
|
14426
|
-
import { useId as
|
|
14512
|
+
import { useId as useId17, useRef as useRef23, useState as useState31 } from "react";
|
|
14427
14513
|
import { resolveColorTokenValue as resolveColorTokenValue12 } from "@refineui/utilities/color";
|
|
14428
|
-
import { Slot as
|
|
14514
|
+
import { Slot as Slot5, getMergeableTriggerChild as getMergeableTriggerChild4 } from "@refineui/utilities/react";
|
|
14429
14515
|
|
|
14430
14516
|
// src/components/Tooltip/style.ts
|
|
14431
14517
|
import { spacings as spacings6, strokeWidths as strokeWidths3 } from "@refineui/tokens";
|
|
@@ -14529,7 +14615,7 @@ function tooltipBeakRotateDeg(position) {
|
|
|
14529
14615
|
}
|
|
14530
14616
|
|
|
14531
14617
|
// src/components/Tooltip/Tooltip.tsx
|
|
14532
|
-
import { jsx as
|
|
14618
|
+
import { jsx as jsx77, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
14533
14619
|
function Tooltip({
|
|
14534
14620
|
trigger,
|
|
14535
14621
|
content,
|
|
@@ -14542,9 +14628,9 @@ function Tooltip({
|
|
|
14542
14628
|
className,
|
|
14543
14629
|
...props
|
|
14544
14630
|
}) {
|
|
14545
|
-
const [innerOpen, setInnerOpen] =
|
|
14631
|
+
const [innerOpen, setInnerOpen] = useState31(defaultOpen);
|
|
14546
14632
|
const open = ctrlOpen !== void 0 ? ctrlOpen : innerOpen;
|
|
14547
|
-
const tooltipId =
|
|
14633
|
+
const tooltipId = useId17();
|
|
14548
14634
|
const showTimer = useRef23(null);
|
|
14549
14635
|
const setOpen = (next) => {
|
|
14550
14636
|
if (ctrlOpen === void 0) setInnerOpen(next);
|
|
@@ -14575,8 +14661,8 @@ function Tooltip({
|
|
|
14575
14661
|
const mergeEl = getMergeableTriggerChild4(trigger);
|
|
14576
14662
|
let triggerNode;
|
|
14577
14663
|
if (mergeEl != null) {
|
|
14578
|
-
triggerNode = /* @__PURE__ */
|
|
14579
|
-
|
|
14664
|
+
triggerNode = /* @__PURE__ */ jsx77(
|
|
14665
|
+
Slot5,
|
|
14580
14666
|
{
|
|
14581
14667
|
"aria-describedby": describedBy,
|
|
14582
14668
|
onMouseEnter: scheduleShow,
|
|
@@ -14592,7 +14678,7 @@ function Tooltip({
|
|
|
14592
14678
|
}
|
|
14593
14679
|
);
|
|
14594
14680
|
} else {
|
|
14595
|
-
triggerNode = /* @__PURE__ */
|
|
14681
|
+
triggerNode = /* @__PURE__ */ jsx77(
|
|
14596
14682
|
"span",
|
|
14597
14683
|
{
|
|
14598
14684
|
tabIndex: 0,
|
|
@@ -14611,14 +14697,14 @@ function Tooltip({
|
|
|
14611
14697
|
}
|
|
14612
14698
|
return /* @__PURE__ */ jsxs31("div", { "data-refineui": "tooltip", className: clsx105(tooltipStyles.root, className), ...props, children: [
|
|
14613
14699
|
triggerNode,
|
|
14614
|
-
open && /* @__PURE__ */
|
|
14615
|
-
/* @__PURE__ */
|
|
14700
|
+
open && /* @__PURE__ */ jsx77("div", { className: tooltipStyles.floating, style: floatingStyle, children: /* @__PURE__ */ jsxs31("div", { className: tooltipStyles.panelWrap, children: [
|
|
14701
|
+
/* @__PURE__ */ jsx77(
|
|
14616
14702
|
"div",
|
|
14617
14703
|
{
|
|
14618
14704
|
className: tooltipStyles.beakWrap,
|
|
14619
14705
|
style: { ...beakWrapStyle, width: TOOLTIP_BEAK_W, height: TOOLTIP_BEAK_H },
|
|
14620
14706
|
"aria-hidden": true,
|
|
14621
|
-
children: /* @__PURE__ */
|
|
14707
|
+
children: /* @__PURE__ */ jsx77(
|
|
14622
14708
|
"div",
|
|
14623
14709
|
{
|
|
14624
14710
|
style: {
|
|
@@ -14637,8 +14723,8 @@ function Tooltip({
|
|
|
14637
14723
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14638
14724
|
style: { display: "block" },
|
|
14639
14725
|
children: [
|
|
14640
|
-
/* @__PURE__ */
|
|
14641
|
-
/* @__PURE__ */
|
|
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 })
|
|
14642
14728
|
]
|
|
14643
14729
|
}
|
|
14644
14730
|
)
|
|
@@ -14646,7 +14732,7 @@ function Tooltip({
|
|
|
14646
14732
|
)
|
|
14647
14733
|
}
|
|
14648
14734
|
),
|
|
14649
|
-
/* @__PURE__ */
|
|
14735
|
+
/* @__PURE__ */ jsx77(
|
|
14650
14736
|
"div",
|
|
14651
14737
|
{
|
|
14652
14738
|
id: tooltipId,
|
|
@@ -14671,13 +14757,13 @@ function Tooltip({
|
|
|
14671
14757
|
import { clsx as clsx107 } from "clsx";
|
|
14672
14758
|
import {
|
|
14673
14759
|
Children as Children8,
|
|
14674
|
-
createContext as
|
|
14760
|
+
createContext as createContext27,
|
|
14675
14761
|
isValidElement as isValidElement7,
|
|
14676
|
-
useContext as
|
|
14677
|
-
useId as
|
|
14762
|
+
useContext as useContext31,
|
|
14763
|
+
useId as useId18,
|
|
14678
14764
|
useLayoutEffect as useLayoutEffect13,
|
|
14679
|
-
useMemo as
|
|
14680
|
-
useState as
|
|
14765
|
+
useMemo as useMemo23,
|
|
14766
|
+
useState as useState32
|
|
14681
14767
|
} from "react";
|
|
14682
14768
|
import { opacities } from "@refineui/tokens";
|
|
14683
14769
|
import { resolveColorTokenValue as resolveColorTokenValue13 } from "@refineui/utilities/color";
|
|
@@ -14905,10 +14991,10 @@ function formatAxisTick(value) {
|
|
|
14905
14991
|
}
|
|
14906
14992
|
|
|
14907
14993
|
// src/components/Chart/Chart.tsx
|
|
14908
|
-
import { Fragment as Fragment4, jsx as
|
|
14909
|
-
var ChartContext =
|
|
14994
|
+
import { Fragment as Fragment4, jsx as jsx78, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
14995
|
+
var ChartContext = createContext27(null);
|
|
14910
14996
|
function useChartContext(component) {
|
|
14911
|
-
const value =
|
|
14997
|
+
const value = useContext31(ChartContext);
|
|
14912
14998
|
if (!value) throw new Error(`${component} must be used within Chart.`);
|
|
14913
14999
|
return value;
|
|
14914
15000
|
}
|
|
@@ -14941,12 +15027,12 @@ function isChartTooltipElement(node) {
|
|
|
14941
15027
|
return isValidElement7(node) && node.type === ChartTooltip;
|
|
14942
15028
|
}
|
|
14943
15029
|
function Chart({ className, children, ...props }) {
|
|
14944
|
-
const [hoverIndex, setHoverIndex] =
|
|
14945
|
-
const [selectedIndex, setSelectedIndex] =
|
|
14946
|
-
const [pointer, setPointer] =
|
|
14947
|
-
const [labels, setLabels] =
|
|
14948
|
-
const [series, setSeries] =
|
|
14949
|
-
const context =
|
|
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(
|
|
14950
15036
|
() => ({
|
|
14951
15037
|
hoverIndex,
|
|
14952
15038
|
selectedIndex,
|
|
@@ -14961,7 +15047,7 @@ function Chart({ className, children, ...props }) {
|
|
|
14961
15047
|
}),
|
|
14962
15048
|
[hoverIndex, selectedIndex, pointer, labels, series]
|
|
14963
15049
|
);
|
|
14964
|
-
return /* @__PURE__ */
|
|
15050
|
+
return /* @__PURE__ */ jsx78(ChartContext.Provider, { value: context, children: /* @__PURE__ */ jsx78(
|
|
14965
15051
|
"div",
|
|
14966
15052
|
{
|
|
14967
15053
|
"data-refineui": "chart",
|
|
@@ -14972,7 +15058,7 @@ function Chart({ className, children, ...props }) {
|
|
|
14972
15058
|
) });
|
|
14973
15059
|
}
|
|
14974
15060
|
function ChartBody({ className, ...props }) {
|
|
14975
|
-
return /* @__PURE__ */
|
|
15061
|
+
return /* @__PURE__ */ jsx78(
|
|
14976
15062
|
"div",
|
|
14977
15063
|
{
|
|
14978
15064
|
"data-refineui": "chart-body",
|
|
@@ -14982,7 +15068,7 @@ function ChartBody({ className, ...props }) {
|
|
|
14982
15068
|
);
|
|
14983
15069
|
}
|
|
14984
15070
|
function ChartContent({ className, ...props }) {
|
|
14985
|
-
return /* @__PURE__ */
|
|
15071
|
+
return /* @__PURE__ */ jsx78(
|
|
14986
15072
|
"div",
|
|
14987
15073
|
{
|
|
14988
15074
|
"data-refineui": "chart-content",
|
|
@@ -15007,7 +15093,7 @@ function ChartHitArea() {
|
|
|
15007
15093
|
setHoverIndex(hoverIndexFromPlotX(next.x, count, series.align));
|
|
15008
15094
|
return next;
|
|
15009
15095
|
};
|
|
15010
|
-
return /* @__PURE__ */
|
|
15096
|
+
return /* @__PURE__ */ jsx78(
|
|
15011
15097
|
"rect",
|
|
15012
15098
|
{
|
|
15013
15099
|
"data-refineui": "chart-hit-area",
|
|
@@ -15065,7 +15151,7 @@ function ChartPlot({
|
|
|
15065
15151
|
className: chartStyles.plot,
|
|
15066
15152
|
children: [
|
|
15067
15153
|
svgChildren,
|
|
15068
|
-
/* @__PURE__ */
|
|
15154
|
+
/* @__PURE__ */ jsx78(ChartHitArea, {})
|
|
15069
15155
|
]
|
|
15070
15156
|
}
|
|
15071
15157
|
),
|
|
@@ -15083,7 +15169,7 @@ function ChartTooltip({ className, children, style, ...props }) {
|
|
|
15083
15169
|
const flipY = pointer.y < CHART_PLOT_PADDING_TOP + plotHeight() * CHART_TOOLTIP_FLIP_Y;
|
|
15084
15170
|
const offsetX = flipX ? "calc(-100% - var(--refineui-spacing-size-small))" : "var(--refineui-spacing-size-small)";
|
|
15085
15171
|
const offsetY = flipY ? "var(--refineui-spacing-size-small)" : "calc(-100% - var(--refineui-spacing-size-x-small))";
|
|
15086
|
-
return /* @__PURE__ */
|
|
15172
|
+
return /* @__PURE__ */ jsx78(
|
|
15087
15173
|
"div",
|
|
15088
15174
|
{
|
|
15089
15175
|
"data-refineui": "chart-tooltip",
|
|
@@ -15097,8 +15183,8 @@ function ChartTooltip({ className, children, style, ...props }) {
|
|
|
15097
15183
|
},
|
|
15098
15184
|
...props,
|
|
15099
15185
|
children: children ?? /* @__PURE__ */ jsxs32(Fragment4, { children: [
|
|
15100
|
-
label ? /* @__PURE__ */
|
|
15101
|
-
/* @__PURE__ */
|
|
15186
|
+
label ? /* @__PURE__ */ jsx78("span", { className: chartStyles.tooltipLabel, children: label }) : null,
|
|
15187
|
+
/* @__PURE__ */ jsx78("span", { className: chartStyles.tooltipValue, children: formatAxisTick(value) })
|
|
15102
15188
|
] })
|
|
15103
15189
|
}
|
|
15104
15190
|
);
|
|
@@ -15113,14 +15199,14 @@ function ChartYAxisLabels({
|
|
|
15113
15199
|
}) {
|
|
15114
15200
|
const scaleMax = resolveScale(values, max);
|
|
15115
15201
|
const ticks = yAxisTicks(scaleMax, lines).slice().reverse();
|
|
15116
|
-
return /* @__PURE__ */
|
|
15202
|
+
return /* @__PURE__ */ jsx78(
|
|
15117
15203
|
"div",
|
|
15118
15204
|
{
|
|
15119
15205
|
"data-refineui": "chart-y-axis",
|
|
15120
15206
|
className: clsx107(chartStyles.yAxis, className),
|
|
15121
15207
|
"aria-hidden": true,
|
|
15122
15208
|
...props,
|
|
15123
|
-
children: ticks.map((tick) => /* @__PURE__ */
|
|
15209
|
+
children: ticks.map((tick) => /* @__PURE__ */ jsx78(
|
|
15124
15210
|
"span",
|
|
15125
15211
|
{
|
|
15126
15212
|
className: chartStyles.yAxisTick,
|
|
@@ -15143,12 +15229,12 @@ function ChartGrid({
|
|
|
15143
15229
|
const ticks = yAxisTicks(scaleMax, lines);
|
|
15144
15230
|
const gridColor = gridStroke();
|
|
15145
15231
|
const baselineColor = gridBaselineStroke();
|
|
15146
|
-
return /* @__PURE__ */
|
|
15232
|
+
return /* @__PURE__ */ jsx78("g", { "data-refineui": "chart-grid", className, ...props, children: ticks.map((tick, index) => {
|
|
15147
15233
|
const y = gridLineY(scaleMax, tick);
|
|
15148
15234
|
const isBaseline = index === 0;
|
|
15149
15235
|
const isTop = index === ticks.length - 1;
|
|
15150
15236
|
if (isTop) return null;
|
|
15151
|
-
return /* @__PURE__ */
|
|
15237
|
+
return /* @__PURE__ */ jsx78(
|
|
15152
15238
|
"line",
|
|
15153
15239
|
{
|
|
15154
15240
|
x1: CHART_PLOT_PADDING_X,
|
|
@@ -15186,7 +15272,7 @@ function ChartBars({
|
|
|
15186
15272
|
return /* @__PURE__ */ jsxs32("g", { "data-refineui": "chart-bars", "data-series-color": seriesColor, className, ...props, children: [
|
|
15187
15273
|
showTrack ? values.map((_, index) => {
|
|
15188
15274
|
const x = barX(index, values.length);
|
|
15189
|
-
return /* @__PURE__ */
|
|
15275
|
+
return /* @__PURE__ */ jsx78(
|
|
15190
15276
|
"path",
|
|
15191
15277
|
{
|
|
15192
15278
|
"data-refineui": "chart-bar-track",
|
|
@@ -15208,7 +15294,7 @@ function ChartBars({
|
|
|
15208
15294
|
const height = baselineY - y;
|
|
15209
15295
|
if (height <= 0) return null;
|
|
15210
15296
|
const state = itemState(index, hoverIndex, selectedIndex);
|
|
15211
|
-
return /* @__PURE__ */
|
|
15297
|
+
return /* @__PURE__ */ jsx78(
|
|
15212
15298
|
"path",
|
|
15213
15299
|
{
|
|
15214
15300
|
"data-refineui": "chart-bar",
|
|
@@ -15231,7 +15317,7 @@ function ChartLine({
|
|
|
15231
15317
|
...props
|
|
15232
15318
|
}) {
|
|
15233
15319
|
const { hoverIndex, selectedIndex, setSeries } = useChartContext("ChartLine");
|
|
15234
|
-
const gradientId =
|
|
15320
|
+
const gradientId = useId18().replace(/:/g, "");
|
|
15235
15321
|
const scaleMax = resolveChartScale(values, max);
|
|
15236
15322
|
const stroke = seriesColorToken(seriesColor);
|
|
15237
15323
|
const coords = linePointCoords(values, scaleMax);
|
|
@@ -15243,8 +15329,8 @@ function ChartLine({
|
|
|
15243
15329
|
}, [values, seriesColor, max, setSeries]);
|
|
15244
15330
|
return /* @__PURE__ */ jsxs32("g", { "data-refineui": "chart-line", "data-series-color": seriesColor, className, ...props, children: [
|
|
15245
15331
|
showArea && coords.length > 1 ? /* @__PURE__ */ jsxs32(Fragment4, { children: [
|
|
15246
|
-
/* @__PURE__ */
|
|
15247
|
-
/* @__PURE__ */
|
|
15332
|
+
/* @__PURE__ */ jsx78("defs", { children: /* @__PURE__ */ jsxs32("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
15333
|
+
/* @__PURE__ */ jsx78(
|
|
15248
15334
|
"stop",
|
|
15249
15335
|
{
|
|
15250
15336
|
offset: "0%",
|
|
@@ -15252,9 +15338,9 @@ function ChartLine({
|
|
|
15252
15338
|
stopOpacity: opacities.opacityDisabled
|
|
15253
15339
|
}
|
|
15254
15340
|
),
|
|
15255
|
-
/* @__PURE__ */
|
|
15341
|
+
/* @__PURE__ */ jsx78("stop", { offset: "100%", stopColor: stroke, stopOpacity: "0" })
|
|
15256
15342
|
] }) }),
|
|
15257
|
-
/* @__PURE__ */
|
|
15343
|
+
/* @__PURE__ */ jsx78(
|
|
15258
15344
|
"path",
|
|
15259
15345
|
{
|
|
15260
15346
|
"data-refineui": "chart-line-area",
|
|
@@ -15263,7 +15349,7 @@ function ChartLine({
|
|
|
15263
15349
|
}
|
|
15264
15350
|
)
|
|
15265
15351
|
] }) : null,
|
|
15266
|
-
/* @__PURE__ */
|
|
15352
|
+
/* @__PURE__ */ jsx78(
|
|
15267
15353
|
"path",
|
|
15268
15354
|
{
|
|
15269
15355
|
"data-refineui": "chart-line-stroke",
|
|
@@ -15281,7 +15367,7 @@ function ChartLine({
|
|
|
15281
15367
|
const state = itemState(index, hoverIndex, selectedIndex);
|
|
15282
15368
|
const visible = showPoints || state !== "default";
|
|
15283
15369
|
if (!visible) return null;
|
|
15284
|
-
return /* @__PURE__ */
|
|
15370
|
+
return /* @__PURE__ */ jsx78(
|
|
15285
15371
|
"circle",
|
|
15286
15372
|
{
|
|
15287
15373
|
"data-refineui": "chart-point",
|
|
@@ -15310,7 +15396,7 @@ function ChartAxisLabels({
|
|
|
15310
15396
|
useLayoutEffect13(() => {
|
|
15311
15397
|
setLabels(labels);
|
|
15312
15398
|
}, [labels, setLabels]);
|
|
15313
|
-
return /* @__PURE__ */
|
|
15399
|
+
return /* @__PURE__ */ jsx78(
|
|
15314
15400
|
"div",
|
|
15315
15401
|
{
|
|
15316
15402
|
"data-refineui": "chart-axis-labels",
|
|
@@ -15319,7 +15405,7 @@ function ChartAxisLabels({
|
|
|
15319
15405
|
...props,
|
|
15320
15406
|
children: labels.map((label, index) => {
|
|
15321
15407
|
const state = itemState(index, hoverIndex, selectedIndex);
|
|
15322
|
-
return /* @__PURE__ */
|
|
15408
|
+
return /* @__PURE__ */ jsx78(
|
|
15323
15409
|
"span",
|
|
15324
15410
|
{
|
|
15325
15411
|
"data-state": state,
|
|
@@ -15337,7 +15423,7 @@ function ChartAxisLabels({
|
|
|
15337
15423
|
);
|
|
15338
15424
|
}
|
|
15339
15425
|
function ChartLegend({ className, ...props }) {
|
|
15340
|
-
return /* @__PURE__ */
|
|
15426
|
+
return /* @__PURE__ */ jsx78(
|
|
15341
15427
|
"ul",
|
|
15342
15428
|
{
|
|
15343
15429
|
"data-refineui": "chart-legend",
|
|
@@ -15361,7 +15447,7 @@ function ChartLegendItem({
|
|
|
15361
15447
|
className: clsx107(chartStyles.legendItem, className),
|
|
15362
15448
|
...props,
|
|
15363
15449
|
children: [
|
|
15364
|
-
/* @__PURE__ */
|
|
15450
|
+
/* @__PURE__ */ jsx78(
|
|
15365
15451
|
"span",
|
|
15366
15452
|
{
|
|
15367
15453
|
"aria-hidden": true,
|
|
@@ -15376,31 +15462,31 @@ function ChartLegendItem({
|
|
|
15376
15462
|
}
|
|
15377
15463
|
|
|
15378
15464
|
// src/components/Slot/Slot.tsx
|
|
15379
|
-
import { Slot as
|
|
15465
|
+
import { Slot as Slot6 } from "@refineui/utilities/react";
|
|
15380
15466
|
|
|
15381
15467
|
// src/components/Collapsible/Collapsible.tsx
|
|
15382
15468
|
import {
|
|
15383
|
-
forwardRef as
|
|
15384
|
-
useCallback as
|
|
15385
|
-
useId as
|
|
15386
|
-
useMemo as
|
|
15387
|
-
useState as
|
|
15469
|
+
forwardRef as forwardRef17,
|
|
15470
|
+
useCallback as useCallback23,
|
|
15471
|
+
useId as useId19,
|
|
15472
|
+
useMemo as useMemo24,
|
|
15473
|
+
useState as useState34
|
|
15388
15474
|
} from "react";
|
|
15389
15475
|
import { clsx as clsx108 } from "clsx";
|
|
15390
|
-
import { Slot as
|
|
15476
|
+
import { Slot as Slot7 } from "@refineui/utilities/react";
|
|
15391
15477
|
|
|
15392
15478
|
// src/components/Collapsible/context.ts
|
|
15393
|
-
import { createContext as
|
|
15479
|
+
import { createContext as createContext28, useContext as useContext32, useEffect as useEffect21, useState as useState33 } from "react";
|
|
15394
15480
|
import { semanticInteraction as semanticInteraction9 } from "@refineui/tokens";
|
|
15395
15481
|
import { getReducedMotionQuery as getReducedMotionQuery3 } from "@refineui/utilities/animation";
|
|
15396
|
-
var CollapsibleContext =
|
|
15482
|
+
var CollapsibleContext = createContext28(null);
|
|
15397
15483
|
function useCollapsibleContext(part) {
|
|
15398
|
-
const value =
|
|
15484
|
+
const value = useContext32(CollapsibleContext);
|
|
15399
15485
|
if (!value) throw new Error(`${part} must be used within Collapsible`);
|
|
15400
15486
|
return value;
|
|
15401
15487
|
}
|
|
15402
15488
|
function usePrefersReducedMotion3() {
|
|
15403
|
-
const [reduce, setReduce] =
|
|
15489
|
+
const [reduce, setReduce] = useState33(false);
|
|
15404
15490
|
useEffect21(() => {
|
|
15405
15491
|
const mql = window.matchMedia(getReducedMotionQuery3().replace("@media ", ""));
|
|
15406
15492
|
const sync = () => setReduce(mql.matches);
|
|
@@ -15421,18 +15507,18 @@ var collapsibleStyles = {
|
|
|
15421
15507
|
};
|
|
15422
15508
|
|
|
15423
15509
|
// src/components/Collapsible/Collapsible.tsx
|
|
15424
|
-
import { jsx as
|
|
15425
|
-
var Collapsible =
|
|
15426
|
-
const [uncontrolled, setUncontrolled] =
|
|
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);
|
|
15427
15513
|
const open = openProp ?? uncontrolled;
|
|
15428
|
-
const reactId =
|
|
15514
|
+
const reactId = useId19();
|
|
15429
15515
|
const reduceMotion = usePrefersReducedMotion3();
|
|
15430
|
-
const toggle =
|
|
15516
|
+
const toggle = useCallback23(() => {
|
|
15431
15517
|
const next = !(openProp ?? uncontrolled);
|
|
15432
15518
|
if (openProp === void 0) setUncontrolled(next);
|
|
15433
15519
|
onOpenChange?.(next);
|
|
15434
15520
|
}, [onOpenChange, openProp, uncontrolled]);
|
|
15435
|
-
const contextValue =
|
|
15521
|
+
const contextValue = useMemo24(
|
|
15436
15522
|
() => ({
|
|
15437
15523
|
open,
|
|
15438
15524
|
toggle,
|
|
@@ -15449,9 +15535,9 @@ var Collapsible = forwardRef16(function Collapsible2({ open: openProp, defaultOp
|
|
|
15449
15535
|
"data-refineui": "collapsible",
|
|
15450
15536
|
className
|
|
15451
15537
|
};
|
|
15452
|
-
return /* @__PURE__ */
|
|
15538
|
+
return /* @__PURE__ */ jsx79(CollapsibleContext.Provider, { value: contextValue, children: asChild ? /* @__PURE__ */ jsx79(Slot7, { ...shared, children }) : /* @__PURE__ */ jsx79("div", { ...shared, children }) });
|
|
15453
15539
|
});
|
|
15454
|
-
var CollapsibleTrigger =
|
|
15540
|
+
var CollapsibleTrigger = forwardRef17(
|
|
15455
15541
|
function CollapsibleTrigger2({
|
|
15456
15542
|
asChild = false,
|
|
15457
15543
|
onClick,
|
|
@@ -15478,8 +15564,8 @@ var CollapsibleTrigger = forwardRef16(
|
|
|
15478
15564
|
if (!event.defaultPrevented) toggle();
|
|
15479
15565
|
}
|
|
15480
15566
|
};
|
|
15481
|
-
if (asChild) return /* @__PURE__ */
|
|
15482
|
-
return /* @__PURE__ */
|
|
15567
|
+
if (asChild) return /* @__PURE__ */ jsx79(Slot7, { ...shared, children });
|
|
15568
|
+
return /* @__PURE__ */ jsx79(
|
|
15483
15569
|
Button,
|
|
15484
15570
|
{
|
|
15485
15571
|
...shared,
|
|
@@ -15493,7 +15579,7 @@ var CollapsibleTrigger = forwardRef16(
|
|
|
15493
15579
|
);
|
|
15494
15580
|
}
|
|
15495
15581
|
);
|
|
15496
|
-
var CollapsibleContent =
|
|
15582
|
+
var CollapsibleContent = forwardRef17(
|
|
15497
15583
|
function CollapsibleContent2({ className, children, style, ...props }, ref) {
|
|
15498
15584
|
const { open, contentId, triggerId, reduceMotion } = useCollapsibleContext("CollapsibleContent");
|
|
15499
15585
|
const gridStyle = {
|
|
@@ -15508,7 +15594,7 @@ var CollapsibleContent = forwardRef16(
|
|
|
15508
15594
|
pointerEvents: open ? void 0 : "none",
|
|
15509
15595
|
...style
|
|
15510
15596
|
};
|
|
15511
|
-
return /* @__PURE__ */
|
|
15597
|
+
return /* @__PURE__ */ jsx79(
|
|
15512
15598
|
"div",
|
|
15513
15599
|
{
|
|
15514
15600
|
...props,
|
|
@@ -15520,7 +15606,7 @@ var CollapsibleContent = forwardRef16(
|
|
|
15520
15606
|
"data-state": open ? "open" : "closed",
|
|
15521
15607
|
"data-refineui": "collapsible-content",
|
|
15522
15608
|
style: gridStyle,
|
|
15523
|
-
children: /* @__PURE__ */
|
|
15609
|
+
children: /* @__PURE__ */ jsx79("div", { className: collapsibleStyles.panelOuter, children: /* @__PURE__ */ jsx79("div", { className: clsx108(className), style: innerMotionStyle, children }) })
|
|
15524
15610
|
}
|
|
15525
15611
|
);
|
|
15526
15612
|
}
|
|
@@ -15528,28 +15614,28 @@ var CollapsibleContent = forwardRef16(
|
|
|
15528
15614
|
|
|
15529
15615
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
15530
15616
|
import {
|
|
15531
|
-
createContext as
|
|
15532
|
-
forwardRef as
|
|
15533
|
-
useCallback as
|
|
15534
|
-
useContext as
|
|
15617
|
+
createContext as createContext29,
|
|
15618
|
+
forwardRef as forwardRef18,
|
|
15619
|
+
useCallback as useCallback24,
|
|
15620
|
+
useContext as useContext33,
|
|
15535
15621
|
useEffect as useEffect22,
|
|
15536
15622
|
useLayoutEffect as useLayoutEffect14,
|
|
15537
|
-
useMemo as
|
|
15623
|
+
useMemo as useMemo25,
|
|
15538
15624
|
useRef as useRef24,
|
|
15539
|
-
useState as
|
|
15625
|
+
useState as useState35
|
|
15540
15626
|
} from "react";
|
|
15541
15627
|
import { createPortal as createPortal7 } from "react-dom";
|
|
15542
15628
|
import { clsx as clsx109 } from "clsx";
|
|
15543
15629
|
import { componentSizes as componentSizes3, iconSizes as iconSizes23, semanticInteraction as semanticInteraction10 } from "@refineui/tokens";
|
|
15544
15630
|
import { motionMsToNumber as motionMsToNumber7 } from "@refineui/utilities/animation";
|
|
15545
|
-
import { Slot as
|
|
15546
|
-
import { Fragment as Fragment5, jsx as
|
|
15631
|
+
import { Slot as Slot8 } from "@refineui/utilities/react";
|
|
15632
|
+
import { Fragment as Fragment5, jsx as jsx80, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
15547
15633
|
var MENU_ATTR = "data-refineui-context-menu";
|
|
15548
15634
|
var CLOSE_MS = motionMsToNumber7(semanticInteraction10.duration.normal);
|
|
15549
|
-
var MenuContext2 =
|
|
15550
|
-
var SubContext =
|
|
15635
|
+
var MenuContext2 = createContext29(null);
|
|
15636
|
+
var SubContext = createContext29(null);
|
|
15551
15637
|
function useMenu() {
|
|
15552
|
-
const value =
|
|
15638
|
+
const value = useContext33(MenuContext2);
|
|
15553
15639
|
if (!value) throw new Error("Context menu parts must be used within ContextMenu");
|
|
15554
15640
|
return value;
|
|
15555
15641
|
}
|
|
@@ -15566,29 +15652,29 @@ function placeInView(element, x, y) {
|
|
|
15566
15652
|
}
|
|
15567
15653
|
function ContextMenu({ modal = true, onOpenChange, children }) {
|
|
15568
15654
|
void modal;
|
|
15569
|
-
const [open, setOpen] =
|
|
15570
|
-
const [point, setPoint] =
|
|
15655
|
+
const [open, setOpen] = useState35(false);
|
|
15656
|
+
const [point, setPoint] = useState35({ x: 0, y: 0 });
|
|
15571
15657
|
const openRef = useRef24(false);
|
|
15572
15658
|
const onOpenChangeRef = useRef24(onOpenChange);
|
|
15573
15659
|
openRef.current = open;
|
|
15574
15660
|
onOpenChangeRef.current = onOpenChange;
|
|
15575
|
-
const close =
|
|
15661
|
+
const close = useCallback24(() => {
|
|
15576
15662
|
if (!openRef.current) return;
|
|
15577
15663
|
openRef.current = false;
|
|
15578
15664
|
setOpen(false);
|
|
15579
15665
|
onOpenChangeRef.current?.(false);
|
|
15580
15666
|
}, []);
|
|
15581
|
-
const openAt =
|
|
15667
|
+
const openAt = useCallback24((x, y) => {
|
|
15582
15668
|
setPoint({ x, y });
|
|
15583
15669
|
const wasOpen = openRef.current;
|
|
15584
15670
|
openRef.current = true;
|
|
15585
15671
|
setOpen(true);
|
|
15586
15672
|
if (!wasOpen) onOpenChangeRef.current?.(true);
|
|
15587
15673
|
}, []);
|
|
15588
|
-
const value =
|
|
15589
|
-
return /* @__PURE__ */
|
|
15674
|
+
const value = useMemo25(() => ({ open, point, openAt, close }), [open, point, openAt, close]);
|
|
15675
|
+
return /* @__PURE__ */ jsx80(MenuContext2.Provider, { value, children });
|
|
15590
15676
|
}
|
|
15591
|
-
var ContextMenuTrigger =
|
|
15677
|
+
var ContextMenuTrigger = forwardRef18(function ContextMenuTrigger2({ asChild = false, onContextMenu, children, ...props }, ref) {
|
|
15592
15678
|
const { openAt } = useMenu();
|
|
15593
15679
|
const shared = {
|
|
15594
15680
|
...props,
|
|
@@ -15601,17 +15687,17 @@ var ContextMenuTrigger = forwardRef17(function ContextMenuTrigger2({ asChild = f
|
|
|
15601
15687
|
openAt(event.clientX, event.clientY);
|
|
15602
15688
|
}
|
|
15603
15689
|
};
|
|
15604
|
-
if (asChild) return /* @__PURE__ */
|
|
15605
|
-
return /* @__PURE__ */
|
|
15690
|
+
if (asChild) return /* @__PURE__ */ jsx80(Slot8, { ...shared, children });
|
|
15691
|
+
return /* @__PURE__ */ jsx80("span", { ...shared, className: clsx109(menuStyles.triggerFallback, props.className), children });
|
|
15606
15692
|
});
|
|
15607
15693
|
function ContextMenuPortal({ children }) {
|
|
15608
|
-
return /* @__PURE__ */
|
|
15694
|
+
return /* @__PURE__ */ jsx80(Fragment5, { children });
|
|
15609
15695
|
}
|
|
15610
|
-
var ContextMenuContent =
|
|
15696
|
+
var ContextMenuContent = forwardRef18(function ContextMenuContent2({ className, style, onPointerDown, children, ...props }, ref) {
|
|
15611
15697
|
const { open, point, close } = useMenu();
|
|
15612
15698
|
const localRef = useRef24(null);
|
|
15613
|
-
const [shouldRender, setShouldRender] =
|
|
15614
|
-
const [isClosing, setIsClosing] =
|
|
15699
|
+
const [shouldRender, setShouldRender] = useState35(open);
|
|
15700
|
+
const [isClosing, setIsClosing] = useState35(false);
|
|
15615
15701
|
useEffect22(() => {
|
|
15616
15702
|
if (open) {
|
|
15617
15703
|
setShouldRender(true);
|
|
@@ -15649,7 +15735,7 @@ var ContextMenuContent = forwardRef17(function ContextMenuContent2({ className,
|
|
|
15649
15735
|
}, [open, close]);
|
|
15650
15736
|
if (!shouldRender || typeof document === "undefined") return null;
|
|
15651
15737
|
return createPortal7(
|
|
15652
|
-
/* @__PURE__ */
|
|
15738
|
+
/* @__PURE__ */ jsx80(
|
|
15653
15739
|
"div",
|
|
15654
15740
|
{
|
|
15655
15741
|
...props,
|
|
@@ -15676,7 +15762,7 @@ var ContextMenuContent = forwardRef17(function ContextMenuContent2({ className,
|
|
|
15676
15762
|
onPointerDown?.(event);
|
|
15677
15763
|
},
|
|
15678
15764
|
onContextMenu: (event) => event.preventDefault(),
|
|
15679
|
-
children: /* @__PURE__ */
|
|
15765
|
+
children: /* @__PURE__ */ jsx80("div", { role: "menu", "data-refineui": "menu", className: clsx109(menuStyles.list, className), children })
|
|
15680
15766
|
}
|
|
15681
15767
|
),
|
|
15682
15768
|
document.body
|
|
@@ -15693,11 +15779,11 @@ function runSelect(onSelect, close, disabled) {
|
|
|
15693
15779
|
onSelect?.(selectEvent);
|
|
15694
15780
|
if (!selectEvent.defaultPrevented) close();
|
|
15695
15781
|
}
|
|
15696
|
-
var ContextMenuItem =
|
|
15782
|
+
var ContextMenuItem = forwardRef18(function ContextMenuItem2({ disabled = false, description, shortcut, startIcon, endIcon, state = "default", onSelect, className, onClick, onKeyDown, children, ...props }, ref) {
|
|
15697
15783
|
const { close } = useMenu();
|
|
15698
15784
|
const isDisabled = disabled || state === "disabled";
|
|
15699
15785
|
const slotted = startIcon != null || description != null || shortcut != null || endIcon != null;
|
|
15700
|
-
return /* @__PURE__ */
|
|
15786
|
+
return /* @__PURE__ */ jsx80(
|
|
15701
15787
|
"button",
|
|
15702
15788
|
{
|
|
15703
15789
|
ref,
|
|
@@ -15724,7 +15810,7 @@ var ContextMenuItem = forwardRef17(function ContextMenuItem2({ disabled = false,
|
|
|
15724
15810
|
}
|
|
15725
15811
|
},
|
|
15726
15812
|
children: slotted ? /* @__PURE__ */ jsxs33("span", { className: menuStyles.row, children: [
|
|
15727
|
-
startIcon ? /* @__PURE__ */
|
|
15813
|
+
startIcon ? /* @__PURE__ */ jsx80(
|
|
15728
15814
|
"span",
|
|
15729
15815
|
{
|
|
15730
15816
|
className: menuStyles.iconWrap,
|
|
@@ -15733,12 +15819,12 @@ var ContextMenuItem = forwardRef17(function ContextMenuItem2({ disabled = false,
|
|
|
15733
15819
|
}
|
|
15734
15820
|
) : null,
|
|
15735
15821
|
/* @__PURE__ */ jsxs33("span", { className: menuStyles.textCol, children: [
|
|
15736
|
-
/* @__PURE__ */
|
|
15737
|
-
description ? /* @__PURE__ */
|
|
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
|
|
15738
15824
|
] }),
|
|
15739
15825
|
(shortcut || endIcon) && /* @__PURE__ */ jsxs33("span", { className: menuStyles.rightWrap, children: [
|
|
15740
|
-
shortcut ? /* @__PURE__ */
|
|
15741
|
-
endIcon ? /* @__PURE__ */
|
|
15826
|
+
shortcut ? /* @__PURE__ */ jsx80("span", { className: menuStyles.shortcut, children: shortcut }) : null,
|
|
15827
|
+
endIcon ? /* @__PURE__ */ jsx80(
|
|
15742
15828
|
"span",
|
|
15743
15829
|
{
|
|
15744
15830
|
className: menuStyles.iconWrap,
|
|
@@ -15747,13 +15833,13 @@ var ContextMenuItem = forwardRef17(function ContextMenuItem2({ disabled = false,
|
|
|
15747
15833
|
}
|
|
15748
15834
|
) : null
|
|
15749
15835
|
] })
|
|
15750
|
-
] }) : /* @__PURE__ */
|
|
15836
|
+
] }) : /* @__PURE__ */ jsx80("span", { className: menuStyles.row, children })
|
|
15751
15837
|
}
|
|
15752
15838
|
);
|
|
15753
15839
|
});
|
|
15754
|
-
var ContextMenuSeparator =
|
|
15840
|
+
var ContextMenuSeparator = forwardRef18(
|
|
15755
15841
|
function ContextMenuSeparator2({ className, ...props }, ref) {
|
|
15756
|
-
return /* @__PURE__ */
|
|
15842
|
+
return /* @__PURE__ */ jsx80(
|
|
15757
15843
|
"div",
|
|
15758
15844
|
{
|
|
15759
15845
|
ref,
|
|
@@ -15763,16 +15849,16 @@ var ContextMenuSeparator = forwardRef17(
|
|
|
15763
15849
|
...{ [MENU_ATTR]: "" },
|
|
15764
15850
|
className: clsx109(menuStyles.dividerWrap, className),
|
|
15765
15851
|
...props,
|
|
15766
|
-
children: /* @__PURE__ */
|
|
15852
|
+
children: /* @__PURE__ */ jsx80("div", { className: menuStyles.dividerLine })
|
|
15767
15853
|
}
|
|
15768
15854
|
);
|
|
15769
15855
|
}
|
|
15770
15856
|
);
|
|
15771
15857
|
function ContextMenuLabel({ className, children, ...props }) {
|
|
15772
|
-
return /* @__PURE__ */
|
|
15858
|
+
return /* @__PURE__ */ jsx80("div", { "data-refineui": "menu-label", className: clsx109(menuStyles.section, className), ...props, children: /* @__PURE__ */ jsx80("span", { className: menuStyles.sectionText, children }) });
|
|
15773
15859
|
}
|
|
15774
15860
|
function ContextMenuSub({ children }) {
|
|
15775
|
-
const [open, setOpen] =
|
|
15861
|
+
const [open, setOpen] = useState35(false);
|
|
15776
15862
|
const triggerRef = useRef24(null);
|
|
15777
15863
|
const timer = useRef24(null);
|
|
15778
15864
|
const clear = () => {
|
|
@@ -15780,7 +15866,7 @@ function ContextMenuSub({ children }) {
|
|
|
15780
15866
|
timer.current = null;
|
|
15781
15867
|
};
|
|
15782
15868
|
useEffect22(() => clear, []);
|
|
15783
|
-
const value =
|
|
15869
|
+
const value = useMemo25(
|
|
15784
15870
|
() => ({
|
|
15785
15871
|
open,
|
|
15786
15872
|
triggerRef,
|
|
@@ -15795,14 +15881,14 @@ function ContextMenuSub({ children }) {
|
|
|
15795
15881
|
}),
|
|
15796
15882
|
[open]
|
|
15797
15883
|
);
|
|
15798
|
-
return /* @__PURE__ */
|
|
15884
|
+
return /* @__PURE__ */ jsx80(SubContext.Provider, { value, children });
|
|
15799
15885
|
}
|
|
15800
15886
|
function useSub2() {
|
|
15801
|
-
const value =
|
|
15887
|
+
const value = useContext33(SubContext);
|
|
15802
15888
|
if (!value) throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");
|
|
15803
15889
|
return value;
|
|
15804
15890
|
}
|
|
15805
|
-
var ContextMenuSubTrigger =
|
|
15891
|
+
var ContextMenuSubTrigger = forwardRef18(
|
|
15806
15892
|
function ContextMenuSubTrigger2({ asChild = false, description, startIcon, onMouseEnter, onMouseLeave, onClick, className, children, ...props }, ref) {
|
|
15807
15893
|
const sub = useSub2();
|
|
15808
15894
|
const shared = {
|
|
@@ -15838,9 +15924,9 @@ var ContextMenuSubTrigger = forwardRef17(
|
|
|
15838
15924
|
if (!event.defaultPrevented) sub.show();
|
|
15839
15925
|
}
|
|
15840
15926
|
};
|
|
15841
|
-
if (asChild) return /* @__PURE__ */
|
|
15842
|
-
return /* @__PURE__ */
|
|
15843
|
-
startIcon ? /* @__PURE__ */
|
|
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(
|
|
15844
15930
|
"span",
|
|
15845
15931
|
{
|
|
15846
15932
|
className: menuStyles.iconWrap,
|
|
@@ -15849,25 +15935,25 @@ var ContextMenuSubTrigger = forwardRef17(
|
|
|
15849
15935
|
}
|
|
15850
15936
|
) : null,
|
|
15851
15937
|
/* @__PURE__ */ jsxs33("span", { className: menuStyles.textCol, children: [
|
|
15852
|
-
/* @__PURE__ */
|
|
15853
|
-
description ? /* @__PURE__ */
|
|
15938
|
+
/* @__PURE__ */ jsx80("span", { className: menuStyles.title, children }),
|
|
15939
|
+
description ? /* @__PURE__ */ jsx80("span", { className: clsx109(menuStyles.description, menuStyles.descriptionEnabled), children: description }) : null
|
|
15854
15940
|
] }),
|
|
15855
|
-
/* @__PURE__ */
|
|
15941
|
+
/* @__PURE__ */ jsx80("span", { className: menuStyles.rightWrap, children: /* @__PURE__ */ jsx80(
|
|
15856
15942
|
"span",
|
|
15857
15943
|
{
|
|
15858
15944
|
className: menuStyles.iconWrap,
|
|
15859
15945
|
style: { width: iconSizes23.small, minWidth: iconSizes23.small, height: iconSizes23.small },
|
|
15860
|
-
children: /* @__PURE__ */
|
|
15946
|
+
children: /* @__PURE__ */ jsx80(WebIcon, { name: "chevron-right", size: iconSizes23.small, color: "currentColor", "aria-hidden": true })
|
|
15861
15947
|
}
|
|
15862
15948
|
) })
|
|
15863
15949
|
] }) });
|
|
15864
15950
|
}
|
|
15865
15951
|
);
|
|
15866
|
-
var ContextMenuSubContent =
|
|
15952
|
+
var ContextMenuSubContent = forwardRef18(
|
|
15867
15953
|
function ContextMenuSubContent2({ className, style, onPointerDown, onMouseEnter, onMouseLeave, ...props }, ref) {
|
|
15868
15954
|
const sub = useSub2();
|
|
15869
15955
|
const localRef = useRef24(null);
|
|
15870
|
-
const [side, setSide] =
|
|
15956
|
+
const [side, setSide] = useState35("right");
|
|
15871
15957
|
useLayoutEffect14(() => {
|
|
15872
15958
|
const trigger = sub.triggerRef.current;
|
|
15873
15959
|
const element = localRef.current;
|
|
@@ -15886,7 +15972,7 @@ var ContextMenuSubContent = forwardRef17(
|
|
|
15886
15972
|
}, [sub.open, sub.triggerRef]);
|
|
15887
15973
|
if (!sub.open || typeof document === "undefined") return null;
|
|
15888
15974
|
return createPortal7(
|
|
15889
|
-
/* @__PURE__ */
|
|
15975
|
+
/* @__PURE__ */ jsx80(
|
|
15890
15976
|
"div",
|
|
15891
15977
|
{
|
|
15892
15978
|
...props,
|
|
@@ -16153,9 +16239,11 @@ export {
|
|
|
16153
16239
|
SidebarPeekInset,
|
|
16154
16240
|
SidebarPeekPanel,
|
|
16155
16241
|
SidebarPeekPin,
|
|
16242
|
+
SidebarProvider,
|
|
16243
|
+
SidebarTrigger,
|
|
16156
16244
|
Skeleton,
|
|
16157
16245
|
Slider,
|
|
16158
|
-
|
|
16246
|
+
Slot6 as Slot,
|
|
16159
16247
|
Spacer,
|
|
16160
16248
|
SpinButton,
|
|
16161
16249
|
Spinner,
|
|
@@ -16210,6 +16298,7 @@ export {
|
|
|
16210
16298
|
semanticTextClass,
|
|
16211
16299
|
sizedComponentTextClass,
|
|
16212
16300
|
toast,
|
|
16301
|
+
useSidebar,
|
|
16213
16302
|
useSidebarPeek
|
|
16214
16303
|
};
|
|
16215
16304
|
//# sourceMappingURL=index.js.map
|