@ukpc-lib/react 0.12.5-dev.0 → 0.12.6

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.
Files changed (31) hide show
  1. package/dist/components/BaseBreadcrumb/index.d.ts +17 -0
  2. package/dist/components/FavoriteMenu/components/MenuItem.d.ts +4 -1
  3. package/dist/components/index.cjs +17 -22
  4. package/dist/components/index.js +2084 -1836
  5. package/dist/components/main.d.ts +1 -0
  6. package/dist/index.esm2017-CgX2g4fr.cjs +1078 -0
  7. package/dist/{index.esm2017-9e03f5b5.js → index.esm2017-D8jHeHt_.js} +18638 -18529
  8. package/dist/share/index.cjs +1 -1
  9. package/dist/share/index.js +1 -1
  10. package/package.json +7 -5
  11. package/web-components-bundle/access-denied/index.js +2 -2
  12. package/web-components-bundle/base-breadcrumbs/index.js +5 -0
  13. package/web-components-bundle/clsx-DB4S2d7J.js +22 -0
  14. package/web-components-bundle/favorite-menu/index.js +6 -9
  15. package/web-components-bundle/global-menu/index.js +5 -8
  16. package/web-components-bundle/global-topbar/index.js +8 -7
  17. package/web-components-bundle/has-permission/index.js +5 -9
  18. package/web-components-bundle/{index-c91ec106.js → index-B4uOLjGK.js} +361 -376
  19. package/web-components-bundle/{index-f530ed06.js → index-BSRZKjgR.js} +34340 -39104
  20. package/web-components-bundle/{index-51ba1ee1.js → index-BSe1av43.js} +3 -5
  21. package/web-components-bundle/index-BTy-Dpix.js +5413 -0
  22. package/web-components-bundle/page-not-found/index.js +3 -3
  23. package/web-components-bundle/react-to-web-component-CXwKHjZr.js +6388 -0
  24. package/web-components-bundle/react-toastify.esm-CrTD7cpE.js +320 -0
  25. package/web-components-bundle/setPrototypeOf-BVKdEITT.js +14 -0
  26. package/web-components-bundle/toast-config/index.js +2 -2
  27. package/web-components-bundle/toast-config-notification/index.js +3 -4
  28. package/dist/components/FavoriteMenu/data.json.d.ts +0 -2414
  29. package/dist/index.esm2017-3734a51e.cjs +0 -1101
  30. package/web-components-bundle/react-to-web-component-d5889290.js +0 -6388
  31. package/web-components-bundle/react-toastify.esm-d8df41b8.js +0 -339
@@ -1,339 +0,0 @@
1
- import { r as b, b as y } from "./react-to-web-component-d5889290.js";
2
- function ut(t) {
3
- var e, n, s = "";
4
- if (typeof t == "string" || typeof t == "number")
5
- s += t;
6
- else if (typeof t == "object")
7
- if (Array.isArray(t)) {
8
- var a = t.length;
9
- for (e = 0; e < a; e++)
10
- t[e] && (n = ut(t[e])) && (s && (s += " "), s += n);
11
- } else
12
- for (n in t)
13
- t[n] && (s && (s += " "), s += n);
14
- return s;
15
- }
16
- function F() {
17
- for (var t, e, n = 0, s = "", a = arguments.length; n < a; n++)
18
- (t = arguments[n]) && (e = ut(t)) && (s && (s += " "), s += e);
19
- return s;
20
- }
21
- const J = (t) => typeof t == "number" && !isNaN(t), q = (t) => typeof t == "string", k = (t) => typeof t == "function", nt = (t) => q(t) || k(t) ? t : null, it = (t) => b.isValidElement(t) || q(t) || k(t) || J(t);
22
- function vt(t, e, n) {
23
- n === void 0 && (n = 300);
24
- const { scrollHeight: s, style: a } = t;
25
- requestAnimationFrame(() => {
26
- a.minHeight = "initial", a.height = s + "px", a.transition = `all ${n}ms`, requestAnimationFrame(() => {
27
- a.height = "0", a.padding = "0", a.margin = "0", setTimeout(e, n);
28
- });
29
- });
30
- }
31
- function st(t) {
32
- let { enter: e, exit: n, appendPosition: s = !1, collapse: a = !0, collapseDuration: d = 300 } = t;
33
- return function(o) {
34
- let { children: E, position: p, preventExitTransition: _, done: u, nodeRef: C, isIn: I, playToast: N } = o;
35
- const m = s ? `${e}--${p}` : e, c = s ? `${n}--${p}` : n, T = b.useRef(0);
36
- return b.useLayoutEffect(() => {
37
- const f = C.current, l = m.split(" "), r = (g) => {
38
- g.target === C.current && (N(), f.removeEventListener("animationend", r), f.removeEventListener("animationcancel", r), T.current === 0 && g.type !== "animationcancel" && f.classList.remove(...l));
39
- };
40
- f.classList.add(...l), f.addEventListener("animationend", r), f.addEventListener("animationcancel", r);
41
- }, []), b.useEffect(() => {
42
- const f = C.current, l = () => {
43
- f.removeEventListener("animationend", l), a ? vt(f, u, d) : u();
44
- };
45
- I || (_ ? l() : (T.current = 1, f.className += ` ${c}`, f.addEventListener("animationend", l)));
46
- }, [I]), y.createElement(y.Fragment, null, E);
47
- };
48
- }
49
- function ct(t, e) {
50
- return t != null ? { content: t.content, containerId: t.props.containerId, id: t.props.toastId, theme: t.props.theme, type: t.props.type, data: t.props.data || {}, isLoading: t.props.isLoading, icon: t.props.icon, status: e } : {};
51
- }
52
- const $ = /* @__PURE__ */ new Map();
53
- let K = [];
54
- const lt = /* @__PURE__ */ new Set(), ht = (t) => lt.forEach((e) => e(t)), pt = () => $.size > 0;
55
- function ft(t, e) {
56
- var n;
57
- if (e)
58
- return !((n = $.get(e)) == null || !n.isToastActive(t));
59
- let s = !1;
60
- return $.forEach((a) => {
61
- a.isToastActive(t) && (s = !0);
62
- }), s;
63
- }
64
- function mt(t, e) {
65
- it(t) && (pt() || K.push({ content: t, options: e }), $.forEach((n) => {
66
- n.buildToast(t, e);
67
- }));
68
- }
69
- function dt(t, e) {
70
- $.forEach((n) => {
71
- e != null && e != null && e.containerId ? (e == null ? void 0 : e.containerId) === n.id && n.toggle(t, e == null ? void 0 : e.id) : n.toggle(t, e == null ? void 0 : e.id);
72
- });
73
- }
74
- function Et(t) {
75
- const { subscribe: e, getSnapshot: n, setProps: s } = b.useRef(function(d) {
76
- const o = d.containerId || 1;
77
- return { subscribe(E) {
78
- const p = function(u, C, I) {
79
- let N = 1, m = 0, c = [], T = [], f = [], l = C;
80
- const r = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set(), A = () => {
81
- f = Array.from(r.values()), g.forEach((i) => i());
82
- }, O = (i) => {
83
- T = i == null ? [] : T.filter((v) => v !== i), A();
84
- }, L = (i) => {
85
- const { toastId: v, onOpen: w, updateId: R, children: S } = i.props, Y = R == null;
86
- i.staleId && r.delete(i.staleId), r.set(v, i), T = [...T, i.props.toastId].filter((z) => z !== i.staleId), A(), I(ct(i, Y ? "added" : "updated")), Y && k(w) && w(b.isValidElement(S) && S.props);
87
- };
88
- return { id: u, props: l, observe: (i) => (g.add(i), () => g.delete(i)), toggle: (i, v) => {
89
- r.forEach((w) => {
90
- v != null && v !== w.props.toastId || k(w.toggle) && w.toggle(i);
91
- });
92
- }, removeToast: O, toasts: r, clearQueue: () => {
93
- m -= c.length, c = [];
94
- }, buildToast: (i, v) => {
95
- if (((M) => {
96
- let { containerId: P, toastId: x, updateId: B } = M;
97
- const V = P ? P !== u : u !== 1, U = r.has(x) && B == null;
98
- return V || U;
99
- })(v))
100
- return;
101
- const { toastId: w, updateId: R, data: S, staleId: Y, delay: z } = v, Q = () => {
102
- O(w);
103
- }, Z = R == null;
104
- Z && m++;
105
- const D = { ...l, style: l.toastStyle, key: N++, ...Object.fromEntries(Object.entries(v).filter((M) => {
106
- let [P, x] = M;
107
- return x != null;
108
- })), toastId: w, updateId: R, data: S, closeToast: Q, isIn: !1, className: nt(v.className || l.toastClassName), bodyClassName: nt(v.bodyClassName || l.bodyClassName), progressClassName: nt(v.progressClassName || l.progressClassName), autoClose: !v.isLoading && (H = v.autoClose, j = l.autoClose, H === !1 || J(H) && H > 0 ? H : j), deleteToast() {
109
- const M = r.get(w), { onClose: P, children: x } = M.props;
110
- k(P) && P(b.isValidElement(x) && x.props), I(ct(M, "removed")), r.delete(w), m--, m < 0 && (m = 0), c.length > 0 ? L(c.shift()) : A();
111
- } };
112
- var H, j;
113
- D.closeButton = l.closeButton, v.closeButton === !1 || it(v.closeButton) ? D.closeButton = v.closeButton : v.closeButton === !0 && (D.closeButton = !it(l.closeButton) || l.closeButton);
114
- let W = i;
115
- b.isValidElement(i) && !q(i.type) ? W = b.cloneElement(i, { closeToast: Q, toastProps: D, data: S }) : k(i) && (W = i({ closeToast: Q, toastProps: D, data: S }));
116
- const X = { content: W, props: D, staleId: Y };
117
- l.limit && l.limit > 0 && m > l.limit && Z ? c.push(X) : J(z) ? setTimeout(() => {
118
- L(X);
119
- }, z) : L(X);
120
- }, setProps(i) {
121
- l = i;
122
- }, setToggle: (i, v) => {
123
- r.get(i).toggle = v;
124
- }, isToastActive: (i) => T.some((v) => v === i), getSnapshot: () => f };
125
- }(o, d, ht);
126
- $.set(o, p);
127
- const _ = p.observe(E);
128
- return K.forEach((u) => mt(u.content, u.options)), K = [], () => {
129
- _(), $.delete(o);
130
- };
131
- }, setProps(E) {
132
- var p;
133
- (p = $.get(o)) == null || p.setProps(E);
134
- }, getSnapshot() {
135
- var E;
136
- return (E = $.get(o)) == null ? void 0 : E.getSnapshot();
137
- } };
138
- }(t)).current;
139
- s(t);
140
- const a = b.useSyncExternalStore(e, n, n);
141
- return { getToastToRender: function(d) {
142
- if (!a)
143
- return [];
144
- const o = /* @__PURE__ */ new Map();
145
- return t.newestOnTop && a.reverse(), a.forEach((E) => {
146
- const { position: p } = E.props;
147
- o.has(p) || o.set(p, []), o.get(p).push(E);
148
- }), Array.from(o, (E) => d(E[0], E[1]));
149
- }, isToastActive: ft, count: a == null ? void 0 : a.length };
150
- }
151
- function Tt(t) {
152
- const [e, n] = b.useState(!1), [s, a] = b.useState(!1), d = b.useRef(null), o = b.useRef({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, didMove: !1 }).current, { autoClose: E, pauseOnHover: p, closeToast: _, onClick: u, closeOnClick: C } = t;
153
- var I, N;
154
- function m() {
155
- n(!0);
156
- }
157
- function c() {
158
- n(!1);
159
- }
160
- function T(r) {
161
- const g = d.current;
162
- o.canDrag && g && (o.didMove = !0, e && c(), o.delta = t.draggableDirection === "x" ? r.clientX - o.start : r.clientY - o.start, o.start !== r.clientX && (o.canCloseOnClick = !1), g.style.transform = `translate3d(${t.draggableDirection === "x" ? `${o.delta}px, var(--y)` : `0, calc(${o.delta}px + var(--y))`},0)`, g.style.opacity = "" + (1 - Math.abs(o.delta / o.removalDistance)));
163
- }
164
- function f() {
165
- document.removeEventListener("pointermove", T), document.removeEventListener("pointerup", f);
166
- const r = d.current;
167
- if (o.canDrag && o.didMove && r) {
168
- if (o.canDrag = !1, Math.abs(o.delta) > o.removalDistance)
169
- return a(!0), t.closeToast(), void t.collapseAll();
170
- r.style.transition = "transform 0.2s, opacity 0.2s", r.style.removeProperty("transform"), r.style.removeProperty("opacity");
171
- }
172
- }
173
- (N = $.get((I = { id: t.toastId, containerId: t.containerId, fn: n }).containerId || 1)) == null || N.setToggle(I.id, I.fn), b.useEffect(() => {
174
- if (t.pauseOnFocusLoss)
175
- return document.hasFocus() || c(), window.addEventListener("focus", m), window.addEventListener("blur", c), () => {
176
- window.removeEventListener("focus", m), window.removeEventListener("blur", c);
177
- };
178
- }, [t.pauseOnFocusLoss]);
179
- const l = { onPointerDown: function(r) {
180
- if (t.draggable === !0 || t.draggable === r.pointerType) {
181
- o.didMove = !1, document.addEventListener("pointermove", T), document.addEventListener("pointerup", f);
182
- const g = d.current;
183
- o.canCloseOnClick = !0, o.canDrag = !0, g.style.transition = "none", t.draggableDirection === "x" ? (o.start = r.clientX, o.removalDistance = g.offsetWidth * (t.draggablePercent / 100)) : (o.start = r.clientY, o.removalDistance = g.offsetHeight * (t.draggablePercent === 80 ? 1.5 * t.draggablePercent : t.draggablePercent) / 100);
184
- }
185
- }, onPointerUp: function(r) {
186
- const { top: g, bottom: A, left: O, right: L } = d.current.getBoundingClientRect();
187
- r.nativeEvent.type !== "touchend" && t.pauseOnHover && r.clientX >= O && r.clientX <= L && r.clientY >= g && r.clientY <= A ? c() : m();
188
- } };
189
- return E && p && (l.onMouseEnter = c, t.stacked || (l.onMouseLeave = m)), C && (l.onClick = (r) => {
190
- u && u(r), o.canCloseOnClick && _();
191
- }), { playToast: m, pauseToast: c, isRunning: e, preventExitTransition: s, toastRef: d, eventHandlers: l };
192
- }
193
- function bt(t) {
194
- let { delay: e, isRunning: n, closeToast: s, type: a = "default", hide: d, className: o, style: E, controlledProgress: p, progress: _, rtl: u, isIn: C, theme: I } = t;
195
- const N = d || p && _ === 0, m = { ...E, animationDuration: `${e}ms`, animationPlayState: n ? "running" : "paused" };
196
- p && (m.transform = `scaleX(${_})`);
197
- const c = F("Toastify__progress-bar", p ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${I}`, `Toastify__progress-bar--${a}`, { "Toastify__progress-bar--rtl": u }), T = k(o) ? o({ rtl: u, type: a, defaultClassName: c }) : F(c, o), f = { [p && _ >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: p && _ < 1 ? null : () => {
198
- C && s();
199
- } };
200
- return y.createElement("div", { className: "Toastify__progress-bar--wrp", "data-hidden": N }, y.createElement("div", { className: `Toastify__progress-bar--bg Toastify__progress-bar-theme--${I} Toastify__progress-bar--${a}` }), y.createElement("div", { role: "progressbar", "aria-hidden": N ? "true" : "false", "aria-label": "notification timer", className: T, style: m, ...f }));
201
- }
202
- let It = 1;
203
- const gt = () => "" + It++;
204
- function _t(t) {
205
- return t && (q(t.toastId) || J(t.toastId)) ? t.toastId : gt();
206
- }
207
- function G(t, e) {
208
- return mt(t, e), e.toastId;
209
- }
210
- function ot(t, e) {
211
- return { ...e, type: e && e.type || t, toastId: _t(e) };
212
- }
213
- function tt(t) {
214
- return (e, n) => G(e, ot(t, n));
215
- }
216
- function h(t, e) {
217
- return G(t, ot("default", e));
218
- }
219
- h.loading = (t, e) => G(t, ot("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...e })), h.promise = function(t, e, n) {
220
- let s, { pending: a, error: d, success: o } = e;
221
- a && (s = q(a) ? h.loading(a, n) : h.loading(a.render, { ...n, ...a }));
222
- const E = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, p = (u, C, I) => {
223
- if (C == null)
224
- return void h.dismiss(s);
225
- const N = { type: u, ...E, ...n, data: I }, m = q(C) ? { render: C } : C;
226
- return s ? h.update(s, { ...N, ...m }) : h(m.render, { ...N, ...m }), I;
227
- }, _ = k(t) ? t() : t;
228
- return _.then((u) => p("success", o, u)).catch((u) => p("error", d, u)), _;
229
- }, h.success = tt("success"), h.info = tt("info"), h.error = tt("error"), h.warning = tt("warning"), h.warn = h.warning, h.dark = (t, e) => G(t, ot("default", { theme: "dark", ...e })), h.dismiss = function(t) {
230
- (function(e) {
231
- var n;
232
- if (pt()) {
233
- if (e == null || q(n = e) || J(n))
234
- $.forEach((s) => {
235
- s.removeToast(e);
236
- });
237
- else if (e && ("containerId" in e || "id" in e)) {
238
- const s = $.get(e.containerId);
239
- s ? s.removeToast(e.id) : $.forEach((a) => {
240
- a.removeToast(e.id);
241
- });
242
- }
243
- } else
244
- K = K.filter((s) => e != null && s.options.toastId !== e);
245
- })(t);
246
- }, h.clearWaitingQueue = function(t) {
247
- t === void 0 && (t = {}), $.forEach((e) => {
248
- !e.props.limit || t.containerId && e.id !== t.containerId || e.clearQueue();
249
- });
250
- }, h.isActive = ft, h.update = function(t, e) {
251
- e === void 0 && (e = {});
252
- const n = ((s, a) => {
253
- var d;
254
- let { containerId: o } = a;
255
- return (d = $.get(o || 1)) == null ? void 0 : d.toasts.get(s);
256
- })(t, e);
257
- if (n) {
258
- const { props: s, content: a } = n, d = { delay: 100, ...s, ...e, toastId: e.toastId || t, updateId: gt() };
259
- d.toastId !== t && (d.staleId = t);
260
- const o = d.render || a;
261
- delete d.render, G(o, d);
262
- }
263
- }, h.done = (t) => {
264
- h.update(t, { progress: 1 });
265
- }, h.onChange = function(t) {
266
- return lt.add(t), () => {
267
- lt.delete(t);
268
- };
269
- }, h.play = (t) => dt(!0, t), h.pause = (t) => dt(!1, t);
270
- const Ct = typeof window < "u" ? b.useLayoutEffect : b.useEffect, et = (t) => {
271
- let { theme: e, type: n, isLoading: s, ...a } = t;
272
- return y.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: e === "colored" ? "currentColor" : `var(--toastify-icon-color-${n})`, ...a });
273
- }, rt = { info: function(t) {
274
- return y.createElement(et, { ...t }, y.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
275
- }, warning: function(t) {
276
- return y.createElement(et, { ...t }, y.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
277
- }, success: function(t) {
278
- return y.createElement(et, { ...t }, y.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
279
- }, error: function(t) {
280
- return y.createElement(et, { ...t }, y.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
281
- }, spinner: function() {
282
- return y.createElement("div", { className: "Toastify__spinner" });
283
- } }, Lt = (t) => {
284
- const { isRunning: e, preventExitTransition: n, toastRef: s, eventHandlers: a, playToast: d } = Tt(t), { closeButton: o, children: E, autoClose: p, onClick: _, type: u, hideProgressBar: C, closeToast: I, transition: N, position: m, className: c, style: T, bodyClassName: f, bodyStyle: l, progressClassName: r, progressStyle: g, updateId: A, role: O, progress: L, rtl: i, toastId: v, deleteToast: w, isIn: R, isLoading: S, closeOnClick: Y, theme: z } = t, Q = F("Toastify__toast", `Toastify__toast-theme--${z}`, `Toastify__toast--${u}`, { "Toastify__toast--rtl": i }, { "Toastify__toast--close-on-click": Y }), Z = k(c) ? c({ rtl: i, position: m, type: u, defaultClassName: Q }) : F(Q, c), D = function(X) {
285
- let { theme: M, type: P, isLoading: x, icon: B } = X, V = null;
286
- const U = { theme: M, type: P };
287
- return B === !1 || (k(B) ? V = B({ ...U, isLoading: x }) : b.isValidElement(B) ? V = b.cloneElement(B, U) : x ? V = rt.spinner() : ((yt) => yt in rt)(P) && (V = rt[P](U))), V;
288
- }(t), H = !!L || !p, j = { closeToast: I, type: u, theme: z };
289
- let W = null;
290
- return o === !1 || (W = k(o) ? o(j) : b.isValidElement(o) ? b.cloneElement(o, j) : function(X) {
291
- let { closeToast: M, theme: P, ariaLabel: x = "close" } = X;
292
- return y.createElement("button", { className: `Toastify__close-button Toastify__close-button--${P}`, type: "button", onClick: (B) => {
293
- B.stopPropagation(), M(B);
294
- }, "aria-label": x }, y.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, y.createElement("path", { fillRule: "evenodd", d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z" })));
295
- }(j)), y.createElement(N, { isIn: R, done: w, position: m, preventExitTransition: n, nodeRef: s, playToast: d }, y.createElement("div", { id: v, onClick: _, "data-in": R, className: Z, ...a, style: T, ref: s }, y.createElement("div", { ...R && { role: O }, className: k(f) ? f({ type: u }) : F("Toastify__toast-body", f), style: l }, D != null && y.createElement("div", { className: F("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !S }) }, D), y.createElement("div", null, E)), W, y.createElement(bt, { ...A && !H ? { key: `pb-${A}` } : {}, rtl: i, theme: z, delay: p, isRunning: e, isIn: R, closeToast: I, hide: C, type: u, style: g, className: r, controlledProgress: H, progress: L || 0 })));
296
- }, at = function(t, e) {
297
- return e === void 0 && (e = !1), { enter: `Toastify--animate Toastify__${t}-enter`, exit: `Toastify--animate Toastify__${t}-exit`, appendPosition: e };
298
- }, Nt = st(at("bounce", !0));
299
- st(at("slide", !0));
300
- st(at("zoom"));
301
- st(at("flip"));
302
- const $t = { position: "top-right", transition: Nt, autoClose: 5e3, closeButton: !0, pauseOnHover: !0, pauseOnFocusLoss: !0, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light" };
303
- function kt(t) {
304
- let e = { ...$t, ...t };
305
- const n = t.stacked, [s, a] = b.useState(!0), d = b.useRef(null), { getToastToRender: o, isToastActive: E, count: p } = Et(e), { className: _, style: u, rtl: C, containerId: I } = e;
306
- function N(c) {
307
- const T = F("Toastify__toast-container", `Toastify__toast-container--${c}`, { "Toastify__toast-container--rtl": C });
308
- return k(_) ? _({ position: c, rtl: C, defaultClassName: T }) : F(T, nt(_));
309
- }
310
- function m() {
311
- n && (a(!0), h.play());
312
- }
313
- return Ct(() => {
314
- if (n) {
315
- var c;
316
- const T = d.current.querySelectorAll('[data-in="true"]'), f = 12, l = (c = e.position) == null ? void 0 : c.includes("top");
317
- let r = 0, g = 0;
318
- Array.from(T).reverse().forEach((A, O) => {
319
- const L = A;
320
- L.classList.add("Toastify__toast--stacked"), O > 0 && (L.dataset.collapsed = `${s}`), L.dataset.pos || (L.dataset.pos = l ? "top" : "bot");
321
- const i = r * (s ? 0.2 : 1) + (s ? 0 : f * O);
322
- L.style.setProperty("--y", `${l ? i : -1 * i}px`), L.style.setProperty("--g", `${f}`), L.style.setProperty("--s", "" + (1 - (s ? g : 0))), r += L.offsetHeight, g += 0.025;
323
- });
324
- }
325
- }, [s, p, n]), y.createElement("div", { ref: d, className: "Toastify", id: I, onMouseEnter: () => {
326
- n && (a(!1), h.pause());
327
- }, onMouseLeave: m }, o((c, T) => {
328
- const f = T.length ? { ...u } : { ...u, pointerEvents: "none" };
329
- return y.createElement("div", { className: N(c), style: f, key: `container-${c}` }, T.map((l) => {
330
- let { content: r, props: g } = l;
331
- return y.createElement(Lt, { ...g, stacked: n, collapseAll: m, isIn: E(g.toastId, g.containerId), style: g.style, key: `toast-${g.key}` }, r);
332
- }));
333
- }));
334
- }
335
- export {
336
- h as B,
337
- kt as Q,
338
- F as c
339
- };