@expcat/tigercat-react 2.0.4 → 2.1.0
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-2YOP55OF.mjs +639 -0
- package/dist/{chunk-V6P7ZK6O.mjs → chunk-7EMCZVJ2.mjs} +1 -1
- package/dist/chunk-EW43YBPV.mjs +457 -0
- package/dist/{chunk-QJE3MZBO.mjs → chunk-FSMJLJFL.mjs} +1 -1
- package/dist/{chunk-BOGOQ44C.mjs → chunk-GCY55TBC.mjs} +1 -1
- package/dist/chunk-GR3Y3XWP.mjs +47 -0
- package/dist/chunk-IGBQGR6G.mjs +234 -0
- package/dist/{chunk-D33BIMGK.mjs → chunk-IR7VA6AO.mjs} +11 -1
- package/dist/chunk-J76R2S62.mjs +161 -0
- package/dist/{chunk-2WGEHH5A.mjs → chunk-JQJM65RJ.mjs} +1 -1
- package/dist/{chunk-7AFRHC7P.mjs → chunk-KC55B62J.mjs} +127 -42
- package/dist/chunk-KRDHM5KB.mjs +259 -0
- package/dist/chunk-M5MZWOHF.mjs +180 -0
- package/dist/chunk-MFPVVGNA.mjs +248 -0
- package/dist/chunk-NLGLBTSM.mjs +138 -0
- package/dist/chunk-NT7GW2FD.mjs +40 -0
- package/dist/chunk-OKYMTHFQ.mjs +279 -0
- package/dist/{chunk-LBXNMCXN.mjs → chunk-OZ5XLR22.mjs} +6 -1
- package/dist/{chunk-HHIW7V7B.mjs → chunk-PFL4HNWM.mjs} +1 -8
- package/dist/chunk-RUAPTIQ7.mjs +181 -0
- package/dist/chunk-SEOG5AGS.mjs +72 -0
- package/dist/chunk-TQ6RIFWR.mjs +135 -0
- package/dist/chunk-U4M3DC2P.mjs +48 -0
- package/dist/{chunk-YIB6ZXZF.mjs → chunk-UETARXIK.mjs} +239 -52
- package/dist/chunk-XT43B7ZI.mjs +58 -0
- package/dist/components/ActivityFeed.mjs +1 -1
- package/dist/components/AreaChart.mjs +2 -2
- package/dist/components/AspectRatio.d.mts +10 -0
- package/dist/components/AspectRatio.mjs +8 -0
- package/dist/components/BarChart.mjs +2 -2
- package/dist/components/Cascader.mjs +1 -1
- package/dist/components/ChatWindow.mjs +1 -1
- package/dist/components/CodeEditor.mjs +1 -1
- package/dist/components/ContextMenu.d.mts +36 -0
- package/dist/components/ContextMenu.mjs +17 -0
- package/dist/components/DataExport.mjs +1 -1
- package/dist/components/DataTableWithToolbar.mjs +5 -5
- package/dist/components/Highlight.d.mts +11 -0
- package/dist/components/Highlight.mjs +8 -0
- package/dist/components/ImageCompare.d.mts +15 -0
- package/dist/components/ImageCompare.mjs +8 -0
- package/dist/components/InputOTP.d.mts +33 -0
- package/dist/components/InputOTP.mjs +12 -0
- package/dist/components/Kbd.d.mts +10 -0
- package/dist/components/Kbd.mjs +8 -0
- package/dist/components/LineChart.mjs +2 -2
- package/dist/components/List.mjs +2 -2
- 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 +3 -3
- 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/RadarChart.mjs +2 -2
- package/dist/components/ScatterChart.mjs +2 -2
- package/dist/components/ScrollArea.d.mts +10 -0
- package/dist/components/ScrollArea.mjs +8 -0
- package/dist/components/SplitButton.d.mts +38 -0
- package/dist/components/SplitButton.mjs +12 -0
- 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/TreeSelect.mjs +2 -1
- package/dist/index.d.mts +17 -1
- package/dist/index.mjs +356 -0
- package/package.json +117 -2
- package/dist/{chunk-NCHUEGUW.mjs → chunk-H6MVW5YD.mjs} +3 -3
- package/dist/{chunk-UT5BV2VO.mjs → chunk-I4MWOYJS.mjs} +3 -3
- package/dist/{chunk-E7OTDBI6.mjs → chunk-NWVNTZOP.mjs} +3 -3
- package/dist/{chunk-FYINJRYN.mjs → chunk-RQ4PUK6G.mjs} +3 -3
- package/dist/{chunk-KMP5CVNK.mjs → chunk-UKY2EPS3.mjs} +3 -3
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/components/LoadingBarContainer.tsx
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_LOADING_BAR_ARIA_LABEL,
|
|
4
|
+
DEFAULT_LOADING_BAR_COLOR,
|
|
5
|
+
DEFAULT_LOADING_BAR_HEIGHT,
|
|
6
|
+
getLoadingBarContainerClasses,
|
|
7
|
+
getLoadingBarFillClasses,
|
|
8
|
+
getLoadingBarFillStyle,
|
|
9
|
+
LOADING_BAR_CONTAINER_ID
|
|
10
|
+
} from "@expcat/tigercat-core";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var LoadingBarContainer = ({
|
|
13
|
+
percentage = 0,
|
|
14
|
+
status = "idle",
|
|
15
|
+
color = DEFAULT_LOADING_BAR_COLOR,
|
|
16
|
+
height = DEFAULT_LOADING_BAR_HEIGHT,
|
|
17
|
+
className,
|
|
18
|
+
style,
|
|
19
|
+
ariaLabel,
|
|
20
|
+
...rest
|
|
21
|
+
}) => {
|
|
22
|
+
const isBusy = status === "loading";
|
|
23
|
+
const resolvedAriaLabel = ariaLabel?.trim() || DEFAULT_LOADING_BAR_ARIA_LABEL;
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
...rest,
|
|
28
|
+
id: LOADING_BAR_CONTAINER_ID,
|
|
29
|
+
className: getLoadingBarContainerClasses(className),
|
|
30
|
+
style: { ...style, height: `${height}px` },
|
|
31
|
+
"data-tiger-loading-bar-container": "",
|
|
32
|
+
"data-tiger-loading-bar-status": status,
|
|
33
|
+
children: /* @__PURE__ */ jsx(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: getLoadingBarFillClasses(status, color),
|
|
37
|
+
style: getLoadingBarFillStyle(percentage, height),
|
|
38
|
+
role: "progressbar",
|
|
39
|
+
"aria-label": resolvedAriaLabel,
|
|
40
|
+
"aria-valuemin": 0,
|
|
41
|
+
"aria-valuemax": 100,
|
|
42
|
+
"aria-valuenow": Math.round(percentage),
|
|
43
|
+
"aria-busy": isBusy || void 0,
|
|
44
|
+
"aria-live": "polite",
|
|
45
|
+
"aria-atomic": "true",
|
|
46
|
+
"data-tiger-loading-bar": "",
|
|
47
|
+
"data-tiger-loading-bar-status": status
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
var LoadingBarContainer_default = LoadingBarContainer;
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
LoadingBarContainer,
|
|
57
|
+
LoadingBarContainer_default
|
|
58
|
+
};
|
|
@@ -8,9 +8,9 @@ import "../chunk-K4GIKSZE.mjs";
|
|
|
8
8
|
import "../chunk-7EXOY7GD.mjs";
|
|
9
9
|
import "../chunk-HLS4CHWX.mjs";
|
|
10
10
|
import "../chunk-IXV5YBCZ.mjs";
|
|
11
|
-
import "../chunk-HKAZXG74.mjs";
|
|
12
11
|
import "../chunk-OO562MFD.mjs";
|
|
13
12
|
import "../chunk-FPQMJFFM.mjs";
|
|
13
|
+
import "../chunk-HKAZXG74.mjs";
|
|
14
14
|
import "../chunk-YSIXURBW.mjs";
|
|
15
15
|
import "../chunk-TGXBCKOU.mjs";
|
|
16
16
|
export {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AreaChart,
|
|
3
3
|
AreaChart_default
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-RQ4PUK6G.mjs";
|
|
5
5
|
import "../chunk-DNOPEJ5I.mjs";
|
|
6
|
+
import "../chunk-SDLMB34Y.mjs";
|
|
6
7
|
import "../chunk-YORCCCQX.mjs";
|
|
7
8
|
import "../chunk-RQSQXQN6.mjs";
|
|
8
9
|
import "../chunk-DKNVSQSV.mjs";
|
|
9
10
|
import "../chunk-677VSTPW.mjs";
|
|
10
11
|
import "../chunk-F2ITBDUS.mjs";
|
|
11
|
-
import "../chunk-SDLMB34Y.mjs";
|
|
12
12
|
export {
|
|
13
13
|
AreaChart,
|
|
14
14
|
AreaChart_default as default
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { AspectRatioProps as AspectRatioProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface AspectRatioProps extends AspectRatioProps$1, Omit<React__default.HTMLAttributes<HTMLDivElement>, 'className'> {
|
|
5
|
+
/** Additional CSS classes */
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const AspectRatio: React__default.ForwardRefExoticComponent<AspectRatioProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
|
|
10
|
+
export { AspectRatio, type AspectRatioProps, AspectRatio as default };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BarChart,
|
|
3
3
|
BarChart_default
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-I4MWOYJS.mjs";
|
|
5
5
|
import "../chunk-DNOPEJ5I.mjs";
|
|
6
|
+
import "../chunk-SDLMB34Y.mjs";
|
|
6
7
|
import "../chunk-YORCCCQX.mjs";
|
|
7
8
|
import "../chunk-RQSQXQN6.mjs";
|
|
8
9
|
import "../chunk-DKNVSQSV.mjs";
|
|
9
10
|
import "../chunk-677VSTPW.mjs";
|
|
10
11
|
import "../chunk-F2ITBDUS.mjs";
|
|
11
|
-
import "../chunk-SDLMB34Y.mjs";
|
|
12
12
|
export {
|
|
13
13
|
BarChart,
|
|
14
14
|
BarChart_default as default
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "../chunk-PXRZ6CKY.mjs";
|
|
5
5
|
import "../chunk-Y5X3G2LD.mjs";
|
|
6
6
|
import "../chunk-F6WV53BS.mjs";
|
|
7
|
-
import "../chunk-W7BC4I2Y.mjs";
|
|
8
7
|
import "../chunk-F6T3OLTQ.mjs";
|
|
8
|
+
import "../chunk-W7BC4I2Y.mjs";
|
|
9
9
|
import "../chunk-UYJJLHVA.mjs";
|
|
10
10
|
import "../chunk-34VGG7AK.mjs";
|
|
11
11
|
import "../chunk-MEFARVQI.mjs";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { ContextMenuProps as ContextMenuProps$1, FloatingPlacement, ContextMenuItemProps as ContextMenuItemProps$1, ContextMenuMenuProps as ContextMenuMenuProps$1, ContextMenuSubProps as ContextMenuSubProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface ContextMenuContextValue {
|
|
5
|
+
closeOnClick: boolean;
|
|
6
|
+
handleItemClick: () => void;
|
|
7
|
+
portal: boolean;
|
|
8
|
+
open: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const ContextMenuContext: React__default.Context<ContextMenuContextValue | null>;
|
|
11
|
+
interface ContextMenuMenuProps extends Omit<ContextMenuMenuProps$1, 'style'>, Omit<React__default.HTMLAttributes<HTMLDivElement>, 'style'> {
|
|
12
|
+
style?: React__default.CSSProperties;
|
|
13
|
+
children?: React__default.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
declare const ContextMenuMenu: React__default.FC<ContextMenuMenuProps>;
|
|
16
|
+
interface ContextMenuItemProps extends Omit<ContextMenuItemProps$1, 'className' | 'key'>, Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'disabled'> {
|
|
17
|
+
className?: string;
|
|
18
|
+
onClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
19
|
+
children?: React__default.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare const ContextMenuItem: React__default.FC<ContextMenuItemProps>;
|
|
22
|
+
interface ContextMenuSubProps extends Omit<ContextMenuSubProps$1, 'className'> {
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: React__default.CSSProperties;
|
|
25
|
+
children?: React__default.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
declare const ContextMenuSub: React__default.FC<ContextMenuSubProps>;
|
|
28
|
+
interface ContextMenuProps extends Omit<ContextMenuProps$1, 'style'>, Omit<React__default.HTMLAttributes<HTMLDivElement>, 'style' | 'onContextMenu'> {
|
|
29
|
+
style?: React__default.CSSProperties;
|
|
30
|
+
placement?: FloatingPlacement;
|
|
31
|
+
onOpenChange?: (open: boolean) => void;
|
|
32
|
+
children?: React__default.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
declare const ContextMenu: React__default.FC<ContextMenuProps>;
|
|
35
|
+
|
|
36
|
+
export { ContextMenu, ContextMenuContext, type ContextMenuContextValue, ContextMenuItem, type ContextMenuItemProps, ContextMenuMenu, type ContextMenuMenuProps, type ContextMenuProps, ContextMenuSub, type ContextMenuSubProps, ContextMenu as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContextMenu,
|
|
3
|
+
ContextMenuContext,
|
|
4
|
+
ContextMenuItem,
|
|
5
|
+
ContextMenuMenu,
|
|
6
|
+
ContextMenuSub,
|
|
7
|
+
ContextMenu_default
|
|
8
|
+
} from "../chunk-EW43YBPV.mjs";
|
|
9
|
+
import "../chunk-HKAZXG74.mjs";
|
|
10
|
+
export {
|
|
11
|
+
ContextMenu,
|
|
12
|
+
ContextMenuContext,
|
|
13
|
+
ContextMenuItem,
|
|
14
|
+
ContextMenuMenu,
|
|
15
|
+
ContextMenuSub,
|
|
16
|
+
ContextMenu_default as default
|
|
17
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataTableWithToolbar,
|
|
3
3
|
DataTableWithToolbar_default
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-7EMCZVJ2.mjs";
|
|
5
|
+
import "../chunk-GCY55TBC.mjs";
|
|
6
6
|
import "../chunk-KVCI2346.mjs";
|
|
7
|
-
import "../chunk-HOYBHB7B.mjs";
|
|
8
7
|
import "../chunk-IIWUQK2P.mjs";
|
|
9
8
|
import "../chunk-AKNWUI7K.mjs";
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-HOYBHB7B.mjs";
|
|
10
|
+
import "../chunk-PFL4HNWM.mjs";
|
|
11
11
|
import "../chunk-ZG56T75O.mjs";
|
|
12
12
|
import "../chunk-F6WV53BS.mjs";
|
|
13
|
-
import "../chunk-W7BC4I2Y.mjs";
|
|
14
13
|
import "../chunk-F6T3OLTQ.mjs";
|
|
14
|
+
import "../chunk-W7BC4I2Y.mjs";
|
|
15
15
|
import "../chunk-34VGG7AK.mjs";
|
|
16
16
|
import "../chunk-EPWAROC2.mjs";
|
|
17
17
|
import "../chunk-OL3RXYMG.mjs";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { HighlightProps as HighlightProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface HighlightProps extends Omit<HighlightProps$1, 'style' | 'highlightStyle'>, Omit<React__default.ComponentPropsWithoutRef<'span'>, keyof HighlightProps$1> {
|
|
5
|
+
children?: React__default.ReactNode;
|
|
6
|
+
style?: React__default.CSSProperties;
|
|
7
|
+
highlightStyle?: React__default.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const Highlight: React__default.ForwardRefExoticComponent<HighlightProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
|
|
11
|
+
export { Highlight, type HighlightProps, Highlight as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { ImageCompareProps as ImageCompareProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface ImageCompareProps extends Omit<ImageCompareProps$1, 'style'>, Omit<React__default.ComponentPropsWithoutRef<'div'>, keyof ImageCompareProps$1 | 'onChange'> {
|
|
5
|
+
/** Before pane content. Takes precedence over `beforeSrc`. */
|
|
6
|
+
before?: React__default.ReactNode;
|
|
7
|
+
/** After pane content. Takes precedence over `afterSrc`. */
|
|
8
|
+
after?: React__default.ReactNode;
|
|
9
|
+
style?: React__default.CSSProperties;
|
|
10
|
+
/** Called when the handle position changes */
|
|
11
|
+
onChange?: (position: number) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const ImageCompare: React__default.ForwardRefExoticComponent<ImageCompareProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
|
|
15
|
+
export { ImageCompare, type ImageCompareProps, ImageCompare as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { InputOTPProps as InputOTPProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface InputOTPProps extends InputOTPProps$1, Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur' | 'defaultValue' | 'id'> {
|
|
5
|
+
/**
|
|
6
|
+
* Additional CSS classes
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Internal shake trigger counter (used by FormItem)
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_shakeTrigger?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Change event handler, called with the joined value
|
|
16
|
+
*/
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Called when every slot is filled, with the complete value
|
|
20
|
+
*/
|
|
21
|
+
onComplete?: (value: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Focus event handler (fires when focus enters the group)
|
|
24
|
+
*/
|
|
25
|
+
onFocus?: (event: React__default.FocusEvent<HTMLDivElement>) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Blur event handler (fires when focus leaves the group)
|
|
28
|
+
*/
|
|
29
|
+
onBlur?: (event: React__default.FocusEvent<HTMLDivElement>) => void;
|
|
30
|
+
}
|
|
31
|
+
declare const InputOTP: React__default.FC<InputOTPProps>;
|
|
32
|
+
|
|
33
|
+
export { InputOTP, type InputOTPProps, InputOTP as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
InputOTP,
|
|
3
|
+
InputOTP_default
|
|
4
|
+
} from "../chunk-IGBQGR6G.mjs";
|
|
5
|
+
import "../chunk-F6T3OLTQ.mjs";
|
|
6
|
+
import "../chunk-MEFARVQI.mjs";
|
|
7
|
+
import "../chunk-YSIXURBW.mjs";
|
|
8
|
+
import "../chunk-TGXBCKOU.mjs";
|
|
9
|
+
export {
|
|
10
|
+
InputOTP,
|
|
11
|
+
InputOTP_default as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { KbdProps as KbdProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface KbdProps extends Omit<KbdProps$1, 'style'>, Omit<React__default.ComponentPropsWithoutRef<'kbd'>, keyof KbdProps$1> {
|
|
5
|
+
children?: React__default.ReactNode;
|
|
6
|
+
style?: React__default.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
declare const Kbd: React__default.ForwardRefExoticComponent<KbdProps & React__default.RefAttributes<HTMLElement>>;
|
|
9
|
+
|
|
10
|
+
export { Kbd, type KbdProps, Kbd as default };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LineChart,
|
|
3
3
|
LineChart_default
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-H6MVW5YD.mjs";
|
|
5
5
|
import "../chunk-DNOPEJ5I.mjs";
|
|
6
|
+
import "../chunk-SDLMB34Y.mjs";
|
|
6
7
|
import "../chunk-YORCCCQX.mjs";
|
|
7
8
|
import "../chunk-RQSQXQN6.mjs";
|
|
8
9
|
import "../chunk-DKNVSQSV.mjs";
|
|
9
10
|
import "../chunk-677VSTPW.mjs";
|
|
10
11
|
import "../chunk-F2ITBDUS.mjs";
|
|
11
|
-
import "../chunk-SDLMB34Y.mjs";
|
|
12
12
|
export {
|
|
13
13
|
LineChart,
|
|
14
14
|
LineChart_default as default
|
package/dist/components/List.mjs
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LoadingBarApi, LoadingBarOptions } from '@expcat/tigercat-core';
|
|
2
|
+
export { LoadingBarContainer, LoadingBarContainerProps } from './LoadingBarContainer.mjs';
|
|
3
|
+
import 'react';
|
|
4
|
+
|
|
5
|
+
type LoadingBarProps = LoadingBarOptions;
|
|
6
|
+
declare const LoadingBar: LoadingBarApi;
|
|
7
|
+
|
|
8
|
+
export { LoadingBar, type LoadingBarProps, LoadingBar as default };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LoadingBarContainer
|
|
3
|
+
} from "../chunk-XT43B7ZI.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getGlobalTigerLocale
|
|
6
|
+
} from "../chunk-TGXBCKOU.mjs";
|
|
7
|
+
|
|
8
|
+
// src/components/LoadingBar.tsx
|
|
9
|
+
import { useEffect, useState } from "react";
|
|
10
|
+
import { flushSync } from "react-dom";
|
|
11
|
+
import { createRoot } from "react-dom/client";
|
|
12
|
+
import {
|
|
13
|
+
createLoadingBarController,
|
|
14
|
+
isBrowser,
|
|
15
|
+
LOADING_BAR_CONTAINER_ROOT_ID,
|
|
16
|
+
resolveLoadingBarMountTarget
|
|
17
|
+
} from "@expcat/tigercat-core";
|
|
18
|
+
import { jsx } from "react/jsx-runtime";
|
|
19
|
+
var containerRoot = null;
|
|
20
|
+
var updateCallback = null;
|
|
21
|
+
var controller = null;
|
|
22
|
+
function getDefaultAriaLabel() {
|
|
23
|
+
return getGlobalTigerLocale()?.common?.loadingText;
|
|
24
|
+
}
|
|
25
|
+
function getController() {
|
|
26
|
+
if (!controller) {
|
|
27
|
+
controller = createLoadingBarController();
|
|
28
|
+
controller.subscribe(() => {
|
|
29
|
+
updateCallback?.();
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return controller;
|
|
33
|
+
}
|
|
34
|
+
var LoadingBarHost = () => {
|
|
35
|
+
const [state, setState] = useState(() => getController().getState());
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
updateCallback = () => {
|
|
38
|
+
setState(getController().getState());
|
|
39
|
+
};
|
|
40
|
+
setState(getController().getState());
|
|
41
|
+
return () => {
|
|
42
|
+
updateCallback = null;
|
|
43
|
+
};
|
|
44
|
+
}, []);
|
|
45
|
+
if (!state.visible) return null;
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
LoadingBarContainer,
|
|
48
|
+
{
|
|
49
|
+
percentage: state.percentage,
|
|
50
|
+
status: state.status,
|
|
51
|
+
color: state.color,
|
|
52
|
+
height: state.height,
|
|
53
|
+
className: state.className,
|
|
54
|
+
style: state.style,
|
|
55
|
+
ariaLabel: state.ariaLabel
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
function ensureContainer(container) {
|
|
60
|
+
if (!isBrowser()) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const existingRootEl = document.getElementById(LOADING_BAR_CONTAINER_ROOT_ID);
|
|
64
|
+
if (containerRoot && !existingRootEl) {
|
|
65
|
+
containerRoot = null;
|
|
66
|
+
updateCallback = null;
|
|
67
|
+
}
|
|
68
|
+
if (containerRoot) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
let rootEl = existingRootEl;
|
|
72
|
+
if (!rootEl) {
|
|
73
|
+
rootEl = document.createElement("div");
|
|
74
|
+
rootEl.id = LOADING_BAR_CONTAINER_ROOT_ID;
|
|
75
|
+
const mountTarget = resolveLoadingBarMountTarget(container) ?? document.body;
|
|
76
|
+
mountTarget.appendChild(rootEl);
|
|
77
|
+
}
|
|
78
|
+
containerRoot = createRoot(rootEl);
|
|
79
|
+
flushSync(() => {
|
|
80
|
+
containerRoot?.render(/* @__PURE__ */ jsx(LoadingBarHost, {}));
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function teardownContainer() {
|
|
84
|
+
if (containerRoot) {
|
|
85
|
+
containerRoot.unmount();
|
|
86
|
+
containerRoot = null;
|
|
87
|
+
}
|
|
88
|
+
updateCallback = null;
|
|
89
|
+
if (isBrowser()) {
|
|
90
|
+
const rootEl = document.getElementById(LOADING_BAR_CONTAINER_ROOT_ID);
|
|
91
|
+
if (rootEl?.parentNode) {
|
|
92
|
+
rootEl.parentNode.removeChild(rootEl);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function withAriaLabel(options) {
|
|
97
|
+
if (options?.ariaLabel) return options;
|
|
98
|
+
const localeLabel = getDefaultAriaLabel();
|
|
99
|
+
if (!localeLabel && !options) return options;
|
|
100
|
+
return { ...options, ariaLabel: options?.ariaLabel ?? localeLabel };
|
|
101
|
+
}
|
|
102
|
+
var LoadingBar = {
|
|
103
|
+
start(options) {
|
|
104
|
+
const resolved = withAriaLabel(options);
|
|
105
|
+
const shouldUpdateExistingContainer = isBrowser() && containerRoot !== null && document.getElementById(LOADING_BAR_CONTAINER_ROOT_ID) !== null;
|
|
106
|
+
getController().start(resolved);
|
|
107
|
+
ensureContainer(resolved?.container);
|
|
108
|
+
if (shouldUpdateExistingContainer && updateCallback) {
|
|
109
|
+
updateCallback();
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
finish() {
|
|
113
|
+
getController().finish();
|
|
114
|
+
if (updateCallback) {
|
|
115
|
+
updateCallback();
|
|
116
|
+
} else if (getController().getState().visible) {
|
|
117
|
+
ensureContainer();
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
error() {
|
|
121
|
+
getController().error();
|
|
122
|
+
if (updateCallback) {
|
|
123
|
+
updateCallback();
|
|
124
|
+
} else {
|
|
125
|
+
ensureContainer();
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
clear() {
|
|
129
|
+
getController().clear();
|
|
130
|
+
teardownContainer();
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
var LoadingBar_default = LoadingBar;
|
|
134
|
+
export {
|
|
135
|
+
LoadingBar,
|
|
136
|
+
LoadingBarContainer,
|
|
137
|
+
LoadingBar_default as default
|
|
138
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { LoadingBarContainerProps as LoadingBarContainerProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface LoadingBarContainerProps extends LoadingBarContainerProps$1, Omit<React__default.HTMLAttributes<HTMLDivElement>, keyof LoadingBarContainerProps$1> {
|
|
5
|
+
}
|
|
6
|
+
declare const LoadingBarContainer: React__default.FC<LoadingBarContainerProps>;
|
|
7
|
+
|
|
8
|
+
export { LoadingBarContainer, type LoadingBarContainerProps, LoadingBarContainer as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { MarqueeProps as MarqueeProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface MarqueeProps extends Omit<MarqueeProps$1, 'style'>, Omit<React__default.ComponentPropsWithoutRef<'div'>, keyof MarqueeProps$1> {
|
|
5
|
+
children?: React__default.ReactNode;
|
|
6
|
+
style?: React__default.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
declare const Marquee: React__default.ForwardRefExoticComponent<MarqueeProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
|
|
10
|
+
export { Marquee, type MarqueeProps, Marquee as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { MaskInputProps as MaskInputProps$1, MaskInputChangeDetail } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface MaskInputProps extends MaskInputProps$1, Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size' | 'value' | 'defaultValue' | 'autoComplete' | 'onChange' | 'onInput' | 'onFocus' | 'onBlur' | 'readOnly'> {
|
|
5
|
+
/**
|
|
6
|
+
* Additional CSS classes
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Internal shake trigger counter (used by FormItem)
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_shakeTrigger?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Change event handler, called with the raw (unmasked) value and detail
|
|
16
|
+
*/
|
|
17
|
+
onChange?: (value: string, detail: MaskInputChangeDetail) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Called when every token slot is filled
|
|
20
|
+
*/
|
|
21
|
+
onComplete?: (value: string, maskedValue: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Focus event handler
|
|
24
|
+
*/
|
|
25
|
+
onFocus?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Blur event handler
|
|
28
|
+
*/
|
|
29
|
+
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Clear event handler
|
|
32
|
+
*/
|
|
33
|
+
onClear?: () => void;
|
|
34
|
+
}
|
|
35
|
+
declare const MaskInput: React__default.FC<MaskInputProps>;
|
|
36
|
+
|
|
37
|
+
export { MaskInput, type MaskInputProps, MaskInput as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { MasonryProps as MasonryProps$1, MasonryLayoutDetail, MasonryInstance } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface MasonryProps extends MasonryProps$1, Omit<React__default.HTMLAttributes<HTMLDivElement>, 'className'> {
|
|
5
|
+
/** Fired after the layout is (re)computed */
|
|
6
|
+
onLayout?: (detail: MasonryLayoutDetail) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Masonry: React__default.ForwardRefExoticComponent<MasonryProps & React__default.RefAttributes<MasonryInstance>>;
|
|
9
|
+
|
|
10
|
+
export { Masonry, type MasonryProps, Masonry as default };
|