@pycolors/ui 1.2.6 → 1.4.0
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/components/ui/badge.d.ts +5 -5
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +22 -21
- package/dist/components/ui/pagination.d.ts +35 -3
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +11 -11
- package/dist/components/ui/toast.d.ts +4 -4
- package/dist/components/ui/toast.d.ts.map +1 -1
- package/dist/components/ui/toast.js +19 -17
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type VariantProps } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "muted" | "success" | "warning" | null | undefined;
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "muted" | "success" | "warning" | "info" | null | undefined;
|
|
5
5
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -11,8 +11,8 @@ export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, Varia
|
|
|
11
11
|
*/
|
|
12
12
|
asChild?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export type BadgeVariant = NonNullable<BadgeProps[
|
|
15
|
-
export type BadgeSize = NonNullable<BadgeProps[
|
|
14
|
+
export type BadgeVariant = NonNullable<BadgeProps["variant"]>;
|
|
15
|
+
export type BadgeSize = NonNullable<BadgeProps["size"]>;
|
|
16
16
|
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
17
17
|
export { Badge, badgeVariants };
|
|
18
18
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;;
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;;8EA4BlB,CAAC;AAIF,MAAM,WAAW,UACf,SACE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EACrC,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;AAExD,QAAA,MAAM,KAAK,oFAaV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from
|
|
3
|
-
import { Slot } from
|
|
4
|
-
import { cva } from
|
|
5
|
-
import { cn } from
|
|
6
|
-
const badgeVariants = cva(
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
const badgeVariants = cva("inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-xs font-medium " +
|
|
7
|
+
"transition-colors ring-offset-background focus-visible:outline-none focus-visible:ring-2 " +
|
|
8
|
+
"focus-visible:ring-ring focus-visible:ring-offset-2", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default:
|
|
12
|
-
secondary:
|
|
13
|
-
muted:
|
|
14
|
-
outline:
|
|
15
|
-
success:
|
|
16
|
-
warning:
|
|
17
|
-
destructive:
|
|
11
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
12
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
13
|
+
muted: "border-transparent bg-muted text-muted-foreground",
|
|
14
|
+
outline: "border-border bg-background text-foreground",
|
|
15
|
+
success: "border-transparent bg-success text-success-foreground",
|
|
16
|
+
warning: "border-transparent bg-warning text-warning-foreground",
|
|
17
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
18
|
+
info: "border-transparent bg-card text-card-foreground",
|
|
18
19
|
},
|
|
19
20
|
size: {
|
|
20
|
-
sm:
|
|
21
|
-
md:
|
|
22
|
-
lg:
|
|
21
|
+
sm: "h-5 text-[11px]",
|
|
22
|
+
md: "h-6",
|
|
23
|
+
lg: "h-7 text-sm",
|
|
23
24
|
},
|
|
24
25
|
},
|
|
25
26
|
defaultVariants: {
|
|
26
|
-
variant:
|
|
27
|
-
size:
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "md",
|
|
28
29
|
},
|
|
29
30
|
});
|
|
30
31
|
const Badge = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
31
|
-
const Comp = asChild ? Slot :
|
|
32
|
+
const Comp = asChild ? Slot : "span";
|
|
32
33
|
return (_jsx(Comp, { ref: ref, "data-slot": "badge", className: cn(badgeVariants({ variant, size }), className), ...props }));
|
|
33
34
|
});
|
|
34
|
-
Badge.displayName =
|
|
35
|
+
Badge.displayName = "Badge";
|
|
35
36
|
export { Badge, badgeVariants };
|
|
@@ -16,22 +16,54 @@ export interface PaginationLinkProps extends React.ComponentPropsWithoutRef<"but
|
|
|
16
16
|
* Defaults to "icon-sm" for compact pagination.
|
|
17
17
|
*/
|
|
18
18
|
size?: ButtonProps["size"];
|
|
19
|
+
/**
|
|
20
|
+
* Render the control as a Slot wrapper so a real link element can be
|
|
21
|
+
* supplied as the child while keeping all pagination styling.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <PaginationLink asChild isActive>
|
|
25
|
+
* <a href="/page/2">2</a>
|
|
26
|
+
* </PaginationLink>
|
|
27
|
+
*/
|
|
28
|
+
asChild?: boolean;
|
|
19
29
|
}
|
|
20
|
-
export declare
|
|
30
|
+
export declare const PaginationLink: React.ForwardRefExoticComponent<PaginationLinkProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
31
|
export interface PaginationPreviousProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
22
32
|
/**
|
|
23
33
|
* Optional label for accessibility and i18n.
|
|
24
34
|
*/
|
|
25
35
|
label?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Render the control as a Slot wrapper so a real link element can be
|
|
38
|
+
* supplied as the child while keeping all pagination styling, the built-in
|
|
39
|
+
* ChevronLeft icon, and the visible "Previous" text.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* <PaginationPrevious asChild>
|
|
43
|
+
* <a href="/page/1" />
|
|
44
|
+
* </PaginationPrevious>
|
|
45
|
+
*/
|
|
46
|
+
asChild?: boolean;
|
|
26
47
|
}
|
|
27
|
-
export declare
|
|
48
|
+
export declare const PaginationPrevious: React.ForwardRefExoticComponent<PaginationPreviousProps & React.RefAttributes<HTMLButtonElement>>;
|
|
28
49
|
export interface PaginationNextProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
29
50
|
/**
|
|
30
51
|
* Optional label for accessibility and i18n.
|
|
31
52
|
*/
|
|
32
53
|
label?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Render the control as a Slot wrapper so a real link element can be
|
|
56
|
+
* supplied as the child while keeping all pagination styling, the built-in
|
|
57
|
+
* ChevronRight icon, and the visible "Next" text.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* <PaginationNext asChild>
|
|
61
|
+
* <a href="/page/3" />
|
|
62
|
+
* </PaginationNext>
|
|
63
|
+
*/
|
|
64
|
+
asChild?: boolean;
|
|
33
65
|
}
|
|
34
|
-
export declare
|
|
66
|
+
export declare const PaginationNext: React.ForwardRefExoticComponent<PaginationNextProps & React.RefAttributes<HTMLButtonElement>>;
|
|
35
67
|
export interface PaginationEllipsisProps extends React.ComponentPropsWithoutRef<"span"> {
|
|
36
68
|
/**
|
|
37
69
|
* Accessible label read by screen readers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/components/ui/pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/components/ui/pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAUvD,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAEpE,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CASlE;AAED,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;AAE1E,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,sBAAsB,2CAQxB;AAED,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;AAEvE,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAQ1E;AAED,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC;IACnF;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,+FAoBzB,CAAC;AAEH,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC;IACvF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,mGAwB7B,CAAC;AAEH,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC;IACnF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,+FAwBzB,CAAC;AAEH,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,MAAM,CAAC;IACrF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,KAAoB,EACpB,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAczB;AASD,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,eAAe,EAAE,CAyEpB"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
2
3
|
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
|
+
import { Slottable } from "@radix-ui/react-slot";
|
|
3
5
|
import { Button } from "./button.js";
|
|
4
6
|
import { cn } from "../../lib/utils.js";
|
|
5
7
|
export function Pagination({ className, ...props }) {
|
|
@@ -11,17 +13,15 @@ export function PaginationContent({ className, ...props }) {
|
|
|
11
13
|
export function PaginationItem({ className, ...props }) {
|
|
12
14
|
return (_jsx("li", { "data-slot": "pagination-item", className: cn("list-none", className), ...props }));
|
|
13
15
|
}
|
|
14
|
-
export function PaginationLink({ className, isActive = false, size = "icon-sm", ...props }) {
|
|
15
|
-
return (_jsx(Button, { "data-slot": "pagination-link", type: "button", variant: isActive ? "secondary" : "outline", size: size, "aria-current": isActive ? "page" : undefined, className: cn("min-w-8 px-2",
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return (_jsxs(Button, { "data-slot": "pagination-next", type: "button", variant: "outline", size: "sm", "aria-label": label, className: cn("gap-2 px-3", className), ...props, children: [_jsx("span", { className: "hidden sm:inline", children: "Next" }), _jsx(ChevronRight, { className: "h-4 w-4", "aria-hidden": "true" })] }));
|
|
24
|
-
}
|
|
16
|
+
export const PaginationLink = React.forwardRef(function PaginationLink({ className, isActive = false, size = "icon-sm", asChild = false, ...props }, ref) {
|
|
17
|
+
return (_jsx(Button, { ref: ref, "data-slot": "pagination-link", type: asChild ? undefined : "button", asChild: asChild, variant: isActive ? "secondary" : "outline", size: size, "aria-current": isActive ? "page" : undefined, className: cn("min-w-8 px-2", isActive && "font-semibold", className), ...props }));
|
|
18
|
+
});
|
|
19
|
+
export const PaginationPrevious = React.forwardRef(function PaginationPrevious({ className, label = "Previous page", asChild = false, children, ...props }, ref) {
|
|
20
|
+
return (_jsxs(Button, { ref: ref, "data-slot": "pagination-previous", type: asChild ? undefined : "button", asChild: asChild, variant: "outline", size: "sm", "aria-label": label, className: cn("gap-2 px-3", className), ...props, children: [asChild ? _jsx(Slottable, { children: children }) : null, _jsx(ChevronLeft, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { className: "hidden sm:inline", children: "Previous" })] }));
|
|
21
|
+
});
|
|
22
|
+
export const PaginationNext = React.forwardRef(function PaginationNext({ className, label = "Next page", asChild = false, children, ...props }, ref) {
|
|
23
|
+
return (_jsxs(Button, { ref: ref, "data-slot": "pagination-next", type: asChild ? undefined : "button", asChild: asChild, variant: "outline", size: "sm", "aria-label": label, className: cn("gap-2 px-3", className), ...props, children: [asChild ? _jsx(Slottable, { children: children }) : null, _jsx("span", { className: "hidden sm:inline", children: "Next" }), _jsx(ChevronRight, { className: "h-4 w-4", "aria-hidden": "true" })] }));
|
|
24
|
+
});
|
|
25
25
|
export function PaginationEllipsis({ className, label = "More pages", ...props }) {
|
|
26
26
|
return (_jsxs("span", { "data-slot": "pagination-ellipsis", className: cn("flex h-8 w-8 items-center justify-center text-muted-foreground", className), ...props, children: [_jsx(MoreHorizontal, { className: "h-4 w-4", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: label })] }));
|
|
27
27
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as ToastPrimitive from
|
|
3
|
-
import { type VariantProps } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
4
|
declare const toastVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
5
|
+
variant?: "default" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export declare const ToastProvider: React.FC<ToastPrimitive.ToastProviderProps>;
|
|
8
8
|
export declare const ToastViewport: React.ForwardRefExoticComponent<ToastPrimitive.ToastViewportProps & React.RefAttributes<HTMLOListElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;8EAiBlB,CAAC;AAEF,eAAO,MAAM,aAAa,6CAA0B,CAAC;AACrD,eAAO,MAAM,aAAa,4GAA0B,CAAC;AAErD,MAAM,WAAW,UACf,SACE,KAAK,CAAC,wBAAwB,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,EAC1D,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAiBzC,eAAO,MAAM,KAAK,kFAchB,CAAC;AAGH,eAAO,MAAM,UAAU,uGAAuB,CAAC;AAC/C,eAAO,MAAM,gBAAgB,6GAA6B,CAAC;AAC3D,eAAO,MAAM,UAAU,0GAAuB,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as ToastPrimitive from
|
|
5
|
-
import { cva } from
|
|
6
|
-
import { cn } from
|
|
7
|
-
const toastVariants = cva(
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
const toastVariants = cva("pointer-events-auto relative flex w-full items-center justify-between gap-4 rounded-md border px-4 py-3 text-sm shadow-lg", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default:
|
|
11
|
-
success:
|
|
12
|
-
warning:
|
|
13
|
-
destructive:
|
|
10
|
+
default: "bg-background text-foreground border-border",
|
|
11
|
+
success: "bg-background text-foreground border-success/40 text-success",
|
|
12
|
+
warning: "bg-background text-foreground border-warning/40 text-warning",
|
|
13
|
+
destructive: "bg-background text-foreground border-destructive/40 text-destructive",
|
|
14
|
+
info: "bg-background text-foreground border-border",
|
|
14
15
|
},
|
|
15
16
|
},
|
|
16
17
|
defaultVariants: {
|
|
17
|
-
variant:
|
|
18
|
+
variant: "default",
|
|
18
19
|
},
|
|
19
20
|
});
|
|
20
21
|
export const ToastProvider = ToastPrimitive.Provider;
|
|
@@ -24,16 +25,17 @@ export const ToastViewport = ToastPrimitive.Viewport;
|
|
|
24
25
|
// should interrupt; routine confirmations should announce politely. An
|
|
25
26
|
// explicit `type` prop from the consumer always wins over this default.
|
|
26
27
|
const toastTypeByVariant = {
|
|
27
|
-
default:
|
|
28
|
-
success:
|
|
29
|
-
warning:
|
|
30
|
-
destructive:
|
|
28
|
+
default: "background",
|
|
29
|
+
success: "background",
|
|
30
|
+
warning: "foreground",
|
|
31
|
+
destructive: "foreground",
|
|
32
|
+
info: "background",
|
|
31
33
|
};
|
|
32
34
|
export const Toast = React.forwardRef(({ className, variant, type, ...props }, ref) => {
|
|
33
|
-
const resolvedVariant = variant ??
|
|
35
|
+
const resolvedVariant = variant ?? "default";
|
|
34
36
|
return (_jsx(ToastPrimitive.Root, { ref: ref, type: type ?? toastTypeByVariant[resolvedVariant], className: cn(toastVariants({ variant }), className), ...props }));
|
|
35
37
|
});
|
|
36
|
-
Toast.displayName =
|
|
38
|
+
Toast.displayName = "Toast";
|
|
37
39
|
export const ToastTitle = ToastPrimitive.Title;
|
|
38
40
|
export const ToastDescription = ToastPrimitive.Description;
|
|
39
41
|
export const ToastClose = ToastPrimitive.Close;
|