@eqtylab/equality 1.0.1 → 1.1.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/button.module.module.css.module.css +41 -0
- package/dist/index.cjs +22 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/dist/toast-components.module.module.css.module.css +12 -16
- package/dist/toast.module.module.css.module.css +4 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -151,7 +151,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
151
151
|
}) => react_jsx_runtime.JSX.Element;
|
|
152
152
|
|
|
153
153
|
declare const buttonVariants: (props?: ({
|
|
154
|
-
variant?: "danger" | "
|
|
154
|
+
variant?: "link" | "danger" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
155
155
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
156
156
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
157
157
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
|
@@ -722,6 +722,7 @@ type ToasterToast = ToastProps$1 & {
|
|
|
722
722
|
title?: React.ReactNode;
|
|
723
723
|
description?: React.ReactNode;
|
|
724
724
|
action?: ToastActionElement;
|
|
725
|
+
icon?: string | React.ReactElement;
|
|
725
726
|
};
|
|
726
727
|
declare const actionTypes: {
|
|
727
728
|
readonly ADD_TOAST: "ADD_TOAST";
|
package/dist/index.d.ts
CHANGED
|
@@ -151,7 +151,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
151
151
|
}) => react_jsx_runtime.JSX.Element;
|
|
152
152
|
|
|
153
153
|
declare const buttonVariants: (props?: ({
|
|
154
|
-
variant?: "danger" | "
|
|
154
|
+
variant?: "link" | "danger" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
155
155
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
156
156
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
157
157
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
|
@@ -722,6 +722,7 @@ type ToasterToast = ToastProps$1 & {
|
|
|
722
722
|
title?: React.ReactNode;
|
|
723
723
|
description?: React.ReactNode;
|
|
724
724
|
action?: ToastActionElement;
|
|
725
|
+
icon?: string | React.ReactElement;
|
|
725
726
|
};
|
|
726
727
|
declare const actionTypes: {
|
|
727
728
|
readonly ADD_TOAST: "ADD_TOAST";
|
package/dist/index.js
CHANGED
|
@@ -127,7 +127,8 @@ var buttonVariants = cva(styles2["button"], {
|
|
|
127
127
|
danger: styles2["button--danger"],
|
|
128
128
|
secondary: styles2["button--secondary"],
|
|
129
129
|
tertiary: styles2["button--tertiary"],
|
|
130
|
-
link: styles2["button--link"]
|
|
130
|
+
link: styles2["button--link"],
|
|
131
|
+
navigation: styles2["button--navigation"]
|
|
131
132
|
},
|
|
132
133
|
size: {
|
|
133
134
|
sm: styles2["size--sm"],
|
|
@@ -2447,7 +2448,7 @@ var SearchBar = ({
|
|
|
2447
2448
|
const handleClear = () => {
|
|
2448
2449
|
setSearchQuery("");
|
|
2449
2450
|
};
|
|
2450
|
-
return /* @__PURE__ */ jsx("
|
|
2451
|
+
return /* @__PURE__ */ jsx("search", { className: cn(styles42["search-bar"], className), children: /* @__PURE__ */ jsx(
|
|
2451
2452
|
Input,
|
|
2452
2453
|
{
|
|
2453
2454
|
placeholder,
|
|
@@ -2967,10 +2968,26 @@ function useToast() {
|
|
|
2967
2968
|
};
|
|
2968
2969
|
}
|
|
2969
2970
|
var Toast = ({ toast: toast2 }) => {
|
|
2970
|
-
const { id, title, description, action, ...props } = toast2;
|
|
2971
|
-
|
|
2971
|
+
const { id, title, description, action, icon, variant, ...props } = toast2;
|
|
2972
|
+
const getDefaultIcon = () => {
|
|
2973
|
+
switch (variant) {
|
|
2974
|
+
case "success":
|
|
2975
|
+
return "Check";
|
|
2976
|
+
case "warning":
|
|
2977
|
+
return "AlertOctagon";
|
|
2978
|
+
case "danger":
|
|
2979
|
+
return "AlertTriangle";
|
|
2980
|
+
default:
|
|
2981
|
+
return "Info";
|
|
2982
|
+
}
|
|
2983
|
+
};
|
|
2984
|
+
const displayIcon = icon !== void 0 ? icon : getDefaultIcon();
|
|
2985
|
+
return /* @__PURE__ */ jsxs(ToastContainer, { ...props, variant, children: [
|
|
2972
2986
|
/* @__PURE__ */ jsxs("div", { className: styles56["toast-copy"], children: [
|
|
2973
|
-
title && /* @__PURE__ */
|
|
2987
|
+
title && /* @__PURE__ */ jsxs("div", { className: styles56["toast-title-container"], children: [
|
|
2988
|
+
displayIcon && /* @__PURE__ */ jsx(Icon, { icon: displayIcon, size: "sm", background: "transparent" }),
|
|
2989
|
+
/* @__PURE__ */ jsx(ToastTitle, { children: title })
|
|
2990
|
+
] }),
|
|
2974
2991
|
description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
|
|
2975
2992
|
] }),
|
|
2976
2993
|
action && /* @__PURE__ */ jsx("div", { className: styles56["toast-action"], children: action }),
|