@boxcustodia/library 2.0.0-alpha.6 → 2.0.0-alpha.8
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.cjs.js +65 -64
- package/dist/index.d.ts +158 -129
- package/dist/index.es.js +21869 -22314
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';
|
|
2
2
|
import { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';
|
|
3
3
|
import { ButtonHTMLAttributes } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { ChangeEvent } from 'react';
|
|
5
|
+
import { CheckboxGroup as CheckboxGroup_3 } from '@base-ui/react/checkbox-group';
|
|
5
6
|
import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
|
|
6
7
|
import { ClassNameValue } from 'tailwind-merge';
|
|
7
8
|
import { ClassProp } from 'class-variance-authority/types';
|
|
@@ -10,7 +11,6 @@ import { Collection } from 'react-aria-components';
|
|
|
10
11
|
import { Command } from 'cmdk';
|
|
11
12
|
import { ComponentProps } from 'react';
|
|
12
13
|
import { ComponentPropsWithoutRef } from 'react';
|
|
13
|
-
import { ControllerRenderProps } from 'react-hook-form';
|
|
14
14
|
import { CSSProperties } from 'react';
|
|
15
15
|
import { default as default_2 } from 'react';
|
|
16
16
|
import { DependencyList } from 'react';
|
|
@@ -19,12 +19,12 @@ import { DialogProps as DialogProps_2 } from '@radix-ui/react-dialog';
|
|
|
19
19
|
import { Dispatch } from 'react';
|
|
20
20
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
21
21
|
import { ElementType } from 'react';
|
|
22
|
-
import {
|
|
23
|
-
import { FieldPath } from 'react-hook-form';
|
|
24
|
-
import { FieldValues } from 'react-hook-form';
|
|
22
|
+
import { Field as FieldPrimitive } from '@base-ui/react/field';
|
|
25
23
|
import { FormEvent } from 'react';
|
|
24
|
+
import { Form as FormPrimitive } from '@base-ui/react/form';
|
|
26
25
|
import { HTMLAttributes } from 'react';
|
|
27
26
|
import { HTMLProps } from 'react';
|
|
27
|
+
import { Input as InputPrimitive } from '@base-ui/react/input';
|
|
28
28
|
import { JSX } from 'react/jsx-runtime';
|
|
29
29
|
import { ListIterateeCustom } from 'lodash';
|
|
30
30
|
import { LucideIcon } from 'lucide-react';
|
|
@@ -53,11 +53,8 @@ import { TreeItemContent as TreeItemContent_2 } from 'react-aria-components';
|
|
|
53
53
|
import { TreeItemProps } from 'react-aria-components';
|
|
54
54
|
import { TreeProps } from 'react-aria-components';
|
|
55
55
|
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
56
|
-
import { UseFormProps } from 'react-hook-form';
|
|
57
|
-
import { UseFormReturn } from 'react-hook-form';
|
|
58
56
|
import { useRender } from '@base-ui/react/use-render';
|
|
59
57
|
import { VariantProps } from 'class-variance-authority';
|
|
60
|
-
import { z } from 'zod';
|
|
61
58
|
|
|
62
59
|
/**
|
|
63
60
|
* Accessible confirmation dialog with cancel and action buttons.
|
|
@@ -229,7 +226,7 @@ declare type ButtonProps = ComponentProps<typeof Button>;
|
|
|
229
226
|
declare type ButtonProps_2 = ComponentProps<typeof Button>;
|
|
230
227
|
|
|
231
228
|
export declare const buttonVariants: (props?: ({
|
|
232
|
-
variant?: "default" | "
|
|
229
|
+
variant?: "default" | "link" | "error" | "success" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
233
230
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
234
231
|
shape?: "rounded" | "circle" | "square" | null | undefined;
|
|
235
232
|
} & ClassProp) | undefined) => string;
|
|
@@ -307,21 +304,64 @@ declare interface CenterProps extends ComponentProps<"div"> {
|
|
|
307
304
|
inline?: boolean;
|
|
308
305
|
}
|
|
309
306
|
|
|
310
|
-
export declare
|
|
307
|
+
export declare const Checkbox: typeof CheckboxSingle & {
|
|
308
|
+
Item: typeof CheckboxItem;
|
|
309
|
+
Group: typeof CheckboxGroup_2;
|
|
310
|
+
Legend: typeof CheckboxLegend;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
export declare function CheckboxGroup({ className, ...props }: CheckboxGroup_3.Props): React_2.ReactElement;
|
|
311
314
|
|
|
312
|
-
|
|
315
|
+
declare function CheckboxGroup_2({ legend, children, error, description, defaultValue, value, onChange, allValues, disabled, controlFirst, className, }: CheckboxGroupProps): React_2.ReactElement;
|
|
316
|
+
|
|
317
|
+
export declare interface CheckboxGroupProps {
|
|
318
|
+
legend?: ReactNode;
|
|
319
|
+
children: ReactNode;
|
|
320
|
+
error?: string;
|
|
321
|
+
description?: ReactNode;
|
|
322
|
+
defaultValue?: string[];
|
|
323
|
+
value?: string[];
|
|
324
|
+
onChange?: (value: string[]) => void;
|
|
325
|
+
allValues?: string[];
|
|
326
|
+
disabled?: boolean;
|
|
327
|
+
controlFirst?: boolean;
|
|
328
|
+
className?: string;
|
|
329
|
+
}
|
|
313
330
|
|
|
314
331
|
export declare function CheckboxIndicator({ className, ...props }: CheckboxPrimitive.Indicator.Props): React_2.ReactElement;
|
|
315
332
|
|
|
333
|
+
declare function CheckboxItem({ className, label, id, ...props }: CheckboxItemProps): React_2.ReactElement;
|
|
334
|
+
|
|
335
|
+
export declare interface CheckboxItemProps extends Omit<CheckboxPrimitive.Root.Props, "children"> {
|
|
336
|
+
label: ReactNode;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
declare function CheckboxLegend({ children, className }: CheckboxLegendProps): React_2.ReactElement;
|
|
340
|
+
|
|
341
|
+
export declare interface CheckboxLegendProps {
|
|
342
|
+
children: ReactNode;
|
|
343
|
+
className?: string;
|
|
344
|
+
}
|
|
345
|
+
|
|
316
346
|
export { CheckboxPrimitive }
|
|
317
347
|
|
|
318
348
|
declare interface CheckboxProps extends Omit<CheckboxPrimitive.Root.Props, "children"> {
|
|
319
|
-
children?:
|
|
349
|
+
children?: ReactNode;
|
|
350
|
+
label?: ReactNode;
|
|
351
|
+
description?: ReactNode;
|
|
352
|
+
error?: FieldErrorProp;
|
|
353
|
+
tooltip?: ReactNode;
|
|
320
354
|
indicatorProps?: CheckboxPrimitive.Indicator.Props;
|
|
355
|
+
controlFirst?: boolean;
|
|
356
|
+
invalid?: boolean;
|
|
357
|
+
touched?: boolean;
|
|
358
|
+
dirty?: boolean;
|
|
321
359
|
}
|
|
322
360
|
|
|
323
361
|
export declare function CheckboxRoot({ className, ...props }: CheckboxPrimitive.Root.Props): React_2.ReactElement;
|
|
324
362
|
|
|
363
|
+
declare function CheckboxSingle({ children, label, description, error, tooltip, className, indicatorProps, controlFirst, required, name, invalid, touched, dirty, ...props }: CheckboxProps): React_2.ReactElement;
|
|
364
|
+
|
|
325
365
|
export declare type ClassName = string | undefined;
|
|
326
366
|
|
|
327
367
|
export declare const click: (element: HTMLElement) => void;
|
|
@@ -627,7 +667,35 @@ declare interface ExtendedProps_2 {
|
|
|
627
667
|
*/
|
|
628
668
|
export declare const extractInitials: (string: string) => string;
|
|
629
669
|
|
|
630
|
-
export declare
|
|
670
|
+
export declare function Field({ label, required, tooltip, description, error, controlFirst, children, className, invalid: invalidProp, ...props }: FieldProps): JSX.Element;
|
|
671
|
+
|
|
672
|
+
export declare function FieldDescription({ className, ...props }: FieldPrimitive.Description.Props): JSX.Element;
|
|
673
|
+
|
|
674
|
+
export declare function FieldError({ className, ...props }: FieldPrimitive.Error.Props): JSX.Element;
|
|
675
|
+
|
|
676
|
+
export declare type FieldErrorItem = {
|
|
677
|
+
message: ReactNode;
|
|
678
|
+
match: NonNullable<FieldErrorMatch>;
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
export declare type FieldErrorMatch = FieldPrimitive.Error.Props["match"];
|
|
682
|
+
|
|
683
|
+
export declare type FieldErrorProp = string | FieldErrorItem | FieldErrorItem[];
|
|
684
|
+
|
|
685
|
+
export declare function FieldLabel({ className, ...props }: FieldPrimitive.Label.Props): JSX.Element;
|
|
686
|
+
|
|
687
|
+
export { FieldPrimitive }
|
|
688
|
+
|
|
689
|
+
export declare interface FieldProps extends FieldPrimitive.Root.Props {
|
|
690
|
+
label?: ReactNode;
|
|
691
|
+
required?: boolean;
|
|
692
|
+
tooltip?: ReactNode;
|
|
693
|
+
description?: ReactNode;
|
|
694
|
+
error?: FieldErrorProp;
|
|
695
|
+
controlFirst?: boolean;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export declare function FieldRoot({ className, ...props }: FieldPrimitive.Root.Props): JSX.Element;
|
|
631
699
|
|
|
632
700
|
declare type FileError = {
|
|
633
701
|
file: File;
|
|
@@ -667,32 +735,9 @@ export declare const FileTypeGroups: Record<string, FileTypeValue[]>;
|
|
|
667
735
|
|
|
668
736
|
export declare type FileTypeValue = (typeof FileType)[keyof typeof FileType];
|
|
669
737
|
|
|
670
|
-
export declare
|
|
671
|
-
|
|
672
|
-
export declare const FormControl: ({ className, ...props }: React_2.ComponentProps<typeof Slot>) => JSX.Element;
|
|
673
|
-
|
|
674
|
-
export declare const FormDescription: ({ className, ...props }: React_2.ComponentProps<"p">) => JSX.Element;
|
|
738
|
+
export declare function Form({ className, ...props }: FormPrimitive.Props): default_2.ReactElement;
|
|
675
739
|
|
|
676
|
-
export
|
|
677
|
-
|
|
678
|
-
declare type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
679
|
-
name: TName;
|
|
680
|
-
label?: string;
|
|
681
|
-
description?: string;
|
|
682
|
-
render: (field: ControllerRenderProps<TFieldValues, TName>) => React_2.ReactNode;
|
|
683
|
-
className?: string;
|
|
684
|
-
itemProps?: React_2.ComponentProps<typeof FormItem>;
|
|
685
|
-
labelProps?: React_2.ComponentProps<typeof FormLabel>;
|
|
686
|
-
controlProps?: React_2.ComponentProps<typeof FormControl>;
|
|
687
|
-
descriptionProps?: React_2.ComponentProps<typeof FormDescription>;
|
|
688
|
-
messageProps?: React_2.ComponentProps<typeof FormMessage>;
|
|
689
|
-
};
|
|
690
|
-
|
|
691
|
-
export declare const FormItem: ({ className, ...props }: React_2.ComponentProps<"div">) => JSX.Element;
|
|
692
|
-
|
|
693
|
-
export declare const FormLabel: ({ className, ...props }: React_2.ComponentProps<"label">) => JSX.Element;
|
|
694
|
-
|
|
695
|
-
export declare const FormMessage: ({ className, children, ...props }: React_2.ComponentProps<"p">) => JSX.Element | null;
|
|
740
|
+
export { FormPrimitive }
|
|
696
741
|
|
|
697
742
|
export declare interface GenericMenuProps {
|
|
698
743
|
trigger: default_2.ReactNode;
|
|
@@ -710,7 +755,7 @@ declare type GenericObject_2 = Record<string, any>;
|
|
|
710
755
|
|
|
711
756
|
export declare const getFormData: (event: FormEvent<HTMLFormElement>) => Record<string, string>;
|
|
712
757
|
|
|
713
|
-
export declare const Heading: <C extends React.ElementType = "h2">({ className, size, weight, as, ...props }:
|
|
758
|
+
export declare const Heading: <C extends React.ElementType = "h2">({ className, size, weight, as, ...props }: Props_10<C>) => JSX.Element;
|
|
714
759
|
|
|
715
760
|
declare const HeadingVariants: (props?: ({
|
|
716
761
|
size?: "sm" | "lg" | "md" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | null | undefined;
|
|
@@ -728,7 +773,25 @@ declare type HotkeyOptions = {
|
|
|
728
773
|
|
|
729
774
|
export declare type ID = string | number;
|
|
730
775
|
|
|
731
|
-
export declare
|
|
776
|
+
export declare function Input({ className, label, tooltip, description, error, required, name, invalid, touched, dirty, ...inputProps }: InputProps): JSX.Element;
|
|
777
|
+
|
|
778
|
+
export { InputPrimitive }
|
|
779
|
+
|
|
780
|
+
export declare interface InputProps extends InputRootProps {
|
|
781
|
+
label?: ReactNode;
|
|
782
|
+
tooltip?: ReactNode;
|
|
783
|
+
description?: ReactNode;
|
|
784
|
+
error?: FieldErrorProp;
|
|
785
|
+
invalid?: boolean;
|
|
786
|
+
touched?: boolean;
|
|
787
|
+
dirty?: boolean;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export declare function InputRoot({ className, onChange, ...props }: InputRootProps): JSX.Element;
|
|
791
|
+
|
|
792
|
+
export declare interface InputRootProps extends Omit<InputPrimitive.Props, "onChange" | "size"> {
|
|
793
|
+
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
794
|
+
}
|
|
732
795
|
|
|
733
796
|
declare interface ItemTimeline {
|
|
734
797
|
content?: ReactNode;
|
|
@@ -777,12 +840,12 @@ export declare type LibraryProviderProps = {
|
|
|
777
840
|
tooltipDelay?: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>["delay"];
|
|
778
841
|
} & Omit<ToastProviderProps, "children">;
|
|
779
842
|
|
|
780
|
-
export declare const Loader: ({ center, containerClassName, variant, size, ...props }:
|
|
843
|
+
export declare const Loader: ({ center, containerClassName, variant, size, ...props }: Props_11) => JSX.Element;
|
|
781
844
|
|
|
782
845
|
declare type LoaderVariants = VariantProps<typeof loaderVariants>;
|
|
783
846
|
|
|
784
847
|
declare const loaderVariants: (props?: ({
|
|
785
|
-
variant?: "
|
|
848
|
+
variant?: "error" | "success" | "secondary" | "ghost" | "primary" | "warning" | "info" | null | undefined;
|
|
786
849
|
size?: "default" | "sm" | "lg" | "xs" | "xl" | null | undefined;
|
|
787
850
|
} & ClassProp) | undefined) => string;
|
|
788
851
|
|
|
@@ -968,7 +1031,7 @@ declare type noop = (this: any, ...args: any[]) => any;
|
|
|
968
1031
|
|
|
969
1032
|
export declare type Nullable<T> = T | null;
|
|
970
1033
|
|
|
971
|
-
export declare const NumberInput: ({ value: prop, onChange, defaultValue: defaultProp, className, min, max, ...props }:
|
|
1034
|
+
export declare const NumberInput: ({ value: prop, onChange, defaultValue: defaultProp, className, min, max, ...props }: Props_12) => JSX.Element;
|
|
972
1035
|
|
|
973
1036
|
declare type OpenProps = {
|
|
974
1037
|
open?: boolean;
|
|
@@ -987,15 +1050,35 @@ export declare type OverrideProps<T, TOverridden> = Omit<T, keyof TOverridden> &
|
|
|
987
1050
|
|
|
988
1051
|
export declare type PageSize = (typeof TABLE_PAGE_SIZES)[number];
|
|
989
1052
|
|
|
990
|
-
export declare const Pagination: ({ optionProps, className, containerProps, ...rangeProps }:
|
|
1053
|
+
export declare const Pagination: ({ optionProps, className, containerProps, ...rangeProps }: Props_13) => JSX.Element;
|
|
991
1054
|
|
|
992
1055
|
declare interface PaginationOptionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
993
1056
|
isActive?: boolean;
|
|
994
1057
|
}
|
|
995
1058
|
|
|
996
|
-
export declare
|
|
1059
|
+
export declare function Password({ label, tooltip, description, error, required, name, invalid, touched, dirty, ...passwordProps }: PasswordProps): JSX.Element;
|
|
1060
|
+
|
|
1061
|
+
export declare interface PasswordProps extends PasswordRootProps {
|
|
1062
|
+
label?: ReactNode;
|
|
1063
|
+
tooltip?: ReactNode;
|
|
1064
|
+
description?: ReactNode;
|
|
1065
|
+
error?: FieldErrorProp;
|
|
1066
|
+
invalid?: boolean;
|
|
1067
|
+
touched?: boolean;
|
|
1068
|
+
dirty?: boolean;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
export declare function PasswordRoot({ className, showIcon, hideIcon, onShow, onHide, toggleable, ...rest }: PasswordRootProps): JSX.Element;
|
|
1072
|
+
|
|
1073
|
+
export declare interface PasswordRootProps extends InputRootProps {
|
|
1074
|
+
showIcon?: ReactNode;
|
|
1075
|
+
hideIcon?: ReactNode;
|
|
1076
|
+
onShow?: () => void;
|
|
1077
|
+
onHide?: () => void;
|
|
1078
|
+
toggleable?: boolean;
|
|
1079
|
+
}
|
|
997
1080
|
|
|
998
|
-
export declare const Popover: (props:
|
|
1081
|
+
export declare const Popover: (props: Props_14) => JSX.Element;
|
|
999
1082
|
|
|
1000
1083
|
export declare const PopoverContent: ({ className, align, sideOffset, matchTriggerWidth, style, focus, ...props }: PopoverContentProps) => JSX.Element;
|
|
1001
1084
|
|
|
@@ -1015,7 +1098,7 @@ export declare function Progress({ size, variant, className, trackProps, indicat
|
|
|
1015
1098
|
export declare function ProgressIndicator({ className, variant, ...props }: Progress_2.Indicator.Props & VariantProps<typeof progressIndicatorVariants>): React_2.ReactElement;
|
|
1016
1099
|
|
|
1017
1100
|
declare const progressIndicatorVariants: (props?: ({
|
|
1018
|
-
variant?: "default" | "
|
|
1101
|
+
variant?: "default" | "error" | "success" | "warning" | "info" | null | undefined;
|
|
1019
1102
|
} & ClassProp) | undefined) => string;
|
|
1020
1103
|
|
|
1021
1104
|
export declare function ProgressLabel({ className, ...props }: Progress_2.Label.Props): React_2.ReactElement;
|
|
@@ -1044,42 +1127,16 @@ declare interface Props extends ExtendedProps {
|
|
|
1044
1127
|
onSelect?: (value: AutoCompleteItem["value"], item: AutoCompleteItem) => any;
|
|
1045
1128
|
}
|
|
1046
1129
|
|
|
1047
|
-
declare
|
|
1048
|
-
label?: ReactNode;
|
|
1049
|
-
labelClassName?: string;
|
|
1050
|
-
labelProps?: ComponentPropsWithoutRef<"label">;
|
|
1051
|
-
error?: ReactNode;
|
|
1052
|
-
errorClassName?: string;
|
|
1053
|
-
errorProps?: ComponentPropsWithoutRef<"p">;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
declare type Props_11<TFieldValues extends FieldValues> = {
|
|
1057
|
-
onSubmit: (data: TFieldValues) => void;
|
|
1058
|
-
form: UseFormReturn<TFieldValues, any, any>;
|
|
1059
|
-
children: React_2.ReactNode;
|
|
1060
|
-
className?: string;
|
|
1061
|
-
id?: string;
|
|
1062
|
-
};
|
|
1063
|
-
|
|
1064
|
-
declare type Props_12<C extends React.ElementType> = VariantProps<typeof HeadingVariants> & {
|
|
1130
|
+
declare type Props_10<C extends React.ElementType> = VariantProps<typeof HeadingVariants> & {
|
|
1065
1131
|
as?: C;
|
|
1066
1132
|
} & Omit<React.ComponentPropsWithoutRef<C>, "as">;
|
|
1067
1133
|
|
|
1068
|
-
declare type
|
|
1069
|
-
/** valor del input */
|
|
1070
|
-
value?: string;
|
|
1071
|
-
/** functión a ejecutar cuando el valor cambia */
|
|
1072
|
-
onChange?: (value: string) => void;
|
|
1073
|
-
/** valor por defecto del input */
|
|
1074
|
-
defaultValue?: string;
|
|
1075
|
-
}>;
|
|
1076
|
-
|
|
1077
|
-
declare type Props_14 = LucideProps & LoaderVariants & {
|
|
1134
|
+
declare type Props_11 = LucideProps & LoaderVariants & {
|
|
1078
1135
|
center?: boolean;
|
|
1079
1136
|
containerClassName?: string;
|
|
1080
1137
|
};
|
|
1081
1138
|
|
|
1082
|
-
declare type
|
|
1139
|
+
declare type Props_12 = OverrideProps<ComponentProps<"input">, {
|
|
1083
1140
|
/** valor del input */
|
|
1084
1141
|
value?: number;
|
|
1085
1142
|
/** functión a ejecutar cuando el valor cambia */
|
|
@@ -1092,28 +1149,13 @@ declare type Props_15 = OverrideProps<ComponentProps<"input">, {
|
|
|
1092
1149
|
max?: number;
|
|
1093
1150
|
}>;
|
|
1094
1151
|
|
|
1095
|
-
declare interface
|
|
1152
|
+
declare interface Props_13 extends useRangePaginationProps {
|
|
1096
1153
|
optionProps?: PaginationOptionProps;
|
|
1097
1154
|
className?: string;
|
|
1098
1155
|
containerProps?: HTMLProps<HTMLDivElement>;
|
|
1099
1156
|
}
|
|
1100
1157
|
|
|
1101
|
-
declare
|
|
1102
|
-
/** Clase CSS para el contenedor */
|
|
1103
|
-
containerClassName?: string;
|
|
1104
|
-
/** Ícono para mostrar la contraseña */
|
|
1105
|
-
showIcon?: ReactNode;
|
|
1106
|
-
/** Ícono para ocultar la contraseña */
|
|
1107
|
-
hideIcon?: ReactNode;
|
|
1108
|
-
/** Callback cuando se muestra la contraseña */
|
|
1109
|
-
onShow?: () => void;
|
|
1110
|
-
/** Callback cuando se oculta la contraseña */
|
|
1111
|
-
onHide?: () => void;
|
|
1112
|
-
/** Habilita/deshabilita el botón de mostrar/ocultar contraseña */
|
|
1113
|
-
toggleable?: boolean;
|
|
1114
|
-
}>;
|
|
1115
|
-
|
|
1116
|
-
declare interface Props_18 {
|
|
1158
|
+
declare interface Props_14 {
|
|
1117
1159
|
trigger?: ReactNode;
|
|
1118
1160
|
children: ReactNode;
|
|
1119
1161
|
rootProps?: ComponentPropsWithoutRef<typeof PopoverRoot>;
|
|
@@ -1127,19 +1169,12 @@ declare interface Props_18 {
|
|
|
1127
1169
|
offset?: ComponentPropsWithoutRef<typeof PopoverContent>["sideOffset"];
|
|
1128
1170
|
}
|
|
1129
1171
|
|
|
1130
|
-
declare interface
|
|
1172
|
+
declare interface Props_15 extends ComponentPropsWithoutRef<typeof Slot> {
|
|
1131
1173
|
/** Si el componente está presente o no */
|
|
1132
1174
|
when: ComponentProps<typeof Presence>["present"];
|
|
1133
1175
|
}
|
|
1134
1176
|
|
|
1135
|
-
declare
|
|
1136
|
-
/**
|
|
1137
|
-
* La URL de la imagen
|
|
1138
|
-
*/
|
|
1139
|
-
src: string;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
declare type Props_20<T> = {
|
|
1177
|
+
declare type Props_16<T> = {
|
|
1143
1178
|
data: T[];
|
|
1144
1179
|
columns: ColumnDef<T>[];
|
|
1145
1180
|
onRowClick?: (row: T) => void;
|
|
@@ -1147,18 +1182,25 @@ declare type Props_20<T> = {
|
|
|
1147
1182
|
selected?: (row: T) => boolean;
|
|
1148
1183
|
} & ExtendedProps_2 & Omit<ComponentPropsWithoutRef<typeof TableRoot>, "data" | "selected" | "onDoubleClick">;
|
|
1149
1184
|
|
|
1150
|
-
declare type
|
|
1185
|
+
declare type Props_17 = {
|
|
1151
1186
|
setPageSize?: (value: PageSize) => void;
|
|
1152
1187
|
pageSize?: PageSize;
|
|
1153
1188
|
} & Omit<usePaginationProps, "pageSize"> & TablePaginationExtendedProps;
|
|
1154
1189
|
|
|
1155
|
-
declare type
|
|
1190
|
+
declare type Props_18 = ClosableProps | NonClosableProps;
|
|
1156
1191
|
|
|
1157
|
-
declare type
|
|
1192
|
+
declare type Props_19<T extends TreeNode> = TreeRootProps & {
|
|
1158
1193
|
items: T[];
|
|
1159
1194
|
};
|
|
1160
1195
|
|
|
1161
|
-
declare interface
|
|
1196
|
+
declare interface Props_2 extends HTMLProps<HTMLDivElement> {
|
|
1197
|
+
/**
|
|
1198
|
+
* La URL de la imagen
|
|
1199
|
+
*/
|
|
1200
|
+
src: string;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
declare interface Props_20<T> extends UseAsyncOptions<T> {
|
|
1162
1204
|
fn: () => Promise<T>;
|
|
1163
1205
|
dependencies?: DependencyList;
|
|
1164
1206
|
}
|
|
@@ -1372,7 +1414,7 @@ declare type Shortcut = Partial<{
|
|
|
1372
1414
|
shortcutOptions: MenuShortcutProps_2["options"];
|
|
1373
1415
|
}>;
|
|
1374
1416
|
|
|
1375
|
-
export declare const Show: ({ when, ...props }:
|
|
1417
|
+
export declare const Show: ({ when, ...props }: Props_15) => JSX.Element;
|
|
1376
1418
|
|
|
1377
1419
|
export declare type SingleDateValue = {
|
|
1378
1420
|
value?: DateSingle;
|
|
@@ -1452,11 +1494,13 @@ declare interface StepperTriggerProps {
|
|
|
1452
1494
|
|
|
1453
1495
|
declare type StyleProps = ColorProps | VariantProps_2;
|
|
1454
1496
|
|
|
1455
|
-
export declare function Switch({ children, className, id, thumbProps, ...props }: SwitchProps): React_2.ReactElement;
|
|
1497
|
+
export declare function Switch({ children, label, className, id, thumbProps, controlFirst, ...props }: SwitchProps): React_2.ReactElement;
|
|
1456
1498
|
|
|
1457
1499
|
declare interface SwitchProps extends Omit<Switch_2.Root.Props, "children"> {
|
|
1458
1500
|
children?: React_2.ReactNode;
|
|
1501
|
+
label?: React_2.ReactNode;
|
|
1459
1502
|
thumbProps?: Switch_2.Thumb.Props;
|
|
1503
|
+
controlFirst?: boolean;
|
|
1460
1504
|
}
|
|
1461
1505
|
|
|
1462
1506
|
export declare function SwitchRoot({ className, ...props }: Switch_2.Root.Props): React_2.ReactElement;
|
|
@@ -1469,7 +1513,7 @@ export declare interface TabContentProps extends HTMLProps<HTMLDivElement> {
|
|
|
1469
1513
|
value: string;
|
|
1470
1514
|
}
|
|
1471
1515
|
|
|
1472
|
-
export declare const Table: <T>({ data, columns, onRowClick, onDoubleClick, selected, theadClassName, theadProps, tbodyClassName, tbodyProps, trClassName, trProps, thClassName, thProps, tdClassName, tdProps, ...tableProps }:
|
|
1516
|
+
export declare const Table: <T>({ data, columns, onRowClick, onDoubleClick, selected, theadClassName, theadProps, tbodyClassName, tbodyProps, trClassName, trProps, thClassName, thProps, tdClassName, tdProps, ...tableProps }: Props_16<T>) => JSX.Element;
|
|
1473
1517
|
|
|
1474
1518
|
export declare const TABLE_PAGE_SIZES: number[];
|
|
1475
1519
|
|
|
@@ -1497,7 +1541,7 @@ declare type TableHeaderProps = React_2.ComponentProps<"thead">;
|
|
|
1497
1541
|
|
|
1498
1542
|
declare type TableHeadProps = React_2.ComponentProps<"th">;
|
|
1499
1543
|
|
|
1500
|
-
export declare const TablePagination: ({ containerClassName, containerProps, selectClassName, selectProps, sizes, ...props }:
|
|
1544
|
+
export declare const TablePagination: ({ containerClassName, containerProps, selectClassName, selectProps, sizes, ...props }: Props_17) => JSX.Element;
|
|
1501
1545
|
|
|
1502
1546
|
declare interface TablePaginationExtendedProps {
|
|
1503
1547
|
containerClassName?: ClassName;
|
|
@@ -1552,13 +1596,13 @@ export declare interface TabTriggerProps extends Omit<HTMLProps<HTMLButtonElemen
|
|
|
1552
1596
|
value: string;
|
|
1553
1597
|
}
|
|
1554
1598
|
|
|
1555
|
-
export declare const Tag: ({ className, color, variant, rounded, icon, closable, onClose, children, ...props }:
|
|
1599
|
+
export declare const Tag: ({ className, color, variant, rounded, icon, closable, onClose, children, ...props }: Props_18) => JSX.Element;
|
|
1556
1600
|
|
|
1557
1601
|
export declare type TagVariant = VariantProps<typeof tagVariants>;
|
|
1558
1602
|
|
|
1559
1603
|
export declare const tagVariants: (props?: ({
|
|
1560
1604
|
rounded?: "default" | "square" | "full" | null | undefined;
|
|
1561
|
-
variant?: "
|
|
1605
|
+
variant?: "error" | "success" | "outline" | "secondary" | "primary" | "borderless" | null | undefined;
|
|
1562
1606
|
} & ClassProp) | undefined) => string;
|
|
1563
1607
|
|
|
1564
1608
|
export declare const Textarea: ({ className, ...props }: TextAreaProps) => JSX.Element;
|
|
@@ -1759,7 +1803,7 @@ export declare function TooltipRoot(props: RootProps): JSX.Element;
|
|
|
1759
1803
|
|
|
1760
1804
|
export declare function TooltipTrigger({ className, ...props }: TriggerProps): JSX.Element;
|
|
1761
1805
|
|
|
1762
|
-
export declare function Tree<T extends TreeNode>({ items, ...props }:
|
|
1806
|
+
export declare function Tree<T extends TreeNode>({ items, ...props }: Props_19<T>): JSX.Element;
|
|
1763
1807
|
|
|
1764
1808
|
export declare const TreeItem: <T extends object>({ className, ...props }: OverrideProps<TreeItemProps<T>, {
|
|
1765
1809
|
id: string | number;
|
|
@@ -1849,7 +1893,7 @@ export declare function useArray<T>(defaultProp: T[]): readonly [T[], {
|
|
|
1849
1893
|
readonly update: (predicate: ListIterateeCustom<T, boolean>, newItem: T | ((item: T) => T)) => void;
|
|
1850
1894
|
}];
|
|
1851
1895
|
|
|
1852
|
-
export declare function useAsync<T>({ fn, dependencies, onError, onSuccess, onFinish, }:
|
|
1896
|
+
export declare function useAsync<T>({ fn, dependencies, onError, onSuccess, onFinish, }: Props_20<T>): AsyncState<T>;
|
|
1853
1897
|
|
|
1854
1898
|
declare interface UseAsyncOptions<T> {
|
|
1855
1899
|
onError?: (error: Error) => void;
|
|
@@ -1882,21 +1926,6 @@ export declare function useEventListener<K extends keyof HTMLElementEventMap, T
|
|
|
1882
1926
|
|
|
1883
1927
|
export declare function useFocusTrap(active?: boolean): (instance: HTMLElement | null) => void;
|
|
1884
1928
|
|
|
1885
|
-
export declare function useForm<T extends FieldValues = FieldValues>(schema: z.ZodType<T>, options?: Partial<UseFormProps<T>>): UseFormReturn<T, any, T>;
|
|
1886
|
-
|
|
1887
|
-
export declare const useFormField: () => {
|
|
1888
|
-
invalid: boolean;
|
|
1889
|
-
isDirty: boolean;
|
|
1890
|
-
isTouched: boolean;
|
|
1891
|
-
isValidating: boolean;
|
|
1892
|
-
error?: FieldError;
|
|
1893
|
-
id: string;
|
|
1894
|
-
name: string;
|
|
1895
|
-
formItemId: string;
|
|
1896
|
-
formDescriptionId: string;
|
|
1897
|
-
formMessageId: string;
|
|
1898
|
-
};
|
|
1899
|
-
|
|
1900
1929
|
export declare function useHotkey(keys: string | string[], handler: (event: KeyboardEvent) => void, options?: HotkeyOptions): RefObject<any>;
|
|
1901
1930
|
|
|
1902
1931
|
export declare function useHover<T extends HTMLElement>(options?: UseHoverOptions): {
|