bmi-next-brokers 2.9.2 → 2.9.4
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/assets/StaticToast.css +1 -1
- package/dist/assets/Toast.css +1 -1
- package/dist/components/StaticToast/StaticToast.js +87 -87
- package/dist/components/Toast/Toast.js +45 -45
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/Mouse.d.ts +3 -0
- package/dist/icons/components/Mouse.js +43 -0
- package/dist/icons/components/index.d.ts +1 -0
- package/dist/icons/components/index.js +122 -120
- package/dist/icons/index.d.ts +7 -6
- package/dist/icons/index.js +166 -164
- package/dist/{index-KJHuFJDv.js → index-CyMVMUHf.js} +156 -154
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._toast_jdmtd_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_jdmtd_18{display:flex;align-items:center;flex-wrap:wrap;width:100%}._iconAndContent_jdmtd_25{flex:1;min-width:0;display:flex;flex-direction:row;align-items:center;gap:10px}._iconAndContent_jdmtd_25._medium_jdmtd_34{gap:6px}._iconContainer_jdmtd_39{flex-shrink:0;width:24px;margin-left:5px;height:24px;display:flex;align-items:center;justify-content:center}._content_jdmtd_50{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_jdmtd_63{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;margin-left:10px}._actionButton_jdmtd_63._withIcon_jdmtd_77{justify-content:space-between}._actionButton_jdmtd_63._small_jdmtd_81{margin-right:4px}._actionButton_jdmtd_63._medium_jdmtd_34{margin-right:6px}._actionButton_jdmtd_63._large_jdmtd_89{margin-right:8px;margin-left:14px}._closeButton_jdmtd_95{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_jdmtd_95:active{transform:scale(.95)}._entering_jdmtd_113{animation:_staticToastIn_jdmtd_1 .3s cubic-bezier(.16,1,.3,1) forwards}._exiting_jdmtd_117{animation:_staticToastOut_jdmtd_1 .3s cubic-bezier(.4,0,1,1) forwards}@keyframes _staticToastIn_jdmtd_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_jdmtd_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_jdmtd_2,._entering_jdmtd_113,._exiting_jdmtd_117{animation:none!important}}._content_jdmtd_50:only-child,._content_jdmtd_50:not(:has(._body_jdmtd_158)){justify-content:center}@media (max-width: 720px){._topRow_jdmtd_18._withAction_jdmtd_163{align-items:flex-start}._topRow_jdmtd_18._small_jdmtd_81{align-items:center}._iconAndContent_jdmtd_25._withAction_jdmtd_163{align-items:flex-start}._iconAndContent_jdmtd_25._small_jdmtd_81{align-items:center}._closeButton_jdmtd_95{order:2}._actionButton_jdmtd_63{order:3;width:100%;margin-top:10px;margin-left:0}._actionButton_jdmtd_63._large_jdmtd_89{margin-top:14px;margin-left:0}}
|
package/dist/assets/Toast.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._toast_ke43t_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_ke43t_17{display:flex;align-items:center;flex-wrap:wrap;width:100%}._iconAndContent_ke43t_24{flex:1;min-width:0;display:flex;flex-direction:row;align-items:center;gap:10px}._iconAndContent_ke43t_24._medium_ke43t_33{gap:6px}._position_top_right_ke43t_38{top:1rem;right:1rem}._position_top_left_ke43t_43{top:1rem;left:1rem}._position_bottom_right_ke43t_48{bottom:1rem;right:1rem}._position_bottom_left_ke43t_53{bottom:1rem;left:1rem}._position_top_center_ke43t_58{top:1rem;left:50%;transform:translate(-50%)}._position_bottom_center_ke43t_64{bottom:1rem;left:50%;transform:translate(-50%)}._iconContainer_ke43t_71{flex-shrink:0;width:24px;margin-left:5px;height:24px;display:flex;align-items:center;justify-content:center}._content_ke43t_82{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_ke43t_94{font-weight:600;font-size:.9rem;color:#000}._actions_ke43t_100{display:flex;justify-content:center;align-items:center}._actionButton_ke43t_107{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;margin-left:10px}._actionButton_ke43t_107._withIcon_ke43t_121{justify-content:space-between}._actionButton_ke43t_107._small_ke43t_125{margin-right:4px}._actionButton_ke43t_107._medium_ke43t_33{margin-right:6px}._actionButton_ke43t_107._large_ke43t_133{margin-right:8px;margin-left:14px}._closeButton_ke43t_139{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_ke43t_139:active{transform:scale(.95)}._position_top_right_ke43t_38._exiting_ke43t_157,._position_bottom_right_ke43t_48._exiting_ke43t_157{animation:_slideOutToRight_ke43t_1 .3s cubic-bezier(.4,0,1,1) forwards}._position_top_right_ke43t_38._entering_ke43t_163,._position_bottom_right_ke43t_48._entering_ke43t_163{animation:_slideInFromRight_ke43t_1 .4s cubic-bezier(.16,1,.3,1) forwards}._position_top_left_ke43t_43._exiting_ke43t_157,._position_bottom_left_ke43t_53._exiting_ke43t_157{animation:_slideOutToLeft_ke43t_1 .3s cubic-bezier(.4,0,1,1) forwards}._position_top_left_ke43t_43._entering_ke43t_163,._position_bottom_left_ke43t_53._entering_ke43t_163{animation:_slideInFromLeft_ke43t_1 .4s cubic-bezier(.16,1,.3,1) forwards}._position_top_center_ke43t_58._exiting_ke43t_157{animation:_slideOutToTop_ke43t_1 .3s cubic-bezier(.4,0,1,1) forwards}._position_top_center_ke43t_58._entering_ke43t_163{animation:_slideInFromTop_ke43t_1 .4s cubic-bezier(.16,1,.3,1) forwards}._position_bottom_center_ke43t_64._exiting_ke43t_157{animation:_slideOutToBottom_ke43t_1 .3s cubic-bezier(.4,0,1,1) forwards}._position_bottom_center_ke43t_64._entering_ke43t_163{animation:_slideInFromBottom_ke43t_1 .4s cubic-bezier(.16,1,.3,1) forwards}@keyframes _slideInFromRight_ke43t_1{0%{transform:translate(100%);opacity:0;filter:blur(4px)}to{transform:translate(0);opacity:1;filter:blur(0)}}@keyframes _slideInFromLeft_ke43t_1{0%{transform:translate(-100%);opacity:0;filter:blur(4px)}to{transform:translate(0);opacity:1;filter:blur(0)}}@keyframes _slideInFromTop_ke43t_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_ke43t_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_ke43t_1{0%{transform:translate(0);opacity:1;filter:blur(0px)}to{transform:translate(120%);opacity:0;filter:blur(4px)}}@keyframes _slideOutToLeft_ke43t_1{0%{transform:translate(0);opacity:1;filter:blur(0px)}to{transform:translate(-120%);opacity:0;filter:blur(4px)}}@keyframes _slideOutToTop_ke43t_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_ke43t_1{0%{transform:translate(-50%) translateY(0);opacity:1;filter:blur(0px)}to{transform:translate(-50%) translateY(120%);opacity:0;filter:blur(4px)}}._toast_ke43t_1:hover{transition:all .2s cubic-bezier(.4,0,.2,1)}@media (max-width: 905px){._toast_ke43t_1{min-width:unset;max-width:unset;width:calc(100% - 1rem);left:0;right:0;margin-inline:auto}._toast_ke43t_1._position_top_center_ke43t_58,._toast_ke43t_1._position_bottom_center_ke43t_64{left:50%}}@media (max-width: 720px){._topRow_ke43t_17._withAction_ke43t_331{align-items:flex-start}._topRow_ke43t_17._small_ke43t_125{align-items:center}._iconAndContent_ke43t_24._withAction_ke43t_331{align-items:flex-start}._iconAndContent_ke43t_24._small_ke43t_125{align-items:center}._closeButton_ke43t_139{order:2}._actionButton_ke43t_107{order:3;width:100%;margin-top:10px;margin-left:0}._actionButton_ke43t_107._large_ke43t_133{margin-top:14px;margin-left:0}}@media (prefers-reduced-motion: reduce){._toast_ke43t_1{animation:none!important}._toast_ke43t_1:hover{transition:none}}._content_ke43t_82:only-child,._content_ke43t_82:not(:has(._body_ke43t_377)){justify-content:center}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { useState as A, useEffect as F } from "react";
|
|
3
|
-
import { Icon as
|
|
4
|
-
import '../../assets/StaticToast.css';const
|
|
5
|
-
toast:
|
|
6
|
-
topRow:
|
|
7
|
-
iconAndContent:
|
|
3
|
+
import { Icon as x } from "../../icons/Icon.js";
|
|
4
|
+
import '../../assets/StaticToast.css';const T = "_toast_jdmtd_2", N = "_topRow_jdmtd_18", D = "_iconAndContent_jdmtd_25", H = "_medium_jdmtd_34", M = "_iconContainer_jdmtd_39", O = "_content_jdmtd_50", P = "_actionButton_jdmtd_63", W = "_withIcon_jdmtd_77", q = "_small_jdmtd_81", G = "_large_jdmtd_89", J = "_closeButton_jdmtd_95", K = "_entering_jdmtd_113", L = "_staticToastIn_jdmtd_1", Q = "_exiting_jdmtd_117", U = "_staticToastOut_jdmtd_1", X = "_body_jdmtd_158", Y = "_withAction_jdmtd_163", n = {
|
|
5
|
+
toast: T,
|
|
6
|
+
topRow: N,
|
|
7
|
+
iconAndContent: D,
|
|
8
8
|
medium: H,
|
|
9
9
|
iconContainer: M,
|
|
10
10
|
content: O,
|
|
@@ -21,43 +21,43 @@ import '../../assets/StaticToast.css';const N = "_toast_fnryu_2", D = "_topRow_f
|
|
|
21
21
|
withAction: Y
|
|
22
22
|
}, z = ({
|
|
23
23
|
type: w = "info",
|
|
24
|
-
title:
|
|
25
|
-
body:
|
|
24
|
+
title: h,
|
|
25
|
+
body: C,
|
|
26
26
|
size: e = "small",
|
|
27
|
-
icon:
|
|
27
|
+
icon: y,
|
|
28
28
|
isVisible: u = !0,
|
|
29
|
-
closable:
|
|
30
|
-
onClose:
|
|
31
|
-
autoClose:
|
|
32
|
-
duration:
|
|
33
|
-
className:
|
|
34
|
-
style:
|
|
35
|
-
action:
|
|
29
|
+
closable: B = !1,
|
|
30
|
+
onClose: m,
|
|
31
|
+
autoClose: f = !1,
|
|
32
|
+
duration: g = 5e3,
|
|
33
|
+
className: E,
|
|
34
|
+
style: I,
|
|
35
|
+
action: d
|
|
36
36
|
}) => {
|
|
37
|
-
const [a,
|
|
37
|
+
const [a, R] = A(u), [_, j] = A(!1);
|
|
38
38
|
F(() => {
|
|
39
|
-
u ? (
|
|
39
|
+
u ? (j(!1), R(!0)) : a && b();
|
|
40
40
|
}, [u]), F(() => {
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
41
|
+
if (f && a && !_ && g > 0) {
|
|
42
|
+
const i = setTimeout(() => {
|
|
43
43
|
b();
|
|
44
|
-
},
|
|
45
|
-
return () => clearTimeout(
|
|
44
|
+
}, g);
|
|
45
|
+
return () => clearTimeout(i);
|
|
46
46
|
}
|
|
47
|
-
}, [a,
|
|
47
|
+
}, [a, g, f, _]);
|
|
48
48
|
const b = () => {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
j(!0), setTimeout(() => {
|
|
50
|
+
R(!1), m == null || m();
|
|
51
51
|
}, 300);
|
|
52
|
-
},
|
|
52
|
+
}, r = {
|
|
53
53
|
small: "10px 4px 10px 8px",
|
|
54
54
|
medium: "14px 10px",
|
|
55
55
|
large: "14px 7px 14px 14px"
|
|
56
|
-
},
|
|
56
|
+
}, c = {
|
|
57
57
|
small: "16px",
|
|
58
58
|
medium: "16px",
|
|
59
59
|
large: "24px"
|
|
60
|
-
},
|
|
60
|
+
}, k = {
|
|
61
61
|
small: {
|
|
62
62
|
minHeight: "30px",
|
|
63
63
|
paddingInline: "12px"
|
|
@@ -70,7 +70,7 @@ import '../../assets/StaticToast.css';const N = "_toast_fnryu_2", D = "_topRow_f
|
|
|
70
70
|
minHeight: "42px",
|
|
71
71
|
paddingInline: "14px"
|
|
72
72
|
}
|
|
73
|
-
},
|
|
73
|
+
}, p = {
|
|
74
74
|
small: {
|
|
75
75
|
title: "small2Medium",
|
|
76
76
|
actionButton: "small2Regular",
|
|
@@ -86,165 +86,165 @@ import '../../assets/StaticToast.css';const N = "_toast_fnryu_2", D = "_topRow_f
|
|
|
86
86
|
actionButton: "title6Regular",
|
|
87
87
|
body: "bodyRegular"
|
|
88
88
|
}
|
|
89
|
-
},
|
|
90
|
-
switch (
|
|
89
|
+
}, v = (i, o) => {
|
|
90
|
+
switch (i) {
|
|
91
91
|
case "brand":
|
|
92
92
|
return {
|
|
93
93
|
borderColor: "#2054A5",
|
|
94
94
|
background: "#FFF",
|
|
95
95
|
color: "#2054A5",
|
|
96
|
-
padding:
|
|
97
|
-
borderRadius:
|
|
96
|
+
padding: r[o],
|
|
97
|
+
borderRadius: c[o]
|
|
98
98
|
};
|
|
99
99
|
case "info":
|
|
100
100
|
return {
|
|
101
101
|
borderColor: "#2054A5",
|
|
102
102
|
background: "#EEF3FC",
|
|
103
103
|
color: "#2054A5",
|
|
104
|
-
padding:
|
|
105
|
-
borderRadius:
|
|
104
|
+
padding: r[o],
|
|
105
|
+
borderRadius: c[o]
|
|
106
106
|
};
|
|
107
107
|
case "new":
|
|
108
108
|
return {
|
|
109
109
|
borderColor: "#0F93A8",
|
|
110
110
|
background: "#D6F4F8",
|
|
111
111
|
color: "#065564",
|
|
112
|
-
padding:
|
|
113
|
-
borderRadius:
|
|
112
|
+
padding: r[o],
|
|
113
|
+
borderRadius: c[o]
|
|
114
114
|
};
|
|
115
115
|
case "pending":
|
|
116
116
|
return {
|
|
117
117
|
borderColor: "#CA8A04",
|
|
118
118
|
background: "#FEFDE8",
|
|
119
119
|
color: "#713F12",
|
|
120
|
-
padding:
|
|
121
|
-
borderRadius:
|
|
120
|
+
padding: r[o],
|
|
121
|
+
borderRadius: c[o]
|
|
122
122
|
};
|
|
123
123
|
case "positive":
|
|
124
124
|
return {
|
|
125
125
|
borderColor: "#65A30D",
|
|
126
126
|
background: "#F7FEE7",
|
|
127
127
|
color: "#365314",
|
|
128
|
-
padding:
|
|
129
|
-
borderRadius:
|
|
128
|
+
padding: r[o],
|
|
129
|
+
borderRadius: c[o]
|
|
130
130
|
};
|
|
131
131
|
case "warning":
|
|
132
132
|
return {
|
|
133
133
|
borderColor: "#EA580C",
|
|
134
134
|
background: "#FFEDD5",
|
|
135
135
|
color: "#7C2D12",
|
|
136
|
-
padding:
|
|
137
|
-
borderRadius:
|
|
136
|
+
padding: r[o],
|
|
137
|
+
borderRadius: c[o]
|
|
138
138
|
};
|
|
139
139
|
case "negative":
|
|
140
140
|
return {
|
|
141
141
|
borderColor: "#DC2626",
|
|
142
142
|
background: "#FEF2F2",
|
|
143
143
|
color: "#B91C1C",
|
|
144
|
-
padding:
|
|
145
|
-
borderRadius:
|
|
144
|
+
padding: r[o],
|
|
145
|
+
borderRadius: c[o]
|
|
146
146
|
};
|
|
147
147
|
default:
|
|
148
148
|
return {
|
|
149
149
|
borderColor: "#2054A5",
|
|
150
150
|
background: "#EEF3FC",
|
|
151
151
|
color: "#2054A5",
|
|
152
|
-
padding:
|
|
153
|
-
borderRadius:
|
|
152
|
+
padding: r[o],
|
|
153
|
+
borderRadius: c[o]
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
if (!a) return null;
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
_ ?
|
|
161
|
-
|
|
162
|
-
].filter(Boolean).join(" "),
|
|
163
|
-
return /* @__PURE__ */
|
|
158
|
+
const $ = [
|
|
159
|
+
n.toast,
|
|
160
|
+
_ ? n.exiting : n.entering,
|
|
161
|
+
E
|
|
162
|
+
].filter(Boolean).join(" "), t = v(w, e);
|
|
163
|
+
return /* @__PURE__ */ l(
|
|
164
164
|
"div",
|
|
165
165
|
{
|
|
166
|
-
className:
|
|
166
|
+
className: $,
|
|
167
167
|
style: {
|
|
168
|
-
border: "1px solid " +
|
|
169
|
-
background:
|
|
170
|
-
padding:
|
|
171
|
-
borderRadius:
|
|
172
|
-
...
|
|
168
|
+
border: "1px solid " + t.borderColor,
|
|
169
|
+
background: t.background,
|
|
170
|
+
padding: t.padding,
|
|
171
|
+
borderRadius: t.borderRadius,
|
|
172
|
+
...I
|
|
173
173
|
},
|
|
174
174
|
role: "alert",
|
|
175
175
|
"aria-live": "polite",
|
|
176
176
|
children: /* @__PURE__ */ s(
|
|
177
177
|
"div",
|
|
178
178
|
{
|
|
179
|
-
className: `${
|
|
179
|
+
className: `${n.topRow} ${d ? n.withAction : ""} ${n[e]}`,
|
|
180
180
|
children: [
|
|
181
181
|
/* @__PURE__ */ s(
|
|
182
182
|
"div",
|
|
183
183
|
{
|
|
184
|
-
className: `${
|
|
184
|
+
className: `${n.iconAndContent} ${d ? n.withAction : ""} ${n[e]}`,
|
|
185
185
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
|
|
186
|
+
/* @__PURE__ */ l("div", { className: n.iconContainer, children: /* @__PURE__ */ l(
|
|
187
|
+
x,
|
|
188
188
|
{
|
|
189
|
-
name:
|
|
190
|
-
fill:
|
|
189
|
+
name: y || "Info",
|
|
190
|
+
fill: t == null ? void 0 : t.color,
|
|
191
191
|
width: 25,
|
|
192
192
|
height: 25
|
|
193
193
|
}
|
|
194
194
|
) }),
|
|
195
|
-
/* @__PURE__ */ s("div", { className:
|
|
196
|
-
|
|
195
|
+
/* @__PURE__ */ s("div", { className: n.content, children: [
|
|
196
|
+
h && /* @__PURE__ */ l(
|
|
197
197
|
"div",
|
|
198
198
|
{
|
|
199
|
-
className:
|
|
199
|
+
className: p[e].title,
|
|
200
200
|
style: { fontWeight: 600 },
|
|
201
|
-
children:
|
|
201
|
+
children: h
|
|
202
202
|
}
|
|
203
203
|
),
|
|
204
|
-
|
|
204
|
+
C && /* @__PURE__ */ l(
|
|
205
205
|
"div",
|
|
206
206
|
{
|
|
207
|
-
className:
|
|
208
|
-
style: { color:
|
|
209
|
-
children:
|
|
207
|
+
className: p[e].body,
|
|
208
|
+
style: { color: t == null ? void 0 : t.color },
|
|
209
|
+
children: C
|
|
210
210
|
}
|
|
211
211
|
)
|
|
212
212
|
] })
|
|
213
213
|
]
|
|
214
214
|
}
|
|
215
215
|
),
|
|
216
|
-
|
|
216
|
+
d && /* @__PURE__ */ s(
|
|
217
217
|
"button",
|
|
218
218
|
{
|
|
219
219
|
type: "button",
|
|
220
220
|
onClick: () => {
|
|
221
|
-
var
|
|
222
|
-
return (
|
|
221
|
+
var i;
|
|
222
|
+
return (i = d.function) == null ? void 0 : i.call(d);
|
|
223
223
|
},
|
|
224
|
-
className: `${
|
|
224
|
+
className: `${p[e].actionButton} ${n.actionButton} ${d.icon ? n.withIcon : ""} ${n[e]}`,
|
|
225
225
|
style: {
|
|
226
|
-
border: `1px solid ${
|
|
227
|
-
color:
|
|
228
|
-
...
|
|
226
|
+
border: `1px solid ${t == null ? void 0 : t.color}`,
|
|
227
|
+
color: t == null ? void 0 : t.color,
|
|
228
|
+
...k[e]
|
|
229
229
|
},
|
|
230
230
|
children: [
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
d.label,
|
|
232
|
+
d.icon && /* @__PURE__ */ l(x, { ...d.icon })
|
|
233
233
|
]
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
|
-
|
|
236
|
+
B && /* @__PURE__ */ l(
|
|
237
237
|
"button",
|
|
238
238
|
{
|
|
239
239
|
type: "button",
|
|
240
|
-
className:
|
|
240
|
+
className: n.closeButton,
|
|
241
241
|
onClick: b,
|
|
242
242
|
"aria-label": "Cerrar notificación",
|
|
243
|
-
children: /* @__PURE__ */
|
|
244
|
-
|
|
243
|
+
children: /* @__PURE__ */ l(
|
|
244
|
+
x,
|
|
245
245
|
{
|
|
246
246
|
name: "CancelIcon",
|
|
247
|
-
fill:
|
|
247
|
+
fill: t == null ? void 0 : t.color,
|
|
248
248
|
width: 20,
|
|
249
249
|
height: 20
|
|
250
250
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as c, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as C, useEffect as R } from "react";
|
|
3
3
|
import { createPortal as N } from "react-dom";
|
|
4
|
-
import { Icon as
|
|
5
|
-
import '../../assets/Toast.css';const D = "
|
|
4
|
+
import { Icon as b } from "../../icons/Icon.js";
|
|
5
|
+
import '../../assets/Toast.css';const D = "_toast_ke43t_1", L = "_topRow_ke43t_17", P = "_iconAndContent_ke43t_24", j = "_medium_ke43t_33", H = "_position_top_right_ke43t_38", M = "_position_top_left_ke43t_43", W = "_position_bottom_right_ke43t_48", q = "_position_bottom_left_ke43t_53", G = "_position_top_center_ke43t_58", J = "_position_bottom_center_ke43t_64", K = "_iconContainer_ke43t_71", Q = "_content_ke43t_82", U = "_title_ke43t_94", X = "_actions_ke43t_100", Y = "_actionButton_ke43t_107", Z = "_withIcon_ke43t_121", V = "_small_ke43t_125", S = "_large_ke43t_133", z = "_closeButton_ke43t_139", oo = "_exiting_ke43t_157", to = "_slideOutToRight_ke43t_1", no = "_entering_ke43t_163", eo = "_slideInFromRight_ke43t_1", io = "_slideOutToLeft_ke43t_1", ro = "_slideInFromLeft_ke43t_1", lo = "_slideOutToTop_ke43t_1", co = "_slideInFromTop_ke43t_1", so = "_slideOutToBottom_ke43t_1", _o = "_slideInFromBottom_ke43t_1", ao = "_withAction_ke43t_331", uo = "_body_ke43t_377", n = {
|
|
6
6
|
toast: D,
|
|
7
7
|
topRow: L,
|
|
8
8
|
iconAndContent: P,
|
|
@@ -25,8 +25,8 @@ import '../../assets/Toast.css';const D = "_toast_ni99f_1", L = "_topRow_ni99f_1
|
|
|
25
25
|
exiting: oo,
|
|
26
26
|
slideOutToRight: to,
|
|
27
27
|
entering: no,
|
|
28
|
-
slideInFromRight:
|
|
29
|
-
slideOutToLeft:
|
|
28
|
+
slideInFromRight: eo,
|
|
29
|
+
slideOutToLeft: io,
|
|
30
30
|
slideInFromLeft: ro,
|
|
31
31
|
slideOutToTop: lo,
|
|
32
32
|
slideInFromTop: co,
|
|
@@ -34,36 +34,36 @@ import '../../assets/Toast.css';const D = "_toast_ni99f_1", L = "_topRow_ni99f_1
|
|
|
34
34
|
slideInFromBottom: _o,
|
|
35
35
|
withAction: ao,
|
|
36
36
|
body: uo
|
|
37
|
-
},
|
|
38
|
-
type:
|
|
39
|
-
title:
|
|
37
|
+
}, ko = ({
|
|
38
|
+
type: I = "info",
|
|
39
|
+
title: k,
|
|
40
40
|
body: h,
|
|
41
41
|
duration: a = 5e3,
|
|
42
|
-
icon:
|
|
43
|
-
size:
|
|
44
|
-
position:
|
|
42
|
+
icon: B,
|
|
43
|
+
size: i = "small",
|
|
44
|
+
position: T = "top-right",
|
|
45
45
|
isVisible: d = !0,
|
|
46
46
|
onClose: u,
|
|
47
|
-
autoClose:
|
|
48
|
-
closable:
|
|
49
|
-
className:
|
|
50
|
-
action:
|
|
47
|
+
autoClose: f = !0,
|
|
48
|
+
closable: A = !1,
|
|
49
|
+
className: w,
|
|
50
|
+
action: e
|
|
51
51
|
}) => {
|
|
52
|
-
const [m,
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const [m, F] = C(d), [y, x] = C(!1), g = () => {
|
|
53
|
+
x(!0), setTimeout(() => {
|
|
54
|
+
F(!1), u == null || u();
|
|
55
55
|
}, 300);
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, [d]),
|
|
60
|
-
if (
|
|
57
|
+
R(() => {
|
|
58
|
+
F(d), d && x(!1);
|
|
59
|
+
}, [d]), R(() => {
|
|
60
|
+
if (f && m && a > 0) {
|
|
61
61
|
const s = setTimeout(() => {
|
|
62
62
|
g();
|
|
63
63
|
}, a);
|
|
64
64
|
return () => clearTimeout(s);
|
|
65
65
|
}
|
|
66
|
-
}, [m, a,
|
|
66
|
+
}, [m, a, f]);
|
|
67
67
|
const r = {
|
|
68
68
|
small: "10px 4px 10px 8px",
|
|
69
69
|
medium: "14px 10px",
|
|
@@ -72,7 +72,7 @@ import '../../assets/Toast.css';const D = "_toast_ni99f_1", L = "_topRow_ni99f_1
|
|
|
72
72
|
small: "16px",
|
|
73
73
|
medium: "16px",
|
|
74
74
|
large: "24px"
|
|
75
|
-
},
|
|
75
|
+
}, E = {
|
|
76
76
|
small: {
|
|
77
77
|
minHeight: "30px",
|
|
78
78
|
paddingInline: "12px"
|
|
@@ -172,10 +172,10 @@ import '../../assets/Toast.css';const D = "_toast_ni99f_1", L = "_topRow_ni99f_1
|
|
|
172
172
|
if (!m) return null;
|
|
173
173
|
const $ = [
|
|
174
174
|
n.toast,
|
|
175
|
-
n[`position_${
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
].filter(Boolean).join(" "), o = O(
|
|
175
|
+
n[`position_${T.replace("-", "_")}`],
|
|
176
|
+
y ? n.exiting : n.entering,
|
|
177
|
+
w
|
|
178
|
+
].filter(Boolean).join(" "), o = O(I, i), v = /* @__PURE__ */ c(
|
|
179
179
|
"div",
|
|
180
180
|
{
|
|
181
181
|
className: $,
|
|
@@ -192,35 +192,35 @@ import '../../assets/Toast.css';const D = "_toast_ni99f_1", L = "_topRow_ni99f_1
|
|
|
192
192
|
children: /* @__PURE__ */ _(
|
|
193
193
|
"div",
|
|
194
194
|
{
|
|
195
|
-
className: `${n.topRow} ${
|
|
195
|
+
className: `${n.topRow} ${e ? n.withAction : ""} ${n[i]}`,
|
|
196
196
|
children: [
|
|
197
197
|
/* @__PURE__ */ _(
|
|
198
198
|
"div",
|
|
199
199
|
{
|
|
200
|
-
className: `${n.iconAndContent} ${
|
|
200
|
+
className: `${n.iconAndContent} ${e ? n.withAction : ""} ${n[i]}`,
|
|
201
201
|
children: [
|
|
202
202
|
/* @__PURE__ */ c("div", { className: n.iconContainer, children: /* @__PURE__ */ c(
|
|
203
|
-
|
|
203
|
+
b,
|
|
204
204
|
{
|
|
205
|
-
name:
|
|
205
|
+
name: B || "Info",
|
|
206
206
|
fill: o == null ? void 0 : o.color,
|
|
207
207
|
width: 25,
|
|
208
208
|
height: 25
|
|
209
209
|
}
|
|
210
210
|
) }),
|
|
211
211
|
/* @__PURE__ */ _("div", { className: n.content, children: [
|
|
212
|
-
|
|
212
|
+
k && /* @__PURE__ */ c(
|
|
213
213
|
"div",
|
|
214
214
|
{
|
|
215
|
-
className: p[
|
|
215
|
+
className: p[i].title,
|
|
216
216
|
style: { fontWeight: 600 },
|
|
217
|
-
children:
|
|
217
|
+
children: k
|
|
218
218
|
}
|
|
219
219
|
),
|
|
220
220
|
h && /* @__PURE__ */ c(
|
|
221
221
|
"div",
|
|
222
222
|
{
|
|
223
|
-
className: p[
|
|
223
|
+
className: p[i].body,
|
|
224
224
|
style: { color: o == null ? void 0 : o.color },
|
|
225
225
|
children: h
|
|
226
226
|
}
|
|
@@ -229,27 +229,27 @@ import '../../assets/Toast.css';const D = "_toast_ni99f_1", L = "_topRow_ni99f_1
|
|
|
229
229
|
]
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
|
-
|
|
232
|
+
e && /* @__PURE__ */ _(
|
|
233
233
|
"button",
|
|
234
234
|
{
|
|
235
235
|
type: "button",
|
|
236
236
|
onClick: (s) => {
|
|
237
237
|
var t;
|
|
238
|
-
s.stopPropagation(), (t =
|
|
238
|
+
s.stopPropagation(), (t = e.function) == null || t.call(e);
|
|
239
239
|
},
|
|
240
|
-
className: `${p[
|
|
240
|
+
className: `${p[i].actionButton} ${n.actionButton} ${e.icon ? n.withIcon : ""} ${n[i]}`,
|
|
241
241
|
style: {
|
|
242
242
|
border: `1px solid ${o == null ? void 0 : o.color}`,
|
|
243
243
|
color: o == null ? void 0 : o.color,
|
|
244
|
-
...
|
|
244
|
+
...E[i]
|
|
245
245
|
},
|
|
246
246
|
children: [
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
e.label,
|
|
248
|
+
e.icon && /* @__PURE__ */ c(b, { ...e.icon })
|
|
249
249
|
]
|
|
250
250
|
}
|
|
251
251
|
),
|
|
252
|
-
|
|
252
|
+
A && /* @__PURE__ */ c(
|
|
253
253
|
"button",
|
|
254
254
|
{
|
|
255
255
|
type: "button",
|
|
@@ -259,7 +259,7 @@ import '../../assets/Toast.css';const D = "_toast_ni99f_1", L = "_topRow_ni99f_1
|
|
|
259
259
|
},
|
|
260
260
|
"aria-label": "Cerrar notificación",
|
|
261
261
|
children: /* @__PURE__ */ c(
|
|
262
|
-
|
|
262
|
+
b,
|
|
263
263
|
{
|
|
264
264
|
name: "CancelIcon",
|
|
265
265
|
fill: o == null ? void 0 : o.color,
|
|
@@ -280,5 +280,5 @@ import '../../assets/Toast.css';const D = "_toast_ni99f_1", L = "_topRow_ni99f_1
|
|
|
280
280
|
);
|
|
281
281
|
};
|
|
282
282
|
export {
|
|
283
|
-
|
|
283
|
+
ko as Toast
|
|
284
284
|
};
|
package/dist/icons/Icon.js
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useId as h } from "react";
|
|
3
|
+
const a = (r) => {
|
|
4
|
+
const t = h();
|
|
5
|
+
return /* @__PURE__ */ s(
|
|
6
|
+
"svg",
|
|
7
|
+
{
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
fill: "none",
|
|
10
|
+
viewBox: "0 0 16 16",
|
|
11
|
+
width: "1em",
|
|
12
|
+
height: "1em",
|
|
13
|
+
...r,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ e(
|
|
16
|
+
"mask",
|
|
17
|
+
{
|
|
18
|
+
id: `${t}a`,
|
|
19
|
+
width: 16,
|
|
20
|
+
height: 16,
|
|
21
|
+
x: 0,
|
|
22
|
+
y: 0,
|
|
23
|
+
maskUnits: "userSpaceOnUse",
|
|
24
|
+
style: {
|
|
25
|
+
maskType: "alpha"
|
|
26
|
+
},
|
|
27
|
+
children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M0 0h16v16H0z" })
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ e("g", { mask: `url(#${t}a)`, children: /* @__PURE__ */ e(
|
|
31
|
+
"path",
|
|
32
|
+
{
|
|
33
|
+
fill: "currentColor",
|
|
34
|
+
d: "M8 14.666q-1.932 0-3.3-1.366-1.365-1.367-1.366-3.3V6q0-1.935 1.367-3.3Q6.066 1.333 8 1.333q1.933 0 3.3 1.367 1.366 1.365 1.366 3.3v4q0 1.934-1.366 3.3T8 14.666M8.668 6h2.667q0-1.2-.758-2.117a3.25 3.25 0 0 0-1.909-1.15zm-4 0h2.667V2.733a3.25 3.25 0 0 0-1.908 1.15A3.22 3.22 0 0 0 4.667 6m3.334 7.333q1.383 0 2.358-.975T11.334 10V7.333H4.667V10q0 1.383.975 2.358t2.359.975"
|
|
35
|
+
}
|
|
36
|
+
) })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
a as default
|
|
43
|
+
};
|
|
@@ -102,6 +102,7 @@ export { default as MastercardRounded } from './MastercardRounded';
|
|
|
102
102
|
export { default as Medical } from './Medical';
|
|
103
103
|
export { default as Menu } from './Menu';
|
|
104
104
|
export { default as MoreVert } from './MoreVert';
|
|
105
|
+
export { default as Mouse } from './Mouse';
|
|
105
106
|
export { default as NextIcon } from './NextIcon';
|
|
106
107
|
export { default as Notes } from './Notes';
|
|
107
108
|
export { default as Notifications } from './Notifications';
|