@boxcustodia/library 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1388 -0
- package/dist/index.es.js +38294 -0
- package/dist/style.css +2279 -0
- package/package.json +108 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1388 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { ClassNameValue } from 'tailwind-merge';
|
|
3
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
4
|
+
import { ClassValue } from 'clsx';
|
|
5
|
+
import { ComponentProps } from 'react';
|
|
6
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
7
|
+
import { ComponentType } from 'react';
|
|
8
|
+
import { ControllerRenderProps } from 'react-hook-form';
|
|
9
|
+
import { CSSProperties } from 'react';
|
|
10
|
+
import { default as default_2 } from 'react';
|
|
11
|
+
import { DependencyList } from 'react';
|
|
12
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
13
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
14
|
+
import { Dispatch } from 'react';
|
|
15
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
16
|
+
import { ElementType } from 'react';
|
|
17
|
+
import { FieldError } from 'react-hook-form';
|
|
18
|
+
import { FieldPath } from 'react-hook-form';
|
|
19
|
+
import { FieldValues } from 'react-hook-form';
|
|
20
|
+
import { FormEvent } from 'react';
|
|
21
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
22
|
+
import { HTMLProps } from 'react';
|
|
23
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
24
|
+
import { ListIterateeCustom } from 'lodash';
|
|
25
|
+
import { LucideProps } from 'lucide-react';
|
|
26
|
+
import { MutableRefObject } from 'react';
|
|
27
|
+
import { NodeApi } from 'react-arborist';
|
|
28
|
+
import { NodeRendererProps } from 'react-arborist';
|
|
29
|
+
import { PopoverAnchor } from '@radix-ui/react-popover';
|
|
30
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
31
|
+
import { Presence as Presence_2 } from '@radix-ui/react-presence';
|
|
32
|
+
import * as React_2 from 'react';
|
|
33
|
+
import { ReactElement } from 'react';
|
|
34
|
+
import { ReactNode } from 'react';
|
|
35
|
+
import { ReactPortal } from 'react';
|
|
36
|
+
import { Ref } from 'react';
|
|
37
|
+
import { RefAttributes } from 'react';
|
|
38
|
+
import { RefObject } from 'react';
|
|
39
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
40
|
+
import { SetStateAction } from 'react';
|
|
41
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
42
|
+
import { SlotProps } from '@radix-ui/react-slot';
|
|
43
|
+
import { StoreApi } from 'zustand';
|
|
44
|
+
import { TreeApi as TreeApi_2 } from 'react-arborist';
|
|
45
|
+
import { TreeProps } from 'react-arborist/dist/module/types/tree-props';
|
|
46
|
+
import { UseBoundStore } from 'zustand';
|
|
47
|
+
import { UseFormProps } from 'react-hook-form';
|
|
48
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
49
|
+
import { VariantProps } from 'class-variance-authority';
|
|
50
|
+
import { ZodType } from 'zod';
|
|
51
|
+
|
|
52
|
+
export declare const AlertDialog: ForwardRefExoticComponent<Omit<any, "ref"> & RefAttributes<any>>;
|
|
53
|
+
|
|
54
|
+
export declare type ArrayUnion<V, T extends ReadonlyArray<V>> = T[number];
|
|
55
|
+
|
|
56
|
+
declare interface AsyncState<T> {
|
|
57
|
+
loading: boolean;
|
|
58
|
+
error: Error | null;
|
|
59
|
+
data: T | null;
|
|
60
|
+
refetch: () => void;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export declare type AtLeastOne<T> = [T, ...T[]];
|
|
64
|
+
|
|
65
|
+
export declare const AutoComplete: {
|
|
66
|
+
({ items, placeholder, emptyMessage, onSelect, containerClassName, containerProps, inputClassName, inputProps, listClassName, listProps, itemClassName, itemProps, emptyClassName, emptyProps, }: Props_2): JSX_2.Element;
|
|
67
|
+
displayName: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export declare const AutoCompleteDialog: ({ children, ...props }: AutoCompleteDialogProps) => JSX_2.Element;
|
|
71
|
+
|
|
72
|
+
declare interface AutoCompleteDialogProps extends DialogProps {
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export declare const AutoCompleteEmpty: React_2.ForwardRefExoticComponent<Omit<{
|
|
76
|
+
children?: React_2.ReactNode;
|
|
77
|
+
} & Pick<Pick<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
|
|
78
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
79
|
+
} & {
|
|
80
|
+
asChild?: boolean;
|
|
81
|
+
}, "key" | "asChild" | keyof React_2.HTMLAttributes<HTMLDivElement>> & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
|
|
83
|
+
export declare const AutoCompleteGroup: React_2.ForwardRefExoticComponent<Omit<{
|
|
84
|
+
children?: React_2.ReactNode;
|
|
85
|
+
} & Omit<Pick<Pick<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
|
|
86
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
87
|
+
} & {
|
|
88
|
+
asChild?: boolean;
|
|
89
|
+
}, "key" | "asChild" | keyof React_2.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
90
|
+
heading?: React_2.ReactNode;
|
|
91
|
+
value?: string;
|
|
92
|
+
forceMount?: boolean;
|
|
93
|
+
} & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
94
|
+
|
|
95
|
+
export declare const AutoCompleteInput: React_2.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React_2.DetailedHTMLProps<React_2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React_2.InputHTMLAttributes<HTMLInputElement>> & {
|
|
96
|
+
ref?: React_2.Ref<HTMLInputElement>;
|
|
97
|
+
} & {
|
|
98
|
+
asChild?: boolean;
|
|
99
|
+
}, "key" | "asChild" | keyof React_2.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
100
|
+
value?: string;
|
|
101
|
+
onValueChange?: (search: string) => void;
|
|
102
|
+
} & React_2.RefAttributes<HTMLInputElement>, "ref"> & React_2.RefAttributes<HTMLInputElement>>;
|
|
103
|
+
|
|
104
|
+
export declare const AutoCompleteItem: React_2.ForwardRefExoticComponent<Omit<{
|
|
105
|
+
children?: React_2.ReactNode;
|
|
106
|
+
} & Omit<Pick<Pick<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
|
|
107
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
108
|
+
} & {
|
|
109
|
+
asChild?: boolean;
|
|
110
|
+
}, "key" | "asChild" | keyof React_2.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
onSelect?: (value: string) => void;
|
|
113
|
+
value?: string;
|
|
114
|
+
keywords?: string[];
|
|
115
|
+
forceMount?: boolean;
|
|
116
|
+
} & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
117
|
+
|
|
118
|
+
export declare const AutoCompleteList: React_2.ForwardRefExoticComponent<Omit<{
|
|
119
|
+
children?: React_2.ReactNode;
|
|
120
|
+
} & Pick<Pick<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
|
|
121
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
122
|
+
} & {
|
|
123
|
+
asChild?: boolean;
|
|
124
|
+
}, "key" | "asChild" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
|
|
125
|
+
label?: string;
|
|
126
|
+
} & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
127
|
+
|
|
128
|
+
export declare const AutoCompleteRoot: React_2.ForwardRefExoticComponent<Omit<{
|
|
129
|
+
children?: React_2.ReactNode;
|
|
130
|
+
} & Pick<Pick<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
|
|
131
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
132
|
+
} & {
|
|
133
|
+
asChild?: boolean;
|
|
134
|
+
}, "key" | "asChild" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
|
|
135
|
+
label?: string;
|
|
136
|
+
shouldFilter?: boolean;
|
|
137
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
138
|
+
defaultValue?: string;
|
|
139
|
+
value?: string;
|
|
140
|
+
onValueChange?: (value: string) => void;
|
|
141
|
+
loop?: boolean;
|
|
142
|
+
disablePointerSelection?: boolean;
|
|
143
|
+
vimBindings?: boolean;
|
|
144
|
+
} & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
145
|
+
|
|
146
|
+
export declare const AutoCompleteSeparator: React_2.ForwardRefExoticComponent<Omit<Pick<Pick<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
|
|
147
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
148
|
+
} & {
|
|
149
|
+
asChild?: boolean;
|
|
150
|
+
}, "key" | "asChild" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
|
|
151
|
+
alwaysRender?: boolean;
|
|
152
|
+
} & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
153
|
+
|
|
154
|
+
export declare const AutoCompleteShortcut: {
|
|
155
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
|
|
156
|
+
displayName: string;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export declare const Avatar: ({ variant, alt, src, ...props }: Props_3) => JSX_2.Element;
|
|
160
|
+
|
|
161
|
+
export declare const BackgroundImage: ForwardRefExoticComponent<Omit<Props_4, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
162
|
+
|
|
163
|
+
export declare const Badge: ForwardRefExoticComponent<Props_5 & RefAttributes<HTMLDivElement>>;
|
|
164
|
+
|
|
165
|
+
export declare const badgeVariants: (props?: ({
|
|
166
|
+
variant?: "default" | "secondary" | "error" | "outline" | null | undefined;
|
|
167
|
+
} & ClassProp) | undefined) => string;
|
|
168
|
+
|
|
169
|
+
export declare const BaseButton: ForwardRefExoticComponent<Props_7 & RefAttributes<HTMLButtonElement>>;
|
|
170
|
+
|
|
171
|
+
declare type BaseButtonProps = ComponentProps<typeof BaseButton>;
|
|
172
|
+
|
|
173
|
+
declare type BaseButtonProps_2 = ComponentProps<typeof BaseButton>;
|
|
174
|
+
|
|
175
|
+
export declare type BaseEntity = {
|
|
176
|
+
id: string;
|
|
177
|
+
createdAt: number;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export declare const Button: ForwardRefExoticComponent<Omit<Props_6, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
181
|
+
|
|
182
|
+
declare type ButtonProps = ComponentProps<typeof Button>;
|
|
183
|
+
|
|
184
|
+
declare type ButtonProps_2 = ComponentPropsWithoutRef<typeof Button>;
|
|
185
|
+
|
|
186
|
+
declare const buttonVariants: (props?: ({
|
|
187
|
+
variant?: "link" | "default" | "secondary" | "error" | "outline" | "ghost" | null | undefined;
|
|
188
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
189
|
+
} & ClassProp) | undefined) => string;
|
|
190
|
+
|
|
191
|
+
export declare const Calendar: {
|
|
192
|
+
<T extends Mode>(props: CalendarProps<T>): JSX_2.Element;
|
|
193
|
+
displayName: string;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export declare type CalendarBaseProps<T extends Mode> = {
|
|
197
|
+
disabled?: (date: Date) => boolean;
|
|
198
|
+
mode: T;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export declare type CalendarModeProps<T extends Mode> = CalendarBaseProps<T> & {
|
|
202
|
+
single: SingleDateValue;
|
|
203
|
+
range: RangeDateValue;
|
|
204
|
+
multiple: MultipleDateValue;
|
|
205
|
+
}[T];
|
|
206
|
+
|
|
207
|
+
declare interface CalendarNavigationProps {
|
|
208
|
+
view: CalendarView;
|
|
209
|
+
setView: (view: CalendarView) => void;
|
|
210
|
+
value: Date;
|
|
211
|
+
previousMonth: () => void;
|
|
212
|
+
nextMonth: () => void;
|
|
213
|
+
previousYear: () => void;
|
|
214
|
+
nextYear: () => void;
|
|
215
|
+
previousDecade: () => void;
|
|
216
|
+
nextDecade: () => void;
|
|
217
|
+
goBackProps?: Omit<ButtonProps, "onClick">;
|
|
218
|
+
goNextProps?: Omit<ButtonProps, "onClick">;
|
|
219
|
+
changeViewProps?: Omit<HTMLProps<HTMLButtonElement>, "onClick">;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
declare type CalendarProps<T extends Mode> = CalendarModeProps<T> & NavigationProps & {
|
|
223
|
+
initialView?: CalendarView;
|
|
224
|
+
initialDate?: Date;
|
|
225
|
+
monthViewProps?: Omit<MonthViewProps, "navigationDate">;
|
|
226
|
+
className?: ClassName;
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
declare type CalendarProps_2<T extends Mode> = ComponentProps<typeof Calendar<T>>;
|
|
230
|
+
|
|
231
|
+
export declare type CalendarState = {
|
|
232
|
+
defaultStartDate: Date;
|
|
233
|
+
mode: Mode;
|
|
234
|
+
isSingleMode: boolean;
|
|
235
|
+
isRangeMode: boolean;
|
|
236
|
+
selected: DateMatcher;
|
|
237
|
+
selectDate: (date: Date) => void;
|
|
238
|
+
isSelected: (day: Date) => boolean;
|
|
239
|
+
isInRange: (day: Date) => boolean;
|
|
240
|
+
isFirstDayFromRange: (day: Date) => boolean;
|
|
241
|
+
isLastDayFromRange: (day: Date) => boolean;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export declare type CalendarView = "month" | "year" | "decade";
|
|
245
|
+
|
|
246
|
+
export declare type CellProps<T> = {
|
|
247
|
+
row: T;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
export declare const Checkbox: {
|
|
251
|
+
({ checked, onChange, defaultChecked, className, size, children, containerClassName, containerProps, ...props }: Props_8): JSX_2.Element;
|
|
252
|
+
displayName: string;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export declare type ClassName = string | undefined;
|
|
256
|
+
|
|
257
|
+
export declare const click: (element: HTMLElement) => void;
|
|
258
|
+
|
|
259
|
+
export declare type ClickEvent = React.MouseEvent<HTMLButtonElement, MouseEvent>;
|
|
260
|
+
|
|
261
|
+
export declare function cn(...args: ClassValue[]): string;
|
|
262
|
+
|
|
263
|
+
export declare type ColumnDef<T> = {
|
|
264
|
+
/**
|
|
265
|
+
* Header de la columna
|
|
266
|
+
*/
|
|
267
|
+
header: string | (() => JSX.Element);
|
|
268
|
+
/**
|
|
269
|
+
* Clave que identifica la columna
|
|
270
|
+
*/
|
|
271
|
+
key: keyof T;
|
|
272
|
+
/**
|
|
273
|
+
* Elemento que se renderiza en la celda
|
|
274
|
+
*/
|
|
275
|
+
cell?: (props: CellProps<T>) => JSX.Element;
|
|
276
|
+
/**
|
|
277
|
+
* Ancho de la columna
|
|
278
|
+
*/
|
|
279
|
+
width?: string | number;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
export declare function Combobox<TItem extends Record<string, any>>({ items, valueKey, labelKey, placeholder, searchPlaceholder, emptyMessage, searchProps, className, triggerProps, itemProps, itemClassName, contentProps, contentClassName, value: prop, onChange, defaultValue: defaultProp, renderLabel, commandProps, ...props }: Props_9<TItem>): JSX_2.Element;
|
|
283
|
+
|
|
284
|
+
export declare const ConditionalWrapper: {
|
|
285
|
+
({ condition, wrapper, children, }: Props_11): string | number | boolean | JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
286
|
+
displayName: string;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export declare type Controllable<C, T extends NonNullable<unknown>> = OverrideProps<HTMLProps<C>, ControllableState<T>>;
|
|
290
|
+
|
|
291
|
+
export declare type ControllableState<T> = {
|
|
292
|
+
value?: T;
|
|
293
|
+
defaultValue?: T;
|
|
294
|
+
onChange?: (state: T) => void;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
declare type CopiedValue = string | null;
|
|
298
|
+
|
|
299
|
+
declare type CopyFunction = (text: string) => Promise<boolean>;
|
|
300
|
+
|
|
301
|
+
export declare const createSafeContext: <T>() => readonly [() => T & ({} | undefined), default_2.Provider<T | null>];
|
|
302
|
+
|
|
303
|
+
export declare type DateMatcher = DateSingle | DateRange | DateMultiple | undefined;
|
|
304
|
+
|
|
305
|
+
export declare type DateMultiple = Date[] | undefined;
|
|
306
|
+
|
|
307
|
+
export declare const DatePicker: <T extends Mode = "single">(props: Props_12<T>) => JSX_2.Element;
|
|
308
|
+
|
|
309
|
+
export declare type DateRange = {
|
|
310
|
+
start: DateSingle;
|
|
311
|
+
end: DateSingle;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
export declare type DateSingle = Date | undefined;
|
|
315
|
+
|
|
316
|
+
declare type DayProps = {
|
|
317
|
+
day: Date;
|
|
318
|
+
navigationDate: Date;
|
|
319
|
+
} & HTMLProps<HTMLButtonElement>;
|
|
320
|
+
|
|
321
|
+
declare interface DebounceOptions<T> {
|
|
322
|
+
onDebounce?: (value: T) => any;
|
|
323
|
+
delay?: number;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export declare const Dialog: ({ trigger, title, description, children, footer, triggerProps, headerProps, headerClassName, titleProps, titleClassName, descriptionProps, descriptionClassName, contentProps, contentClassName, footerProps, footerClassName, ...props }: Props_13) => JSX_2.Element;
|
|
327
|
+
|
|
328
|
+
export declare const DialogClose: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
329
|
+
|
|
330
|
+
export declare const DialogContent: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
331
|
+
|
|
332
|
+
export declare const DialogDescription: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
333
|
+
|
|
334
|
+
export declare const DialogFooter: {
|
|
335
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
|
|
336
|
+
displayName: string;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export declare const DialogHeader: {
|
|
340
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
|
|
341
|
+
displayName: string;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
export declare const DialogOverlay: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
345
|
+
|
|
346
|
+
export declare const DialogPortal: React_2.FC<DialogPrimitive.DialogPortalProps>;
|
|
347
|
+
|
|
348
|
+
export declare const DialogRoot: React_2.FC<DialogPrimitive.DialogProps>;
|
|
349
|
+
|
|
350
|
+
export declare const DialogTitle: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React_2.RefAttributes<HTMLHeadingElement>, "ref"> & React_2.RefAttributes<HTMLHeadingElement>>;
|
|
351
|
+
|
|
352
|
+
export declare const DialogTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
353
|
+
|
|
354
|
+
export declare const Divider: (props: Props_14) => JSX_2.Element;
|
|
355
|
+
|
|
356
|
+
export declare const DOTS = "...";
|
|
357
|
+
|
|
358
|
+
export declare const ensureReactElement: <P>({ children, as: Wrapper, props, }: EnsureReactElementProps<P>) => ReactElement;
|
|
359
|
+
|
|
360
|
+
declare type EnsureReactElementProps<P = {}> = {
|
|
361
|
+
children: Renderable<P>;
|
|
362
|
+
as?: default_2.ElementType;
|
|
363
|
+
props?: P;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export declare type Entity<T> = {
|
|
367
|
+
[K in keyof T]: T[K];
|
|
368
|
+
} & BaseEntity;
|
|
369
|
+
|
|
370
|
+
declare interface ExtendedProps {
|
|
371
|
+
containerClassName: ClassName;
|
|
372
|
+
inputClassName: ClassName;
|
|
373
|
+
listClassName: ClassName;
|
|
374
|
+
itemClassName: ClassName;
|
|
375
|
+
emptyClassName: ClassName;
|
|
376
|
+
containerProps: ComponentProps<typeof AutoCompleteRoot>;
|
|
377
|
+
inputProps: ComponentProps<typeof AutoCompleteInput>;
|
|
378
|
+
listProps: ComponentProps<typeof AutoCompleteList>;
|
|
379
|
+
itemProps: ComponentProps<typeof AutoCompleteItem>;
|
|
380
|
+
emptyProps: ComponentProps<typeof AutoCompleteEmpty>;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
declare interface ExtendedProps_2 {
|
|
384
|
+
triggerProps?: ComponentPropsWithoutRef<typeof DialogTrigger>;
|
|
385
|
+
headerProps?: ComponentPropsWithoutRef<typeof DialogHeader>;
|
|
386
|
+
headerClassName?: ClassName;
|
|
387
|
+
titleProps?: ComponentPropsWithoutRef<typeof DialogTitle>;
|
|
388
|
+
titleClassName?: ClassName;
|
|
389
|
+
descriptionProps?: ComponentPropsWithoutRef<typeof DialogDescription>;
|
|
390
|
+
descriptionClassName?: ClassName;
|
|
391
|
+
contentProps?: ComponentPropsWithoutRef<typeof DialogContent>;
|
|
392
|
+
contentClassName?: ClassName;
|
|
393
|
+
footerProps?: ComponentPropsWithoutRef<typeof DialogFooter>;
|
|
394
|
+
footerClassName?: ClassName;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
declare interface ExtendedProps_3 {
|
|
398
|
+
theadClassName?: ClassName;
|
|
399
|
+
theadProps?: HTMLProps<HTMLTableSectionElement>;
|
|
400
|
+
tbodyClassName?: ClassName;
|
|
401
|
+
tbodyProps?: HTMLProps<HTMLTableSectionElement>;
|
|
402
|
+
trClassName?: ClassName;
|
|
403
|
+
trProps?: HTMLProps<HTMLTableRowElement>;
|
|
404
|
+
thClassName?: ClassName;
|
|
405
|
+
thProps?: HTMLProps<HTMLTableCellElement>;
|
|
406
|
+
tdClassName?: ClassName;
|
|
407
|
+
tdProps?: HTMLProps<HTMLTableCellElement>;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Extracts the initials from a string.
|
|
412
|
+
* @param {string} string - The input string.
|
|
413
|
+
* @returns {string} The initials extracted from the input string.
|
|
414
|
+
*/
|
|
415
|
+
export declare const extractInitials: (string: string) => string;
|
|
416
|
+
|
|
417
|
+
export declare const Form: <TFieldValues extends FieldValues>({ onSubmit, form, children, className, }: Props_15<TFieldValues>) => JSX_2.Element;
|
|
418
|
+
|
|
419
|
+
export declare const FormControl: React_2.ForwardRefExoticComponent<Omit<SlotProps & React_2.RefAttributes<HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
420
|
+
|
|
421
|
+
export declare const FormDescription: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLParagraphElement> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
422
|
+
|
|
423
|
+
export declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, render, }: FormFieldProps<TFieldValues, TName>) => JSX_2.Element;
|
|
424
|
+
|
|
425
|
+
declare type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
426
|
+
name: TName;
|
|
427
|
+
label: string;
|
|
428
|
+
description?: string;
|
|
429
|
+
render: (field: ControllerRenderProps<TFieldValues, TName>) => React_2.ReactNode;
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
export declare const FormItem: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
433
|
+
|
|
434
|
+
export declare const FormLabel: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React_2.RefAttributes<HTMLLabelElement>>;
|
|
435
|
+
|
|
436
|
+
export declare const FormMessage: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLParagraphElement> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
437
|
+
|
|
438
|
+
export declare interface GenericMenuProps {
|
|
439
|
+
trigger: default_2.ReactNode;
|
|
440
|
+
items: MenuItemType[];
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export declare type GenericObject<T = any> = {
|
|
444
|
+
[key: string]: T;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
declare type GenericObject_2 = Record<string, any>;
|
|
448
|
+
|
|
449
|
+
export declare const getFormData: (event: FormEvent<HTMLFormElement>) => Record<string, string>;
|
|
450
|
+
|
|
451
|
+
declare type HotkeyEventName = "keydown" | "keypress" | "keyup";
|
|
452
|
+
|
|
453
|
+
declare type HotkeyOptions = {
|
|
454
|
+
watch?: boolean;
|
|
455
|
+
eventName?: HotkeyEventName;
|
|
456
|
+
preventDefault?: boolean;
|
|
457
|
+
ignoreInputFields?: boolean;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
export declare const IconButton: {
|
|
461
|
+
({ showTooltip, label, icon, className, variant, size, children, ...props }: Props_16): JSX_2.Element;
|
|
462
|
+
displayName: string;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
declare const iconButtonVariants: (props?: ({
|
|
466
|
+
variant?: "default" | "secondary" | null | undefined;
|
|
467
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
468
|
+
} & ClassProp) | undefined) => string;
|
|
469
|
+
|
|
470
|
+
export declare type IconProps<T> = {
|
|
471
|
+
leaftIcon?: ReactNode | ((node: NodeApi<T>) => ReactNode);
|
|
472
|
+
parentIcon?: ReactNode | ((node: NodeApi<T>, isOpen: boolean) => ReactNode);
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
export declare type ID = string | number;
|
|
476
|
+
|
|
477
|
+
export declare const Input: ForwardRefExoticComponent<Omit<Props_17, "ref"> & RefAttributes<HTMLInputElement>>;
|
|
478
|
+
|
|
479
|
+
export declare interface IToast {
|
|
480
|
+
id: number | string;
|
|
481
|
+
title?: string;
|
|
482
|
+
description: ReactNode;
|
|
483
|
+
type: ToastType;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
declare type Keys = string | string[];
|
|
487
|
+
|
|
488
|
+
export declare const Label: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React_2.RefAttributes<HTMLLabelElement>>;
|
|
489
|
+
|
|
490
|
+
export declare const Loader: {
|
|
491
|
+
({ center, containerClassName, ...props }: Props_18): JSX_2.Element;
|
|
492
|
+
displayName: string;
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
export declare type Loose<T> = T | (string & {});
|
|
496
|
+
|
|
497
|
+
export declare type Maybe<T> = T | undefined | null;
|
|
498
|
+
|
|
499
|
+
export declare type MaybeRef<T> = T | MutableRefObject<T>;
|
|
500
|
+
|
|
501
|
+
declare type MaybeReturn<TState> = Return_4<TState | undefined, ((state: TState | undefined) => Partial<TState>) | Partial<TState>>;
|
|
502
|
+
|
|
503
|
+
export declare const Menu: {
|
|
504
|
+
({ trigger, items }: GenericMenuProps): JSX_2.Element;
|
|
505
|
+
displayName: string;
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
export declare const MenuCheckboxItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
509
|
+
|
|
510
|
+
export declare const MenuContent: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
511
|
+
|
|
512
|
+
export declare const MenuGroup: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
513
|
+
|
|
514
|
+
export declare const MenuItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
515
|
+
inset?: boolean;
|
|
516
|
+
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
517
|
+
|
|
518
|
+
declare type MenuItemBase<T extends ElementType> = ComponentPropsWithoutRef<T> & {
|
|
519
|
+
label?: ReactNode;
|
|
520
|
+
type: string;
|
|
521
|
+
} & Shortcut;
|
|
522
|
+
|
|
523
|
+
declare type MenuItemCheckbox = MenuItemBase<typeof MenuCheckboxItem> & {
|
|
524
|
+
type: "checkbox";
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
declare type MenuItemItem = MenuItemBase<typeof MenuItem> & {
|
|
528
|
+
type: "item";
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
declare type MenuItemLabel = MenuItemBase<typeof MenuLabel> & {
|
|
532
|
+
type: "label";
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
declare type MenuItemRadio = MenuItemBase<typeof MenuRadioItem> & {
|
|
536
|
+
type: "radio";
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
declare type MenuItemSeparator = MenuItemBase<typeof MenuSeparator> & {
|
|
540
|
+
type: "separator";
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
declare type MenuItemSubmenu = MenuItemBase<typeof MenuSubTrigger> & {
|
|
544
|
+
type: "submenu";
|
|
545
|
+
items: MenuItemType[];
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
export declare type MenuItemType = MenuItemItem | MenuItemCheckbox | MenuItemRadio | MenuItemLabel | MenuItemSeparator | MenuItemSubmenu;
|
|
549
|
+
|
|
550
|
+
export declare const MenuLabel: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
551
|
+
inset?: boolean;
|
|
552
|
+
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
553
|
+
|
|
554
|
+
export declare const MenuPortal: React_2.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
555
|
+
|
|
556
|
+
export declare const MenuRadioGroup: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
557
|
+
|
|
558
|
+
export declare const MenuRadioItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
559
|
+
|
|
560
|
+
export declare const MenuRoot: React_2.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
561
|
+
|
|
562
|
+
export declare const MenuSeparator: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
563
|
+
|
|
564
|
+
export declare const MenuShortcut: {
|
|
565
|
+
({ className, keys, handler, options, ...props }: MenuShortcutProps): JSX_2.Element;
|
|
566
|
+
displayName: string;
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
declare type MenuShortcutProps = React_2.ComponentPropsWithoutRef<"span"> & {
|
|
570
|
+
keys: Keys;
|
|
571
|
+
handler: (event: KeyboardEvent) => any;
|
|
572
|
+
options?: HotkeyOptions;
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
declare type MenuShortcutProps_2 = ComponentPropsWithoutRef<typeof MenuShortcut>;
|
|
576
|
+
|
|
577
|
+
export declare const MenuSub: React_2.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
578
|
+
|
|
579
|
+
export declare const MenuSubContent: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
580
|
+
|
|
581
|
+
export declare const MenuSubTrigger: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
582
|
+
inset?: boolean;
|
|
583
|
+
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
584
|
+
|
|
585
|
+
export declare const MenuTrigger: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
586
|
+
|
|
587
|
+
export declare function mergeRefs<T = any>(refs: Array<React_2.MutableRefObject<T> | React_2.LegacyRef<T> | undefined | null>): React_2.RefCallback<T>;
|
|
588
|
+
|
|
589
|
+
export declare type Mode = "single" | "range" | "multiple";
|
|
590
|
+
|
|
591
|
+
export declare const monthNames: readonly ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"];
|
|
592
|
+
|
|
593
|
+
declare type MonthViewProps = {
|
|
594
|
+
navigationDate: Date;
|
|
595
|
+
disabled?: (date: Date) => boolean;
|
|
596
|
+
dayClassName?: ClassName;
|
|
597
|
+
dayProps?: DayProps;
|
|
598
|
+
weekDaysClassName?: ClassName;
|
|
599
|
+
weekDaysProps?: WeekDaysProps;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
export declare type MultipleDateValue = {
|
|
603
|
+
value?: Date[];
|
|
604
|
+
defaultValue?: Date[];
|
|
605
|
+
onChange?: (dates: Date[]) => void;
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
declare type Mutation<TArgs extends any[], TReturn> = (...args: TArgs) => Promise<TReturn>;
|
|
609
|
+
|
|
610
|
+
declare type NavigationProps = Pick<CalendarNavigationProps, "goNextProps" | "goBackProps" | "changeViewProps">;
|
|
611
|
+
|
|
612
|
+
declare type Node_2 = {
|
|
613
|
+
id: string | number;
|
|
614
|
+
label: string;
|
|
615
|
+
children?: Node_2[];
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
declare const Node_2: <T extends Node_2>({ node, style, dragHandle, rowClassName, leaftIcon, parentIcon, }: NodeProps<T>) => JSX_2.Element;
|
|
619
|
+
export { Node_2 as Node }
|
|
620
|
+
|
|
621
|
+
export declare type NodeProps<T extends Node_2> = NodeRendererProps<T> & IconProps<T> & {
|
|
622
|
+
rowClassName?: string | undefined;
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
declare type noop = (this: any, ...args: any[]) => any;
|
|
626
|
+
|
|
627
|
+
export declare type Nullable<T> = T | null;
|
|
628
|
+
|
|
629
|
+
declare interface Option_2<TValue = string> {
|
|
630
|
+
label: string;
|
|
631
|
+
value: TValue;
|
|
632
|
+
disabled?: boolean;
|
|
633
|
+
}
|
|
634
|
+
export { Option_2 as Option }
|
|
635
|
+
|
|
636
|
+
export declare type OverrideProps<T, TOverridden> = Omit<T, keyof TOverridden> & TOverridden;
|
|
637
|
+
|
|
638
|
+
export declare type PageSize = (typeof TABLE_PAGE_SIZES)[number];
|
|
639
|
+
|
|
640
|
+
export declare const Pagination: {
|
|
641
|
+
({ optionProps, className, containerProps, ...rangeProps }: Props_19): JSX_2.Element;
|
|
642
|
+
displayName: string;
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
declare interface PaginationOptionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
646
|
+
isActive?: boolean;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export declare const Popover: {
|
|
650
|
+
({ trigger, children, rootProps, triggerProps, contentProps, triggerAsChild, matchTriggerWidth, triggerClassName, contentClassName, }: Props_20): JSX_2.Element;
|
|
651
|
+
displayName: string;
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
export declare const PopoverContent: React_2.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
655
|
+
matchTriggerWidth?: boolean;
|
|
656
|
+
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
657
|
+
|
|
658
|
+
export declare const PopoverRoot: React_2.FC<PopoverPrimitive.PopoverProps>;
|
|
659
|
+
|
|
660
|
+
export declare const PopoverTrigger: React_2.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
661
|
+
|
|
662
|
+
export declare const Presence: {
|
|
663
|
+
(props: Props_21): JSX_2.Element;
|
|
664
|
+
displayName: string;
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
export declare type Props<T extends Node_2> = Omit<TreeProps<T>, "disableDrag" | "searchTerm"> & IconProps<T> & {
|
|
668
|
+
draggable?: boolean;
|
|
669
|
+
children?: ReactNode | ((renderNodeProps: NodeProps<T>) => ReactNode);
|
|
670
|
+
search?: TreeProps<T>["searchTerm"];
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
declare type Props_10<TItem extends Record<string, any>> = OverrideProps<ComponentProps<typeof SelectRoot> & Omit<ControllableState<string>, "onChange">, {
|
|
674
|
+
onChange?: (value: string, item: TItem) => void;
|
|
675
|
+
/**
|
|
676
|
+
* Listado de elementos a mostrar
|
|
677
|
+
* @default []
|
|
678
|
+
*/
|
|
679
|
+
items: TItem[];
|
|
680
|
+
/**
|
|
681
|
+
* Identificador del valor del elemento
|
|
682
|
+
* @default "value"
|
|
683
|
+
*/
|
|
684
|
+
valueKey?: keyof TItem;
|
|
685
|
+
/**
|
|
686
|
+
* Identificador del label del elemento
|
|
687
|
+
* @default "label"
|
|
688
|
+
*/
|
|
689
|
+
labelKey?: keyof TItem;
|
|
690
|
+
/**
|
|
691
|
+
* Función que renderiza el label del elemento
|
|
692
|
+
* Por defecto renderiza el label del elemento
|
|
693
|
+
*/
|
|
694
|
+
renderLabel?: (item: TItem) => ReactNode;
|
|
695
|
+
className?: ClassName;
|
|
696
|
+
triggerProps?: ComponentProps<typeof SelectTrigger>;
|
|
697
|
+
contentClassName?: ClassName;
|
|
698
|
+
contentProps?: ComponentProps<typeof SelectContent>;
|
|
699
|
+
itemClassName?: ClassName;
|
|
700
|
+
itemProps?: ComponentProps<typeof SelectItem>;
|
|
701
|
+
placeholder?: string;
|
|
702
|
+
}>;
|
|
703
|
+
|
|
704
|
+
declare interface Props_11 {
|
|
705
|
+
condition: boolean;
|
|
706
|
+
wrapper: (children: ReactNode) => JSX.Element;
|
|
707
|
+
children: ReactNode;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
declare type Props_12<T extends Mode> = ComponentProps<"input"> & {
|
|
711
|
+
mode?: T;
|
|
712
|
+
disabledDate?: (date: Date) => boolean;
|
|
713
|
+
} & Omit<CalendarProps_2<T>, "disabled" | "mode">;
|
|
714
|
+
|
|
715
|
+
declare type Props_13 = ComponentPropsWithoutRef<typeof DialogRoot> & ExtendedProps_2 & {
|
|
716
|
+
trigger?: ReactNode;
|
|
717
|
+
title?: ReactNode;
|
|
718
|
+
description?: ReactNode;
|
|
719
|
+
children: ReactNode;
|
|
720
|
+
footer?: ReactNode;
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
declare type Props_14 = {
|
|
724
|
+
orientation?: "horizontal" | "vertical";
|
|
725
|
+
} & HTMLProps<HTMLHRElement>;
|
|
726
|
+
|
|
727
|
+
declare type Props_15<TFieldValues extends FieldValues> = {
|
|
728
|
+
onSubmit: (data: TFieldValues) => void;
|
|
729
|
+
form: UseFormReturn<TFieldValues>;
|
|
730
|
+
children: React_2.ReactNode;
|
|
731
|
+
className?: string;
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
declare type Props_16 = {
|
|
735
|
+
showTooltip?: boolean;
|
|
736
|
+
label: string;
|
|
737
|
+
icon?: ReactElement;
|
|
738
|
+
} & VariantProps<typeof iconButtonVariants> & Omit<BaseButtonProps_2, "showLoader" | "asChild">;
|
|
739
|
+
|
|
740
|
+
declare type Props_17 = OverrideProps<ComponentProps<"input">, {
|
|
741
|
+
/** valor del input */
|
|
742
|
+
value?: string;
|
|
743
|
+
/** functión a ejecutar cuando el valor cambia */
|
|
744
|
+
onChange?: (value: string) => void;
|
|
745
|
+
/** valor por defecto del input */
|
|
746
|
+
defaultValue?: string;
|
|
747
|
+
}>;
|
|
748
|
+
|
|
749
|
+
declare interface Props_18 extends LucideProps {
|
|
750
|
+
center?: boolean;
|
|
751
|
+
containerClassName?: string;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
declare interface Props_19 extends useRangePaginationProps {
|
|
755
|
+
optionProps?: PaginationOptionProps;
|
|
756
|
+
className?: string;
|
|
757
|
+
containerProps?: HTMLProps<HTMLDivElement>;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
declare interface Props_2 extends ExtendedProps {
|
|
761
|
+
items: AutoCompleteItem[];
|
|
762
|
+
placeholder?: string;
|
|
763
|
+
emptyMessage?: string;
|
|
764
|
+
onSelect?: (value: AutoCompleteItem["value"], item: AutoCompleteItem) => any;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
declare interface Props_20 {
|
|
768
|
+
trigger?: ReactNode;
|
|
769
|
+
children: ReactNode;
|
|
770
|
+
rootProps?: ComponentPropsWithoutRef<typeof PopoverRoot>;
|
|
771
|
+
triggerProps?: ComponentPropsWithoutRef<typeof PopoverTrigger>;
|
|
772
|
+
triggerClassName?: ClassName;
|
|
773
|
+
contentProps?: ComponentPropsWithoutRef<typeof PopoverContent>;
|
|
774
|
+
contentClassName?: ClassName;
|
|
775
|
+
matchTriggerWidth?: ComponentPropsWithoutRef<typeof PopoverContent>["matchTriggerWidth"];
|
|
776
|
+
triggerAsChild?: ComponentPropsWithoutRef<typeof PopoverTrigger>["asChild"];
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
declare interface Props_21 extends ComponentPropsWithoutRef<typeof Slot> {
|
|
780
|
+
/** Si el componente está presente o no */
|
|
781
|
+
in: ComponentProps<typeof Presence_2>["present"];
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
declare interface Props_22 extends HTMLProps<HTMLDivElement> {
|
|
785
|
+
/**
|
|
786
|
+
* Determina si el skeleton es isCircle para redondearlo
|
|
787
|
+
*/
|
|
788
|
+
isCircle?: boolean;
|
|
789
|
+
/**
|
|
790
|
+
* Ancho del componente
|
|
791
|
+
*/
|
|
792
|
+
width?: string;
|
|
793
|
+
/**
|
|
794
|
+
* Alto del componente
|
|
795
|
+
*/
|
|
796
|
+
height?: string;
|
|
797
|
+
/**
|
|
798
|
+
* Determina si el skeleton es visible
|
|
799
|
+
*/
|
|
800
|
+
isLoading?: boolean;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
declare type Props_23 = OverrideProps<ComponentProps<"input">, {
|
|
804
|
+
checked?: boolean;
|
|
805
|
+
onChange?: (value: boolean) => void;
|
|
806
|
+
defaultChecked?: boolean;
|
|
807
|
+
containerClassName?: string;
|
|
808
|
+
containerProps?: Omit<ComponentProps<"div">, "className">;
|
|
809
|
+
}>;
|
|
810
|
+
|
|
811
|
+
declare type Props_24<T> = {
|
|
812
|
+
data: T[];
|
|
813
|
+
columns: ColumnDef<T>[];
|
|
814
|
+
onRowClick?: (row: T) => void;
|
|
815
|
+
selected?: (row: T) => boolean;
|
|
816
|
+
} & ExtendedProps_3 & Omit<HTMLProps<HTMLTableElement>, "data" | "selected">;
|
|
817
|
+
|
|
818
|
+
declare type Props_25 = {
|
|
819
|
+
setPageSize?: (value: PageSize) => void;
|
|
820
|
+
pageSize?: PageSize;
|
|
821
|
+
} & Omit<usePaginationProps, "pageSize"> & TablePaginationExtendedProps;
|
|
822
|
+
|
|
823
|
+
declare type Props_26 = {
|
|
824
|
+
titleClassName?: ClassName;
|
|
825
|
+
titleProps?: HTMLProps<HTMLHeadingElement>;
|
|
826
|
+
descriptionClassName?: ClassName;
|
|
827
|
+
descriptionProps?: HTMLProps<HTMLParagraphElement>;
|
|
828
|
+
} & Omit<HTMLProps<HTMLDivElement>, "id"> & IToast;
|
|
829
|
+
|
|
830
|
+
declare interface Props_27 extends ButtonProps_2 {
|
|
831
|
+
toastId: IToast["id"];
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
declare type Props_28 = ComponentProps<typeof PopoverAnchor> & {
|
|
835
|
+
/**
|
|
836
|
+
* El texto que aparecera en el tooltip
|
|
837
|
+
*/
|
|
838
|
+
label: ReactNode;
|
|
839
|
+
open?: boolean;
|
|
840
|
+
defaultOpen?: boolean;
|
|
841
|
+
onOpenChange?: (open: boolean) => any;
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
declare interface Props_29<T> extends UseAsyncOptions<T> {
|
|
845
|
+
fn: () => Promise<T>;
|
|
846
|
+
dependencies?: DependencyList;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
declare interface Props_3 extends HTMLProps<HTMLDivElement> {
|
|
850
|
+
/**
|
|
851
|
+
* Texto que se va a mostrar en caso de que no tenga imagen o la imagen no cargue
|
|
852
|
+
*/
|
|
853
|
+
alt: string;
|
|
854
|
+
/**
|
|
855
|
+
* URL de la imagen
|
|
856
|
+
*/
|
|
857
|
+
src: string;
|
|
858
|
+
/**
|
|
859
|
+
* Tipo de Avatar
|
|
860
|
+
*/
|
|
861
|
+
variant?: "circle" | "square";
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
declare interface Props_4 extends HTMLProps<HTMLDivElement> {
|
|
865
|
+
/**
|
|
866
|
+
* La URL de la imagen
|
|
867
|
+
*/
|
|
868
|
+
src: string;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
declare interface Props_5 extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
declare interface Props_6 extends BaseButtonProps, VariantProps<typeof buttonVariants> {
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
declare interface Props_7 extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
878
|
+
asChild?: boolean;
|
|
879
|
+
loading?: boolean;
|
|
880
|
+
showLoader?: boolean;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
declare type Props_8 = OverrideProps<ComponentProps<"input">, {
|
|
884
|
+
/**
|
|
885
|
+
* Valor controlado del checkbox.
|
|
886
|
+
*/
|
|
887
|
+
checked?: boolean;
|
|
888
|
+
/**
|
|
889
|
+
* Función que se ejecuta cuando el valor del checkbox cambia.
|
|
890
|
+
*/
|
|
891
|
+
onChange?: (value: boolean) => void;
|
|
892
|
+
/**
|
|
893
|
+
* Valor por defecto del checkbox.
|
|
894
|
+
*/
|
|
895
|
+
defaultChecked?: boolean;
|
|
896
|
+
size?: string | number;
|
|
897
|
+
containerClassName?: string;
|
|
898
|
+
containerProps?: Omit<ComponentProps<"div">, "className">;
|
|
899
|
+
}>;
|
|
900
|
+
|
|
901
|
+
declare type Props_9<TItem extends Record<string, any>> = {
|
|
902
|
+
emptyMessage?: string;
|
|
903
|
+
commandProps?: ComponentProps<typeof AutoCompleteRoot>;
|
|
904
|
+
} & SearchProps & SelectProps<TItem>;
|
|
905
|
+
|
|
906
|
+
export declare type RangeDateValue = {
|
|
907
|
+
value?: DateRange;
|
|
908
|
+
defaultValue?: DateRange;
|
|
909
|
+
onChange?: (date: DateRange) => void;
|
|
910
|
+
};
|
|
911
|
+
|
|
912
|
+
export declare type Renderable<T> = ReactNode | ((props: T) => ReactElement);
|
|
913
|
+
|
|
914
|
+
declare type Return = [boolean, (newValue?: boolean) => void];
|
|
915
|
+
|
|
916
|
+
declare type Return_2<T> = {
|
|
917
|
+
/**
|
|
918
|
+
* Indica si todos los elementos están seleccionados.
|
|
919
|
+
*/
|
|
920
|
+
isAllSelected: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* Indica si ningun elemento está seleccionado.
|
|
923
|
+
*/
|
|
924
|
+
isNoneSelected: boolean;
|
|
925
|
+
/**
|
|
926
|
+
* Función que devuelve true si el elemento dado está seleccionado, false de lo contrario.
|
|
927
|
+
* @param item El elemento a verificar.
|
|
928
|
+
* @returns true si el elemento está seleccionado, false de lo contrario.
|
|
929
|
+
*/
|
|
930
|
+
isSelected: (item: T) => boolean;
|
|
931
|
+
/**
|
|
932
|
+
* Array de elementos seleccionados.
|
|
933
|
+
*/
|
|
934
|
+
selected: T[];
|
|
935
|
+
/**
|
|
936
|
+
* Establece los elementos seleccionados.
|
|
937
|
+
* @param items Los elementos seleccionados.
|
|
938
|
+
*/
|
|
939
|
+
setSelected: (items: T[]) => void;
|
|
940
|
+
/**
|
|
941
|
+
* Selecciona un elemento.
|
|
942
|
+
* @param item El elemento a seleccionar.
|
|
943
|
+
*/
|
|
944
|
+
select: (item: T) => void;
|
|
945
|
+
/**
|
|
946
|
+
* Deselecciona un elemento.
|
|
947
|
+
* @param item El elemento a deseleccionar.
|
|
948
|
+
*/
|
|
949
|
+
unselect: (item: T) => void;
|
|
950
|
+
/**
|
|
951
|
+
* Alterna la selección de un elemento (si está seleccionado, lo deselecciona y viceversa).
|
|
952
|
+
* @param item El elemento cuya selección se alternará.
|
|
953
|
+
*/
|
|
954
|
+
toggle: (item: T) => void;
|
|
955
|
+
/**
|
|
956
|
+
* Alterna la selección de todos los elementos (si todos están seleccionados, los deselecciona; de lo contrario, los selecciona).
|
|
957
|
+
*/
|
|
958
|
+
toggleAll: () => void;
|
|
959
|
+
/**
|
|
960
|
+
* Deselecciona todos los elementos.
|
|
961
|
+
*/
|
|
962
|
+
clear: () => void;
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
declare interface Return_3<T = ReactNode> {
|
|
966
|
+
currentStepIndex: number;
|
|
967
|
+
step: T;
|
|
968
|
+
steps: T[];
|
|
969
|
+
isFirstStep: boolean;
|
|
970
|
+
isLastStep: boolean;
|
|
971
|
+
goTo: (i: number) => void;
|
|
972
|
+
next: () => void;
|
|
973
|
+
back: () => void;
|
|
974
|
+
findAndGo: (callback: ListIterateeCustom<T, boolean>) => void;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
declare type Return_4<TState, TArgs = ((state: TState) => Partial<TState>) | Partial<TState>> = [TState, (arg: TArgs) => void, () => void];
|
|
978
|
+
|
|
979
|
+
export declare type SafeOmit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
980
|
+
|
|
981
|
+
declare interface SearchProps {
|
|
982
|
+
search?: string;
|
|
983
|
+
searchDefaultValue?: string;
|
|
984
|
+
onSearchChange?: (search: string) => void;
|
|
985
|
+
searchProps?: ComponentProps<typeof AutoCompleteInput>;
|
|
986
|
+
searchPlaceholder?: string;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
export declare const Select: {
|
|
990
|
+
<TItem extends Record<string, any> = Option_2<string>>({ items, valueKey, labelKey, value: prop, onChange, defaultValue: defaultProp, renderLabel, triggerProps, contentClassName, contentProps, itemClassName, itemProps, className, placeholder, ...props }: Props_10<TItem>): JSX_2.Element;
|
|
991
|
+
displayName: string;
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
export declare const SelectContent: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
995
|
+
|
|
996
|
+
export declare const SelectGroup: React_2.FC<SelectGroupProps>;
|
|
997
|
+
|
|
998
|
+
declare interface SelectGroupProps extends React_2.ComponentPropsWithoutRef<typeof SelectPrimitive.Group> {
|
|
999
|
+
heading?: string;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
export declare const SelectItem: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1003
|
+
|
|
1004
|
+
export declare const SelectLabel: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1005
|
+
|
|
1006
|
+
declare type SelectProps<TItem extends Record<string, any>> = ComponentProps<typeof Select<TItem>>;
|
|
1007
|
+
|
|
1008
|
+
export declare const SelectRoot: React_2.FC<SelectPrimitive.SelectProps>;
|
|
1009
|
+
|
|
1010
|
+
export declare const SelectScrollDownButton: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1011
|
+
|
|
1012
|
+
export declare const SelectScrollUpButton: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1013
|
+
|
|
1014
|
+
export declare const SelectSeparator: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1015
|
+
|
|
1016
|
+
export declare const SelectTrigger: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
1017
|
+
|
|
1018
|
+
export declare const SelectValue: React_2.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
1019
|
+
|
|
1020
|
+
export declare type SetState<T> = Dispatch<SetStateAction<T>>;
|
|
1021
|
+
|
|
1022
|
+
declare type Shortcut = Partial<{
|
|
1023
|
+
shortcut: MenuShortcutProps_2["keys"];
|
|
1024
|
+
onShortcut: MenuShortcutProps_2["handler"];
|
|
1025
|
+
shortcutOptions: MenuShortcutProps_2["options"];
|
|
1026
|
+
}>;
|
|
1027
|
+
|
|
1028
|
+
export declare type SingleDateValue = {
|
|
1029
|
+
value?: DateSingle;
|
|
1030
|
+
defaultValue?: DateSingle;
|
|
1031
|
+
onChange?: (date: DateSingle) => void;
|
|
1032
|
+
};
|
|
1033
|
+
|
|
1034
|
+
export declare const Skeleton: {
|
|
1035
|
+
({ isCircle, width, height, isLoading, ...props }: Props_22): string | number | true | JSX_2.Element | Iterable<ReactNode>;
|
|
1036
|
+
displayName: string;
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
export declare const Stack: ForwardRefExoticComponent<Omit<StackProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
1040
|
+
|
|
1041
|
+
declare interface StackProps extends ComponentProps<"div"> {
|
|
1042
|
+
inline?: boolean;
|
|
1043
|
+
justify?: CSSProperties["justifyContent"];
|
|
1044
|
+
align?: CSSProperties["alignItems"];
|
|
1045
|
+
direction?: "horizontal" | "vertical";
|
|
1046
|
+
gap?: CSSProperties["gap"];
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
export declare type State<T> = [T, SetState<T>];
|
|
1050
|
+
|
|
1051
|
+
export declare const Switch: {
|
|
1052
|
+
({ className, children, containerProps, containerClassName, ...props }: Props_23): JSX_2.Element;
|
|
1053
|
+
displayName: string;
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
export declare const TabContent: {
|
|
1057
|
+
({ value, ...props }: TabContentProps): JSX_2.Element | null;
|
|
1058
|
+
displayName: string;
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
export declare interface TabContentProps extends HTMLProps<HTMLDivElement> {
|
|
1062
|
+
value: string;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
export declare const Table: {
|
|
1066
|
+
<T>({ data, columns, onRowClick, selected, theadClassName, theadProps, tbodyClassName, tbodyProps, trClassName, trProps, thClassName, thProps, tdClassName, tdProps, ...tableProps }: Props_24<T>): JSX_2.Element;
|
|
1067
|
+
displayName: string;
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
export declare const TABLE_PAGE_SIZES: readonly [10, 25, 50];
|
|
1071
|
+
|
|
1072
|
+
export declare const TablePagination: {
|
|
1073
|
+
({ containerClassName, containerProps, selectClassName, selectProps, ...props }: Props_25): JSX_2.Element;
|
|
1074
|
+
displayName: string;
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
declare interface TablePaginationExtendedProps {
|
|
1078
|
+
containerClassName?: ClassName;
|
|
1079
|
+
containerProps?: HTMLProps<HTMLDivElement>;
|
|
1080
|
+
selectClassName?: ClassName;
|
|
1081
|
+
selectProps?: HTMLProps<HTMLSelectElement>;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
export declare const TabList: {
|
|
1085
|
+
({ children, className }: TabListProps): JSX_2.Element;
|
|
1086
|
+
displayName: string;
|
|
1087
|
+
};
|
|
1088
|
+
|
|
1089
|
+
export declare interface TabListProps {
|
|
1090
|
+
children: ReactNode;
|
|
1091
|
+
className?: string;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
export declare const Tabs: {
|
|
1095
|
+
({ children, value: prop, onChange, defaultValue, ...props }: TabsProps): JSX_2.Element;
|
|
1096
|
+
displayName: string;
|
|
1097
|
+
};
|
|
1098
|
+
|
|
1099
|
+
export declare interface TabsExtendedProps extends TabsProps {
|
|
1100
|
+
listClassName: TabListProps["className"];
|
|
1101
|
+
listProps: TabListProps;
|
|
1102
|
+
triggerClassName: TabTriggerProps["className"];
|
|
1103
|
+
triggerProps: TabTriggerProps;
|
|
1104
|
+
contentClassName: TabContentProps["className"];
|
|
1105
|
+
contentProps: TabContentProps;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
export declare interface TabsProps extends Omit<HTMLProps<HTMLDivElement>, "value" | "defaultValue" | "onChange"> {
|
|
1109
|
+
value?: string;
|
|
1110
|
+
onChange?: (tab: string) => void;
|
|
1111
|
+
defaultValue?: string;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
export declare const TabTrigger: {
|
|
1115
|
+
({ value, className, ...props }: TabTriggerProps): JSX_2.Element;
|
|
1116
|
+
displayName: string;
|
|
1117
|
+
};
|
|
1118
|
+
|
|
1119
|
+
export declare interface TabTriggerProps extends Omit<HTMLProps<HTMLButtonElement>, "onClick" | "type"> {
|
|
1120
|
+
value: string;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
export declare const TextArea: ForwardRefExoticComponent<Omit<TextAreaProps, "ref"> & RefAttributes<HTMLTextAreaElement>>;
|
|
1124
|
+
|
|
1125
|
+
declare type TextAreaProps = HTMLProps<HTMLTextAreaElement>;
|
|
1126
|
+
|
|
1127
|
+
export declare const Toast: ForwardRefExoticComponent<Omit<Props_26, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
1128
|
+
|
|
1129
|
+
export declare const toast: {
|
|
1130
|
+
(args: ToastProperties): void;
|
|
1131
|
+
info(args: ToastArgs): void;
|
|
1132
|
+
error(args: ToastArgs): void;
|
|
1133
|
+
success(args: ToastArgs): void;
|
|
1134
|
+
};
|
|
1135
|
+
|
|
1136
|
+
export declare type ToastArgs = string | Omit<ToastProperties, "type">;
|
|
1137
|
+
|
|
1138
|
+
export declare const ToastClose: {
|
|
1139
|
+
({ toastId, ...props }: Props_27): JSX_2.Element;
|
|
1140
|
+
displayName: string;
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1143
|
+
export declare const Toaster: {
|
|
1144
|
+
(props: ToasterProps): JSX_2.Element;
|
|
1145
|
+
displayName: string;
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1148
|
+
export declare type ToasterProps = React.ComponentProps<"div">;
|
|
1149
|
+
|
|
1150
|
+
export declare const ToastIcons: Record<ToastType, ComponentType<LucideProps>>;
|
|
1151
|
+
|
|
1152
|
+
export declare interface ToastProperties extends Omit<IToast, "id"> {
|
|
1153
|
+
duration?: number;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
export declare interface ToastState {
|
|
1157
|
+
toasts: IToast[];
|
|
1158
|
+
addToast: (toast: Omit<IToast, "id"> & {
|
|
1159
|
+
duration?: number;
|
|
1160
|
+
}) => void;
|
|
1161
|
+
removeToast: (id: IToast["id"]) => void;
|
|
1162
|
+
info: (args: ToastArgs) => void;
|
|
1163
|
+
error: (args: ToastArgs) => void;
|
|
1164
|
+
success: (args: ToastArgs) => void;
|
|
1165
|
+
addToastFromArgs: (args: ToastArgs, type: ToastProperties["type"]) => void;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
export declare type ToastType = "info" | "success" | "error";
|
|
1169
|
+
|
|
1170
|
+
export declare const Tooltip: {
|
|
1171
|
+
({ label, open: prop, defaultOpen: defaultProp, onOpenChange: onChange, className, ...props }: Props_28): JSX_2.Element;
|
|
1172
|
+
displayName: string;
|
|
1173
|
+
};
|
|
1174
|
+
|
|
1175
|
+
export declare const Tree: <T extends Node_2>(props: Props<T> & {
|
|
1176
|
+
ref?: TreeRef<T>;
|
|
1177
|
+
}) => ReturnType<typeof TreeInner>;
|
|
1178
|
+
|
|
1179
|
+
export declare type TreeApi<T extends Node_2 = Node_2> = TreeApi_2<T>;
|
|
1180
|
+
|
|
1181
|
+
declare const TreeInner: <T extends Node_2>({ rowClassName, draggable, parentIcon, leaftIcon, children, search, ...props }: Props<T>, ref: TreeRef<T>) => JSX_2.Element;
|
|
1182
|
+
|
|
1183
|
+
export declare type TreeRef<T extends Node_2 = Node_2> = Ref<TreeApi<T>>;
|
|
1184
|
+
|
|
1185
|
+
export declare const twMerge: (...classLists: ClassNameValue[]) => string;
|
|
1186
|
+
|
|
1187
|
+
export declare const type: (element: HTMLElement, value: string) => void;
|
|
1188
|
+
|
|
1189
|
+
export declare function useArray<T>(defaultProp: T[]): readonly [T[], {
|
|
1190
|
+
readonly insertAt: (index: number, item: T) => void;
|
|
1191
|
+
readonly removeAt: (index: number) => void;
|
|
1192
|
+
readonly updateAt: (index: number, newItem: T) => void;
|
|
1193
|
+
readonly clear: () => void;
|
|
1194
|
+
readonly reset: () => void;
|
|
1195
|
+
readonly push: (item: T) => void;
|
|
1196
|
+
readonly set: (newList: T[]) => void;
|
|
1197
|
+
readonly pop: () => void;
|
|
1198
|
+
readonly update: (predicate: ListIterateeCustom<T, boolean>, newItem: T | ((item: T) => T)) => void;
|
|
1199
|
+
}];
|
|
1200
|
+
|
|
1201
|
+
export declare function useAsync<T>({ fn, dependencies, onError, onSuccess, onFinish, }: Props_29<T>): AsyncState<T>;
|
|
1202
|
+
|
|
1203
|
+
declare interface UseAsyncOptions<T> {
|
|
1204
|
+
onError?: (error: Error) => void;
|
|
1205
|
+
onSuccess?: (data: T) => void;
|
|
1206
|
+
onFinish?: () => void;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
export declare const useClickOutside: <T extends HTMLElement = HTMLElement>(callback: () => void, watch?: boolean) => RefObject<T>;
|
|
1210
|
+
|
|
1211
|
+
export declare function useClipboard(): [CopiedValue, CopyFunction];
|
|
1212
|
+
|
|
1213
|
+
export declare function useDebounce<T>(data: T, options?: DebounceOptions<T>): T;
|
|
1214
|
+
|
|
1215
|
+
export declare function useDisclosure(initialState?: boolean, callbacks?: {
|
|
1216
|
+
onOpen?: () => void;
|
|
1217
|
+
onClose?: () => void;
|
|
1218
|
+
}): readonly [boolean, {
|
|
1219
|
+
readonly open: () => void;
|
|
1220
|
+
readonly close: () => void;
|
|
1221
|
+
readonly toggle: () => void;
|
|
1222
|
+
}];
|
|
1223
|
+
|
|
1224
|
+
export declare function useEventListener<K extends keyof HTMLElementEventMap, T extends HTMLElement = any>(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): MutableRefObject<T | undefined>;
|
|
1225
|
+
|
|
1226
|
+
export declare function useForm<T extends FieldValues = FieldValues>(schema: ZodType<T>, options?: Partial<UseFormProps<T>>): UseFormReturn<T, any, undefined>;
|
|
1227
|
+
|
|
1228
|
+
export declare const useFormField: () => {
|
|
1229
|
+
invalid: boolean;
|
|
1230
|
+
isDirty: boolean;
|
|
1231
|
+
isTouched: boolean;
|
|
1232
|
+
isValidating: boolean;
|
|
1233
|
+
error?: FieldError;
|
|
1234
|
+
id: string;
|
|
1235
|
+
name: string;
|
|
1236
|
+
formItemId: string;
|
|
1237
|
+
formDescriptionId: string;
|
|
1238
|
+
formMessageId: string;
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
export declare function useHotkey(keys: string | string[], handler: (event: KeyboardEvent) => void, options?: HotkeyOptions): MutableRefObject<any>;
|
|
1242
|
+
|
|
1243
|
+
export declare function useHover<T extends HTMLElement>(options?: UseHoverOptions): {
|
|
1244
|
+
ref: React.RefObject<T>;
|
|
1245
|
+
isHovering: boolean;
|
|
1246
|
+
};
|
|
1247
|
+
|
|
1248
|
+
declare type UseHoverOptions = {
|
|
1249
|
+
onHoverStart?: (event: MouseEvent) => void;
|
|
1250
|
+
onHoverEnd?: (event: MouseEvent) => void;
|
|
1251
|
+
};
|
|
1252
|
+
|
|
1253
|
+
export declare function useIsVisible<T extends HTMLElement>({ onVisible, root, rootMargin, threshold, }?: UseIsVisibleProps): UseIsVisibleReturn<T>;
|
|
1254
|
+
|
|
1255
|
+
declare interface UseIsVisibleProps extends IntersectionObserverInit {
|
|
1256
|
+
onVisible?: () => void;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
declare interface UseIsVisibleReturn<T> {
|
|
1260
|
+
ref: RefObject<T>;
|
|
1261
|
+
isVisible: boolean;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
export declare function useLocalStorage<T>(key: string): [T | undefined, (value: T) => void, () => void];
|
|
1265
|
+
|
|
1266
|
+
export declare function useLocalStorage<T>(key: string, initialValue: T): [T, (value: T) => void, () => void];
|
|
1267
|
+
|
|
1268
|
+
export declare const useMediaQuery: (query: string) => boolean;
|
|
1269
|
+
|
|
1270
|
+
export declare function useMemoizedFn<T extends noop>(fn: T): T;
|
|
1271
|
+
|
|
1272
|
+
export declare const useMutation: <TArgs extends any[], TReturn>(opts: UseMutationOptions<TArgs, TReturn>) => UseMutationReturn<TArgs, TReturn>;
|
|
1273
|
+
|
|
1274
|
+
declare interface UseMutationOptions<TArgs extends any[], TReturn> {
|
|
1275
|
+
fn: Mutation<TArgs, TReturn>;
|
|
1276
|
+
onError?: (error: Error) => void;
|
|
1277
|
+
onSuccess?: (data: TReturn) => void;
|
|
1278
|
+
onFinish?: () => void;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
declare interface UseMutationReturn<TArgs extends any[], TReturn> {
|
|
1282
|
+
mutate: Mutation<TArgs, TReturn>;
|
|
1283
|
+
loading: boolean;
|
|
1284
|
+
error: Error | null;
|
|
1285
|
+
data: TReturn | null;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
export declare function useObject<T extends GenericObject_2>(): MaybeReturn<T>;
|
|
1289
|
+
|
|
1290
|
+
export declare function useObject<T extends GenericObject_2>(initialValue: T): Return_4<T>;
|
|
1291
|
+
|
|
1292
|
+
export declare function usePagination({ totalItems, pageSize, initialCurrentPage, onChange, }: usePaginationProps): {
|
|
1293
|
+
next: () => void;
|
|
1294
|
+
prev: () => void;
|
|
1295
|
+
goTo: (page: number) => void;
|
|
1296
|
+
currentPage: number;
|
|
1297
|
+
maxPage: number;
|
|
1298
|
+
isFirstPage: boolean;
|
|
1299
|
+
isLastPage: boolean;
|
|
1300
|
+
range: {
|
|
1301
|
+
start: number;
|
|
1302
|
+
end: number;
|
|
1303
|
+
};
|
|
1304
|
+
};
|
|
1305
|
+
|
|
1306
|
+
export declare type usePaginationProps = {
|
|
1307
|
+
/**
|
|
1308
|
+
* Cantidad total de elementos
|
|
1309
|
+
*/
|
|
1310
|
+
totalItems: number;
|
|
1311
|
+
/**
|
|
1312
|
+
* Cantidad de elementos por página
|
|
1313
|
+
*/
|
|
1314
|
+
pageSize: number;
|
|
1315
|
+
/**
|
|
1316
|
+
* Pagina inicial
|
|
1317
|
+
*/
|
|
1318
|
+
initialCurrentPage?: number;
|
|
1319
|
+
/**
|
|
1320
|
+
* Callback que se ejecuta cuando cambia la pagina
|
|
1321
|
+
*/
|
|
1322
|
+
onChange?: (value: {
|
|
1323
|
+
currentPage: number;
|
|
1324
|
+
pageSize: number;
|
|
1325
|
+
}) => void;
|
|
1326
|
+
siblingCount?: number;
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
export declare function usePortal(id: string): {
|
|
1330
|
+
render: (children: ReactNode) => ReactPortal | null;
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
export declare function usePreventCloseWindow({ shouldPrevent, message, }: UsePreventUnloadProps): void;
|
|
1334
|
+
|
|
1335
|
+
declare interface UsePreventUnloadProps {
|
|
1336
|
+
/**
|
|
1337
|
+
* Propiedad que determina si la ventana se puede cerrar o no
|
|
1338
|
+
*/
|
|
1339
|
+
shouldPrevent: boolean;
|
|
1340
|
+
/**
|
|
1341
|
+
* Mensaje que se va a mostrar al usuario antes de cerrar la ventana
|
|
1342
|
+
* @deprecated ya no es soportado por los navegadores modernos
|
|
1343
|
+
*/
|
|
1344
|
+
message?: string;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
export declare const useRangePagination: ({ siblingCount, ...paginationProps }: useRangePaginationProps) => {
|
|
1348
|
+
paginationRange: (string | number)[];
|
|
1349
|
+
next: () => void;
|
|
1350
|
+
prev: () => void;
|
|
1351
|
+
goTo: (page: number) => void;
|
|
1352
|
+
currentPage: number;
|
|
1353
|
+
maxPage: number;
|
|
1354
|
+
isFirstPage: boolean;
|
|
1355
|
+
isLastPage: boolean;
|
|
1356
|
+
range: {
|
|
1357
|
+
start: number;
|
|
1358
|
+
end: number;
|
|
1359
|
+
};
|
|
1360
|
+
};
|
|
1361
|
+
|
|
1362
|
+
export declare type useRangePaginationProps = {
|
|
1363
|
+
/**
|
|
1364
|
+
* Cantidad de elementos visibles al lado de la pagina actual
|
|
1365
|
+
*/
|
|
1366
|
+
siblingCount?: number;
|
|
1367
|
+
} & usePaginationProps;
|
|
1368
|
+
|
|
1369
|
+
export declare function useSelection<T>(items: T[]): Return_2<T>;
|
|
1370
|
+
|
|
1371
|
+
export declare function useStep<T = ReactNode>(steps: T[], amountSteps?: number): Return_3<T>;
|
|
1372
|
+
|
|
1373
|
+
export declare const useToastStore: UseBoundStore<StoreApi<ToastState>>;
|
|
1374
|
+
|
|
1375
|
+
export declare function useToggle(initialValue?: boolean): Return;
|
|
1376
|
+
|
|
1377
|
+
export declare type ValuesUnion<T extends Record<string, any>> = T[keyof T];
|
|
1378
|
+
|
|
1379
|
+
export declare interface ViewProps {
|
|
1380
|
+
value: Date;
|
|
1381
|
+
onChange: (date: Date) => void;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
declare type WeekDaysProps = HTMLProps<HTMLDivElement>;
|
|
1385
|
+
|
|
1386
|
+
export declare const weeksDays: string[];
|
|
1387
|
+
|
|
1388
|
+
export { }
|