@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.cjs CHANGED
@@ -2549,7 +2549,7 @@ var SearchBar = ({
2549
2549
  const handleClear = () => {
2550
2550
  setSearchQuery("");
2551
2551
  };
2552
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(styles42__default.default["search-bar"], className), children: /* @__PURE__ */ jsxRuntime.jsx(
2552
+ return /* @__PURE__ */ jsxRuntime.jsx("search", { className: cn(styles42__default.default["search-bar"], className), children: /* @__PURE__ */ jsxRuntime.jsx(
2553
2553
  Input,
2554
2554
  {
2555
2555
  placeholder,
@@ -3069,10 +3069,26 @@ function useToast() {
3069
3069
  };
3070
3070
  }
3071
3071
  var Toast = ({ toast: toast2 }) => {
3072
- const { id, title, description, action, ...props } = toast2;
3073
- return /* @__PURE__ */ jsxRuntime.jsxs(ToastContainer, { ...props, children: [
3072
+ const { id, title, description, action, icon, variant, ...props } = toast2;
3073
+ const getDefaultIcon = () => {
3074
+ switch (variant) {
3075
+ case "success":
3076
+ return "Check";
3077
+ case "warning":
3078
+ return "AlertOctagon";
3079
+ case "danger":
3080
+ return "AlertTriangle";
3081
+ default:
3082
+ return "Info";
3083
+ }
3084
+ };
3085
+ const displayIcon = icon !== void 0 ? icon : getDefaultIcon();
3086
+ return /* @__PURE__ */ jsxRuntime.jsxs(ToastContainer, { ...props, variant, children: [
3074
3087
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles56__default.default["toast-copy"], children: [
3075
- title && /* @__PURE__ */ jsxRuntime.jsx(ToastTitle, { children: title }),
3088
+ title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles56__default.default["toast-title-container"], children: [
3089
+ displayIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: displayIcon, size: "sm", background: "transparent" }),
3090
+ /* @__PURE__ */ jsxRuntime.jsx(ToastTitle, { children: title })
3091
+ ] }),
3076
3092
  description && /* @__PURE__ */ jsxRuntime.jsx(ToastDescription, { children: description })
3077
3093
  ] }),
3078
3094
  action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles56__default.default["toast-action"], children: action }),