@expcat/tigercat-react 2.0.19 → 2.1.1
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/README.md +25 -16
- package/dist/chunk-246DAUEF.mjs +181 -0
- package/dist/{chunk-PU3JY6RE.mjs → chunk-2JMI7TCM.mjs} +1 -1
- package/dist/chunk-2YBLMVDT.mjs +428 -0
- package/dist/chunk-2YOP55OF.mjs +639 -0
- package/dist/{chunk-25D5TXZH.mjs → chunk-32MCQMBJ.mjs} +8 -6
- package/dist/chunk-3HHEVMHE.mjs +180 -0
- package/dist/{chunk-HSBN5MLS.mjs → chunk-3LACOSJQ.mjs} +1 -1
- package/dist/{chunk-F6WV53BS.mjs → chunk-3LDDXHW2.mjs} +28 -11
- package/dist/{chunk-IXQAECFP.mjs → chunk-3QNIFKVF.mjs} +12 -14
- package/dist/{chunk-UD4DTVJZ.mjs → chunk-4C2X5PZO.mjs} +57 -25
- package/dist/chunk-5JETWHLJ.mjs +28 -0
- package/dist/{chunk-VA6PZWOH.mjs → chunk-5SEMRHBD.mjs} +14 -6
- package/dist/{chunk-EKILTLUO.mjs → chunk-72CJNKDY.mjs} +1 -1
- package/dist/{chunk-XE4YFBOZ.mjs → chunk-AUD3VOLO.mjs} +1 -1
- package/dist/{chunk-UT5BV2VO.mjs → chunk-AYFKHWJS.mjs} +16 -10
- package/dist/{chunk-RPSHILHD.mjs → chunk-BXAH2GH3.mjs} +8 -2
- package/dist/{chunk-EW5EO7VE.mjs → chunk-BYD7EAWK.mjs} +1 -1
- package/dist/{chunk-BOGOQ44C.mjs → chunk-CQOLQAB5.mjs} +105 -90
- package/dist/{chunk-L55UK45A.mjs → chunk-CRIEUKMD.mjs} +5 -2
- package/dist/{chunk-DKNVSQSV.mjs → chunk-CUAXRBKO.mjs} +12 -0
- package/dist/{chunk-E7OTDBI6.mjs → chunk-DECUASRW.mjs} +17 -19
- package/dist/{chunk-XMTEMBQV.mjs → chunk-EAAWB3CK.mjs} +16 -13
- package/dist/{chunk-D33BIMGK.mjs → chunk-EG7EMDKK.mjs} +12 -2
- package/dist/chunk-EW43YBPV.mjs +457 -0
- package/dist/{chunk-HOYBHB7B.mjs → chunk-FNK2VWPP.mjs} +1 -1
- package/dist/{chunk-RJPNBYK5.mjs → chunk-FQS24AUH.mjs} +12 -3
- package/dist/{chunk-LADKKOJT.mjs → chunk-GBEDWXLL.mjs} +16 -10
- package/dist/chunk-GR3Y3XWP.mjs +47 -0
- package/dist/{chunk-2ENQZECC.mjs → chunk-HAXRHSCN.mjs} +4 -3
- package/dist/{chunk-K4GIKSZE.mjs → chunk-I2BENK5X.mjs} +2 -1
- package/dist/chunk-IGBQGR6G.mjs +234 -0
- package/dist/chunk-J76R2S62.mjs +161 -0
- package/dist/{chunk-DNOPEJ5I.mjs → chunk-JZZPLKTW.mjs} +7 -4
- package/dist/{chunk-7KCQMXJA.mjs → chunk-KDURW5AS.mjs} +4 -3
- package/dist/{chunk-TFMEHUVZ.mjs → chunk-KKN7KLTB.mjs} +0 -1
- package/dist/{chunk-6MGQAJ62.mjs → chunk-KL6YJIZ3.mjs} +24 -7
- package/dist/chunk-KRDHM5KB.mjs +259 -0
- package/dist/{chunk-HHIW7V7B.mjs → chunk-M6ZPTGBV.mjs} +2 -10
- package/dist/chunk-MFPVVGNA.mjs +248 -0
- package/dist/{chunk-PXRZ6CKY.mjs → chunk-MJVSZ2UJ.mjs} +46 -16
- package/dist/{chunk-LZKBDQE4.mjs → chunk-MYI3FPG4.mjs} +23 -4
- package/dist/{chunk-OIGEBCAS.mjs → chunk-NADODEZX.mjs} +69 -1
- package/dist/{chunk-KMP5CVNK.mjs → chunk-NJWTZ5MO.mjs} +57 -45
- package/dist/chunk-NLGLBTSM.mjs +138 -0
- package/dist/chunk-NT7GW2FD.mjs +40 -0
- package/dist/{chunk-773LH7BK.mjs → chunk-O6VYD4E4.mjs} +24 -2
- package/dist/{chunk-G7D4QV7A.mjs → chunk-O7TV5OKS.mjs} +33 -6
- package/dist/{chunk-DPWRXXXW.mjs → chunk-OJ6SHHOZ.mjs} +3 -3
- package/dist/chunk-OKYMTHFQ.mjs +279 -0
- package/dist/{chunk-UYJJLHVA.mjs → chunk-PMQJ6AYT.mjs} +23 -21
- package/dist/chunk-PY2VUNEJ.mjs +494 -0
- package/dist/{chunk-BEJZPJIK.mjs → chunk-QOAOOD53.mjs} +10 -4
- package/dist/{chunk-2WGEHH5A.mjs → chunk-QU3QXUTC.mjs} +49 -23
- package/dist/{chunk-V6P7ZK6O.mjs → chunk-QXSUG7SN.mjs} +3 -3
- package/dist/{chunk-FYINJRYN.mjs → chunk-R7YZ6FKP.mjs} +27 -16
- package/dist/{chunk-YI6YWH66.mjs → chunk-RE5ZLA5D.mjs} +6 -6
- package/dist/{chunk-UCBW5RJN.mjs → chunk-RGVU4EMA.mjs} +11 -6
- package/dist/{chunk-IBSOUQGB.mjs → chunk-RRGPDFDI.mjs} +7 -4
- package/dist/{chunk-ZH5ZBLAN.mjs → chunk-RUQ3F3MV.mjs} +34 -7
- package/dist/chunk-SEOG5AGS.mjs +72 -0
- package/dist/{chunk-PGD5RPKF.mjs → chunk-SVIJ2UZA.mjs} +2 -1
- package/dist/chunk-SXWEFZOF.mjs +766 -0
- package/dist/{chunk-NCHUEGUW.mjs → chunk-TEVEXDY2.mjs} +27 -16
- package/dist/{chunk-DJOFM2VO.mjs → chunk-TO6MZFNQ.mjs} +52 -40
- package/dist/chunk-TQ6RIFWR.mjs +135 -0
- package/dist/chunk-U4M3DC2P.mjs +48 -0
- package/dist/{chunk-ZCGIZOMT.mjs → chunk-V7HJ5HLC.mjs} +6 -10
- package/dist/{chunk-SIDDYP3O.mjs → chunk-VJWSKJLJ.mjs} +1 -1
- package/dist/{chunk-ZG56T75O.mjs → chunk-WTHWLCRL.mjs} +51 -11
- package/dist/{chunk-KP6DEYWB.mjs → chunk-X4L3W7RQ.mjs} +1 -1
- package/dist/{chunk-ZMRTETN2.mjs → chunk-X6C6MNG5.mjs} +4 -3
- package/dist/chunk-XT43B7ZI.mjs +58 -0
- package/dist/{chunk-OGG2TQDG.mjs → chunk-XVHTJQ4T.mjs} +12 -1
- package/dist/{chunk-QJE3MZBO.mjs → chunk-Y6UH3EKE.mjs} +1 -1
- package/dist/chunk-YJ5T4XZN.mjs +81 -0
- package/dist/{chunk-VVNFXJMN.mjs → chunk-YNDPQVEK.mjs} +8 -1
- package/dist/{chunk-QGZ32NFQ.mjs → chunk-Z23KOLNU.mjs} +4 -3
- package/dist/{chunk-5CKMYMTS.mjs → chunk-ZATZRXMW.mjs} +27 -8
- package/dist/components/ActivityFeed.mjs +3 -3
- package/dist/components/Affix.mjs +1 -1
- package/dist/components/Anchor.mjs +1 -1
- package/dist/components/AreaChart.mjs +5 -4
- package/dist/components/AspectRatio.d.mts +10 -0
- package/dist/components/AspectRatio.mjs +8 -0
- package/dist/components/AutoComplete.mjs +1 -1
- package/dist/components/BarChart.mjs +5 -4
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/Cascader.mjs +1 -1
- package/dist/components/ChartCanvas.mjs +1 -1
- package/dist/components/ChatWindow.mjs +4 -4
- package/dist/components/Code.mjs +3 -1
- package/dist/components/CollapsePanel.mjs +1 -1
- package/dist/components/ColorPicker.mjs +1 -1
- package/dist/components/CommentThread.mjs +2 -2
- package/dist/components/ContextMenu.d.mts +36 -0
- package/dist/components/ContextMenu.mjs +17 -0
- package/dist/components/DataExport.mjs +2 -2
- package/dist/components/DataTableWithToolbar.mjs +7 -7
- package/dist/components/DonutChart.mjs +4 -4
- package/dist/components/Dropdown.mjs +1 -1
- package/dist/components/FileManager.mjs +2 -1
- package/dist/components/FloatButton.mjs +1 -1
- package/dist/components/FormItem.mjs +1 -1
- package/dist/components/FormWizard.mjs +1 -1
- package/dist/components/FunnelChart.mjs +3 -3
- package/dist/components/Gantt.d.mts +3 -1
- package/dist/components/Gantt.mjs +2 -2
- package/dist/components/GaugeChart.mjs +2 -2
- package/dist/components/HeatmapChart.mjs +3 -3
- package/dist/components/Highlight.d.mts +11 -0
- package/dist/components/Highlight.mjs +8 -0
- package/dist/components/Image.mjs +4 -4
- package/dist/components/ImageCompare.d.mts +15 -0
- package/dist/components/ImageCompare.mjs +8 -0
- package/dist/components/ImageGroup.mjs +2 -2
- package/dist/components/ImagePreview.mjs +1 -1
- package/dist/components/Input.mjs +1 -1
- package/dist/components/InputNumber.d.mts +1 -1
- package/dist/components/InputNumber.mjs +1 -1
- package/dist/components/InputOTP.d.mts +33 -0
- package/dist/components/InputOTP.mjs +12 -0
- package/dist/components/Kanban.mjs +2 -2
- package/dist/components/Kbd.d.mts +10 -0
- package/dist/components/Kbd.mjs +8 -0
- package/dist/components/LineChart.mjs +5 -4
- package/dist/components/List.mjs +2 -2
- package/dist/components/Loading.mjs +1 -1
- package/dist/components/LoadingBar.d.mts +8 -0
- package/dist/components/LoadingBar.mjs +138 -0
- package/dist/components/LoadingBarContainer.d.mts +8 -0
- package/dist/components/LoadingBarContainer.mjs +8 -0
- package/dist/components/LoadingBarRoot.d.mts +6 -0
- package/dist/components/LoadingBarRoot.mjs +6 -0
- package/dist/components/Marquee.d.mts +10 -0
- package/dist/components/Marquee.mjs +8 -0
- package/dist/components/MaskInput.d.mts +37 -0
- package/dist/components/MaskInput.mjs +10 -0
- package/dist/components/Masonry.d.mts +10 -0
- package/dist/components/Masonry.mjs +8 -0
- package/dist/components/NavigationMenu.d.mts +84 -0
- package/dist/components/NavigationMenu.mjs +23 -0
- package/dist/components/NotificationCenter.mjs +4 -4
- package/dist/components/OrgChart.mjs +2 -2
- package/dist/components/PageHeader.d.mts +34 -0
- package/dist/components/PageHeader.mjs +11 -0
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/PieChart.mjs +3 -3
- package/dist/components/Popconfirm.mjs +2 -2
- package/dist/components/Popover.mjs +2 -2
- package/dist/components/QRCode.d.mts +2 -2
- package/dist/components/QRCode.mjs +1 -1
- package/dist/components/RadarChart.mjs +4 -4
- package/dist/components/Rate.mjs +1 -1
- package/dist/components/ScatterChart.mjs +5 -4
- package/dist/components/ScrollArea.d.mts +10 -0
- package/dist/components/ScrollArea.mjs +8 -0
- package/dist/components/ScrollSpy.mjs +1 -1
- package/dist/components/Signature.mjs +1 -1
- package/dist/components/SplitButton.d.mts +38 -0
- package/dist/components/SplitButton.mjs +12 -0
- package/dist/components/Splitter.mjs +1 -1
- package/dist/components/Stepper.d.mts +2 -0
- package/dist/components/Stepper.mjs +2 -1
- package/dist/components/SunburstChart.mjs +3 -3
- package/dist/components/Switch.d.mts +5 -1
- package/dist/components/Switch.mjs +2 -1
- package/dist/components/Table.mjs +2 -2
- package/dist/components/TagsInput.d.mts +41 -0
- package/dist/components/TagsInput.mjs +13 -0
- package/dist/components/TaskBoard.mjs +1 -1
- package/dist/components/Textarea.mjs +1 -1
- package/dist/components/Tooltip.mjs +2 -2
- package/dist/components/Tour.mjs +1 -1
- package/dist/components/TreeMapChart.mjs +3 -3
- package/dist/components/TreeSelect.mjs +2 -1
- package/dist/components/Upload.mjs +1 -1
- package/dist/hooks/useChartInteraction.d.mts +5 -0
- package/dist/hooks/useChartInteraction.mjs +1 -1
- package/dist/index.d.mts +17 -1
- package/dist/index.mjs +406 -0
- package/package.json +117 -2
- package/dist/chunk-7AFRHC7P.mjs +0 -312
- package/dist/chunk-CB4SK5AU.mjs +0 -235
- package/dist/chunk-KPACLRQH.mjs +0 -55
- package/dist/chunk-YIB6ZXZF.mjs +0 -386
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import {
|
|
2
|
+
renderOverlayPortal,
|
|
3
|
+
useAnchoredOverlay
|
|
4
|
+
} from "./chunk-HKAZXG74.mjs";
|
|
5
|
+
|
|
6
|
+
// src/components/ContextMenu.tsx
|
|
7
|
+
import React, {
|
|
8
|
+
createContext,
|
|
9
|
+
useContext,
|
|
10
|
+
useState,
|
|
11
|
+
useEffect,
|
|
12
|
+
useLayoutEffect,
|
|
13
|
+
useRef,
|
|
14
|
+
useCallback,
|
|
15
|
+
useMemo,
|
|
16
|
+
useId
|
|
17
|
+
} from "react";
|
|
18
|
+
import {
|
|
19
|
+
classNames,
|
|
20
|
+
getContextMenuContainerClasses,
|
|
21
|
+
getContextMenuTriggerClasses,
|
|
22
|
+
getContextMenuMenuClasses,
|
|
23
|
+
getContextMenuItemClasses,
|
|
24
|
+
getContextMenuSubTriggerClasses,
|
|
25
|
+
getContextMenuSubChevronClasses,
|
|
26
|
+
getContextMenuPointStyle,
|
|
27
|
+
getContextMenuOpenPoint,
|
|
28
|
+
injectContextMenuStyles,
|
|
29
|
+
CONTEXT_MENU_ENTER_CLASS,
|
|
30
|
+
CONTEXT_MENU_SUB_CHEVRON_PATH,
|
|
31
|
+
isContextMenuKeyboardEvent,
|
|
32
|
+
handleMenuNavigation,
|
|
33
|
+
focusFirstMenuItem,
|
|
34
|
+
captureActiveElement,
|
|
35
|
+
restoreFocus
|
|
36
|
+
} from "@expcat/tigercat-core";
|
|
37
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
38
|
+
var ContextMenuContext = createContext(null);
|
|
39
|
+
var ContextMenuMenu = ({
|
|
40
|
+
className,
|
|
41
|
+
style,
|
|
42
|
+
children,
|
|
43
|
+
role,
|
|
44
|
+
...divProps
|
|
45
|
+
}) => {
|
|
46
|
+
const menuClasses = classNames(getContextMenuMenuClasses(), className);
|
|
47
|
+
return /* @__PURE__ */ jsx("div", { className: menuClasses, style, role: role ?? "menu", ...divProps, children });
|
|
48
|
+
};
|
|
49
|
+
var ContextMenuItem = ({
|
|
50
|
+
disabled = false,
|
|
51
|
+
divided = false,
|
|
52
|
+
className,
|
|
53
|
+
onClick,
|
|
54
|
+
children,
|
|
55
|
+
...buttonProps
|
|
56
|
+
}) => {
|
|
57
|
+
const context = useContext(ContextMenuContext);
|
|
58
|
+
const handleClick = (event) => {
|
|
59
|
+
if (disabled) {
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
onClick?.(event);
|
|
64
|
+
if (context?.closeOnClick) {
|
|
65
|
+
context.handleItemClick();
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const itemClasses = classNames(getContextMenuItemClasses(disabled, divided), className);
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
type: "button",
|
|
73
|
+
className: itemClasses,
|
|
74
|
+
role: "menuitem",
|
|
75
|
+
tabIndex: -1,
|
|
76
|
+
"aria-disabled": disabled,
|
|
77
|
+
disabled,
|
|
78
|
+
onClick: handleClick,
|
|
79
|
+
...buttonProps,
|
|
80
|
+
children
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
var ContextMenuSub = ({
|
|
85
|
+
title = "",
|
|
86
|
+
disabled = false,
|
|
87
|
+
className,
|
|
88
|
+
style,
|
|
89
|
+
children
|
|
90
|
+
}) => {
|
|
91
|
+
const context = useContext(ContextMenuContext);
|
|
92
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
93
|
+
const [isOpenByKeyboard, setIsOpenByKeyboard] = useState(false);
|
|
94
|
+
const popupCloseTimerRef = useRef(null);
|
|
95
|
+
const titleRef = useRef(null);
|
|
96
|
+
const popupRef = useRef(null);
|
|
97
|
+
const isExpanded = isHovered || isOpenByKeyboard;
|
|
98
|
+
const portalEnabled = Boolean(context?.portal);
|
|
99
|
+
const overlay = useAnchoredOverlay({
|
|
100
|
+
referenceRef: titleRef,
|
|
101
|
+
floatingRef: popupRef,
|
|
102
|
+
enabled: Boolean(context) && isExpanded && !disabled,
|
|
103
|
+
placement: "right-start",
|
|
104
|
+
offset: 4,
|
|
105
|
+
portal: portalEnabled,
|
|
106
|
+
dismissOnEscape: true,
|
|
107
|
+
onDismiss: () => {
|
|
108
|
+
setIsOpenByKeyboard(false);
|
|
109
|
+
setIsHovered(false);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
if (!context?.open) {
|
|
114
|
+
setIsHovered(false);
|
|
115
|
+
setIsOpenByKeyboard(false);
|
|
116
|
+
}
|
|
117
|
+
}, [context?.open]);
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
return () => {
|
|
120
|
+
if (popupCloseTimerRef.current) {
|
|
121
|
+
clearTimeout(popupCloseTimerRef.current);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}, []);
|
|
125
|
+
const clearCloseTimer = useCallback(() => {
|
|
126
|
+
if (popupCloseTimerRef.current) {
|
|
127
|
+
clearTimeout(popupCloseTimerRef.current);
|
|
128
|
+
popupCloseTimerRef.current = null;
|
|
129
|
+
}
|
|
130
|
+
}, []);
|
|
131
|
+
const handleMouseEnter = useCallback(() => {
|
|
132
|
+
if (disabled) return;
|
|
133
|
+
clearCloseTimer();
|
|
134
|
+
setIsHovered(true);
|
|
135
|
+
}, [clearCloseTimer, disabled]);
|
|
136
|
+
const handleMouseLeave = useCallback(() => {
|
|
137
|
+
const close = () => {
|
|
138
|
+
setIsHovered(false);
|
|
139
|
+
setIsOpenByKeyboard(false);
|
|
140
|
+
};
|
|
141
|
+
if (portalEnabled) {
|
|
142
|
+
popupCloseTimerRef.current = setTimeout(close, 120);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
close();
|
|
146
|
+
}, [portalEnabled]);
|
|
147
|
+
const focusPopupFirstItem = useCallback(() => {
|
|
148
|
+
requestAnimationFrame(() => {
|
|
149
|
+
if (popupRef.current) focusFirstMenuItem(popupRef.current);
|
|
150
|
+
});
|
|
151
|
+
}, []);
|
|
152
|
+
const handleTitleKeyDown = useCallback(
|
|
153
|
+
(event) => {
|
|
154
|
+
if (disabled) return;
|
|
155
|
+
if (event.key === "ArrowRight" || event.key === "Enter" || event.key === " ") {
|
|
156
|
+
event.preventDefault();
|
|
157
|
+
event.stopPropagation();
|
|
158
|
+
setIsOpenByKeyboard(true);
|
|
159
|
+
setIsHovered(true);
|
|
160
|
+
focusPopupFirstItem();
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (event.key === "ArrowLeft" || event.key === "Escape") {
|
|
164
|
+
if (isExpanded) {
|
|
165
|
+
event.preventDefault();
|
|
166
|
+
event.stopPropagation();
|
|
167
|
+
setIsOpenByKeyboard(false);
|
|
168
|
+
setIsHovered(false);
|
|
169
|
+
titleRef.current?.focus();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
[disabled, focusPopupFirstItem, isExpanded]
|
|
174
|
+
);
|
|
175
|
+
const handlePopupKeyDown = useCallback((event) => {
|
|
176
|
+
if (popupRef.current) {
|
|
177
|
+
handleMenuNavigation(popupRef.current, event.nativeEvent);
|
|
178
|
+
}
|
|
179
|
+
if (event.key === "ArrowLeft" || event.key === "Escape") {
|
|
180
|
+
event.preventDefault();
|
|
181
|
+
event.stopPropagation();
|
|
182
|
+
setIsOpenByKeyboard(false);
|
|
183
|
+
setIsHovered(false);
|
|
184
|
+
titleRef.current?.focus();
|
|
185
|
+
}
|
|
186
|
+
}, []);
|
|
187
|
+
const handlePopupContextMenu = useCallback((event) => {
|
|
188
|
+
event.preventDefault();
|
|
189
|
+
}, []);
|
|
190
|
+
if (!context) return null;
|
|
191
|
+
const triggerClasses = classNames(getContextMenuSubTriggerClasses(disabled), className);
|
|
192
|
+
const popupClasses = classNames(overlay.floatingClasses, CONTEXT_MENU_ENTER_CLASS);
|
|
193
|
+
const popup = /* @__PURE__ */ jsx(
|
|
194
|
+
"div",
|
|
195
|
+
{
|
|
196
|
+
ref: popupRef,
|
|
197
|
+
className: popupClasses,
|
|
198
|
+
style: overlay.floatingStyles,
|
|
199
|
+
"data-positioned": overlay.positioned,
|
|
200
|
+
"data-tiger-context-menu-sub": "",
|
|
201
|
+
hidden: !isExpanded,
|
|
202
|
+
onMouseEnter: handleMouseEnter,
|
|
203
|
+
onMouseLeave: handleMouseLeave,
|
|
204
|
+
onKeyDown: handlePopupKeyDown,
|
|
205
|
+
onContextMenu: handlePopupContextMenu,
|
|
206
|
+
children: /* @__PURE__ */ jsx("div", { className: getContextMenuMenuClasses(), role: "menu", children })
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
return /* @__PURE__ */ jsxs(
|
|
210
|
+
"div",
|
|
211
|
+
{
|
|
212
|
+
className: portalEnabled ? void 0 : "relative",
|
|
213
|
+
onMouseEnter: handleMouseEnter,
|
|
214
|
+
onMouseLeave: handleMouseLeave,
|
|
215
|
+
role: "none",
|
|
216
|
+
children: [
|
|
217
|
+
/* @__PURE__ */ jsxs(
|
|
218
|
+
"button",
|
|
219
|
+
{
|
|
220
|
+
ref: titleRef,
|
|
221
|
+
type: "button",
|
|
222
|
+
className: triggerClasses,
|
|
223
|
+
style,
|
|
224
|
+
role: "menuitem",
|
|
225
|
+
tabIndex: -1,
|
|
226
|
+
"aria-haspopup": "menu",
|
|
227
|
+
"aria-expanded": isExpanded,
|
|
228
|
+
"aria-disabled": disabled || void 0,
|
|
229
|
+
"data-state": isExpanded ? "open" : "closed",
|
|
230
|
+
"data-tiger-context-menu-sub-trigger": "",
|
|
231
|
+
disabled,
|
|
232
|
+
onClick: (event) => {
|
|
233
|
+
event.preventDefault();
|
|
234
|
+
event.stopPropagation();
|
|
235
|
+
},
|
|
236
|
+
onKeyDown: handleTitleKeyDown,
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: title }),
|
|
239
|
+
/* @__PURE__ */ jsx(
|
|
240
|
+
"svg",
|
|
241
|
+
{
|
|
242
|
+
className: getContextMenuSubChevronClasses(),
|
|
243
|
+
viewBox: "0 0 24 24",
|
|
244
|
+
fill: "none",
|
|
245
|
+
stroke: "currentColor",
|
|
246
|
+
strokeWidth: "2",
|
|
247
|
+
strokeLinecap: "round",
|
|
248
|
+
strokeLinejoin: "round",
|
|
249
|
+
"aria-hidden": "true",
|
|
250
|
+
children: /* @__PURE__ */ jsx("path", { d: CONTEXT_MENU_SUB_CHEVRON_PATH })
|
|
251
|
+
}
|
|
252
|
+
)
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
),
|
|
256
|
+
renderOverlayPortal(popup, overlay.target, !portalEnabled)
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
};
|
|
261
|
+
var ContextMenu = ({
|
|
262
|
+
disabled = false,
|
|
263
|
+
open: controlledOpen,
|
|
264
|
+
defaultOpen = false,
|
|
265
|
+
closeOnClick = true,
|
|
266
|
+
portal = true,
|
|
267
|
+
offset = 0,
|
|
268
|
+
placement = "bottom-start",
|
|
269
|
+
className,
|
|
270
|
+
style,
|
|
271
|
+
onOpenChange,
|
|
272
|
+
children,
|
|
273
|
+
...divProps
|
|
274
|
+
}) => {
|
|
275
|
+
const [internalVisible, setInternalVisible] = useState(defaultOpen);
|
|
276
|
+
const visible = controlledOpen !== void 0 ? controlledOpen : internalVisible;
|
|
277
|
+
const containerRef = useRef(null);
|
|
278
|
+
const triggerRef = useRef(null);
|
|
279
|
+
const pointNodeRef = useRef(null);
|
|
280
|
+
const floatingRef = useRef(null);
|
|
281
|
+
const previousActiveElementRef = useRef(null);
|
|
282
|
+
const explicitPointRef = useRef(false);
|
|
283
|
+
const [point, setPoint] = useState({ x: 0, y: 0 });
|
|
284
|
+
const reactId = useId();
|
|
285
|
+
const menuId = useMemo(() => `tiger-context-menu-${reactId}`, [reactId]);
|
|
286
|
+
const pointReferenceRef = useMemo(
|
|
287
|
+
() => ({
|
|
288
|
+
get current() {
|
|
289
|
+
return pointNodeRef.current;
|
|
290
|
+
},
|
|
291
|
+
set current(node) {
|
|
292
|
+
pointNodeRef.current = node;
|
|
293
|
+
}
|
|
294
|
+
}),
|
|
295
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- point is an invalidation key, not a value
|
|
296
|
+
[point.x, point.y]
|
|
297
|
+
);
|
|
298
|
+
useEffect(() => {
|
|
299
|
+
injectContextMenuStyles();
|
|
300
|
+
}, []);
|
|
301
|
+
const setVisible = useCallback(
|
|
302
|
+
(newVisible) => {
|
|
303
|
+
if (disabled && newVisible) return;
|
|
304
|
+
if (newVisible && !visible) {
|
|
305
|
+
previousActiveElementRef.current = captureActiveElement();
|
|
306
|
+
}
|
|
307
|
+
if (controlledOpen === void 0) {
|
|
308
|
+
setInternalVisible(newVisible);
|
|
309
|
+
}
|
|
310
|
+
onOpenChange?.(newVisible);
|
|
311
|
+
if (newVisible) {
|
|
312
|
+
requestAnimationFrame(() => {
|
|
313
|
+
if (floatingRef.current) {
|
|
314
|
+
focusFirstMenuItem(floatingRef.current);
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
} else {
|
|
318
|
+
restoreFocus(previousActiveElementRef.current);
|
|
319
|
+
previousActiveElementRef.current = null;
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
[disabled, visible, controlledOpen, onOpenChange]
|
|
323
|
+
);
|
|
324
|
+
useLayoutEffect(() => {
|
|
325
|
+
if (!visible || explicitPointRef.current) return;
|
|
326
|
+
if (!triggerRef.current) return;
|
|
327
|
+
setPoint(getContextMenuOpenPoint(null, triggerRef.current));
|
|
328
|
+
}, [visible]);
|
|
329
|
+
const handleItemClick = useCallback(() => {
|
|
330
|
+
if (closeOnClick) {
|
|
331
|
+
setVisible(false);
|
|
332
|
+
}
|
|
333
|
+
}, [closeOnClick, setVisible]);
|
|
334
|
+
const openAt = useCallback(
|
|
335
|
+
(next) => {
|
|
336
|
+
explicitPointRef.current = true;
|
|
337
|
+
setPoint(next);
|
|
338
|
+
setVisible(true);
|
|
339
|
+
},
|
|
340
|
+
[setVisible]
|
|
341
|
+
);
|
|
342
|
+
const handleContextMenu = useCallback(
|
|
343
|
+
(event) => {
|
|
344
|
+
if (disabled) return;
|
|
345
|
+
event.preventDefault();
|
|
346
|
+
event.stopPropagation();
|
|
347
|
+
openAt(getContextMenuOpenPoint(event.nativeEvent, triggerRef.current));
|
|
348
|
+
},
|
|
349
|
+
[disabled, openAt]
|
|
350
|
+
);
|
|
351
|
+
const handleTriggerKeyDown = useCallback(
|
|
352
|
+
(event) => {
|
|
353
|
+
if (disabled || !isContextMenuKeyboardEvent(event)) return;
|
|
354
|
+
event.preventDefault();
|
|
355
|
+
openAt(getContextMenuOpenPoint(null, triggerRef.current));
|
|
356
|
+
},
|
|
357
|
+
[disabled, openAt]
|
|
358
|
+
);
|
|
359
|
+
const handleMenuKeyDown = useCallback((event) => {
|
|
360
|
+
if (floatingRef.current) {
|
|
361
|
+
handleMenuNavigation(floatingRef.current, event.nativeEvent);
|
|
362
|
+
}
|
|
363
|
+
}, []);
|
|
364
|
+
const handleMenuContextMenu = useCallback((event) => {
|
|
365
|
+
event.preventDefault();
|
|
366
|
+
}, []);
|
|
367
|
+
const overlay = useAnchoredOverlay({
|
|
368
|
+
referenceRef: pointReferenceRef,
|
|
369
|
+
floatingRef,
|
|
370
|
+
enabled: visible,
|
|
371
|
+
placement,
|
|
372
|
+
offset,
|
|
373
|
+
portal,
|
|
374
|
+
dismissOnOutside: true,
|
|
375
|
+
dismissOnEscape: true,
|
|
376
|
+
onDismiss: () => setVisible(false)
|
|
377
|
+
});
|
|
378
|
+
const containerClasses = useMemo(
|
|
379
|
+
() => classNames(getContextMenuContainerClasses(), className),
|
|
380
|
+
[className]
|
|
381
|
+
);
|
|
382
|
+
const triggerClasses = useMemo(() => getContextMenuTriggerClasses(disabled), [disabled]);
|
|
383
|
+
const menuWrapperClasses = classNames(overlay.floatingClasses, CONTEXT_MENU_ENTER_CLASS);
|
|
384
|
+
const pointStyle = useMemo(() => getContextMenuPointStyle(point), [point]);
|
|
385
|
+
const contextValue = useMemo(
|
|
386
|
+
() => ({ closeOnClick, handleItemClick, portal, open: visible }),
|
|
387
|
+
[closeOnClick, handleItemClick, portal, visible]
|
|
388
|
+
);
|
|
389
|
+
const childrenArray = React.Children.toArray(children);
|
|
390
|
+
const triggerChildren = [];
|
|
391
|
+
let menuElement = null;
|
|
392
|
+
childrenArray.forEach((child) => {
|
|
393
|
+
if (React.isValidElement(child) && child.type === ContextMenuMenu) {
|
|
394
|
+
menuElement = child;
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
triggerChildren.push(child);
|
|
398
|
+
});
|
|
399
|
+
const menuWrapperNode = menuElement ? /* @__PURE__ */ jsx(
|
|
400
|
+
"div",
|
|
401
|
+
{
|
|
402
|
+
ref: floatingRef,
|
|
403
|
+
className: menuWrapperClasses,
|
|
404
|
+
style: overlay.floatingStyles,
|
|
405
|
+
"data-positioned": overlay.positioned,
|
|
406
|
+
hidden: !visible,
|
|
407
|
+
"data-tiger-context-menu": "",
|
|
408
|
+
onKeyDown: handleMenuKeyDown,
|
|
409
|
+
onContextMenu: handleMenuContextMenu,
|
|
410
|
+
children: React.isValidElement(menuElement) ? React.cloneElement(menuElement, {
|
|
411
|
+
id: menuId
|
|
412
|
+
}) : menuElement
|
|
413
|
+
},
|
|
414
|
+
`${point.x},${point.y}`
|
|
415
|
+
) : null;
|
|
416
|
+
return /* @__PURE__ */ jsx(ContextMenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs("div", { ref: containerRef, className: containerClasses, style, ...divProps, children: [
|
|
417
|
+
/* @__PURE__ */ jsx(
|
|
418
|
+
"div",
|
|
419
|
+
{
|
|
420
|
+
ref: triggerRef,
|
|
421
|
+
className: triggerClasses,
|
|
422
|
+
onContextMenu: handleContextMenu,
|
|
423
|
+
onKeyDown: handleTriggerKeyDown,
|
|
424
|
+
"aria-haspopup": "menu",
|
|
425
|
+
"aria-expanded": visible,
|
|
426
|
+
"aria-controls": visible ? menuId : void 0,
|
|
427
|
+
"data-state": visible ? "open" : "closed",
|
|
428
|
+
"data-tiger-context-menu-trigger": "",
|
|
429
|
+
children: triggerChildren
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
/* @__PURE__ */ jsx(
|
|
433
|
+
"div",
|
|
434
|
+
{
|
|
435
|
+
ref: pointNodeRef,
|
|
436
|
+
style: pointStyle,
|
|
437
|
+
"aria-hidden": "true",
|
|
438
|
+
"data-tiger-context-menu-point": ""
|
|
439
|
+
}
|
|
440
|
+
),
|
|
441
|
+
menuWrapperNode && renderOverlayPortal(menuWrapperNode, overlay.target, !portal)
|
|
442
|
+
] }) });
|
|
443
|
+
};
|
|
444
|
+
ContextMenu.displayName = "ContextMenu";
|
|
445
|
+
ContextMenuMenu.displayName = "ContextMenuMenu";
|
|
446
|
+
ContextMenuItem.displayName = "ContextMenuItem";
|
|
447
|
+
ContextMenuSub.displayName = "ContextMenuSub";
|
|
448
|
+
var ContextMenu_default = ContextMenu;
|
|
449
|
+
|
|
450
|
+
export {
|
|
451
|
+
ContextMenuContext,
|
|
452
|
+
ContextMenuMenu,
|
|
453
|
+
ContextMenuItem,
|
|
454
|
+
ContextMenuSub,
|
|
455
|
+
ContextMenu,
|
|
456
|
+
ContextMenu_default
|
|
457
|
+
};
|
|
@@ -26,9 +26,10 @@ import {
|
|
|
26
26
|
tourFooterClasses,
|
|
27
27
|
tourIndicatorClasses,
|
|
28
28
|
tourCloseButtonClasses,
|
|
29
|
+
tourMaskClasses,
|
|
29
30
|
getTourTargetRect,
|
|
30
31
|
getTourPopoverPosition,
|
|
31
|
-
|
|
32
|
+
getTourMaskHoleStyle,
|
|
32
33
|
getActiveTourSteps,
|
|
33
34
|
getCurrentActiveTourStep,
|
|
34
35
|
getActiveTourStepPosition,
|
|
@@ -169,8 +170,16 @@ var Tour = ({
|
|
|
169
170
|
};
|
|
170
171
|
}
|
|
171
172
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
172
|
-
showMask &&
|
|
173
|
-
|
|
173
|
+
showMask && /* @__PURE__ */ jsx(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
className: tourMaskClasses,
|
|
177
|
+
"data-tiger-tour-mask": "",
|
|
178
|
+
"aria-hidden": "true",
|
|
179
|
+
style: targetRect ? getTourMaskHoleStyle(targetRect) : void 0,
|
|
180
|
+
onClick: close
|
|
181
|
+
}
|
|
182
|
+
),
|
|
174
183
|
/* @__PURE__ */ jsxs(
|
|
175
184
|
"div",
|
|
176
185
|
{
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useControlledState
|
|
3
|
+
} from "./chunk-MEFARVQI.mjs";
|
|
4
|
+
|
|
1
5
|
// src/components/Stepper.tsx
|
|
2
6
|
import { useEffect, useRef } from "react";
|
|
3
7
|
import {
|
|
@@ -13,7 +17,8 @@ import {
|
|
|
13
17
|
} from "@expcat/tigercat-core";
|
|
14
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
19
|
var Stepper = ({
|
|
16
|
-
value
|
|
20
|
+
value,
|
|
21
|
+
defaultValue,
|
|
17
22
|
min = -Infinity,
|
|
18
23
|
max = Infinity,
|
|
19
24
|
step = 1,
|
|
@@ -25,16 +30,17 @@ var Stepper = ({
|
|
|
25
30
|
decrementAriaLabel = "Decrease",
|
|
26
31
|
onChange
|
|
27
32
|
}) => {
|
|
33
|
+
const [currentValue, setCurrentValue] = useControlledState(value, defaultValue ?? 0, onChange);
|
|
28
34
|
const repeatControllerRef = useRef(createRafRepeatActionController());
|
|
29
|
-
const repeatValueRef = useRef(
|
|
35
|
+
const repeatValueRef = useRef(currentValue);
|
|
30
36
|
const suppressNextClickRef = useRef(false);
|
|
31
37
|
useEffect(() => () => repeatControllerRef.current.stop(), []);
|
|
32
38
|
function setValue(v) {
|
|
33
39
|
const clamped = clampStepperValue(v, min, max, precision);
|
|
34
|
-
|
|
40
|
+
setCurrentValue(clamped);
|
|
35
41
|
return clamped;
|
|
36
42
|
}
|
|
37
|
-
function stepBy(direction, baseValue =
|
|
43
|
+
function stepBy(direction, baseValue = currentValue) {
|
|
38
44
|
return setValue(direction === "up" ? baseValue + step : baseValue - step);
|
|
39
45
|
}
|
|
40
46
|
function handleStepClick(direction) {
|
|
@@ -48,10 +54,10 @@ var Stepper = ({
|
|
|
48
54
|
return (event) => {
|
|
49
55
|
event.preventDefault();
|
|
50
56
|
if (disabled) return;
|
|
51
|
-
if (direction === "down" &&
|
|
52
|
-
if (direction === "up" &&
|
|
57
|
+
if (direction === "down" && currentValue <= min) return;
|
|
58
|
+
if (direction === "up" && currentValue >= max) return;
|
|
53
59
|
suppressNextClickRef.current = true;
|
|
54
|
-
repeatValueRef.current =
|
|
60
|
+
repeatValueRef.current = currentValue;
|
|
55
61
|
repeatControllerRef.current.start(() => {
|
|
56
62
|
const baseValue = repeatValueRef.current;
|
|
57
63
|
const nextValue = stepBy(direction, baseValue);
|
|
@@ -65,8 +71,8 @@ var Stepper = ({
|
|
|
65
71
|
function stopStepRepeat() {
|
|
66
72
|
repeatControllerRef.current.stop();
|
|
67
73
|
}
|
|
68
|
-
const atMin =
|
|
69
|
-
const atMax =
|
|
74
|
+
const atMin = currentValue <= min;
|
|
75
|
+
const atMax = currentValue >= max;
|
|
70
76
|
const icon = (d) => /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", viewBox: stepperIconViewBox, fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d, fillRule: "evenodd", clipRule: "evenodd" }) });
|
|
71
77
|
return /* @__PURE__ */ jsxs("div", { className: classNames(stepperBaseClasses, className), role: "group", "aria-label": "Stepper", children: [
|
|
72
78
|
/* @__PURE__ */ jsx(
|
|
@@ -89,7 +95,7 @@ var Stepper = ({
|
|
|
89
95
|
{
|
|
90
96
|
type: "text",
|
|
91
97
|
className: getStepperInputClasses(size),
|
|
92
|
-
value: precision !== void 0 ?
|
|
98
|
+
value: precision !== void 0 ? currentValue.toFixed(precision) : String(currentValue),
|
|
93
99
|
disabled,
|
|
94
100
|
"aria-label": "Value",
|
|
95
101
|
onChange: (e) => {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// src/components/Kbd.tsx
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import {
|
|
4
|
+
formatKbdSeparatorText,
|
|
5
|
+
getKbdParts,
|
|
6
|
+
getKbdRootClasses,
|
|
7
|
+
kbdKeyClasses,
|
|
8
|
+
kbdSeparatorClasses
|
|
9
|
+
} from "@expcat/tigercat-core";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
function hasRenderableChildren(children) {
|
|
12
|
+
if (children == null || typeof children === "boolean") return false;
|
|
13
|
+
if (typeof children === "string" && children.length === 0) return false;
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
var Kbd = forwardRef(
|
|
17
|
+
({ keys, separator, size = "md", variant = "default", className, style, children, ...rest }, ref) => {
|
|
18
|
+
const parts = getKbdParts(keys, separator);
|
|
19
|
+
const hasChildren = hasRenderableChildren(children);
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
"kbd",
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
"data-kbd": "",
|
|
25
|
+
"data-kbd-size": size,
|
|
26
|
+
"data-kbd-variant": variant,
|
|
27
|
+
className: getKbdRootClasses({ size, variant, className }),
|
|
28
|
+
style,
|
|
29
|
+
...rest,
|
|
30
|
+
children: [
|
|
31
|
+
parts.map(
|
|
32
|
+
(part, index) => part.type === "separator" ? /* @__PURE__ */ jsx("span", { className: kbdSeparatorClasses, "data-kbd-separator": "", children: ` ${part.value} ` }, `sep-${index}`) : /* @__PURE__ */ jsx("kbd", { className: kbdKeyClasses, "data-kbd-key": "", children: part.value }, `key-${index}`)
|
|
33
|
+
),
|
|
34
|
+
hasChildren && parts.length > 0 ? /* @__PURE__ */ jsx("span", { className: kbdSeparatorClasses, "data-kbd-separator": "", children: formatKbdSeparatorText(separator) }) : null,
|
|
35
|
+
hasChildren ? children : null
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
Kbd.displayName = "Kbd";
|
|
42
|
+
var Kbd_default = Kbd;
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
Kbd,
|
|
46
|
+
Kbd_default
|
|
47
|
+
};
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
getAutoCompleteInputClasses,
|
|
16
16
|
getAutoCompleteOptionClasses,
|
|
17
17
|
filterAutoCompleteOptions,
|
|
18
|
+
resolveAutoCompleteDisplayValue,
|
|
18
19
|
getInitialPickerActiveIndex,
|
|
19
20
|
getPickerComboboxAria,
|
|
20
21
|
getPickerListboxAria,
|
|
@@ -87,7 +88,7 @@ var AutoComplete = (props) => {
|
|
|
87
88
|
const listboxId = `tiger-autocomplete-listbox-${instanceId}`;
|
|
88
89
|
const [isOpen, setIsOpen] = useState(false);
|
|
89
90
|
const [uncontrolledSearchValue, setUncontrolledSearchValue] = useState(
|
|
90
|
-
|
|
91
|
+
searchValue ?? resolveAutoCompleteDisplayValue(value, options, defaultSearchValue)
|
|
91
92
|
);
|
|
92
93
|
const inputValue = searchValue ?? uncontrolledSearchValue;
|
|
93
94
|
const [activeIndex, setActiveIndex] = useState(-1);
|
|
@@ -111,8 +112,8 @@ var AutoComplete = (props) => {
|
|
|
111
112
|
if (searchValue !== void 0) {
|
|
112
113
|
return;
|
|
113
114
|
}
|
|
114
|
-
setUncontrolledSearchValue(
|
|
115
|
-
}, [defaultSearchValue, searchValue, value]);
|
|
115
|
+
setUncontrolledSearchValue(resolveAutoCompleteDisplayValue(value, options, defaultSearchValue));
|
|
116
|
+
}, [defaultSearchValue, options, searchValue, value]);
|
|
116
117
|
const filteredOptions = useMemo(
|
|
117
118
|
() => filterAutoCompleteOptions(options, inputValue, filterOption),
|
|
118
119
|
[options, inputValue, filterOption]
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
getLoadingDotsWrapperClasses,
|
|
20
20
|
getLoadingTextClasses,
|
|
21
21
|
getSpinnerSVG,
|
|
22
|
+
DEFAULT_LOADING_BACKGROUND,
|
|
22
23
|
loadingContainerBaseClasses,
|
|
23
24
|
loadingFullscreenBaseClasses,
|
|
24
25
|
loadingColorClasses,
|
|
@@ -32,7 +33,7 @@ var Loading = ({
|
|
|
32
33
|
text,
|
|
33
34
|
fullscreen = false,
|
|
34
35
|
delay = 0,
|
|
35
|
-
background =
|
|
36
|
+
background = DEFAULT_LOADING_BACKGROUND,
|
|
36
37
|
customColor,
|
|
37
38
|
lockScroll = true,
|
|
38
39
|
className,
|