@bixlab/mtone 0.3.0 → 0.4.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/dist/index.d.ts +776 -36
- package/dist/index.js +5319 -725
- package/dist/styles.css +1 -1
- package/llms.txt +661 -47
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,86 @@ declare const Form: typeof FormRoot & {
|
|
|
82
82
|
Item: typeof FormField;
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
+
type AvatarBreakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
86
|
+
type AvatarSize = number | "sm" | "md" | "lg" | "small" | "medium" | "large" | Partial<Record<AvatarBreakpoint, number>>;
|
|
87
|
+
interface AvatarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "onError" | "children"> {
|
|
88
|
+
name?: string;
|
|
89
|
+
src?: string | React.ReactElement;
|
|
90
|
+
srcSet?: string;
|
|
91
|
+
alt?: string;
|
|
92
|
+
crossOrigin?: React.ImgHTMLAttributes<HTMLImageElement>["crossOrigin"];
|
|
93
|
+
draggable?: React.ImgHTMLAttributes<HTMLImageElement>["draggable"];
|
|
94
|
+
onError?: (event: React.SyntheticEvent<HTMLImageElement>) => boolean | void;
|
|
95
|
+
icon?: React.ReactNode;
|
|
96
|
+
children?: React.ReactNode;
|
|
97
|
+
size?: AvatarSize;
|
|
98
|
+
shape?: "circle" | "square";
|
|
99
|
+
gap?: number;
|
|
100
|
+
}
|
|
101
|
+
interface AvatarGroupProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
102
|
+
items?: AvatarProps[];
|
|
103
|
+
max?: number | {
|
|
104
|
+
count?: number;
|
|
105
|
+
style?: React.CSSProperties;
|
|
106
|
+
};
|
|
107
|
+
size?: AvatarSize;
|
|
108
|
+
shape?: "circle" | "square";
|
|
109
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
110
|
+
}
|
|
111
|
+
declare function AvatarGroup({ items, children, max, size, shape, side, className, ...props }: AvatarGroupProps): React.JSX.Element;
|
|
112
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>> & {
|
|
113
|
+
Group: typeof AvatarGroup;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
interface DividerProps extends React.HTMLAttributes<HTMLElement> {
|
|
117
|
+
orientation?: "horizontal" | "vertical";
|
|
118
|
+
variant?: "solid" | "dashed" | "dotted";
|
|
119
|
+
size?: "small" | "medium" | "large";
|
|
120
|
+
titlePlacement?: "start" | "center" | "end";
|
|
121
|
+
plain?: boolean;
|
|
122
|
+
titleClassName?: string;
|
|
123
|
+
titleStyle?: React.CSSProperties;
|
|
124
|
+
}
|
|
125
|
+
/** A non-interactive separator. Titles are supported in horizontal orientation only. */
|
|
126
|
+
declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement | HTMLHRElement>>;
|
|
127
|
+
|
|
128
|
+
interface TabItem {
|
|
129
|
+
value: string;
|
|
130
|
+
label: React__default.ReactNode;
|
|
131
|
+
content: React__default.ReactNode;
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
icon?: React__default.ReactNode;
|
|
134
|
+
closable?: boolean;
|
|
135
|
+
closeLabel?: string;
|
|
136
|
+
forceRender?: boolean;
|
|
137
|
+
destroyOnHidden?: boolean;
|
|
138
|
+
}
|
|
139
|
+
interface TabsProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children"> {
|
|
140
|
+
items: TabItem[];
|
|
141
|
+
value?: string;
|
|
142
|
+
defaultValue?: string;
|
|
143
|
+
onValueChange?: (value: string) => void;
|
|
144
|
+
label?: string;
|
|
145
|
+
placement?: "top" | "bottom" | "start" | "end";
|
|
146
|
+
variant?: "line" | "card" | "editable-card";
|
|
147
|
+
size?: "small" | "medium" | "large";
|
|
148
|
+
centered?: boolean;
|
|
149
|
+
gap?: number;
|
|
150
|
+
extraStart?: React__default.ReactNode;
|
|
151
|
+
extraEnd?: React__default.ReactNode;
|
|
152
|
+
activateOnFocus?: boolean;
|
|
153
|
+
destroyOnHidden?: boolean;
|
|
154
|
+
hideAdd?: boolean;
|
|
155
|
+
addIcon?: React__default.ReactNode;
|
|
156
|
+
addLabel?: string;
|
|
157
|
+
moreLabel?: string;
|
|
158
|
+
onEdit?: (action: "add" | "remove", value?: string) => void;
|
|
159
|
+
onTabClick?: (value: string, event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
160
|
+
reorderable?: boolean;
|
|
161
|
+
onOrderChange?: (values: string[]) => void;
|
|
162
|
+
}
|
|
163
|
+
declare const Tabs: React__default.ForwardRefExoticComponent<TabsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
164
|
+
|
|
85
165
|
type ToastPosition = "top-right" | "bottom-right" | "top-left" | "bottom-left" | "top-center" | "bottom-center" | "center" | "center-top";
|
|
86
166
|
type ToastType = "success" | "error" | "info" | "loading";
|
|
87
167
|
type Presentation = {
|
|
@@ -194,14 +274,7 @@ interface NumberInputProps extends Common, Omit<ValueProps<number | null>, "defa
|
|
|
194
274
|
step?: number;
|
|
195
275
|
}
|
|
196
276
|
declare function NumberInput({ label, className, ...props }: NumberInputProps): React__default.JSX.Element;
|
|
197
|
-
|
|
198
|
-
content: React__default.ReactNode;
|
|
199
|
-
}
|
|
200
|
-
interface TabsProps extends ValueProps<string> {
|
|
201
|
-
items: TabItem[];
|
|
202
|
-
className?: string;
|
|
203
|
-
}
|
|
204
|
-
declare function Tabs({ items, className, onValueChange, defaultValue, ...props }: TabsProps): React__default.JSX.Element;
|
|
277
|
+
|
|
205
278
|
declare function Segmented({ options, label, className, ...props }: RadioGroupProps): React__default.JSX.Element;
|
|
206
279
|
interface MenuItem {
|
|
207
280
|
icon?: React__default.ReactNode;
|
|
@@ -378,18 +451,7 @@ declare const Status: ({ children, tone, }: {
|
|
|
378
451
|
children: React.ReactNode;
|
|
379
452
|
tone?: Tone;
|
|
380
453
|
}) => React.JSX.Element;
|
|
381
|
-
|
|
382
|
-
src?: string;
|
|
383
|
-
name?: string;
|
|
384
|
-
size?: number;
|
|
385
|
-
}): React.JSX.Element;
|
|
386
|
-
declare function AvatarGroup({ items, max, }: {
|
|
387
|
-
items: {
|
|
388
|
-
name: string;
|
|
389
|
-
src?: string;
|
|
390
|
-
}[];
|
|
391
|
-
max?: number;
|
|
392
|
-
}): React.JSX.Element;
|
|
454
|
+
|
|
393
455
|
declare function Progress({ value, label }: {
|
|
394
456
|
value: number;
|
|
395
457
|
label?: string;
|
|
@@ -397,7 +459,6 @@ declare function Progress({ value, label }: {
|
|
|
397
459
|
declare const Text: ({ muted, className, ...p }: React.HTMLAttributes<HTMLSpanElement> & {
|
|
398
460
|
muted?: boolean;
|
|
399
461
|
}) => React.JSX.Element;
|
|
400
|
-
declare const Divider: () => React.JSX.Element;
|
|
401
462
|
|
|
402
463
|
declare const List: ({ className, ...p }: React.HTMLAttributes<HTMLUListElement>) => React.JSX.Element;
|
|
403
464
|
declare function ListItem({ children, icon, description, actions, ...p }: React.LiHTMLAttributes<HTMLLIElement> & {
|
|
@@ -709,34 +770,175 @@ declare const Table: (<T>(props: TableProps<T> & React.RefAttributes<Reference>)
|
|
|
709
770
|
SELECTION_NONE: "none";
|
|
710
771
|
};
|
|
711
772
|
|
|
712
|
-
type
|
|
713
|
-
|
|
714
|
-
pageSize?: number;
|
|
715
|
-
page: number;
|
|
716
|
-
onPageChange: (page: number) => void;
|
|
717
|
-
className?: string;
|
|
718
|
-
};
|
|
719
|
-
declare function Pagination({ total, pageSize, page, onPageChange, className, }: PaginationProps): React.JSX.Element;
|
|
720
|
-
|
|
773
|
+
type TreeKey = string | number;
|
|
774
|
+
/** Legacy items retain id/label; normalized treeData uses the same shape. */
|
|
721
775
|
type TreeItem = {
|
|
722
|
-
id:
|
|
776
|
+
id: TreeKey;
|
|
723
777
|
label: React.ReactNode;
|
|
724
778
|
children?: TreeItem[];
|
|
725
779
|
disabled?: boolean;
|
|
726
|
-
|
|
780
|
+
disableCheckbox?: boolean;
|
|
781
|
+
checkable?: boolean;
|
|
782
|
+
selectable?: boolean;
|
|
783
|
+
isLeaf?: boolean;
|
|
784
|
+
icon?: React.ReactNode | ((node: TreeItem) => React.ReactNode);
|
|
785
|
+
[field: string]: unknown;
|
|
786
|
+
};
|
|
787
|
+
/** Data-node form; custom field mappings can also be supplied. */
|
|
788
|
+
type TreeNode = {
|
|
789
|
+
key: TreeKey;
|
|
790
|
+
title?: React.ReactNode;
|
|
791
|
+
children?: TreeNode[];
|
|
792
|
+
disabled?: boolean;
|
|
793
|
+
disableCheckbox?: boolean;
|
|
794
|
+
checkable?: boolean;
|
|
795
|
+
selectable?: boolean;
|
|
796
|
+
isLeaf?: boolean;
|
|
797
|
+
icon?: React.ReactNode | ((node: TreeItem) => React.ReactNode);
|
|
798
|
+
[field: string]: unknown;
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
type TreeCheckedKeys = TreeKey[] | {
|
|
802
|
+
checked: TreeKey[];
|
|
803
|
+
halfChecked: TreeKey[];
|
|
804
|
+
};
|
|
805
|
+
type TreeNodeInfo = {
|
|
806
|
+
node: TreeItem;
|
|
807
|
+
expanded: boolean;
|
|
808
|
+
selected: boolean;
|
|
809
|
+
checked: boolean;
|
|
810
|
+
loading: boolean;
|
|
727
811
|
};
|
|
728
|
-
type
|
|
729
|
-
|
|
812
|
+
type TreeDropInfo = {
|
|
813
|
+
event: React.DragEvent;
|
|
814
|
+
node: TreeItem;
|
|
815
|
+
dragNode: TreeItem;
|
|
816
|
+
dragNodesKeys: TreeKey[];
|
|
817
|
+
dropPosition: -1 | 0 | 1;
|
|
818
|
+
dropToGap: boolean;
|
|
819
|
+
};
|
|
820
|
+
type TreeRef = {
|
|
821
|
+
nativeElement: HTMLDivElement | null;
|
|
822
|
+
focus: () => void;
|
|
823
|
+
scrollTo: (options: {
|
|
824
|
+
key: TreeKey;
|
|
825
|
+
align?: "top" | "bottom" | "auto";
|
|
826
|
+
offset?: number;
|
|
827
|
+
autoExpand?: boolean;
|
|
828
|
+
}) => void;
|
|
829
|
+
};
|
|
830
|
+
interface TreeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "draggable" | "onSelect" | "onLoad" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragOver" | "onDragLeave" | "onDrop" | "onDoubleClick"> {
|
|
831
|
+
items?: TreeItem[];
|
|
832
|
+
treeData?: TreeNode[] | Record<string, unknown>[];
|
|
833
|
+
fieldNames?: {
|
|
834
|
+
key?: string;
|
|
835
|
+
title?: string;
|
|
836
|
+
children?: string;
|
|
837
|
+
};
|
|
730
838
|
value?: string;
|
|
731
839
|
defaultValue?: string;
|
|
732
840
|
onValueChange?: (value: string) => void;
|
|
733
841
|
expanded?: string[];
|
|
734
842
|
defaultExpanded?: string[];
|
|
735
843
|
onExpandedChange?: (ids: string[]) => void;
|
|
844
|
+
selectedKeys?: TreeKey[];
|
|
845
|
+
defaultSelectedKeys?: TreeKey[];
|
|
846
|
+
multiple?: boolean;
|
|
847
|
+
selectable?: boolean;
|
|
848
|
+
expandedKeys?: TreeKey[];
|
|
849
|
+
defaultExpandedKeys?: TreeKey[];
|
|
850
|
+
defaultExpandAll?: boolean;
|
|
851
|
+
defaultExpandParent?: boolean;
|
|
852
|
+
autoExpandParent?: boolean;
|
|
853
|
+
onSelect?: (keys: TreeKey[], info: {
|
|
854
|
+
selected: boolean;
|
|
855
|
+
node: TreeItem;
|
|
856
|
+
selectedNodes: TreeItem[];
|
|
857
|
+
event: React.SyntheticEvent;
|
|
858
|
+
}) => void;
|
|
859
|
+
onExpand?: (keys: TreeKey[], info: {
|
|
860
|
+
expanded: boolean;
|
|
861
|
+
node: TreeItem;
|
|
862
|
+
}) => void;
|
|
863
|
+
checkable?: boolean;
|
|
864
|
+
checkStrictly?: boolean;
|
|
865
|
+
checkedKeys?: TreeCheckedKeys;
|
|
866
|
+
defaultCheckedKeys?: TreeKey[];
|
|
867
|
+
onCheck?: (keys: TreeCheckedKeys, info: {
|
|
868
|
+
checked: boolean;
|
|
869
|
+
node: TreeItem;
|
|
870
|
+
checkedNodes: TreeItem[];
|
|
871
|
+
halfCheckedKeys: TreeKey[];
|
|
872
|
+
event: React.SyntheticEvent;
|
|
873
|
+
}) => void;
|
|
874
|
+
disabled?: boolean;
|
|
736
875
|
label?: string;
|
|
876
|
+
blockNode?: boolean;
|
|
877
|
+
showLine?: boolean;
|
|
878
|
+
showIcon?: boolean;
|
|
879
|
+
icon?: React.ReactNode | ((info: TreeNodeInfo) => React.ReactNode);
|
|
880
|
+
switcherIcon?: React.ReactNode | ((info: TreeNodeInfo) => React.ReactNode);
|
|
881
|
+
switcherLoadingIcon?: React.ReactNode;
|
|
882
|
+
titleRender?: (node: TreeItem) => React.ReactNode;
|
|
883
|
+
filterTreeNode?: (node: TreeItem) => boolean;
|
|
884
|
+
loadData?: (node: TreeItem) => Promise<unknown>;
|
|
885
|
+
loadedKeys?: TreeKey[];
|
|
886
|
+
defaultLoadedKeys?: TreeKey[];
|
|
887
|
+
onLoad?: (keys: TreeKey[], info: {
|
|
888
|
+
node: TreeItem;
|
|
889
|
+
}) => void;
|
|
890
|
+
onLoadError?: (error: unknown, node: TreeItem) => void;
|
|
891
|
+
height?: number;
|
|
892
|
+
itemHeight?: number;
|
|
893
|
+
virtual?: boolean;
|
|
894
|
+
draggable?: boolean | ((node: TreeItem) => boolean);
|
|
895
|
+
allowDrop?: (info: {
|
|
896
|
+
dragNode: TreeItem;
|
|
897
|
+
dropNode: TreeItem;
|
|
898
|
+
dropPosition: -1 | 0 | 1;
|
|
899
|
+
}) => boolean;
|
|
900
|
+
onDragStart?: (info: {
|
|
901
|
+
event: React.DragEvent;
|
|
902
|
+
node: TreeItem;
|
|
903
|
+
}) => void;
|
|
904
|
+
onDragEnd?: (info: {
|
|
905
|
+
event: React.DragEvent;
|
|
906
|
+
node: TreeItem;
|
|
907
|
+
}) => void;
|
|
908
|
+
onDragEnter?: (info: {
|
|
909
|
+
event: React.DragEvent;
|
|
910
|
+
node: TreeItem;
|
|
911
|
+
expandedKeys: TreeKey[];
|
|
912
|
+
}) => void;
|
|
913
|
+
onDragOver?: (info: {
|
|
914
|
+
event: React.DragEvent;
|
|
915
|
+
node: TreeItem;
|
|
916
|
+
}) => void;
|
|
917
|
+
onDragLeave?: (info: {
|
|
918
|
+
event: React.DragEvent;
|
|
919
|
+
node: TreeItem;
|
|
920
|
+
}) => void;
|
|
921
|
+
onDrop?: (info: TreeDropInfo) => void;
|
|
922
|
+
onRightClick?: (info: {
|
|
923
|
+
event: React.MouseEvent;
|
|
924
|
+
node: TreeItem;
|
|
925
|
+
}) => void;
|
|
926
|
+
onDoubleClick?: (event: React.MouseEvent, node: TreeItem) => void;
|
|
927
|
+
/** Directory interaction without creating a separate data format. */ directory?: boolean;
|
|
928
|
+
expandAction?: false | "click" | "doubleClick";
|
|
929
|
+
}
|
|
930
|
+
declare const Tree: React.ForwardRefExoticComponent<TreeProps & React.RefAttributes<TreeRef>>;
|
|
931
|
+
declare const DirectoryTree: React.ForwardRefExoticComponent<TreeProps & React.RefAttributes<TreeRef>>;
|
|
932
|
+
|
|
933
|
+
type PaginationProps = {
|
|
934
|
+
total: number;
|
|
935
|
+
pageSize?: number;
|
|
936
|
+
page: number;
|
|
937
|
+
onPageChange: (page: number) => void;
|
|
737
938
|
className?: string;
|
|
738
939
|
};
|
|
739
|
-
declare function
|
|
940
|
+
declare function Pagination({ total, pageSize, page, onPageChange, className, }: PaginationProps): React.JSX.Element;
|
|
941
|
+
|
|
740
942
|
type DatePickerProps = {
|
|
741
943
|
value?: string;
|
|
742
944
|
defaultValue?: string;
|
|
@@ -878,4 +1080,542 @@ declare const Splitter: typeof SplitterRoot & {
|
|
|
878
1080
|
Panel: typeof SplitterPanel;
|
|
879
1081
|
};
|
|
880
1082
|
|
|
881
|
-
|
|
1083
|
+
/** Extract boundary-delimited mentions from plain text; does not validate membership in options. */
|
|
1084
|
+
declare function getMentions(value: string, config?: {
|
|
1085
|
+
prefix?: string | string[];
|
|
1086
|
+
split?: string;
|
|
1087
|
+
}): {
|
|
1088
|
+
prefix: string;
|
|
1089
|
+
value: string;
|
|
1090
|
+
}[];
|
|
1091
|
+
|
|
1092
|
+
type MentionOption = {
|
|
1093
|
+
value: string;
|
|
1094
|
+
label?: React.ReactNode;
|
|
1095
|
+
key?: React.Key;
|
|
1096
|
+
disabled?: boolean;
|
|
1097
|
+
className?: string;
|
|
1098
|
+
style?: React.CSSProperties;
|
|
1099
|
+
};
|
|
1100
|
+
type MentionsSemantic = "root" | "textarea" | "popup" | "option" | "clear";
|
|
1101
|
+
type MentionsRef = {
|
|
1102
|
+
nativeElement: HTMLTextAreaElement | null;
|
|
1103
|
+
focus: (options?: FocusOptions) => void;
|
|
1104
|
+
blur: () => void;
|
|
1105
|
+
};
|
|
1106
|
+
type MentionsProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "value" | "defaultValue" | "onChange" | "onSelect" | "prefix" | "children"> & {
|
|
1107
|
+
value?: string;
|
|
1108
|
+
defaultValue?: string;
|
|
1109
|
+
onChange?: (value: string) => void;
|
|
1110
|
+
options?: MentionOption[];
|
|
1111
|
+
prefix?: string | string[];
|
|
1112
|
+
split?: string;
|
|
1113
|
+
onSearch?: (text: string, prefix: string) => void;
|
|
1114
|
+
onSelect?: (option: MentionOption, prefix: string) => void;
|
|
1115
|
+
filterOption?: false | ((input: string, option: MentionOption) => boolean);
|
|
1116
|
+
validateSearch?: (text: string, split: string) => boolean;
|
|
1117
|
+
loading?: boolean;
|
|
1118
|
+
notFoundContent?: React.ReactNode;
|
|
1119
|
+
placement?: "top" | "bottom";
|
|
1120
|
+
getPopupContainer?: () => HTMLElement;
|
|
1121
|
+
popupRender?: (menu: React.ReactElement) => React.ReactNode;
|
|
1122
|
+
onPopupScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
1123
|
+
size?: "sm" | "md" | "lg";
|
|
1124
|
+
status?: "error" | "warning";
|
|
1125
|
+
autoSize?: boolean | {
|
|
1126
|
+
minRows?: number;
|
|
1127
|
+
maxRows?: number;
|
|
1128
|
+
};
|
|
1129
|
+
allowClear?: boolean | {
|
|
1130
|
+
clearIcon?: React.ReactNode;
|
|
1131
|
+
label?: string;
|
|
1132
|
+
tabIndex?: number;
|
|
1133
|
+
};
|
|
1134
|
+
onClear?: () => void;
|
|
1135
|
+
classNames?: Partial<Record<MentionsSemantic, string>>;
|
|
1136
|
+
styles?: Partial<Record<MentionsSemantic, React.CSSProperties>>;
|
|
1137
|
+
};
|
|
1138
|
+
declare const Mentions: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "defaultValue" | "onChange" | "children" | "prefix" | "onSelect" | "value"> & {
|
|
1139
|
+
value?: string;
|
|
1140
|
+
defaultValue?: string;
|
|
1141
|
+
onChange?: (value: string) => void;
|
|
1142
|
+
options?: MentionOption[];
|
|
1143
|
+
prefix?: string | string[];
|
|
1144
|
+
split?: string;
|
|
1145
|
+
onSearch?: (text: string, prefix: string) => void;
|
|
1146
|
+
onSelect?: (option: MentionOption, prefix: string) => void;
|
|
1147
|
+
filterOption?: false | ((input: string, option: MentionOption) => boolean);
|
|
1148
|
+
validateSearch?: (text: string, split: string) => boolean;
|
|
1149
|
+
loading?: boolean;
|
|
1150
|
+
notFoundContent?: React.ReactNode;
|
|
1151
|
+
placement?: "top" | "bottom";
|
|
1152
|
+
getPopupContainer?: () => HTMLElement;
|
|
1153
|
+
popupRender?: (menu: React.ReactElement) => React.ReactNode;
|
|
1154
|
+
onPopupScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
1155
|
+
size?: "sm" | "md" | "lg";
|
|
1156
|
+
status?: "error" | "warning";
|
|
1157
|
+
autoSize?: boolean | {
|
|
1158
|
+
minRows?: number;
|
|
1159
|
+
maxRows?: number;
|
|
1160
|
+
};
|
|
1161
|
+
allowClear?: boolean | {
|
|
1162
|
+
clearIcon?: React.ReactNode;
|
|
1163
|
+
label?: string;
|
|
1164
|
+
tabIndex?: number;
|
|
1165
|
+
};
|
|
1166
|
+
onClear?: () => void;
|
|
1167
|
+
classNames?: Partial<Record<MentionsSemantic, string>>;
|
|
1168
|
+
styles?: Partial<Record<MentionsSemantic, React.CSSProperties>>;
|
|
1169
|
+
} & React.RefAttributes<MentionsRef>>;
|
|
1170
|
+
declare const Mention: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "defaultValue" | "onChange" | "children" | "prefix" | "onSelect" | "value"> & {
|
|
1171
|
+
value?: string;
|
|
1172
|
+
defaultValue?: string;
|
|
1173
|
+
onChange?: (value: string) => void;
|
|
1174
|
+
options?: MentionOption[];
|
|
1175
|
+
prefix?: string | string[];
|
|
1176
|
+
split?: string;
|
|
1177
|
+
onSearch?: (text: string, prefix: string) => void;
|
|
1178
|
+
onSelect?: (option: MentionOption, prefix: string) => void;
|
|
1179
|
+
filterOption?: false | ((input: string, option: MentionOption) => boolean);
|
|
1180
|
+
validateSearch?: (text: string, split: string) => boolean;
|
|
1181
|
+
loading?: boolean;
|
|
1182
|
+
notFoundContent?: React.ReactNode;
|
|
1183
|
+
placement?: "top" | "bottom";
|
|
1184
|
+
getPopupContainer?: () => HTMLElement;
|
|
1185
|
+
popupRender?: (menu: React.ReactElement) => React.ReactNode;
|
|
1186
|
+
onPopupScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
1187
|
+
size?: "sm" | "md" | "lg";
|
|
1188
|
+
status?: "error" | "warning";
|
|
1189
|
+
autoSize?: boolean | {
|
|
1190
|
+
minRows?: number;
|
|
1191
|
+
maxRows?: number;
|
|
1192
|
+
};
|
|
1193
|
+
allowClear?: boolean | {
|
|
1194
|
+
clearIcon?: React.ReactNode;
|
|
1195
|
+
label?: string;
|
|
1196
|
+
tabIndex?: number;
|
|
1197
|
+
};
|
|
1198
|
+
onClear?: () => void;
|
|
1199
|
+
classNames?: Partial<Record<MentionsSemantic, string>>;
|
|
1200
|
+
styles?: Partial<Record<MentionsSemantic, React.CSSProperties>>;
|
|
1201
|
+
} & React.RefAttributes<MentionsRef>>;
|
|
1202
|
+
|
|
1203
|
+
type CalendarMode = "month" | "year";
|
|
1204
|
+
type CalendarSelectInfo = {
|
|
1205
|
+
source: "date" | "month" | "year" | "customize";
|
|
1206
|
+
};
|
|
1207
|
+
type CalendarCellInfo = {
|
|
1208
|
+
type: "date" | "month";
|
|
1209
|
+
originNode: React.ReactElement;
|
|
1210
|
+
today: string;
|
|
1211
|
+
};
|
|
1212
|
+
type CalendarHeaderInfo = {
|
|
1213
|
+
value: string;
|
|
1214
|
+
type: CalendarMode;
|
|
1215
|
+
onChange: (value: string) => void;
|
|
1216
|
+
onTypeChange: (mode: CalendarMode) => void;
|
|
1217
|
+
};
|
|
1218
|
+
type CalendarSemanticSlot = "root" | "header" | "body" | "cell";
|
|
1219
|
+
interface CalendarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "onSelect" | "defaultValue"> {
|
|
1220
|
+
value?: string;
|
|
1221
|
+
defaultValue?: string;
|
|
1222
|
+
onChange?: (value: string) => void;
|
|
1223
|
+
onValueChange?: (value: string) => void;
|
|
1224
|
+
mode?: CalendarMode;
|
|
1225
|
+
defaultMode?: CalendarMode;
|
|
1226
|
+
onPanelChange?: (value: string, mode: CalendarMode) => void;
|
|
1227
|
+
onSelect?: (value: string, info: CalendarSelectInfo) => void;
|
|
1228
|
+
validRange?: readonly [string, string];
|
|
1229
|
+
disabledDate?: (value: string) => boolean;
|
|
1230
|
+
disabled?: boolean;
|
|
1231
|
+
fullscreen?: boolean;
|
|
1232
|
+
showWeek?: boolean;
|
|
1233
|
+
locale?: Locale;
|
|
1234
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
1235
|
+
cellRender?: (value: string, info: CalendarCellInfo) => React.ReactNode;
|
|
1236
|
+
fullCellRender?: (value: string, info: CalendarCellInfo) => React.ReactNode;
|
|
1237
|
+
headerRender?: (info: CalendarHeaderInfo) => React.ReactNode;
|
|
1238
|
+
classNames?: Partial<Record<CalendarSemanticSlot, string>>;
|
|
1239
|
+
styles?: Partial<Record<CalendarSemanticSlot, React.CSSProperties>>;
|
|
1240
|
+
}
|
|
1241
|
+
declare function Calendar({ value, defaultValue, onChange, onValueChange, mode, defaultMode, onPanelChange, onSelect, validRange, disabledDate, disabled, fullscreen, showWeek, locale, weekStartsOn, cellRender, fullCellRender, headerRender, classNames, styles, className, style, ...props }: CalendarProps): React.JSX.Element;
|
|
1242
|
+
|
|
1243
|
+
interface RateCharacterInfo {
|
|
1244
|
+
/** Zero-based character index. */
|
|
1245
|
+
index: number;
|
|
1246
|
+
/** Committed, normalized value (hover never changes this). */
|
|
1247
|
+
value: number;
|
|
1248
|
+
/** Value currently painted, including a pointer preview. */
|
|
1249
|
+
displayValue: number;
|
|
1250
|
+
count: number;
|
|
1251
|
+
disabled: boolean;
|
|
1252
|
+
}
|
|
1253
|
+
interface RateProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue" | "children"> {
|
|
1254
|
+
value?: number;
|
|
1255
|
+
defaultValue?: number;
|
|
1256
|
+
onChange?: (value: number) => void;
|
|
1257
|
+
count?: number;
|
|
1258
|
+
allowHalf?: boolean;
|
|
1259
|
+
allowClear?: boolean;
|
|
1260
|
+
disabled?: boolean;
|
|
1261
|
+
keyboard?: boolean;
|
|
1262
|
+
autoFocus?: boolean;
|
|
1263
|
+
size?: "small" | "medium" | "large";
|
|
1264
|
+
/** Display-only content; do not supply links, inputs or other interactive nodes. */
|
|
1265
|
+
character?: React.ReactNode | ((info: RateCharacterInfo) => React.ReactNode);
|
|
1266
|
+
tooltips?: readonly string[];
|
|
1267
|
+
/** undefined means pointer preview ended. */
|
|
1268
|
+
onHoverChange?: (value: number | undefined) => void;
|
|
1269
|
+
}
|
|
1270
|
+
/** Compact star rating, exposed as one keyboard-focusable slider. */
|
|
1271
|
+
declare const Rate: React.ForwardRefExoticComponent<RateProps & React.RefAttributes<HTMLSpanElement>>;
|
|
1272
|
+
|
|
1273
|
+
type PopconfirmPlacement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom";
|
|
1274
|
+
type Content = React.ReactNode | (() => React.ReactNode);
|
|
1275
|
+
interface PopconfirmProps {
|
|
1276
|
+
trigger: React.ReactElement;
|
|
1277
|
+
title: Content;
|
|
1278
|
+
description?: Content;
|
|
1279
|
+
icon?: React.ReactNode;
|
|
1280
|
+
open?: boolean;
|
|
1281
|
+
defaultOpen?: boolean;
|
|
1282
|
+
onOpenChange?: (open: boolean) => void;
|
|
1283
|
+
disabled?: boolean;
|
|
1284
|
+
placement?: PopconfirmPlacement;
|
|
1285
|
+
arrow?: boolean;
|
|
1286
|
+
autoAdjustOverflow?: boolean;
|
|
1287
|
+
okText?: React.ReactNode;
|
|
1288
|
+
cancelText?: React.ReactNode;
|
|
1289
|
+
showCancel?: boolean;
|
|
1290
|
+
okButtonProps?: Omit<ButtonProps, "onClick" | "children">;
|
|
1291
|
+
cancelButtonProps?: Omit<ButtonProps, "onClick" | "children">;
|
|
1292
|
+
onConfirm?: (event: React.MouseEvent<HTMLButtonElement>) => void | boolean | Promise<void | boolean>;
|
|
1293
|
+
onCancel?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
1294
|
+
onConfirmError?: (error: unknown) => void;
|
|
1295
|
+
errorText?: React.ReactNode;
|
|
1296
|
+
onPopupClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
1297
|
+
className?: string;
|
|
1298
|
+
style?: React.CSSProperties;
|
|
1299
|
+
}
|
|
1300
|
+
declare function Popconfirm({ trigger, title, description, icon, open, defaultOpen, onOpenChange, disabled, placement, arrow, autoAdjustOverflow, okText, cancelText, showCancel, okButtonProps, cancelButtonProps, onConfirm, onCancel, onConfirmError, errorText, onPopupClick, className, style, }: PopconfirmProps): React.JSX.Element;
|
|
1301
|
+
|
|
1302
|
+
type TimelinePlacement = "start" | "end";
|
|
1303
|
+
type TimelineSemantic = "root" | "item" | "tail" | "icon" | "title" | "content";
|
|
1304
|
+
interface TimelineItem extends Omit<React.HTMLAttributes<HTMLLIElement>, "title" | "children" | "content" | "color"> {
|
|
1305
|
+
key?: React.Key;
|
|
1306
|
+
title?: React.ReactNode;
|
|
1307
|
+
content?: React.ReactNode;
|
|
1308
|
+
icon?: React.ReactNode;
|
|
1309
|
+
color?: string;
|
|
1310
|
+
loading?: boolean;
|
|
1311
|
+
placement?: TimelinePlacement;
|
|
1312
|
+
/** Compatibility aliases; prefer title/content/icon/placement. */
|
|
1313
|
+
label?: React.ReactNode;
|
|
1314
|
+
children?: React.ReactNode;
|
|
1315
|
+
dot?: React.ReactNode;
|
|
1316
|
+
position?: TimelinePlacement | "left" | "right";
|
|
1317
|
+
}
|
|
1318
|
+
interface TimelineProps extends Omit<React.HTMLAttributes<HTMLOListElement>, "children"> {
|
|
1319
|
+
items?: readonly TimelineItem[];
|
|
1320
|
+
mode?: TimelinePlacement | "alternate" | "left" | "right";
|
|
1321
|
+
orientation?: "vertical" | "horizontal";
|
|
1322
|
+
reverse?: boolean;
|
|
1323
|
+
variant?: "outlined" | "filled";
|
|
1324
|
+
/** Title column width. A number is pixels, not Ant Design's 24-column span. */
|
|
1325
|
+
titleSpan?: number | string;
|
|
1326
|
+
/** Compatibility ghost item. Prefer an explicit item with loading=true. */
|
|
1327
|
+
pending?: React.ReactNode;
|
|
1328
|
+
pendingDot?: React.ReactNode;
|
|
1329
|
+
classNames?: Partial<Record<TimelineSemantic, string>>;
|
|
1330
|
+
styles?: Partial<Record<TimelineSemantic, React.CSSProperties>>;
|
|
1331
|
+
}
|
|
1332
|
+
declare const Timeline: React.ForwardRefExoticComponent<TimelineProps & React.RefAttributes<HTMLOListElement>>;
|
|
1333
|
+
|
|
1334
|
+
interface AffixProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
1335
|
+
/** Top offset, defaults to zero unless offsetBottom is supplied. Takes precedence. */
|
|
1336
|
+
offsetTop?: number;
|
|
1337
|
+
offsetBottom?: number;
|
|
1338
|
+
target?: () => Window | HTMLElement | null;
|
|
1339
|
+
onChange?: (affixed: boolean) => void;
|
|
1340
|
+
}
|
|
1341
|
+
/** Fixed positioning with an in-flow placeholder. Use with vertical scrolling. */
|
|
1342
|
+
declare const Affix: React.ForwardRefExoticComponent<AffixProps & React.RefAttributes<HTMLDivElement>>;
|
|
1343
|
+
|
|
1344
|
+
type ResultStatus = "success" | "error" | "info" | "warning" | "403" | "404" | "500";
|
|
1345
|
+
type ResultSemantic = "root" | "icon" | "title" | "subTitle" | "extra" | "body";
|
|
1346
|
+
type SemanticValue<T> = Partial<Record<ResultSemantic, T>> | ((info: {
|
|
1347
|
+
props: ResultProps & {
|
|
1348
|
+
status: ResultStatus;
|
|
1349
|
+
};
|
|
1350
|
+
}) => Partial<Record<ResultSemantic, T>>);
|
|
1351
|
+
interface ResultProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1352
|
+
status?: ResultStatus;
|
|
1353
|
+
title?: React.ReactNode;
|
|
1354
|
+
subTitle?: React.ReactNode;
|
|
1355
|
+
icon?: React.ReactNode;
|
|
1356
|
+
extra?: React.ReactNode;
|
|
1357
|
+
classNames?: SemanticValue<string>;
|
|
1358
|
+
styles?: SemanticValue<React.CSSProperties>;
|
|
1359
|
+
}
|
|
1360
|
+
/** Static result summary. Opt into role="status" or aria-live only for dynamic announcements. */
|
|
1361
|
+
declare const Result: React.ForwardRefExoticComponent<ResultProps & React.RefAttributes<HTMLDivElement>>;
|
|
1362
|
+
|
|
1363
|
+
interface ImageItem {
|
|
1364
|
+
src: string;
|
|
1365
|
+
alt?: string;
|
|
1366
|
+
previewSrc?: string;
|
|
1367
|
+
fallback?: string;
|
|
1368
|
+
crossOrigin?: React.ImgHTMLAttributes<HTMLImageElement>["crossOrigin"];
|
|
1369
|
+
referrerPolicy?: React.ImgHTMLAttributes<HTMLImageElement>["referrerPolicy"];
|
|
1370
|
+
}
|
|
1371
|
+
interface ImagePreviewProps {
|
|
1372
|
+
items: readonly ImageItem[];
|
|
1373
|
+
open: boolean;
|
|
1374
|
+
onOpenChange: (open: boolean) => void;
|
|
1375
|
+
current?: number;
|
|
1376
|
+
defaultCurrent?: number;
|
|
1377
|
+
onCurrentChange?: (index: number) => void;
|
|
1378
|
+
/** Focus target after dismissal. Otherwise Base UI returns to the active opener. */
|
|
1379
|
+
returnFocus?: React.RefObject<HTMLElement | null>;
|
|
1380
|
+
closeOnBackdrop?: boolean;
|
|
1381
|
+
className?: string;
|
|
1382
|
+
}
|
|
1383
|
+
interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "placeholder"> {
|
|
1384
|
+
src: string;
|
|
1385
|
+
fallback?: string;
|
|
1386
|
+
placeholder?: React.ReactNode;
|
|
1387
|
+
errorContent?: React.ReactNode;
|
|
1388
|
+
preview?: boolean;
|
|
1389
|
+
previewSrc?: string;
|
|
1390
|
+
open?: boolean;
|
|
1391
|
+
defaultOpen?: boolean;
|
|
1392
|
+
onOpenChange?: (open: boolean) => void;
|
|
1393
|
+
fit?: React.CSSProperties["objectFit"];
|
|
1394
|
+
wrapperClassName?: string;
|
|
1395
|
+
}
|
|
1396
|
+
declare function ImagePreview({ items, open, onOpenChange, current, defaultCurrent, onCurrentChange, returnFocus, closeOnBackdrop, className, }: ImagePreviewProps): React.JSX.Element;
|
|
1397
|
+
declare function Image({ src, fallback, placeholder, errorContent, preview, previewSrc, open, defaultOpen, onOpenChange, fit, wrapperClassName, width, height, style, ...props }: ImageProps): React.JSX.Element;
|
|
1398
|
+
interface ImageGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
1399
|
+
items: readonly ImageItem[];
|
|
1400
|
+
open?: boolean;
|
|
1401
|
+
defaultOpen?: boolean;
|
|
1402
|
+
onOpenChange?: (open: boolean) => void;
|
|
1403
|
+
current?: number;
|
|
1404
|
+
defaultCurrent?: number;
|
|
1405
|
+
onCurrentChange?: (index: number) => void;
|
|
1406
|
+
thumbnailWidth?: number | string;
|
|
1407
|
+
thumbnailHeight?: number | string;
|
|
1408
|
+
}
|
|
1409
|
+
declare function ImageGroup({ items, open, defaultOpen, onOpenChange, current, defaultCurrent, onCurrentChange, thumbnailWidth, thumbnailHeight, className, ...props }: ImageGroupProps): React.JSX.Element;
|
|
1410
|
+
|
|
1411
|
+
interface TableOfContentsItem {
|
|
1412
|
+
id: string;
|
|
1413
|
+
label: string;
|
|
1414
|
+
level: number;
|
|
1415
|
+
}
|
|
1416
|
+
interface TableOfContentsHandle {
|
|
1417
|
+
refresh: () => void;
|
|
1418
|
+
}
|
|
1419
|
+
interface TableOfContentsProps extends Omit<React__default.HTMLAttributes<HTMLElement>, "title" | "onSelect"> {
|
|
1420
|
+
/** Heading scope. null means not ready; omitted means document. */
|
|
1421
|
+
root?: HTMLElement | null | (() => HTMLElement | null);
|
|
1422
|
+
/** Scroller containing the headings. Omitted means window. */
|
|
1423
|
+
scrollContainer?: HTMLElement | null | (() => HTMLElement | null);
|
|
1424
|
+
selector?: string;
|
|
1425
|
+
title?: React__default.ReactNode;
|
|
1426
|
+
initialItems?: TableOfContentsItem[];
|
|
1427
|
+
observe?: boolean;
|
|
1428
|
+
offset?: number;
|
|
1429
|
+
behavior?: ScrollBehavior;
|
|
1430
|
+
indent?: number;
|
|
1431
|
+
variant?: "default" | "subtle";
|
|
1432
|
+
emptyContent?: React__default.ReactNode;
|
|
1433
|
+
getLabel?: (element: HTMLElement) => string;
|
|
1434
|
+
getLevel?: (element: HTMLElement) => number;
|
|
1435
|
+
renderLabel?: (item: TableOfContentsItem, active: boolean) => React__default.ReactNode;
|
|
1436
|
+
onActiveChange?: (id: string | null) => void;
|
|
1437
|
+
onItemClick?: (item: TableOfContentsItem, event: React__default.MouseEvent<HTMLAnchorElement>) => void;
|
|
1438
|
+
}
|
|
1439
|
+
/** An accessible on-page heading index, independent of router hash state. */
|
|
1440
|
+
declare const TableOfContents: React__default.ForwardRefExoticComponent<TableOfContentsProps & React__default.RefAttributes<TableOfContentsHandle>>;
|
|
1441
|
+
|
|
1442
|
+
type AutoCompleteOption = {
|
|
1443
|
+
value: string;
|
|
1444
|
+
label?: React.ReactNode;
|
|
1445
|
+
disabled?: boolean;
|
|
1446
|
+
keywords?: string;
|
|
1447
|
+
};
|
|
1448
|
+
type AutoCompleteGroup = {
|
|
1449
|
+
label: string;
|
|
1450
|
+
options: AutoCompleteOption[];
|
|
1451
|
+
};
|
|
1452
|
+
type AutoCompleteProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue" | "onChange" | "onSelect" | "prefix" | "children"> & {
|
|
1453
|
+
options?: (AutoCompleteOption | AutoCompleteGroup)[];
|
|
1454
|
+
value?: string;
|
|
1455
|
+
defaultValue?: string;
|
|
1456
|
+
onChange?: (value: string) => void;
|
|
1457
|
+
onSelect?: (value: string, option: AutoCompleteOption) => void;
|
|
1458
|
+
onSearch?: (value: string) => void;
|
|
1459
|
+
open?: boolean;
|
|
1460
|
+
defaultOpen?: boolean;
|
|
1461
|
+
onOpenChange?: (open: boolean) => void;
|
|
1462
|
+
filterOption?: false | ((query: string, option: AutoCompleteOption) => boolean);
|
|
1463
|
+
autoHighlight?: boolean;
|
|
1464
|
+
backfill?: boolean;
|
|
1465
|
+
allowClear?: boolean;
|
|
1466
|
+
onClear?: () => void;
|
|
1467
|
+
loading?: boolean;
|
|
1468
|
+
notFoundContent?: React.ReactNode;
|
|
1469
|
+
size?: "sm" | "md" | "lg";
|
|
1470
|
+
status?: "error" | "warning";
|
|
1471
|
+
prefix?: React.ReactNode;
|
|
1472
|
+
suffix?: React.ReactNode;
|
|
1473
|
+
popupClassName?: string;
|
|
1474
|
+
popupStyle?: React.CSSProperties;
|
|
1475
|
+
placement?: "top" | "bottom";
|
|
1476
|
+
popupWidth?: number;
|
|
1477
|
+
};
|
|
1478
|
+
/** Free text input with optional suggestions; ref points to the native input. */
|
|
1479
|
+
declare const AutoComplete: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "onChange" | "children" | "prefix" | "onSelect" | "value" | "size"> & {
|
|
1480
|
+
options?: (AutoCompleteOption | AutoCompleteGroup)[];
|
|
1481
|
+
value?: string;
|
|
1482
|
+
defaultValue?: string;
|
|
1483
|
+
onChange?: (value: string) => void;
|
|
1484
|
+
onSelect?: (value: string, option: AutoCompleteOption) => void;
|
|
1485
|
+
onSearch?: (value: string) => void;
|
|
1486
|
+
open?: boolean;
|
|
1487
|
+
defaultOpen?: boolean;
|
|
1488
|
+
onOpenChange?: (open: boolean) => void;
|
|
1489
|
+
filterOption?: false | ((query: string, option: AutoCompleteOption) => boolean);
|
|
1490
|
+
autoHighlight?: boolean;
|
|
1491
|
+
backfill?: boolean;
|
|
1492
|
+
allowClear?: boolean;
|
|
1493
|
+
onClear?: () => void;
|
|
1494
|
+
loading?: boolean;
|
|
1495
|
+
notFoundContent?: React.ReactNode;
|
|
1496
|
+
size?: "sm" | "md" | "lg";
|
|
1497
|
+
status?: "error" | "warning";
|
|
1498
|
+
prefix?: React.ReactNode;
|
|
1499
|
+
suffix?: React.ReactNode;
|
|
1500
|
+
popupClassName?: string;
|
|
1501
|
+
popupStyle?: React.CSSProperties;
|
|
1502
|
+
placement?: "top" | "bottom";
|
|
1503
|
+
popupWidth?: number;
|
|
1504
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
1505
|
+
|
|
1506
|
+
type CascaderKey = string | number;
|
|
1507
|
+
type CascaderPath = CascaderKey[];
|
|
1508
|
+
interface CascaderOption {
|
|
1509
|
+
value: CascaderKey;
|
|
1510
|
+
label: React.ReactNode;
|
|
1511
|
+
/** Required for searching non-text labels. */
|
|
1512
|
+
textValue?: string;
|
|
1513
|
+
children?: CascaderOption[];
|
|
1514
|
+
disabled?: boolean;
|
|
1515
|
+
/** false declares an unloaded branch; loadOptions must supply its children. */
|
|
1516
|
+
isLeaf?: boolean;
|
|
1517
|
+
}
|
|
1518
|
+
interface CascaderCommon {
|
|
1519
|
+
options: CascaderOption[];
|
|
1520
|
+
disabled?: boolean;
|
|
1521
|
+
readOnly?: boolean;
|
|
1522
|
+
changeOnSelect?: boolean;
|
|
1523
|
+
expandTrigger?: "click" | "hover";
|
|
1524
|
+
searchable?: boolean;
|
|
1525
|
+
searchValue?: string;
|
|
1526
|
+
defaultSearchValue?: string;
|
|
1527
|
+
onSearchChange?: (value: string) => void;
|
|
1528
|
+
filterOption?: (query: string, path: CascaderOption[]) => boolean;
|
|
1529
|
+
loadOptions?: (path: CascaderOption[]) => Promise<CascaderOption[]>;
|
|
1530
|
+
onLoadError?: (error: unknown, path: CascaderOption[]) => void;
|
|
1531
|
+
renderOption?: (option: CascaderOption, path: CascaderOption[]) => React.ReactNode;
|
|
1532
|
+
emptyContent?: React.ReactNode;
|
|
1533
|
+
loadingText?: React.ReactNode;
|
|
1534
|
+
loadErrorText?: React.ReactNode;
|
|
1535
|
+
searchPlaceholder?: string;
|
|
1536
|
+
className?: string;
|
|
1537
|
+
style?: React.CSSProperties;
|
|
1538
|
+
"aria-label"?: string;
|
|
1539
|
+
"aria-labelledby"?: string;
|
|
1540
|
+
}
|
|
1541
|
+
type CascaderSelection = {
|
|
1542
|
+
multiple?: false;
|
|
1543
|
+
value?: CascaderPath;
|
|
1544
|
+
defaultValue?: CascaderPath;
|
|
1545
|
+
onValueChange?: (value: CascaderPath, options: CascaderOption[]) => void;
|
|
1546
|
+
} | {
|
|
1547
|
+
multiple: true;
|
|
1548
|
+
value?: CascaderPath[];
|
|
1549
|
+
defaultValue?: CascaderPath[];
|
|
1550
|
+
onValueChange?: (value: CascaderPath[], options: CascaderOption[][]) => void;
|
|
1551
|
+
};
|
|
1552
|
+
type CascaderPanelProps = CascaderCommon & CascaderSelection;
|
|
1553
|
+
type CascaderProps = CascaderPanelProps & {
|
|
1554
|
+
open?: boolean;
|
|
1555
|
+
defaultOpen?: boolean;
|
|
1556
|
+
onOpenChange?: (open: boolean) => void;
|
|
1557
|
+
placeholder?: string;
|
|
1558
|
+
allowClear?: boolean;
|
|
1559
|
+
onClear?: () => void;
|
|
1560
|
+
size?: "sm" | "md" | "lg";
|
|
1561
|
+
status?: "error" | "warning";
|
|
1562
|
+
placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
1563
|
+
/** Only changes multiple-value presentation; callbacks always contain leaf paths. */
|
|
1564
|
+
showCheckedStrategy?: "parent" | "leaf";
|
|
1565
|
+
maxTagCount?: number;
|
|
1566
|
+
renderValue?: (options: CascaderOption[], path: CascaderPath) => React.ReactNode;
|
|
1567
|
+
prefix?: React.ReactNode;
|
|
1568
|
+
name?: string;
|
|
1569
|
+
id?: string;
|
|
1570
|
+
};
|
|
1571
|
+
declare function CascaderPanel(props: CascaderPanelProps): React.JSX.Element;
|
|
1572
|
+
declare const Cascader: React.ForwardRefExoticComponent<CascaderProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1573
|
+
|
|
1574
|
+
interface TransferItem {
|
|
1575
|
+
key: string;
|
|
1576
|
+
label: React.ReactNode;
|
|
1577
|
+
description?: React.ReactNode;
|
|
1578
|
+
searchText?: string;
|
|
1579
|
+
disabled?: boolean;
|
|
1580
|
+
}
|
|
1581
|
+
type TransferDirection = "left" | "right";
|
|
1582
|
+
interface TransferListContext {
|
|
1583
|
+
direction: TransferDirection;
|
|
1584
|
+
items: TransferItem[];
|
|
1585
|
+
selectedKeys: string[];
|
|
1586
|
+
disabled: boolean;
|
|
1587
|
+
select: (keys: string[], selected: boolean) => void;
|
|
1588
|
+
remove: (keys: string[]) => void;
|
|
1589
|
+
}
|
|
1590
|
+
interface TransferProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "children"> {
|
|
1591
|
+
items: TransferItem[];
|
|
1592
|
+
targetKeys?: string[];
|
|
1593
|
+
defaultTargetKeys?: string[];
|
|
1594
|
+
onChange?: (targetKeys: string[], direction: TransferDirection, moveKeys: string[]) => void;
|
|
1595
|
+
selectedKeys?: string[];
|
|
1596
|
+
defaultSelectedKeys?: string[];
|
|
1597
|
+
onSelectChange?: (sourceKeys: string[], targetKeys: string[]) => void;
|
|
1598
|
+
showSearch?: boolean;
|
|
1599
|
+
filterOption?: (query: string, item: TransferItem, direction: TransferDirection) => boolean;
|
|
1600
|
+
onSearch?: (direction: TransferDirection, query: string) => void;
|
|
1601
|
+
titles?: [React.ReactNode, React.ReactNode];
|
|
1602
|
+
panelLabels?: [string, string];
|
|
1603
|
+
operationLabels?: [string, string];
|
|
1604
|
+
searchPlaceholder?: string;
|
|
1605
|
+
emptyContent?: React.ReactNode;
|
|
1606
|
+
disabled?: boolean;
|
|
1607
|
+
loading?: boolean;
|
|
1608
|
+
oneWay?: boolean;
|
|
1609
|
+
showSelectAll?: boolean;
|
|
1610
|
+
pagination?: boolean | {
|
|
1611
|
+
pageSize?: number;
|
|
1612
|
+
};
|
|
1613
|
+
height?: number | string;
|
|
1614
|
+
status?: "error" | "warning";
|
|
1615
|
+
renderItem?: (item: TransferItem, direction: TransferDirection) => React.ReactNode;
|
|
1616
|
+
renderList?: (context: TransferListContext) => React.ReactNode;
|
|
1617
|
+
footer?: (context: TransferListContext) => React.ReactNode;
|
|
1618
|
+
}
|
|
1619
|
+
declare const Transfer: React.ForwardRefExoticComponent<TransferProps & React.RefAttributes<HTMLDivElement>>;
|
|
1620
|
+
|
|
1621
|
+
export { Affix, type AffixProps, Alert, AutoComplete, type AutoCompleteGroup, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarBreakpoint, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, Breadcrumb, Button, ButtonGroup, type ButtonProps, Calendar, type CalendarCellInfo, type CalendarHeaderInfo, type CalendarMode, type CalendarProps, type CalendarSelectInfo, type CalendarSemanticSlot, Card, type CardGridProps, type CardMetaProps, type CardMetaSemantic, type CardProps, type CardSemantic, type CardTabItem, type CardTokens, Cascader, type CascaderKey, type CascaderOption, CascaderPanel, type CascaderPanelProps, type CascaderPath, type CascaderProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, DatePicker, type DatePickerProps, Dialog, type DialogProps, DirectoryTree, Divider, type DividerProps, DocumentCard, type DocumentItem, DocumentList, Drawer, DropdownMenu, type DropdownMenuProps, Dropzone, Empty, FilterBar, FilterChip, Form, FormField, type FormFieldProps, type FormInstance, type FormProps, type FormRule, type FormValidateTrigger, type FormValidationError, type FormValues, IconButton, Image, ImageGroup, type ImageGroupProps, type ImageItem, ImagePreview, type ImagePreviewProps, type ImageProps, Input, Layout, type LayoutContentProps, type LayoutHeaderProps, type LayoutProps, type LayoutSiderProps, List, ListItem, type Locale, Mention, type MentionOption, Mentions, type MentionsProps, type MentionsRef, type MentionsSemantic, type MenuItem, Modal, type ModalProps, MtoneProvider, MtoneScope, MultiSelect, type MultiSelectProps, NavGroup, NavItem, NumberInput, type NumberInputProps, type OpenProps, type Option, Pagination, type PaginationProps, Popconfirm, type PopconfirmPlacement, type PopconfirmProps, Popover, type PopoverProps, Progress, PropertyItem, PropertyList, RadioGroup, type RadioGroupProps, Rate, type RateCharacterInfo, type RateProps, Result, type ResultProps, type ResultSemantic, type ResultStatus, SearchInput, Segmented, Select, type SelectProps, Sidebar, type SidebarProps, Skeleton, Slider, type SliderProps, type SortOrder, Spinner, Splitter, type SplitterPanelProps, type SplitterProps, type SplitterSize, Spotlight, type SpotlightAction, type SpotlightProps, Status, Switch, type TabItem, Table, type TableClassNames, type TableColumn, type TableColumnTitleProps, type TableColumnsType, type TableExpandableConfig, type TableFilterDropdownProps, type TableFilterItem, type TableFilterValue, type TableFilters, type TableLocale, TableOfContents, type TableOfContentsHandle, type TableOfContentsItem, type TableOfContentsProps, type TablePagination, type TableProps, type TableRef, type TableRowSelection, type TableSelectionType, type TableSortResult, type TableState, type TableStyles, Tabs, type TabsProps, Text, Textarea, Timeline, type TimelineItem, type TimelinePlacement, type TimelineProps, type TimelineSemantic, Toast, type ToastOptions, type ToastPosition, type ToastPromiseOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToastUpdateOptions, type Tokens, type Tone, Tooltip, Transfer, type TransferDirection, type TransferItem, type TransferListContext, type TransferProps, Tree, type TreeCheckedKeys, type TreeDropInfo, type TreeItem, type TreeKey, type TreeNode, type TreeNodeInfo, type TreeProps, type TreeRef, Upload, type UploadAdapter, type UploadContext, type UploadFile, type UploadProps, cn, getMentions, useMtone, useToast };
|