@bioturing/components 0.26.2 → 0.28.1
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/checkbox/component.js.map +1 -1
- package/dist/components/choice-list/component.js +24 -21
- package/dist/components/choice-list/component.js.map +1 -1
- package/dist/components/cmdk/index.js.map +1 -1
- package/dist/components/combobox/component.js +202 -0
- package/dist/components/combobox/component.js.map +1 -0
- package/dist/components/combobox/style.css +1 -0
- package/dist/components/combobox/trigger.js +89 -0
- package/dist/components/combobox/trigger.js.map +1 -0
- package/dist/components/dropdown-menu/component.js +176 -162
- package/dist/components/dropdown-menu/component.js.map +1 -1
- package/dist/components/dropdown-menu/divider.js +16 -0
- package/dist/components/dropdown-menu/divider.js.map +1 -0
- package/dist/components/dropdown-menu/item.css +1 -0
- package/dist/components/dropdown-menu/item.js +131 -0
- package/dist/components/dropdown-menu/item.js.map +1 -0
- package/dist/components/dropdown-menu/style.css +1 -1
- package/dist/components/hooks/useDraggable.js +77 -0
- package/dist/components/hooks/useDraggable.js.map +1 -0
- package/dist/components/hooks/useHover.js +26 -0
- package/dist/components/hooks/useHover.js.map +1 -0
- package/dist/components/hooks/useTransitionStatus.js +52 -0
- package/dist/components/hooks/useTransitionStatus.js.map +1 -0
- package/dist/components/nav/item.js +2 -2
- package/dist/components/popup-panel/component.js +136 -169
- package/dist/components/popup-panel/component.js.map +1 -1
- package/dist/components/popup-panel/style.css +1 -1
- package/dist/components/resizable/component.js +239 -0
- package/dist/components/resizable/component.js.map +1 -0
- package/dist/components/resizable/style.css +1 -0
- package/dist/components/segmented/component.js +3 -3
- package/dist/components/segmented/component.js.map +1 -1
- package/dist/components/select/component.js +160 -91
- package/dist/components/select/component.js.map +1 -1
- package/dist/components/select/item.js +54 -0
- package/dist/components/select/item.js.map +1 -0
- package/dist/components/select/style.css +1 -1
- package/dist/components/spin/component.js +9 -8
- package/dist/components/spin/component.js.map +1 -1
- package/dist/components/splitter/splitter-panel.js +26 -43
- package/dist/components/splitter/splitter-panel.js.map +1 -1
- package/dist/components/splitter/splitter.js +99 -98
- package/dist/components/splitter/splitter.js.map +1 -1
- package/dist/components/splitter/useSizes.js +86 -0
- package/dist/components/splitter/useSizes.js.map +1 -0
- package/dist/components/stack/StackChild.js +9 -9
- package/dist/components/transition/component.js +1 -1
- package/dist/components/transition/component.js.map +1 -1
- package/dist/components/upload/dragger.js +19 -10
- package/dist/components/upload/dragger.js.map +1 -1
- package/dist/components/upload/item.js +21 -18
- package/dist/components/upload/item.js.map +1 -1
- package/dist/components/utils/antdUtils.js +18 -56
- package/dist/components/utils/antdUtils.js.map +1 -1
- package/dist/components/utils/placement.js +58 -0
- package/dist/components/utils/placement.js.map +1 -0
- package/dist/components/utils/reactElement.js +5 -0
- package/dist/components/utils/reactElement.js.map +1 -0
- package/dist/index.d.ts +478 -20
- package/dist/index.js +205 -189
- package/dist/index.js.map +1 -1
- package/dist/metadata.js +39 -5
- package/dist/metadata.js.map +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -137,6 +137,7 @@ import { ModalFuncProps } from 'antd';
|
|
|
137
137
|
import { ModalProps } from './Modal';
|
|
138
138
|
import { ModalProps as ModalProps_3 } from 'antd/es/modal';
|
|
139
139
|
import { ModalRef } from './functions';
|
|
140
|
+
import { MoveValues } from 'react-use-resizable';
|
|
140
141
|
import { notification } from 'antd';
|
|
141
142
|
import { NotificationArgsProps } from 'antd';
|
|
142
143
|
import { OptionFC } from 'rc-select/lib/Option';
|
|
@@ -269,6 +270,8 @@ export { AnchorProps }
|
|
|
269
270
|
|
|
270
271
|
export declare const antdColorTokens: ColorTokens;
|
|
271
272
|
|
|
273
|
+
export declare type AntdPlacement = PopoverProps_2["placement"];
|
|
274
|
+
|
|
272
275
|
declare type AnyFunction = (...args: any[]) => any;
|
|
273
276
|
|
|
274
277
|
declare type AnyObject = Record<PropertyKey, any>;
|
|
@@ -318,6 +321,15 @@ declare interface BaseFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
318
321
|
colon?: boolean;
|
|
319
322
|
}
|
|
320
323
|
|
|
324
|
+
export declare type BaseUIAlign = "start" | "end" | "center";
|
|
325
|
+
|
|
326
|
+
export declare interface BaseUIPlacement {
|
|
327
|
+
side: BaseUISide;
|
|
328
|
+
align: BaseUIAlign;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export declare type BaseUISide = "top" | "bottom" | "left" | "right";
|
|
332
|
+
|
|
321
333
|
export declare const Breadcrumb: (({ className, items, noWrap, itemRender: outsideItemRender, ...rest }: BreadcrumbProps) => JSX.Element) & {
|
|
322
334
|
Item: (props: BreadcrumbItemProps) => JSX.Element;
|
|
323
335
|
Separator: (props: React.HTMLAttributes<HTMLSpanElement>) => JSX.Element;
|
|
@@ -337,6 +349,13 @@ export declare interface BreadcrumbProps<T extends AnyObject = AnyObject> extend
|
|
|
337
349
|
itemRender?: (route: BreadcrumbItemType, params: T, routes: BreadcrumbItemType[], paths: string[]) => React.ReactNode;
|
|
338
350
|
}
|
|
339
351
|
|
|
352
|
+
/**
|
|
353
|
+
* Build Antd placement string from BaseUI side and align values
|
|
354
|
+
* @param placement - Object with side and align properties
|
|
355
|
+
* @returns Antd placement string
|
|
356
|
+
*/
|
|
357
|
+
export declare function buildAntdPlacement(placement: BaseUIPlacement): AntdPlacement;
|
|
358
|
+
|
|
340
359
|
export declare const Button: (props: ButtonProps & {
|
|
341
360
|
ref?: React.ForwardedRef<HTMLButtonElement | HTMLAnchorElement>;
|
|
342
361
|
}) => ReturnType<typeof ButtonInner>;
|
|
@@ -414,7 +433,7 @@ export declare interface CheckboxProps extends CheckboxProps_2 {
|
|
|
414
433
|
* Checkbox appearance variant
|
|
415
434
|
* @default 'default'
|
|
416
435
|
*/
|
|
417
|
-
variant?:
|
|
436
|
+
variant?: "default" | "outlined";
|
|
418
437
|
}
|
|
419
438
|
|
|
420
439
|
export { CheckboxRef }
|
|
@@ -436,14 +455,14 @@ declare type Children = {
|
|
|
436
455
|
children?: default_2.ReactNode;
|
|
437
456
|
};
|
|
438
457
|
|
|
439
|
-
export declare const ChoiceList: <M extends boolean = false>({ items, multiple, value, onChange, searchProps, }: ChoiceListProps<M>) => JSX.Element;
|
|
458
|
+
export declare const ChoiceList: <M extends boolean = false>({ items, multiple, value, onChange, searchProps, className, ...rest }: ChoiceListProps<M>) => JSX.Element;
|
|
440
459
|
|
|
441
460
|
export declare type ChoiceListItem = {
|
|
442
461
|
label: React.ReactNode;
|
|
443
462
|
value?: string;
|
|
444
463
|
};
|
|
445
464
|
|
|
446
|
-
export declare interface ChoiceListProps<M extends boolean = false> {
|
|
465
|
+
export declare interface ChoiceListProps<M extends boolean = false> extends Omit<CommandProps, "value" | "onChange"> {
|
|
447
466
|
items: ChoiceListItem[];
|
|
448
467
|
multiple?: M;
|
|
449
468
|
value?: M extends true ? string[] : string;
|
|
@@ -934,8 +953,184 @@ export declare type ColorTokenValue = {
|
|
|
934
953
|
|
|
935
954
|
export { ColProps }
|
|
936
955
|
|
|
956
|
+
export declare const Combobox: default_2.ForwardRefExoticComponent<ComboboxProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
957
|
+
|
|
958
|
+
export declare interface ComboboxOption {
|
|
959
|
+
value: string | number;
|
|
960
|
+
label: default_2.ReactNode;
|
|
961
|
+
disabled?: boolean;
|
|
962
|
+
icon?: default_2.ReactNode;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
export declare interface ComboboxProps {
|
|
966
|
+
/** Array of options to be displayed in the combobox */
|
|
967
|
+
options?: ComboboxOption[];
|
|
968
|
+
/** Current value of the combobox */
|
|
969
|
+
value?: string | number | Array<string | number>;
|
|
970
|
+
/** Default value when uncontrolled */
|
|
971
|
+
defaultValue?: string | number | Array<string | number>;
|
|
972
|
+
/** Callback when value changes */
|
|
973
|
+
onChange?: (value: string | number | Array<string | number>) => void;
|
|
974
|
+
/** Placeholder text for the input */
|
|
975
|
+
placeholder?: string;
|
|
976
|
+
/** Whether the combobox is disabled */
|
|
977
|
+
disabled?: boolean;
|
|
978
|
+
/** Whether to allow clearing the selection */
|
|
979
|
+
allowClear?: boolean;
|
|
980
|
+
/** Whether to allow multiple selections */
|
|
981
|
+
multiple?: boolean;
|
|
982
|
+
/** Maximum number of tags to show */
|
|
983
|
+
maxTagCount?: number;
|
|
984
|
+
/** Whether to show search functionality */
|
|
985
|
+
showSearch?: boolean;
|
|
986
|
+
/** Controlled open state */
|
|
987
|
+
open?: boolean;
|
|
988
|
+
/** Callback when open state changes */
|
|
989
|
+
onOpenChange?: (open: boolean) => void;
|
|
990
|
+
/** Placement of the dropdown */
|
|
991
|
+
placement?: PopoverProps_2["placement"];
|
|
992
|
+
/** Custom className for the component */
|
|
993
|
+
className?: string;
|
|
994
|
+
/** Custom class names for different parts */
|
|
995
|
+
classNames?: {
|
|
996
|
+
trigger?: string;
|
|
997
|
+
input?: string;
|
|
998
|
+
option?: string;
|
|
999
|
+
optionIcon?: string;
|
|
1000
|
+
optionText?: string;
|
|
1001
|
+
};
|
|
1002
|
+
/** Size of the combobox */
|
|
1003
|
+
size?: "small" | "middle" | "large";
|
|
1004
|
+
/** Loading state */
|
|
1005
|
+
loading?: boolean;
|
|
1006
|
+
/** Custom render for options */
|
|
1007
|
+
optionRender?: (option: ComboboxOption, props: default_2.HTMLAttributes<HTMLElement>) => default_2.ReactElement;
|
|
1008
|
+
/** Filter function for search */
|
|
1009
|
+
filterOption?: boolean | ((input: string, option: ComboboxOption) => boolean);
|
|
1010
|
+
/** Callback when search input changes */
|
|
1011
|
+
onSearch?: (value: string) => void;
|
|
1012
|
+
/** Custom dropdown render */
|
|
1013
|
+
dropdownRender?: (menu: default_2.ReactElement) => default_2.ReactElement;
|
|
1014
|
+
/** Custom clear icon */
|
|
1015
|
+
clearIcon?: default_2.ReactNode;
|
|
1016
|
+
/** Custom suffix icon */
|
|
1017
|
+
suffixIcon?: default_2.ReactNode;
|
|
1018
|
+
/**
|
|
1019
|
+
* Props to pass to the dropdown menu
|
|
1020
|
+
*/
|
|
1021
|
+
dropdownMenuProps?: DropdownMenuProps;
|
|
1022
|
+
/**
|
|
1023
|
+
* Props to pass to the combobox trigger
|
|
1024
|
+
*/
|
|
1025
|
+
triggerProps?: ComboboxTriggerProps;
|
|
1026
|
+
searchProps?: {
|
|
1027
|
+
placeholder?: string;
|
|
1028
|
+
onValueChange?: (value: string) => void;
|
|
1029
|
+
value?: string;
|
|
1030
|
+
};
|
|
1031
|
+
/**
|
|
1032
|
+
* Show selection summary instead of individual tags when multiple
|
|
1033
|
+
* @default false
|
|
1034
|
+
*/
|
|
1035
|
+
showSelectionSummary?: boolean;
|
|
1036
|
+
/**
|
|
1037
|
+
* Render function for the selection summary in multiple case
|
|
1038
|
+
* @default (selectedValues) => `${selectedValues.length} items selected`
|
|
1039
|
+
*/
|
|
1040
|
+
selectionSummaryRender?: (selectedValues: Array<string | number>) => default_2.ReactNode;
|
|
1041
|
+
/**
|
|
1042
|
+
* Show select all option when in multiple mode
|
|
1043
|
+
* @default false
|
|
1044
|
+
*/
|
|
1045
|
+
showSelectAll?: boolean;
|
|
1046
|
+
/**
|
|
1047
|
+
* Render function for the select all option
|
|
1048
|
+
*/
|
|
1049
|
+
selectAllRender?: (props: {
|
|
1050
|
+
onSelectAll: () => void;
|
|
1051
|
+
onDeselectAll: () => void;
|
|
1052
|
+
checked: boolean;
|
|
1053
|
+
indeterminate: boolean;
|
|
1054
|
+
}) => default_2.ReactNode;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
export declare const ComboboxTrigger: default_2.ForwardRefExoticComponent<ComboboxTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
1058
|
+
|
|
1059
|
+
export declare interface ComboboxTriggerProps extends default_2.ComponentPropsWithoutRef<"button"> {
|
|
1060
|
+
/** Selected options */
|
|
1061
|
+
selectedOptions: ComboboxOption[];
|
|
1062
|
+
/** Placeholder text */
|
|
1063
|
+
placeholder?: string;
|
|
1064
|
+
/** Whether multiple selection is enabled */
|
|
1065
|
+
multiple?: boolean;
|
|
1066
|
+
/** Whether the component is disabled */
|
|
1067
|
+
disabled?: boolean;
|
|
1068
|
+
/** Whether the dropdown is open */
|
|
1069
|
+
open?: boolean;
|
|
1070
|
+
/** Size variant */
|
|
1071
|
+
size?: "small" | "middle" | "large";
|
|
1072
|
+
/** Whether to show clear button */
|
|
1073
|
+
allowClear?: boolean;
|
|
1074
|
+
/** Custom suffix icon */
|
|
1075
|
+
suffixIcon?: default_2.ReactNode;
|
|
1076
|
+
/** Custom clear icon */
|
|
1077
|
+
clearIcon?: default_2.ReactNode;
|
|
1078
|
+
/** Custom class names */
|
|
1079
|
+
classNames?: {
|
|
1080
|
+
trigger?: string;
|
|
1081
|
+
};
|
|
1082
|
+
/** Clear handler */
|
|
1083
|
+
onClear?: () => void;
|
|
1084
|
+
/** Show selection summary instead of individual tags when multiple */
|
|
1085
|
+
showSelectionSummary?: boolean;
|
|
1086
|
+
/** Render function for the selection summary in multiple case */
|
|
1087
|
+
selectionSummaryRender?: (selectedValues: Array<string | number>) => default_2.ReactNode;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
937
1090
|
declare type CommandFilter = (value: string, search: string, keywords?: string[]) => number;
|
|
938
1091
|
|
|
1092
|
+
declare type CommandProps = Children & DivProps & {
|
|
1093
|
+
/**
|
|
1094
|
+
* Accessible label for this command menu. Not shown visibly.
|
|
1095
|
+
*/
|
|
1096
|
+
label?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Optionally set to `false` to turn off the automatic filtering and sorting.
|
|
1099
|
+
* If `false`, you must conditionally render valid items based on the search query yourself.
|
|
1100
|
+
*/
|
|
1101
|
+
shouldFilter?: boolean;
|
|
1102
|
+
/**
|
|
1103
|
+
* Custom filter function for whether each command menu item should matches the given search query.
|
|
1104
|
+
* It should return a number between 0 and 1, with 1 being the best match and 0 being hidden entirely.
|
|
1105
|
+
* By default, uses the `command-score` library.
|
|
1106
|
+
*/
|
|
1107
|
+
filter?: CommandFilter;
|
|
1108
|
+
/**
|
|
1109
|
+
* Optional default item value when it is initially rendered.
|
|
1110
|
+
*/
|
|
1111
|
+
defaultValue?: string;
|
|
1112
|
+
/**
|
|
1113
|
+
* Optional controlled state of the selected command menu item.
|
|
1114
|
+
*/
|
|
1115
|
+
value?: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* Event handler called when the selected item of the menu changes.
|
|
1118
|
+
*/
|
|
1119
|
+
onValueChange?: (value: string) => void;
|
|
1120
|
+
/**
|
|
1121
|
+
* Optionally set to `true` to turn on looping around when using the arrow keys.
|
|
1122
|
+
*/
|
|
1123
|
+
loop?: boolean;
|
|
1124
|
+
/**
|
|
1125
|
+
* Optionally set to `true` to disable selection via pointer events.
|
|
1126
|
+
*/
|
|
1127
|
+
disablePointerSelection?: boolean;
|
|
1128
|
+
/**
|
|
1129
|
+
* Set to `false` to disable ctrl+n/j/p/k shortcuts. Defaults to `true`.
|
|
1130
|
+
*/
|
|
1131
|
+
vimBindings?: boolean;
|
|
1132
|
+
};
|
|
1133
|
+
|
|
939
1134
|
export declare type ComponentCategory = "Actions" | "General" | "Layout" | "Navigation" | "Data Entry" | "Data Display" | "Feedback" | "Overlay" | "Utility";
|
|
940
1135
|
|
|
941
1136
|
/**
|
|
@@ -1128,6 +1323,15 @@ export declare const componentMetadata: {
|
|
|
1128
1323
|
originalDocUrl: string;
|
|
1129
1324
|
description: string;
|
|
1130
1325
|
};
|
|
1326
|
+
Resizable: {
|
|
1327
|
+
name: string;
|
|
1328
|
+
link: string;
|
|
1329
|
+
base: "custom";
|
|
1330
|
+
refinements: string[];
|
|
1331
|
+
category: "Utility";
|
|
1332
|
+
packages: string[];
|
|
1333
|
+
description: string;
|
|
1334
|
+
};
|
|
1131
1335
|
Radio: {
|
|
1132
1336
|
name: string;
|
|
1133
1337
|
link: string;
|
|
@@ -1227,6 +1431,15 @@ export declare const componentMetadata: {
|
|
|
1227
1431
|
originalDocUrl: string;
|
|
1228
1432
|
description: string;
|
|
1229
1433
|
};
|
|
1434
|
+
Combobox: {
|
|
1435
|
+
name: string;
|
|
1436
|
+
link: string;
|
|
1437
|
+
base: "custom";
|
|
1438
|
+
refinements: string[];
|
|
1439
|
+
category: "Data Entry";
|
|
1440
|
+
packages: string[];
|
|
1441
|
+
description: string;
|
|
1442
|
+
};
|
|
1230
1443
|
ColorSelect: {
|
|
1231
1444
|
name: string;
|
|
1232
1445
|
link: string;
|
|
@@ -1597,26 +1810,121 @@ export declare const DROPDOWN_COLLISION_AVOIDANCE: {
|
|
|
1597
1810
|
readonly fallbackAxisSide: "none";
|
|
1598
1811
|
};
|
|
1599
1812
|
|
|
1600
|
-
export declare const DropdownMenu: ({ children, items, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange, className, itemRender, classNames, size, showSearch, searchProps, }: DropdownMenuProps) => JSX.Element;
|
|
1813
|
+
export declare const DropdownMenu: ({ children, items, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange, className, itemRender, classNames, size, showSearch, searchProps, popupMatchTriggerWidth, beforeList, afterList, keepOpenOnSelect, highlightedItemKey, selectedItemKeys, showCheckbox, }: DropdownMenuProps) => JSX.Element;
|
|
1814
|
+
|
|
1815
|
+
export declare const DropdownMenuItem: default_2.FC<DropdownMenuItemProps>;
|
|
1816
|
+
|
|
1817
|
+
export declare interface DropdownMenuItemProps {
|
|
1818
|
+
/** The menu item data */
|
|
1819
|
+
item: DropdownMenuItemType & {
|
|
1820
|
+
type: "item";
|
|
1821
|
+
};
|
|
1822
|
+
/** Custom render function for the item */
|
|
1823
|
+
itemRender?: (item: DropdownMenuItemType, props: default_2.HTMLAttributes<HTMLElement>) => default_2.ReactElement;
|
|
1824
|
+
/** Additional props to pass to the item */
|
|
1825
|
+
itemProps?: default_2.HTMLAttributes<HTMLElement>;
|
|
1826
|
+
/** Class names from parent DropdownMenu */
|
|
1827
|
+
classNames?: {
|
|
1828
|
+
item?: string;
|
|
1829
|
+
itemIcon?: string;
|
|
1830
|
+
itemText?: string;
|
|
1831
|
+
};
|
|
1832
|
+
onSelect?: () => void;
|
|
1833
|
+
/**
|
|
1834
|
+
* Whether the menu item is in a combobox
|
|
1835
|
+
*/
|
|
1836
|
+
inCombobox?: boolean;
|
|
1837
|
+
/**
|
|
1838
|
+
* Whether the menu item is in a menu
|
|
1839
|
+
*/
|
|
1840
|
+
renderAsNativeElement?: boolean;
|
|
1841
|
+
/**
|
|
1842
|
+
* Whether the menu item is selected (for combobox)
|
|
1843
|
+
* @default false
|
|
1844
|
+
*/
|
|
1845
|
+
selected?: boolean;
|
|
1846
|
+
/**
|
|
1847
|
+
* Whether to show checkbox (only for decoration purpose)
|
|
1848
|
+
*/
|
|
1849
|
+
showCheckbox?: boolean;
|
|
1850
|
+
/**
|
|
1851
|
+
* Whether the menu item checkbox is indeterminate (for combobox)
|
|
1852
|
+
* @default false
|
|
1853
|
+
*/
|
|
1854
|
+
indeterminate?: boolean;
|
|
1855
|
+
}
|
|
1601
1856
|
|
|
1602
1857
|
export declare type DropdownMenuItemType = {
|
|
1858
|
+
/**
|
|
1859
|
+
* The type of the menu item
|
|
1860
|
+
*/
|
|
1603
1861
|
type: "item";
|
|
1862
|
+
/**
|
|
1863
|
+
* The label of the menu item
|
|
1864
|
+
*/
|
|
1604
1865
|
label?: React.ReactNode;
|
|
1866
|
+
/**
|
|
1867
|
+
* Whether the menu item is disabled
|
|
1868
|
+
*/
|
|
1605
1869
|
disabled?: boolean;
|
|
1870
|
+
/**
|
|
1871
|
+
* The icon of the menu item
|
|
1872
|
+
*/
|
|
1606
1873
|
icon?: React.ReactNode;
|
|
1874
|
+
/**
|
|
1875
|
+
* The key of the menu item
|
|
1876
|
+
*/
|
|
1607
1877
|
key: React.Key;
|
|
1878
|
+
/**
|
|
1879
|
+
* The onClick event handler of the menu item
|
|
1880
|
+
*/
|
|
1608
1881
|
onClick?: React.HTMLAttributes<HTMLElement>["onClick"];
|
|
1882
|
+
/**
|
|
1883
|
+
* The onMouseEnter event handler of the menu item
|
|
1884
|
+
*/
|
|
1609
1885
|
onMouseEnter?: React.HTMLAttributes<HTMLElement>["onMouseEnter"];
|
|
1886
|
+
/**
|
|
1887
|
+
* The onMouseLeave event handler of the menu item
|
|
1888
|
+
*/
|
|
1610
1889
|
onMouseLeave?: React.HTMLAttributes<HTMLElement>["onMouseLeave"];
|
|
1890
|
+
/**
|
|
1891
|
+
* The onMouseOver event handler of the menu item
|
|
1892
|
+
*/
|
|
1611
1893
|
onMouseOver?: React.HTMLAttributes<HTMLElement>["onMouseOver"];
|
|
1894
|
+
/**
|
|
1895
|
+
* The onMouseOut event handler of the menu item
|
|
1896
|
+
*/
|
|
1612
1897
|
onMouseOut?: React.HTMLAttributes<HTMLElement>["onMouseOut"];
|
|
1898
|
+
/**
|
|
1899
|
+
* The className of the menu item
|
|
1900
|
+
*/
|
|
1901
|
+
className?: string;
|
|
1902
|
+
/**
|
|
1903
|
+
* Whether the menu item is a danger item
|
|
1904
|
+
*/
|
|
1613
1905
|
danger?: boolean;
|
|
1906
|
+
/**
|
|
1907
|
+
* The ref of the menu item
|
|
1908
|
+
*/
|
|
1614
1909
|
ref?: React.Ref<HTMLElement>;
|
|
1615
1910
|
} | {
|
|
1911
|
+
/**
|
|
1912
|
+
* The type of the menu item
|
|
1913
|
+
*/
|
|
1616
1914
|
type: "divider";
|
|
1617
1915
|
} | {
|
|
1916
|
+
/**
|
|
1917
|
+
* The type of the menu item
|
|
1918
|
+
*/
|
|
1618
1919
|
type: "header";
|
|
1920
|
+
/**
|
|
1921
|
+
* The title of the menu item
|
|
1922
|
+
*/
|
|
1619
1923
|
title?: React.ReactNode;
|
|
1924
|
+
/**
|
|
1925
|
+
* The className of the menu item
|
|
1926
|
+
*/
|
|
1927
|
+
className?: string;
|
|
1620
1928
|
};
|
|
1621
1929
|
|
|
1622
1930
|
export declare interface DropdownMenuProps {
|
|
@@ -1680,6 +1988,37 @@ export declare interface DropdownMenuProps {
|
|
|
1680
1988
|
* Search placeholder
|
|
1681
1989
|
*/
|
|
1682
1990
|
searchProps?: Omit<React.ComponentProps<typeof pkg.Input>, "size" | "ref">;
|
|
1991
|
+
/**
|
|
1992
|
+
* Whether to match the width of the popup with the trigger
|
|
1993
|
+
* @default false
|
|
1994
|
+
*/
|
|
1995
|
+
popupMatchTriggerWidth?: boolean;
|
|
1996
|
+
/**
|
|
1997
|
+
* Content to display before the list
|
|
1998
|
+
*/
|
|
1999
|
+
beforeList?: React.ReactNode;
|
|
2000
|
+
/**
|
|
2001
|
+
* Content to display after the list
|
|
2002
|
+
*/
|
|
2003
|
+
afterList?: React.ReactNode;
|
|
2004
|
+
/**
|
|
2005
|
+
* Whether to keep the dropdown open when an item is selected
|
|
2006
|
+
* @default false
|
|
2007
|
+
*/
|
|
2008
|
+
keepOpenOnSelect?: boolean;
|
|
2009
|
+
/**
|
|
2010
|
+
* Control the highlighted state of the menu item
|
|
2011
|
+
*/
|
|
2012
|
+
highlightedItemKey?: React.Key;
|
|
2013
|
+
/**
|
|
2014
|
+
* Control the selected state of the menu item
|
|
2015
|
+
*/
|
|
2016
|
+
selectedItemKeys?: React.Key[];
|
|
2017
|
+
/**
|
|
2018
|
+
* Whether to show checkbox
|
|
2019
|
+
* @default false
|
|
2020
|
+
*/
|
|
2021
|
+
showCheckbox?: boolean;
|
|
1683
2022
|
}
|
|
1684
2023
|
|
|
1685
2024
|
export { DropDownProps }
|
|
@@ -1818,6 +2157,8 @@ export declare const getColorsByTheme: <T extends ColorTokens>(colorsOrTokens: T
|
|
|
1818
2157
|
*/
|
|
1819
2158
|
export declare const getComponentsByCategory: () => Record<ComponentCategory, ComponentMetadata[]>;
|
|
1820
2159
|
|
|
2160
|
+
export declare const getReactElementProp: <T>(el: React.ReactElement, propKey: string, defaultValue?: T) => T;
|
|
2161
|
+
|
|
1821
2162
|
/**
|
|
1822
2163
|
* Get sequential chart colors for a specific palette and theme
|
|
1823
2164
|
*/
|
|
@@ -1935,9 +2276,9 @@ declare const MainCheckboxInner: ({ variant, className, ...props }: CheckboxProp
|
|
|
1935
2276
|
|
|
1936
2277
|
declare const MainInputInner: (props: InputProps, ref: React.Ref<InputRef>) => JSX.Element;
|
|
1937
2278
|
|
|
1938
|
-
declare const MainSegmentedInner: <T>(
|
|
2279
|
+
declare const MainSegmentedInner: <T>(props: SegmentedProps<T>, ref: React.Ref<React.ComponentRef<typeof default_5>>) => JSX.Element;
|
|
1939
2280
|
|
|
1940
|
-
declare const MainSelectInner: <ValueType = unknown, OptionType extends SelectBaseOptionType | SelectDefaultOptionType = SelectDefaultOptionType>({ mode, className, open: openProp, defaultOpen, onOpenChange, popupClassName, onDropdownVisibleChange, enhancePositioner, getPopupContainer, popupSize, popupRender, dropdownRender, classNames, styles, ...rest }: SelectProps<ValueType, OptionType>, ref: default_2.Ref<default_2.ComponentRef<typeof default_3>>) => JSX.Element;
|
|
2281
|
+
declare const MainSelectInner: <ValueType = unknown, OptionType extends SelectBaseOptionType | SelectDefaultOptionType = SelectDefaultOptionType>({ mode, className, open: openProp, defaultOpen, onOpenChange, popupClassName, onDropdownVisibleChange, enhancePositioner, getPopupContainer, popupSize, popupRender, dropdownRender, classNames, styles, showSelectionSummary, selectionSummaryRender, value: valueProp, onChange: onChangeProp, defaultValue, showSelectAll, selectAllRender, options, ...rest }: SelectProps<ValueType, OptionType>, ref: default_2.Ref<default_2.ComponentRef<typeof default_3>>) => JSX.Element;
|
|
1941
2282
|
|
|
1942
2283
|
declare const MainSwitchInner: ({ ...rest }: SwitchProps, ref: React.Ref<React.ComponentRef<typeof default_4>>) => JSX.Element;
|
|
1943
2284
|
|
|
@@ -2137,10 +2478,12 @@ export { Pagination }
|
|
|
2137
2478
|
|
|
2138
2479
|
export { PaginationProps }
|
|
2139
2480
|
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2481
|
+
/**
|
|
2482
|
+
* Parse Antd placement string into BaseUI side and align values
|
|
2483
|
+
* @param placement - Antd placement string (e.g., "bottomLeft", "top", "rightTop")
|
|
2484
|
+
* @returns Object with side and align properties for BaseUI components
|
|
2485
|
+
*/
|
|
2486
|
+
export declare function parseAntdPlacement(placement?: AntdPlacement): BaseUIPlacement;
|
|
2144
2487
|
|
|
2145
2488
|
declare const PasswordInner: (props: PasswordProps, ref: React.Ref<InputRef>) => JSX.Element;
|
|
2146
2489
|
|
|
@@ -2336,9 +2679,9 @@ export declare const POPUP_COLLISION_AVOIDANCE: {
|
|
|
2336
2679
|
readonly fallbackAxisSide: "end";
|
|
2337
2680
|
};
|
|
2338
2681
|
|
|
2339
|
-
export declare const PopupPanel: ({ children, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange, content, title, trigger, className, anchor, beforeCloseButton, afterCloseButton, afterTitle, size, footer, defaultOpen, resizable, classNames, modal, closeOnClickOutside, }: PopupPanelProps) => JSX.Element;
|
|
2682
|
+
export declare const PopupPanel: ({ children, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange, content, title, trigger, className, anchor, beforeCloseButton, afterCloseButton, afterTitle, size, footer, defaultOpen, resizable, draggable, maintainAspectRatio, classNames, modal, closeOnClickOutside, onPlacementChange, ...rest }: PopupPanelProps) => JSX.Element;
|
|
2340
2683
|
|
|
2341
|
-
export declare interface PopupPanelProps extends Omit<React.ComponentPropsWithRef<"div">, "title" | "content" | "children"> {
|
|
2684
|
+
export declare interface PopupPanelProps extends Omit<React.ComponentPropsWithRef<"div">, "title" | "content" | "children">, Omit<Popover_2.Root.Props, "children"> {
|
|
2342
2685
|
/** The trigger element that opens the popup panel */
|
|
2343
2686
|
children?: React.ComponentProps<typeof Popover_2.Trigger>["render"];
|
|
2344
2687
|
/** Placement of the popup panel relative to its trigger */
|
|
@@ -2393,6 +2736,17 @@ export declare interface PopupPanelProps extends Omit<React.ComponentPropsWithRe
|
|
|
2393
2736
|
* @default false
|
|
2394
2737
|
*/
|
|
2395
2738
|
resizable?: boolean;
|
|
2739
|
+
/**
|
|
2740
|
+
* Whether the panel should be draggable
|
|
2741
|
+
* @default false
|
|
2742
|
+
*/
|
|
2743
|
+
draggable?: boolean;
|
|
2744
|
+
/**
|
|
2745
|
+
* Whether to maintain aspect ratio when resizing
|
|
2746
|
+
* Only applies when resizable is true
|
|
2747
|
+
* @default false
|
|
2748
|
+
*/
|
|
2749
|
+
maintainAspectRatio?: boolean;
|
|
2396
2750
|
/**
|
|
2397
2751
|
* Custom class names for different parts of the popup panel
|
|
2398
2752
|
* @default {}
|
|
@@ -2417,6 +2771,10 @@ export declare interface PopupPanelProps extends Omit<React.ComponentPropsWithRe
|
|
|
2417
2771
|
* @default false
|
|
2418
2772
|
*/
|
|
2419
2773
|
modal?: Popover_2.Root.Props["modal"];
|
|
2774
|
+
/**
|
|
2775
|
+
* Callback function when the placement changes
|
|
2776
|
+
*/
|
|
2777
|
+
onPlacementChange?: (placement: PopoverProps_2["placement"]) => void;
|
|
2420
2778
|
}
|
|
2421
2779
|
|
|
2422
2780
|
declare enum PopupPanelSize {
|
|
@@ -2927,6 +3285,74 @@ export { RefSelectProps }
|
|
|
2927
3285
|
|
|
2928
3286
|
declare type RefType<T extends FieldType> = T extends "input" ? InputRef : T extends "select" ? RefSelectProps_2 : never;
|
|
2929
3287
|
|
|
3288
|
+
export declare const Resizable: ({ children, resizable, handles, absolutePositioning, classNames, className: containerClassName, style: containerStyle, resetKey, maxWidth, maxHeight, minWidth, minHeight, onResize, maintainAspectRatio, ...rest }: ResizableProps) => JSX.Element;
|
|
3289
|
+
|
|
3290
|
+
export declare interface ResizableProps extends WithRenderPropProps {
|
|
3291
|
+
/**
|
|
3292
|
+
* Single React element child that will be enhanced with resize handles
|
|
3293
|
+
*/
|
|
3294
|
+
children: default_2.ReactNode;
|
|
3295
|
+
/**
|
|
3296
|
+
* Whether the component should be resizable
|
|
3297
|
+
* @default false
|
|
3298
|
+
*/
|
|
3299
|
+
resizable?: boolean;
|
|
3300
|
+
/**
|
|
3301
|
+
* Configure which resize handles to show
|
|
3302
|
+
* @default { bottom: true, right: true, left: true, top: true }
|
|
3303
|
+
*/
|
|
3304
|
+
handles?: {
|
|
3305
|
+
bottom?: boolean;
|
|
3306
|
+
right?: boolean;
|
|
3307
|
+
left?: boolean;
|
|
3308
|
+
top?: boolean;
|
|
3309
|
+
};
|
|
3310
|
+
/**
|
|
3311
|
+
* Whether to use absolute positioning for left handle resizing
|
|
3312
|
+
* Set to true when used in absolutely positioned containers like PopupPanel
|
|
3313
|
+
* @default false
|
|
3314
|
+
*/
|
|
3315
|
+
absolutePositioning?: boolean;
|
|
3316
|
+
/**
|
|
3317
|
+
* Custom class names for different parts of the resizable component
|
|
3318
|
+
*/
|
|
3319
|
+
classNames?: {
|
|
3320
|
+
root?: string;
|
|
3321
|
+
resizeHandle?: string;
|
|
3322
|
+
};
|
|
3323
|
+
/**
|
|
3324
|
+
* Key to reset dimensions to current element size
|
|
3325
|
+
* When this value changes, the component will recalculate its dimensions
|
|
3326
|
+
* Similar to React's key prop pattern for forcing component resets
|
|
3327
|
+
*/
|
|
3328
|
+
resetKey?: default_2.Key;
|
|
3329
|
+
/**
|
|
3330
|
+
* Maximum width the component can be resized to
|
|
3331
|
+
*/
|
|
3332
|
+
maxWidth?: number;
|
|
3333
|
+
/**
|
|
3334
|
+
* Maximum height the component can be resized to
|
|
3335
|
+
*/
|
|
3336
|
+
maxHeight?: number;
|
|
3337
|
+
/**
|
|
3338
|
+
* Minimum width the component can be resized to
|
|
3339
|
+
*/
|
|
3340
|
+
minWidth?: number;
|
|
3341
|
+
/**
|
|
3342
|
+
* Minimum height the component can be resized to
|
|
3343
|
+
*/
|
|
3344
|
+
minHeight?: number;
|
|
3345
|
+
/**
|
|
3346
|
+
* Callback fired during resize operations
|
|
3347
|
+
*/
|
|
3348
|
+
onResize?: (values: MoveValues) => void;
|
|
3349
|
+
/**
|
|
3350
|
+
* Whether to maintain aspect ratio during resize
|
|
3351
|
+
* @default false
|
|
3352
|
+
*/
|
|
3353
|
+
maintainAspectRatio?: boolean;
|
|
3354
|
+
}
|
|
3355
|
+
|
|
2930
3356
|
/**
|
|
2931
3357
|
* Resolves chart color tokens by replacing reference strings with actual values.
|
|
2932
3358
|
* @returns Record of token names to resolved light/dark color objects
|
|
@@ -3012,6 +3438,29 @@ export declare interface SelectProps<ValueType = unknown, OptionType extends Sel
|
|
|
3012
3438
|
* Will be ignored if enhancePositioner is false
|
|
3013
3439
|
*/
|
|
3014
3440
|
popupSize?: string | number | PopupPanelSize;
|
|
3441
|
+
/**
|
|
3442
|
+
* Show selection summary instead of tags in multiple case
|
|
3443
|
+
* @default false
|
|
3444
|
+
*/
|
|
3445
|
+
showSelectionSummary?: boolean;
|
|
3446
|
+
/**
|
|
3447
|
+
* Render function for the selection summary in multiple case
|
|
3448
|
+
* @default (value) => `${value.length} items selected`
|
|
3449
|
+
*/
|
|
3450
|
+
selectionSummaryRender?: (value: ValueType) => default_2.ReactNode;
|
|
3451
|
+
/**
|
|
3452
|
+
* Show select all option when in multiple mode
|
|
3453
|
+
* @default false
|
|
3454
|
+
*/
|
|
3455
|
+
showSelectAll?: boolean;
|
|
3456
|
+
/**
|
|
3457
|
+
* Render function for the select all option
|
|
3458
|
+
*/
|
|
3459
|
+
selectAllRender?: (props: {
|
|
3460
|
+
onClick: () => void;
|
|
3461
|
+
checked: CheckboxProps["checked"];
|
|
3462
|
+
indeterminate: CheckboxProps["indeterminate"];
|
|
3463
|
+
}) => default_2.ReactNode;
|
|
3015
3464
|
}
|
|
3016
3465
|
|
|
3017
3466
|
export declare const SEQUENTIAL_PALETTE_NAMES: readonly ["YlOrBr", "YlOrRd", "OrRd", "PuRd", "RdPu", "BuPu", "GnBu", "PuBu", "YlGnBu", "PuBuGn", "BuGn", "YlGn"];
|
|
@@ -3038,23 +3487,23 @@ export { Space }
|
|
|
3038
3487
|
|
|
3039
3488
|
export { SpaceProps }
|
|
3040
3489
|
|
|
3041
|
-
export declare const Spin: ({ indicator, size, ...rest }: SpinProps) => JSX.Element;
|
|
3490
|
+
export declare const Spin: ({ indicator, size, className, ...rest }: SpinProps) => JSX.Element;
|
|
3042
3491
|
|
|
3043
3492
|
export declare type SpinProps = Omit<SpinProps_2, "size"> & {
|
|
3044
3493
|
size?: "small" | "default" | "large" | number;
|
|
3045
3494
|
};
|
|
3046
3495
|
|
|
3047
3496
|
export declare const Split: FC<PropsWithChildren<SplitterProps>> & {
|
|
3048
|
-
Panel:
|
|
3497
|
+
Panel: ForwardRefExoticComponent<Omit<SplitterPanelProps, "ref"> & RefAttributes<HTMLElement>>;
|
|
3049
3498
|
};
|
|
3050
3499
|
|
|
3051
3500
|
export declare const Splitter: FC<PropsWithChildren<SplitterProps>> & {
|
|
3052
|
-
Panel:
|
|
3501
|
+
Panel: ForwardRefExoticComponent<Omit<SplitterPanelProps, "ref"> & RefAttributes<HTMLElement>>;
|
|
3053
3502
|
};
|
|
3054
3503
|
|
|
3055
3504
|
export declare type SplitterPanelProps = InternalPanelProps & {
|
|
3056
|
-
children?: default_2.ReactNode
|
|
3057
|
-
} & default_2.RefAttributes<
|
|
3505
|
+
children?: default_2.ReactNode;
|
|
3506
|
+
} & default_2.RefAttributes<HTMLElement> & {
|
|
3058
3507
|
/**
|
|
3059
3508
|
* Default size of the panel. Can be a percentage string, number, or CSS intrinsic sizing values
|
|
3060
3509
|
*/
|
|
@@ -3429,8 +3878,8 @@ declare type UniqueIdentifier = string | number;
|
|
|
3429
3878
|
export { unstableSetRender }
|
|
3430
3879
|
|
|
3431
3880
|
export declare const Upload: (({ showRemoveButton, className, fileList, children, ...restProps }: UploadProps) => JSX.Element) & {
|
|
3432
|
-
Dragger: ({ children, uploadTitle, uploadDescription, itemRender, ...rest }: DraggerProps) => JSX.Element;
|
|
3433
|
-
Item: ({ fileName, fileType, status, percent, removable, onRemove, extraActions, }: UploadItemProps_2) => JSX.Element;
|
|
3881
|
+
Dragger: ({ children, uploadTitle, uploadDescription, itemRender, className, ...rest }: DraggerProps) => JSX.Element;
|
|
3882
|
+
Item: ({ fileName, fileType, status, percent, removable, onRemove, extraActions, className, ...rest }: UploadItemProps_2) => JSX.Element;
|
|
3434
3883
|
};
|
|
3435
3884
|
|
|
3436
3885
|
export { UploadChangeParam }
|
|
@@ -3439,7 +3888,7 @@ export { UploadFile }
|
|
|
3439
3888
|
|
|
3440
3889
|
export declare type UploadFileStatus = "error" | "done" | "uploading" | "removed" | "pending";
|
|
3441
3890
|
|
|
3442
|
-
export declare interface UploadItemProps {
|
|
3891
|
+
export declare interface UploadItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3443
3892
|
fileName: string;
|
|
3444
3893
|
fileType?: string;
|
|
3445
3894
|
status?: UploadFileStatus;
|
|
@@ -3535,6 +3984,10 @@ T | undefined,
|
|
|
3535
3984
|
*/
|
|
3536
3985
|
export declare const useCSSVariables: (variables: string | string[]) => Record<string, string>;
|
|
3537
3986
|
|
|
3987
|
+
export declare function useDraggable(enabled?: boolean): {
|
|
3988
|
+
ref: (element: HTMLElement | null) => () => void;
|
|
3989
|
+
};
|
|
3990
|
+
|
|
3538
3991
|
export declare const useDS: () => {
|
|
3539
3992
|
theme: "light" | "dark";
|
|
3540
3993
|
};
|
|
@@ -3549,6 +4002,11 @@ export declare const useGetPrefixCls: () => {
|
|
|
3549
4002
|
getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
|
|
3550
4003
|
};
|
|
3551
4004
|
|
|
4005
|
+
export declare function useHover<T extends HTMLElement>(): [
|
|
4006
|
+
(node: T) => void,
|
|
4007
|
+
boolean
|
|
4008
|
+
];
|
|
4009
|
+
|
|
3552
4010
|
export declare function useLatestRef<T>(value: T): RefObject<T>;
|
|
3553
4011
|
|
|
3554
4012
|
export declare const useMessage: () => MessageInstance;
|