@ldkj/web-ui 0.18.0 → 0.19.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/LICENSE +21 -21
- package/components/interact/alert/Alert.d.ts +15 -1
- package/components/interact/drawer/Drawer.d.ts +19 -1
- package/components/interact/loading/Loading.d.ts +19 -3
- package/components/interact/progress/Progress.d.ts +9 -0
- package/components/interact/spin/Spin.d.ts +12 -2
- package/index.cjs +14 -14
- package/index.js +4025 -3681
- package/package.json +1 -1
- package/style.css +1 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 ldkj
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ldkj
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -5,5 +5,19 @@ export type AlertProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
5
5
|
variant?: AlertVariant;
|
|
6
6
|
title?: React.ReactNode;
|
|
7
7
|
description?: React.ReactNode;
|
|
8
|
+
/** Custom leading icon. Pass showIcon to use the built-in tone marker. */
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
/** Whether to render the leading icon area. */
|
|
11
|
+
showIcon?: boolean;
|
|
12
|
+
/** Optional trailing action, such as a retry button or detail link. */
|
|
13
|
+
action?: React.ReactNode;
|
|
14
|
+
/** Render a close button. */
|
|
15
|
+
closable?: boolean;
|
|
16
|
+
/** Controlled visibility. */
|
|
17
|
+
open?: boolean;
|
|
18
|
+
/** Fired after the close button is clicked. */
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
/** Controlled visibility callback. */
|
|
21
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
22
|
};
|
|
9
|
-
export declare function Alert(props: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function Alert(props: AlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export type
|
|
2
|
+
export type DrawerPlacement = "left" | "right" | "top" | "bottom";
|
|
3
|
+
export type DrawerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
4
|
open: boolean;
|
|
4
5
|
title?: React.ReactNode;
|
|
5
6
|
width?: number | string;
|
|
7
|
+
height?: number | string;
|
|
8
|
+
placement?: DrawerPlacement;
|
|
6
9
|
className?: string;
|
|
7
10
|
class?: string;
|
|
11
|
+
overlayClassName?: string;
|
|
12
|
+
bodyClassName?: string;
|
|
13
|
+
footer?: React.ReactNode;
|
|
8
14
|
children?: React.ReactNode;
|
|
9
15
|
onOpenChange?: (open: boolean) => void;
|
|
16
|
+
/** Enables slide/fade transitions. Set false when a test or host app needs instant state changes. */
|
|
17
|
+
animated?: boolean;
|
|
18
|
+
/** Transition duration in ms. */
|
|
19
|
+
animationDuration?: number;
|
|
20
|
+
/** Locks document scrolling while the drawer is open. */
|
|
21
|
+
lockScroll?: boolean;
|
|
22
|
+
/** Close when clicking the mask. */
|
|
23
|
+
maskClosable?: boolean;
|
|
24
|
+
/** Close when pressing Escape. */
|
|
25
|
+
closeOnEsc?: boolean;
|
|
26
|
+
/** Keep content mounted after close. */
|
|
27
|
+
destroyOnClose?: boolean;
|
|
10
28
|
};
|
|
11
29
|
export declare function Drawer(props: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type SpinProps } from "@/components/interact/spin";
|
|
3
|
+
export type LoadingVariant = "inline" | "block" | "overlay" | "fullscreen";
|
|
4
|
+
export type LoadingProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
/** Loading text. Set to null to hide text while keeping the spinner. */
|
|
6
|
+
text?: React.ReactNode;
|
|
7
|
+
/** Layout mode for inline hints, blocks, overlays, or full-screen masks. */
|
|
8
|
+
variant?: LoadingVariant;
|
|
9
|
+
/** Spinner size. Numbers are treated as px. */
|
|
10
|
+
size?: SpinProps["size"];
|
|
11
|
+
/** Spinner tone. */
|
|
12
|
+
tone?: SpinProps["tone"];
|
|
13
|
+
/** Set to false to hide loading state without unmounting wrapped children. */
|
|
14
|
+
spinning?: boolean;
|
|
15
|
+
/** Delay in ms before showing the loading indicator. */
|
|
16
|
+
delay?: number;
|
|
17
|
+
class?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function Loading(props: LoadingProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
export type ProgressType = "line" | "circle";
|
|
3
|
+
export type ProgressStatus = "normal" | "success" | "warning" | "exception";
|
|
2
4
|
export type ProgressProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
5
|
value?: number;
|
|
4
6
|
max?: number;
|
|
5
7
|
showInfo?: boolean;
|
|
8
|
+
type?: ProgressType;
|
|
9
|
+
status?: ProgressStatus;
|
|
10
|
+
size?: number;
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
strokeColor?: string;
|
|
13
|
+
trailColor?: string;
|
|
14
|
+
format?: (percent: number, value: number, max: number) => React.ReactNode;
|
|
6
15
|
class?: string;
|
|
7
16
|
};
|
|
8
17
|
export declare function Progress(props: ProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
export type SpinTone = "primary" | "muted" | "success" | "warning" | "danger";
|
|
2
3
|
export type SpinProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
3
|
-
size
|
|
4
|
+
/** Spinner size. Numbers are treated as px. */
|
|
5
|
+
size?: number | string;
|
|
6
|
+
/** Ring stroke width. Numbers are treated as px. */
|
|
7
|
+
strokeWidth?: number | string;
|
|
8
|
+
/** Color tone for the active ring segment. */
|
|
9
|
+
tone?: SpinTone;
|
|
10
|
+
/** Accessible label announced by screen readers. */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Set to false to suppress the spinner without branching in user code. */
|
|
13
|
+
spinning?: boolean;
|
|
4
14
|
class?: string;
|
|
5
15
|
};
|
|
6
|
-
export declare function Spin(props: SpinProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function Spin(props: SpinProps): import("react/jsx-runtime").JSX.Element | null;
|