@bioturing/components 0.27.0 → 0.29.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/breadcrumb/style.css +1 -1
- package/dist/components/checkbox/component.js.map +1 -1
- package/dist/components/checkbox/style.css +1 -1
- package/dist/components/choice-list/component.js +102 -42
- package/dist/components/choice-list/component.js.map +1 -1
- package/dist/components/choice-list/style.css +1 -1
- package/dist/components/cmdk/index.js.map +1 -1
- package/dist/components/color-select/style.css +1 -1
- package/dist/components/combobox/component.js +232 -0
- package/dist/components/combobox/component.js.map +1 -0
- package/dist/components/combobox/style.css +1 -0
- package/dist/components/drag-drop/style.css +1 -1
- package/dist/components/dropdown-menu/component.js +181 -160
- 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/ds-root/component.js +22 -17
- package/dist/components/ds-root/component.js.map +1 -1
- package/dist/components/ds-root/style.css +1 -1
- package/dist/components/form/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/modal/style.css +1 -1
- package/dist/components/nav/item.js +2 -2
- package/dist/components/nav/style.css +1 -1
- package/dist/components/popup-panel/component.js +81 -92
- package/dist/components/popup-panel/component.js.map +1 -1
- package/dist/components/resizable/component.js +165 -97
- package/dist/components/resizable/component.js.map +1 -1
- package/dist/components/resizable/style.css +1 -1
- package/dist/components/scroll-area/component.js +70 -24
- package/dist/components/scroll-area/component.js.map +1 -1
- package/dist/components/scroll-area/style.css +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/select-trigger/component.js +150 -0
- package/dist/components/select-trigger/component.js.map +1 -0
- package/dist/components/select-trigger/style.css +1 -0
- package/dist/components/splitter/splitter-panel.js +8 -8
- package/dist/components/splitter/splitter.js +9 -9
- package/dist/components/splitter/useSizes.js +10 -10
- package/dist/components/splitter/useSizes.js.map +1 -1
- package/dist/components/stack/StackChild.js +9 -9
- package/dist/components/switch/style.css +1 -1
- package/dist/components/table/style.css +1 -1
- package/dist/components/theme-provider/component.js.map +1 -1
- package/dist/components/theme-provider/style.css +1 -1
- package/dist/components/tour/style.css +1 -1
- package/dist/components/transition/component.js +1 -1
- package/dist/components/transition/component.js.map +1 -1
- package/dist/components/utils/WithRenderProp.js.map +1 -1
- package/dist/index.d.ts +355 -12
- package/dist/index.js +198 -188
- package/dist/index.js.map +1 -1
- package/dist/metadata.js +21 -7
- package/dist/metadata.js.map +1 -1
- package/dist/tokens/and-theme/tokens.js +12 -12
- package/dist/tokens/and-theme/tokens.js.map +1 -1
- package/package.json +8 -7
package/dist/index.d.ts
CHANGED
|
@@ -248,6 +248,7 @@ import { useLayoutEffect } from 'react';
|
|
|
248
248
|
import { useRender } from '@base-ui-components/react/use-render';
|
|
249
249
|
import { useRender as useRender_2 } from '@base-ui-components/react';
|
|
250
250
|
import { useWatch } from 'antd/es/form/Form';
|
|
251
|
+
import { ValidateStatus } from 'antd/es/form/FormItem';
|
|
251
252
|
import { version } from 'antd';
|
|
252
253
|
import { Watermark } from 'antd';
|
|
253
254
|
import { WatermarkProps } from 'antd';
|
|
@@ -433,7 +434,7 @@ export declare interface CheckboxProps extends CheckboxProps_2 {
|
|
|
433
434
|
* Checkbox appearance variant
|
|
434
435
|
* @default 'default'
|
|
435
436
|
*/
|
|
436
|
-
variant?:
|
|
437
|
+
variant?: "default" | "outlined";
|
|
437
438
|
}
|
|
438
439
|
|
|
439
440
|
export { CheckboxRef }
|
|
@@ -455,19 +456,26 @@ declare type Children = {
|
|
|
455
456
|
children?: default_2.ReactNode;
|
|
456
457
|
};
|
|
457
458
|
|
|
458
|
-
export declare const ChoiceList: <M extends boolean = false>({ items, multiple, value, onChange, searchProps, className, ...rest }: ChoiceListProps<M>) => JSX.Element;
|
|
459
|
+
export declare const ChoiceList: <M extends boolean = false>({ items, multiple, value, defaultValue, onChange, searchProps, showSelectAll, className, placeholder, ...rest }: ChoiceListProps<M>) => JSX.Element;
|
|
459
460
|
|
|
460
461
|
export declare type ChoiceListItem = {
|
|
461
462
|
label: React.ReactNode;
|
|
462
463
|
value?: string;
|
|
463
464
|
};
|
|
464
465
|
|
|
465
|
-
export declare interface ChoiceListProps<M extends boolean = false> extends Omit<CommandProps, "value" | "onChange"> {
|
|
466
|
+
export declare interface ChoiceListProps<M extends boolean = false> extends Omit<CommandProps, "value" | "onChange" | "defaultValue"> {
|
|
466
467
|
items: ChoiceListItem[];
|
|
467
468
|
multiple?: M;
|
|
468
469
|
value?: M extends true ? string[] : string;
|
|
470
|
+
defaultValue?: M extends true ? string[] : string;
|
|
469
471
|
onChange?: (value: M extends true ? string[] : string) => void;
|
|
470
472
|
searchProps?: React.ComponentProps<typeof pkg.Input>;
|
|
473
|
+
/**
|
|
474
|
+
* Show select all option when in multiple mode
|
|
475
|
+
* @default false
|
|
476
|
+
*/
|
|
477
|
+
showSelectAll?: boolean;
|
|
478
|
+
placeholder?: string;
|
|
471
479
|
}
|
|
472
480
|
|
|
473
481
|
export declare interface ClassArray extends Array<ClassValue> {
|
|
@@ -953,6 +961,109 @@ export declare type ColorTokenValue = {
|
|
|
953
961
|
|
|
954
962
|
export { ColProps }
|
|
955
963
|
|
|
964
|
+
export declare const Combobox: default_2.ForwardRefExoticComponent<ComboboxProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
965
|
+
|
|
966
|
+
export declare interface ComboboxOption {
|
|
967
|
+
value: string | number;
|
|
968
|
+
label: default_2.ReactNode;
|
|
969
|
+
disabled?: boolean;
|
|
970
|
+
icon?: default_2.ReactNode;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
export declare interface ComboboxProps {
|
|
974
|
+
/** Array of options to be displayed in the combobox */
|
|
975
|
+
options?: ComboboxOption[];
|
|
976
|
+
/** Current value of the combobox */
|
|
977
|
+
value?: string | number | Array<string | number>;
|
|
978
|
+
/** Default value when uncontrolled */
|
|
979
|
+
defaultValue?: string | number | Array<string | number>;
|
|
980
|
+
/** Callback when value changes */
|
|
981
|
+
onChange?: (value: string | number | Array<string | number>) => void;
|
|
982
|
+
/** Placeholder text for the input */
|
|
983
|
+
placeholder?: string;
|
|
984
|
+
/** Whether the combobox is disabled */
|
|
985
|
+
disabled?: boolean;
|
|
986
|
+
/** Validation status */
|
|
987
|
+
status?: ValidateStatus;
|
|
988
|
+
/** Whether to allow clearing the selection */
|
|
989
|
+
allowClear?: boolean;
|
|
990
|
+
/** Whether to allow multiple selections */
|
|
991
|
+
multiple?: boolean;
|
|
992
|
+
/** Maximum number of tags to show */
|
|
993
|
+
maxTagCount?: number;
|
|
994
|
+
/** Whether to show search functionality */
|
|
995
|
+
showSearch?: boolean;
|
|
996
|
+
/** Controlled open state */
|
|
997
|
+
open?: boolean;
|
|
998
|
+
/** Callback when open state changes */
|
|
999
|
+
onOpenChange?: (open: boolean) => void;
|
|
1000
|
+
/** Placement of the dropdown */
|
|
1001
|
+
placement?: PopoverProps_2["placement"];
|
|
1002
|
+
/** Custom className for the component */
|
|
1003
|
+
className?: string;
|
|
1004
|
+
/** Custom class names for different parts */
|
|
1005
|
+
classNames?: {
|
|
1006
|
+
trigger?: string;
|
|
1007
|
+
input?: string;
|
|
1008
|
+
option?: string;
|
|
1009
|
+
optionIcon?: string;
|
|
1010
|
+
optionText?: string;
|
|
1011
|
+
};
|
|
1012
|
+
/** Size of the combobox */
|
|
1013
|
+
size?: "small" | "middle" | "large";
|
|
1014
|
+
/** Loading state */
|
|
1015
|
+
loading?: boolean;
|
|
1016
|
+
/** Custom render for options */
|
|
1017
|
+
optionRender?: (option: ComboboxOption, props: default_2.HTMLAttributes<HTMLElement>) => default_2.ReactElement;
|
|
1018
|
+
/** Filter function for search */
|
|
1019
|
+
filterOption?: boolean | ((input: string, option: ComboboxOption) => boolean);
|
|
1020
|
+
/** Callback when search input changes */
|
|
1021
|
+
onSearch?: (value: string) => void;
|
|
1022
|
+
/** Custom dropdown render */
|
|
1023
|
+
dropdownRender?: (menu: default_2.ReactElement) => default_2.ReactElement;
|
|
1024
|
+
/** Custom clear icon */
|
|
1025
|
+
clearIcon?: default_2.ReactNode;
|
|
1026
|
+
/** Custom suffix icon */
|
|
1027
|
+
suffixIcon?: default_2.ReactNode;
|
|
1028
|
+
/**
|
|
1029
|
+
* Props to pass to the dropdown menu
|
|
1030
|
+
*/
|
|
1031
|
+
dropdownMenuProps?: DropdownMenuProps;
|
|
1032
|
+
/**
|
|
1033
|
+
* Props to pass to the combobox trigger
|
|
1034
|
+
*/
|
|
1035
|
+
triggerProps?: default_2.ComponentPropsWithoutRef<typeof SelectTrigger>;
|
|
1036
|
+
searchProps?: {
|
|
1037
|
+
placeholder?: string;
|
|
1038
|
+
onValueChange?: (value: string) => void;
|
|
1039
|
+
value?: string;
|
|
1040
|
+
};
|
|
1041
|
+
/**
|
|
1042
|
+
* Show selection summary instead of individual tags when multiple
|
|
1043
|
+
* @default false
|
|
1044
|
+
*/
|
|
1045
|
+
showSelectionSummary?: boolean;
|
|
1046
|
+
/**
|
|
1047
|
+
* Render function for the selection summary in multiple case
|
|
1048
|
+
* @default (selectedValues) => `${selectedValues.length} items selected`
|
|
1049
|
+
*/
|
|
1050
|
+
selectionSummaryRender?: (selectedValues: Array<string | number>) => default_2.ReactNode;
|
|
1051
|
+
/**
|
|
1052
|
+
* Show select all option when in multiple mode
|
|
1053
|
+
* @default false
|
|
1054
|
+
*/
|
|
1055
|
+
showSelectAll?: boolean;
|
|
1056
|
+
/**
|
|
1057
|
+
* Render function for the select all option
|
|
1058
|
+
*/
|
|
1059
|
+
selectAllRender?: (props: {
|
|
1060
|
+
onSelectAll: () => void;
|
|
1061
|
+
onDeselectAll: () => void;
|
|
1062
|
+
checked: boolean;
|
|
1063
|
+
indeterminate: boolean;
|
|
1064
|
+
}) => default_2.ReactNode;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
956
1067
|
declare type CommandFilter = (value: string, search: string, keywords?: string[]) => number;
|
|
957
1068
|
|
|
958
1069
|
declare type CommandProps = Children & DivProps & {
|
|
@@ -1297,6 +1408,15 @@ export declare const componentMetadata: {
|
|
|
1297
1408
|
originalDocUrl: string;
|
|
1298
1409
|
description: string;
|
|
1299
1410
|
};
|
|
1411
|
+
Combobox: {
|
|
1412
|
+
name: string;
|
|
1413
|
+
link: string;
|
|
1414
|
+
base: "custom";
|
|
1415
|
+
refinements: string[];
|
|
1416
|
+
category: "Data Entry";
|
|
1417
|
+
packages: string[];
|
|
1418
|
+
description: string;
|
|
1419
|
+
};
|
|
1300
1420
|
ColorSelect: {
|
|
1301
1421
|
name: string;
|
|
1302
1422
|
link: string;
|
|
@@ -1427,7 +1547,7 @@ export { Descriptions }
|
|
|
1427
1547
|
|
|
1428
1548
|
export { DescriptionsProps }
|
|
1429
1549
|
|
|
1430
|
-
declare const DirectoryTreeInner: <T extends DataNode =
|
|
1550
|
+
declare const DirectoryTreeInner: <T extends DataNode = TreeDataNode>(props: DirectoryTreeProps<T>, ref: React.Ref<React.ComponentRef<typeof default_7<T>>>) => JSX.Element;
|
|
1431
1551
|
|
|
1432
1552
|
export declare interface DirectoryTreeProps<T extends DataNode = TreeDataNode> extends Omit<DirectoryTreeProps_2<T>, "treeData" | "expandedKeys" | "defaultExpandedKeys" | "onExpand" | "checkedKeys" | "defaultCheckedKeys" | "onCheck" | "draggable"> {
|
|
1433
1553
|
treeData?: T[];
|
|
@@ -1667,26 +1787,121 @@ export declare const DROPDOWN_COLLISION_AVOIDANCE: {
|
|
|
1667
1787
|
readonly fallbackAxisSide: "none";
|
|
1668
1788
|
};
|
|
1669
1789
|
|
|
1670
|
-
export declare const DropdownMenu: ({ children, items, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange, className, itemRender, classNames, size, showSearch, searchProps, }: DropdownMenuProps) => JSX.Element;
|
|
1790
|
+
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;
|
|
1791
|
+
|
|
1792
|
+
export declare const DropdownMenuItem: default_2.FC<DropdownMenuItemProps>;
|
|
1793
|
+
|
|
1794
|
+
export declare interface DropdownMenuItemProps {
|
|
1795
|
+
/** The menu item data */
|
|
1796
|
+
item: DropdownMenuItemType & {
|
|
1797
|
+
type: "item";
|
|
1798
|
+
};
|
|
1799
|
+
/** Custom render function for the item */
|
|
1800
|
+
itemRender?: (item: DropdownMenuItemType, props: default_2.HTMLAttributes<HTMLElement>) => default_2.ReactElement;
|
|
1801
|
+
/** Additional props to pass to the item */
|
|
1802
|
+
itemProps?: default_2.HTMLAttributes<HTMLElement>;
|
|
1803
|
+
/** Class names from parent DropdownMenu */
|
|
1804
|
+
classNames?: {
|
|
1805
|
+
item?: string;
|
|
1806
|
+
itemIcon?: string;
|
|
1807
|
+
itemText?: string;
|
|
1808
|
+
};
|
|
1809
|
+
onSelect?: () => void;
|
|
1810
|
+
/**
|
|
1811
|
+
* Whether the menu item is in a combobox
|
|
1812
|
+
*/
|
|
1813
|
+
inCombobox?: boolean;
|
|
1814
|
+
/**
|
|
1815
|
+
* Whether the menu item is in a menu
|
|
1816
|
+
*/
|
|
1817
|
+
renderAsNativeElement?: boolean;
|
|
1818
|
+
/**
|
|
1819
|
+
* Whether the menu item is selected (for combobox)
|
|
1820
|
+
* @default false
|
|
1821
|
+
*/
|
|
1822
|
+
selected?: boolean;
|
|
1823
|
+
/**
|
|
1824
|
+
* Whether to show checkbox (only for decoration purpose)
|
|
1825
|
+
*/
|
|
1826
|
+
showCheckbox?: boolean;
|
|
1827
|
+
/**
|
|
1828
|
+
* Whether the menu item checkbox is indeterminate (for combobox)
|
|
1829
|
+
* @default false
|
|
1830
|
+
*/
|
|
1831
|
+
indeterminate?: boolean;
|
|
1832
|
+
}
|
|
1671
1833
|
|
|
1672
1834
|
export declare type DropdownMenuItemType = {
|
|
1835
|
+
/**
|
|
1836
|
+
* The type of the menu item
|
|
1837
|
+
*/
|
|
1673
1838
|
type: "item";
|
|
1839
|
+
/**
|
|
1840
|
+
* The label of the menu item
|
|
1841
|
+
*/
|
|
1674
1842
|
label?: React.ReactNode;
|
|
1843
|
+
/**
|
|
1844
|
+
* Whether the menu item is disabled
|
|
1845
|
+
*/
|
|
1675
1846
|
disabled?: boolean;
|
|
1847
|
+
/**
|
|
1848
|
+
* The icon of the menu item
|
|
1849
|
+
*/
|
|
1676
1850
|
icon?: React.ReactNode;
|
|
1851
|
+
/**
|
|
1852
|
+
* The key of the menu item
|
|
1853
|
+
*/
|
|
1677
1854
|
key: React.Key;
|
|
1855
|
+
/**
|
|
1856
|
+
* The onClick event handler of the menu item
|
|
1857
|
+
*/
|
|
1678
1858
|
onClick?: React.HTMLAttributes<HTMLElement>["onClick"];
|
|
1859
|
+
/**
|
|
1860
|
+
* The onMouseEnter event handler of the menu item
|
|
1861
|
+
*/
|
|
1679
1862
|
onMouseEnter?: React.HTMLAttributes<HTMLElement>["onMouseEnter"];
|
|
1863
|
+
/**
|
|
1864
|
+
* The onMouseLeave event handler of the menu item
|
|
1865
|
+
*/
|
|
1680
1866
|
onMouseLeave?: React.HTMLAttributes<HTMLElement>["onMouseLeave"];
|
|
1867
|
+
/**
|
|
1868
|
+
* The onMouseOver event handler of the menu item
|
|
1869
|
+
*/
|
|
1681
1870
|
onMouseOver?: React.HTMLAttributes<HTMLElement>["onMouseOver"];
|
|
1871
|
+
/**
|
|
1872
|
+
* The onMouseOut event handler of the menu item
|
|
1873
|
+
*/
|
|
1682
1874
|
onMouseOut?: React.HTMLAttributes<HTMLElement>["onMouseOut"];
|
|
1875
|
+
/**
|
|
1876
|
+
* The className of the menu item
|
|
1877
|
+
*/
|
|
1878
|
+
className?: string;
|
|
1879
|
+
/**
|
|
1880
|
+
* Whether the menu item is a danger item
|
|
1881
|
+
*/
|
|
1683
1882
|
danger?: boolean;
|
|
1883
|
+
/**
|
|
1884
|
+
* The ref of the menu item
|
|
1885
|
+
*/
|
|
1684
1886
|
ref?: React.Ref<HTMLElement>;
|
|
1685
1887
|
} | {
|
|
1888
|
+
/**
|
|
1889
|
+
* The type of the menu item
|
|
1890
|
+
*/
|
|
1686
1891
|
type: "divider";
|
|
1687
1892
|
} | {
|
|
1893
|
+
/**
|
|
1894
|
+
* The type of the menu item
|
|
1895
|
+
*/
|
|
1688
1896
|
type: "header";
|
|
1897
|
+
/**
|
|
1898
|
+
* The title of the menu item
|
|
1899
|
+
*/
|
|
1689
1900
|
title?: React.ReactNode;
|
|
1901
|
+
/**
|
|
1902
|
+
* The className of the menu item
|
|
1903
|
+
*/
|
|
1904
|
+
className?: string;
|
|
1690
1905
|
};
|
|
1691
1906
|
|
|
1692
1907
|
export declare interface DropdownMenuProps {
|
|
@@ -1750,6 +1965,37 @@ export declare interface DropdownMenuProps {
|
|
|
1750
1965
|
* Search placeholder
|
|
1751
1966
|
*/
|
|
1752
1967
|
searchProps?: Omit<React.ComponentProps<typeof pkg.Input>, "size" | "ref">;
|
|
1968
|
+
/**
|
|
1969
|
+
* Whether to match the width of the popup with the trigger
|
|
1970
|
+
* @default false
|
|
1971
|
+
*/
|
|
1972
|
+
popupMatchTriggerWidth?: boolean;
|
|
1973
|
+
/**
|
|
1974
|
+
* Content to display before the list
|
|
1975
|
+
*/
|
|
1976
|
+
beforeList?: React.ReactNode;
|
|
1977
|
+
/**
|
|
1978
|
+
* Content to display after the list
|
|
1979
|
+
*/
|
|
1980
|
+
afterList?: React.ReactNode;
|
|
1981
|
+
/**
|
|
1982
|
+
* Whether to keep the dropdown open when an item is selected
|
|
1983
|
+
* @default false
|
|
1984
|
+
*/
|
|
1985
|
+
keepOpenOnSelect?: boolean;
|
|
1986
|
+
/**
|
|
1987
|
+
* Control the highlighted state of the menu item
|
|
1988
|
+
*/
|
|
1989
|
+
highlightedItemKey?: React.Key;
|
|
1990
|
+
/**
|
|
1991
|
+
* Control the selected state of the menu item
|
|
1992
|
+
*/
|
|
1993
|
+
selectedItemKeys?: React.Key[];
|
|
1994
|
+
/**
|
|
1995
|
+
* Whether to show checkbox
|
|
1996
|
+
* @default false
|
|
1997
|
+
*/
|
|
1998
|
+
showCheckbox?: boolean;
|
|
1753
1999
|
}
|
|
1754
2000
|
|
|
1755
2001
|
export { DropDownProps }
|
|
@@ -2009,11 +2255,11 @@ declare const MainInputInner: (props: InputProps, ref: React.Ref<InputRef>) => J
|
|
|
2009
2255
|
|
|
2010
2256
|
declare const MainSegmentedInner: <T>(props: SegmentedProps<T>, ref: React.Ref<React.ComponentRef<typeof default_5>>) => JSX.Element;
|
|
2011
2257
|
|
|
2012
|
-
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;
|
|
2258
|
+
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;
|
|
2013
2259
|
|
|
2014
2260
|
declare const MainSwitchInner: ({ ...rest }: SwitchProps, ref: React.Ref<React.ComponentRef<typeof default_4>>) => JSX.Element;
|
|
2015
2261
|
|
|
2016
|
-
declare const MainTreeInner: <T extends DataNode =
|
|
2262
|
+
declare const MainTreeInner: <T extends DataNode = TreeDataNode>(props: TreeProps<T>, ref: React.Ref<React.ComponentRef<typeof default_7<T>>>) => JSX.Element;
|
|
2017
2263
|
|
|
2018
2264
|
export { MappingAlgorithm }
|
|
2019
2265
|
|
|
@@ -2410,9 +2656,9 @@ export declare const POPUP_COLLISION_AVOIDANCE: {
|
|
|
2410
2656
|
readonly fallbackAxisSide: "end";
|
|
2411
2657
|
};
|
|
2412
2658
|
|
|
2413
|
-
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, onPlacementChange, }: PopupPanelProps) => JSX.Element;
|
|
2659
|
+
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;
|
|
2414
2660
|
|
|
2415
|
-
export declare interface PopupPanelProps extends Omit<React.ComponentPropsWithRef<"div">, "title" | "content" | "children"> {
|
|
2661
|
+
export declare interface PopupPanelProps extends Omit<React.ComponentPropsWithRef<"div">, "title" | "content" | "children">, Omit<Popover_2.Root.Props, "children"> {
|
|
2416
2662
|
/** The trigger element that opens the popup panel */
|
|
2417
2663
|
children?: React.ComponentProps<typeof Popover_2.Trigger>["render"];
|
|
2418
2664
|
/** Placement of the popup panel relative to its trigger */
|
|
@@ -2467,6 +2713,17 @@ export declare interface PopupPanelProps extends Omit<React.ComponentPropsWithRe
|
|
|
2467
2713
|
* @default false
|
|
2468
2714
|
*/
|
|
2469
2715
|
resizable?: boolean;
|
|
2716
|
+
/**
|
|
2717
|
+
* Whether the panel should be draggable
|
|
2718
|
+
* @default false
|
|
2719
|
+
*/
|
|
2720
|
+
draggable?: boolean;
|
|
2721
|
+
/**
|
|
2722
|
+
* Whether to maintain aspect ratio when resizing
|
|
2723
|
+
* Only applies when resizable is true
|
|
2724
|
+
* @default false
|
|
2725
|
+
*/
|
|
2726
|
+
maintainAspectRatio?: boolean;
|
|
2470
2727
|
/**
|
|
2471
2728
|
* Custom class names for different parts of the popup panel
|
|
2472
2729
|
* @default {}
|
|
@@ -2505,7 +2762,8 @@ declare enum PopupPanelSize {
|
|
|
2505
2762
|
xlarge = "840px"
|
|
2506
2763
|
}
|
|
2507
2764
|
|
|
2508
|
-
export declare const processTreeData: <T extends DataNode = DataNode>(nodes: T[] | undefined, expandedOriginalKeys: Set<Key>,
|
|
2765
|
+
export declare const processTreeData: <T extends DataNode = DataNode>(nodes: T[] | undefined, expandedOriginalKeys: Set<Key>, // Use Set for faster lookups
|
|
2766
|
+
parentKeyPrefix: string, keyMap: Map<Key, Key>) => T[] | undefined;
|
|
2509
2767
|
|
|
2510
2768
|
export { Progress }
|
|
2511
2769
|
|
|
@@ -3087,7 +3345,7 @@ export { Row }
|
|
|
3087
3345
|
|
|
3088
3346
|
export { RowProps }
|
|
3089
3347
|
|
|
3090
|
-
export declare const ScrollArea: ({ children, className, classNames, orientation, }: ScrollAreaProps) => JSX.Element;
|
|
3348
|
+
export declare const ScrollArea: ({ children, className, classNames, orientation, fadeEdges, onScroll, }: ScrollAreaProps) => JSX.Element;
|
|
3091
3349
|
|
|
3092
3350
|
export declare interface ScrollAreaProps {
|
|
3093
3351
|
children: ReactNode;
|
|
@@ -3117,6 +3375,15 @@ export declare interface ScrollAreaProps {
|
|
|
3117
3375
|
* @default "vertical"
|
|
3118
3376
|
*/
|
|
3119
3377
|
orientation?: "vertical" | "horizontal";
|
|
3378
|
+
/**
|
|
3379
|
+
* Enable fade-out effect at scrollable edges
|
|
3380
|
+
* @default false
|
|
3381
|
+
*/
|
|
3382
|
+
fadeEdges?: boolean;
|
|
3383
|
+
/**
|
|
3384
|
+
* Callback fired when the scroll position changes
|
|
3385
|
+
*/
|
|
3386
|
+
onScroll?: (event: Event) => void;
|
|
3120
3387
|
}
|
|
3121
3388
|
|
|
3122
3389
|
declare const SearchInner: ({ enterButton, onSearch, prefix, onPressEnter, onClear, loading, ...rest }: SearchProps, ref: React.Ref<InputRef>) => JSX.Element;
|
|
@@ -3158,8 +3425,75 @@ export declare interface SelectProps<ValueType = unknown, OptionType extends Sel
|
|
|
3158
3425
|
* Will be ignored if enhancePositioner is false
|
|
3159
3426
|
*/
|
|
3160
3427
|
popupSize?: string | number | PopupPanelSize;
|
|
3428
|
+
/**
|
|
3429
|
+
* Show selection summary instead of tags in multiple case
|
|
3430
|
+
* @default false
|
|
3431
|
+
*/
|
|
3432
|
+
showSelectionSummary?: boolean;
|
|
3433
|
+
/**
|
|
3434
|
+
* Render function for the selection summary in multiple case
|
|
3435
|
+
* @default (value) => `${value.length} items selected`
|
|
3436
|
+
*/
|
|
3437
|
+
selectionSummaryRender?: (value: ValueType) => default_2.ReactNode;
|
|
3438
|
+
/**
|
|
3439
|
+
* Show select all option when in multiple mode
|
|
3440
|
+
* @default false
|
|
3441
|
+
*/
|
|
3442
|
+
showSelectAll?: boolean;
|
|
3443
|
+
/**
|
|
3444
|
+
* Render function for the select all option
|
|
3445
|
+
*/
|
|
3446
|
+
selectAllRender?: (props: {
|
|
3447
|
+
onClick: () => void;
|
|
3448
|
+
checked: CheckboxProps["checked"];
|
|
3449
|
+
indeterminate: CheckboxProps["indeterminate"];
|
|
3450
|
+
}) => default_2.ReactNode;
|
|
3161
3451
|
}
|
|
3162
3452
|
|
|
3453
|
+
export declare const SelectTrigger: default_2.ForwardRefExoticComponent<SelectTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
3454
|
+
|
|
3455
|
+
export declare interface SelectTriggerProps extends Omit<WithRenderPropProps<"button", SelectTriggerState>, "value" | "prefix"> {
|
|
3456
|
+
/** Size variant */
|
|
3457
|
+
size?: "small" | "middle" | "large";
|
|
3458
|
+
/** Whether the component is disabled */
|
|
3459
|
+
disabled?: boolean;
|
|
3460
|
+
/** Whether the dropdown/popup is open */
|
|
3461
|
+
open?: boolean;
|
|
3462
|
+
/** Validation status */
|
|
3463
|
+
status?: ValidateStatus;
|
|
3464
|
+
/** Placeholder text */
|
|
3465
|
+
placeholder?: string;
|
|
3466
|
+
/** Current value/content to display */
|
|
3467
|
+
value?: default_2.ReactNode;
|
|
3468
|
+
/** Prefix content to display before the value (e.g., icon) */
|
|
3469
|
+
prefix?: default_2.ReactNode;
|
|
3470
|
+
/** Whether to show clear button when there's a value */
|
|
3471
|
+
allowClear?: boolean;
|
|
3472
|
+
/** Custom suffix icon (arrow icon) */
|
|
3473
|
+
suffixIcon?: default_2.ReactNode;
|
|
3474
|
+
/** Custom clear icon */
|
|
3475
|
+
clearIcon?: default_2.ReactNode;
|
|
3476
|
+
/** Clear handler */
|
|
3477
|
+
onClear?: () => void;
|
|
3478
|
+
/** Open state change handler */
|
|
3479
|
+
onOpenChange?: (open: boolean) => void;
|
|
3480
|
+
/** Custom class names */
|
|
3481
|
+
classNames?: {
|
|
3482
|
+
trigger?: string;
|
|
3483
|
+
content?: string;
|
|
3484
|
+
suffix?: string;
|
|
3485
|
+
placeholder?: string;
|
|
3486
|
+
value?: string;
|
|
3487
|
+
};
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
export declare type SelectTriggerState = {
|
|
3491
|
+
disabled: boolean;
|
|
3492
|
+
open: boolean;
|
|
3493
|
+
hasValue: boolean;
|
|
3494
|
+
size: "small" | "middle" | "large";
|
|
3495
|
+
};
|
|
3496
|
+
|
|
3163
3497
|
export declare const SEQUENTIAL_PALETTE_NAMES: readonly ["YlOrBr", "YlOrRd", "OrRd", "PuRd", "RdPu", "BuPu", "GnBu", "PuBu", "YlGnBu", "PuBuGn", "BuGn", "YlGn"];
|
|
3164
3498
|
|
|
3165
3499
|
export declare const SEQUENTIAL_PALETTES: Record<SequentialPaletteName, Record<Theme, string[]>>;
|
|
@@ -3681,6 +4015,10 @@ T | undefined,
|
|
|
3681
4015
|
*/
|
|
3682
4016
|
export declare const useCSSVariables: (variables: string | string[]) => Record<string, string>;
|
|
3683
4017
|
|
|
4018
|
+
export declare function useDraggable(enabled?: boolean): {
|
|
4019
|
+
ref: (element: HTMLElement | null) => () => void;
|
|
4020
|
+
};
|
|
4021
|
+
|
|
3684
4022
|
export declare const useDS: () => {
|
|
3685
4023
|
theme: "light" | "dark";
|
|
3686
4024
|
};
|
|
@@ -3695,6 +4033,11 @@ export declare const useGetPrefixCls: () => {
|
|
|
3695
4033
|
getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
|
|
3696
4034
|
};
|
|
3697
4035
|
|
|
4036
|
+
export declare function useHover<T extends HTMLElement>(): [
|
|
4037
|
+
(node: T) => void,
|
|
4038
|
+
boolean
|
|
4039
|
+
];
|
|
4040
|
+
|
|
3698
4041
|
export declare function useLatestRef<T>(value: T): RefObject<T>;
|
|
3699
4042
|
|
|
3700
4043
|
export declare const useMessage: () => MessageInstance;
|
|
@@ -3829,7 +4172,7 @@ export declare const WithRenderProp: <T extends default_2.ElementType = "div", S
|
|
|
3829
4172
|
|
|
3830
4173
|
declare const WithRenderPropInner: <T extends default_2.ElementType = "div", State extends Record<string, unknown> = Record<string, unknown>>(props: WithRenderPropProps<T, State>, ref: default_2.ForwardedRef<T>) => null;
|
|
3831
4174
|
|
|
3832
|
-
export declare type WithRenderPropProps<T extends default_2.ElementType = "div", State extends Record<string, unknown> = Record<string, unknown>> = default_2.ComponentPropsWithoutRef<T> & {
|
|
4175
|
+
export declare type WithRenderPropProps<T extends default_2.ElementType = "div", State extends Record<string | number | symbol, unknown> = Record<string, unknown>> = default_2.ComponentPropsWithoutRef<T> & {
|
|
3833
4176
|
render?: useRender.RenderProp<State>;
|
|
3834
4177
|
as?: T;
|
|
3835
4178
|
state?: State;
|