bmi-next-brokers 2.9.0 → 2.9.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._toast_fzbbb_2{position:relative;width:100%;min-width:0;border-radius:12px;align-items:center;border-left:4px solid;overflow:hidden;cursor:default;display:flex;flex-direction:column;gap:.75em;box-sizing:border-box}._topRow_fzbbb_18{display:flex;align-items:center;flex-wrap:wrap;gap:10px;width:100%}._topRow_fzbbb_18._large_fzbbb_26{gap:14px}._iconAndContent_fzbbb_30{flex:1;min-width:0;display:flex;flex-direction:row;align-items:center;gap:10px}._iconAndContent_fzbbb_30._medium_fzbbb_39{gap:6px}._iconContainer_fzbbb_44{flex-shrink:0;width:24px;margin-left:5px;height:24px;display:flex;align-items:center;justify-content:center}._content_fzbbb_55{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1;min-width:0;gap:2px;overflow:visible;word-break:break-word}._actionButton_fzbbb_68{background:transparent;border:none;border-radius:1000px;cursor:pointer;font-family:var(--font-regular);display:flex;flex-direction:row;align-items:center;gap:6px;justify-content:center}._actionButton_fzbbb_68._withIcon_fzbbb_81{justify-content:space-between}._closeButton_fzbbb_86{flex-shrink:0;background:none;border:none;cursor:pointer;padding:0;padding-inline:10px;display:flex;align-items:center;justify-content:center;transition:all .2s ease}._closeButton_fzbbb_86:active{transform:scale(.95)}._entering_fzbbb_104{animation:_staticToastIn_fzbbb_1 .3s cubic-bezier(.16,1,.3,1) forwards}._exiting_fzbbb_108{animation:_staticToastOut_fzbbb_1 .3s cubic-bezier(.4,0,1,1) forwards}@keyframes _staticToastIn_fzbbb_1{0%{opacity:0;transform:translateY(-6px) scale(.98);filter:blur(3px)}to{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}}@keyframes _staticToastOut_fzbbb_1{0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}to{opacity:0;transform:translateY(-6px) scale(.98);filter:blur(3px)}}@media (prefers-reduced-motion: reduce){._toast_fzbbb_2,._entering_fzbbb_104,._exiting_fzbbb_108{animation:none!important}}._content_fzbbb_55:only-child,._content_fzbbb_55:not(:has(._body_fzbbb_149)){justify-content:center}@media (max-width: 720px){._topRow_fzbbb_18._withAction_fzbbb_154{align-items:flex-start}._topRow_fzbbb_18._small_fzbbb_158{align-items:center}._iconAndContent_fzbbb_30._withAction_fzbbb_154{align-items:flex-start}._iconAndContent_fzbbb_30._small_fzbbb_158{align-items:center}._closeButton_fzbbb_86{order:2}._actionButton_fzbbb_68{order:3;width:100%}._actionButton_fzbbb_68._small_fzbbb_158{margin-right:4px}._actionButton_fzbbb_68._medium_fzbbb_39{margin-right:6px}._actionButton_fzbbb_68._large_fzbbb_26{margin-right:8px}}
|
package/dist/assets/Toast.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._toast_17e9b_1{position:fixed;min-width:320px;max-width:420px;border-radius:12px;align-items:center;z-index:9000;border-left:4px solid;overflow:hidden;cursor:default;display:flex;flex-direction:column;gap:.75em}._topRow_17e9b_17{display:flex;align-items:center;flex-wrap:wrap;gap:10px;width:100%}._topRow_17e9b_17._large_17e9b_25{gap:14px}._iconAndContent_17e9b_29{flex:1;min-width:0;display:flex;flex-direction:row;align-items:center;gap:10px}._iconAndContent_17e9b_29._medium_17e9b_38{gap:6px}._position_top_right_17e9b_43{top:1rem;right:1rem}._position_top_left_17e9b_48{top:1rem;left:1rem}._position_bottom_right_17e9b_53{bottom:1rem;right:1rem}._position_bottom_left_17e9b_58{bottom:1rem;left:1rem}._position_top_center_17e9b_63{top:1rem;left:50%;transform:translate(-50%)}._position_bottom_center_17e9b_69{bottom:1rem;left:50%;transform:translate(-50%)}._iconContainer_17e9b_76{flex-shrink:0;width:24px;margin-left:5px;height:24px;display:flex;align-items:center;justify-content:center}._content_17e9b_87{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1;min-width:0;gap:2px;overflow:visible;word-break:break-word}._title_17e9b_99{font-weight:600;font-size:.9rem;color:#000}._actionButton_17e9b_106{background:transparent;border:none;border-radius:1000px;cursor:pointer;font-family:var(--font-regular);display:flex;flex-direction:row;align-items:center;gap:6px;justify-content:center}._actionButton_17e9b_106._withIcon_17e9b_119{justify-content:space-between}._closeButton_17e9b_124{flex-shrink:0;background:none;border:none;cursor:pointer;padding:0;padding-inline:10px;display:flex;align-items:center;justify-content:center;transition:all .2s ease}._closeButton_17e9b_124:active{transform:scale(.95)}._position_top_right_17e9b_43._exiting_17e9b_142,._position_bottom_right_17e9b_53._exiting_17e9b_142{animation:_slideOutToRight_17e9b_1 .3s cubic-bezier(.4,0,1,1) forwards}._position_top_right_17e9b_43._entering_17e9b_148,._position_bottom_right_17e9b_53._entering_17e9b_148{animation:_slideInFromRight_17e9b_1 .4s cubic-bezier(.16,1,.3,1) forwards}._position_top_left_17e9b_48._exiting_17e9b_142,._position_bottom_left_17e9b_58._exiting_17e9b_142{animation:_slideOutToLeft_17e9b_1 .3s cubic-bezier(.4,0,1,1) forwards}._position_top_left_17e9b_48._entering_17e9b_148,._position_bottom_left_17e9b_58._entering_17e9b_148{animation:_slideInFromLeft_17e9b_1 .4s cubic-bezier(.16,1,.3,1) forwards}._position_top_center_17e9b_63._exiting_17e9b_142{animation:_slideOutToTop_17e9b_1 .3s cubic-bezier(.4,0,1,1) forwards}._position_top_center_17e9b_63._entering_17e9b_148{animation:_slideInFromTop_17e9b_1 .4s cubic-bezier(.16,1,.3,1) forwards}._position_bottom_center_17e9b_69._exiting_17e9b_142{animation:_slideOutToBottom_17e9b_1 .3s cubic-bezier(.4,0,1,1) forwards}._position_bottom_center_17e9b_69._entering_17e9b_148{animation:_slideInFromBottom_17e9b_1 .4s cubic-bezier(.16,1,.3,1) forwards}@keyframes _slideInFromRight_17e9b_1{0%{transform:translate(100%);opacity:0;filter:blur(4px)}to{transform:translate(0);opacity:1;filter:blur(0)}}@keyframes _slideInFromLeft_17e9b_1{0%{transform:translate(-100%);opacity:0;filter:blur(4px)}to{transform:translate(0);opacity:1;filter:blur(0)}}@keyframes _slideInFromTop_17e9b_1{0%{transform:translate(-50%) translateY(-100%);opacity:0;filter:blur(4px)}to{transform:translate(-50%) translateY(0);opacity:1;filter:blur(0)}}@keyframes _slideInFromBottom_17e9b_1{0%{transform:translate(-50%) translateY(100%);opacity:0;filter:blur(4px)}to{transform:translate(-50%) translateY(0);opacity:1;filter:blur(0)}}@keyframes _slideOutToRight_17e9b_1{0%{transform:translate(0);opacity:1;filter:blur(0px)}to{transform:translate(120%);opacity:0;filter:blur(4px)}}@keyframes _slideOutToLeft_17e9b_1{0%{transform:translate(0);opacity:1;filter:blur(0px)}to{transform:translate(-120%);opacity:0;filter:blur(4px)}}@keyframes _slideOutToTop_17e9b_1{0%{transform:translate(-50%) translateY(0);opacity:1;filter:blur(0px)}to{transform:translate(-50%) translateY(-120%);opacity:0;filter:blur(4px)}}@keyframes _slideOutToBottom_17e9b_1{0%{transform:translate(-50%) translateY(0);opacity:1;filter:blur(0px)}to{transform:translate(-50%) translateY(120%);opacity:0;filter:blur(4px)}}._toast_17e9b_1:hover{transition:all .2s cubic-bezier(.4,0,.2,1)}@media (max-width: 905px){._toast_17e9b_1{min-width:unset;max-width:unset;width:calc(100% - 1rem);left:0;right:0;margin-inline:auto}._toast_17e9b_1._position_top_center_17e9b_63,._toast_17e9b_1._position_bottom_center_17e9b_69{left:50%}}@media (max-width: 720px){._topRow_17e9b_17._withAction_17e9b_316{align-items:flex-start}._topRow_17e9b_17._small_17e9b_320{align-items:center}._iconAndContent_17e9b_29._withAction_17e9b_316{align-items:flex-start}._iconAndContent_17e9b_29._small_17e9b_320{align-items:center}._closeButton_17e9b_124{order:2}._actionButton_17e9b_106{order:3;width:100%}._actionButton_17e9b_106._small_17e9b_320{margin-right:4px}._actionButton_17e9b_106._medium_17e9b_38{margin-right:6px}._actionButton_17e9b_106._large_17e9b_25{margin-right:8px}}@media (prefers-reduced-motion: reduce){._toast_17e9b_1{animation:none!important}._toast_17e9b_1:hover{transition:none}}._content_17e9b_87:only-child,._content_17e9b_87:not(:has(._body_17e9b_367)){justify-content:center}
|
|
@@ -1,53 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import '../../assets/StaticToast.css';const
|
|
5
|
-
toast:
|
|
6
|
-
topRow:
|
|
7
|
-
large:
|
|
8
|
-
iconAndContent:
|
|
9
|
-
medium:
|
|
10
|
-
iconContainer:
|
|
11
|
-
content:
|
|
12
|
-
actionButton:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { jsx as i, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import { useState as F, useEffect as w } from "react";
|
|
3
|
+
import { Icon as p } from "../../icons/Icon.js";
|
|
4
|
+
import '../../assets/StaticToast.css';const N = "_toast_fzbbb_2", D = "_topRow_fzbbb_18", j = "_large_fzbbb_26", H = "_iconAndContent_fzbbb_30", M = "_medium_fzbbb_39", O = "_iconContainer_fzbbb_44", P = "_content_fzbbb_55", W = "_actionButton_fzbbb_68", q = "_withIcon_fzbbb_81", G = "_closeButton_fzbbb_86", J = "_entering_fzbbb_104", K = "_staticToastIn_fzbbb_1", L = "_exiting_fzbbb_108", Q = "_staticToastOut_fzbbb_1", U = "_body_fzbbb_149", X = "_withAction_fzbbb_154", Y = "_small_fzbbb_158", t = {
|
|
5
|
+
toast: N,
|
|
6
|
+
topRow: D,
|
|
7
|
+
large: j,
|
|
8
|
+
iconAndContent: H,
|
|
9
|
+
medium: M,
|
|
10
|
+
iconContainer: O,
|
|
11
|
+
content: P,
|
|
12
|
+
actionButton: W,
|
|
13
|
+
withIcon: q,
|
|
14
|
+
closeButton: G,
|
|
15
|
+
entering: J,
|
|
16
|
+
staticToastIn: K,
|
|
17
|
+
exiting: L,
|
|
18
|
+
staticToastOut: Q,
|
|
19
|
+
body: U,
|
|
20
|
+
withAction: X,
|
|
21
|
+
small: Y
|
|
22
|
+
}, S = ({
|
|
23
|
+
type: y = "info",
|
|
24
|
+
title: x,
|
|
25
|
+
body: h,
|
|
26
|
+
size: r = "small",
|
|
27
|
+
icon: B,
|
|
28
|
+
isVisible: s = !0,
|
|
29
|
+
closable: E = !1,
|
|
30
|
+
onClose: u,
|
|
31
|
+
autoClose: C = !1,
|
|
32
|
+
duration: g = 5e3,
|
|
33
|
+
className: I,
|
|
32
34
|
style: k,
|
|
33
|
-
action:
|
|
35
|
+
action: e
|
|
34
36
|
}) => {
|
|
35
|
-
const [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}, [
|
|
39
|
-
if (
|
|
40
|
-
const
|
|
37
|
+
const [a, R] = F(s), [m, A] = F(!1);
|
|
38
|
+
w(() => {
|
|
39
|
+
s ? (A(!1), R(!0)) : a && _();
|
|
40
|
+
}, [s]), w(() => {
|
|
41
|
+
if (C && a && !m && g > 0) {
|
|
42
|
+
const d = setTimeout(() => {
|
|
41
43
|
_();
|
|
42
|
-
},
|
|
43
|
-
return () => clearTimeout(
|
|
44
|
+
}, g);
|
|
45
|
+
return () => clearTimeout(d);
|
|
44
46
|
}
|
|
45
|
-
}, [
|
|
47
|
+
}, [a, g, C, m]);
|
|
46
48
|
const _ = () => {
|
|
47
|
-
|
|
48
|
-
R(!1),
|
|
49
|
+
A(!0), setTimeout(() => {
|
|
50
|
+
R(!1), u == null || u();
|
|
49
51
|
}, 300);
|
|
50
|
-
},
|
|
52
|
+
}, c = {
|
|
51
53
|
small: "10px 4px 10px 8px",
|
|
52
54
|
medium: "14px 10px",
|
|
53
55
|
large: "14px 7px 14px 14px"
|
|
@@ -68,7 +70,7 @@ import '../../assets/StaticToast.css';const w = "_toast_1nqnj_2", N = "_topRow_1
|
|
|
68
70
|
minHeight: "42px",
|
|
69
71
|
paddingInline: "14px"
|
|
70
72
|
}
|
|
71
|
-
},
|
|
73
|
+
}, f = {
|
|
72
74
|
small: {
|
|
73
75
|
title: "small2Medium",
|
|
74
76
|
actionButton: "small2Regular",
|
|
@@ -84,165 +86,177 @@ import '../../assets/StaticToast.css';const w = "_toast_1nqnj_2", N = "_topRow_1
|
|
|
84
86
|
actionButton: "title6Regular",
|
|
85
87
|
body: "bodyRegular"
|
|
86
88
|
}
|
|
87
|
-
},
|
|
88
|
-
switch (
|
|
89
|
+
}, $ = (d, n) => {
|
|
90
|
+
switch (d) {
|
|
89
91
|
case "brand":
|
|
90
92
|
return {
|
|
91
93
|
borderColor: "#2054A5",
|
|
92
94
|
background: "#FFF",
|
|
93
95
|
color: "#2054A5",
|
|
94
|
-
padding:
|
|
95
|
-
borderRadius: l[
|
|
96
|
+
padding: c[n],
|
|
97
|
+
borderRadius: l[n]
|
|
96
98
|
};
|
|
97
99
|
case "info":
|
|
98
100
|
return {
|
|
99
101
|
borderColor: "#2054A5",
|
|
100
102
|
background: "#EEF3FC",
|
|
101
103
|
color: "#2054A5",
|
|
102
|
-
padding:
|
|
103
|
-
borderRadius: l[
|
|
104
|
+
padding: c[n],
|
|
105
|
+
borderRadius: l[n]
|
|
104
106
|
};
|
|
105
107
|
case "new":
|
|
106
108
|
return {
|
|
107
109
|
borderColor: "#0F93A8",
|
|
108
110
|
background: "#D6F4F8",
|
|
109
111
|
color: "#065564",
|
|
110
|
-
padding:
|
|
111
|
-
borderRadius: l[
|
|
112
|
+
padding: c[n],
|
|
113
|
+
borderRadius: l[n]
|
|
112
114
|
};
|
|
113
115
|
case "pending":
|
|
114
116
|
return {
|
|
115
117
|
borderColor: "#CA8A04",
|
|
116
118
|
background: "#FEFDE8",
|
|
117
119
|
color: "#713F12",
|
|
118
|
-
padding:
|
|
119
|
-
borderRadius: l[
|
|
120
|
+
padding: c[n],
|
|
121
|
+
borderRadius: l[n]
|
|
120
122
|
};
|
|
121
123
|
case "positive":
|
|
122
124
|
return {
|
|
123
125
|
borderColor: "#65A30D",
|
|
124
126
|
background: "#F7FEE7",
|
|
125
127
|
color: "#365314",
|
|
126
|
-
padding:
|
|
127
|
-
borderRadius: l[
|
|
128
|
+
padding: c[n],
|
|
129
|
+
borderRadius: l[n]
|
|
128
130
|
};
|
|
129
131
|
case "warning":
|
|
130
132
|
return {
|
|
131
133
|
borderColor: "#EA580C",
|
|
132
134
|
background: "#FFEDD5",
|
|
133
135
|
color: "#7C2D12",
|
|
134
|
-
padding:
|
|
135
|
-
borderRadius: l[
|
|
136
|
+
padding: c[n],
|
|
137
|
+
borderRadius: l[n]
|
|
136
138
|
};
|
|
137
139
|
case "negative":
|
|
138
140
|
return {
|
|
139
141
|
borderColor: "#DC2626",
|
|
140
142
|
background: "#FEF2F2",
|
|
141
143
|
color: "#B91C1C",
|
|
142
|
-
padding:
|
|
143
|
-
borderRadius: l[
|
|
144
|
+
padding: c[n],
|
|
145
|
+
borderRadius: l[n]
|
|
144
146
|
};
|
|
145
147
|
default:
|
|
146
148
|
return {
|
|
147
149
|
borderColor: "#2054A5",
|
|
148
150
|
background: "#EEF3FC",
|
|
149
151
|
color: "#2054A5",
|
|
150
|
-
padding:
|
|
151
|
-
borderRadius: l[
|
|
152
|
+
padding: c[n],
|
|
153
|
+
borderRadius: l[n]
|
|
152
154
|
};
|
|
153
155
|
}
|
|
154
156
|
};
|
|
155
|
-
if (!
|
|
157
|
+
if (!a) return null;
|
|
156
158
|
const T = [
|
|
157
159
|
t.toast,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
].filter(Boolean).join(" "),
|
|
161
|
-
return /* @__PURE__ */
|
|
160
|
+
m ? t.exiting : t.entering,
|
|
161
|
+
I
|
|
162
|
+
].filter(Boolean).join(" "), o = $(y, r);
|
|
163
|
+
return /* @__PURE__ */ i(
|
|
162
164
|
"div",
|
|
163
165
|
{
|
|
164
166
|
className: T,
|
|
165
167
|
style: {
|
|
166
|
-
border: "1px solid " +
|
|
167
|
-
background:
|
|
168
|
-
padding:
|
|
169
|
-
borderRadius:
|
|
168
|
+
border: "1px solid " + o.borderColor,
|
|
169
|
+
background: o.background,
|
|
170
|
+
padding: o.padding,
|
|
171
|
+
borderRadius: o.borderRadius,
|
|
170
172
|
...k
|
|
171
173
|
},
|
|
172
174
|
role: "alert",
|
|
173
175
|
"aria-live": "polite",
|
|
174
|
-
children: /* @__PURE__ */
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
fill: n == null ? void 0 : n.color,
|
|
181
|
-
width: 25,
|
|
182
|
-
height: 25
|
|
183
|
-
}
|
|
184
|
-
) }),
|
|
185
|
-
/* @__PURE__ */ s("div", { className: t.content, children: [
|
|
186
|
-
C && /* @__PURE__ */ a(
|
|
176
|
+
children: /* @__PURE__ */ b(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
className: `${t.topRow} ${e ? t.withAction : ""} ${t[r]}`,
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ b(
|
|
187
182
|
"div",
|
|
188
183
|
{
|
|
189
|
-
className:
|
|
190
|
-
|
|
191
|
-
|
|
184
|
+
className: `${t.iconAndContent} ${e ? t.withAction : ""} ${t[r]}`,
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ i("div", { className: t.iconContainer, children: /* @__PURE__ */ i(
|
|
187
|
+
p,
|
|
188
|
+
{
|
|
189
|
+
name: B || "Info",
|
|
190
|
+
fill: o == null ? void 0 : o.color,
|
|
191
|
+
width: 25,
|
|
192
|
+
height: 25
|
|
193
|
+
}
|
|
194
|
+
) }),
|
|
195
|
+
/* @__PURE__ */ b("div", { className: t.content, children: [
|
|
196
|
+
x && /* @__PURE__ */ i(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
className: f[r].title,
|
|
200
|
+
style: { fontWeight: 600 },
|
|
201
|
+
children: x
|
|
202
|
+
}
|
|
203
|
+
),
|
|
204
|
+
h && /* @__PURE__ */ i(
|
|
205
|
+
"div",
|
|
206
|
+
{
|
|
207
|
+
className: f[r].body,
|
|
208
|
+
style: { color: o == null ? void 0 : o.color },
|
|
209
|
+
children: h
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
] })
|
|
213
|
+
]
|
|
192
214
|
}
|
|
193
215
|
),
|
|
194
|
-
|
|
195
|
-
"
|
|
216
|
+
e && /* @__PURE__ */ b(
|
|
217
|
+
"button",
|
|
196
218
|
{
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
219
|
+
type: "button",
|
|
220
|
+
onClick: () => {
|
|
221
|
+
var d;
|
|
222
|
+
return (d = e.function) == null ? void 0 : d.call(e);
|
|
223
|
+
},
|
|
224
|
+
className: `${f[r].actionButton} ${t.actionButton} ${e.icon ? t.withIcon : ""} ${t[r]}`,
|
|
225
|
+
style: {
|
|
226
|
+
border: `1px solid ${o == null ? void 0 : o.color}`,
|
|
227
|
+
color: o == null ? void 0 : o.color,
|
|
228
|
+
...v[r]
|
|
229
|
+
},
|
|
230
|
+
children: [
|
|
231
|
+
e.label,
|
|
232
|
+
e.icon && /* @__PURE__ */ i(p, { ...e.icon })
|
|
233
|
+
]
|
|
200
234
|
}
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
d && /* @__PURE__ */ s(
|
|
205
|
-
"button",
|
|
206
|
-
{
|
|
207
|
-
type: "button",
|
|
208
|
-
onClick: () => {
|
|
209
|
-
var c;
|
|
210
|
-
return (c = d.function) == null ? void 0 : c.call(d);
|
|
211
|
-
},
|
|
212
|
-
className: `${p[e].actionButton} ${t.actionButton} ${t[e]}`,
|
|
213
|
-
style: {
|
|
214
|
-
border: `1px solid ${n == null ? void 0 : n.color}`,
|
|
215
|
-
color: n == null ? void 0 : n.color,
|
|
216
|
-
...v[e]
|
|
217
|
-
},
|
|
218
|
-
children: [
|
|
219
|
-
d.label,
|
|
220
|
-
d.icon && /* @__PURE__ */ a(x, { ...d.icon })
|
|
221
|
-
]
|
|
222
|
-
}
|
|
223
|
-
),
|
|
224
|
-
B && /* @__PURE__ */ a(
|
|
225
|
-
"button",
|
|
226
|
-
{
|
|
227
|
-
type: "button",
|
|
228
|
-
className: t.closeButton,
|
|
229
|
-
onClick: _,
|
|
230
|
-
"aria-label": "Cerrar notificación",
|
|
231
|
-
children: /* @__PURE__ */ a(
|
|
232
|
-
x,
|
|
235
|
+
),
|
|
236
|
+
E && /* @__PURE__ */ i(
|
|
237
|
+
"button",
|
|
233
238
|
{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
239
|
+
type: "button",
|
|
240
|
+
className: t.closeButton,
|
|
241
|
+
onClick: _,
|
|
242
|
+
"aria-label": "Cerrar notificación",
|
|
243
|
+
children: /* @__PURE__ */ i(
|
|
244
|
+
p,
|
|
245
|
+
{
|
|
246
|
+
name: "CancelIcon",
|
|
247
|
+
fill: o == null ? void 0 : o.color,
|
|
248
|
+
width: 20,
|
|
249
|
+
height: 20
|
|
250
|
+
}
|
|
251
|
+
)
|
|
238
252
|
}
|
|
239
253
|
)
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
)
|
|
243
257
|
}
|
|
244
258
|
);
|
|
245
259
|
};
|
|
246
260
|
export {
|
|
247
|
-
|
|
261
|
+
S as StaticToast
|
|
248
262
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import '../../assets/Toast.css';const
|
|
6
|
-
toast:
|
|
1
|
+
import { jsx as d, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useState as R, useEffect as I } from "react";
|
|
3
|
+
import { createPortal as N } from "react-dom";
|
|
4
|
+
import { Icon as p } from "../../icons/Icon.js";
|
|
5
|
+
import '../../assets/Toast.css';const D = "_toast_17e9b_1", L = "_topRow_17e9b_17", P = "_large_17e9b_25", j = "_iconAndContent_17e9b_29", H = "_medium_17e9b_38", M = "_position_top_right_17e9b_43", W = "_position_top_left_17e9b_48", q = "_position_bottom_right_17e9b_53", G = "_position_bottom_left_17e9b_58", J = "_position_top_center_17e9b_63", K = "_position_bottom_center_17e9b_69", Q = "_iconContainer_17e9b_76", U = "_content_17e9b_87", X = "_title_17e9b_99", Y = "_actionButton_17e9b_106", Z = "_withIcon_17e9b_119", V = "_closeButton_17e9b_124", S = "_exiting_17e9b_142", z = "_slideOutToRight_17e9b_1", oo = "_entering_17e9b_148", to = "_slideInFromRight_17e9b_1", no = "_slideOutToLeft_17e9b_1", eo = "_slideInFromLeft_17e9b_1", io = "_slideOutToTop_17e9b_1", ro = "_slideInFromTop_17e9b_1", lo = "_slideOutToBottom_17e9b_1", so = "_slideInFromBottom_17e9b_1", co = "_withAction_17e9b_316", _o = "_small_17e9b_320", ao = "_body_17e9b_367", n = {
|
|
6
|
+
toast: D,
|
|
7
7
|
topRow: L,
|
|
8
8
|
large: P,
|
|
9
9
|
iconAndContent: j,
|
|
@@ -18,54 +18,56 @@ import '../../assets/Toast.css';const $ = "_toast_14awx_1", L = "_topRow_14awx_1
|
|
|
18
18
|
content: U,
|
|
19
19
|
title: X,
|
|
20
20
|
actionButton: Y,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
withIcon: Z,
|
|
22
|
+
closeButton: V,
|
|
23
|
+
exiting: S,
|
|
24
|
+
slideOutToRight: z,
|
|
25
|
+
entering: oo,
|
|
26
|
+
slideInFromRight: to,
|
|
27
|
+
slideOutToLeft: no,
|
|
28
|
+
slideInFromLeft: eo,
|
|
29
|
+
slideOutToTop: io,
|
|
30
|
+
slideInFromTop: ro,
|
|
31
|
+
slideOutToBottom: lo,
|
|
32
|
+
slideInFromBottom: so,
|
|
33
|
+
withAction: co,
|
|
34
|
+
small: _o,
|
|
33
35
|
body: ao
|
|
34
|
-
},
|
|
36
|
+
}, po = ({
|
|
35
37
|
type: B = "info",
|
|
36
|
-
title:
|
|
37
|
-
body:
|
|
38
|
-
duration:
|
|
38
|
+
title: h,
|
|
39
|
+
body: f,
|
|
40
|
+
duration: a = 5e3,
|
|
39
41
|
icon: T,
|
|
40
|
-
size:
|
|
41
|
-
position:
|
|
42
|
-
isVisible:
|
|
43
|
-
onClose:
|
|
44
|
-
autoClose:
|
|
45
|
-
closable:
|
|
46
|
-
className:
|
|
47
|
-
action:
|
|
42
|
+
size: i = "small",
|
|
43
|
+
position: A = "top-right",
|
|
44
|
+
isVisible: c = !0,
|
|
45
|
+
onClose: b,
|
|
46
|
+
autoClose: F = !0,
|
|
47
|
+
closable: w = !1,
|
|
48
|
+
className: y,
|
|
49
|
+
action: e
|
|
48
50
|
}) => {
|
|
49
|
-
const [
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
const [u, x] = R(c), [E, C] = R(!1), m = () => {
|
|
52
|
+
C(!0), setTimeout(() => {
|
|
53
|
+
x(!1), b == null || b();
|
|
52
54
|
}, 300);
|
|
53
55
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
if (
|
|
56
|
+
I(() => {
|
|
57
|
+
x(c), c && C(!1);
|
|
58
|
+
}, [c]), I(() => {
|
|
59
|
+
if (F && u && a > 0) {
|
|
58
60
|
const s = setTimeout(() => {
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
+
m();
|
|
62
|
+
}, a);
|
|
61
63
|
return () => clearTimeout(s);
|
|
62
64
|
}
|
|
63
|
-
}, [
|
|
64
|
-
const
|
|
65
|
+
}, [u, a, F]);
|
|
66
|
+
const r = {
|
|
65
67
|
small: "10px 4px 10px 8px",
|
|
66
68
|
medium: "14px 10px",
|
|
67
69
|
large: "14px 7px 14px 14px"
|
|
68
|
-
},
|
|
70
|
+
}, l = {
|
|
69
71
|
small: "16px",
|
|
70
72
|
medium: "16px",
|
|
71
73
|
large: "24px"
|
|
@@ -82,7 +84,7 @@ import '../../assets/Toast.css';const $ = "_toast_14awx_1", L = "_topRow_14awx_1
|
|
|
82
84
|
minHeight: "42px",
|
|
83
85
|
paddingInline: "14px"
|
|
84
86
|
}
|
|
85
|
-
},
|
|
87
|
+
}, g = {
|
|
86
88
|
small: {
|
|
87
89
|
title: "small2Medium",
|
|
88
90
|
actionButton: "small2Regular",
|
|
@@ -105,77 +107,77 @@ import '../../assets/Toast.css';const $ = "_toast_14awx_1", L = "_topRow_14awx_1
|
|
|
105
107
|
borderColor: "#2054A5",
|
|
106
108
|
background: "#FFF",
|
|
107
109
|
color: "#2054A5",
|
|
108
|
-
padding:
|
|
109
|
-
borderRadius:
|
|
110
|
+
padding: r[t],
|
|
111
|
+
borderRadius: l[t]
|
|
110
112
|
};
|
|
111
113
|
case "info":
|
|
112
114
|
return {
|
|
113
115
|
borderColor: "#2054A5",
|
|
114
116
|
background: "#EEF3FC",
|
|
115
117
|
color: "#2054A5",
|
|
116
|
-
padding:
|
|
117
|
-
borderRadius:
|
|
118
|
+
padding: r[t],
|
|
119
|
+
borderRadius: l[t]
|
|
118
120
|
};
|
|
119
121
|
case "new":
|
|
120
122
|
return {
|
|
121
123
|
borderColor: "#0F93A8",
|
|
122
124
|
background: "#D6F4F8",
|
|
123
125
|
color: "#065564",
|
|
124
|
-
padding:
|
|
125
|
-
borderRadius:
|
|
126
|
+
padding: r[t],
|
|
127
|
+
borderRadius: l[t]
|
|
126
128
|
};
|
|
127
129
|
case "pending":
|
|
128
130
|
return {
|
|
129
131
|
borderColor: "#CA8A04",
|
|
130
132
|
background: "#FEFDE8",
|
|
131
133
|
color: "#713F12",
|
|
132
|
-
padding:
|
|
133
|
-
borderRadius:
|
|
134
|
+
padding: r[t],
|
|
135
|
+
borderRadius: l[t]
|
|
134
136
|
};
|
|
135
137
|
case "positive":
|
|
136
138
|
return {
|
|
137
139
|
borderColor: "#65A30D",
|
|
138
140
|
background: "#F7FEE7",
|
|
139
141
|
color: "#365314",
|
|
140
|
-
padding:
|
|
141
|
-
borderRadius:
|
|
142
|
+
padding: r[t],
|
|
143
|
+
borderRadius: l[t]
|
|
142
144
|
};
|
|
143
145
|
case "warning":
|
|
144
146
|
return {
|
|
145
147
|
borderColor: "#EA580C",
|
|
146
148
|
background: "#FFEDD5",
|
|
147
149
|
color: "#7C2D12",
|
|
148
|
-
padding:
|
|
149
|
-
borderRadius:
|
|
150
|
+
padding: r[t],
|
|
151
|
+
borderRadius: l[t]
|
|
150
152
|
};
|
|
151
153
|
case "negative":
|
|
152
154
|
return {
|
|
153
155
|
borderColor: "#DC2626",
|
|
154
156
|
background: "#FEF2F2",
|
|
155
157
|
color: "#B91C1C",
|
|
156
|
-
padding:
|
|
157
|
-
borderRadius:
|
|
158
|
+
padding: r[t],
|
|
159
|
+
borderRadius: l[t]
|
|
158
160
|
};
|
|
159
161
|
default:
|
|
160
162
|
return {
|
|
161
163
|
borderColor: "#2054A5",
|
|
162
164
|
background: "#EEF3FC",
|
|
163
165
|
color: "#2054A5",
|
|
164
|
-
padding:
|
|
165
|
-
borderRadius:
|
|
166
|
+
padding: r[t],
|
|
167
|
+
borderRadius: l[t]
|
|
166
168
|
};
|
|
167
169
|
}
|
|
168
170
|
};
|
|
169
|
-
if (!
|
|
170
|
-
const
|
|
171
|
+
if (!u) return null;
|
|
172
|
+
const $ = [
|
|
171
173
|
n.toast,
|
|
172
|
-
n[`position_${
|
|
174
|
+
n[`position_${A.replace("-", "_")}`],
|
|
173
175
|
E ? n.exiting : n.entering,
|
|
174
|
-
|
|
175
|
-
].filter(Boolean).join(" "), o = O(B,
|
|
176
|
+
y
|
|
177
|
+
].filter(Boolean).join(" "), o = O(B, i), v = /* @__PURE__ */ d(
|
|
176
178
|
"div",
|
|
177
179
|
{
|
|
178
|
-
className:
|
|
180
|
+
className: $,
|
|
179
181
|
style: {
|
|
180
182
|
border: "1px solid " + o.borderColor,
|
|
181
183
|
background: o.background,
|
|
@@ -185,85 +187,97 @@ import '../../assets/Toast.css';const $ = "_toast_14awx_1", L = "_topRow_14awx_1
|
|
|
185
187
|
},
|
|
186
188
|
role: "alert",
|
|
187
189
|
"aria-live": "polite",
|
|
188
|
-
onClick:
|
|
189
|
-
children: /* @__PURE__ */
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
fill: o == null ? void 0 : o.color,
|
|
196
|
-
width: 25,
|
|
197
|
-
height: 25
|
|
198
|
-
}
|
|
199
|
-
) }),
|
|
200
|
-
/* @__PURE__ */ c("div", { className: n.content, children: [
|
|
201
|
-
b && /* @__PURE__ */ r(
|
|
190
|
+
onClick: m,
|
|
191
|
+
children: /* @__PURE__ */ _(
|
|
192
|
+
"div",
|
|
193
|
+
{
|
|
194
|
+
className: `${n.topRow} ${e ? n.withAction : ""} ${n[i]}`,
|
|
195
|
+
children: [
|
|
196
|
+
/* @__PURE__ */ _(
|
|
202
197
|
"div",
|
|
203
198
|
{
|
|
204
|
-
className:
|
|
205
|
-
|
|
206
|
-
|
|
199
|
+
className: `${n.iconAndContent} ${e ? n.withAction : ""} ${n[i]}`,
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ d("div", { className: n.iconContainer, children: /* @__PURE__ */ d(
|
|
202
|
+
p,
|
|
203
|
+
{
|
|
204
|
+
name: T || "Info",
|
|
205
|
+
fill: o == null ? void 0 : o.color,
|
|
206
|
+
width: 25,
|
|
207
|
+
height: 25
|
|
208
|
+
}
|
|
209
|
+
) }),
|
|
210
|
+
/* @__PURE__ */ _("div", { className: n.content, children: [
|
|
211
|
+
h && /* @__PURE__ */ d(
|
|
212
|
+
"div",
|
|
213
|
+
{
|
|
214
|
+
className: g[i].title,
|
|
215
|
+
style: { fontWeight: 600 },
|
|
216
|
+
children: h
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
f && /* @__PURE__ */ d(
|
|
220
|
+
"div",
|
|
221
|
+
{
|
|
222
|
+
className: g[i].body,
|
|
223
|
+
style: { color: o == null ? void 0 : o.color },
|
|
224
|
+
children: f
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
] })
|
|
228
|
+
]
|
|
207
229
|
}
|
|
208
230
|
),
|
|
209
|
-
|
|
210
|
-
"
|
|
231
|
+
e && /* @__PURE__ */ _(
|
|
232
|
+
"button",
|
|
211
233
|
{
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
234
|
+
type: "button",
|
|
235
|
+
onClick: (s) => {
|
|
236
|
+
var t;
|
|
237
|
+
s.stopPropagation(), (t = e.function) == null || t.call(e);
|
|
238
|
+
},
|
|
239
|
+
className: `${g[i].actionButton} ${n.actionButton} ${e.icon ? n.withIcon : ""} ${n[i]}`,
|
|
240
|
+
style: {
|
|
241
|
+
border: `1px solid ${o == null ? void 0 : o.borderColor}`,
|
|
242
|
+
color: o == null ? void 0 : o.color,
|
|
243
|
+
...k[i]
|
|
244
|
+
},
|
|
245
|
+
children: [
|
|
246
|
+
e.label,
|
|
247
|
+
e.icon && /* @__PURE__ */ d(p, { ...e.icon })
|
|
248
|
+
]
|
|
215
249
|
}
|
|
216
|
-
)
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
d && /* @__PURE__ */ c(
|
|
220
|
-
"button",
|
|
221
|
-
{
|
|
222
|
-
type: "button",
|
|
223
|
-
onClick: (s) => {
|
|
224
|
-
var t;
|
|
225
|
-
s.stopPropagation(), (t = d.function) == null || t.call(d);
|
|
226
|
-
},
|
|
227
|
-
className: `${p[l].actionButton} ${n.actionButton} ${n[l]}`,
|
|
228
|
-
style: {
|
|
229
|
-
border: `1px solid ${o == null ? void 0 : o.borderColor}`,
|
|
230
|
-
color: o == null ? void 0 : o.color,
|
|
231
|
-
...k[l]
|
|
232
|
-
},
|
|
233
|
-
children: [
|
|
234
|
-
d.label,
|
|
235
|
-
d.icon && /* @__PURE__ */ r(x, { ...d.icon })
|
|
236
|
-
]
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
y && /* @__PURE__ */ r(
|
|
240
|
-
"button",
|
|
241
|
-
{
|
|
242
|
-
type: "button",
|
|
243
|
-
className: n.closeButton,
|
|
244
|
-
onClick: (s) => {
|
|
245
|
-
s.stopPropagation(), g();
|
|
246
|
-
},
|
|
247
|
-
"aria-label": "Cerrar notificación",
|
|
248
|
-
children: /* @__PURE__ */ r(
|
|
249
|
-
x,
|
|
250
|
+
),
|
|
251
|
+
w && /* @__PURE__ */ d(
|
|
252
|
+
"button",
|
|
250
253
|
{
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
type: "button",
|
|
255
|
+
className: n.closeButton,
|
|
256
|
+
onClick: (s) => {
|
|
257
|
+
s.stopPropagation(), m();
|
|
258
|
+
},
|
|
259
|
+
"aria-label": "Cerrar notificación",
|
|
260
|
+
children: /* @__PURE__ */ d(
|
|
261
|
+
p,
|
|
262
|
+
{
|
|
263
|
+
name: "CancelIcon",
|
|
264
|
+
fill: o == null ? void 0 : o.color,
|
|
265
|
+
width: 20,
|
|
266
|
+
height: 20
|
|
267
|
+
}
|
|
268
|
+
)
|
|
255
269
|
}
|
|
256
270
|
)
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
)
|
|
260
274
|
}
|
|
261
275
|
);
|
|
262
|
-
return
|
|
263
|
-
|
|
276
|
+
return N(
|
|
277
|
+
v,
|
|
264
278
|
document.getElementById("root") || document.body
|
|
265
279
|
);
|
|
266
280
|
};
|
|
267
281
|
export {
|
|
268
|
-
|
|
282
|
+
po as Toast
|
|
269
283
|
};
|
package/package.json
CHANGED