@npm_leadtech/legal-contracts-ui 0.93.8 → 0.93.9
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/Toast.js +19 -17
- package/package.json +1 -1
package/dist/components/Toast.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
4
|
-
import { useState as
|
|
5
|
-
import { InfoIcon as
|
|
2
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import f from "clsx";
|
|
4
|
+
import { useState as h } from "react";
|
|
5
|
+
import { InfoIcon as l } from "./InfoIcon.js";
|
|
6
6
|
import { DoneCircleIcon as g } from "./DoneCircleIcon.js";
|
|
7
7
|
import { CloseIcon as p } from "./CloseIcon.js";
|
|
8
8
|
const u = {
|
|
@@ -11,33 +11,35 @@ const u = {
|
|
|
11
11
|
bg: "bg-primary-500"
|
|
12
12
|
},
|
|
13
13
|
error: {
|
|
14
|
-
icon: /* @__PURE__ */ e(
|
|
14
|
+
icon: /* @__PURE__ */ e(l, { fill: "white", width: 24, height: 24 }),
|
|
15
15
|
bg: "bg-error-500"
|
|
16
16
|
},
|
|
17
17
|
default: {
|
|
18
|
-
icon: /* @__PURE__ */ e(
|
|
18
|
+
icon: /* @__PURE__ */ e(l, { fill: "white", width: 24, height: 24 }),
|
|
19
19
|
bg: "bg-neutral-500"
|
|
20
20
|
}
|
|
21
|
-
}, v = ({ show: i, title:
|
|
22
|
-
const [
|
|
23
|
-
|
|
21
|
+
}, v = ({ show: i, title: s, message: c, type: a = "default", onClose: d }) => {
|
|
22
|
+
const [t, n] = h(i), o = u[a];
|
|
23
|
+
i && !t && n(!0);
|
|
24
|
+
const m = () => {
|
|
25
|
+
i || n(!1);
|
|
24
26
|
};
|
|
25
|
-
return
|
|
27
|
+
return t ? /* @__PURE__ */ r(
|
|
26
28
|
"div",
|
|
27
29
|
{
|
|
28
30
|
onAnimationEnd: m,
|
|
29
|
-
className:
|
|
31
|
+
className: f(
|
|
30
32
|
"fixed top-5 right-5 z-9999 flex min-w-75 items-center gap-4 rounded px-4 py-2 shadow-lg",
|
|
31
|
-
|
|
33
|
+
o.bg,
|
|
32
34
|
i ? "animate-slide-in" : "animate-slide-out"
|
|
33
35
|
),
|
|
34
36
|
children: [
|
|
35
|
-
/* @__PURE__ */ e("div", { className: "shrink-0", children:
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */ e("p", { className: "font-bold", children:
|
|
38
|
-
/* @__PURE__ */ e("p", { children:
|
|
37
|
+
/* @__PURE__ */ e("div", { className: "shrink-0", children: o.icon }),
|
|
38
|
+
/* @__PURE__ */ r("div", { className: "flex grow flex-col text-sm text-white", children: [
|
|
39
|
+
/* @__PURE__ */ e("p", { className: "font-bold", children: s }),
|
|
40
|
+
/* @__PURE__ */ e("p", { children: c })
|
|
39
41
|
] }),
|
|
40
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
42
|
+
/* @__PURE__ */ e("button", { onClick: d, className: "cursor-pointer", children: /* @__PURE__ */ e(p, { fill: "white", className: "h-4 w-4" }) })
|
|
41
43
|
]
|
|
42
44
|
}
|
|
43
45
|
) : null;
|