boottent-design 0.1.7 → 0.1.9
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/boottent-design.hooks.cjs.js +1 -1
- package/dist/boottent-design.hooks.es.js +2 -15
- package/dist/boottent-design.main.cjs.js +1 -1
- package/dist/boottent-design.main.es.js +34 -30
- package/dist/boottent-design.provider.cjs.js +1 -1
- package/dist/boottent-design.provider.es.js +2 -104
- package/dist/boottent-design.types.cjs.js +1 -0
- package/dist/boottent-design.types.es.js +1 -0
- package/dist/boottent-design.ui.cjs.js +1 -1
- package/dist/boottent-design.ui.es.js +2 -2
- package/dist/boottent-design.utils.cjs.js +1 -1
- package/dist/boottent-design.utils.es.js +40 -40
- package/dist/{index-j8ablNp2.js → index-5i0eJhNg.js} +1 -1
- package/dist/{index-JOCM_DIz.cjs → index-BGquroNF.cjs} +1 -1
- package/dist/portal-provider-Bcq_skgH.js +106 -0
- package/dist/portal-provider-DXxo-XOi.cjs +1 -0
- package/dist/{tooltip-Dbl2Hiq4.cjs → tooltip-4J6zgJSb.cjs} +3 -3
- package/dist/{tooltip-x7XcU5XA.js → tooltip-BvnnBx2H.js} +349 -361
- package/dist/types/hooks.d.ts +5 -2
- package/dist/types/main.d.ts +27 -13
- package/dist/types/types.d.ts +577 -0
- package/dist/types/ui.d.ts +1 -1
- package/dist/types/utils.d.ts +5 -2
- package/dist/use-portal-Ck3GPJQN.cjs +1 -0
- package/dist/use-portal-TiMPd_EZ.js +17 -0
- package/package.json +6 -1
package/dist/types/hooks.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ declare interface ModalProps {
|
|
|
38
38
|
|
|
39
39
|
declare const Toast: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React_2.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
40
40
|
variant?: "white" | "black" | null | undefined;
|
|
41
|
-
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
|
|
42
41
|
size?: "sm" | "md" | "lg" | "xl" | "full" | "fit" | null | undefined;
|
|
43
42
|
} & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLLIElement>>;
|
|
44
43
|
|
|
@@ -52,9 +51,13 @@ declare type ToasterProps = ToastProps & ToastViewportProps & {
|
|
|
52
51
|
onClose?: () => void;
|
|
53
52
|
};
|
|
54
53
|
|
|
54
|
+
declare type ToastPositionsType = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
55
|
+
|
|
55
56
|
declare type ToastProps = React_2.ComponentPropsWithoutRef<typeof Toast>;
|
|
56
57
|
|
|
57
|
-
declare const ToastViewport: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React_2.RefAttributes<HTMLOListElement>, "ref"> &
|
|
58
|
+
declare const ToastViewport: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React_2.RefAttributes<HTMLOListElement>, "ref"> & {
|
|
59
|
+
position?: ToastPositionsType;
|
|
60
|
+
} & React_2.RefAttributes<HTMLOListElement>>;
|
|
58
61
|
|
|
59
62
|
declare type ToastViewportProps = React_2.ComponentPropsWithoutRef<typeof ToastViewport>;
|
|
60
63
|
|
package/dist/types/main.d.ts
CHANGED
|
@@ -49,13 +49,13 @@ declare const actionTypes: {
|
|
|
49
49
|
|
|
50
50
|
export declare const Alert: React_2.FC<AlertProps>;
|
|
51
51
|
|
|
52
|
-
declare interface AlertPortalOptions {
|
|
52
|
+
export declare interface AlertPortalOptions {
|
|
53
53
|
id: string;
|
|
54
54
|
type: "alert";
|
|
55
55
|
props: AlertProps;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
declare interface AlertProps {
|
|
58
|
+
export declare interface AlertProps {
|
|
59
59
|
id?: string;
|
|
60
60
|
title?: string;
|
|
61
61
|
description: string | React.ReactNode;
|
|
@@ -103,7 +103,7 @@ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLBu
|
|
|
103
103
|
|
|
104
104
|
export declare const buttonVariants: (props?: ({
|
|
105
105
|
theme?: "primary" | "secondary" | "etc" | null | undefined;
|
|
106
|
-
size?: "
|
|
106
|
+
size?: "sm" | "md" | "lg" | "xs" | "icon" | null | undefined;
|
|
107
107
|
variant?: "text" | "solid" | "outline" | null | undefined;
|
|
108
108
|
shape?: "square" | "rounded" | null | undefined;
|
|
109
109
|
} & ClassProp) | undefined) => string;
|
|
@@ -143,13 +143,13 @@ declare function DefaultProfile({ size }: SvgIconType): JSX_2.Element;
|
|
|
143
143
|
|
|
144
144
|
export declare const Dialog: React_2.ForwardRefExoticComponent<CustomDialogProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
145
145
|
|
|
146
|
-
declare interface DialogPortalOptions {
|
|
146
|
+
export declare interface DialogPortalOptions {
|
|
147
147
|
id: string;
|
|
148
148
|
type: "dialog";
|
|
149
149
|
props: DialogProps;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
declare interface DialogProps {
|
|
152
|
+
export declare interface DialogProps {
|
|
153
153
|
id?: string;
|
|
154
154
|
title: string;
|
|
155
155
|
content: string | React.ReactNode;
|
|
@@ -237,13 +237,13 @@ declare function Message({ size, fill, className, }: SvgIconType): JSX_2.Element
|
|
|
237
237
|
|
|
238
238
|
export declare const Modal: React_2.ForwardRefExoticComponent<ModalProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
239
239
|
|
|
240
|
-
declare interface ModalPortalOptions {
|
|
240
|
+
export declare interface ModalPortalOptions {
|
|
241
241
|
id: string;
|
|
242
242
|
type: "modal";
|
|
243
243
|
props: ModalProps;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
declare interface ModalProps {
|
|
246
|
+
export declare interface ModalProps {
|
|
247
247
|
id?: string;
|
|
248
248
|
title: string;
|
|
249
249
|
description?: string | React.ReactNode;
|
|
@@ -282,6 +282,8 @@ export declare const portalManager: PortalManager;
|
|
|
282
282
|
|
|
283
283
|
export declare type PortalOptions = ModalPortalOptions | ToastPortalOptions | AlertPortalOptions | DialogPortalOptions;
|
|
284
284
|
|
|
285
|
+
export declare const PortalProvider: () => JSX_2.Element;
|
|
286
|
+
|
|
285
287
|
export declare type PortalType = "modal" | "toast" | "alert" | "dialog";
|
|
286
288
|
|
|
287
289
|
declare function Present({ size, fill, className, }: SvgIconType): JSX_2.Element;
|
|
@@ -316,7 +318,7 @@ declare type Props_5 = {
|
|
|
316
318
|
|
|
317
319
|
declare function Radio({ type, size }: Props_4): JSX_2.Element;
|
|
318
320
|
|
|
319
|
-
declare interface ReactIconProps {
|
|
321
|
+
export declare interface ReactIconProps {
|
|
320
322
|
size?: number;
|
|
321
323
|
color?: string;
|
|
322
324
|
className?: string;
|
|
@@ -342,7 +344,7 @@ declare interface State {
|
|
|
342
344
|
toasts: ToasterProps[];
|
|
343
345
|
}
|
|
344
346
|
|
|
345
|
-
declare type SvgIconType = {
|
|
347
|
+
export declare type SvgIconType = {
|
|
346
348
|
size?: string;
|
|
347
349
|
fill?: string;
|
|
348
350
|
className?: string;
|
|
@@ -364,7 +366,6 @@ export declare const Symbols: {
|
|
|
364
366
|
|
|
365
367
|
declare const Toast: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React_2.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
366
368
|
variant?: "white" | "black" | null | undefined;
|
|
367
|
-
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
|
|
368
369
|
size?: "sm" | "md" | "lg" | "xl" | "full" | "fit" | null | undefined;
|
|
369
370
|
} & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLLIElement>>;
|
|
370
371
|
|
|
@@ -384,7 +385,7 @@ export declare function toaster(): {
|
|
|
384
385
|
toasts: ToasterProps[];
|
|
385
386
|
};
|
|
386
387
|
|
|
387
|
-
declare type ToasterProps = ToastProps & ToastViewportProps & {
|
|
388
|
+
export declare type ToasterProps = ToastProps & ToastViewportProps & {
|
|
388
389
|
id: string;
|
|
389
390
|
title?: React.ReactNode;
|
|
390
391
|
description?: React.ReactNode;
|
|
@@ -394,15 +395,19 @@ declare type ToasterProps = ToastProps & ToastViewportProps & {
|
|
|
394
395
|
onClose?: () => void;
|
|
395
396
|
};
|
|
396
397
|
|
|
397
|
-
declare interface ToastPortalOptions {
|
|
398
|
+
export declare interface ToastPortalOptions {
|
|
398
399
|
id: string;
|
|
399
400
|
type: "toast";
|
|
400
401
|
props: ToastProps;
|
|
401
402
|
}
|
|
402
403
|
|
|
404
|
+
declare type ToastPositionsType = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
405
|
+
|
|
403
406
|
declare type ToastProps = React_2.ComponentPropsWithoutRef<typeof Toast>;
|
|
404
407
|
|
|
405
|
-
declare const ToastViewport: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React_2.RefAttributes<HTMLOListElement>, "ref"> &
|
|
408
|
+
declare const ToastViewport: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React_2.RefAttributes<HTMLOListElement>, "ref"> & {
|
|
409
|
+
position?: ToastPositionsType;
|
|
410
|
+
} & React_2.RefAttributes<HTMLOListElement>>;
|
|
406
411
|
|
|
407
412
|
declare type ToastViewportProps = React_2.ComponentPropsWithoutRef<typeof ToastViewport>;
|
|
408
413
|
|
|
@@ -425,6 +430,15 @@ declare type TooltipContentProps = React_2.ComponentPropsWithoutRef<typeof Toolt
|
|
|
425
430
|
|
|
426
431
|
export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
427
432
|
|
|
433
|
+
export declare const usePortal: () => {
|
|
434
|
+
modal: (props: ModalProps) => string | null;
|
|
435
|
+
toast: (props: ToasterProps) => string | null;
|
|
436
|
+
alert: (props: AlertProps) => string | null;
|
|
437
|
+
dialog: (props: DialogProps) => string | null;
|
|
438
|
+
getIsOpen: (id: string) => boolean | undefined;
|
|
439
|
+
openPortals: string[];
|
|
440
|
+
};
|
|
441
|
+
|
|
428
442
|
declare function ViewCard({ size, fill, }: SvgIconType): JSX_2.Element;
|
|
429
443
|
|
|
430
444
|
declare function ViewMore({ size, fill, }: SvgIconType): JSX_2.Element;
|