@unifiedsoftware/react-ui 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +299 -204
- package/dist/index.d.ts +299 -204
- package/dist/index.js +2180 -1375
- package/dist/index.mjs +2209 -1421
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,207 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as react from 'react';
|
|
2
3
|
import react__default, { Dispatch, SetStateAction } from 'react';
|
|
3
|
-
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
interface WindowEventMap {
|
|
7
|
+
'local-storage': CustomEvent;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
type SetValue<T> = Dispatch<SetStateAction<T>>;
|
|
11
|
+
/**
|
|
12
|
+
* It's a React hook that allows you to store and retrieve data from localStorage
|
|
13
|
+
* @param {string} key - string
|
|
14
|
+
* @param {T} initialValue - The initial value to use if the key doesn't exist in localStorage.
|
|
15
|
+
* @returns An array of two items. The first item is the value of the local storage key. The second
|
|
16
|
+
* item is a function that can be used to set the value of the local storage key.
|
|
17
|
+
*/
|
|
18
|
+
declare function useLocalStorage<T>(key: string, initialValue: T): [T, SetValue<T>];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* It returns the previous value of the given value
|
|
22
|
+
* @param {any} value - any - The value to track.
|
|
23
|
+
* @returns The previous value of the variable.
|
|
24
|
+
*/
|
|
25
|
+
declare const usePrevious: (value: any) => undefined;
|
|
26
|
+
|
|
27
|
+
interface Disclosure {
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
onOpen: () => void;
|
|
30
|
+
onClose: () => void;
|
|
31
|
+
onToggle: () => void;
|
|
32
|
+
}
|
|
33
|
+
declare function useDisclosure({ defaultValue }?: {
|
|
34
|
+
defaultValue?: boolean;
|
|
35
|
+
}): Disclosure;
|
|
36
|
+
|
|
37
|
+
type Handler = (event: MouseEvent) => void;
|
|
38
|
+
declare const useOnClickOutside: <T extends HTMLElement = HTMLElement>(ref: react.RefObject<T>, handler: Handler) => void;
|
|
39
|
+
|
|
40
|
+
interface Helpers {
|
|
41
|
+
goToNextStep: () => void;
|
|
42
|
+
goToPrevStep: () => void;
|
|
43
|
+
reset: () => void;
|
|
44
|
+
canGoToNextStep: boolean;
|
|
45
|
+
canGoToPrevStep: boolean;
|
|
46
|
+
setStep: Dispatch<SetStateAction<number>>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* It returns a tuple with the current step and an object with functions to manipulate the step
|
|
50
|
+
* @param {number} maxStep - number - The maximum number of steps in the stepper.
|
|
51
|
+
* @returns An array with two elements. The first element is the current step. The second element is an
|
|
52
|
+
* object with the following properties:
|
|
53
|
+
*/
|
|
54
|
+
declare const useStep: (maxStep: number) => [number, Helpers];
|
|
55
|
+
|
|
56
|
+
declare function useDebounce<T>(value: T, delay?: number): T;
|
|
57
|
+
|
|
58
|
+
type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';
|
|
59
|
+
type ScrollBehavior = 'auto' | 'smooth';
|
|
60
|
+
interface ScrollToOptions {
|
|
61
|
+
align?: ScrollAlignment;
|
|
62
|
+
behavior?: ScrollBehavior;
|
|
63
|
+
}
|
|
64
|
+
type Key = number | string;
|
|
65
|
+
interface Virtualizer {
|
|
66
|
+
getVirtualItems: () => VirtualItem[];
|
|
67
|
+
getTotalSize: () => number;
|
|
68
|
+
scrollToIndex: (index: number, options: ScrollToOptions) => void;
|
|
69
|
+
scrollToOffset: (toOffset: number, options: ScrollToOptions) => void;
|
|
70
|
+
}
|
|
71
|
+
interface VirtualItem {
|
|
72
|
+
key: Key;
|
|
73
|
+
index: number;
|
|
74
|
+
start: number;
|
|
75
|
+
end: number;
|
|
76
|
+
size: number;
|
|
77
|
+
lane: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface VirtualizerOptions {
|
|
81
|
+
parentRef: React.MutableRefObject<Element | null>;
|
|
82
|
+
total?: number;
|
|
83
|
+
overscan?: number;
|
|
84
|
+
count?: number;
|
|
85
|
+
hasNextPage?: boolean;
|
|
86
|
+
isFetchingNextPage?: boolean;
|
|
87
|
+
onFetchNextPage?: () => Promise<void> | void;
|
|
88
|
+
estimateSize: (index: number) => number;
|
|
89
|
+
}
|
|
90
|
+
declare function useVirtualizer(options: VirtualizerOptions): Virtualizer;
|
|
91
|
+
|
|
92
|
+
declare enum QueryStatus {
|
|
93
|
+
IDLE = 0,
|
|
94
|
+
LOADING = 1,
|
|
95
|
+
SUCCESS = 2,
|
|
96
|
+
ERROR = 3
|
|
97
|
+
}
|
|
98
|
+
interface QueryOptions {
|
|
99
|
+
page?: number;
|
|
100
|
+
}
|
|
101
|
+
interface InfiniteData<TData = any> {
|
|
102
|
+
pages: TData[];
|
|
103
|
+
}
|
|
104
|
+
type QueryFunction<TData = unknown> = (options: QueryOptions) => Promise<TData>;
|
|
105
|
+
interface UseInfiniteQueryOptions<TData = unknown> {
|
|
106
|
+
query: QueryFunction<TData>;
|
|
107
|
+
getNextPage: (lastPage: TData, allPages: TData[]) => number | undefined;
|
|
108
|
+
disabled?: boolean;
|
|
109
|
+
}
|
|
110
|
+
interface UseInfiniteQueryResult<TData = unknown, TError = unknown> {
|
|
111
|
+
status: QueryStatus;
|
|
112
|
+
data?: InfiniteData<TData>;
|
|
113
|
+
error?: TError;
|
|
114
|
+
hasNextPage?: boolean;
|
|
115
|
+
isFetchingNextPage: boolean;
|
|
116
|
+
fetchNextPage: () => Promise<void>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare function useInfiniteQuery<TData = unknown, TError = unknown>(options: UseInfiniteQueryOptions<TData>, deps?: React.DependencyList): UseInfiniteQueryResult<TData, TError>;
|
|
120
|
+
|
|
121
|
+
interface Resize {
|
|
122
|
+
width: number;
|
|
123
|
+
height: number;
|
|
124
|
+
}
|
|
125
|
+
interface UseElementSizeOptions<T> {
|
|
126
|
+
ref?: React.MutableRefObject<T | null>;
|
|
127
|
+
target?: T;
|
|
128
|
+
callback?: (resize: Resize) => void;
|
|
129
|
+
}
|
|
130
|
+
declare function useElementSize<T extends HTMLElement = any>(options: UseElementSizeOptions<T>): Resize;
|
|
131
|
+
|
|
132
|
+
interface ListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
133
|
+
as?: React.ElementType;
|
|
134
|
+
}
|
|
135
|
+
declare const List: react.ForwardRefExoticComponent<ListProps & react.RefAttributes<HTMLDivElement>>;
|
|
136
|
+
|
|
137
|
+
interface ListItemProps extends react__default.HTMLAttributes<HTMLDivElement> {
|
|
138
|
+
as?: react__default.ElementType;
|
|
139
|
+
title: string;
|
|
140
|
+
subtitle?: string;
|
|
141
|
+
startContent?: react__default.ReactNode;
|
|
142
|
+
endContent?: react__default.ReactNode;
|
|
143
|
+
level?: number;
|
|
144
|
+
hoverable?: boolean;
|
|
145
|
+
selected?: boolean;
|
|
146
|
+
disabled?: boolean;
|
|
147
|
+
slotProps?: {
|
|
148
|
+
title?: react__default.HTMLAttributes<HTMLDivElement>;
|
|
149
|
+
subtitle?: react__default.HTMLAttributes<HTMLDivElement>;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
declare const ListItem: react__default.ForwardRefExoticComponent<ListItemProps & react__default.RefAttributes<HTMLDivElement>>;
|
|
153
|
+
|
|
154
|
+
type ListGroupProps = ListItemProps & {
|
|
155
|
+
expandVisible?: boolean;
|
|
156
|
+
expandPosition?: 'start' | 'end';
|
|
157
|
+
isOpen?: boolean;
|
|
158
|
+
onOpen?: () => void;
|
|
159
|
+
onClose?: () => void;
|
|
160
|
+
onToggle?: () => void;
|
|
161
|
+
};
|
|
162
|
+
declare const ListGroup: react.ForwardRefExoticComponent<ListItemProps & {
|
|
163
|
+
expandVisible?: boolean | undefined;
|
|
164
|
+
expandPosition?: "start" | "end" | undefined;
|
|
165
|
+
isOpen?: boolean | undefined;
|
|
166
|
+
onOpen?: (() => void) | undefined;
|
|
167
|
+
onClose?: (() => void) | undefined;
|
|
168
|
+
onToggle?: (() => void) | undefined;
|
|
169
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
170
|
+
|
|
171
|
+
type AutocompleteItem = Record<string, any>;
|
|
172
|
+
type AutocompleteKeyField<TAutocompleteItem> = keyof TAutocompleteItem;
|
|
173
|
+
interface AutocompleteSingleProps<TAutocompleteItem extends AutocompleteItem, TAutocompleteKeyField extends AutocompleteKeyField<TAutocompleteItem> = 'key'> {
|
|
174
|
+
isMultiple?: false;
|
|
175
|
+
value: TAutocompleteItem[TAutocompleteKeyField] | null;
|
|
176
|
+
onChange?: (value: TAutocompleteItem | null) => void;
|
|
177
|
+
onValueChange?: (value: TAutocompleteItem[TAutocompleteKeyField] | null) => void;
|
|
178
|
+
}
|
|
179
|
+
interface AutocompleteMultipleProps<TAutocompleteItem extends AutocompleteItem, TAutocompleteKeyField extends AutocompleteKeyField<TAutocompleteItem> = 'key'> {
|
|
180
|
+
isMultiple: true;
|
|
181
|
+
value: TAutocompleteItem[TAutocompleteKeyField][];
|
|
182
|
+
onChange?: (value: TAutocompleteItem[]) => void;
|
|
183
|
+
onValueChange?: (value: TAutocompleteItem[TAutocompleteKeyField][]) => void;
|
|
184
|
+
}
|
|
185
|
+
type NativeAttrs$a<TAutocompleteItem extends AutocompleteItem, TAutocompleteKeyField extends AutocompleteKeyField<TAutocompleteItem> = 'key'> = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$a<TAutocompleteItem, TAutocompleteKeyField>>;
|
|
186
|
+
type Props$a<TAutocompleteItem extends AutocompleteItem, TAutocompleteKeyField extends AutocompleteKeyField<TAutocompleteItem> = 'key'> = {
|
|
187
|
+
data: TAutocompleteItem[];
|
|
188
|
+
keyField?: TAutocompleteKeyField;
|
|
189
|
+
textField?: keyof TAutocompleteItem;
|
|
190
|
+
placeholder?: string;
|
|
191
|
+
filter?: string;
|
|
192
|
+
loading?: boolean;
|
|
193
|
+
disabled?: boolean;
|
|
194
|
+
disclosure?: Disclosure;
|
|
195
|
+
virtual?: Omit<VirtualizerOptions, 'parentRef'>;
|
|
196
|
+
startContent?: React.ReactNode;
|
|
197
|
+
endContent?: React.ReactNode;
|
|
198
|
+
onItemSelect?: (item: TAutocompleteItem) => void;
|
|
199
|
+
onFilterChange?: (value: string) => void;
|
|
200
|
+
renderItem?: (item: TAutocompleteItem, props: ListItemProps) => React.ReactNode;
|
|
201
|
+
} & (AutocompleteSingleProps<TAutocompleteItem, TAutocompleteKeyField> | AutocompleteMultipleProps<TAutocompleteItem, TAutocompleteKeyField>);
|
|
202
|
+
type AutocompleteProps<TAutocompleteItem extends AutocompleteItem, TAutocompleteKeyField extends AutocompleteKeyField<TAutocompleteItem> = 'key'> = Props$a<TAutocompleteItem, TAutocompleteKeyField> & NativeAttrs$a<TAutocompleteItem, TAutocompleteKeyField>;
|
|
203
|
+
|
|
204
|
+
declare const Autocomplete: <TAutocompleteItem extends AutocompleteItem, TAutocompleteKeyField extends keyof TAutocompleteItem = "key">(props: AutocompleteProps<TAutocompleteItem, TAutocompleteKeyField>) => react_jsx_runtime.JSX.Element;
|
|
4
205
|
|
|
5
206
|
interface BackdropProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
207
|
isOpen: boolean;
|
|
@@ -10,7 +211,7 @@ declare const Backdrop: react.ForwardRefExoticComponent<BackdropProps & react.Re
|
|
|
10
211
|
|
|
11
212
|
type BadgePlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
12
213
|
|
|
13
|
-
interface Props$
|
|
214
|
+
interface Props$9 {
|
|
14
215
|
/**
|
|
15
216
|
* The placement of the badge relative to its content.
|
|
16
217
|
*/
|
|
@@ -20,15 +221,15 @@ interface Props$6 {
|
|
|
20
221
|
*/
|
|
21
222
|
content?: React.ReactNode;
|
|
22
223
|
}
|
|
23
|
-
type NativeAttrs$
|
|
24
|
-
type BadgeProps = Props$
|
|
224
|
+
type NativeAttrs$9 = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$9>;
|
|
225
|
+
type BadgeProps = Props$9 & NativeAttrs$9;
|
|
25
226
|
declare const Badge: React.FC<BadgeProps>;
|
|
26
227
|
|
|
27
|
-
type ButtonVariant = 'filled' | 'outlined' | 'flat' | 'text';
|
|
228
|
+
type ButtonVariant = 'filled' | 'outlined' | 'flat' | 'text' | 'plain';
|
|
28
229
|
type ButtonColor = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger';
|
|
29
230
|
type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
30
231
|
|
|
31
|
-
interface Props$
|
|
232
|
+
interface Props$8 {
|
|
32
233
|
/**
|
|
33
234
|
* The HTML element type or React component to render as the button.
|
|
34
235
|
*/
|
|
@@ -67,9 +268,9 @@ interface Props$5 {
|
|
|
67
268
|
*/
|
|
68
269
|
disabled?: boolean;
|
|
69
270
|
}
|
|
70
|
-
type NativeAttrs$
|
|
71
|
-
type ButtonProps = Props$
|
|
72
|
-
declare const Button: react.ForwardRefExoticComponent<Props$
|
|
271
|
+
type NativeAttrs$8 = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof Props$8>;
|
|
272
|
+
type ButtonProps = Props$8 & NativeAttrs$8;
|
|
273
|
+
declare const Button: react.ForwardRefExoticComponent<Props$8 & NativeAttrs$8 & react.RefAttributes<HTMLButtonElement>>;
|
|
73
274
|
|
|
74
275
|
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
75
276
|
as?: React.ElementType;
|
|
@@ -89,7 +290,7 @@ type ChipVariant = 'filled' | 'outlined' | 'text';
|
|
|
89
290
|
type ChipColor = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger';
|
|
90
291
|
type ChipSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
91
292
|
|
|
92
|
-
interface Props$
|
|
293
|
+
interface Props$7 {
|
|
93
294
|
/**
|
|
94
295
|
* The HTML element type or React component to render as the chip.
|
|
95
296
|
*/
|
|
@@ -107,9 +308,9 @@ interface Props$4 {
|
|
|
107
308
|
*/
|
|
108
309
|
size?: ChipSize;
|
|
109
310
|
}
|
|
110
|
-
type NativeAttrs$
|
|
111
|
-
type ChipProps = Props$
|
|
112
|
-
declare const Chip: react.ForwardRefExoticComponent<Props$
|
|
311
|
+
type NativeAttrs$7 = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$7>;
|
|
312
|
+
type ChipProps = Props$7 & NativeAttrs$7;
|
|
313
|
+
declare const Chip: react.ForwardRefExoticComponent<Props$7 & NativeAttrs$7 & react.RefAttributes<HTMLDivElement>>;
|
|
113
314
|
|
|
114
315
|
interface CollapseProps {
|
|
115
316
|
children: React.ReactNode;
|
|
@@ -160,7 +361,7 @@ interface IconProps {
|
|
|
160
361
|
}
|
|
161
362
|
declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<unknown>>;
|
|
162
363
|
|
|
163
|
-
interface Props$
|
|
364
|
+
interface Props$6 {
|
|
164
365
|
/**
|
|
165
366
|
* The HTML element type or React component to render as the menu item.
|
|
166
367
|
*/
|
|
@@ -186,9 +387,9 @@ interface Props$3 {
|
|
|
186
387
|
*/
|
|
187
388
|
disabled?: boolean;
|
|
188
389
|
}
|
|
189
|
-
type NativeAttrs$
|
|
190
|
-
type MenuItemProps = Props$
|
|
191
|
-
declare const MenuItem: react.ForwardRefExoticComponent<Props$
|
|
390
|
+
type NativeAttrs$6 = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$6 | 'items'>;
|
|
391
|
+
type MenuItemProps = Props$6 & NativeAttrs$6;
|
|
392
|
+
declare const MenuItem: react.ForwardRefExoticComponent<Props$6 & NativeAttrs$6 & react.RefAttributes<HTMLDivElement>>;
|
|
192
393
|
|
|
193
394
|
type MenuSubmenuProps = Omit<MenuItemProps, 'items'> & {
|
|
194
395
|
items?: MenuItemType[];
|
|
@@ -212,7 +413,7 @@ type MenuItemType = (MenuGroupProps & {
|
|
|
212
413
|
}) | (MenuItemProps & {
|
|
213
414
|
type?: 'item';
|
|
214
415
|
});
|
|
215
|
-
interface Props$
|
|
416
|
+
interface Props$5 {
|
|
216
417
|
/**
|
|
217
418
|
* The currently selected value of the menu.
|
|
218
419
|
*/
|
|
@@ -248,8 +449,8 @@ interface Props$2 {
|
|
|
248
449
|
*/
|
|
249
450
|
onItemSelect?: (props: MenuItemProps) => void;
|
|
250
451
|
}
|
|
251
|
-
type NativeAttrs$
|
|
252
|
-
type MenuProps = Props$
|
|
452
|
+
type NativeAttrs$5 = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$5 | 'items'>;
|
|
453
|
+
type MenuProps = Props$5 & NativeAttrs$5 & {
|
|
253
454
|
items?: MenuItemType[];
|
|
254
455
|
};
|
|
255
456
|
declare const Menu: React.FC<MenuProps>;
|
|
@@ -307,10 +508,11 @@ declare const AccordionContent: react.ForwardRefExoticComponent<AccordionContent
|
|
|
307
508
|
|
|
308
509
|
interface PortalProps {
|
|
309
510
|
children: React.ReactNode;
|
|
511
|
+
container?: Element;
|
|
310
512
|
}
|
|
311
|
-
declare const Portal: react.ForwardRefExoticComponent<PortalProps & react.RefAttributes<
|
|
513
|
+
declare const Portal: react.ForwardRefExoticComponent<PortalProps & react.RefAttributes<HTMLDivElement>>;
|
|
312
514
|
|
|
313
|
-
interface Props$
|
|
515
|
+
interface Props$4 {
|
|
314
516
|
/**
|
|
315
517
|
* The HTML element type or React component to render as the tab.
|
|
316
518
|
*/
|
|
@@ -327,16 +529,24 @@ interface Props$1 {
|
|
|
327
529
|
* Whether the tab is disabled.
|
|
328
530
|
*/
|
|
329
531
|
disabled?: boolean;
|
|
532
|
+
/**
|
|
533
|
+
* Content to display at the start of the tab, before the tab's text.
|
|
534
|
+
*/
|
|
535
|
+
startContent?: React.ReactNode;
|
|
536
|
+
/**
|
|
537
|
+
* Content to display at the end of the tab, after the tab's text.
|
|
538
|
+
*/
|
|
539
|
+
endContent?: React.ReactNode;
|
|
330
540
|
}
|
|
331
|
-
type NativeAttrs$
|
|
332
|
-
type TabProps = Props$
|
|
333
|
-
declare const Tab: react.ForwardRefExoticComponent<Props$
|
|
541
|
+
type NativeAttrs$4 = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$4>;
|
|
542
|
+
type TabProps = Props$4 & NativeAttrs$4;
|
|
543
|
+
declare const Tab: react.ForwardRefExoticComponent<Props$4 & NativeAttrs$4 & {
|
|
334
544
|
children?: react.ReactNode;
|
|
335
545
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
336
546
|
|
|
337
547
|
type TabsAlignmet = 'start' | 'center' | 'end' | 'stretch';
|
|
338
548
|
|
|
339
|
-
interface Props {
|
|
549
|
+
interface Props$3 {
|
|
340
550
|
/**
|
|
341
551
|
* The currently selected value of the tabs.
|
|
342
552
|
*/
|
|
@@ -358,8 +568,8 @@ interface Props {
|
|
|
358
568
|
*/
|
|
359
569
|
onClose?: (value: any) => void;
|
|
360
570
|
}
|
|
361
|
-
type NativeAttrs = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props>;
|
|
362
|
-
type TabsProps = Props & NativeAttrs;
|
|
571
|
+
type NativeAttrs$3 = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$3>;
|
|
572
|
+
type TabsProps = Props$3 & NativeAttrs$3;
|
|
363
573
|
declare const Tabs: React.FC<TabsProps>;
|
|
364
574
|
|
|
365
575
|
type ToolbarSize = 'auto' | 'sm' | 'md' | 'lg';
|
|
@@ -368,6 +578,8 @@ interface ToolbarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
368
578
|
size?: ToolbarSize;
|
|
369
579
|
title?: string;
|
|
370
580
|
subtitle?: string;
|
|
581
|
+
startContent?: React.ReactNode;
|
|
582
|
+
endContent?: React.ReactNode;
|
|
371
583
|
startAction?: React.ReactNode;
|
|
372
584
|
endAction?: React.ReactNode;
|
|
373
585
|
}
|
|
@@ -385,200 +597,83 @@ interface TransitionProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
385
597
|
}
|
|
386
598
|
declare const Transition: react.ForwardRefExoticComponent<TransitionProps & react.RefAttributes<HTMLElement>>;
|
|
387
599
|
|
|
388
|
-
interface ScrollAreaProps
|
|
389
|
-
|
|
600
|
+
interface ScrollAreaProps {
|
|
601
|
+
children: React.ReactNode;
|
|
602
|
+
autoHide?: boolean;
|
|
603
|
+
style?: React.CSSProperties;
|
|
390
604
|
}
|
|
391
605
|
declare const ScrollArea: react.ForwardRefExoticComponent<ScrollAreaProps & react.RefAttributes<HTMLDivElement>>;
|
|
392
606
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
type SelectData<TSelectItem = SelectItem> = {
|
|
398
|
-
items: TSelectItem[];
|
|
399
|
-
total: number;
|
|
400
|
-
};
|
|
401
|
-
type SelectState = {
|
|
402
|
-
skip: number;
|
|
403
|
-
filter: string;
|
|
404
|
-
};
|
|
405
|
-
interface VirtualScrollerProps$1 {
|
|
406
|
-
pageSize?: number;
|
|
607
|
+
interface Props$2 {
|
|
608
|
+
inputRef?: React.RefObject<HTMLInputElement>;
|
|
609
|
+
startContent?: React.ReactNode;
|
|
610
|
+
endContent?: React.ReactNode;
|
|
407
611
|
}
|
|
408
|
-
type
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
placeholder?: string;
|
|
412
|
-
keyField?: string;
|
|
413
|
-
textField?: string;
|
|
414
|
-
filterable?: boolean;
|
|
415
|
-
filter?: string;
|
|
416
|
-
virtual?: VirtualScrollerProps$1;
|
|
417
|
-
disabled?: boolean;
|
|
418
|
-
loading?: boolean;
|
|
419
|
-
className?: string;
|
|
420
|
-
onFilterChange?: (filter: string) => void;
|
|
421
|
-
onChange: (value: any) => void;
|
|
422
|
-
renderItem?: (item: TSelectItem) => React.ReactNode;
|
|
423
|
-
};
|
|
424
|
-
type SelectClientProps<TSelectItem = SelectItem> = {
|
|
425
|
-
filterMode: 'client';
|
|
426
|
-
page?: number;
|
|
427
|
-
pageSize?: number;
|
|
428
|
-
} & SelectBaseProps<TSelectItem>;
|
|
429
|
-
type SelectServerProps<TSelectItem = SelectItem> = {
|
|
430
|
-
filterMode: 'server';
|
|
431
|
-
onDataChange: (data: SelectData) => void;
|
|
432
|
-
getData: (state: SelectState) => Promise<SelectData<TSelectItem>>;
|
|
433
|
-
} & SelectBaseProps<TSelectItem>;
|
|
434
|
-
type SelectProps<TSelectItem = SelectItem> = SelectClientProps<TSelectItem> | SelectServerProps<TSelectItem>;
|
|
435
|
-
|
|
436
|
-
declare const Select: (props: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
437
|
-
|
|
438
|
-
type SwitchProps = {
|
|
439
|
-
value?: boolean;
|
|
440
|
-
defaultValue?: boolean;
|
|
441
|
-
error?: boolean;
|
|
442
|
-
onChange?: (value: boolean) => void;
|
|
443
|
-
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'>;
|
|
444
|
-
declare const Switch: React.FC<SwitchProps>;
|
|
612
|
+
type NativeAttrs$2 = Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof Props$2>;
|
|
613
|
+
type TextInputProps = Props$2 & NativeAttrs$2;
|
|
614
|
+
declare const TextInput: react.ForwardRefExoticComponent<Props$2 & NativeAttrs$2 & react.RefAttributes<HTMLInputElement>>;
|
|
445
615
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
616
|
+
interface Props$1 {
|
|
617
|
+
name?: string;
|
|
618
|
+
value?: string;
|
|
619
|
+
defaultValue?: string;
|
|
620
|
+
checked?: boolean;
|
|
621
|
+
defaultChecked?: boolean;
|
|
622
|
+
disabled?: boolean;
|
|
623
|
+
onChange?: (value: string) => void;
|
|
624
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
625
|
+
}
|
|
626
|
+
type NativeAttrs$1 = Omit<React.LabelHTMLAttributes<HTMLLabelElement>, keyof Props$1>;
|
|
627
|
+
type SwitchProps = Props$1 & NativeAttrs$1;
|
|
628
|
+
declare const Switch: react.ForwardRefExoticComponent<Props$1 & NativeAttrs$1 & react.RefAttributes<HTMLLabelElement>>;
|
|
629
|
+
|
|
630
|
+
type SelectItem = Record<string, any>;
|
|
631
|
+
type SelectKeyField<TSelectItem> = keyof TSelectItem;
|
|
632
|
+
interface SelectSingleProps<TSelectItem extends SelectItem, TSelectKeyField extends SelectKeyField<TSelectItem> = 'key'> {
|
|
633
|
+
isMultiple?: false;
|
|
634
|
+
value: TSelectItem[TSelectKeyField] | null;
|
|
635
|
+
onChange?: (value: TSelectItem | null) => void;
|
|
636
|
+
onValueChange?: (value: TSelectItem[TSelectKeyField] | null) => void;
|
|
460
637
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
value
|
|
638
|
+
interface SelectMultipleProps<TSelectItem extends SelectItem, TSelectKeyField extends SelectKeyField<TSelectItem> = 'key'> {
|
|
639
|
+
isMultiple: true;
|
|
640
|
+
value: TSelectItem[TSelectKeyField][];
|
|
641
|
+
onChange?: (value: TSelectItem[]) => void;
|
|
642
|
+
onValueChange?: (value: TSelectItem[TSelectKeyField][]) => void;
|
|
643
|
+
}
|
|
644
|
+
type NativeAttrs<TSelectItem extends SelectItem, TSelectKeyField extends SelectKeyField<TSelectItem> = 'key'> = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props<TSelectItem, TSelectKeyField>>;
|
|
645
|
+
type Props<TSelectItem extends SelectItem, TSelectKeyField extends SelectKeyField<TSelectItem> = 'key'> = {
|
|
646
|
+
data: TSelectItem[];
|
|
647
|
+
keyField?: TSelectKeyField;
|
|
648
|
+
textField?: keyof TSelectItem;
|
|
464
649
|
placeholder?: string;
|
|
465
|
-
keyField?: string;
|
|
466
|
-
textField?: string;
|
|
467
|
-
filterable?: boolean;
|
|
468
|
-
filter?: string;
|
|
469
|
-
virtual?: VirtualScrollerProps;
|
|
470
|
-
disabled?: boolean;
|
|
471
650
|
loading?: boolean;
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
filterMode: 'server';
|
|
484
|
-
onDataChange: (data: MultiSelectData) => void;
|
|
485
|
-
getData: (state: MultiSelectState) => Promise<MultiSelectData<TMultiSelectItem>>;
|
|
486
|
-
} & MultiSelectBaseProps<TMultiSelectItem>;
|
|
487
|
-
type MultiSelectProps<TMultiSelectItem = MultiSelectItem> = MultiSelectClientProps<TMultiSelectItem> | MultiSelectServerProps<TMultiSelectItem>;
|
|
488
|
-
|
|
489
|
-
declare const MultiSelect: (props: MultiSelectProps) => react_jsx_runtime.JSX.Element;
|
|
651
|
+
disabled?: boolean;
|
|
652
|
+
disclosure?: Disclosure;
|
|
653
|
+
virtual?: Omit<VirtualizerOptions, 'parentRef'>;
|
|
654
|
+
startContent?: React.ReactNode;
|
|
655
|
+
endContent?: React.ReactNode;
|
|
656
|
+
onItemSelect?: (item: TSelectItem) => void;
|
|
657
|
+
renderItem?: (item: TSelectItem, props: ListItemProps) => React.ReactNode;
|
|
658
|
+
} & (SelectSingleProps<TSelectItem, TSelectKeyField> | SelectMultipleProps<TSelectItem, TSelectKeyField>);
|
|
659
|
+
type SelectProps<TSelectItem extends SelectItem, TSelectKeyField extends SelectKeyField<TSelectItem> = 'key'> = Props<TSelectItem, TSelectKeyField> & NativeAttrs<TSelectItem, TSelectKeyField>;
|
|
660
|
+
|
|
661
|
+
declare const Select: <TSelectItem extends SelectItem, TSelectKeyField extends keyof TSelectItem = "key">(props: SelectProps<TSelectItem, TSelectKeyField>) => react_jsx_runtime.JSX.Element;
|
|
490
662
|
|
|
491
663
|
interface FieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
492
664
|
label: string;
|
|
493
665
|
}
|
|
494
666
|
declare const Field: react.ForwardRefExoticComponent<FieldProps & react.RefAttributes<HTMLDivElement>>;
|
|
495
667
|
|
|
496
|
-
|
|
497
|
-
as?: React.ElementType;
|
|
498
|
-
}
|
|
499
|
-
declare const List: react.ForwardRefExoticComponent<ListProps & react.RefAttributes<HTMLDivElement>>;
|
|
500
|
-
|
|
501
|
-
interface ListItemProps extends react__default.HTMLAttributes<HTMLDivElement> {
|
|
502
|
-
as?: react__default.ElementType;
|
|
503
|
-
title: string;
|
|
504
|
-
startContent?: react__default.ReactNode;
|
|
505
|
-
endContent?: react__default.ReactNode;
|
|
506
|
-
level?: number;
|
|
507
|
-
hoverable?: boolean;
|
|
508
|
-
selected?: boolean;
|
|
509
|
-
disabled?: boolean;
|
|
510
|
-
}
|
|
511
|
-
declare const ListItem: react__default.ForwardRefExoticComponent<ListItemProps & react__default.RefAttributes<HTMLDivElement>>;
|
|
512
|
-
|
|
513
|
-
type ListGroupProps = ListItemProps & {
|
|
514
|
-
expandVisible?: boolean;
|
|
515
|
-
expandPosition?: 'start' | 'end';
|
|
516
|
-
isOpen?: boolean;
|
|
517
|
-
onOpen?: () => void;
|
|
518
|
-
onClose?: () => void;
|
|
519
|
-
onToggle?: () => void;
|
|
520
|
-
};
|
|
521
|
-
declare const ListGroup: react.ForwardRefExoticComponent<ListItemProps & {
|
|
522
|
-
expandVisible?: boolean | undefined;
|
|
523
|
-
expandPosition?: "end" | "start" | undefined;
|
|
524
|
-
isOpen?: boolean | undefined;
|
|
525
|
-
onOpen?: (() => void) | undefined;
|
|
526
|
-
onClose?: (() => void) | undefined;
|
|
527
|
-
onToggle?: (() => void) | undefined;
|
|
528
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
529
|
-
|
|
530
|
-
declare global {
|
|
531
|
-
interface WindowEventMap {
|
|
532
|
-
'local-storage': CustomEvent;
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
type SetValue<T> = Dispatch<SetStateAction<T>>;
|
|
536
|
-
/**
|
|
537
|
-
* It's a React hook that allows you to store and retrieve data from localStorage
|
|
538
|
-
* @param {string} key - string
|
|
539
|
-
* @param {T} initialValue - The initial value to use if the key doesn't exist in localStorage.
|
|
540
|
-
* @returns An array of two items. The first item is the value of the local storage key. The second
|
|
541
|
-
* item is a function that can be used to set the value of the local storage key.
|
|
542
|
-
*/
|
|
543
|
-
declare function useLocalStorage<T>(key: string, initialValue: T): [T, SetValue<T>];
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* It returns the previous value of the given value
|
|
547
|
-
* @param {any} value - any - The value to track.
|
|
548
|
-
* @returns The previous value of the variable.
|
|
549
|
-
*/
|
|
550
|
-
declare const usePrevious: (value: any) => undefined;
|
|
551
|
-
|
|
552
|
-
declare const useDisclosure: ({ defaultValue }?: {
|
|
553
|
-
defaultValue?: boolean | undefined;
|
|
554
|
-
}) => {
|
|
555
|
-
isOpen: boolean;
|
|
556
|
-
onOpen: () => void;
|
|
557
|
-
onClose: () => void;
|
|
558
|
-
onToggle: () => void;
|
|
559
|
-
};
|
|
560
|
-
|
|
561
|
-
interface Helpers {
|
|
562
|
-
goToNextStep: () => void;
|
|
563
|
-
goToPrevStep: () => void;
|
|
564
|
-
reset: () => void;
|
|
565
|
-
canGoToNextStep: boolean;
|
|
566
|
-
canGoToPrevStep: boolean;
|
|
567
|
-
setStep: Dispatch<SetStateAction<number>>;
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* It returns a tuple with the current step and an object with functions to manipulate the step
|
|
571
|
-
* @param {number} maxStep - number - The maximum number of steps in the stepper.
|
|
572
|
-
* @returns An array with two elements. The first element is the current step. The second element is an
|
|
573
|
-
* object with the following properties:
|
|
574
|
-
*/
|
|
575
|
-
declare const useStep: (maxStep: number) => [number, Helpers];
|
|
668
|
+
declare const scrollToItem: (parentElement: Element, currentElement: Element) => void;
|
|
576
669
|
|
|
577
670
|
type ClassDictionary = Record<string, any>;
|
|
578
671
|
type ClassArray = ClassValue[];
|
|
579
672
|
type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined;
|
|
580
673
|
declare function clsx(...inputs: ClassValue[]): string;
|
|
581
674
|
|
|
582
|
-
|
|
675
|
+
type ReactRef<T> = React.RefCallback<T> | React.MutableRefObject<T>;
|
|
676
|
+
declare function assignRef<T = any>(ref: ReactRef<T> | null | undefined, value: T): void;
|
|
677
|
+
declare function mergeRefs<T>(...refs: (ReactRef<T> | null | undefined)[]): (node: T | null) => void;
|
|
583
678
|
|
|
584
|
-
export { Accordion, AccordionContent, AccordionContentProps, AccordionHeader, AccordionHeaderProps, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, Backdrop, BackdropProps, Badge, BadgeProps, Button, ButtonColor, ButtonProps, ButtonSize, ButtonVariant, Card, CardHeader, CardHeaderProps, CardProps, Chip, ChipProps, Collapse, CollapseContent, CollapseContentProps, CollapseContext, CollapseContextValue, CollapseProps, CollapseTrigger, CollapseTriggerProps, Drawer, DrawerPosition, DrawerProps, DrawerSize, Field, FieldProps, Icon, IconProps, List, ListGroup, ListGroupProps, ListItem, ListItemProps, ListProps, Menu, MenuContext, MenuContextValue, MenuGroup, MenuGroupItemType, MenuGroupProps, MenuItem, MenuItemProps, MenuItemType, MenuProps, MenuSubmenu, MenuSubmenuProps, MenuValueContext,
|
|
679
|
+
export { Accordion, AccordionContent, AccordionContentProps, AccordionHeader, AccordionHeaderProps, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, Autocomplete, AutocompleteItem, AutocompleteKeyField, AutocompleteMultipleProps, AutocompleteProps, AutocompleteSingleProps, Backdrop, BackdropProps, Badge, BadgeProps, Button, ButtonColor, ButtonProps, ButtonSize, ButtonVariant, Card, CardHeader, CardHeaderProps, CardProps, Chip, ChipProps, Collapse, CollapseContent, CollapseContentProps, CollapseContext, CollapseContextValue, CollapseProps, CollapseTrigger, CollapseTriggerProps, Disclosure, Drawer, DrawerPosition, DrawerProps, DrawerSize, Field, FieldProps, Icon, IconProps, InfiniteData, List, ListGroup, ListGroupProps, ListItem, ListItemProps, ListProps, Menu, MenuContext, MenuContextValue, MenuGroup, MenuGroupItemType, MenuGroupProps, MenuItem, MenuItemProps, MenuItemType, MenuProps, MenuSubmenu, MenuSubmenuProps, MenuValueContext, Portal, PortalProps, QueryFunction, QueryOptions, QueryStatus, ReactRef, Resize, ScrollAlignment, ScrollArea, ScrollAreaProps, ScrollBehavior, ScrollToOptions, Select, SelectItem, SelectKeyField, SelectMultipleProps, SelectProps, SelectSingleProps, Switch, SwitchProps, Tab, TabProps, Tabs, TabsAlignmet, TabsProps, TextInput, TextInputProps, Toolbar, ToolbarProps, ToolbarSize, Transition, TransitionProps, UseInfiniteQueryOptions, UseInfiniteQueryResult, VirtualItem, Virtualizer, VirtualizerOptions, assignRef, clsx, getOpenValuesByPathname, mergeRefs, scrollToItem, useAccordionItem, useCollapse, useDebounce, useDisclosure, useElementSize, useInfiniteQuery, useLocalStorage, useMenu, useMenuItemValue, useOnClickOutside, usePrevious, useStep, useVirtualizer };
|