@bioturing/components 0.29.2 → 0.31.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/components/choice-list/component.js +26 -28
- package/dist/components/choice-list/component.js.map +1 -1
- package/dist/components/code-block/component.js +10 -10
- package/dist/components/combobox/component.js +113 -112
- package/dist/components/combobox/component.js.map +1 -1
- package/dist/components/command-palette/component.js +79 -0
- package/dist/components/command-palette/component.js.map +1 -0
- package/dist/components/command-palette/style.css +1 -0
- package/dist/components/dropdown-menu/component.js +117 -189
- package/dist/components/dropdown-menu/component.js.map +1 -1
- package/dist/components/dropdown-menu/item.css +1 -1
- package/dist/components/dropdown-menu/item.js +50 -37
- package/dist/components/dropdown-menu/item.js.map +1 -1
- package/dist/components/dropdown-menu/style.css +1 -1
- package/dist/components/dropdown-menu/useDropdownMenu.js +124 -0
- package/dist/components/dropdown-menu/useDropdownMenu.js.map +1 -0
- package/dist/components/hooks/antd.js +9 -11
- package/dist/components/hooks/antd.js.map +1 -1
- package/dist/components/hooks/useBreakpoint.js +50 -0
- package/dist/components/hooks/useBreakpoint.js.map +1 -0
- package/dist/components/hooks/useResizeObserver.js +52 -0
- package/dist/components/hooks/useResizeObserver.js.map +1 -0
- package/dist/components/hooks/useWindowSize.js +23 -0
- package/dist/components/hooks/useWindowSize.js.map +1 -0
- package/dist/components/keyboard-shortcut/component.js +72 -0
- package/dist/components/keyboard-shortcut/component.js.map +1 -0
- package/dist/components/keyboard-shortcut/style.css +1 -0
- package/dist/components/loader/component.js +15 -0
- package/dist/components/loader/component.js.map +1 -0
- package/dist/components/loader/style.css +1 -0
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/popup-panel/style.css +1 -1
- package/dist/components/resizable/component.js +107 -90
- package/dist/components/resizable/component.js.map +1 -1
- package/dist/components/theme-provider/style.css +1 -1
- package/dist/components/toast/style.css +1 -1
- package/dist/index.d.ts +240 -59
- package/dist/index.js +204 -191
- package/dist/index.js.map +1 -1
- package/dist/metadata.js +47 -2
- package/dist/metadata.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.ds-toast-viewport{position:fixed;width:100%;max-width:30rem;margin:0 auto;bottom:2rem;left:50%;transform:translate(-50%);top:auto;z-index:
|
|
1
|
+
@layer components{.ds-toast-viewport{position:fixed;width:100%;max-width:30rem;margin:0 auto;bottom:2rem;left:50%;transform:translate(-50%);top:auto;z-index:var(--ds-z-index-toast);display:flex;justify-content:center}.ds-toast{--gap: .5rem;--offset-y: calc( var(--toast-offset-y) * -1 + (var(--toast-index) * var(--gap) * -1) + var(--toast-swipe-movement-y) );font-family:var(--font-sans);position:absolute;box-sizing:border-box;background:var(--ds-color-bg-elevated);color:var(--ds-color-text);padding:.75rem 1rem;max-width:100%;display:inline-flex;gap:var(--gap);box-shadow:var(--ds-box-shadow-secondary);background-clip:padding-box;border-radius:.5rem;bottom:0;margin-right:0;-webkit-user-select:none;user-select:none;transition:transform .5s cubic-bezier(.22,1,.36,1),opacity .5s;cursor:default;z-index:calc(1000 - var(--toast-index));transform:translate(var(--toast-swipe-movement-x)) translateY(calc(var(--toast-swipe-movement-y) + (var(--toast-index) * -20%))) scale(calc(1 - (var(--toast-index) * .1)))}.ds-toast:after{top:100%}.ds-toast[data-expanded]{transform:translate(var(--toast-swipe-movement-x)) translateY(var(--offset-y))}.ds-toast[data-starting-style],.ds-toast[data-ending-style]:not([data-limited]){transform:translateY(150%)}.ds-toast[data-ending-style]{opacity:0}.ds-toast[data-ending-style][data-swipe-direction=up]{transform:translateY(calc(var(--toast-swipe-movement-y) - 150%))}.ds-toast[data-ending-style][data-swipe-direction=left]{transform:translate(calc(var(--toast-swipe-movement-x) - 150%)) translateY(var(--offset-y))}.ds-toast[data-ending-style][data-swipe-direction=right]{transform:translate(calc(var(--toast-swipe-movement-x) + 150%)) translateY(var(--offset-y))}.ds-toast[data-ending-style][data-swipe-direction=down]{transform:translateY(calc(var(--toast-swipe-movement-y) + 150%))}.ds-toast:after{content:"";position:absolute;width:100%;left:0;height:calc(var(--gap) + 1px)}.ds-toast-content{display:flex;flex:1;flex-direction:column;gap:2}.ds-toast-title{font-size:var(--text-ds-h5);font-weight:var(--text-ds-h5--font-weight);line-height:var(--text-ds-h5--line-height)}.ds-toast-description{font-size:var(--ds-font-size);line-height:var(--ds-line-height)}.ds-toast-description:last-child{margin-bottom:0}.ds-toast-description-traceback p:not(:first-child){margin-top:.5rem}.ds-toast-icon-wrap{width:1.25rem;font-size:1.25rem;display:block;flex:0}.ds-toast-icon{width:1.25rem;height:1.25rem;display:block}.ds-toast-icon.ds-toast-icon-info{color:var(--ds-color-primary)}.ds-toast-icon.ds-toast-icon-success{color:var(--ds-color-success)}.ds-toast-icon.ds-toast-icon-warning{color:var(--ds-color-warning)}.ds-toast-icon.ds-toast-icon-error{color:var(--ds-color-error)}.ds-toast-icon.ds-toast-icon-progress{color:var(--ds-color-primary);animation:var(--ds-animate-spin)}.ds-toast-close{margin-top:.125rem;display:flex}}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,6 @@ import { BreadcrumbItemProps as BreadcrumbItemProps_2 } from 'antd/es/breadcrumb
|
|
|
21
21
|
import { BreadcrumbItemType as BreadcrumbItemType_2 } from 'antd/es/breadcrumb/Breadcrumb';
|
|
22
22
|
import { BreadcrumbProps as BreadcrumbProps_2 } from 'antd/es/breadcrumb';
|
|
23
23
|
import { BreadcrumbSeparatorType } from 'antd/es/breadcrumb/Breadcrumb';
|
|
24
|
-
import { Breakpoint } from 'antd';
|
|
25
24
|
import { ButtonProps as ButtonProps_2 } from 'antd/es/button';
|
|
26
25
|
import { Calendar } from 'antd';
|
|
27
26
|
import { CalendarMode } from 'antd';
|
|
@@ -134,8 +133,7 @@ import { message } from 'antd';
|
|
|
134
133
|
import { MessageArgsProps } from 'antd';
|
|
135
134
|
import { MessageInstance } from 'antd/es/message/interface';
|
|
136
135
|
import { ModalFuncProps } from 'antd';
|
|
137
|
-
import { ModalProps } from '
|
|
138
|
-
import { ModalProps as ModalProps_3 } from 'antd/es/modal';
|
|
136
|
+
import { ModalProps as ModalProps_2 } from 'antd/es/modal';
|
|
139
137
|
import { ModalRef } from './functions';
|
|
140
138
|
import { MoveValues } from 'react-use-resizable';
|
|
141
139
|
import { notification } from 'antd';
|
|
@@ -173,6 +171,7 @@ import { RefAttributes } from 'react';
|
|
|
173
171
|
import { RefObject } from 'react';
|
|
174
172
|
import { RefSelectProps } from 'antd';
|
|
175
173
|
import { RefSelectProps as RefSelectProps_2 } from 'antd/es/select';
|
|
174
|
+
import { ResizableProps as ResizableProps_2 } from 'react-use-resizable';
|
|
176
175
|
import { Result } from 'antd';
|
|
177
176
|
import { ResultProps } from 'antd';
|
|
178
177
|
import { RibbonProps } from 'antd/es/badge/Ribbon';
|
|
@@ -350,6 +349,16 @@ export declare interface BreadcrumbProps<T extends AnyObject = AnyObject> extend
|
|
|
350
349
|
itemRender?: (route: BreadcrumbItemType, params: T, routes: BreadcrumbItemType[], paths: string[]) => React.ReactNode;
|
|
351
350
|
}
|
|
352
351
|
|
|
352
|
+
declare type Breakpoint = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
353
|
+
|
|
354
|
+
export declare const BREAKPOINTS: {
|
|
355
|
+
sm: number;
|
|
356
|
+
md: number;
|
|
357
|
+
lg: number;
|
|
358
|
+
xl: number;
|
|
359
|
+
"2xl": number;
|
|
360
|
+
};
|
|
361
|
+
|
|
353
362
|
/**
|
|
354
363
|
* Build Antd placement string from BaseUI side and align values
|
|
355
364
|
* @param placement - Object with side and align properties
|
|
@@ -456,15 +465,15 @@ declare type Children = {
|
|
|
456
465
|
children?: default_2.ReactNode;
|
|
457
466
|
};
|
|
458
467
|
|
|
459
|
-
export declare const ChoiceList: <M extends boolean = false>({
|
|
468
|
+
export declare const ChoiceList: <M extends boolean = false>({ options, multiple, value, defaultValue, onChange, searchProps, showSelectAll, className, placeholder, disabled: disabledProp, status: statusProp, getItemKeywords, ...rest }: ChoiceListProps<M>) => JSX.Element;
|
|
460
469
|
|
|
461
|
-
export declare type
|
|
470
|
+
export declare type ChoiceListOption = {
|
|
462
471
|
label: React.ReactNode;
|
|
463
472
|
value?: string;
|
|
464
473
|
};
|
|
465
474
|
|
|
466
475
|
export declare interface ChoiceListProps<M extends boolean = false> extends Omit<CommandProps, "value" | "onChange" | "defaultValue"> {
|
|
467
|
-
|
|
476
|
+
options: ChoiceListOption[];
|
|
468
477
|
multiple?: M;
|
|
469
478
|
value?: M extends true ? string[] : string;
|
|
470
479
|
defaultValue?: M extends true ? string[] : string;
|
|
@@ -489,7 +498,7 @@ export declare interface ChoiceListProps<M extends boolean = false> extends Omit
|
|
|
489
498
|
* Function to extract keywords from the item for search filtering
|
|
490
499
|
* @default (item) => [item.value, reactNodeToString(item.label)]
|
|
491
500
|
*/
|
|
492
|
-
getItemKeywords?: (item:
|
|
501
|
+
getItemKeywords?: (item: ChoiceListOption) => string[];
|
|
493
502
|
}
|
|
494
503
|
|
|
495
504
|
export declare interface ClassArray extends Array<ClassValue> {
|
|
@@ -1076,10 +1085,58 @@ export declare interface ComboboxProps {
|
|
|
1076
1085
|
checked: boolean;
|
|
1077
1086
|
indeterminate: boolean;
|
|
1078
1087
|
}) => default_2.ReactNode;
|
|
1088
|
+
/**
|
|
1089
|
+
* Function to extract keywords from the item for search filtering
|
|
1090
|
+
* @default (option) => [String(option.key), reactNodeToString(option.label)]
|
|
1091
|
+
*/
|
|
1092
|
+
getOptionKeywords?: (option: DropdownMenuItemType & {
|
|
1093
|
+
type: "item";
|
|
1094
|
+
}) => string[];
|
|
1079
1095
|
}
|
|
1080
1096
|
|
|
1081
1097
|
declare type CommandFilter = (value: string, search: string, keywords?: string[]) => number;
|
|
1082
1098
|
|
|
1099
|
+
export declare const CommandPalette: default_2.FC<CommandPaletteProps>;
|
|
1100
|
+
|
|
1101
|
+
export declare interface CommandPaletteProps {
|
|
1102
|
+
/** Whether the command palette is open */
|
|
1103
|
+
open?: boolean;
|
|
1104
|
+
/** Callback fired when the open state changes */
|
|
1105
|
+
onOpenChange?: (open: boolean) => void;
|
|
1106
|
+
/**
|
|
1107
|
+
* Default open state
|
|
1108
|
+
*/
|
|
1109
|
+
defaultOpen?: boolean;
|
|
1110
|
+
/** Items to display in the command palette */
|
|
1111
|
+
items?: DropdownMenuItemType[];
|
|
1112
|
+
/** Keyboard shortcuts to open the palette */
|
|
1113
|
+
shortcuts?: CommandPaletteShortcut[];
|
|
1114
|
+
/** Placeholder text for the search input */
|
|
1115
|
+
placeholder?: string;
|
|
1116
|
+
/** Text to show when no results are found */
|
|
1117
|
+
emptyText?: string;
|
|
1118
|
+
/** Accessible label for the command palette */
|
|
1119
|
+
label?: string;
|
|
1120
|
+
/** Additional CSS class names */
|
|
1121
|
+
className?: string;
|
|
1122
|
+
classNames?: {
|
|
1123
|
+
root?: string;
|
|
1124
|
+
mask?: string;
|
|
1125
|
+
content?: string;
|
|
1126
|
+
group?: string;
|
|
1127
|
+
item?: string;
|
|
1128
|
+
groupLabel?: string;
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
export declare type CommandPaletteShortcut = {
|
|
1133
|
+
key: string;
|
|
1134
|
+
metaKey?: boolean;
|
|
1135
|
+
ctrlKey?: boolean;
|
|
1136
|
+
altKey?: boolean;
|
|
1137
|
+
shiftKey?: boolean;
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1083
1140
|
declare type CommandProps = Children & DivProps & {
|
|
1084
1141
|
/**
|
|
1085
1142
|
* Accessible label for this command menu. Not shown visibly.
|
|
@@ -1370,6 +1427,14 @@ export declare const componentMetadata: {
|
|
|
1370
1427
|
originalDocUrl: string;
|
|
1371
1428
|
description: string;
|
|
1372
1429
|
};
|
|
1430
|
+
Loader: {
|
|
1431
|
+
name: string;
|
|
1432
|
+
link: string;
|
|
1433
|
+
base: "custom";
|
|
1434
|
+
refinements: string[];
|
|
1435
|
+
category: "Feedback";
|
|
1436
|
+
description: string;
|
|
1437
|
+
};
|
|
1373
1438
|
Spin: {
|
|
1374
1439
|
name: string;
|
|
1375
1440
|
link: string;
|
|
@@ -1529,6 +1594,23 @@ export declare const componentMetadata: {
|
|
|
1529
1594
|
category: "Feedback";
|
|
1530
1595
|
description: string;
|
|
1531
1596
|
};
|
|
1597
|
+
CommandPalette: {
|
|
1598
|
+
name: string;
|
|
1599
|
+
link: string;
|
|
1600
|
+
base: "custom";
|
|
1601
|
+
refinements: string[];
|
|
1602
|
+
category: "Navigation";
|
|
1603
|
+
packages: string[];
|
|
1604
|
+
description: string;
|
|
1605
|
+
};
|
|
1606
|
+
KeyboardShortcut: {
|
|
1607
|
+
name: string;
|
|
1608
|
+
link: string;
|
|
1609
|
+
base: "custom";
|
|
1610
|
+
refinements: string[];
|
|
1611
|
+
category: "Data Display";
|
|
1612
|
+
description: string;
|
|
1613
|
+
};
|
|
1532
1614
|
VerticalCollapsiblePanel: {
|
|
1533
1615
|
name: string;
|
|
1534
1616
|
link: string;
|
|
@@ -1801,7 +1883,12 @@ export declare const DROPDOWN_COLLISION_AVOIDANCE: {
|
|
|
1801
1883
|
readonly fallbackAxisSide: "none";
|
|
1802
1884
|
};
|
|
1803
1885
|
|
|
1804
|
-
export declare const DropdownMenu: ({ children, items, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange, className, itemRender, classNames, size, showSearch, searchProps, popupMatchTriggerWidth, beforeList, afterList, keepOpenOnSelect, highlightedItemKey, selectedItemKeys,
|
|
1886
|
+
export declare const DropdownMenu: ({ children, items, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange, defaultOpen, className, itemRender, classNames, size, showSearch, inCombobox: inComboboxProp, searchProps, popupMatchTriggerWidth, beforeList, afterList, keepOpenOnSelect, highlightedItemKey, selectedItemKeys, getItemKeywords, showCheckbox, }: DropdownMenuProps) => JSX.Element;
|
|
1887
|
+
|
|
1888
|
+
export declare interface DropdownMenuGroup {
|
|
1889
|
+
label: default_2.ReactNode | null;
|
|
1890
|
+
items: DropdownMenuItemType[];
|
|
1891
|
+
}
|
|
1805
1892
|
|
|
1806
1893
|
export declare const DropdownMenuItem: default_2.FC<DropdownMenuItemProps>;
|
|
1807
1894
|
|
|
@@ -1819,8 +1906,11 @@ export declare interface DropdownMenuItemProps {
|
|
|
1819
1906
|
item?: string;
|
|
1820
1907
|
itemIcon?: string;
|
|
1821
1908
|
itemText?: string;
|
|
1909
|
+
itemSuffix?: string;
|
|
1822
1910
|
};
|
|
1823
|
-
onSelect?: (
|
|
1911
|
+
onSelect?: (item: DropdownMenuItemType & {
|
|
1912
|
+
type: "item";
|
|
1913
|
+
}) => void;
|
|
1824
1914
|
/**
|
|
1825
1915
|
* Whether the menu item is in a combobox
|
|
1826
1916
|
*/
|
|
@@ -1860,7 +1950,7 @@ export declare type DropdownMenuItemType = {
|
|
|
1860
1950
|
/**
|
|
1861
1951
|
* The label of the menu item
|
|
1862
1952
|
*/
|
|
1863
|
-
label?:
|
|
1953
|
+
label?: default_2.ReactNode;
|
|
1864
1954
|
/**
|
|
1865
1955
|
* Whether the menu item is disabled
|
|
1866
1956
|
*/
|
|
@@ -1868,31 +1958,41 @@ export declare type DropdownMenuItemType = {
|
|
|
1868
1958
|
/**
|
|
1869
1959
|
* The icon of the menu item
|
|
1870
1960
|
*/
|
|
1871
|
-
icon?:
|
|
1961
|
+
icon?: default_2.ReactNode;
|
|
1962
|
+
/**
|
|
1963
|
+
* The suffix of the menu item
|
|
1964
|
+
*/
|
|
1965
|
+
suffix?: default_2.ReactNode;
|
|
1872
1966
|
/**
|
|
1873
1967
|
* The key of the menu item
|
|
1874
1968
|
*/
|
|
1875
|
-
key:
|
|
1969
|
+
key: default_2.Key;
|
|
1970
|
+
/**
|
|
1971
|
+
* The onSelect event handler of the menu item
|
|
1972
|
+
*/
|
|
1973
|
+
onSelect?: (item: DropdownMenuItemType & {
|
|
1974
|
+
type: "item";
|
|
1975
|
+
}) => void;
|
|
1876
1976
|
/**
|
|
1877
1977
|
* The onClick event handler of the menu item
|
|
1878
1978
|
*/
|
|
1879
|
-
onClick?:
|
|
1979
|
+
onClick?: default_2.HTMLAttributes<HTMLElement>["onClick"];
|
|
1880
1980
|
/**
|
|
1881
1981
|
* The onMouseEnter event handler of the menu item
|
|
1882
1982
|
*/
|
|
1883
|
-
onMouseEnter?:
|
|
1983
|
+
onMouseEnter?: default_2.HTMLAttributes<HTMLElement>["onMouseEnter"];
|
|
1884
1984
|
/**
|
|
1885
1985
|
* The onMouseLeave event handler of the menu item
|
|
1886
1986
|
*/
|
|
1887
|
-
onMouseLeave?:
|
|
1987
|
+
onMouseLeave?: default_2.HTMLAttributes<HTMLElement>["onMouseLeave"];
|
|
1888
1988
|
/**
|
|
1889
1989
|
* The onMouseOver event handler of the menu item
|
|
1890
1990
|
*/
|
|
1891
|
-
onMouseOver?:
|
|
1991
|
+
onMouseOver?: default_2.HTMLAttributes<HTMLElement>["onMouseOver"];
|
|
1892
1992
|
/**
|
|
1893
1993
|
* The onMouseOut event handler of the menu item
|
|
1894
1994
|
*/
|
|
1895
|
-
onMouseOut?:
|
|
1995
|
+
onMouseOut?: default_2.HTMLAttributes<HTMLElement>["onMouseOut"];
|
|
1896
1996
|
/**
|
|
1897
1997
|
* The className of the menu item
|
|
1898
1998
|
*/
|
|
@@ -1904,7 +2004,7 @@ export declare type DropdownMenuItemType = {
|
|
|
1904
2004
|
/**
|
|
1905
2005
|
* The ref of the menu item
|
|
1906
2006
|
*/
|
|
1907
|
-
ref?:
|
|
2007
|
+
ref?: default_2.Ref<HTMLElement>;
|
|
1908
2008
|
} | {
|
|
1909
2009
|
/**
|
|
1910
2010
|
* The type of the menu item
|
|
@@ -1918,14 +2018,14 @@ export declare type DropdownMenuItemType = {
|
|
|
1918
2018
|
/**
|
|
1919
2019
|
* The title of the menu item
|
|
1920
2020
|
*/
|
|
1921
|
-
title?:
|
|
2021
|
+
title?: default_2.ReactNode;
|
|
1922
2022
|
/**
|
|
1923
2023
|
* The className of the menu item
|
|
1924
2024
|
*/
|
|
1925
2025
|
className?: string;
|
|
1926
2026
|
};
|
|
1927
2027
|
|
|
1928
|
-
export declare interface DropdownMenuProps {
|
|
2028
|
+
export declare interface DropdownMenuProps extends Omit<UseDropdownMenuProps, "classNames"> {
|
|
1929
2029
|
/** Array of menu items to be displayed in the dropdown */
|
|
1930
2030
|
items: DropdownMenuItemType[];
|
|
1931
2031
|
/** Custom render function for the trigger element */
|
|
@@ -1948,6 +2048,10 @@ export declare interface DropdownMenuProps {
|
|
|
1948
2048
|
* Callback fired when the dropdown open state changes
|
|
1949
2049
|
*/
|
|
1950
2050
|
onOpenChange?: (open: boolean) => void;
|
|
2051
|
+
/**
|
|
2052
|
+
* Default open state of the dropdown
|
|
2053
|
+
*/
|
|
2054
|
+
defaultOpen?: boolean;
|
|
1951
2055
|
/**
|
|
1952
2056
|
* Additional CSS class for the dropdown component
|
|
1953
2057
|
*/
|
|
@@ -1960,18 +2064,10 @@ export declare interface DropdownMenuProps {
|
|
|
1960
2064
|
root?: string;
|
|
1961
2065
|
trigger?: string;
|
|
1962
2066
|
popup?: string;
|
|
1963
|
-
group?: string;
|
|
1964
|
-
groupLabel?: string;
|
|
1965
|
-
item?: string;
|
|
1966
2067
|
itemIcon?: string;
|
|
1967
2068
|
itemText?: string;
|
|
1968
|
-
separator?: string;
|
|
1969
2069
|
positioner?: string;
|
|
1970
|
-
};
|
|
1971
|
-
/**
|
|
1972
|
-
* Custom render function for menu items
|
|
1973
|
-
*/
|
|
1974
|
-
itemRender?: (item: DropdownMenuItemType, props: React.HTMLAttributes<HTMLElement>) => React.ReactElement;
|
|
2070
|
+
} & UseDropdownMenuProps["classNames"];
|
|
1975
2071
|
/**
|
|
1976
2072
|
* Whether to show search input
|
|
1977
2073
|
* @default false
|
|
@@ -1999,31 +2095,6 @@ export declare interface DropdownMenuProps {
|
|
|
1999
2095
|
* Content to display after the list
|
|
2000
2096
|
*/
|
|
2001
2097
|
afterList?: React.ReactNode;
|
|
2002
|
-
/**
|
|
2003
|
-
* Whether to keep the dropdown open when an item is selected
|
|
2004
|
-
* @default false
|
|
2005
|
-
*/
|
|
2006
|
-
keepOpenOnSelect?: boolean;
|
|
2007
|
-
/**
|
|
2008
|
-
* Control the highlighted state of the menu item
|
|
2009
|
-
*/
|
|
2010
|
-
highlightedItemKey?: React.Key;
|
|
2011
|
-
/**
|
|
2012
|
-
* Control the selected state of the menu item
|
|
2013
|
-
*/
|
|
2014
|
-
selectedItemKeys?: React.Key[];
|
|
2015
|
-
/**
|
|
2016
|
-
* Whether to show checkbox
|
|
2017
|
-
* @default false
|
|
2018
|
-
*/
|
|
2019
|
-
showCheckbox?: boolean;
|
|
2020
|
-
/**
|
|
2021
|
-
* Function to extract keywords from the item for search filtering
|
|
2022
|
-
* @default (item) => [String(item.key), reactNodeToString(item.label)]
|
|
2023
|
-
*/
|
|
2024
|
-
getItemKeywords?: (item: DropdownMenuItemType & {
|
|
2025
|
-
type: "item";
|
|
2026
|
-
}) => string[];
|
|
2027
2098
|
}
|
|
2028
2099
|
|
|
2029
2100
|
export { DropDownProps }
|
|
@@ -2267,6 +2338,21 @@ export declare function isTracebackError(error: unknown): boolean;
|
|
|
2267
2338
|
|
|
2268
2339
|
export declare const isValidHexColor: (hex: string, acceptWithoutPrefix?: boolean) => boolean;
|
|
2269
2340
|
|
|
2341
|
+
export declare const KeyboardShortcut: default_2.FC<KeyboardShortcutProps>;
|
|
2342
|
+
|
|
2343
|
+
export declare interface KeyboardShortcutProps {
|
|
2344
|
+
/** The keyboard shortcut keys to display (optional if using children) */
|
|
2345
|
+
keys?: string[];
|
|
2346
|
+
/** Custom className */
|
|
2347
|
+
className?: string;
|
|
2348
|
+
/** Custom style */
|
|
2349
|
+
style?: default_2.CSSProperties;
|
|
2350
|
+
/** Size variant */
|
|
2351
|
+
size?: "small" | "medium" | "large";
|
|
2352
|
+
/** Children to display as keyboard shortcuts */
|
|
2353
|
+
children?: default_2.ReactNode;
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2270
2356
|
export { Layout }
|
|
2271
2357
|
|
|
2272
2358
|
export { LayoutProps }
|
|
@@ -2277,6 +2363,12 @@ export { List }
|
|
|
2277
2363
|
|
|
2278
2364
|
export { ListProps }
|
|
2279
2365
|
|
|
2366
|
+
export declare const Loader: ForwardRefExoticComponent<LoaderProps & RefAttributes<HTMLSpanElement>>;
|
|
2367
|
+
|
|
2368
|
+
export declare interface LoaderProps extends React.ComponentPropsWithoutRef<"span"> {
|
|
2369
|
+
text?: string;
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2280
2372
|
declare const MainCheckboxInner: ({ variant, className, ...props }: CheckboxProps, ref: React.Ref<React.ComponentRef<typeof Checkbox_2>>) => JSX.Element;
|
|
2281
2373
|
|
|
2282
2374
|
declare const MainInputInner: (props: InputProps, ref: React.Ref<InputRef>) => JSX.Element;
|
|
@@ -2325,7 +2417,7 @@ export declare const Modal: (({ open: externalOpen, closeIcon, children, size: s
|
|
|
2325
2417
|
|
|
2326
2418
|
export { ModalFuncProps }
|
|
2327
2419
|
|
|
2328
|
-
declare type ModalFuncProps_2 =
|
|
2420
|
+
declare type ModalFuncProps_2 = ModalProps & {
|
|
2329
2421
|
/**
|
|
2330
2422
|
* Content to be displayed in the modal
|
|
2331
2423
|
* Similar to children prop in Modal component
|
|
@@ -2334,7 +2426,7 @@ declare type ModalFuncProps_2 = ModalProps_2 & {
|
|
|
2334
2426
|
content?: default_2.ReactNode;
|
|
2335
2427
|
};
|
|
2336
2428
|
|
|
2337
|
-
declare interface
|
|
2429
|
+
export declare interface ModalProps extends Omit<ModalProps_2, "centered"> {
|
|
2338
2430
|
/**
|
|
2339
2431
|
* Predefined sizes for the modal
|
|
2340
2432
|
* - xsmall: 400px
|
|
@@ -2479,6 +2571,8 @@ export { notification }
|
|
|
2479
2571
|
|
|
2480
2572
|
export { NotificationArgsProps }
|
|
2481
2573
|
|
|
2574
|
+
declare type ObserverRect = Omit<DOMRectReadOnly, 'toJSON'>;
|
|
2575
|
+
|
|
2482
2576
|
export { Pagination }
|
|
2483
2577
|
|
|
2484
2578
|
export { PaginationProps }
|
|
@@ -3291,9 +3385,9 @@ export { RefSelectProps }
|
|
|
3291
3385
|
|
|
3292
3386
|
declare type RefType<T extends FieldType> = T extends "input" ? InputRef : T extends "select" ? RefSelectProps_2 : never;
|
|
3293
3387
|
|
|
3294
|
-
export declare const Resizable: ({ children, resizable, handles, absolutePositioning, classNames, className: containerClassName, style: containerStyle, resetKey, maxWidth,
|
|
3388
|
+
export declare const Resizable: ({ children, resizable, handles, absolutePositioning, classNames, className: containerClassName, style: containerStyle, resetKey, maxHeight, maxWidth, minHeight, minWidth, lockHorizontal, lockVertical, onResize, onDragEnd: onDragEndProp, onDragStart: onDragStartProp, disabled, maintainAspectRatio, interval, initialHeight: initialHeightProp, initialWidth: initialWidthProp, ...rest }: ResizableProps) => JSX.Element;
|
|
3295
3389
|
|
|
3296
|
-
export declare interface ResizableProps extends WithRenderPropProps {
|
|
3390
|
+
export declare interface ResizableProps extends Omit<WithRenderPropProps, keyof ResizableProps_2>, ResizableProps_2 {
|
|
3297
3391
|
/**
|
|
3298
3392
|
* Single React element child that will be enhanced with resize handles
|
|
3299
3393
|
*/
|
|
@@ -3978,7 +4072,35 @@ export declare const useAntdCssVarClassname: () => string;
|
|
|
3978
4072
|
|
|
3979
4073
|
export { useApp }
|
|
3980
4074
|
|
|
3981
|
-
|
|
4075
|
+
/**
|
|
4076
|
+
* A responsive breakpoint hook using window.matchMedia for optimal performance.
|
|
4077
|
+
*
|
|
4078
|
+
* @param ssrBreakpoint - The breakpoint to use during SSR and before hydration.
|
|
4079
|
+
* Defaults to "lg" for better SEO (search engines typically use desktop viewports).
|
|
4080
|
+
*
|
|
4081
|
+
* @example
|
|
4082
|
+
* ```tsx
|
|
4083
|
+
* // Default: uses "lg" for SSR
|
|
4084
|
+
* const bp = useBreakpoint();
|
|
4085
|
+
*
|
|
4086
|
+
* // Custom SSR breakpoint
|
|
4087
|
+
* const bp = useBreakpoint("md");
|
|
4088
|
+
*
|
|
4089
|
+
* // Usage
|
|
4090
|
+
* bp.breakpoint // Current breakpoint: "sm" | "md" | "lg" | "xl" | "2xl"
|
|
4091
|
+
* bp.up("md") // true if screen >= 768px
|
|
4092
|
+
* bp.down("lg") // true if screen < 1024px
|
|
4093
|
+
* bp.between("md", "xl") // true if 768px <= screen < 1280px
|
|
4094
|
+
* bp.only("lg") // true if screen is exactly in "lg" range
|
|
4095
|
+
* ```
|
|
4096
|
+
*/
|
|
4097
|
+
export declare const useBreakpoint: (ssrBreakpoint?: Breakpoint) => {
|
|
4098
|
+
breakpoint: Breakpoint;
|
|
4099
|
+
up: (bp: Breakpoint) => boolean;
|
|
4100
|
+
down: (bp: Breakpoint) => boolean;
|
|
4101
|
+
between: (minBp: Breakpoint, maxBp: Breakpoint) => boolean;
|
|
4102
|
+
only: (bp: Breakpoint) => boolean;
|
|
4103
|
+
};
|
|
3982
4104
|
|
|
3983
4105
|
/**
|
|
3984
4106
|
* Get chart colors and axis configuration based on the current theme.
|
|
@@ -4047,10 +4169,62 @@ export declare function useDraggable(enabled?: boolean): {
|
|
|
4047
4169
|
ref: (element: HTMLElement | null) => () => void;
|
|
4048
4170
|
};
|
|
4049
4171
|
|
|
4172
|
+
declare interface UseDropdownMenuProps {
|
|
4173
|
+
/**
|
|
4174
|
+
* Callback function to handle the open state change of the dropdown menu.
|
|
4175
|
+
*/
|
|
4176
|
+
onOpenChange?: (open: boolean) => void;
|
|
4177
|
+
items: DropdownMenuItemType[];
|
|
4178
|
+
inCombobox?: boolean;
|
|
4179
|
+
classNames?: {
|
|
4180
|
+
item?: string;
|
|
4181
|
+
itemIcon?: string;
|
|
4182
|
+
itemSuffix?: string;
|
|
4183
|
+
group?: string;
|
|
4184
|
+
groupLabel?: string;
|
|
4185
|
+
divider?: string;
|
|
4186
|
+
};
|
|
4187
|
+
/**
|
|
4188
|
+
* Custom render function for menu items
|
|
4189
|
+
*/
|
|
4190
|
+
itemRender?: (item: DropdownMenuItemType, props: React.HTMLAttributes<HTMLElement>) => React.ReactElement;
|
|
4191
|
+
/**
|
|
4192
|
+
* Whether to keep the dropdown open when an item is selected
|
|
4193
|
+
* @default false
|
|
4194
|
+
*/
|
|
4195
|
+
keepOpenOnSelect?: boolean;
|
|
4196
|
+
/**
|
|
4197
|
+
* Control the highlighted state of the menu item
|
|
4198
|
+
*/
|
|
4199
|
+
highlightedItemKey?: React.Key;
|
|
4200
|
+
/**
|
|
4201
|
+
* Control the selected state of the menu item
|
|
4202
|
+
*/
|
|
4203
|
+
selectedItemKeys?: React.Key[];
|
|
4204
|
+
/**
|
|
4205
|
+
* Whether to show checkbox
|
|
4206
|
+
* @default false
|
|
4207
|
+
*/
|
|
4208
|
+
showCheckbox?: boolean;
|
|
4209
|
+
/**
|
|
4210
|
+
* Function to extract keywords from the item for search filtering
|
|
4211
|
+
* @default (item) => [String(item.key), reactNodeToString(item.label)]
|
|
4212
|
+
*/
|
|
4213
|
+
getItemKeywords?: (item: DropdownMenuItemType & {
|
|
4214
|
+
type: "item";
|
|
4215
|
+
}) => string[];
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4050
4218
|
export declare const useDS: () => {
|
|
4051
4219
|
theme: "light" | "dark";
|
|
4052
4220
|
};
|
|
4053
4221
|
|
|
4222
|
+
export declare function useElementSize<T extends HTMLElement = any>(options?: ResizeObserverOptions): {
|
|
4223
|
+
ref: RefObject<T>;
|
|
4224
|
+
width: number;
|
|
4225
|
+
height: number;
|
|
4226
|
+
};
|
|
4227
|
+
|
|
4054
4228
|
export declare const useEnhancedEffect: typeof useLayoutEffect;
|
|
4055
4229
|
|
|
4056
4230
|
export declare function useEventCallback<Fn extends AnyFunction>(fn?: Fn): Fn;
|
|
@@ -4072,6 +4246,8 @@ export declare const useMessage: () => MessageInstance;
|
|
|
4072
4246
|
|
|
4073
4247
|
export declare const useModal: () => HookAPI;
|
|
4074
4248
|
|
|
4249
|
+
export declare function useResizeObserver<T extends HTMLElement = any>(options?: ResizeObserverOptions): readonly [RefObject<T>, ObserverRect];
|
|
4250
|
+
|
|
4075
4251
|
export declare const useToken: () => {
|
|
4076
4252
|
theme: Theme_2<SeedToken, AliasToken>;
|
|
4077
4253
|
token: GlobalToken;
|
|
@@ -4117,6 +4293,11 @@ export declare type UseUploadItemRenderProps = {
|
|
|
4117
4293
|
|
|
4118
4294
|
export { useWatch }
|
|
4119
4295
|
|
|
4296
|
+
export declare function useWindowSize(): {
|
|
4297
|
+
width: any;
|
|
4298
|
+
height: any;
|
|
4299
|
+
};
|
|
4300
|
+
|
|
4120
4301
|
export { version }
|
|
4121
4302
|
|
|
4122
4303
|
export declare const VerticalCollapsiblePanel: default_2.FC<VerticalCollapsiblePanelProps>;
|