asterui 0.12.24 → 0.12.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Card.d.ts +24 -7
- package/dist/components/Cascader.d.ts +2 -0
- package/dist/components/Tag.d.ts +22 -6
- package/dist/components/Tree.d.ts +2 -0
- package/dist/components/TreeSelect.d.ts +35 -4
- package/dist/index.d.ts +5 -5
- package/dist/index.js +76 -74
- package/dist/index11.js +55 -55
- package/dist/index11.js.map +1 -1
- package/dist/index13.js +39 -39
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +192 -107
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +1 -1
- package/dist/index15.js.map +1 -1
- package/dist/index30.js +9 -8
- package/dist/index30.js.map +1 -1
- package/dist/index35.js +35 -36
- package/dist/index35.js.map +1 -1
- package/dist/index43.js +19 -20
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +6 -7
- package/dist/index44.js.map +1 -1
- package/dist/index5.js +9 -9
- package/dist/index5.js.map +1 -1
- package/dist/index61.js +7 -7
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +10 -10
- package/dist/index62.js.map +1 -1
- package/dist/index85.js +204 -92
- package/dist/index85.js.map +1 -1
- package/dist/index92.js +1 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +478 -385
- package/dist/index94.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
export type CardSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type CardVariant = 'default' | 'border' | 'dash' | 'borderless';
|
|
4
|
+
export interface CardTabItem {
|
|
5
|
+
key: string;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
2
9
|
export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
10
|
children?: React.ReactNode;
|
|
4
11
|
title?: React.ReactNode;
|
|
@@ -6,8 +13,13 @@ export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 't
|
|
|
6
13
|
extra?: React.ReactNode;
|
|
7
14
|
cover?: React.ReactNode;
|
|
8
15
|
actions?: React.ReactNode;
|
|
9
|
-
size?:
|
|
16
|
+
size?: CardSize;
|
|
17
|
+
/** @deprecated Use variant instead */
|
|
10
18
|
bordered?: boolean;
|
|
19
|
+
/** Card style variant */
|
|
20
|
+
variant?: CardVariant;
|
|
21
|
+
/** Inner card style (nested cards) */
|
|
22
|
+
type?: 'inner';
|
|
11
23
|
side?: boolean;
|
|
12
24
|
imageFull?: boolean;
|
|
13
25
|
actionsJustify?: 'start' | 'center' | 'end';
|
|
@@ -15,6 +27,12 @@ export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 't
|
|
|
15
27
|
hoverable?: boolean;
|
|
16
28
|
avatar?: React.ReactNode;
|
|
17
29
|
description?: React.ReactNode;
|
|
30
|
+
tabList?: CardTabItem[];
|
|
31
|
+
activeTabKey?: string;
|
|
32
|
+
defaultActiveTabKey?: string;
|
|
33
|
+
onTabChange?: (key: string) => void;
|
|
34
|
+
tabBarExtraContent?: React.ReactNode;
|
|
35
|
+
'data-testid'?: string;
|
|
18
36
|
}
|
|
19
37
|
export interface CardMetaProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
20
38
|
/** Avatar or icon element */
|
|
@@ -23,16 +41,15 @@ export interface CardMetaProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
23
41
|
title?: React.ReactNode;
|
|
24
42
|
/** Description content */
|
|
25
43
|
description?: React.ReactNode;
|
|
44
|
+
'data-testid'?: string;
|
|
26
45
|
}
|
|
27
46
|
export interface CardGridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
28
47
|
children: React.ReactNode;
|
|
29
48
|
hoverable?: boolean;
|
|
49
|
+
'data-testid'?: string;
|
|
30
50
|
}
|
|
31
|
-
declare
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export declare const Card: typeof CardRoot & {
|
|
35
|
-
Grid: typeof CardGrid;
|
|
36
|
-
Meta: typeof CardMeta;
|
|
51
|
+
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> & {
|
|
52
|
+
Grid: React.ForwardRefExoticComponent<CardGridProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
Meta: React.ForwardRefExoticComponent<CardMetaProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
54
|
};
|
|
38
55
|
export default Card;
|
|
@@ -65,5 +65,7 @@ export interface CascaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
65
65
|
maxTagCount?: number | 'responsive';
|
|
66
66
|
/** Accessible label */
|
|
67
67
|
'aria-label'?: string;
|
|
68
|
+
/** Test ID for the component */
|
|
69
|
+
'data-testid'?: string;
|
|
68
70
|
}
|
|
69
71
|
export declare const Cascader: React.ForwardRefExoticComponent<CascaderProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/components/Tag.d.ts
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TagSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type TagColor = 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error' | 'ghost';
|
|
4
|
+
export type TagVariant = 'filled' | 'outlined' | 'soft' | 'dash';
|
|
5
|
+
export interface TagProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'> {
|
|
3
6
|
closable?: boolean;
|
|
4
7
|
closeIcon?: React.ReactNode;
|
|
5
8
|
onClose?: () => void;
|
|
6
|
-
color?: string;
|
|
9
|
+
color?: TagColor | string;
|
|
7
10
|
icon?: React.ReactNode;
|
|
8
|
-
size?:
|
|
11
|
+
size?: TagSize;
|
|
12
|
+
variant?: TagVariant;
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
href?: string;
|
|
16
|
+
target?: string;
|
|
9
17
|
children?: React.ReactNode;
|
|
18
|
+
'data-testid'?: string;
|
|
19
|
+
'aria-label'?: string;
|
|
10
20
|
}
|
|
11
|
-
export interface CheckableTagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'onChange'> {
|
|
21
|
+
export interface CheckableTagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'onChange' | 'color'> {
|
|
12
22
|
checked?: boolean;
|
|
13
23
|
onChange?: (checked: boolean) => void;
|
|
14
24
|
icon?: React.ReactNode;
|
|
25
|
+
size?: TagSize;
|
|
26
|
+
color?: TagColor;
|
|
27
|
+
disabled?: boolean;
|
|
15
28
|
children?: React.ReactNode;
|
|
29
|
+
'data-testid'?: string;
|
|
16
30
|
}
|
|
17
|
-
|
|
18
|
-
export declare const
|
|
31
|
+
declare const TagLiveRegion: React.FC;
|
|
32
|
+
export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLElement>>;
|
|
33
|
+
export declare const CheckableTag: React.ForwardRefExoticComponent<CheckableTagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
34
|
+
export { TagLiveRegion };
|
|
@@ -85,6 +85,8 @@ export interface TreeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
85
85
|
title?: string;
|
|
86
86
|
children?: string;
|
|
87
87
|
};
|
|
88
|
+
/** Test ID for the component */
|
|
89
|
+
'data-testid'?: string;
|
|
88
90
|
}
|
|
89
91
|
export interface TreeNodeProps {
|
|
90
92
|
/** Unique key for the node (uses React's key prop) */
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TreeDataNode } from './Tree';
|
|
3
3
|
export type TreeSelectSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
-
export type TreeSelectColor = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
|
|
4
|
+
export type TreeSelectColor = 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error';
|
|
5
5
|
export type TreeSelectStatus = 'error' | 'warning';
|
|
6
|
+
export type TreeSelectVariant = 'outlined' | 'filled' | 'borderless';
|
|
6
7
|
export type ShowCheckedStrategy = 'SHOW_ALL' | 'SHOW_PARENT' | 'SHOW_CHILD';
|
|
7
8
|
export interface TreeSelectFieldNames {
|
|
8
9
|
label?: string;
|
|
9
10
|
value?: string;
|
|
10
11
|
children?: string;
|
|
11
12
|
}
|
|
13
|
+
/** Value type when labelInValue is true */
|
|
14
|
+
export interface LabeledValue {
|
|
15
|
+
value: string;
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
}
|
|
12
18
|
export interface TreeSelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
13
19
|
treeData: TreeDataNode[];
|
|
14
|
-
value?: string | string[];
|
|
15
|
-
defaultValue?: string | string[];
|
|
16
|
-
onChange?: (value: string | string[], labels: React.ReactNode[]
|
|
20
|
+
value?: string | string[] | LabeledValue | LabeledValue[];
|
|
21
|
+
defaultValue?: string | string[] | LabeledValue | LabeledValue[];
|
|
22
|
+
onChange?: (value: string | string[] | LabeledValue | LabeledValue[], labels: React.ReactNode[], extra?: {
|
|
23
|
+
triggerValue: string;
|
|
24
|
+
triggerNode: TreeDataNode;
|
|
25
|
+
}) => void;
|
|
17
26
|
multiple?: boolean;
|
|
18
27
|
treeCheckable?: boolean;
|
|
19
28
|
treeCheckStrictly?: boolean;
|
|
@@ -32,10 +41,26 @@ export interface TreeSelectProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
32
41
|
size?: TreeSelectSize;
|
|
33
42
|
color?: TreeSelectColor;
|
|
34
43
|
status?: TreeSelectStatus;
|
|
44
|
+
/** Visual variant style */
|
|
45
|
+
variant?: TreeSelectVariant;
|
|
46
|
+
/** Ghost style with no background */
|
|
47
|
+
ghost?: boolean;
|
|
48
|
+
/** Maximum number of tags to show (multiple/treeCheckable mode) */
|
|
35
49
|
maxTagCount?: number | 'responsive';
|
|
36
50
|
maxTagPlaceholder?: React.ReactNode | ((omittedValues: string[]) => React.ReactNode);
|
|
51
|
+
/** Maximum number of selections allowed */
|
|
52
|
+
maxCount?: number;
|
|
53
|
+
/** Return object with value and label instead of just value */
|
|
37
54
|
labelInValue?: boolean;
|
|
55
|
+
/** Custom tag render function */
|
|
56
|
+
tagRender?: (props: {
|
|
57
|
+
label: React.ReactNode;
|
|
58
|
+
value: string;
|
|
59
|
+
closable: boolean;
|
|
60
|
+
onClose: () => void;
|
|
61
|
+
}) => React.ReactNode;
|
|
38
62
|
treeLine?: boolean;
|
|
63
|
+
/** Show tree node icon */
|
|
39
64
|
treeIcon?: boolean;
|
|
40
65
|
loadData?: (node: TreeDataNode) => Promise<void>;
|
|
41
66
|
fieldNames?: TreeSelectFieldNames;
|
|
@@ -51,3 +76,9 @@ export interface TreeSelectProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
51
76
|
'data-testid'?: string;
|
|
52
77
|
}
|
|
53
78
|
export declare const TreeSelect: React.ForwardRefExoticComponent<TreeSelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
79
|
+
export declare const TreeSelectComponent: React.ForwardRefExoticComponent<TreeSelectProps & React.RefAttributes<HTMLDivElement>> & {
|
|
80
|
+
SHOW_ALL: "SHOW_ALL";
|
|
81
|
+
SHOW_PARENT: "SHOW_PARENT";
|
|
82
|
+
SHOW_CHILD: "SHOW_CHILD";
|
|
83
|
+
};
|
|
84
|
+
export { TreeSelectComponent as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type { ChatProps } from './components/Chat';
|
|
|
23
23
|
export { ColorPicker } from './components/ColorPicker';
|
|
24
24
|
export type { ColorPickerProps } from './components/ColorPicker';
|
|
25
25
|
export { Card } from './components/Card';
|
|
26
|
-
export type { CardProps, CardGridProps } from './components/Card';
|
|
26
|
+
export type { CardProps, CardGridProps, CardMetaProps, CardSize, CardVariant, CardTabItem } from './components/Card';
|
|
27
27
|
export { Cascader } from './components/Cascader';
|
|
28
28
|
export type { CascaderProps, CascaderOption } from './components/Cascader';
|
|
29
29
|
export { Chart } from './components/Chart';
|
|
@@ -164,8 +164,8 @@ export { Textarea } from './components/Textarea';
|
|
|
164
164
|
export type { TextareaProps } from './components/Textarea';
|
|
165
165
|
export { TextRotate } from './components/TextRotate';
|
|
166
166
|
export type { TextRotateProps, TextRotateDuration } from './components/TextRotate';
|
|
167
|
-
export { Tag, CheckableTag } from './components/Tag';
|
|
168
|
-
export type { TagProps, CheckableTagProps } from './components/Tag';
|
|
167
|
+
export { Tag, CheckableTag, TagLiveRegion } from './components/Tag';
|
|
168
|
+
export type { TagProps, CheckableTagProps, TagSize, TagColor, TagVariant } from './components/Tag';
|
|
169
169
|
export { ThemeController } from './components/ThemeController';
|
|
170
170
|
export type { ThemeControllerSwapProps, ThemeControllerDropdownProps, ThemeControllerToggleProps } from './components/ThemeController';
|
|
171
171
|
export { TimePicker } from './components/TimePicker';
|
|
@@ -182,8 +182,8 @@ export { Transfer } from './components/Transfer';
|
|
|
182
182
|
export type { TransferProps, TransferItem } from './components/Transfer';
|
|
183
183
|
export { Tree } from './components/Tree';
|
|
184
184
|
export type { TreeProps, TreeDataNode } from './components/Tree';
|
|
185
|
-
export { TreeSelect } from './components/TreeSelect';
|
|
186
|
-
export type { TreeSelectProps, TreeSelectSize, TreeSelectColor, TreeSelectStatus, TreeSelectFieldNames, ShowCheckedStrategy, } from './components/TreeSelect';
|
|
185
|
+
export { TreeSelect, TreeSelectComponent } from './components/TreeSelect';
|
|
186
|
+
export type { TreeSelectProps, TreeSelectSize, TreeSelectColor, TreeSelectStatus, TreeSelectVariant, TreeSelectFieldNames, ShowCheckedStrategy, LabeledValue, } from './components/TreeSelect';
|
|
187
187
|
export { Typography } from './components/Typography';
|
|
188
188
|
export type { TypographyProps, TitleProps, ParagraphProps, TextProps, TypographyLinkProps, TypographySize, TitleLevel, } from './components/Typography';
|
|
189
189
|
export { Upload } from './components/Upload';
|
package/dist/index.js
CHANGED
|
@@ -6,14 +6,14 @@ import { Avatar as n, AvatarGroup as s } from "./index6.js";
|
|
|
6
6
|
import { Badge as l } from "./index7.js";
|
|
7
7
|
import { Breadcrumb as c } from "./index8.js";
|
|
8
8
|
import { Button as T } from "./index9.js";
|
|
9
|
-
import { CopyButton as
|
|
9
|
+
import { CopyButton as S } from "./index10.js";
|
|
10
10
|
import { Checkbox as b } from "./index11.js";
|
|
11
11
|
import { Chat as y } from "./index12.js";
|
|
12
12
|
import { ColorPicker as h } from "./index13.js";
|
|
13
|
-
import { Card as
|
|
14
|
-
import { Cascader as
|
|
13
|
+
import { Card as w } from "./index14.js";
|
|
14
|
+
import { Cascader as F } from "./index15.js";
|
|
15
15
|
import { Chart as I } from "./index16.js";
|
|
16
|
-
import { Carousel as
|
|
16
|
+
import { Carousel as A } from "./index17.js";
|
|
17
17
|
import { Collapse as H } from "./index18.js";
|
|
18
18
|
import { Container as K } from "./index19.js";
|
|
19
19
|
import { ContextMenu as N } from "./index20.js";
|
|
@@ -32,13 +32,13 @@ import { Flex as io } from "./index32.js";
|
|
|
32
32
|
import { FloatButton as so } from "./index33.js";
|
|
33
33
|
import { Footer as lo } from "./index34.js";
|
|
34
34
|
import { Form as Co, useFormInstance as To } from "./index35.js";
|
|
35
|
-
import { Col as
|
|
35
|
+
import { Col as So, Grid as Po, Row as bo } from "./index36.js";
|
|
36
36
|
import { Hero as yo } from "./index37.js";
|
|
37
37
|
import { HoverGallery as ho } from "./index38.js";
|
|
38
|
-
import { Image as
|
|
39
|
-
import { Indicator as
|
|
38
|
+
import { Image as wo } from "./index39.js";
|
|
39
|
+
import { Indicator as Fo } from "./index40.js";
|
|
40
40
|
import { Dropdown as Io } from "./index41.js";
|
|
41
|
-
import { Empty as
|
|
41
|
+
import { Empty as Ao } from "./index42.js";
|
|
42
42
|
import { Input as Ho } from "./index43.js";
|
|
43
43
|
import { InputNumber as Ko } from "./index44.js";
|
|
44
44
|
import { Join as No } from "./index45.js";
|
|
@@ -58,13 +58,13 @@ import { Modal as ur } from "./index58.js";
|
|
|
58
58
|
import { Navbar as dr } from "./index59.js";
|
|
59
59
|
import { notification as Cr } from "./index60.js";
|
|
60
60
|
import { OTPInput as gr } from "./index61.js";
|
|
61
|
-
import { Pagination as
|
|
61
|
+
import { Pagination as Pr } from "./index62.js";
|
|
62
62
|
import { PageLayout as kr } from "./index63.js";
|
|
63
63
|
import { Popconfirm as Dr } from "./index64.js";
|
|
64
|
-
import { Popover as
|
|
65
|
-
import { Progress as
|
|
64
|
+
import { Popover as vr } from "./index65.js";
|
|
65
|
+
import { Progress as Rr } from "./index66.js";
|
|
66
66
|
import { QRCode as Br } from "./index67.js";
|
|
67
|
-
import { Radio as
|
|
67
|
+
import { Radio as Lr } from "./index68.js";
|
|
68
68
|
import { RadialProgress as Mr } from "./index69.js";
|
|
69
69
|
import { Range as Gr } from "./index70.js";
|
|
70
70
|
import { Rating as Wr } from "./index71.js";
|
|
@@ -81,31 +81,31 @@ import { Table as pe } from "./index81.js";
|
|
|
81
81
|
import { Tabs as fe } from "./index82.js";
|
|
82
82
|
import { Textarea as ae } from "./index83.js";
|
|
83
83
|
import { TextRotate as ne } from "./index84.js";
|
|
84
|
-
import { CheckableTag as ue, Tag as le } from "./index85.js";
|
|
85
|
-
import { ThemeController as
|
|
86
|
-
import { TimePicker as
|
|
84
|
+
import { CheckableTag as ue, Tag as le, TagLiveRegion as de } from "./index85.js";
|
|
85
|
+
import { ThemeController as Ce } from "./index86.js";
|
|
86
|
+
import { TimePicker as ge } from "./index87.js";
|
|
87
87
|
import { Timeline as Pe } from "./index88.js";
|
|
88
|
-
import { Toggle as
|
|
89
|
-
import { Tour as
|
|
90
|
-
import { Tooltip as
|
|
91
|
-
import { Transfer as
|
|
92
|
-
import { Tree as
|
|
93
|
-
import { TreeSelect as
|
|
94
|
-
import { Typography as
|
|
95
|
-
import { Upload as
|
|
96
|
-
import { VirtualList as
|
|
97
|
-
import { Watermark as
|
|
98
|
-
import { Hide as
|
|
99
|
-
import { useBreakpoint as
|
|
100
|
-
import { useDisclosure as
|
|
101
|
-
import { useClipboard as
|
|
102
|
-
import { useLocalStorage as
|
|
103
|
-
import { useDebounce as
|
|
104
|
-
import { useClickOutside as
|
|
105
|
-
import { usePrevious as
|
|
106
|
-
import { useHover as
|
|
107
|
-
import { useKeyPress as
|
|
108
|
-
import { useWindowSize as
|
|
88
|
+
import { Toggle as ke } from "./index89.js";
|
|
89
|
+
import { Tour as De } from "./index90.js";
|
|
90
|
+
import { Tooltip as ve } from "./index91.js";
|
|
91
|
+
import { Transfer as Re } from "./index92.js";
|
|
92
|
+
import { Tree as Be } from "./index93.js";
|
|
93
|
+
import { TreeSelect as Le, TreeSelectComponent as Ae } from "./index94.js";
|
|
94
|
+
import { Typography as He } from "./index95.js";
|
|
95
|
+
import { Upload as Ke } from "./index96.js";
|
|
96
|
+
import { VirtualList as Ne } from "./index97.js";
|
|
97
|
+
import { Watermark as ze } from "./index98.js";
|
|
98
|
+
import { Hide as Je, Show as Qe } from "./index99.js";
|
|
99
|
+
import { useBreakpoint as Ve } from "./index100.js";
|
|
100
|
+
import { useDisclosure as qe } from "./index101.js";
|
|
101
|
+
import { useClipboard as Ye } from "./index102.js";
|
|
102
|
+
import { useLocalStorage as _e } from "./index103.js";
|
|
103
|
+
import { useDebounce as ot } from "./index104.js";
|
|
104
|
+
import { useClickOutside as et } from "./index105.js";
|
|
105
|
+
import { usePrevious as pt } from "./index106.js";
|
|
106
|
+
import { useHover as ft } from "./index107.js";
|
|
107
|
+
import { useKeyPress as at, useKeyPressCallback as it } from "./index108.js";
|
|
108
|
+
import { useWindowSize as st } from "./index109.js";
|
|
109
109
|
export {
|
|
110
110
|
e as Affix,
|
|
111
111
|
f as Alert,
|
|
@@ -117,20 +117,20 @@ export {
|
|
|
117
117
|
c as Breadcrumb,
|
|
118
118
|
pr as Browser,
|
|
119
119
|
T as Button,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
w as Card,
|
|
121
|
+
A as Carousel,
|
|
122
|
+
F as Cascader,
|
|
123
123
|
I as Chart,
|
|
124
124
|
y as Chat,
|
|
125
125
|
ue as CheckableTag,
|
|
126
126
|
b as Checkbox,
|
|
127
127
|
fr as Code,
|
|
128
|
-
|
|
128
|
+
So as Col,
|
|
129
129
|
H as Collapse,
|
|
130
130
|
h as ColorPicker,
|
|
131
131
|
K as Container,
|
|
132
132
|
N as ContextMenu,
|
|
133
|
-
|
|
133
|
+
S as CopyButton,
|
|
134
134
|
z as Countdown,
|
|
135
135
|
J as DatePicker,
|
|
136
136
|
U as Descriptions,
|
|
@@ -139,7 +139,7 @@ export {
|
|
|
139
139
|
X as Dock,
|
|
140
140
|
$ as Drawer,
|
|
141
141
|
Io as Dropdown,
|
|
142
|
-
|
|
142
|
+
Ao as Empty,
|
|
143
143
|
to as Fieldset,
|
|
144
144
|
mo as FileInput,
|
|
145
145
|
xo as Filter,
|
|
@@ -147,12 +147,12 @@ export {
|
|
|
147
147
|
so as FloatButton,
|
|
148
148
|
lo as Footer,
|
|
149
149
|
Co as Form,
|
|
150
|
-
|
|
150
|
+
Po as Grid,
|
|
151
151
|
yo as Hero,
|
|
152
|
-
|
|
152
|
+
Je as Hide,
|
|
153
153
|
ho as HoverGallery,
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
wo as Image,
|
|
155
|
+
Fo as Indicator,
|
|
156
156
|
Ho as Input,
|
|
157
157
|
Ko as InputNumber,
|
|
158
158
|
No as Join,
|
|
@@ -168,21 +168,21 @@ export {
|
|
|
168
168
|
dr as Navbar,
|
|
169
169
|
gr as OTPInput,
|
|
170
170
|
kr as PageLayout,
|
|
171
|
-
|
|
171
|
+
Pr as Pagination,
|
|
172
172
|
ar as Phone,
|
|
173
173
|
Dr as Popconfirm,
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
vr as Popover,
|
|
175
|
+
Rr as Progress,
|
|
176
176
|
Br as QRCode,
|
|
177
177
|
Mr as RadialProgress,
|
|
178
|
-
|
|
178
|
+
Lr as Radio,
|
|
179
179
|
Gr as Range,
|
|
180
180
|
Wr as Rating,
|
|
181
181
|
Or as Result,
|
|
182
182
|
bo as Row,
|
|
183
183
|
Qr as Segmented,
|
|
184
184
|
Er as Select,
|
|
185
|
-
|
|
185
|
+
Qe as Show,
|
|
186
186
|
ro as SidebarDrawer,
|
|
187
187
|
Vr as Skeleton,
|
|
188
188
|
qr as Space,
|
|
@@ -193,35 +193,37 @@ export {
|
|
|
193
193
|
pe as Table,
|
|
194
194
|
fe as Tabs,
|
|
195
195
|
le as Tag,
|
|
196
|
+
de as TagLiveRegion,
|
|
196
197
|
ne as TextRotate,
|
|
197
198
|
ae as Textarea,
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
Ce as ThemeController,
|
|
200
|
+
ge as TimePicker,
|
|
200
201
|
Pe as Timeline,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
He as
|
|
209
|
-
Ke as
|
|
210
|
-
Ne as
|
|
202
|
+
ke as Toggle,
|
|
203
|
+
ve as Tooltip,
|
|
204
|
+
De as Tour,
|
|
205
|
+
Re as Transfer,
|
|
206
|
+
Be as Tree,
|
|
207
|
+
Le as TreeSelect,
|
|
208
|
+
Ae as TreeSelectComponent,
|
|
209
|
+
He as Typography,
|
|
210
|
+
Ke as Upload,
|
|
211
|
+
Ne as VirtualList,
|
|
212
|
+
ze as Watermark,
|
|
211
213
|
nr as Window,
|
|
212
214
|
Cr as notification,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
Ve as useBreakpoint,
|
|
216
|
+
et as useClickOutside,
|
|
217
|
+
Ye as useClipboard,
|
|
218
|
+
ot as useDebounce,
|
|
219
|
+
qe as useDisclosure,
|
|
218
220
|
To as useFormInstance,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
ft as useHover,
|
|
222
|
+
at as useKeyPress,
|
|
223
|
+
it as useKeyPressCallback,
|
|
224
|
+
_e as useLocalStorage,
|
|
225
|
+
pt as usePrevious,
|
|
224
226
|
Qo as useSiderContext,
|
|
225
|
-
|
|
227
|
+
st as useWindowSize
|
|
226
228
|
};
|
|
227
229
|
//# sourceMappingURL=index.js.map
|
package/dist/index11.js
CHANGED
|
@@ -2,49 +2,49 @@ import { jsxs as p, jsx as c } from "react/jsx-runtime";
|
|
|
2
2
|
import R, { forwardRef as G, useContext as $, createContext as B } from "react";
|
|
3
3
|
const y = B(null);
|
|
4
4
|
function I({
|
|
5
|
-
children:
|
|
6
|
-
value:
|
|
7
|
-
defaultValue:
|
|
5
|
+
children: x,
|
|
6
|
+
value: r,
|
|
7
|
+
defaultValue: b,
|
|
8
8
|
onChange: d,
|
|
9
|
-
disabled:
|
|
9
|
+
disabled: a = !1,
|
|
10
10
|
options: h,
|
|
11
|
-
direction:
|
|
11
|
+
direction: s = "vertical",
|
|
12
12
|
className: u = ""
|
|
13
13
|
}) {
|
|
14
|
-
const [C, g] = R.useState(
|
|
15
|
-
value:
|
|
14
|
+
const [C, g] = R.useState(b || []), l = r !== void 0 ? r : C, t = {
|
|
15
|
+
value: l,
|
|
16
16
|
onChange: (i, e) => {
|
|
17
|
-
const k = e ? [...
|
|
18
|
-
|
|
17
|
+
const k = e ? [...l, i] : l.filter((f) => f !== i);
|
|
18
|
+
r === void 0 && g(k), d?.(k);
|
|
19
19
|
},
|
|
20
|
-
disabled:
|
|
20
|
+
disabled: a
|
|
21
21
|
};
|
|
22
22
|
if (h) {
|
|
23
|
-
const i =
|
|
24
|
-
return /* @__PURE__ */ c(y.Provider, { value: t, children: /* @__PURE__ */ c("div", { className: `${i} ${u}`.trim(), children: h.map((e) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ p("label", { className: "
|
|
23
|
+
const i = s === "horizontal" ? "flex flex-row flex-wrap gap-4" : "flex flex-col";
|
|
24
|
+
return /* @__PURE__ */ c(y.Provider, { value: t, children: /* @__PURE__ */ c("div", { className: `${i} ${u}`.trim(), children: h.map((e) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ p("label", { className: "flex items-center cursor-pointer gap-2", children: [
|
|
25
25
|
/* @__PURE__ */ c(m, { value: e }),
|
|
26
|
-
/* @__PURE__ */ c("span", {
|
|
27
|
-
] }, e) : /* @__PURE__ */ p("label", { className: "
|
|
26
|
+
/* @__PURE__ */ c("span", { children: e })
|
|
27
|
+
] }, e) : /* @__PURE__ */ p("label", { className: "flex items-center cursor-pointer gap-2", children: [
|
|
28
28
|
/* @__PURE__ */ c(m, { value: e.value, disabled: e.disabled }),
|
|
29
|
-
/* @__PURE__ */ c("span", {
|
|
29
|
+
/* @__PURE__ */ c("span", { children: e.label })
|
|
30
30
|
] }, e.value)) }) });
|
|
31
31
|
}
|
|
32
|
-
return /* @__PURE__ */ c(y.Provider, { value: t, children: /* @__PURE__ */ c("div", { className: u, children:
|
|
32
|
+
return /* @__PURE__ */ c(y.Provider, { value: t, children: /* @__PURE__ */ c("div", { className: u, children: x }) });
|
|
33
33
|
}
|
|
34
34
|
const m = G(
|
|
35
35
|
({
|
|
36
|
-
children:
|
|
37
|
-
size:
|
|
38
|
-
color:
|
|
36
|
+
children: x,
|
|
37
|
+
size: r,
|
|
38
|
+
color: b,
|
|
39
39
|
indeterminate: d = !1,
|
|
40
|
-
swap:
|
|
40
|
+
swap: a,
|
|
41
41
|
className: h = "",
|
|
42
|
-
value:
|
|
42
|
+
value: s,
|
|
43
43
|
checked: u,
|
|
44
44
|
onChange: C,
|
|
45
45
|
disabled: g,
|
|
46
|
-
...
|
|
47
|
-
},
|
|
46
|
+
...l
|
|
47
|
+
}, o) => {
|
|
48
48
|
const t = $(y), i = {
|
|
49
49
|
xs: "checkbox-xs",
|
|
50
50
|
sm: "checkbox-sm",
|
|
@@ -62,58 +62,58 @@ const m = G(
|
|
|
62
62
|
error: "checkbox-error"
|
|
63
63
|
}, k = [
|
|
64
64
|
"checkbox",
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
].filter(Boolean).join(" "),
|
|
68
|
-
t &&
|
|
65
|
+
r && i[r],
|
|
66
|
+
b && e[b]
|
|
67
|
+
].filter(Boolean).join(" "), f = t && s !== void 0 && (typeof s == "string" || typeof s == "number") ? t.value?.includes(s) ?? !1 : u, v = t?.disabled || g, w = (n) => {
|
|
68
|
+
t && s !== void 0 && (typeof s == "string" || typeof s == "number") && t.onChange?.(s, n.target.checked), C?.(n);
|
|
69
69
|
}, V = R.useCallback(
|
|
70
|
-
(
|
|
71
|
-
|
|
70
|
+
(n) => {
|
|
71
|
+
n && (n.indeterminate = d), typeof o == "function" ? o(n) : o && (o.current = n);
|
|
72
72
|
},
|
|
73
|
-
[d,
|
|
74
|
-
),
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
73
|
+
[d, o]
|
|
74
|
+
), N = d ? "indeterminate" : f ? "checked" : "unchecked";
|
|
75
|
+
if (a) {
|
|
76
|
+
const n = [
|
|
77
77
|
"swap",
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
a.effect === "rotate" && "swap-rotate",
|
|
79
|
+
a.effect === "flip" && "swap-flip",
|
|
80
80
|
h
|
|
81
81
|
].filter(Boolean).join(" ");
|
|
82
|
-
return /* @__PURE__ */ p("label", { className:
|
|
82
|
+
return /* @__PURE__ */ p("label", { className: n, children: [
|
|
83
83
|
/* @__PURE__ */ c(
|
|
84
84
|
"input",
|
|
85
85
|
{
|
|
86
|
-
ref:
|
|
86
|
+
ref: o,
|
|
87
87
|
type: "checkbox",
|
|
88
|
-
checked:
|
|
89
|
-
onChange:
|
|
90
|
-
disabled:
|
|
91
|
-
"data-state":
|
|
92
|
-
...
|
|
88
|
+
checked: f,
|
|
89
|
+
onChange: w,
|
|
90
|
+
disabled: v,
|
|
91
|
+
"data-state": N,
|
|
92
|
+
...l
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
/* @__PURE__ */ c("div", { className: "swap-on", children:
|
|
96
|
-
/* @__PURE__ */ c("div", { className: "swap-off", children:
|
|
95
|
+
/* @__PURE__ */ c("div", { className: "swap-on", children: a.on }),
|
|
96
|
+
/* @__PURE__ */ c("div", { className: "swap-off", children: a.off })
|
|
97
97
|
] });
|
|
98
98
|
}
|
|
99
|
-
const
|
|
99
|
+
const j = /* @__PURE__ */ c(
|
|
100
100
|
"input",
|
|
101
101
|
{
|
|
102
102
|
ref: V,
|
|
103
103
|
type: "checkbox",
|
|
104
104
|
className: k,
|
|
105
|
-
value:
|
|
106
|
-
checked:
|
|
107
|
-
onChange:
|
|
108
|
-
disabled:
|
|
109
|
-
"data-state":
|
|
110
|
-
...
|
|
105
|
+
value: s,
|
|
106
|
+
checked: f,
|
|
107
|
+
onChange: w,
|
|
108
|
+
disabled: v,
|
|
109
|
+
"data-state": N,
|
|
110
|
+
...l
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
|
-
return
|
|
114
|
-
|
|
115
|
-
/* @__PURE__ */ c("span", {
|
|
116
|
-
] }) :
|
|
113
|
+
return x ? /* @__PURE__ */ p("label", { className: `flex items-center cursor-pointer gap-2 ${h}`, children: [
|
|
114
|
+
j,
|
|
115
|
+
/* @__PURE__ */ c("span", { children: x })
|
|
116
|
+
] }) : j;
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
m.displayName = "Checkbox";
|