@boxcustodia/library 1.10.0 → 2.0.0-alpha.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.cjs.js +88 -79
- package/dist/index.d.ts +349 -218
- package/dist/index.es.js +27222 -20871
- package/dist/theme.css +43 -28
- package/package.json +16 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';
|
|
1
2
|
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { CheckboxGroup as CheckboxGroup_2 } from '@base-ui/react/checkbox-group';
|
|
4
|
+
import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
|
|
2
5
|
import { ClassNameValue } from 'tailwind-merge';
|
|
3
6
|
import { ClassProp } from 'class-variance-authority/types';
|
|
4
7
|
import { ClassValue } from 'clsx';
|
|
@@ -6,7 +9,6 @@ import { Collection } from 'react-aria-components';
|
|
|
6
9
|
import { Command } from 'cmdk';
|
|
7
10
|
import { ComponentProps } from 'react';
|
|
8
11
|
import { ComponentPropsWithoutRef } from 'react';
|
|
9
|
-
import { ComponentType } from 'react';
|
|
10
12
|
import { ControllerRenderProps } from 'react-hook-form';
|
|
11
13
|
import { CSSProperties } from 'react';
|
|
12
14
|
import { default as default_2 } from 'react';
|
|
@@ -22,14 +24,13 @@ import { FieldValues } from 'react-hook-form';
|
|
|
22
24
|
import { FormEvent } from 'react';
|
|
23
25
|
import { HTMLProps } from 'react';
|
|
24
26
|
import { JSX } from 'react/jsx-runtime';
|
|
25
|
-
import { JSXElementConstructor } from 'react';
|
|
26
27
|
import { ListIterateeCustom } from 'lodash';
|
|
27
28
|
import { LucideIcon } from 'lucide-react';
|
|
28
29
|
import { LucideProps } from 'lucide-react';
|
|
29
30
|
import { MutableRefObject } from 'react';
|
|
30
|
-
import { Omit as Omit_2 } from 'lodash';
|
|
31
31
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
32
32
|
import { Presence } from '@radix-ui/react-presence';
|
|
33
|
+
import { Progress as Progress_2 } from '@base-ui/react/progress';
|
|
33
34
|
import * as React_2 from 'react';
|
|
34
35
|
import { ReactElement } from 'react';
|
|
35
36
|
import { ReactNode } from 'react';
|
|
@@ -38,15 +39,21 @@ import { RefObject } from 'react';
|
|
|
38
39
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
39
40
|
import { SetStateAction } from 'react';
|
|
40
41
|
import { Slot } from '@radix-ui/react-slot';
|
|
41
|
-
import {
|
|
42
|
-
import
|
|
42
|
+
import { Switch as Switch_2 } from '@base-ui/react/switch';
|
|
43
|
+
import { ToastManager } from '@base-ui/react';
|
|
44
|
+
import { ToastManagerAddOptions as ToastManagerAddOptions_2 } from '@base-ui/react/toast';
|
|
45
|
+
import { ToastManagerPromiseOptions } from '@base-ui/react';
|
|
46
|
+
import { ToastManagerUpdateOptions } from '@base-ui/react';
|
|
47
|
+
import { ToastObject } from '@base-ui/react/toast';
|
|
48
|
+
import { Toast as ToastPrimitive } from '@base-ui/react/toast';
|
|
49
|
+
import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
|
|
43
50
|
import { TreeItemContent as TreeItemContent_2 } from 'react-aria-components';
|
|
44
51
|
import { TreeItemProps } from 'react-aria-components';
|
|
45
52
|
import { TreeProps } from 'react-aria-components';
|
|
46
|
-
import { UseBoundStore } from 'zustand';
|
|
47
53
|
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
48
54
|
import { UseFormProps } from 'react-hook-form';
|
|
49
55
|
import { UseFormReturn } from 'react-hook-form';
|
|
56
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
50
57
|
import { VariantProps } from 'class-variance-authority';
|
|
51
58
|
import { z } from 'zod';
|
|
52
59
|
|
|
@@ -74,6 +81,8 @@ declare type AlertDialogProps = React.ComponentPropsWithoutRef<typeof DialogRoot
|
|
|
74
81
|
|
|
75
82
|
export declare type ArrayUnion<V, T extends ReadonlyArray<V>> = T[number];
|
|
76
83
|
|
|
84
|
+
declare type ArrowProps = ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>;
|
|
85
|
+
|
|
77
86
|
declare interface AsyncState<T> {
|
|
78
87
|
loading: boolean;
|
|
79
88
|
error: Error | null;
|
|
@@ -106,18 +115,30 @@ export declare const AutoCompleteSeparator: ({ className, ...props }: React_2.Co
|
|
|
106
115
|
|
|
107
116
|
export declare const AutoCompleteShortcut: ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>) => JSX.Element;
|
|
108
117
|
|
|
109
|
-
export declare
|
|
118
|
+
export declare function Avatar({ src, alt, fallback, delay, shape, size, className, imageProps, fallbackProps, ...props }: AvatarProps): JSX.Element;
|
|
110
119
|
|
|
111
|
-
declare
|
|
112
|
-
|
|
120
|
+
export declare function AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props): JSX.Element;
|
|
121
|
+
|
|
122
|
+
export declare function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props): JSX.Element;
|
|
123
|
+
|
|
124
|
+
export { AvatarPrimitive }
|
|
125
|
+
|
|
126
|
+
declare interface AvatarProps extends Omit<AvatarPrimitive.Root.Props, "children"> {
|
|
127
|
+
src?: string;
|
|
113
128
|
alt: string;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
129
|
+
fallback?: ReactNode;
|
|
130
|
+
delay?: AvatarPrimitive.Fallback.Props["delay"];
|
|
131
|
+
shape?: VariantProps<typeof avatarVariants>["shape"];
|
|
132
|
+
size?: VariantProps<typeof avatarVariants>["size"];
|
|
133
|
+
imageProps?: AvatarPrimitive.Image.Props;
|
|
134
|
+
fallbackProps?: AvatarPrimitive.Fallback.Props;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export declare function AvatarRoot({ className, shape, size, ...props }: AvatarPrimitive.Root.Props & VariantProps<typeof avatarVariants>): JSX.Element;
|
|
117
138
|
|
|
118
139
|
declare const avatarVariants: (props?: ({
|
|
119
|
-
|
|
120
|
-
size?: "sm" | "lg" | "md" | null | undefined;
|
|
140
|
+
shape?: "circle" | "square" | null | undefined;
|
|
141
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | null | undefined;
|
|
121
142
|
} & ClassProp) | undefined) => string;
|
|
122
143
|
|
|
123
144
|
export declare const BackgroundImage: ({ src, ...props }: Props_4) => JSX.Element;
|
|
@@ -140,8 +161,10 @@ export declare const Button: (props: Props) => JSX.Element;
|
|
|
140
161
|
|
|
141
162
|
declare type ButtonProps = ComponentProps<typeof Button>;
|
|
142
163
|
|
|
164
|
+
declare type ButtonProps_2 = ComponentProps<typeof Button>;
|
|
165
|
+
|
|
143
166
|
declare const buttonVariants: (props?: ({
|
|
144
|
-
variant?: "default" | "link" | "
|
|
167
|
+
variant?: "default" | "link" | "success" | "error" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
145
168
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
146
169
|
shape?: "rounded" | "circle" | "square" | null | undefined;
|
|
147
170
|
} & ClassProp) | undefined) => string;
|
|
@@ -212,9 +235,27 @@ export declare const CardHeader: ({ className, ...props }: default_2.HTMLAttribu
|
|
|
212
235
|
|
|
213
236
|
export declare const CardTitle: ({ className, ...props }: default_2.HTMLAttributes<HTMLHeadingElement>) => JSX.Element;
|
|
214
237
|
|
|
215
|
-
export declare const Center: ({ className, ...props }:
|
|
238
|
+
export declare const Center: ({ as: Tag, inline, className, ...props }: CenterProps) => JSX.Element;
|
|
239
|
+
|
|
240
|
+
declare interface CenterProps extends ComponentProps<"div"> {
|
|
241
|
+
as?: ElementType;
|
|
242
|
+
inline?: boolean;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export declare function Checkbox({ children, className, id, indicatorProps, ...props }: CheckboxProps): React_2.ReactElement;
|
|
246
|
+
|
|
247
|
+
export declare function CheckboxGroup({ className, ...props }: CheckboxGroup_2.Props): React_2.ReactElement;
|
|
248
|
+
|
|
249
|
+
export declare function CheckboxIndicator({ className, ...props }: CheckboxPrimitive.Indicator.Props): React_2.ReactElement;
|
|
250
|
+
|
|
251
|
+
export { CheckboxPrimitive }
|
|
252
|
+
|
|
253
|
+
declare interface CheckboxProps extends Omit<CheckboxPrimitive.Root.Props, "children"> {
|
|
254
|
+
children?: React_2.ReactNode;
|
|
255
|
+
indicatorProps?: CheckboxPrimitive.Indicator.Props;
|
|
256
|
+
}
|
|
216
257
|
|
|
217
|
-
export declare
|
|
258
|
+
export declare function CheckboxRoot({ className, ...props }: CheckboxPrimitive.Root.Props): React_2.ReactElement;
|
|
218
259
|
|
|
219
260
|
export declare type ClassName = string | undefined;
|
|
220
261
|
|
|
@@ -255,7 +296,7 @@ export declare type ColumnDef<T> = {
|
|
|
255
296
|
width?: string | number;
|
|
256
297
|
};
|
|
257
298
|
|
|
258
|
-
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, renderOption, commandProps, ...props }:
|
|
299
|
+
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, renderOption, commandProps, ...props }: Props_5<TItem>): JSX.Element;
|
|
259
300
|
|
|
260
301
|
declare type ContainerProps = React_2.ComponentProps<"div">;
|
|
261
302
|
|
|
@@ -273,11 +314,22 @@ declare type CopyFunction = (text: string) => Promise<boolean>;
|
|
|
273
314
|
|
|
274
315
|
export declare const createSafeContext: <T>() => readonly [() => T & ({} | undefined), default_2.Provider<T | null>];
|
|
275
316
|
|
|
317
|
+
export declare function createToastManager(): ToastManager<any> & {
|
|
318
|
+
close: (id?: string) => any;
|
|
319
|
+
add: (options: ToastManagerAddOptions<any>) => any;
|
|
320
|
+
update: (id: string, options: Partial<ToastManagerAddOptions<any>>) => any;
|
|
321
|
+
promise: <T>(promise: Promise<T>, options: {
|
|
322
|
+
loading: ToastManagerAddOptions<any>;
|
|
323
|
+
success: ToastManagerAddOptions<any> | ((data: T) => ToastManagerAddOptions<any>);
|
|
324
|
+
error: ToastManagerAddOptions<any> | ((error: Error) => ToastManagerAddOptions<any>);
|
|
325
|
+
}) => any;
|
|
326
|
+
};
|
|
327
|
+
|
|
276
328
|
export declare type DateMatcher = DateSingle | DateRange | DateMultiple;
|
|
277
329
|
|
|
278
330
|
export declare type DateMultiple = Date[];
|
|
279
331
|
|
|
280
|
-
export declare const DatePicker: (props:
|
|
332
|
+
export declare const DatePicker: (props: Props_7) => JSX.Element;
|
|
281
333
|
|
|
282
334
|
export declare type DatePickerFooterProps = {
|
|
283
335
|
mode: "single";
|
|
@@ -299,7 +351,7 @@ declare type DayProps = {
|
|
|
299
351
|
navigationDate: Date;
|
|
300
352
|
} & HTMLProps<HTMLButtonElement>;
|
|
301
353
|
|
|
302
|
-
export declare const Dialog: ({ trigger, title, description, children, footer, focus, triggerProps, headerProps, headerClassName, titleProps, titleClassName, descriptionProps, descriptionClassName, contentProps, contentClassName, footerProps, footerClassName, ...props }:
|
|
354
|
+
export declare const Dialog: ({ trigger, title, description, children, footer, focus, triggerProps, headerProps, headerClassName, titleProps, titleClassName, descriptionProps, descriptionClassName, contentProps, contentClassName, footerProps, footerClassName, ...props }: Props_8) => JSX.Element;
|
|
303
355
|
|
|
304
356
|
export declare const DialogClose: ({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Close>) => JSX.Element;
|
|
305
357
|
|
|
@@ -326,7 +378,7 @@ export declare const DialogTitle: ({ className, ...props }: React_2.ComponentPro
|
|
|
326
378
|
|
|
327
379
|
export declare const DialogTrigger: ({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Trigger>) => JSX.Element;
|
|
328
380
|
|
|
329
|
-
export declare const Divider: (props:
|
|
381
|
+
export declare const Divider: (props: Props_9) => JSX.Element;
|
|
330
382
|
|
|
331
383
|
export declare const DOTS = "...";
|
|
332
384
|
|
|
@@ -403,7 +455,7 @@ export declare type DropzoneProps = {
|
|
|
403
455
|
onError?: (fileErrors: FileError[]) => void;
|
|
404
456
|
} & Omit<ComponentPropsWithoutRef<"div">, "onDrop" | "onError">;
|
|
405
457
|
|
|
406
|
-
export declare const EmptyState: ({ icon, title, description, className, children, ...props }:
|
|
458
|
+
export declare const EmptyState: ({ icon, title, description, className, children, ...props }: Props_10) => JSX.Element;
|
|
407
459
|
|
|
408
460
|
export declare const ensureReactElement: <P>({ children, as: Wrapper, props, }: EnsureReactElementProps<P>) => ReactElement;
|
|
409
461
|
|
|
@@ -464,7 +516,7 @@ declare interface ExtendedProps_3 {
|
|
|
464
516
|
*/
|
|
465
517
|
export declare const extractInitials: (string: string) => string;
|
|
466
518
|
|
|
467
|
-
export declare const Field: ({ label, labelClassName, labelProps, error, errorClassName, errorProps, children, className, ...props }:
|
|
519
|
+
export declare const Field: ({ label, labelClassName, labelProps, error, errorClassName, errorProps, children, className, ...props }: Props_11) => JSX.Element;
|
|
468
520
|
|
|
469
521
|
declare type FileError = {
|
|
470
522
|
file: File;
|
|
@@ -504,7 +556,7 @@ export declare const FileTypeGroups: Record<string, FileTypeValue[]>;
|
|
|
504
556
|
|
|
505
557
|
export declare type FileTypeValue = (typeof FileType)[keyof typeof FileType];
|
|
506
558
|
|
|
507
|
-
export declare const Form: <TFieldValues extends FieldValues = FieldValues>({ onSubmit, id, form, children, className, }:
|
|
559
|
+
export declare const Form: <TFieldValues extends FieldValues = FieldValues>({ onSubmit, id, form, children, className, }: Props_12<TFieldValues>) => JSX.Element;
|
|
508
560
|
|
|
509
561
|
export declare const FormControl: ({ className, ...props }: React_2.ComponentProps<typeof Slot>) => JSX.Element;
|
|
510
562
|
|
|
@@ -547,7 +599,7 @@ declare type GenericObject_2 = Record<string, any>;
|
|
|
547
599
|
|
|
548
600
|
export declare const getFormData: (event: FormEvent<HTMLFormElement>) => Record<string, string>;
|
|
549
601
|
|
|
550
|
-
export declare const Heading: <C extends React.ElementType = "h2">({ className, size, weight, as, ...props }:
|
|
602
|
+
export declare const Heading: <C extends React.ElementType = "h2">({ className, size, weight, as, ...props }: Props_13<C>) => JSX.Element;
|
|
551
603
|
|
|
552
604
|
declare const HeadingVariants: (props?: ({
|
|
553
605
|
size?: "sm" | "lg" | "md" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | null | undefined;
|
|
@@ -565,7 +617,7 @@ declare type HotkeyOptions = {
|
|
|
565
617
|
|
|
566
618
|
export declare type ID = string | number;
|
|
567
619
|
|
|
568
|
-
export declare const Input: ({ value: prop, onChange, defaultValue: defaultProp, ...rest }:
|
|
620
|
+
export declare const Input: ({ value: prop, onChange, defaultValue: defaultProp, ...rest }: Props_14) => JSX.Element;
|
|
569
621
|
|
|
570
622
|
declare interface ItemTimeline {
|
|
571
623
|
content?: ReactNode;
|
|
@@ -574,33 +626,53 @@ declare interface ItemTimeline {
|
|
|
574
626
|
color?: string;
|
|
575
627
|
}
|
|
576
628
|
|
|
577
|
-
export declare
|
|
578
|
-
id: number | string;
|
|
579
|
-
title?: string;
|
|
580
|
-
description: ReactNode;
|
|
581
|
-
type: ToastType;
|
|
582
|
-
}
|
|
629
|
+
export declare function Kbd({ className, ...props }: React_2.ComponentProps<"kbd">): React_2.ReactElement;
|
|
583
630
|
|
|
584
|
-
export declare
|
|
631
|
+
export declare function KbdGroup({ className, ...props }: React_2.ComponentProps<"kbd">): React_2.ReactElement;
|
|
585
632
|
|
|
586
|
-
|
|
633
|
+
declare type Keys = string | string[];
|
|
587
634
|
|
|
588
|
-
declare
|
|
589
|
-
variant?: "default" | "error" | "outline" | "secondary" | null | undefined;
|
|
590
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
591
|
-
} & ClassProp) | undefined) => string;
|
|
635
|
+
export declare function Label({ className, render, required, tooltip, children, ...props }: LabelProps): default_2.ReactElement;
|
|
592
636
|
|
|
593
|
-
declare
|
|
637
|
+
declare interface LabelProps extends useRender.ComponentProps<"label"> {
|
|
638
|
+
required?: boolean;
|
|
639
|
+
tooltip?: default_2.ReactNode;
|
|
640
|
+
}
|
|
594
641
|
|
|
595
|
-
|
|
642
|
+
/**
|
|
643
|
+
* Single provider that wires up all library infrastructure.
|
|
644
|
+
* Wrap your app once — no other providers needed.
|
|
645
|
+
*
|
|
646
|
+
* Includes:
|
|
647
|
+
* - `TooltipProvider` — shared hover intent and delay grouping across all tooltips
|
|
648
|
+
* - `ToastProvider` — enables `toast.*` imperative API from anywhere
|
|
649
|
+
*
|
|
650
|
+
* @example
|
|
651
|
+
* ```tsx
|
|
652
|
+
* <LibraryProvider tooltipDelay={400}>
|
|
653
|
+
* <App />
|
|
654
|
+
* </LibraryProvider>
|
|
655
|
+
* ```
|
|
656
|
+
*/
|
|
657
|
+
export declare function LibraryProvider({ children, tooltipDelay, ...toastProps }: LibraryProviderProps): JSX.Element;
|
|
596
658
|
|
|
597
|
-
export declare
|
|
659
|
+
export declare type LibraryProviderProps = {
|
|
660
|
+
children: ReactNode;
|
|
661
|
+
/**
|
|
662
|
+
* Delay in ms before a tooltip opens when no other tooltip is already visible.
|
|
663
|
+
* Once a tooltip is open, subsequent ones open instantly until the cursor leaves.
|
|
664
|
+
* @default 600
|
|
665
|
+
*/
|
|
666
|
+
tooltipDelay?: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>["delay"];
|
|
667
|
+
} & Omit<ToastProviderProps, "children">;
|
|
668
|
+
|
|
669
|
+
export declare const Loader: ({ center, containerClassName, variant, size, ...props }: Props_15) => JSX.Element;
|
|
598
670
|
|
|
599
671
|
declare type LoaderVariants = VariantProps<typeof loaderVariants>;
|
|
600
672
|
|
|
601
673
|
declare const loaderVariants: (props?: ({
|
|
602
|
-
variant?: "error" | "
|
|
603
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
674
|
+
variant?: "success" | "error" | "warning" | "info" | "secondary" | "ghost" | "primary" | null | undefined;
|
|
675
|
+
size?: "default" | "sm" | "lg" | "xs" | "xl" | null | undefined;
|
|
604
676
|
} & ClassProp) | undefined) => string;
|
|
605
677
|
|
|
606
678
|
export declare type Loose<T> = T | (string & {});
|
|
@@ -785,7 +857,7 @@ declare type noop = (this: any, ...args: any[]) => any;
|
|
|
785
857
|
|
|
786
858
|
export declare type Nullable<T> = T | null;
|
|
787
859
|
|
|
788
|
-
export declare const NumberInput: ({ value: prop, onChange, defaultValue: defaultProp, className, min, max, ...props }:
|
|
860
|
+
export declare const NumberInput: ({ value: prop, onChange, defaultValue: defaultProp, className, min, max, ...props }: Props_16) => JSX.Element;
|
|
789
861
|
|
|
790
862
|
declare type OpenProps = {
|
|
791
863
|
open?: boolean;
|
|
@@ -804,15 +876,15 @@ export declare type OverrideProps<T, TOverridden> = Omit<T, keyof TOverridden> &
|
|
|
804
876
|
|
|
805
877
|
export declare type PageSize = (typeof TABLE_PAGE_SIZES)[number];
|
|
806
878
|
|
|
807
|
-
export declare const Pagination: ({ optionProps, className, containerProps, ...rangeProps }:
|
|
879
|
+
export declare const Pagination: ({ optionProps, className, containerProps, ...rangeProps }: Props_17) => JSX.Element;
|
|
808
880
|
|
|
809
881
|
declare interface PaginationOptionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
810
882
|
isActive?: boolean;
|
|
811
883
|
}
|
|
812
884
|
|
|
813
|
-
export declare const Password: ({ className, containerClassName, showIcon, hideIcon, onShow, onHide, toggleable, ...rest }:
|
|
885
|
+
export declare const Password: ({ className, containerClassName, showIcon, hideIcon, onShow, onHide, toggleable, ...rest }: Props_18) => JSX.Element;
|
|
814
886
|
|
|
815
|
-
export declare const Popover: (props:
|
|
887
|
+
export declare const Popover: (props: Props_19) => JSX.Element;
|
|
816
888
|
|
|
817
889
|
export declare const PopoverContent: ({ className, align, sideOffset, matchTriggerWidth, style, focus, ...props }: PopoverContentProps) => JSX.Element;
|
|
818
890
|
|
|
@@ -825,19 +897,44 @@ export declare const PopoverRoot: (props: React_2.ComponentProps<typeof PopoverP
|
|
|
825
897
|
|
|
826
898
|
export declare const PopoverTrigger: (props: React_2.ComponentProps<typeof PopoverPrimitive.Trigger>) => JSX.Element;
|
|
827
899
|
|
|
828
|
-
declare type
|
|
900
|
+
declare type PopupProps = ComponentPropsWithoutRef<typeof TooltipPrimitive.Popup>;
|
|
829
901
|
|
|
830
|
-
declare
|
|
831
|
-
|
|
832
|
-
} &
|
|
902
|
+
export declare function Progress({ size, variant, className, trackProps, indicatorProps, ...props }: ProgressProps): React_2.ReactElement;
|
|
903
|
+
|
|
904
|
+
export declare function ProgressIndicator({ className, variant, ...props }: Progress_2.Indicator.Props & VariantProps<typeof progressIndicatorVariants>): React_2.ReactElement;
|
|
905
|
+
|
|
906
|
+
declare const progressIndicatorVariants: (props?: ({
|
|
907
|
+
variant?: "default" | "success" | "error" | "warning" | "info" | null | undefined;
|
|
908
|
+
} & ClassProp) | undefined) => string;
|
|
833
909
|
|
|
834
|
-
declare
|
|
910
|
+
export declare function ProgressLabel({ className, ...props }: Progress_2.Label.Props): React_2.ReactElement;
|
|
911
|
+
|
|
912
|
+
declare interface ProgressProps extends Omit<Progress_2.Root.Props, "children"> {
|
|
913
|
+
size?: VariantProps<typeof progressTrackVariants>["size"];
|
|
914
|
+
variant?: VariantProps<typeof progressIndicatorVariants>["variant"];
|
|
915
|
+
trackProps?: Progress_2.Track.Props;
|
|
916
|
+
indicatorProps?: Progress_2.Indicator.Props;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
export declare function ProgressRoot({ className, ...props }: Progress_2.Root.Props): React_2.ReactElement;
|
|
920
|
+
|
|
921
|
+
export declare function ProgressTrack({ className, size, ...props }: Progress_2.Track.Props & VariantProps<typeof progressTrackVariants>): React_2.ReactElement;
|
|
922
|
+
|
|
923
|
+
declare const progressTrackVariants: (props?: ({
|
|
924
|
+
size?: "sm" | "lg" | "md" | null | undefined;
|
|
925
|
+
} & ClassProp) | undefined) => string;
|
|
926
|
+
|
|
927
|
+
export declare function ProgressValue({ className, ...props }: Progress_2.Value.Props): React_2.ReactElement;
|
|
928
|
+
|
|
929
|
+
declare type Props = BaseButtonProps & VariantProps<typeof buttonVariants>;
|
|
930
|
+
|
|
931
|
+
declare type Props_10 = ComponentPropsWithoutRef<"div"> & {
|
|
835
932
|
icon?: ReactNode;
|
|
836
933
|
title?: ReactNode;
|
|
837
934
|
description?: ReactNode;
|
|
838
935
|
};
|
|
839
936
|
|
|
840
|
-
declare interface
|
|
937
|
+
declare interface Props_11 extends ComponentProps<"div"> {
|
|
841
938
|
label?: ReactNode;
|
|
842
939
|
labelClassName?: string;
|
|
843
940
|
labelProps?: ComponentPropsWithoutRef<"label">;
|
|
@@ -846,7 +943,7 @@ declare interface Props_12 extends ComponentProps<"div"> {
|
|
|
846
943
|
errorProps?: ComponentPropsWithoutRef<"p">;
|
|
847
944
|
}
|
|
848
945
|
|
|
849
|
-
declare type
|
|
946
|
+
declare type Props_12<TFieldValues extends FieldValues> = {
|
|
850
947
|
onSubmit: (data: TFieldValues) => void;
|
|
851
948
|
form: UseFormReturn<TFieldValues, any, any>;
|
|
852
949
|
children: React_2.ReactNode;
|
|
@@ -854,11 +951,11 @@ declare type Props_13<TFieldValues extends FieldValues> = {
|
|
|
854
951
|
id?: string;
|
|
855
952
|
};
|
|
856
953
|
|
|
857
|
-
declare type
|
|
954
|
+
declare type Props_13<C extends React.ElementType> = VariantProps<typeof HeadingVariants> & {
|
|
858
955
|
as?: C;
|
|
859
956
|
} & Omit<React.ComponentPropsWithoutRef<C>, "as">;
|
|
860
957
|
|
|
861
|
-
declare type
|
|
958
|
+
declare type Props_14 = OverrideProps<ComponentProps<"input">, {
|
|
862
959
|
/** valor del input */
|
|
863
960
|
value?: string;
|
|
864
961
|
/** functión a ejecutar cuando el valor cambia */
|
|
@@ -867,16 +964,12 @@ declare type Props_15 = OverrideProps<ComponentProps<"input">, {
|
|
|
867
964
|
defaultValue?: string;
|
|
868
965
|
}>;
|
|
869
966
|
|
|
870
|
-
declare type
|
|
871
|
-
|
|
872
|
-
declare type Props_17 = React_2.ComponentProps<"label">;
|
|
873
|
-
|
|
874
|
-
declare type Props_18 = LucideProps & LoaderVariants & {
|
|
967
|
+
declare type Props_15 = LucideProps & LoaderVariants & {
|
|
875
968
|
center?: boolean;
|
|
876
969
|
containerClassName?: string;
|
|
877
970
|
};
|
|
878
971
|
|
|
879
|
-
declare type
|
|
972
|
+
declare type Props_16 = OverrideProps<ComponentProps<"input">, {
|
|
880
973
|
/** valor del input */
|
|
881
974
|
value?: number;
|
|
882
975
|
/** functión a ejecutar cuando el valor cambia */
|
|
@@ -889,22 +982,13 @@ declare type Props_19 = OverrideProps<ComponentProps<"input">, {
|
|
|
889
982
|
max?: number;
|
|
890
983
|
}>;
|
|
891
984
|
|
|
892
|
-
declare interface
|
|
893
|
-
asChild?: boolean;
|
|
894
|
-
loading?: boolean;
|
|
895
|
-
showLoader?: boolean;
|
|
896
|
-
icon?: ReactNode;
|
|
897
|
-
iconPosition?: "start" | "end";
|
|
898
|
-
loaderReplace?: true;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
declare interface Props_20 extends useRangePaginationProps {
|
|
985
|
+
declare interface Props_17 extends useRangePaginationProps {
|
|
902
986
|
optionProps?: PaginationOptionProps;
|
|
903
987
|
className?: string;
|
|
904
988
|
containerProps?: HTMLProps<HTMLDivElement>;
|
|
905
989
|
}
|
|
906
990
|
|
|
907
|
-
declare type
|
|
991
|
+
declare type Props_18 = OverrideProps<ComponentProps<typeof Input>, {
|
|
908
992
|
/** Clase CSS para el contenedor */
|
|
909
993
|
containerClassName?: string;
|
|
910
994
|
/** Ícono para mostrar la contraseña */
|
|
@@ -919,7 +1003,7 @@ declare type Props_21 = OverrideProps<ComponentProps<typeof Input>, {
|
|
|
919
1003
|
toggleable?: boolean;
|
|
920
1004
|
}>;
|
|
921
1005
|
|
|
922
|
-
declare interface
|
|
1006
|
+
declare interface Props_19 {
|
|
923
1007
|
trigger?: ReactNode;
|
|
924
1008
|
children: ReactNode;
|
|
925
1009
|
rootProps?: ComponentPropsWithoutRef<typeof PopoverRoot>;
|
|
@@ -933,39 +1017,21 @@ declare interface Props_22 {
|
|
|
933
1017
|
offset?: ComponentPropsWithoutRef<typeof PopoverContent>["sideOffset"];
|
|
934
1018
|
}
|
|
935
1019
|
|
|
936
|
-
declare interface
|
|
937
|
-
|
|
938
|
-
|
|
1020
|
+
declare interface Props_2 extends ComponentProps<"button"> {
|
|
1021
|
+
asChild?: boolean;
|
|
1022
|
+
loading?: boolean;
|
|
1023
|
+
showLoader?: boolean;
|
|
1024
|
+
icon?: ReactNode;
|
|
1025
|
+
iconPosition?: "start" | "end";
|
|
1026
|
+
loaderReplace?: true;
|
|
939
1027
|
}
|
|
940
1028
|
|
|
941
|
-
declare interface
|
|
942
|
-
/**
|
|
943
|
-
|
|
944
|
-
*/
|
|
945
|
-
isCircle?: boolean;
|
|
946
|
-
/**
|
|
947
|
-
* Ancho del componente
|
|
948
|
-
*/
|
|
949
|
-
width?: string;
|
|
950
|
-
/**
|
|
951
|
-
* Alto del componente
|
|
952
|
-
*/
|
|
953
|
-
height?: string;
|
|
954
|
-
/**
|
|
955
|
-
* Determina si el skeleton es visible
|
|
956
|
-
*/
|
|
957
|
-
isLoading?: boolean;
|
|
1029
|
+
declare interface Props_20 extends ComponentPropsWithoutRef<typeof Slot> {
|
|
1030
|
+
/** Si el componente está presente o no */
|
|
1031
|
+
when: ComponentProps<typeof Presence>["present"];
|
|
958
1032
|
}
|
|
959
1033
|
|
|
960
|
-
declare type
|
|
961
|
-
checked?: boolean;
|
|
962
|
-
onChange?: (value: boolean) => void;
|
|
963
|
-
defaultChecked?: boolean;
|
|
964
|
-
containerClassName?: string;
|
|
965
|
-
containerProps?: Omit<ComponentProps<"div">, "className">;
|
|
966
|
-
}>;
|
|
967
|
-
|
|
968
|
-
declare type Props_26<T> = {
|
|
1034
|
+
declare type Props_21<T> = {
|
|
969
1035
|
data: T[];
|
|
970
1036
|
columns: ColumnDef<T>[];
|
|
971
1037
|
onRowClick?: (row: T) => void;
|
|
@@ -973,20 +1039,21 @@ declare type Props_26<T> = {
|
|
|
973
1039
|
selected?: (row: T) => boolean;
|
|
974
1040
|
} & ExtendedProps_3 & Omit<ComponentPropsWithoutRef<typeof TableRoot>, "data" | "selected" | "onDoubleClick">;
|
|
975
1041
|
|
|
976
|
-
declare type
|
|
1042
|
+
declare type Props_22 = {
|
|
977
1043
|
setPageSize?: (value: PageSize) => void;
|
|
978
1044
|
pageSize?: PageSize;
|
|
979
1045
|
} & Omit<usePaginationProps, "pageSize"> & TablePaginationExtendedProps;
|
|
980
1046
|
|
|
981
|
-
declare type
|
|
1047
|
+
declare type Props_23 = ClosableProps | NonClosableProps;
|
|
982
1048
|
|
|
983
|
-
declare type
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1049
|
+
declare type Props_24<T extends TreeNode> = TreeRootProps & {
|
|
1050
|
+
items: T[];
|
|
1051
|
+
};
|
|
1052
|
+
|
|
1053
|
+
declare interface Props_25<T> extends UseAsyncOptions<T> {
|
|
1054
|
+
fn: () => Promise<T>;
|
|
1055
|
+
dependencies?: DependencyList;
|
|
1056
|
+
}
|
|
990
1057
|
|
|
991
1058
|
declare interface Props_3 extends ExtendedProps {
|
|
992
1059
|
items: AutoCompleteItem[];
|
|
@@ -995,28 +1062,6 @@ declare interface Props_3 extends ExtendedProps {
|
|
|
995
1062
|
onSelect?: (value: AutoCompleteItem["value"], item: AutoCompleteItem) => any;
|
|
996
1063
|
}
|
|
997
1064
|
|
|
998
|
-
declare type Props_30 = ComponentProps<typeof TooltipTrigger> & {
|
|
999
|
-
/**
|
|
1000
|
-
* El texto que aparecera en el tooltip
|
|
1001
|
-
*/
|
|
1002
|
-
label: ReactNode;
|
|
1003
|
-
open?: boolean;
|
|
1004
|
-
defaultOpen?: boolean;
|
|
1005
|
-
onOpenChange?: (open: boolean) => any;
|
|
1006
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
1007
|
-
offset?: ComponentPropsWithoutRef<typeof TooltipContent>["sideOffset"];
|
|
1008
|
-
arrowClassName?: string;
|
|
1009
|
-
};
|
|
1010
|
-
|
|
1011
|
-
declare type Props_31<T extends TreeNode> = TreeRootProps & {
|
|
1012
|
-
items: T[];
|
|
1013
|
-
};
|
|
1014
|
-
|
|
1015
|
-
declare interface Props_32<T> extends UseAsyncOptions<T> {
|
|
1016
|
-
fn: () => Promise<T>;
|
|
1017
|
-
dependencies?: DependencyList;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
1065
|
declare interface Props_4 extends HTMLProps<HTMLDivElement> {
|
|
1021
1066
|
/**
|
|
1022
1067
|
* La URL de la imagen
|
|
@@ -1024,42 +1069,12 @@ declare interface Props_4 extends HTMLProps<HTMLDivElement> {
|
|
|
1024
1069
|
src: string;
|
|
1025
1070
|
}
|
|
1026
1071
|
|
|
1027
|
-
declare type Props_5
|
|
1028
|
-
/**
|
|
1029
|
-
* Valor controlado del checkbox.
|
|
1030
|
-
*/
|
|
1031
|
-
checked?: boolean;
|
|
1032
|
-
/**
|
|
1033
|
-
* Función que se ejecuta cuando el valor del checkbox cambia.
|
|
1034
|
-
*/
|
|
1035
|
-
onChange?: (value: boolean) => void;
|
|
1036
|
-
/**
|
|
1037
|
-
* Valor por defecto del checkbox.
|
|
1038
|
-
*/
|
|
1039
|
-
defaultChecked?: boolean;
|
|
1040
|
-
/**
|
|
1041
|
-
* Estado indeterminado controlado del checkbox.
|
|
1042
|
-
*/
|
|
1043
|
-
indeterminate?: boolean;
|
|
1044
|
-
/**
|
|
1045
|
-
* Valor por defecto del estado indeterminado.
|
|
1046
|
-
*/
|
|
1047
|
-
defaultIndeterminate?: boolean;
|
|
1048
|
-
/**
|
|
1049
|
-
* Función que se ejecuta cuando el estado indeterminado cambia.
|
|
1050
|
-
*/
|
|
1051
|
-
onIndeterminateChange?: (value: boolean) => void;
|
|
1052
|
-
size?: string | number;
|
|
1053
|
-
containerClassName?: string;
|
|
1054
|
-
containerProps?: Omit<ComponentProps<"div">, "className">;
|
|
1055
|
-
}>;
|
|
1056
|
-
|
|
1057
|
-
declare type Props_6<TItem extends Record<string, any>> = {
|
|
1072
|
+
declare type Props_5<TItem extends Record<string, any>> = {
|
|
1058
1073
|
emptyMessage?: string;
|
|
1059
1074
|
commandProps?: ComponentProps<typeof AutoCompleteRoot>;
|
|
1060
1075
|
} & SearchProps & SelectProps<TItem>;
|
|
1061
1076
|
|
|
1062
|
-
declare type
|
|
1077
|
+
declare type Props_6<TItem extends Record<string, any>> = OverrideProps<ComponentProps<typeof SelectRoot> & Omit<ControllableState<string>, "onChange">, {
|
|
1063
1078
|
onChange?: (value: string, item: TItem) => void;
|
|
1064
1079
|
/**
|
|
1065
1080
|
* Listado de elementos a mostrar
|
|
@@ -1090,7 +1105,7 @@ declare type Props_7<TItem extends Record<string, any>> = OverrideProps<Componen
|
|
|
1090
1105
|
placeholder?: string;
|
|
1091
1106
|
}>;
|
|
1092
1107
|
|
|
1093
|
-
declare type
|
|
1108
|
+
declare type Props_7 = ComponentProps<"input"> & {
|
|
1094
1109
|
value?: Date | null;
|
|
1095
1110
|
defaultValue?: Date | null;
|
|
1096
1111
|
onChange?: (value: Date | null) => void;
|
|
@@ -1099,7 +1114,7 @@ declare type Props_8 = ComponentProps<"input"> & {
|
|
|
1099
1114
|
renderFooter?: (props: DatePickerFooterProps) => ReactNode;
|
|
1100
1115
|
};
|
|
1101
1116
|
|
|
1102
|
-
declare type
|
|
1117
|
+
declare type Props_8 = ComponentPropsWithoutRef<typeof DialogRoot> & ExtendedProps_2 & {
|
|
1103
1118
|
trigger?: ReactNode;
|
|
1104
1119
|
title?: ReactNode;
|
|
1105
1120
|
description?: ReactNode;
|
|
@@ -1108,8 +1123,14 @@ declare type Props_9 = ComponentPropsWithoutRef<typeof DialogRoot> & ExtendedPro
|
|
|
1108
1123
|
focus?: boolean;
|
|
1109
1124
|
};
|
|
1110
1125
|
|
|
1126
|
+
declare type Props_9 = {
|
|
1127
|
+
orientation?: "horizontal" | "vertical";
|
|
1128
|
+
} & HTMLProps<HTMLHRElement>;
|
|
1129
|
+
|
|
1111
1130
|
declare type PropsWithoutValue<T> = Omit<T, "value" | "onChange" | "defaultValue">;
|
|
1112
1131
|
|
|
1132
|
+
declare type ProviderProps = ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>;
|
|
1133
|
+
|
|
1113
1134
|
export declare type RangeDateValue = {
|
|
1114
1135
|
value?: DateRange;
|
|
1115
1136
|
defaultValue?: DateRange;
|
|
@@ -1187,6 +1208,8 @@ declare interface Return_3<T = ReactNode> {
|
|
|
1187
1208
|
|
|
1188
1209
|
declare type Return_4 = [boolean, (newValue?: boolean) => void];
|
|
1189
1210
|
|
|
1211
|
+
declare type RootProps = ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>;
|
|
1212
|
+
|
|
1190
1213
|
export declare type SafeOmit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
1191
1214
|
|
|
1192
1215
|
declare interface SearchProps {
|
|
@@ -1197,7 +1220,7 @@ declare interface SearchProps {
|
|
|
1197
1220
|
searchPlaceholder?: string;
|
|
1198
1221
|
}
|
|
1199
1222
|
|
|
1200
|
-
export declare const Select: <TItem extends Record<string, any> = Option_2>({ items, valueKey, labelKey, value: prop, onChange, defaultValue: defaultProp, renderOption, triggerProps, contentClassName, contentProps, itemClassName, itemProps, className, placeholder, ...props }:
|
|
1223
|
+
export declare const Select: <TItem extends Record<string, any> = Option_2>({ items, valueKey, labelKey, value: prop, onChange, defaultValue: defaultProp, renderOption, triggerProps, contentClassName, contentProps, itemClassName, itemProps, className, placeholder, ...props }: Props_6<TItem>) => JSX.Element;
|
|
1201
1224
|
|
|
1202
1225
|
export declare const SelectContent: ({ className, children, position, ...props }: SelectContentProps) => JSX.Element;
|
|
1203
1226
|
|
|
@@ -1247,7 +1270,7 @@ declare type Shortcut = Partial<{
|
|
|
1247
1270
|
shortcutOptions: MenuShortcutProps_2["options"];
|
|
1248
1271
|
}>;
|
|
1249
1272
|
|
|
1250
|
-
export declare const Show: ({ when, ...props }:
|
|
1273
|
+
export declare const Show: ({ when, ...props }: Props_20) => JSX.Element;
|
|
1251
1274
|
|
|
1252
1275
|
export declare type SingleDateValue = {
|
|
1253
1276
|
value?: DateSingle;
|
|
@@ -1255,16 +1278,20 @@ export declare type SingleDateValue = {
|
|
|
1255
1278
|
onChange?: (date: DateSingle) => void;
|
|
1256
1279
|
};
|
|
1257
1280
|
|
|
1258
|
-
export declare
|
|
1281
|
+
export declare function Skeleton({ className, ...props }: ComponentProps<"div">): JSX.Element;
|
|
1259
1282
|
|
|
1260
|
-
export declare const Stack: ({ inline, justify, align,
|
|
1283
|
+
export declare const Stack: ({ as: Tag, inline, direction, reverse, justify, align, gap, wrap, grow, className, style, ...props }: StackProps) => JSX.Element;
|
|
1261
1284
|
|
|
1262
1285
|
declare interface StackProps extends ComponentProps<"div"> {
|
|
1286
|
+
as?: ElementType;
|
|
1263
1287
|
inline?: boolean;
|
|
1288
|
+
direction?: "horizontal" | "vertical";
|
|
1289
|
+
reverse?: boolean;
|
|
1264
1290
|
justify?: CSSProperties["justifyContent"];
|
|
1265
1291
|
align?: CSSProperties["alignItems"];
|
|
1266
|
-
direction?: "horizontal" | "vertical";
|
|
1267
1292
|
gap?: CSSProperties["gap"];
|
|
1293
|
+
wrap?: CSSProperties["flexWrap"];
|
|
1294
|
+
grow?: boolean;
|
|
1268
1295
|
}
|
|
1269
1296
|
|
|
1270
1297
|
export declare type State<T> = [T, SetState<T>];
|
|
@@ -1323,7 +1350,16 @@ declare interface StepperTriggerProps {
|
|
|
1323
1350
|
|
|
1324
1351
|
declare type StyleProps = ColorProps | VariantProps_2;
|
|
1325
1352
|
|
|
1326
|
-
export declare
|
|
1353
|
+
export declare function Switch({ children, className, id, thumbProps, ...props }: SwitchProps): React_2.ReactElement;
|
|
1354
|
+
|
|
1355
|
+
declare interface SwitchProps extends Omit<Switch_2.Root.Props, "children"> {
|
|
1356
|
+
children?: React_2.ReactNode;
|
|
1357
|
+
thumbProps?: Switch_2.Thumb.Props;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
export declare function SwitchRoot({ className, ...props }: Switch_2.Root.Props): React_2.ReactElement;
|
|
1361
|
+
|
|
1362
|
+
export declare function SwitchThumb({ className, ...props }: Switch_2.Thumb.Props): React_2.ReactElement;
|
|
1327
1363
|
|
|
1328
1364
|
export declare const TabContent: ({ value, ...props }: TabContentProps) => JSX.Element | null;
|
|
1329
1365
|
|
|
@@ -1331,7 +1367,7 @@ export declare interface TabContentProps extends HTMLProps<HTMLDivElement> {
|
|
|
1331
1367
|
value: string;
|
|
1332
1368
|
}
|
|
1333
1369
|
|
|
1334
|
-
export declare const Table: <T>({ data, columns, onRowClick, onDoubleClick, selected, theadClassName, theadProps, tbodyClassName, tbodyProps, trClassName, trProps, thClassName, thProps, tdClassName, tdProps, ...tableProps }:
|
|
1370
|
+
export declare const Table: <T>({ data, columns, onRowClick, onDoubleClick, selected, theadClassName, theadProps, tbodyClassName, tbodyProps, trClassName, trProps, thClassName, thProps, tdClassName, tdProps, ...tableProps }: Props_21<T>) => JSX.Element;
|
|
1335
1371
|
|
|
1336
1372
|
export declare const TABLE_PAGE_SIZES: number[];
|
|
1337
1373
|
|
|
@@ -1359,7 +1395,7 @@ declare type TableHeaderProps = React_2.ComponentProps<"thead">;
|
|
|
1359
1395
|
|
|
1360
1396
|
declare type TableHeadProps = React_2.ComponentProps<"th">;
|
|
1361
1397
|
|
|
1362
|
-
export declare const TablePagination: ({ containerClassName, containerProps, selectClassName, selectProps, sizes, ...props }:
|
|
1398
|
+
export declare const TablePagination: ({ containerClassName, containerProps, selectClassName, selectProps, sizes, ...props }: Props_22) => JSX.Element;
|
|
1363
1399
|
|
|
1364
1400
|
declare interface TablePaginationExtendedProps {
|
|
1365
1401
|
containerClassName?: ClassName;
|
|
@@ -1414,13 +1450,13 @@ export declare interface TabTriggerProps extends Omit<HTMLProps<HTMLButtonElemen
|
|
|
1414
1450
|
value: string;
|
|
1415
1451
|
}
|
|
1416
1452
|
|
|
1417
|
-
export declare const Tag: ({ className, color, variant, rounded, icon, closable, onClose, children, ...props }:
|
|
1453
|
+
export declare const Tag: ({ className, color, variant, rounded, icon, closable, onClose, children, ...props }: Props_23) => JSX.Element;
|
|
1418
1454
|
|
|
1419
1455
|
export declare type TagVariant = VariantProps<typeof tagVariants>;
|
|
1420
1456
|
|
|
1421
1457
|
export declare const tagVariants: (props?: ({
|
|
1422
1458
|
rounded?: "default" | "square" | "full" | null | undefined;
|
|
1423
|
-
variant?: "
|
|
1459
|
+
variant?: "success" | "error" | "outline" | "secondary" | "primary" | "borderless" | null | undefined;
|
|
1424
1460
|
} & ClassProp) | undefined) => string;
|
|
1425
1461
|
|
|
1426
1462
|
export declare const Textarea: ({ className, ...props }: TextAreaProps) => JSX.Element;
|
|
@@ -1432,7 +1468,6 @@ declare type TextAreaProps = Omit<HTMLProps<HTMLTextAreaElement>, "onChange"> &
|
|
|
1432
1468
|
export declare type Theme = {
|
|
1433
1469
|
Button?: ThemeProps<ComponentProps<typeof Button>, "asChild" | "loading">;
|
|
1434
1470
|
Input?: Partial<PropsWithoutValue<ComponentProps<typeof Input>>>;
|
|
1435
|
-
Tooltip?: ThemeProps<ComponentProps<typeof Tooltip>, "label" | "open" | "defaultOpen" | "onOpenChange">;
|
|
1436
1471
|
Popover?: ThemeProps<ComponentProps<typeof Popover>, "open" | "defaultOpen" | "onOpenChange" | "trigger">;
|
|
1437
1472
|
};
|
|
1438
1473
|
|
|
@@ -1485,60 +1520,144 @@ declare interface TimelineProps {
|
|
|
1485
1520
|
|
|
1486
1521
|
export declare const TimelineRoot: (props: HTMLProps<HTMLUListElement>) => JSX.Element;
|
|
1487
1522
|
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1523
|
+
/**
|
|
1524
|
+
* Imperative toast API. Works anywhere — no hook needed.
|
|
1525
|
+
*
|
|
1526
|
+
* Requires `<ToastProvider>` somewhere in the tree (no extra props needed).
|
|
1527
|
+
*
|
|
1528
|
+
* @example
|
|
1529
|
+
* ```ts
|
|
1530
|
+
* toast("Notificación"); // default variant
|
|
1531
|
+
* toast.success("Guardado correctamente");
|
|
1532
|
+
* toast.error({ title: "Error", description: "Algo salió mal" });
|
|
1533
|
+
* toast.promise(saveData(), {
|
|
1534
|
+
* loading: { description: "Guardando..." },
|
|
1535
|
+
* success: () => ({ variant: "success", description: "Guardado!" }),
|
|
1536
|
+
* error: (e) => ({ variant: "error", description: e.message }),
|
|
1537
|
+
* });
|
|
1538
|
+
* ```
|
|
1539
|
+
*/
|
|
1540
|
+
export declare const toast: ((arg: ToastArg) => string | undefined) & {
|
|
1541
|
+
success: (arg: ToastArg) => any;
|
|
1542
|
+
error: (arg: ToastArg) => any;
|
|
1543
|
+
warning: (arg: ToastArg) => any;
|
|
1544
|
+
info: (arg: ToastArg) => any;
|
|
1545
|
+
promise: <T>(promise: Promise<T>, options: {
|
|
1546
|
+
loading: ToastManagerAddOptions<any>;
|
|
1547
|
+
success: ToastManagerAddOptions<any> | ((data: T) => ToastManagerAddOptions<any>);
|
|
1548
|
+
error: ToastManagerAddOptions<any> | ((error: Error) => ToastManagerAddOptions<any>);
|
|
1549
|
+
}) => any;
|
|
1495
1550
|
};
|
|
1496
1551
|
|
|
1497
|
-
|
|
1552
|
+
declare type ToastArg = string | Omit<ToastManagerAddOptions<any>, "variant">;
|
|
1498
1553
|
|
|
1499
|
-
export declare
|
|
1554
|
+
export declare type ToastManagerAddOptions<Data extends object = object> = ToastManagerAddOptions_2<Data> & ToastOptionsBase;
|
|
1500
1555
|
|
|
1501
|
-
export declare type
|
|
1502
|
-
|
|
1556
|
+
export declare type ToastOptions<Data extends object = object> = ToastObject<Data> & ToastOptionsBase;
|
|
1557
|
+
|
|
1558
|
+
declare type ToastOptionsBase = {
|
|
1559
|
+
variant?: ToastVariant;
|
|
1560
|
+
content?: ReactNode;
|
|
1561
|
+
actions?: ButtonProps_2[];
|
|
1562
|
+
bump?: boolean;
|
|
1503
1563
|
};
|
|
1504
1564
|
|
|
1505
|
-
export
|
|
1565
|
+
export { ToastPrimitive }
|
|
1506
1566
|
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1567
|
+
/**
|
|
1568
|
+
* ToastProvider — wrap your app once to enable toast notifications.
|
|
1569
|
+
*
|
|
1570
|
+
* Toasts stack in the bottom-right corner with swipe-to-dismiss and expand-on-hover.
|
|
1571
|
+
* Once mounted, call `toast.success()` / `toast.error()` etc. from anywhere.
|
|
1572
|
+
*
|
|
1573
|
+
* @example
|
|
1574
|
+
* ```tsx
|
|
1575
|
+
* // app.tsx — one-time setup, no extra props needed
|
|
1576
|
+
* <ToastProvider>
|
|
1577
|
+
* <App />
|
|
1578
|
+
* </ToastProvider>
|
|
1579
|
+
*
|
|
1580
|
+
* // Anywhere in the codebase
|
|
1581
|
+
* import { toast } from "@boxcustodia/library";
|
|
1582
|
+
* toast.success("Cambios guardados");
|
|
1583
|
+
* toast.error({ title: "Error", description: "Algo salió mal" });
|
|
1584
|
+
* ```
|
|
1585
|
+
*/
|
|
1586
|
+
export declare function ToastProvider({ children, toastManager, container }: ToastProviderProps): JSX.Element;
|
|
1516
1587
|
|
|
1517
|
-
declare interface
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1588
|
+
export declare interface ToastProviderProps {
|
|
1589
|
+
children: ReactNode;
|
|
1590
|
+
/**
|
|
1591
|
+
* External toast manager created with `createToastManager()`.
|
|
1592
|
+
* Only needed for isolated instances (tests, microfrontends).
|
|
1593
|
+
* The default `<ToastProvider>` (no props) is all you need for `toast.*` to work.
|
|
1594
|
+
*/
|
|
1595
|
+
toastManager?: ReturnType<typeof ToastPrimitive.createToastManager>;
|
|
1596
|
+
/**
|
|
1597
|
+
* Container element for the portal.
|
|
1598
|
+
* @default document.body
|
|
1599
|
+
*/
|
|
1600
|
+
container?: HTMLElement | null;
|
|
1525
1601
|
}
|
|
1526
1602
|
|
|
1527
|
-
export declare type
|
|
1603
|
+
export declare type ToastVariant = "default" | "success" | "error" | "warning" | "info";
|
|
1528
1604
|
|
|
1529
|
-
export declare
|
|
1605
|
+
export declare function toastVariants({ variant }?: {
|
|
1606
|
+
variant?: ToastVariant;
|
|
1607
|
+
}): string;
|
|
1530
1608
|
|
|
1531
|
-
|
|
1609
|
+
/**
|
|
1610
|
+
* Accessible popup that shows additional information on hover/focus.
|
|
1611
|
+
* Wrap your app or section with `<TooltipProvider>` to enable delay grouping.
|
|
1612
|
+
*
|
|
1613
|
+
* @example
|
|
1614
|
+
* ```tsx
|
|
1615
|
+
* <Tooltip content="Save changes">
|
|
1616
|
+
* <Button>Save</Button>
|
|
1617
|
+
* </Tooltip>
|
|
1618
|
+
* ```
|
|
1619
|
+
*/
|
|
1620
|
+
export declare function Tooltip({ content, children, open, defaultOpen, onOpenChange, side, align, offset, delay, closeDelay, className, arrowClassName, }: TooltipProps): JSX.Element;
|
|
1621
|
+
|
|
1622
|
+
export declare function TooltipArrow({ className, ...props }: ArrowProps): JSX.Element;
|
|
1623
|
+
|
|
1624
|
+
export declare function TooltipPopup({ className, ...props }: PopupProps): JSX.Element;
|
|
1625
|
+
|
|
1626
|
+
export { TooltipPrimitive }
|
|
1627
|
+
|
|
1628
|
+
export declare type TooltipProps = Omit<RootProps, "children"> & {
|
|
1629
|
+
/** The element that triggers the tooltip on hover/focus. */
|
|
1630
|
+
children: ReactElement;
|
|
1631
|
+
/** Content displayed inside the tooltip popup. */
|
|
1632
|
+
content: ReactNode;
|
|
1633
|
+
/** Preferred side of the trigger to render the tooltip. @default "top" */
|
|
1634
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
1635
|
+
/** Alignment on the axis perpendicular to `side`. @default "center" */
|
|
1636
|
+
align?: "start" | "center" | "end";
|
|
1637
|
+
/** Distance in pixels between the tooltip and the trigger. @default 10 */
|
|
1638
|
+
offset?: number;
|
|
1639
|
+
/** Delay in ms before the tooltip opens. @default 600 */
|
|
1640
|
+
delay?: TriggerProps["delay"];
|
|
1641
|
+
/** Delay in ms before the tooltip closes. @default 0 */
|
|
1642
|
+
closeDelay?: TriggerProps["closeDelay"];
|
|
1643
|
+
/** Additional classes applied to the tooltip popup. */
|
|
1644
|
+
className?: string;
|
|
1645
|
+
/**
|
|
1646
|
+
* Additional classes applied to the arrow.
|
|
1647
|
+
* Pass a `text-*` class to change the arrow color when overriding the popup background.
|
|
1648
|
+
* @example arrowClassName="text-primary"
|
|
1649
|
+
*/
|
|
1532
1650
|
arrowClassName?: string;
|
|
1533
|
-
}
|
|
1651
|
+
};
|
|
1534
1652
|
|
|
1535
|
-
|
|
1653
|
+
/** Enables shared hover intent and delay grouping across multiple tooltips. */
|
|
1654
|
+
export declare function TooltipProvider(props: ProviderProps): JSX.Element;
|
|
1536
1655
|
|
|
1537
|
-
export declare
|
|
1656
|
+
export declare function TooltipRoot(props: RootProps): JSX.Element;
|
|
1538
1657
|
|
|
1539
|
-
export declare
|
|
1658
|
+
export declare function TooltipTrigger({ className, ...props }: TriggerProps): JSX.Element;
|
|
1540
1659
|
|
|
1541
|
-
export declare function Tree<T extends TreeNode>({ items, ...props }:
|
|
1660
|
+
export declare function Tree<T extends TreeNode>({ items, ...props }: Props_24<T>): JSX.Element;
|
|
1542
1661
|
|
|
1543
1662
|
export declare const TreeItem: <T extends object>({ className, ...props }: OverrideProps<TreeItemProps<T>, {
|
|
1544
1663
|
id: string | number;
|
|
@@ -1560,6 +1679,8 @@ export declare const TreeRoot: <T extends object>({ className, ...props }: TreeP
|
|
|
1560
1679
|
|
|
1561
1680
|
declare type TreeRootProps = React_2.ComponentProps<typeof TreeRoot>;
|
|
1562
1681
|
|
|
1682
|
+
declare type TriggerProps = ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;
|
|
1683
|
+
|
|
1563
1684
|
export declare const twMerge: (...classLists: ClassNameValue[]) => string;
|
|
1564
1685
|
|
|
1565
1686
|
export declare const type: (element: HTMLElement, value: string) => void;
|
|
@@ -1626,7 +1747,7 @@ export declare function useArray<T>(defaultProp: T[]): readonly [T[], {
|
|
|
1626
1747
|
readonly update: (predicate: ListIterateeCustom<T, boolean>, newItem: T | ((item: T) => T)) => void;
|
|
1627
1748
|
}];
|
|
1628
1749
|
|
|
1629
|
-
export declare function useAsync<T>({ fn, dependencies, onError, onSuccess, onFinish, }:
|
|
1750
|
+
export declare function useAsync<T>({ fn, dependencies, onError, onSuccess, onFinish, }: Props_25<T>): AsyncState<T>;
|
|
1630
1751
|
|
|
1631
1752
|
declare interface UseAsyncOptions<T> {
|
|
1632
1753
|
onError?: (error: Error) => void;
|
|
@@ -1820,7 +1941,17 @@ export declare const useTheme: () => {
|
|
|
1820
1941
|
*/
|
|
1821
1942
|
export declare const useThemeProps: <TComponent extends keyof Theme, TProps>(componentName: TComponent, props: TProps, defaultProps?: Partial<TProps>) => TProps;
|
|
1822
1943
|
|
|
1823
|
-
export declare
|
|
1944
|
+
export declare function useToastManager(): {
|
|
1945
|
+
toasts: ToastOptions<any>[];
|
|
1946
|
+
add: (<T extends any = any>(options: ToastManagerAddOptions_2<T>) => string) & ((options: ToastManagerAddOptions<any>) => any);
|
|
1947
|
+
close: ((toastId?: string) => void) & ((id?: string) => any);
|
|
1948
|
+
update: (<T extends any = any>(toastId: string, options: ToastManagerUpdateOptions<T>) => void) & ((id: string, options: Partial<ToastManagerAddOptions<any>>) => any);
|
|
1949
|
+
promise: (<Value, T extends any = any>(promise: Promise<Value>, options: ToastManagerPromiseOptions<Value, T>) => Promise<Value>) & (<T>(promise: Promise<T>, options: {
|
|
1950
|
+
loading: ToastManagerAddOptions<any>;
|
|
1951
|
+
success: ToastManagerAddOptions<any> | ((data: T) => ToastManagerAddOptions<any>);
|
|
1952
|
+
error: ToastManagerAddOptions<any> | ((error: Error) => ToastManagerAddOptions<any>);
|
|
1953
|
+
}) => any);
|
|
1954
|
+
};
|
|
1824
1955
|
|
|
1825
1956
|
export declare function useToggle(initialValue?: boolean): Return_4;
|
|
1826
1957
|
|