asterui 0.12.14 → 0.12.16
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 +1 -1
- package/dist/components/Autocomplete.d.ts +22 -2
- package/dist/components/Button.d.ts +10 -5
- package/dist/components/Form.d.ts +11 -1
- package/dist/components/HoverGallery.d.ts +10 -0
- package/dist/components/Rating.d.ts +12 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +156 -154
- package/dist/index.js.map +1 -1
- package/dist/index100.js +11 -43
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +44 -11
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +10 -12
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +14 -7
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +7 -12
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +11 -29
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +29 -16
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +21 -0
- package/dist/index107.js.map +1 -0
- package/dist/index21.js +1 -1
- package/dist/index34.js +133 -119
- package/dist/index34.js.map +1 -1
- package/dist/index37.js +15 -120
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +119 -37
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +40 -398
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +390 -89
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +90 -215
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +211 -135
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +155 -15
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +15 -17
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +17 -21
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +18 -134
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +134 -10
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +13 -35
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +35 -34
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +161 -80
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +34 -81
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +71 -166
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +167 -144
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +152 -11
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +10 -20
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +22 -14
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +14 -7
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +6 -333
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +334 -47
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +47 -122
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +120 -108
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +107 -167
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +167 -29
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +30 -120
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +116 -80
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +85 -19
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +19 -73
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +71 -54
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +56 -44
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +42 -49
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +52 -62
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +118 -102
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +107 -41
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +41 -68
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +66 -19
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +18 -55
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +55 -251
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +254 -22
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +22 -31
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +30 -93
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +89 -324
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +322 -73
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +79 -39
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +40 -23
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +21 -93
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +87 -148
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +147 -152
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +159 -63
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +65 -35
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +35 -234
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +55 -53
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +231 -31
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +34 -210
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +195 -198
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +159 -241
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +283 -166
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +173 -253
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +258 -14
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +12 -31
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +32 -5
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +5 -13
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ export default function App() {
|
|
|
86
86
|
</Form.Item>
|
|
87
87
|
<Link size="sm">Forgot password?</Link>
|
|
88
88
|
</Space>
|
|
89
|
-
<Button
|
|
89
|
+
<Button color="primary" htmlType="submit" shape="block">
|
|
90
90
|
Sign In
|
|
91
91
|
</Button>
|
|
92
92
|
<Divider>or</Divider>
|
|
@@ -2,17 +2,37 @@ import { default as React } from 'react';
|
|
|
2
2
|
export interface AutocompleteOption {
|
|
3
3
|
value: string;
|
|
4
4
|
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export interface AutocompleteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
7
|
+
export interface AutocompleteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onSelect'> {
|
|
7
8
|
value?: string;
|
|
8
9
|
defaultValue?: string;
|
|
9
10
|
onChange?: (value: string) => void;
|
|
11
|
+
onSelect?: (value: string, option: AutocompleteOption) => void;
|
|
12
|
+
onSearch?: (value: string) => void;
|
|
10
13
|
options: AutocompleteOption[] | string[];
|
|
11
14
|
placeholder?: string;
|
|
12
15
|
disabled?: boolean;
|
|
13
|
-
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
16
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
17
|
+
color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
|
|
18
|
+
/** Validation status */
|
|
19
|
+
status?: 'error' | 'warning';
|
|
14
20
|
allowCustomValue?: boolean;
|
|
15
21
|
filterOption?: (option: AutocompleteOption, inputValue: string) => boolean;
|
|
16
22
|
notFoundContent?: React.ReactNode;
|
|
23
|
+
/** Show clear button when input has value */
|
|
24
|
+
allowClear?: boolean | {
|
|
25
|
+
clearIcon?: React.ReactNode;
|
|
26
|
+
};
|
|
27
|
+
/** Callback when clear button is clicked */
|
|
28
|
+
onClear?: () => void;
|
|
29
|
+
/** Controlled open state */
|
|
30
|
+
open?: boolean;
|
|
31
|
+
/** Default open state */
|
|
32
|
+
defaultOpen?: boolean;
|
|
33
|
+
/** Callback when open state changes */
|
|
34
|
+
onOpenChange?: (open: boolean) => void;
|
|
35
|
+
/** Activate first option by default */
|
|
36
|
+
defaultActiveFirstOption?: boolean;
|
|
17
37
|
}
|
|
18
38
|
export declare const Autocomplete: React.FC<AutocompleteProps>;
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
type BaseButtonProps = {
|
|
3
|
-
|
|
3
|
+
/** Button color */
|
|
4
|
+
color?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
5
|
+
/** Button style variant */
|
|
6
|
+
variant?: 'solid' | 'outline' | 'dash' | 'soft' | 'ghost' | 'link';
|
|
7
|
+
/** Button size */
|
|
4
8
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
-
|
|
6
|
-
dash?: boolean;
|
|
7
|
-
soft?: boolean;
|
|
9
|
+
/** Active/pressed visual state */
|
|
8
10
|
active?: boolean;
|
|
11
|
+
/** Show loading spinner and disable button */
|
|
9
12
|
loading?: boolean;
|
|
13
|
+
/** Button shape */
|
|
10
14
|
shape?: 'square' | 'circle' | 'wide' | 'block' | 'round';
|
|
15
|
+
/** Disable click animation */
|
|
11
16
|
noAnimation?: boolean;
|
|
12
17
|
/** Icon element to display */
|
|
13
18
|
icon?: React.ReactNode;
|
|
14
19
|
/** Position of the icon */
|
|
15
20
|
iconPosition?: 'start' | 'end';
|
|
16
|
-
/** Applies error/danger styling (shorthand for
|
|
21
|
+
/** Applies error/danger styling (shorthand for color="error") */
|
|
17
22
|
danger?: boolean;
|
|
18
23
|
/** Toggle button pressed state (sets aria-pressed) */
|
|
19
24
|
pressed?: boolean;
|
|
@@ -3,11 +3,21 @@ import { UseFormReturn, FieldValues, SubmitHandler, UseFormProps, FieldArrayPath
|
|
|
3
3
|
export interface FormProps<TFieldValues extends FieldValues = FieldValues> extends Omit<React.FormHTMLAttributes<HTMLFormElement>, 'onSubmit'> {
|
|
4
4
|
form?: UseFormReturn<TFieldValues>;
|
|
5
5
|
onFinish?: SubmitHandler<TFieldValues>;
|
|
6
|
+
/** Called when form validation fails */
|
|
7
|
+
onFinishFailed?: (errorInfo: {
|
|
8
|
+
values: TFieldValues;
|
|
9
|
+
errorFields: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
errors: string[];
|
|
12
|
+
}>;
|
|
13
|
+
}) => void;
|
|
6
14
|
initialValues?: UseFormProps<TFieldValues>['defaultValues'];
|
|
7
15
|
layout?: 'vertical' | 'horizontal' | 'inline';
|
|
8
16
|
/** Label width in pixels for horizontal layout (default: 80) */
|
|
9
17
|
labelWidth?: number;
|
|
10
18
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
19
|
+
/** Disable all form fields */
|
|
20
|
+
disabled?: boolean;
|
|
11
21
|
children: React.ReactNode;
|
|
12
22
|
}
|
|
13
23
|
export interface FormRule {
|
|
@@ -62,7 +72,7 @@ export interface FormListProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
62
72
|
move: (from: number, to: number) => void;
|
|
63
73
|
}) => React.ReactNode;
|
|
64
74
|
}
|
|
65
|
-
declare function FormRoot<TFieldValues extends FieldValues = FieldValues>({ form: externalForm, onFinish, initialValues, layout, labelWidth, size, children, className, noValidate, ...props }: FormProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
declare function FormRoot<TFieldValues extends FieldValues = FieldValues>({ form: externalForm, onFinish, onFinishFailed, initialValues, layout, labelWidth, size, disabled, children, className, noValidate, ...props }: FormProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
66
76
|
declare function FormItem({ name, label, help, required, rules, valuePropName, inline, className, children, tooltip, extra, hasFeedback, dependencies, validateTrigger, initialValue, hidden, }: FormItemProps): import("react/jsx-runtime").JSX.Element;
|
|
67
77
|
declare function FormList<TFieldValues extends FieldValues = FieldValues>({ name, children, }: FormListProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
68
78
|
export declare function useFormInstance<TFieldValues extends FieldValues = FieldValues>(): UseFormReturn<TFieldValues, any, TFieldValues> & {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface HoverGalleryProps {
|
|
3
|
+
/** Image sources (2-10 images) */
|
|
4
|
+
images: string[];
|
|
5
|
+
/** Alt text for images (optional, uses index if not provided) */
|
|
6
|
+
alts?: string[];
|
|
7
|
+
/** Additional CSS classes */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const HoverGallery: React.FC<HoverGalleryProps>;
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
3
|
-
children
|
|
3
|
+
children?: React.ReactNode;
|
|
4
4
|
value?: number;
|
|
5
5
|
defaultValue?: number;
|
|
6
6
|
onChange?: (value: number) => void;
|
|
7
|
+
onHoverChange?: (value: number) => void;
|
|
8
|
+
count?: number;
|
|
7
9
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
|
-
|
|
10
|
+
gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg';
|
|
11
|
+
color?: string;
|
|
12
|
+
mask?: 'star' | 'star-2' | 'heart';
|
|
13
|
+
allowClear?: boolean;
|
|
14
|
+
allowHalf?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
9
16
|
}
|
|
10
17
|
export interface RatingItemProps {
|
|
11
18
|
value: number;
|
|
12
19
|
mask?: 'star' | 'star-2' | 'heart';
|
|
13
20
|
color?: string;
|
|
14
21
|
hidden?: boolean;
|
|
22
|
+
half?: 'first' | 'second';
|
|
15
23
|
className?: string;
|
|
16
24
|
}
|
|
17
|
-
declare function RatingRoot({ children, value, defaultValue, onChange, size,
|
|
18
|
-
declare function RatingItem({ value, mask, color, hidden, className }: RatingItemProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function RatingRoot({ children, value, defaultValue, onChange, onHoverChange, count, size, gap, color, mask, allowClear, allowHalf, disabled, className, ...rest }: RatingProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function RatingItem({ value, mask, color, hidden, half, className }: RatingItemProps): import("react/jsx-runtime").JSX.Element;
|
|
19
27
|
export declare const Rating: typeof RatingRoot & {
|
|
20
28
|
Item: typeof RatingItem;
|
|
21
29
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ export { Grid, Row, Col } from './components/Grid';
|
|
|
68
68
|
export type { RowProps, ColProps } from './components/Grid';
|
|
69
69
|
export { Hero } from './components/Hero';
|
|
70
70
|
export type { HeroProps } from './components/Hero';
|
|
71
|
+
export { HoverGallery } from './components/HoverGallery';
|
|
72
|
+
export type { HoverGalleryProps } from './components/HoverGallery';
|
|
71
73
|
export { Image } from './components/Image';
|
|
72
74
|
export type { ImageProps } from './components/Image';
|
|
73
75
|
export { Indicator } from './components/Indicator';
|
package/dist/index.js
CHANGED
|
@@ -3,19 +3,19 @@ import { Anchor as p } from "./index3.js";
|
|
|
3
3
|
import { Alert as f } from "./index4.js";
|
|
4
4
|
import { Autocomplete as a } from "./index5.js";
|
|
5
5
|
import { Avatar as n, AvatarGroup as s } from "./index6.js";
|
|
6
|
-
import { Badge as
|
|
6
|
+
import { Badge as u } from "./index7.js";
|
|
7
7
|
import { Breadcrumb as c } from "./index8.js";
|
|
8
8
|
import { Button as T } from "./index9.js";
|
|
9
9
|
import { Checkbox as P } from "./index10.js";
|
|
10
10
|
import { Chat as b } from "./index11.js";
|
|
11
11
|
import { ColorPicker as D } from "./index12.js";
|
|
12
12
|
import { Card as w } from "./index13.js";
|
|
13
|
-
import { Cascader as
|
|
14
|
-
import { Chart as
|
|
13
|
+
import { Cascader as v } from "./index14.js";
|
|
14
|
+
import { Chart as R } from "./index15.js";
|
|
15
15
|
import { Carousel as A } from "./index16.js";
|
|
16
16
|
import { Collapse as L } from "./index17.js";
|
|
17
17
|
import { Container as H } from "./index18.js";
|
|
18
|
-
import { ContextMenu as
|
|
18
|
+
import { ContextMenu as K } from "./index19.js";
|
|
19
19
|
import { Countdown as O } from "./index20.js";
|
|
20
20
|
import { DatePicker as z } from "./index21.js";
|
|
21
21
|
import { Descriptions as J } from "./index22.js";
|
|
@@ -30,79 +30,80 @@ import { Filter as mo } from "./index30.js";
|
|
|
30
30
|
import { Flex as xo } from "./index31.js";
|
|
31
31
|
import { FloatButton as io } from "./index32.js";
|
|
32
32
|
import { Footer as so } from "./index33.js";
|
|
33
|
-
import { Form as
|
|
33
|
+
import { Form as uo, useFormInstance as co } from "./index34.js";
|
|
34
34
|
import { Col as To, Grid as go, Row as Po } from "./index35.js";
|
|
35
35
|
import { Hero as bo } from "./index36.js";
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
36
|
+
import { HoverGallery as Do } from "./index37.js";
|
|
37
|
+
import { Image as wo } from "./index38.js";
|
|
38
|
+
import { Indicator as vo } from "./index39.js";
|
|
39
|
+
import { Dropdown as Ro } from "./index40.js";
|
|
40
|
+
import { Empty as Ao } from "./index41.js";
|
|
41
|
+
import { Input as Lo } from "./index42.js";
|
|
42
|
+
import { InputNumber as Ho } from "./index43.js";
|
|
43
|
+
import { Join as Ko } from "./index44.js";
|
|
44
|
+
import { Kbd as Oo } from "./index45.js";
|
|
45
|
+
import { Label as zo } from "./index46.js";
|
|
46
|
+
import { Layout as Jo, useSiderContext as Qo } from "./index47.js";
|
|
47
|
+
import { List as jo } from "./index48.js";
|
|
48
|
+
import { Loading as Vo } from "./index49.js";
|
|
49
|
+
import { Mask as Yo } from "./index50.js";
|
|
50
|
+
import { Masonry as _o } from "./index51.js";
|
|
51
|
+
import { Mention as or } from "./index52.js";
|
|
52
|
+
import { Menu as er } from "./index53.js";
|
|
53
|
+
import { Browser as pr } from "./index54.js";
|
|
54
|
+
import { Code as fr } from "./index55.js";
|
|
55
|
+
import { Phone as ar } from "./index56.js";
|
|
56
|
+
import { Window as nr } from "./index57.js";
|
|
57
|
+
import { Modal as lr } from "./index58.js";
|
|
58
|
+
import { Navbar as dr } from "./index59.js";
|
|
59
|
+
import { notification as Cr } from "./index60.js";
|
|
60
|
+
import { OTPInput as gr } from "./index61.js";
|
|
61
|
+
import { Pagination as Sr } from "./index62.js";
|
|
62
|
+
import { PageLayout as kr } from "./index63.js";
|
|
63
|
+
import { Popconfirm as hr } from "./index64.js";
|
|
64
|
+
import { Popover as yr } from "./index65.js";
|
|
65
|
+
import { Progress as Fr } from "./index66.js";
|
|
66
|
+
import { QRCode as Ir } from "./index67.js";
|
|
67
|
+
import { Radio as Br } from "./index68.js";
|
|
68
|
+
import { RadialProgress as Mr } from "./index69.js";
|
|
69
|
+
import { Range as Gr } from "./index70.js";
|
|
70
|
+
import { Rating as Nr } from "./index71.js";
|
|
71
|
+
import { Result as Wr } from "./index72.js";
|
|
72
|
+
import { Select as Er } from "./index73.js";
|
|
73
|
+
import { Segmented as Qr } from "./index74.js";
|
|
74
|
+
import { Skeleton as jr } from "./index75.js";
|
|
75
|
+
import { Space as Vr } from "./index76.js";
|
|
76
|
+
import { Splitter as Yr } from "./index77.js";
|
|
77
|
+
import { Stats as _r } from "./index78.js";
|
|
78
|
+
import { Status as oe } from "./index79.js";
|
|
79
|
+
import { Steps as ee } from "./index80.js";
|
|
80
|
+
import { Table as pe } from "./index81.js";
|
|
81
|
+
import { Tabs as fe } from "./index82.js";
|
|
82
|
+
import { Textarea as ae } from "./index83.js";
|
|
83
|
+
import { TextRotate as ne } from "./index84.js";
|
|
84
|
+
import { CheckableTag as le, Tag as ue } from "./index85.js";
|
|
85
|
+
import { ThemeController as ce } from "./index86.js";
|
|
86
|
+
import { TimePicker as Te } from "./index87.js";
|
|
87
|
+
import { Timeline as Pe } from "./index88.js";
|
|
88
|
+
import { Toggle as be } from "./index89.js";
|
|
89
|
+
import { Tour as De } from "./index90.js";
|
|
90
|
+
import { Tooltip as we } from "./index91.js";
|
|
91
|
+
import { Transfer as ve } from "./index92.js";
|
|
92
|
+
import { Tree as Re } from "./index93.js";
|
|
93
|
+
import { TreeSelect as Ae } from "./index94.js";
|
|
94
|
+
import { Typography as Le } from "./index95.js";
|
|
95
|
+
import { Upload as He } from "./index96.js";
|
|
96
|
+
import { Hide as Ke, Show as Ne } from "./index97.js";
|
|
97
|
+
import { useBreakpoint as We } from "./index98.js";
|
|
98
|
+
import { useDisclosure as Ee } from "./index99.js";
|
|
99
|
+
import { useClipboard as Qe } from "./index100.js";
|
|
100
|
+
import { useLocalStorage as je } from "./index101.js";
|
|
101
|
+
import { useDebounce as Ve } from "./index102.js";
|
|
102
|
+
import { useClickOutside as Ye } from "./index103.js";
|
|
103
|
+
import { usePrevious as _e } from "./index104.js";
|
|
104
|
+
import { useHover as ot } from "./index105.js";
|
|
105
|
+
import { useKeyPress as et, useKeyPressCallback as tt } from "./index106.js";
|
|
106
|
+
import { useWindowSize as mt } from "./index107.js";
|
|
106
107
|
export {
|
|
107
108
|
e as Affix,
|
|
108
109
|
f as Alert,
|
|
@@ -110,23 +111,23 @@ export {
|
|
|
110
111
|
a as Autocomplete,
|
|
111
112
|
n as Avatar,
|
|
112
113
|
s as AvatarGroup,
|
|
113
|
-
|
|
114
|
+
u as Badge,
|
|
114
115
|
c as Breadcrumb,
|
|
115
|
-
|
|
116
|
+
pr as Browser,
|
|
116
117
|
T as Button,
|
|
117
118
|
w as Card,
|
|
118
119
|
A as Carousel,
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
v as Cascader,
|
|
121
|
+
R as Chart,
|
|
121
122
|
b as Chat,
|
|
122
|
-
|
|
123
|
+
le as CheckableTag,
|
|
123
124
|
P as Checkbox,
|
|
124
|
-
|
|
125
|
+
fr as Code,
|
|
125
126
|
To as Col,
|
|
126
127
|
L as Collapse,
|
|
127
128
|
D as ColorPicker,
|
|
128
129
|
H as Container,
|
|
129
|
-
|
|
130
|
+
K as ContextMenu,
|
|
130
131
|
O as Countdown,
|
|
131
132
|
z as DatePicker,
|
|
132
133
|
J as Descriptions,
|
|
@@ -134,88 +135,89 @@ export {
|
|
|
134
135
|
X as Divider,
|
|
135
136
|
q as Dock,
|
|
136
137
|
Z as Drawer,
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
Ro as Dropdown,
|
|
139
|
+
Ao as Empty,
|
|
139
140
|
ro as Fieldset,
|
|
140
141
|
to as FileInput,
|
|
141
142
|
mo as Filter,
|
|
142
143
|
xo as Flex,
|
|
143
144
|
io as FloatButton,
|
|
144
145
|
so as Footer,
|
|
145
|
-
|
|
146
|
+
uo as Form,
|
|
146
147
|
go as Grid,
|
|
147
148
|
bo as Hero,
|
|
148
|
-
|
|
149
|
-
Do as
|
|
150
|
-
wo as
|
|
151
|
-
|
|
152
|
-
Lo as
|
|
153
|
-
Ho as
|
|
154
|
-
|
|
155
|
-
Oo as
|
|
156
|
-
zo as
|
|
157
|
-
|
|
158
|
-
jo as
|
|
159
|
-
Vo as
|
|
160
|
-
Yo as
|
|
161
|
-
_o as
|
|
162
|
-
or as
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
hr as
|
|
171
|
-
yr as
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
Nr as
|
|
149
|
+
Ke as Hide,
|
|
150
|
+
Do as HoverGallery,
|
|
151
|
+
wo as Image,
|
|
152
|
+
vo as Indicator,
|
|
153
|
+
Lo as Input,
|
|
154
|
+
Ho as InputNumber,
|
|
155
|
+
Ko as Join,
|
|
156
|
+
Oo as Kbd,
|
|
157
|
+
zo as Label,
|
|
158
|
+
Jo as Layout,
|
|
159
|
+
jo as List,
|
|
160
|
+
Vo as Loading,
|
|
161
|
+
Yo as Mask,
|
|
162
|
+
_o as Masonry,
|
|
163
|
+
or as Mention,
|
|
164
|
+
er as Menu,
|
|
165
|
+
lr as Modal,
|
|
166
|
+
dr as Navbar,
|
|
167
|
+
gr as OTPInput,
|
|
168
|
+
kr as PageLayout,
|
|
169
|
+
Sr as Pagination,
|
|
170
|
+
ar as Phone,
|
|
171
|
+
hr as Popconfirm,
|
|
172
|
+
yr as Popover,
|
|
173
|
+
Fr as Progress,
|
|
174
|
+
Ir as QRCode,
|
|
175
|
+
Mr as RadialProgress,
|
|
176
|
+
Br as Radio,
|
|
177
|
+
Gr as Range,
|
|
178
|
+
Nr as Rating,
|
|
179
|
+
Wr as Result,
|
|
178
180
|
Po as Row,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
Qr as Segmented,
|
|
182
|
+
Er as Select,
|
|
183
|
+
Ne as Show,
|
|
182
184
|
$ as SidebarDrawer,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
185
|
+
jr as Skeleton,
|
|
186
|
+
Vr as Space,
|
|
187
|
+
Yr as Splitter,
|
|
188
|
+
_r as Stats,
|
|
189
|
+
oe as Status,
|
|
190
|
+
ee as Steps,
|
|
191
|
+
pe as Table,
|
|
192
|
+
fe as Tabs,
|
|
193
|
+
ue as Tag,
|
|
194
|
+
ne as TextRotate,
|
|
195
|
+
ae as Textarea,
|
|
196
|
+
ce as ThemeController,
|
|
197
|
+
Te as TimePicker,
|
|
198
|
+
Pe as Timeline,
|
|
199
|
+
be as Toggle,
|
|
200
|
+
we as Tooltip,
|
|
201
|
+
De as Tour,
|
|
202
|
+
ve as Transfer,
|
|
203
|
+
Re as Tree,
|
|
204
|
+
Ae as TreeSelect,
|
|
205
|
+
Le as Typography,
|
|
206
|
+
He as Upload,
|
|
207
|
+
nr as Window,
|
|
208
|
+
Cr as notification,
|
|
209
|
+
We as useBreakpoint,
|
|
210
|
+
Ye as useClickOutside,
|
|
211
|
+
Qe as useClipboard,
|
|
212
|
+
Ve as useDebounce,
|
|
213
|
+
Ee as useDisclosure,
|
|
212
214
|
co as useFormInstance,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
215
|
+
ot as useHover,
|
|
216
|
+
et as useKeyPress,
|
|
217
|
+
tt as useKeyPressCallback,
|
|
218
|
+
je as useLocalStorage,
|
|
219
|
+
_e as usePrevious,
|
|
220
|
+
Qo as useSiderContext,
|
|
221
|
+
mt as useWindowSize
|
|
220
222
|
};
|
|
221
223
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index100.js
CHANGED
|
@@ -1,49 +1,17 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
function
|
|
3
|
-
const [
|
|
4
|
-
if (typeof window > "u")
|
|
5
|
-
return t;
|
|
1
|
+
import { useState as a, useCallback as s } from "react";
|
|
2
|
+
function p(t = 2e3) {
|
|
3
|
+
const [n, r] = a(!1), [l, e] = a(null), c = s(async (i) => {
|
|
6
4
|
try {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return t;
|
|
5
|
+
return await navigator.clipboard.writeText(i), r(!0), e(null), setTimeout(() => r(!1), t), !0;
|
|
6
|
+
} catch (o) {
|
|
7
|
+
return e(o instanceof Error ? o : new Error("Failed to copy")), r(!1), !1;
|
|
11
8
|
}
|
|
12
|
-
}),
|
|
13
|
-
(e)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (typeof window < "u")
|
|
17
|
-
try {
|
|
18
|
-
window.localStorage.setItem(o, JSON.stringify(a));
|
|
19
|
-
} catch (l) {
|
|
20
|
-
console.warn(`Failed to save to localStorage key "${o}":`, l);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
[o]
|
|
26
|
-
), w = c(() => {
|
|
27
|
-
if (typeof window < "u")
|
|
28
|
-
try {
|
|
29
|
-
window.localStorage.removeItem(o);
|
|
30
|
-
} catch (e) {
|
|
31
|
-
console.warn(`Failed to remove localStorage key "${o}":`, e);
|
|
32
|
-
}
|
|
33
|
-
n(t);
|
|
34
|
-
}, [o, t]);
|
|
35
|
-
return f(() => {
|
|
36
|
-
const e = (r) => {
|
|
37
|
-
if (r.key === o && r.newValue !== null)
|
|
38
|
-
try {
|
|
39
|
-
n(JSON.parse(r.newValue));
|
|
40
|
-
} catch {
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
return window.addEventListener("storage", e), () => window.removeEventListener("storage", e);
|
|
44
|
-
}, [o]), [s, d, w];
|
|
9
|
+
}, [t]), u = s(() => {
|
|
10
|
+
r(!1), e(null);
|
|
11
|
+
}, []);
|
|
12
|
+
return { copy: c, copied: n, error: l, reset: u };
|
|
45
13
|
}
|
|
46
14
|
export {
|
|
47
|
-
|
|
15
|
+
p as useClipboard
|
|
48
16
|
};
|
|
49
17
|
//# sourceMappingURL=index100.js.map
|
package/dist/index100.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index100.js","sources":["../src/hooks/
|
|
1
|
+
{"version":3,"file":"index100.js","sources":["../src/hooks/useClipboard.ts"],"sourcesContent":["import { useState, useCallback } from 'react'\n\nexport interface UseClipboardReturn {\n copy: (text: string) => Promise<boolean>\n copied: boolean\n error: Error | null\n reset: () => void\n}\n\n/**\n * Hook for copying text to clipboard with success/error state.\n *\n * @param timeout - Duration in ms to show copied state (default: 2000)\n * @returns Object with copy function and state\n *\n * @example\n * const { copy, copied } = useClipboard()\n *\n * <Button onClick={() => copy('Hello!')}>\n * {copied ? 'Copied!' : 'Copy'}\n * </Button>\n */\nexport function useClipboard(timeout = 2000): UseClipboardReturn {\n const [copied, setCopied] = useState(false)\n const [error, setError] = useState<Error | null>(null)\n\n const copy = useCallback(async (text: string): Promise<boolean> => {\n try {\n await navigator.clipboard.writeText(text)\n setCopied(true)\n setError(null)\n\n setTimeout(() => setCopied(false), timeout)\n return true\n } catch (err) {\n setError(err instanceof Error ? err : new Error('Failed to copy'))\n setCopied(false)\n return false\n }\n }, [timeout])\n\n const reset = useCallback(() => {\n setCopied(false)\n setError(null)\n }, [])\n\n return { copy, copied, error, reset }\n}\n"],"names":["useClipboard","timeout","copied","setCopied","useState","error","setError","copy","useCallback","text","err","reset"],"mappings":";AAsBO,SAASA,EAAaC,IAAU,KAA0B;AAC/D,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC,CAACC,GAAOC,CAAQ,IAAIF,EAAuB,IAAI,GAE/CG,IAAOC,EAAY,OAAOC,MAAmC;AACjE,QAAI;AACF,mBAAM,UAAU,UAAU,UAAUA,CAAI,GACxCN,EAAU,EAAI,GACdG,EAAS,IAAI,GAEb,WAAW,MAAMH,EAAU,EAAK,GAAGF,CAAO,GACnC;AAAA,IACT,SAASS,GAAK;AACZ,aAAAJ,EAASI,aAAe,QAAQA,IAAM,IAAI,MAAM,gBAAgB,CAAC,GACjEP,EAAU,EAAK,GACR;AAAA,IACT;AAAA,EACF,GAAG,CAACF,CAAO,CAAC,GAENU,IAAQH,EAAY,MAAM;AAC9B,IAAAL,EAAU,EAAK,GACfG,EAAS,IAAI;AAAA,EACf,GAAG,CAAA,CAAE;AAEL,SAAO,EAAE,MAAAC,GAAM,QAAAL,GAAQ,OAAAG,GAAO,OAAAM,EAAA;AAChC;"}
|