@eqtylab/equality 1.0.1 → 1.0.2

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.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" | "link" | "primary" | "secondary" | "tertiary" | null | undefined;
154
+ variant?: "link" | "danger" | "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" | "link" | "primary" | "secondary" | "tertiary" | null | undefined;
154
+ variant?: "link" | "danger" | "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
@@ -2447,7 +2447,7 @@ var SearchBar = ({
2447
2447
  const handleClear = () => {
2448
2448
  setSearchQuery("");
2449
2449
  };
2450
- return /* @__PURE__ */ jsx("div", { className: cn(styles42["search-bar"], className), children: /* @__PURE__ */ jsx(
2450
+ return /* @__PURE__ */ jsx("search", { className: cn(styles42["search-bar"], className), children: /* @__PURE__ */ jsx(
2451
2451
  Input,
2452
2452
  {
2453
2453
  placeholder,
@@ -2967,10 +2967,26 @@ function useToast() {
2967
2967
  };
2968
2968
  }
2969
2969
  var Toast = ({ toast: toast2 }) => {
2970
- const { id, title, description, action, ...props } = toast2;
2971
- return /* @__PURE__ */ jsxs(ToastContainer, { ...props, children: [
2970
+ const { id, title, description, action, icon, variant, ...props } = toast2;
2971
+ const getDefaultIcon = () => {
2972
+ switch (variant) {
2973
+ case "success":
2974
+ return "Check";
2975
+ case "warning":
2976
+ return "AlertOctagon";
2977
+ case "danger":
2978
+ return "AlertTriangle";
2979
+ default:
2980
+ return "Info";
2981
+ }
2982
+ };
2983
+ const displayIcon = icon !== void 0 ? icon : getDefaultIcon();
2984
+ return /* @__PURE__ */ jsxs(ToastContainer, { ...props, variant, children: [
2972
2985
  /* @__PURE__ */ jsxs("div", { className: styles56["toast-copy"], children: [
2973
- title && /* @__PURE__ */ jsx(ToastTitle, { children: title }),
2986
+ title && /* @__PURE__ */ jsxs("div", { className: styles56["toast-title-container"], children: [
2987
+ displayIcon && /* @__PURE__ */ jsx(Icon, { icon: displayIcon, size: "sm", background: "transparent" }),
2988
+ /* @__PURE__ */ jsx(ToastTitle, { children: title })
2989
+ ] }),
2974
2990
  description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
2975
2991
  ] }),
2976
2992
  action && /* @__PURE__ */ jsx("div", { className: styles56["toast-action"], children: action }),