@ws-ui/ui-components 1.0.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/README.md +146 -0
- package/dist/index.cjs +45 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9962 -0
- package/dist/qodly.ico +0 -0
- package/dist/qodly.svg +14 -0
- package/dist/src/breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/src/breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/src/breadcrumbs/Breadcrumbs.style.d.ts +12 -0
- package/dist/src/breadcrumbs/Breadcrumbs.style.d.ts.map +1 -0
- package/dist/src/breadcrumbs/Breadcrumbs.types.d.ts +28 -0
- package/dist/src/breadcrumbs/Breadcrumbs.types.d.ts.map +1 -0
- package/dist/src/breadcrumbs/index.d.ts +3 -0
- package/dist/src/breadcrumbs/index.d.ts.map +1 -0
- package/dist/src/button/Button.d.ts +4 -0
- package/dist/src/button/Button.d.ts.map +1 -0
- package/dist/src/button/Button.style.d.ts +6 -0
- package/dist/src/button/Button.style.d.ts.map +1 -0
- package/dist/src/button/Button.types.d.ts +24 -0
- package/dist/src/button/Button.types.d.ts.map +1 -0
- package/dist/src/button/index.d.ts +3 -0
- package/dist/src/button/index.d.ts.map +1 -0
- package/dist/src/checkbox/Checkbox.d.ts +18 -0
- package/dist/src/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/src/checkbox/Checkbox.style.d.ts +10 -0
- package/dist/src/checkbox/Checkbox.style.d.ts.map +1 -0
- package/dist/src/checkbox/Checkbox.types.d.ts +60 -0
- package/dist/src/checkbox/Checkbox.types.d.ts.map +1 -0
- package/dist/src/checkbox/index.d.ts +3 -0
- package/dist/src/checkbox/index.d.ts.map +1 -0
- package/dist/src/icons/Icon.types.d.ts +3 -0
- package/dist/src/icons/Icon.types.d.ts.map +1 -0
- package/dist/src/icons/Icons.d.ts +2078 -0
- package/dist/src/icons/Icons.d.ts.map +1 -0
- package/dist/src/icons/index.d.ts +5 -0
- package/dist/src/icons/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/input/Input.context.d.ts +4 -0
- package/dist/src/input/Input.context.d.ts.map +1 -0
- package/dist/src/input/Input.d.ts +16 -0
- package/dist/src/input/Input.d.ts.map +1 -0
- package/dist/src/input/Input.style.d.ts +33 -0
- package/dist/src/input/Input.style.d.ts.map +1 -0
- package/dist/src/input/Input.types.d.ts +106 -0
- package/dist/src/input/Input.types.d.ts.map +1 -0
- package/dist/src/input/index.d.ts +16 -0
- package/dist/src/input/index.d.ts.map +1 -0
- package/dist/src/menu/Menu.d.ts +10 -0
- package/dist/src/menu/Menu.d.ts.map +1 -0
- package/dist/src/menu/Menu.style.d.ts +21 -0
- package/dist/src/menu/Menu.style.d.ts.map +1 -0
- package/dist/src/menu/Menu.types.d.ts +38 -0
- package/dist/src/menu/Menu.types.d.ts.map +1 -0
- package/dist/src/menu/index.d.ts +3 -0
- package/dist/src/menu/index.d.ts.map +1 -0
- package/dist/src/pill/Pill.d.ts +9 -0
- package/dist/src/pill/Pill.d.ts.map +1 -0
- package/dist/src/pill/Pill.style.d.ts +9 -0
- package/dist/src/pill/Pill.style.d.ts.map +1 -0
- package/dist/src/pill/Pill.types.d.ts +48 -0
- package/dist/src/pill/Pill.types.d.ts.map +1 -0
- package/dist/src/pill/index.d.ts +3 -0
- package/dist/src/pill/index.d.ts.map +1 -0
- package/dist/src/radio/Radio.context.d.ts +4 -0
- package/dist/src/radio/Radio.context.d.ts.map +1 -0
- package/dist/src/radio/Radio.d.ts +9 -0
- package/dist/src/radio/Radio.d.ts.map +1 -0
- package/dist/src/radio/Radio.style.d.ts +11 -0
- package/dist/src/radio/Radio.style.d.ts.map +1 -0
- package/dist/src/radio/Radio.types.d.ts +87 -0
- package/dist/src/radio/Radio.types.d.ts.map +1 -0
- package/dist/src/radio/index.d.ts +3 -0
- package/dist/src/radio/index.d.ts.map +1 -0
- package/dist/src/resizable/Handle.d.ts +14 -0
- package/dist/src/resizable/Handle.d.ts.map +1 -0
- package/dist/src/resizable/Resizable.d.ts +4 -0
- package/dist/src/resizable/Resizable.d.ts.map +1 -0
- package/dist/src/resizable/Resizable.types.d.ts +144 -0
- package/dist/src/resizable/Resizable.types.d.ts.map +1 -0
- package/dist/src/resizable/index.d.ts +4 -0
- package/dist/src/resizable/index.d.ts.map +1 -0
- package/dist/src/select/Select.context.d.ts +4 -0
- package/dist/src/select/Select.context.d.ts.map +1 -0
- package/dist/src/select/Select.d.ts +61 -0
- package/dist/src/select/Select.d.ts.map +1 -0
- package/dist/src/select/Select.helper.d.ts +9 -0
- package/dist/src/select/Select.helper.d.ts.map +1 -0
- package/dist/src/select/Select.style.d.ts +90 -0
- package/dist/src/select/Select.style.d.ts.map +1 -0
- package/dist/src/select/Select.types.d.ts +273 -0
- package/dist/src/select/Select.types.d.ts.map +1 -0
- package/dist/src/select/useSelectDownshift.d.ts +5 -0
- package/dist/src/select/useSelectDownshift.d.ts.map +1 -0
- package/dist/src/snackbar/Snackbar.d.ts +5 -0
- package/dist/src/snackbar/Snackbar.d.ts.map +1 -0
- package/dist/src/snackbar/Snackbar.style.d.ts +5 -0
- package/dist/src/snackbar/Snackbar.style.d.ts.map +1 -0
- package/dist/src/snackbar/Snackbar.types.d.ts +21 -0
- package/dist/src/snackbar/Snackbar.types.d.ts.map +1 -0
- package/dist/src/snackbar/index.d.ts +3 -0
- package/dist/src/snackbar/index.d.ts.map +1 -0
- package/dist/src/tabs/SortableFileTab.d.ts +10 -0
- package/dist/src/tabs/SortableFileTab.d.ts.map +1 -0
- package/dist/src/tabs/Tabs.d.ts +12 -0
- package/dist/src/tabs/Tabs.d.ts.map +1 -0
- package/dist/src/tabs/Tabs.style.d.ts +14 -0
- package/dist/src/tabs/Tabs.style.d.ts.map +1 -0
- package/dist/src/tabs/Tabs.types.d.ts +76 -0
- package/dist/src/tabs/Tabs.types.d.ts.map +1 -0
- package/dist/src/tabs/index.d.ts +3 -0
- package/dist/src/tabs/index.d.ts.map +1 -0
- package/dist/src/toast/Toast.context.d.ts +6 -0
- package/dist/src/toast/Toast.context.d.ts.map +1 -0
- package/dist/src/toast/Toast.types.d.ts +36 -0
- package/dist/src/toast/Toast.types.d.ts.map +1 -0
- package/dist/src/toast/useToast.d.ts +3 -0
- package/dist/src/toast/useToast.d.ts.map +1 -0
- package/dist/src/toggle/Toggle.d.ts +6 -0
- package/dist/src/toggle/Toggle.d.ts.map +1 -0
- package/dist/src/toggle/Toggle.style.d.ts +10 -0
- package/dist/src/toggle/Toggle.style.d.ts.map +1 -0
- package/dist/src/toggle/Toggle.types.d.ts +18 -0
- package/dist/src/toggle/Toggle.types.d.ts.map +1 -0
- package/dist/src/toggle/index.d.ts +3 -0
- package/dist/src/toggle/index.d.ts.map +1 -0
- package/dist/src/tooltip/Tooltip.d.ts +5 -0
- package/dist/src/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/src/tooltip/Tooltip.style.d.ts +12 -0
- package/dist/src/tooltip/Tooltip.style.d.ts.map +1 -0
- package/dist/src/tooltip/Tooltip.types.d.ts +35 -0
- package/dist/src/tooltip/Tooltip.types.d.ts.map +1 -0
- package/dist/src/tooltip/index.d.ts +3 -0
- package/dist/src/tooltip/index.d.ts.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.types.d.ts","sourceRoot":"","sources":["../../../src/radio/Radio.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAC3E,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,K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ACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radio/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,mBAAmB,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface HandleProps {
|
|
2
|
+
isDragging?: boolean;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Default resize handle component
|
|
7
|
+
* Displays a visual indicator when dragging
|
|
8
|
+
*/
|
|
9
|
+
export declare const Handle: {
|
|
10
|
+
({ isDragging, className }: HandleProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export default Handle;
|
|
14
|
+
//# sourceMappingURL=Handle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Handle.d.ts","sourceRoot":"","sources":["../../../src/resizable/Handle.tsx"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM;gCAAuC,WAAW;;CAsBpE,CAAC;AAIF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../../src/resizable/Resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,eAAO,MAAM,SAAS,qHAuFrB,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode, Ref } from 'react';
|
|
2
|
+
export type ResizeDirection = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft';
|
|
3
|
+
export type ResizeEnable = {
|
|
4
|
+
top?: boolean;
|
|
5
|
+
right?: boolean;
|
|
6
|
+
bottom?: boolean;
|
|
7
|
+
left?: boolean;
|
|
8
|
+
topRight?: boolean;
|
|
9
|
+
bottomRight?: boolean;
|
|
10
|
+
bottomLeft?: boolean;
|
|
11
|
+
topLeft?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type Size = {
|
|
14
|
+
width: number | string;
|
|
15
|
+
height: number | string;
|
|
16
|
+
};
|
|
17
|
+
export type NumberSize = {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
export type ResizeCallback = (event: MouseEvent | TouchEvent, direction: ResizeDirection, elementRef: HTMLElement, delta: NumberSize) => void;
|
|
22
|
+
export type ResizeStartCallback = (event: React.MouseEvent<HTMLElement> | React.TouchEvent<HTMLElement>, direction: ResizeDirection, elementRef: HTMLElement) => void | boolean;
|
|
23
|
+
export interface ResizableProps {
|
|
24
|
+
/**
|
|
25
|
+
* The content to be rendered inside the resizable container
|
|
26
|
+
*/
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* The width of the resizable element
|
|
30
|
+
*/
|
|
31
|
+
width?: number | string;
|
|
32
|
+
/**
|
|
33
|
+
* The height of the resizable element
|
|
34
|
+
*/
|
|
35
|
+
height?: number | string;
|
|
36
|
+
/**
|
|
37
|
+
* The minimum width of the resizable element
|
|
38
|
+
* @default 10
|
|
39
|
+
*/
|
|
40
|
+
minWidth?: number | string;
|
|
41
|
+
/**
|
|
42
|
+
* The minimum height of the resizable element
|
|
43
|
+
* @default 10
|
|
44
|
+
*/
|
|
45
|
+
minHeight?: number | string;
|
|
46
|
+
/**
|
|
47
|
+
* The maximum width of the resizable element
|
|
48
|
+
*/
|
|
49
|
+
maxWidth?: number | string;
|
|
50
|
+
/**
|
|
51
|
+
* The maximum height of the resizable element
|
|
52
|
+
*/
|
|
53
|
+
maxHeight?: number | string;
|
|
54
|
+
/**
|
|
55
|
+
* The default width of the resizable element (for uncontrolled mode)
|
|
56
|
+
*/
|
|
57
|
+
defaultWidth?: number | string;
|
|
58
|
+
/**
|
|
59
|
+
* The default height of the resizable element (for uncontrolled mode)
|
|
60
|
+
*/
|
|
61
|
+
defaultHeight?: number | string;
|
|
62
|
+
/**
|
|
63
|
+
* The default size of the resizable element (alternative to defaultWidth/defaultHeight)
|
|
64
|
+
*/
|
|
65
|
+
defaultSize?: Size;
|
|
66
|
+
/**
|
|
67
|
+
* The size of the resizable element (alternative to width/height)
|
|
68
|
+
*/
|
|
69
|
+
size?: Size;
|
|
70
|
+
/**
|
|
71
|
+
* The grid size to snap to during resize
|
|
72
|
+
*/
|
|
73
|
+
grid?: [number, number];
|
|
74
|
+
/**
|
|
75
|
+
* The snap size to snap to during resize
|
|
76
|
+
*/
|
|
77
|
+
snap?: {
|
|
78
|
+
x?: number[];
|
|
79
|
+
y?: number[];
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* The aspect ratio to maintain during resize
|
|
83
|
+
*/
|
|
84
|
+
lockAspectRatio?: boolean | number;
|
|
85
|
+
/**
|
|
86
|
+
* Enable or disable specific resize directions
|
|
87
|
+
*/
|
|
88
|
+
enable?: ResizeEnable;
|
|
89
|
+
/**
|
|
90
|
+
* Custom handle styles for each direction
|
|
91
|
+
*/
|
|
92
|
+
handleStyles?: Partial<Record<ResizeDirection, CSSProperties>>;
|
|
93
|
+
/**
|
|
94
|
+
* Custom handle classes for each direction
|
|
95
|
+
*/
|
|
96
|
+
handleClasses?: Partial<Record<ResizeDirection, string>>;
|
|
97
|
+
/**
|
|
98
|
+
* Custom handle component for each direction
|
|
99
|
+
*/
|
|
100
|
+
handleComponent?: Partial<Record<ResizeDirection, React.ReactElement>>;
|
|
101
|
+
/**
|
|
102
|
+
* Custom styles for the resizable element
|
|
103
|
+
*/
|
|
104
|
+
style?: CSSProperties;
|
|
105
|
+
/**
|
|
106
|
+
* Custom class name for the resizable element
|
|
107
|
+
*/
|
|
108
|
+
className?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Callback when resize starts
|
|
111
|
+
*/
|
|
112
|
+
onResizeStart?: ResizeStartCallback;
|
|
113
|
+
/**
|
|
114
|
+
* Callback during resize
|
|
115
|
+
*/
|
|
116
|
+
onResize?: ResizeCallback;
|
|
117
|
+
/**
|
|
118
|
+
* Callback when resize stops
|
|
119
|
+
*/
|
|
120
|
+
onResizeStop?: ResizeCallback;
|
|
121
|
+
/**
|
|
122
|
+
* The scale of the parent element
|
|
123
|
+
* @default 1
|
|
124
|
+
*/
|
|
125
|
+
scale?: number;
|
|
126
|
+
/**
|
|
127
|
+
* Bounds to constrain resize within
|
|
128
|
+
*/
|
|
129
|
+
bounds?: 'parent' | 'window' | HTMLElement;
|
|
130
|
+
/**
|
|
131
|
+
* Whether to snap to the grid
|
|
132
|
+
*/
|
|
133
|
+
snapGap?: number;
|
|
134
|
+
/**
|
|
135
|
+
* The element type to render as
|
|
136
|
+
* @default 'div'
|
|
137
|
+
*/
|
|
138
|
+
as?: keyof React.JSX.IntrinsicElements;
|
|
139
|
+
/**
|
|
140
|
+
* Ref to the resizable element
|
|
141
|
+
*/
|
|
142
|
+
ref?: Ref<HTMLElement>;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=Resizable.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Resizable.types.d.ts","sourceRoot":"","sources":["../../../src/resizable/Resizable.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE3D,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,UAAU,GACV,aAAa,GACb,YAAY,GACZ,SAAS,CAAC;AAEd,MAAM,MAAM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AK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;IAE3C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAEvC;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resizable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EACV,cAAc,EACd,eAAe,EACf,YAAY,EACZ,IAAI,EACJ,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ISelectContextValue } from './Select.types';
|
|
2
|
+
export declare const SelectContext: import('react').Context<ISelectContextValue<unknown> | null>;
|
|
3
|
+
export declare const useSelectContext: <T = unknown>() => ISelectContextValue<T>;
|
|
4
|
+
//# sourceMappingURL=Select.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.context.d.ts","sourceRoot":"","sources":["../../../src/select/Select.context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,eAAO,MAAM,aAAa,8DAA2D,CAAC;AAEtF,eAAO,MAAM,gBAAgB,GAAI,CAAC,GAAG,OAAO,6BAQ3C,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { SelectRootProps, SelectFieldProps, SelectMessageProps, SelectValueContainerProps, SelectControlProps, SelectInputProps, SelectPlaceholderProps, SelectSingleValueProps, SelectMultiValueProps, SelectClearIndicatorProps, SelectDropdownIndicatorProps, SelectMenuProps, SelectMenuListProps, ISelectOptionProps, SelectGroupProps, SelectGroupHeadingProps, SelectNoOptionsMessageProps, SelectClearSearchIndicatorProps } from './Select.types';
|
|
2
|
+
export declare const Select: {
|
|
3
|
+
Root: {
|
|
4
|
+
<T = unknown>({ size, color, isInvalid, isDisabled, className, children, downshiftParams, ...props }: SelectRootProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
Control: import('react').ForwardRefExoticComponent<SelectControlProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
|
+
ValueContainer: {
|
|
9
|
+
({ className, children, isMulti, }: SelectValueContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
Input: import('react').ForwardRefExoticComponent<SelectInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
13
|
+
Placeholder: {
|
|
14
|
+
({ className, children }: SelectPlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
SingleValue: {
|
|
18
|
+
<T>({ className, children, data, isDisabled, }: SelectSingleValueProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
MultiValue: {
|
|
22
|
+
<T>({ className, children, data, isDisabled, isFocused, onRemove, }: SelectMultiValueProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
ClearIndicator: {
|
|
26
|
+
({ color: propColor, className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectClearIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
ClearSearchIndicator: ({ className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectClearSearchIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
30
|
+
DropdownIndicator: {
|
|
31
|
+
({ color: propColor, className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectDropdownIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
Menu: import('react').ForwardRefExoticComponent<SelectMenuProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
35
|
+
MenuList: import('react').ForwardRefExoticComponent<SelectMenuListProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
36
|
+
Option: {
|
|
37
|
+
<T>({ className, children, data, isDisabled, isFocused, isSelected, innerProps, ...props }: ISelectOptionProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
Group: {
|
|
41
|
+
<T>({ className, children, data, label, }: SelectGroupProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
GroupHeading: {
|
|
45
|
+
({ className, children, }: SelectGroupHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
NoOptionsMessage: {
|
|
49
|
+
({ className, children, inputValue, }: SelectNoOptionsMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
displayName: string;
|
|
51
|
+
};
|
|
52
|
+
Message: {
|
|
53
|
+
({ icon, className, children, ...props }: SelectMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
Field: {
|
|
57
|
+
<T = unknown>({ placeholder, noOptionsMessage, hideNoOptions, loadingMessage, isClearable, isSearchClearable, isLoading, isRequired, hideIndicators, hideDropdownIndicator, searchPlacement, hideSelectedOptions, onFocus, onBlur, renderMenuHeader, formatOptionLabel, displayFormattedOption, isOptionDisabled, inputRef: propInputRef, controlShouldRenderValue, name, id, onSelectionComplete, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, children, ...props }: SelectFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
displayName: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAElB,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,4BAA4B,EAC5B,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,2BAA2B,EAE3B,+BAA+B,EAEhC,MAAM,gBAAgB,CAAC;AAu3BxB,eAAO,MAAM,MAAM;;SA51BC,CAAC,oGASlB,eAAe,CAAC,CAAC,CAAC;;;;;4CAsFlB,yBAAyB;;;;;kCA2CwB,sBAAsB;;;;SAU/C,CAAC,8CAKzB,sBAAsB,CAAC,CAAC,CAAC;;;;SAeF,CAAC,mEAOxB,qBAAqB,CAAC,CAAC,CAAC;;;;mGA6CxB,yBAAyB;;;mGAmDzB,+BAA+B;;mGAgD/B,4BAA4B;;;;;;SAwFT,CAAC,0FASpB,kBAAkB,CAAC,CAAC,CAAC;;;;SAiBH,CAAC,yCAKnB,gBAAgB,CAAC,CAAC,CAAC;;;;mCAcnB,uBAAuB;;;;+CAcvB,2BAA2B;;;;kDAgB3B,kBAAkB;;;;SAwBA,CAAC,wfA6BnB,gBAAgB,CAAC,CAAC,CAAC;;;CAwVrB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ISelectOption, ISelectOptionGroup } from './Select.types';
|
|
2
|
+
export declare const isGroupedOptions: <T>(options: ISelectOption<T>[] | ISelectOptionGroup<T>[]) => options is ISelectOptionGroup<T>[];
|
|
3
|
+
export declare const flattenOptions: <T>(options: ISelectOption<T>[] | ISelectOptionGroup<T>[]) => ISelectOption<T>[];
|
|
4
|
+
export type InferDataType<T> = T extends readonly ISelectOption<infer U>[] ? U : T extends readonly ISelectOptionGroup<infer U>[] ? U : unknown;
|
|
5
|
+
export declare const createTypedHelper: <TOptions extends readonly ISelectOption<unknown>[] | readonly ISelectOptionGroup<unknown>[]>(options: TOptions) => {
|
|
6
|
+
options: TOptions;
|
|
7
|
+
dataType: InferDataType<TOptions>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=Select.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.helper.d.ts","sourceRoot":"","sources":["../../../src/select/Select.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGxE,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAChC,SAAS,aAAa,CAAC,CAAC,CAAC,EAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC,EAAE,KACpD,OAAO,IAAI,kBAAkB,CAAC,CAAC,CAAC,EAElC,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,CAAC,EAC9B,SAAS,aAAa,CAAC,CAAC,CAAC,EAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC,EAAE,KACpD,aAAa,CAAC,CAAC,CAAC,EAOlB,CAAC;AAGF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,GACtE,CAAC,GACD,CAAC,SAAS,SAAS,kBAAkB,CAAC,MAAM,CAAC,CAAC,EAAE,GAChD,CAAC,GACD,OAAO,CAAC;AAEZ,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,SAAS,SAAS,aAAa,CAAC,OAAO,CAAC,EAAE,GAAG,SAAS,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAC3F,SAAS,QAAQ;;cAGG,aAAa,CAAC,QAAQ,CAAC;CAE5C,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { SelectSize, SelectColor, SelectSizeConfig, SelectColorConfig } from './Select.types';
|
|
2
|
+
export declare const sizeClasses: Record<SelectSize, SelectSizeConfig>;
|
|
3
|
+
export declare const colorSchemes: Record<SelectColor, SelectColorConfig>;
|
|
4
|
+
export declare const getContainerClasses: () => string;
|
|
5
|
+
export declare const getControlClasses: ({ size, color, isDisabled, isFocused, isInvalid, hasMessage, }: {
|
|
6
|
+
size: SelectSize;
|
|
7
|
+
color: SelectColor;
|
|
8
|
+
isDisabled: boolean;
|
|
9
|
+
isFocused: boolean;
|
|
10
|
+
isInvalid: boolean;
|
|
11
|
+
hasMessage: boolean;
|
|
12
|
+
}) => string;
|
|
13
|
+
export declare const getValueContainerClasses: ({ isMulti, }: {
|
|
14
|
+
isMulti?: boolean;
|
|
15
|
+
}) => string;
|
|
16
|
+
export declare const getInputClasses: ({ size, color, }: {
|
|
17
|
+
size: SelectSize;
|
|
18
|
+
color: SelectColor;
|
|
19
|
+
}) => string;
|
|
20
|
+
export declare const getPlaceholderClasses: ({ size, color, }: {
|
|
21
|
+
size: SelectSize;
|
|
22
|
+
color: SelectColor;
|
|
23
|
+
}) => string;
|
|
24
|
+
export declare const getSingleValueClasses: ({ size, color, isDisabled, }: {
|
|
25
|
+
size: SelectSize;
|
|
26
|
+
color: SelectColor;
|
|
27
|
+
isDisabled?: boolean;
|
|
28
|
+
}) => string;
|
|
29
|
+
export declare const getMultiValueClasses: ({ size, color, isDisabled, isFocused, }: {
|
|
30
|
+
size: SelectSize;
|
|
31
|
+
color: SelectColor;
|
|
32
|
+
isDisabled?: boolean;
|
|
33
|
+
isFocused?: boolean;
|
|
34
|
+
}) => string;
|
|
35
|
+
export declare const getMultiValueLabelClasses: ({ size, }: {
|
|
36
|
+
size: SelectSize;
|
|
37
|
+
}) => string;
|
|
38
|
+
export declare const getMultiValueRemoveClasses: ({ size, color, isDisabled, }: {
|
|
39
|
+
size: SelectSize;
|
|
40
|
+
color: SelectColor;
|
|
41
|
+
isDisabled: boolean;
|
|
42
|
+
}) => string;
|
|
43
|
+
export declare const getClearIndicatorsClasses: ({ size, color, isDisabled, }: {
|
|
44
|
+
size: SelectSize;
|
|
45
|
+
color: SelectColor;
|
|
46
|
+
isDisabled?: boolean;
|
|
47
|
+
}) => string;
|
|
48
|
+
export declare const getDropdownIndicatorClasses: ({ size, color, isDisabled, }: {
|
|
49
|
+
size: SelectSize;
|
|
50
|
+
color: SelectColor;
|
|
51
|
+
isDisabled?: boolean;
|
|
52
|
+
isFocused?: boolean;
|
|
53
|
+
}) => string;
|
|
54
|
+
export declare const getMenuClasses: ({ size, placement, hasMessage, color, }: {
|
|
55
|
+
size: SelectSize;
|
|
56
|
+
placement?: "auto" | "bottom" | "top";
|
|
57
|
+
hasMessage: boolean;
|
|
58
|
+
color: SelectColor;
|
|
59
|
+
}) => string;
|
|
60
|
+
export declare const getMenuListClasses: ({ size }: {
|
|
61
|
+
size: SelectSize;
|
|
62
|
+
}) => string;
|
|
63
|
+
export declare const getOptionClasses: ({ size, color, isDisabled, isFocused, isSelected, }: {
|
|
64
|
+
size: SelectSize;
|
|
65
|
+
color: SelectColor;
|
|
66
|
+
isDisabled?: boolean;
|
|
67
|
+
isFocused?: boolean;
|
|
68
|
+
isSelected?: boolean;
|
|
69
|
+
}) => string;
|
|
70
|
+
export declare const getGroupClasses: ({ size }: {
|
|
71
|
+
size: SelectSize;
|
|
72
|
+
}) => string;
|
|
73
|
+
export declare const getGroupHeadingClasses: ({ size, color, }: {
|
|
74
|
+
size: SelectSize;
|
|
75
|
+
color: SelectColor;
|
|
76
|
+
}) => string;
|
|
77
|
+
export declare const getLoadingMessageClasses: ({ size, }: {
|
|
78
|
+
size: SelectSize;
|
|
79
|
+
}) => string;
|
|
80
|
+
export declare const getNoOptionsMessageClasses: ({ size, }: {
|
|
81
|
+
size: SelectSize;
|
|
82
|
+
}) => string;
|
|
83
|
+
export declare const getMessageContainerClasses: ({ size, color, }: {
|
|
84
|
+
size: SelectSize;
|
|
85
|
+
color: SelectColor;
|
|
86
|
+
}) => string;
|
|
87
|
+
export declare const getMessageIconClasses: ({ size, }: {
|
|
88
|
+
size: SelectSize;
|
|
89
|
+
}) => string;
|
|
90
|
+
//# sourceMappingURL=Select.style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.style.d.ts","sourceRoot":"","sources":["../../../src/select/Select.style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,gBAAgB,CAyE5D,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,WAAW,EAAE,iBAAiB,CA6O/D,CAAC;AAGF,eAAO,MAAM,mBAAmB,QAAO,MAEtC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,gEAO/B;IACD,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB,KAAG,MAeH,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,cAEtC;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,KAAG,MAKH,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,kBAG7B;IACD,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;CACpB,KAAG,MAMH,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,kBAGnC;IACD,IAAI,EAAE,UAAU,CA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EF,eAAO,MAAM,kBAAkB,GAAI,UAAU;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,KAAG,MAMnE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,qDAM9B;IACD,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,KAAG,MAYH,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,UAAU;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,KAAG,MAEhE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,kBAGpC;IACD,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;CACpB,KAAG,MAEH,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,WAEtC;IACD,IAAI,EAAE,UAAU,CAAC;CAClB,KAAG,MAEH,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,WAExC;IACD,IAAI,EAAE,UAAU,CAAC;CAClB,KAAG,MAKH,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,kBAGxC;IACD,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;CACpB,KAAG,MASH,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,WAEnC;IACD,IAAI,EAAE,UAAU,CAAC;CAClB,KAAG,MAEH,CAAC"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties, default as React } from 'react';
|
|
2
|
+
import { UseComboboxReturnValue, UseSelectReturnValue, UseMultipleSelectionReturnValue } from 'downshift';
|
|
3
|
+
export interface ISelectOption<T = unknown> {
|
|
4
|
+
value: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
data?: T;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
[index: string]: string | number | boolean | ReactNode | T;
|
|
10
|
+
}
|
|
11
|
+
export interface ISelectOptionGroup<T = unknown> {
|
|
12
|
+
label: string;
|
|
13
|
+
options: ISelectOption<T>[];
|
|
14
|
+
}
|
|
15
|
+
export type SelectValue<T = unknown> = ISelectOption<T> | ISelectOption<T>[] | null;
|
|
16
|
+
export type OptionGenerator<T = unknown> = (inputValue: string, currentOptions: ISelectOption<T>[]) => ISelectOption<T>[];
|
|
17
|
+
export interface IDownshiftHookParams<T = unknown> {
|
|
18
|
+
options?: ISelectOption<T>[] | ISelectOptionGroup<T>[];
|
|
19
|
+
value?: SelectValue<T>;
|
|
20
|
+
defaultValue?: SelectValue<T>;
|
|
21
|
+
onChange?: ((value: SelectValue<T>) => void) | ((value: SelectValue<T> | ((prev: SelectValue<T>) => SelectValue<T>)) => void);
|
|
22
|
+
isMulti?: boolean;
|
|
23
|
+
isSearchable?: boolean;
|
|
24
|
+
isOpen?: boolean;
|
|
25
|
+
isFocused?: boolean;
|
|
26
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
27
|
+
inputValue?: string;
|
|
28
|
+
onInputChange?: (value: string) => void;
|
|
29
|
+
getOptionLabel?: (option: ISelectOption<T>) => string;
|
|
30
|
+
getOptionValue?: (option: ISelectOption<T>) => string | number;
|
|
31
|
+
items?: ISelectOption<T>[];
|
|
32
|
+
customOptionGenerator?: OptionGenerator<T>;
|
|
33
|
+
disableInternalFiltering?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface IDownshiftHookReturn<T = unknown> {
|
|
36
|
+
isOpen: boolean;
|
|
37
|
+
selectedItem: ISelectOption<T> | null;
|
|
38
|
+
highlightedIndex: number;
|
|
39
|
+
inputValue: string;
|
|
40
|
+
getToggleButtonProps: UseSelectReturnValue<ISelectOption<T>>['getToggleButtonProps'] | UseComboboxReturnValue<ISelectOption<T>>['getToggleButtonProps'];
|
|
41
|
+
getMenuProps: UseSelectReturnValue<ISelectOption<T>>['getMenuProps'] | UseComboboxReturnValue<ISelectOption<T>>['getMenuProps'];
|
|
42
|
+
getItemProps: UseSelectReturnValue<ISelectOption<T>>['getItemProps'] | UseComboboxReturnValue<ISelectOption<T>>['getItemProps'];
|
|
43
|
+
getInputProps?: UseComboboxReturnValue<ISelectOption<T>>['getInputProps'];
|
|
44
|
+
selectedItems: ISelectOption<T>[];
|
|
45
|
+
filteredItems: ISelectOption<T>[];
|
|
46
|
+
setInputValue: (value: string) => void;
|
|
47
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
48
|
+
toggleMenu: () => void;
|
|
49
|
+
openMenu: () => void;
|
|
50
|
+
closeMenu: () => void;
|
|
51
|
+
clearSelection: () => void;
|
|
52
|
+
removeItem: (item: ISelectOption<T>) => void;
|
|
53
|
+
multipleSelection: UseMultipleSelectionReturnValue<ISelectOption<T>>;
|
|
54
|
+
isMulti: boolean;
|
|
55
|
+
isSearchable: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface ISelectContextValue<T = unknown> {
|
|
58
|
+
size: SelectSize;
|
|
59
|
+
color: SelectColor;
|
|
60
|
+
isInvalid: boolean;
|
|
61
|
+
isDisabled: boolean;
|
|
62
|
+
hasMessage: boolean;
|
|
63
|
+
setHasMessage: React.Dispatch<React.SetStateAction<boolean>>;
|
|
64
|
+
options?: ISelectOption<T>[] | ISelectOptionGroup<T>[];
|
|
65
|
+
downshift: IDownshiftHookReturn<T>;
|
|
66
|
+
}
|
|
67
|
+
export interface SelectRootProps<T = unknown> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
|
|
68
|
+
size?: SelectSize;
|
|
69
|
+
color?: 'primary' | 'positive' | 'warning' | 'negative';
|
|
70
|
+
isInvalid?: boolean;
|
|
71
|
+
isDisabled?: boolean;
|
|
72
|
+
className?: string;
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
downshiftParams?: IDownshiftHookParams<T>;
|
|
75
|
+
}
|
|
76
|
+
export interface SelectFieldProps<T = unknown> extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
77
|
+
placeholder?: string;
|
|
78
|
+
noOptionsMessage?: string | ((inputValue: string) => string);
|
|
79
|
+
hideNoOptions?: boolean;
|
|
80
|
+
loadingMessage?: string;
|
|
81
|
+
isClearable?: boolean;
|
|
82
|
+
isLoading?: boolean;
|
|
83
|
+
isRequired?: boolean;
|
|
84
|
+
hideIndicators?: boolean;
|
|
85
|
+
hideDropdownIndicator?: boolean;
|
|
86
|
+
closeMenuOnSelect?: boolean;
|
|
87
|
+
hideSelectedOptions?: boolean;
|
|
88
|
+
isSearchClearable?: boolean;
|
|
89
|
+
searchPlacement?: 'trigger' | 'menu';
|
|
90
|
+
onFocus?: (event: React.FocusEvent<HTMLElement>) => void;
|
|
91
|
+
onBlur?: (event: React.FocusEvent<HTMLElement>) => void;
|
|
92
|
+
onMenuOpen?: () => void;
|
|
93
|
+
onMenuClose?: () => void;
|
|
94
|
+
renderMenuHeader?: (props: IDownshiftHookReturn<T>) => ReactNode;
|
|
95
|
+
formatOptionLabel?: (option: ISelectOption<T> & {
|
|
96
|
+
data?: Record<string, unknown>;
|
|
97
|
+
}) => ReactNode;
|
|
98
|
+
displayFormattedOption?: boolean;
|
|
99
|
+
isOptionDisabled?: (option: ISelectOption<T>) => boolean;
|
|
100
|
+
name?: string;
|
|
101
|
+
id?: string;
|
|
102
|
+
className?: string;
|
|
103
|
+
'aria-label'?: string;
|
|
104
|
+
'aria-labelledby'?: string;
|
|
105
|
+
'aria-describedby'?: string;
|
|
106
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
107
|
+
controlShouldRenderValue?: boolean;
|
|
108
|
+
blurInputOnSelect?: boolean;
|
|
109
|
+
tabSelectsValue?: boolean;
|
|
110
|
+
backspaceRemovesValue?: boolean;
|
|
111
|
+
onSelectionComplete?: (value: string, option: ISelectOption<T> | null) => void;
|
|
112
|
+
children?: ReactNode;
|
|
113
|
+
}
|
|
114
|
+
export interface SelectClearIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
115
|
+
color?: SelectColor;
|
|
116
|
+
className?: string;
|
|
117
|
+
children?: ReactNode;
|
|
118
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
119
|
+
isDisabled?: boolean;
|
|
120
|
+
}
|
|
121
|
+
export interface SelectClearSearchIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
122
|
+
className?: string;
|
|
123
|
+
children?: ReactNode;
|
|
124
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
125
|
+
isDisabled?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export interface SelectDropdownIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
128
|
+
color?: SelectColor;
|
|
129
|
+
className?: string;
|
|
130
|
+
children?: ReactNode;
|
|
131
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
132
|
+
isDisabled?: boolean;
|
|
133
|
+
}
|
|
134
|
+
export interface SelectValueContainerProps {
|
|
135
|
+
className?: string;
|
|
136
|
+
children: ReactNode;
|
|
137
|
+
isMulti?: boolean;
|
|
138
|
+
}
|
|
139
|
+
export interface SelectControlProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
140
|
+
className?: string;
|
|
141
|
+
children: ReactNode;
|
|
142
|
+
isFocused?: boolean;
|
|
143
|
+
isDisabled?: boolean;
|
|
144
|
+
}
|
|
145
|
+
export interface SelectInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
146
|
+
isHidden?: boolean;
|
|
147
|
+
inputClassName?: string;
|
|
148
|
+
inputStyle?: CSSProperties;
|
|
149
|
+
}
|
|
150
|
+
export interface SelectPlaceholderProps {
|
|
151
|
+
className?: string;
|
|
152
|
+
children: ReactNode;
|
|
153
|
+
}
|
|
154
|
+
export interface SelectSingleValueProps<T = unknown> {
|
|
155
|
+
className?: string;
|
|
156
|
+
children?: ReactNode;
|
|
157
|
+
data: ISelectOption<T>;
|
|
158
|
+
isDisabled?: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface SelectMultiValueProps<T = unknown> {
|
|
161
|
+
className?: string;
|
|
162
|
+
children?: ReactNode;
|
|
163
|
+
data: ISelectOption<T>;
|
|
164
|
+
index: number;
|
|
165
|
+
isDisabled?: boolean;
|
|
166
|
+
isFocused?: boolean;
|
|
167
|
+
onRemove?: (item: ISelectOption<T>) => void;
|
|
168
|
+
}
|
|
169
|
+
export interface SelectMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
170
|
+
className?: string;
|
|
171
|
+
children: ReactNode;
|
|
172
|
+
placement?: 'auto' | 'bottom' | 'top';
|
|
173
|
+
position?: 'absolute' | 'fixed';
|
|
174
|
+
}
|
|
175
|
+
export interface SelectMenuListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
176
|
+
className?: string;
|
|
177
|
+
children: ReactNode;
|
|
178
|
+
isLoading?: boolean;
|
|
179
|
+
maxHeight?: number;
|
|
180
|
+
}
|
|
181
|
+
export interface ISelectOptionProps<T = unknown> extends React.HTMLAttributes<HTMLDivElement> {
|
|
182
|
+
className?: string;
|
|
183
|
+
children?: ReactNode;
|
|
184
|
+
data: ISelectOption<T>;
|
|
185
|
+
isDisabled?: boolean;
|
|
186
|
+
isFocused?: boolean;
|
|
187
|
+
isSelected?: boolean;
|
|
188
|
+
innerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
189
|
+
}
|
|
190
|
+
export interface SelectGroupProps<T = unknown> {
|
|
191
|
+
className?: string;
|
|
192
|
+
children: ReactNode;
|
|
193
|
+
data: ISelectOptionGroup<T>;
|
|
194
|
+
label: string;
|
|
195
|
+
options: ISelectOption<T>[];
|
|
196
|
+
}
|
|
197
|
+
export interface SelectGroupHeadingProps {
|
|
198
|
+
className?: string;
|
|
199
|
+
children: ReactNode;
|
|
200
|
+
}
|
|
201
|
+
export interface SelectNoOptionsMessageProps {
|
|
202
|
+
className?: string;
|
|
203
|
+
children?: ReactNode;
|
|
204
|
+
inputValue?: string;
|
|
205
|
+
}
|
|
206
|
+
export interface SelectMessageProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
207
|
+
icon?: React.ReactElement;
|
|
208
|
+
className?: string;
|
|
209
|
+
children: ReactNode;
|
|
210
|
+
}
|
|
211
|
+
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
212
|
+
export type SelectColor = 'primary' | 'positive' | 'warning' | 'negative';
|
|
213
|
+
export interface SelectSizeConfig {
|
|
214
|
+
trigger: string;
|
|
215
|
+
control: string;
|
|
216
|
+
input: string;
|
|
217
|
+
placeholder: string;
|
|
218
|
+
singleValue: string;
|
|
219
|
+
multiValue: string;
|
|
220
|
+
multiValueLabel: string;
|
|
221
|
+
multiValueRemove: string;
|
|
222
|
+
indicatorsContainer: string;
|
|
223
|
+
clearIndicator: string;
|
|
224
|
+
dropdownIndicator: string;
|
|
225
|
+
indicatorSeparator: string;
|
|
226
|
+
loadingIndicator: string;
|
|
227
|
+
menu: string;
|
|
228
|
+
menuList: string;
|
|
229
|
+
option: string;
|
|
230
|
+
group: string;
|
|
231
|
+
groupHeading: string;
|
|
232
|
+
noOptionsMessage: string;
|
|
233
|
+
loadingMessage: string;
|
|
234
|
+
message: string;
|
|
235
|
+
icon: string;
|
|
236
|
+
}
|
|
237
|
+
export interface SelectColorConfig {
|
|
238
|
+
control: string;
|
|
239
|
+
controlFocused: string;
|
|
240
|
+
controlDisabled: string;
|
|
241
|
+
controlInvalid: string;
|
|
242
|
+
placeholder: string;
|
|
243
|
+
singleValue: string;
|
|
244
|
+
singleValueDisabled: string;
|
|
245
|
+
multiValue: string;
|
|
246
|
+
multiValueLabel: string;
|
|
247
|
+
multiValueRemove: string;
|
|
248
|
+
multiValueRemoveHover: string;
|
|
249
|
+
multiValueDisabled: string;
|
|
250
|
+
clearIndicator: string;
|
|
251
|
+
clearIndicatorHover: string;
|
|
252
|
+
dropdownIndicator: string;
|
|
253
|
+
dropdownIndicatorHover: string;
|
|
254
|
+
indicatorSeparator: string;
|
|
255
|
+
loadingIndicator: string;
|
|
256
|
+
menu: string;
|
|
257
|
+
menuList: string;
|
|
258
|
+
option: string;
|
|
259
|
+
optionFocused: string;
|
|
260
|
+
optionSelected: string;
|
|
261
|
+
optionDisabled: string;
|
|
262
|
+
group: string;
|
|
263
|
+
groupHeading: string;
|
|
264
|
+
noOptionsMessage: string;
|
|
265
|
+
loadingMessage: string;
|
|
266
|
+
message: string;
|
|
267
|
+
messageBackground: string;
|
|
268
|
+
messageBorder: string;
|
|
269
|
+
icon: string;
|
|
270
|
+
iconAction: string;
|
|
271
|
+
iconActionHover: string;
|
|
272
|
+
}
|
|
273
|
+
//# sourceMappingURL=Select.types.d.ts.map
|