@lzzjokerzzl/react-ui-components 1.4.4 → 1.4.6
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 +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +27 -9
- package/dist/index.js +300 -274
- package/dist/index.js.map +1 -1
- package/dist/react-ui-components.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3166,10 +3166,21 @@ export declare interface ToastContainerProps {
|
|
|
3166
3166
|
"data-testid"?: string;
|
|
3167
3167
|
}
|
|
3168
3168
|
|
|
3169
|
+
/**
|
|
3170
|
+
* Toast context interface
|
|
3171
|
+
*/
|
|
3172
|
+
export declare interface ToastContextType {
|
|
3173
|
+
toasts: ToastItem[];
|
|
3174
|
+
addToast: (toast: Omit<ToastItem, "id">) => string;
|
|
3175
|
+
removeToast: (id: string) => void;
|
|
3176
|
+
removeAllToasts: () => void;
|
|
3177
|
+
updateToast: (id: string, updates: Partial<ToastItem>) => void;
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3169
3180
|
/**
|
|
3170
3181
|
* Individual toast item interface
|
|
3171
3182
|
*/
|
|
3172
|
-
declare interface ToastItem {
|
|
3183
|
+
export declare interface ToastItem {
|
|
3173
3184
|
id: string;
|
|
3174
3185
|
type: ToastType;
|
|
3175
3186
|
title?: string;
|
|
@@ -3189,7 +3200,7 @@ declare interface ToastItem {
|
|
|
3189
3200
|
/**
|
|
3190
3201
|
* Toast options for quick methods
|
|
3191
3202
|
*/
|
|
3192
|
-
declare interface ToastOptions {
|
|
3203
|
+
export declare interface ToastOptions {
|
|
3193
3204
|
title?: string;
|
|
3194
3205
|
description?: string;
|
|
3195
3206
|
duration?: number;
|
|
@@ -3207,7 +3218,7 @@ declare interface ToastOptions {
|
|
|
3207
3218
|
/**
|
|
3208
3219
|
* Toast positions on the screen
|
|
3209
3220
|
*/
|
|
3210
|
-
declare type ToastPosition = "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right";
|
|
3221
|
+
export declare type ToastPosition = "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right";
|
|
3211
3222
|
|
|
3212
3223
|
/**
|
|
3213
3224
|
* Toast component props
|
|
@@ -3223,7 +3234,7 @@ export declare interface ToastProps extends ToastItem {
|
|
|
3223
3234
|
* @param props - ToastProvider component properties
|
|
3224
3235
|
* @returns JSX element representing the toast provider
|
|
3225
3236
|
*/
|
|
3226
|
-
export declare const ToastProvider: ({ children, position, maxToasts, defaultDuration, }: ToastProviderProps) => JSX.Element;
|
|
3237
|
+
export declare const ToastProvider: ({ children, position, maxToasts, defaultDuration, className, viewport, }: ToastProviderProps) => JSX.Element;
|
|
3227
3238
|
|
|
3228
3239
|
/**
|
|
3229
3240
|
* Toast provider props
|
|
@@ -3234,27 +3245,34 @@ export declare interface ToastProviderProps {
|
|
|
3234
3245
|
maxToasts?: number;
|
|
3235
3246
|
defaultDuration?: number;
|
|
3236
3247
|
className?: string;
|
|
3248
|
+
viewport?: boolean;
|
|
3237
3249
|
}
|
|
3238
3250
|
|
|
3239
3251
|
/**
|
|
3240
3252
|
* Toast radius options
|
|
3241
3253
|
*/
|
|
3242
|
-
declare type ToastRadius = "none" | "sm" | "md" | "lg" | "full";
|
|
3254
|
+
export declare type ToastRadius = "none" | "sm" | "md" | "lg" | "full";
|
|
3243
3255
|
|
|
3244
3256
|
/**
|
|
3245
3257
|
* Toast sizes
|
|
3246
3258
|
*/
|
|
3247
|
-
declare type ToastSize = "sm" | "md" | "lg";
|
|
3259
|
+
export declare type ToastSize = "sm" | "md" | "lg";
|
|
3248
3260
|
|
|
3249
3261
|
/**
|
|
3250
3262
|
* Toast types for different notification styles
|
|
3251
3263
|
*/
|
|
3252
|
-
declare type ToastType = "success" | "error" | "warning" | "info" | "default";
|
|
3264
|
+
export declare type ToastType = "success" | "error" | "warning" | "info" | "default";
|
|
3253
3265
|
|
|
3254
3266
|
/**
|
|
3255
3267
|
* Toast variants
|
|
3256
3268
|
*/
|
|
3257
|
-
declare type ToastVariant = "solid" | "bordered" | "flat" | "faded" | "shadow";
|
|
3269
|
+
export declare type ToastVariant = "solid" | "bordered" | "flat" | "faded" | "shadow";
|
|
3270
|
+
|
|
3271
|
+
/**
|
|
3272
|
+
* ToastViewport component that renders all toast containers for all positions
|
|
3273
|
+
* This is a convenience component that renders containers for all positions
|
|
3274
|
+
*/
|
|
3275
|
+
export declare const ToastViewport: ({ className, maxToasts, "data-testid": dataTestId, }: Omit<ToastContainerProps, "position">) => JSX.Element;
|
|
3258
3276
|
|
|
3259
3277
|
export declare const Tooltip: default_2.FC<TooltipProps>;
|
|
3260
3278
|
|
|
@@ -3737,7 +3755,7 @@ export declare const useToast: () => UseToastReturn;
|
|
|
3737
3755
|
/**
|
|
3738
3756
|
* UseToast hook return type
|
|
3739
3757
|
*/
|
|
3740
|
-
declare interface UseToastReturn {
|
|
3758
|
+
export declare interface UseToastReturn {
|
|
3741
3759
|
toast: (message: string, options?: ToastOptions) => string;
|
|
3742
3760
|
success: (message: string, options?: Omit<ToastOptions, "type">) => string;
|
|
3743
3761
|
error: (message: string, options?: Omit<ToastOptions, "type">) => string;
|