welcome-ui 10.0.0-alpha.5 → 10.0.0-alpha.7

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/Textarea.js CHANGED
@@ -1,29 +1,35 @@
1
1
  "use client";
2
2
  import './Textarea.css';
3
- import { jsx as c } from "react/jsx-runtime";
4
- import { forwardRef as _ } from "react";
5
- import { useField as m } from "./Field.js";
6
- import { c as g } from "./index-PAaZGbyz.js";
7
- const v = "_root_rh62g_2", p = {
8
- root: v,
9
- "variant-danger": "_variant-danger_rh62g_35",
10
- "variant-warning": "_variant-warning_rh62g_38",
11
- "variant-success": "_variant-success_rh62g_41"
12
- }, f = g(p), l = _(
13
- ({ className: a, minRows: t = 5, variant: o, ...e }, n) => {
14
- const { getInputProps: s, variant: i } = m(), r = i || o;
15
- return /* @__PURE__ */ c(
3
+ import { jsx as _ } from "react/jsx-runtime";
4
+ import { forwardRef as f } from "react";
5
+ import { useField as v } from "./Field.js";
6
+ import { c as p } from "./index-PAaZGbyz.js";
7
+ const m = "_root_161f5_2", d = "_adaptative_161f5_45", l = {
8
+ root: m,
9
+ "variant-danger": "_variant-danger_161f5_36",
10
+ "variant-warning": "_variant-warning_161f5_39",
11
+ "variant-success": "_variant-success_161f5_42",
12
+ adaptative: d
13
+ }, x = p(l), u = f(
14
+ ({ className: t, isAdaptative: r = !1, minRows: e = 5, variant: o, ...s }, n) => {
15
+ const { getInputProps: i, variant: c } = v(), a = c || o;
16
+ return /* @__PURE__ */ _(
16
17
  "textarea",
17
18
  {
18
- className: f("root", r && `variant-${r}`, a),
19
+ className: x(
20
+ "root",
21
+ a && `variant-${a}`,
22
+ r && "adaptative",
23
+ t
24
+ ),
19
25
  ref: n,
20
- rows: t,
21
- ...s(e)
26
+ rows: e,
27
+ ...i(s)
22
28
  }
23
29
  );
24
30
  }
25
31
  );
26
- l.displayName = "Textarea";
32
+ u.displayName = "Textarea";
27
33
  export {
28
- l as Textarea
34
+ u as Textarea
29
35
  };
package/dist/Toast.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import './Toast.css';
3
- import { jsxs as z, jsx as y, Fragment as B } from "react/jsx-runtime";
3
+ import { jsxs as k, jsx as y, Fragment as B } from "react/jsx-runtime";
4
4
  import * as f from "react";
5
5
  import { useRef as Y, useCallback as j, useEffect as S, useState as fe, forwardRef as Z, cloneElement as ge } from "react";
6
6
  import { c as L } from "./index-PAaZGbyz.js";
7
7
  import { Button as K } from "./Button.js";
8
8
  import { CloseButton as Q } from "./CloseButton.js";
9
9
  import { Icon as V } from "./Icon.js";
10
- import { Text as P } from "./Text.js";
10
+ import { Text as C } from "./Text.js";
11
11
  import { f as J } from "./forwardRefWithAs-8eP3ZN15.js";
12
12
  let ye = { data: "" }, be = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || ye, he = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, ve = /\/\*[^]*?\*\/| +/g, W = /\n+/g, w = (e, t) => {
13
13
  let a = "", s = "", i = "";
@@ -25,21 +25,21 @@ let ye = { data: "" }, be = (e) => typeof window == "object" ? ((e ? e.querySele
25
25
  return e;
26
26
  }, xe = (e, t, a, s, i) => {
27
27
  let o = X(e), r = v[o] || (v[o] = ((l) => {
28
- let c = 0, d = 11;
29
- for (; c < l.length; ) d = 101 * d + l.charCodeAt(c++) >>> 0;
30
- return "go" + d;
28
+ let p = 0, c = 11;
29
+ for (; p < l.length; ) c = 101 * c + l.charCodeAt(p++) >>> 0;
30
+ return "go" + c;
31
31
  })(o));
32
32
  if (!v[r]) {
33
- let l = o !== e ? e : ((c) => {
34
- let d, p, u = [{}];
35
- for (; d = he.exec(c.replace(ve, "")); ) d[4] ? u.shift() : d[3] ? (p = d[3].replace(W, " ").trim(), u.unshift(u[0][p] = u[0][p] || {})) : u[0][d[1]] = d[2].replace(W, " ").trim();
36
- return u[0];
33
+ let l = o !== e ? e : ((p) => {
34
+ let c, d, m = [{}];
35
+ for (; c = he.exec(p.replace(ve, "")); ) c[4] ? m.shift() : c[3] ? (d = c[3].replace(W, " ").trim(), m.unshift(m[0][d] = m[0][d] || {})) : m[0][c[1]] = c[2].replace(W, " ").trim();
36
+ return m[0];
37
37
  })(e);
38
38
  v[r] = w(i ? { ["@keyframes " + r]: l } : l, a ? "" : "." + r);
39
39
  }
40
40
  let n = a && v.g ? v.g : null;
41
- return a && (v.g = v[r]), ((l, c, d, p) => {
42
- p ? c.data = c.data.replace(p, l) : c.data.indexOf(l) === -1 && (c.data = d ? l + c.data : c.data + l);
41
+ return a && (v.g = v[r]), ((l, p, c, d) => {
42
+ d ? p.data = p.data.replace(d, l) : p.data.indexOf(l) === -1 && (p.data = c ? l + p.data : p.data + l);
43
43
  })(v[r], t, s, n), r;
44
44
  }, we = (e, t, a) => e.reduce((s, i, o) => {
45
45
  let r = t[o];
@@ -49,13 +49,13 @@ let ye = { data: "" }, be = (e) => typeof window == "object" ? ((e ? e.querySele
49
49
  }
50
50
  return s + i + (r ?? "");
51
51
  }, "");
52
- function C(e) {
52
+ function A(e) {
53
53
  let t = this || {}, a = e.call ? e(t.p) : e;
54
54
  return xe(a.unshift ? a.raw ? we(a, [].slice.call(arguments, 1), t.p) : a.reduce((s, i) => Object.assign(s, i && i.call ? i(t.p) : i), {}) : a, be(t.target), t.g, t.o, t.k);
55
55
  }
56
56
  let ee, R, F;
57
- C.bind({ g: 1 });
58
- let x = C.bind({ k: 1 });
57
+ A.bind({ g: 1 });
58
+ let x = A.bind({ k: 1 });
59
59
  function _e(e, t, a, s) {
60
60
  w.p = t, ee = e, R = a, F = s;
61
61
  }
@@ -65,14 +65,14 @@ function _(e, t) {
65
65
  let s = arguments;
66
66
  function i(o, r) {
67
67
  let n = Object.assign({}, o), l = n.className || i.className;
68
- a.p = Object.assign({ theme: R && R() }, n), a.o = / *go\d+/.test(l), n.className = C.apply(a, s) + (l ? " " + l : "");
69
- let c = e;
70
- return e[0] && (c = n.as || e, delete n.as), F && c[0] && F(n), ee(c, n);
68
+ a.p = Object.assign({ theme: R && R() }, n), a.o = / *go\d+/.test(l), n.className = A.apply(a, s) + (l ? " " + l : "");
69
+ let p = e;
70
+ return e[0] && (p = n.as || e, delete n.as), F && p[0] && F(n), ee(p, n);
71
71
  }
72
72
  return i;
73
73
  };
74
74
  }
75
- var Ne = (e) => typeof e == "function", A = (e, t) => Ne(e) ? e(t) : e, je = /* @__PURE__ */ (() => {
75
+ var Ne = (e) => typeof e == "function", D = (e, t) => Ne(e) ? e(t) : e, je = /* @__PURE__ */ (() => {
76
76
  let e = 0;
77
77
  return () => (++e).toString();
78
78
  })(), te = /* @__PURE__ */ (() => {
@@ -84,7 +84,7 @@ var Ne = (e) => typeof e == "function", A = (e, t) => Ne(e) ? e(t) : e, je = /*
84
84
  }
85
85
  return e;
86
86
  };
87
- })(), ze = 20, M = "default", ae = (e, t) => {
87
+ })(), ke = 20, M = "default", ae = (e, t) => {
88
88
  let { toastLimit: a } = e.settings;
89
89
  switch (t.type) {
90
90
  case 0:
@@ -105,11 +105,11 @@ var Ne = (e) => typeof e == "function", A = (e, t) => Ne(e) ? e(t) : e, je = /*
105
105
  let o = t.time - (e.pausedAt || 0);
106
106
  return { ...e, pausedAt: void 0, toasts: e.toasts.map((r) => ({ ...r, pauseDuration: r.pauseDuration + o })) };
107
107
  }
108
- }, O = [], re = { toasts: [], pausedAt: void 0, settings: { toastLimit: ze } }, h = {}, se = (e, t = M) => {
108
+ }, O = [], re = { toasts: [], pausedAt: void 0, settings: { toastLimit: ke } }, h = {}, se = (e, t = M) => {
109
109
  h[t] = ae(h[t] || re, e), O.forEach(([a, s]) => {
110
110
  a === t && s(h[t]);
111
111
  });
112
- }, oe = (e) => Object.keys(h).forEach((t) => se(e, t)), ke = (e) => Object.keys(h).find((t) => h[t].toasts.some((a) => a.id === e)), D = (e = M) => (t) => {
112
+ }, oe = (e) => Object.keys(h).forEach((t) => se(e, t)), ze = (e) => Object.keys(h).find((t) => h[t].toasts.some((a) => a.id === e)), q = (e = M) => (t) => {
113
113
  se(t, e);
114
114
  }, $e = { blank: 4e3, error: 4e3, success: 2e3, loading: 1 / 0, custom: 4e3 }, Ee = (e = {}, t = M) => {
115
115
  let [a, s] = fe(h[t] || re), i = Y(h[t]);
@@ -118,81 +118,81 @@ var Ne = (e) => typeof e == "function", A = (e, t) => Ne(e) ? e(t) : e, je = /*
118
118
  r > -1 && O.splice(r, 1);
119
119
  }), [t]);
120
120
  let o = a.toasts.map((r) => {
121
- var n, l, c;
122
- return { ...e, ...e[r.type], ...r, removeDelay: r.removeDelay || ((n = e[r.type]) == null ? void 0 : n.removeDelay) || (e == null ? void 0 : e.removeDelay), duration: r.duration || ((l = e[r.type]) == null ? void 0 : l.duration) || (e == null ? void 0 : e.duration) || $e[r.type], style: { ...e.style, ...(c = e[r.type]) == null ? void 0 : c.style, ...r.style } };
121
+ var n, l, p;
122
+ return { ...e, ...e[r.type], ...r, removeDelay: r.removeDelay || ((n = e[r.type]) == null ? void 0 : n.removeDelay) || (e == null ? void 0 : e.removeDelay), duration: r.duration || ((l = e[r.type]) == null ? void 0 : l.duration) || (e == null ? void 0 : e.duration) || $e[r.type], style: { ...e.style, ...(p = e[r.type]) == null ? void 0 : p.style, ...r.style } };
123
123
  });
124
124
  return { ...a, toasts: o };
125
125
  }, Te = (e, t = "blank", a) => ({ createdAt: Date.now(), visible: !0, dismissed: !1, type: t, ariaProps: { role: "status", "aria-live": "polite" }, message: e, pauseDuration: 0, ...a, id: (a == null ? void 0 : a.id) || je() }), $ = (e) => (t, a) => {
126
126
  let s = Te(t, e, a);
127
- return D(s.toasterId || ke(s.id))({ type: 2, toast: s }), s.id;
128
- }, m = (e, t) => $("blank")(e, t);
129
- m.error = $("error");
130
- m.success = $("success");
131
- m.loading = $("loading");
132
- m.custom = $("custom");
133
- m.dismiss = (e, t) => {
127
+ return q(s.toasterId || ze(s.id))({ type: 2, toast: s }), s.id;
128
+ }, u = (e, t) => $("blank")(e, t);
129
+ u.error = $("error");
130
+ u.success = $("success");
131
+ u.loading = $("loading");
132
+ u.custom = $("custom");
133
+ u.dismiss = (e, t) => {
134
134
  let a = { type: 3, toastId: e };
135
- t ? D(t)(a) : oe(a);
135
+ t ? q(t)(a) : oe(a);
136
136
  };
137
- m.dismissAll = (e) => m.dismiss(void 0, e);
138
- m.remove = (e, t) => {
137
+ u.dismissAll = (e) => u.dismiss(void 0, e);
138
+ u.remove = (e, t) => {
139
139
  let a = { type: 4, toastId: e };
140
- t ? D(t)(a) : oe(a);
140
+ t ? q(t)(a) : oe(a);
141
141
  };
142
- m.removeAll = (e) => m.remove(void 0, e);
143
- m.promise = (e, t, a) => {
144
- let s = m.loading(t.loading, { ...a, ...a == null ? void 0 : a.loading });
142
+ u.removeAll = (e) => u.remove(void 0, e);
143
+ u.promise = (e, t, a) => {
144
+ let s = u.loading(t.loading, { ...a, ...a == null ? void 0 : a.loading });
145
145
  return typeof e == "function" && (e = e()), e.then((i) => {
146
- let o = t.success ? A(t.success, i) : void 0;
147
- return o ? m.success(o, { id: s, ...a, ...a == null ? void 0 : a.success }) : m.dismiss(s), i;
146
+ let o = t.success ? D(t.success, i) : void 0;
147
+ return o ? u.success(o, { id: s, ...a, ...a == null ? void 0 : a.success }) : u.dismiss(s), i;
148
148
  }).catch((i) => {
149
- let o = t.error ? A(t.error, i) : void 0;
150
- o ? m.error(o, { id: s, ...a, ...a == null ? void 0 : a.error }) : m.dismiss(s);
149
+ let o = t.error ? D(t.error, i) : void 0;
150
+ o ? u.error(o, { id: s, ...a, ...a == null ? void 0 : a.error }) : u.dismiss(s);
151
151
  }), e;
152
152
  };
153
- var Oe = 1e3, Ae = (e, t = "default") => {
154
- let { toasts: a, pausedAt: s } = Ee(e, t), i = Y(/* @__PURE__ */ new Map()).current, o = j((p, u = Oe) => {
155
- if (i.has(p)) return;
153
+ var Oe = 1e3, De = (e, t = "default") => {
154
+ let { toasts: a, pausedAt: s } = Ee(e, t), i = Y(/* @__PURE__ */ new Map()).current, o = j((d, m = Oe) => {
155
+ if (i.has(d)) return;
156
156
  let g = setTimeout(() => {
157
- i.delete(p), r({ type: 4, toastId: p });
158
- }, u);
159
- i.set(p, g);
157
+ i.delete(d), r({ type: 4, toastId: d });
158
+ }, m);
159
+ i.set(d, g);
160
160
  }, []);
161
161
  S(() => {
162
162
  if (s) return;
163
- let p = Date.now(), u = a.map((g) => {
163
+ let d = Date.now(), m = a.map((g) => {
164
164
  if (g.duration === 1 / 0) return;
165
- let E = (g.duration || 0) + g.pauseDuration - (p - g.createdAt);
165
+ let E = (g.duration || 0) + g.pauseDuration - (d - g.createdAt);
166
166
  if (E < 0) {
167
- g.visible && m.dismiss(g.id);
167
+ g.visible && u.dismiss(g.id);
168
168
  return;
169
169
  }
170
- return setTimeout(() => m.dismiss(g.id, t), E);
170
+ return setTimeout(() => u.dismiss(g.id, t), E);
171
171
  });
172
172
  return () => {
173
- u.forEach((g) => g && clearTimeout(g));
173
+ m.forEach((g) => g && clearTimeout(g));
174
174
  };
175
175
  }, [a, s, t]);
176
- let r = j(D(t), [t]), n = j(() => {
176
+ let r = j(q(t), [t]), n = j(() => {
177
177
  r({ type: 5, time: Date.now() });
178
- }, [r]), l = j((p, u) => {
179
- r({ type: 1, toast: { id: p, height: u } });
180
- }, [r]), c = j(() => {
178
+ }, [r]), l = j((d, m) => {
179
+ r({ type: 1, toast: { id: d, height: m } });
180
+ }, [r]), p = j(() => {
181
181
  s && r({ type: 6, time: Date.now() });
182
- }, [s, r]), d = j((p, u) => {
183
- let { reverseOrder: g = !1, gutter: E = 8, defaultPosition: G } = u || {}, q = a.filter((b) => (b.position || G) === (p.position || G) && b.height), ue = q.findIndex((b) => b.id === p.id), U = q.filter((b, I) => I < ue && b.visible).length;
184
- return q.filter((b) => b.visible).slice(...g ? [U + 1] : [0, U]).reduce((b, I) => b + (I.height || 0) + E, 0);
182
+ }, [s, r]), c = j((d, m) => {
183
+ let { reverseOrder: g = !1, gutter: E = 8, defaultPosition: G } = m || {}, I = a.filter((b) => (b.position || G) === (d.position || G) && b.height), me = I.findIndex((b) => b.id === d.id), U = I.filter((b, P) => P < me && b.visible).length;
184
+ return I.filter((b) => b.visible).slice(...g ? [U + 1] : [0, U]).reduce((b, P) => b + (P.height || 0) + E, 0);
185
185
  }, [a]);
186
186
  return S(() => {
187
- a.forEach((p) => {
188
- if (p.dismissed) o(p.id, p.removeDelay);
187
+ a.forEach((d) => {
188
+ if (d.dismissed) o(d.id, d.removeDelay);
189
189
  else {
190
- let u = i.get(p.id);
191
- u && (clearTimeout(u), i.delete(p.id));
190
+ let m = i.get(d.id);
191
+ m && (clearTimeout(m), i.delete(d.id));
192
192
  }
193
193
  });
194
- }, [a, o]), { toasts: a, handlers: { updateHeight: l, startPause: n, endPause: c, calculateOffset: d } };
195
- }, Ce = x`
194
+ }, [a, o]), { toasts: a, handlers: { updateHeight: l, startPause: n, endPause: p, calculateOffset: c } };
195
+ }, Ae = x`
196
196
  from {
197
197
  transform: scale(0) rotate(45deg);
198
198
  opacity: 0;
@@ -200,7 +200,7 @@ from {
200
200
  to {
201
201
  transform: scale(1) rotate(45deg);
202
202
  opacity: 1;
203
- }`, De = x`
203
+ }`, qe = x`
204
204
  from {
205
205
  transform: scale(0);
206
206
  opacity: 0;
@@ -208,7 +208,7 @@ from {
208
208
  to {
209
209
  transform: scale(1);
210
210
  opacity: 1;
211
- }`, qe = x`
211
+ }`, Ie = x`
212
212
  from {
213
213
  transform: scale(0) rotate(90deg);
214
214
  opacity: 0;
@@ -216,7 +216,7 @@ from {
216
216
  to {
217
217
  transform: scale(1) rotate(90deg);
218
218
  opacity: 1;
219
- }`, Ie = _("div")`
219
+ }`, Pe = _("div")`
220
220
  width: 20px;
221
221
  opacity: 0;
222
222
  height: 20px;
@@ -225,14 +225,14 @@ to {
225
225
  position: relative;
226
226
  transform: rotate(45deg);
227
227
 
228
- animation: ${Ce} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
228
+ animation: ${Ae} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
229
229
  forwards;
230
230
  animation-delay: 100ms;
231
231
 
232
232
  &:after,
233
233
  &:before {
234
234
  content: '';
235
- animation: ${De} 0.15s ease-out forwards;
235
+ animation: ${qe} 0.15s ease-out forwards;
236
236
  animation-delay: 150ms;
237
237
  position: absolute;
238
238
  border-radius: 3px;
@@ -245,7 +245,7 @@ to {
245
245
  }
246
246
 
247
247
  &:before {
248
- animation: ${qe} 0.15s ease-out forwards;
248
+ animation: ${Ie} 0.15s ease-out forwards;
249
249
  animation-delay: 180ms;
250
250
  transform: rotate(90deg);
251
251
  }
@@ -256,7 +256,7 @@ to {
256
256
  to {
257
257
  transform: rotate(360deg);
258
258
  }
259
- `, Pe = _("div")`
259
+ `, Ce = _("div")`
260
260
  width: 12px;
261
261
  height: 12px;
262
262
  box-sizing: border-box;
@@ -340,7 +340,7 @@ to {
340
340
  forwards;
341
341
  `, We = ({ toast: e }) => {
342
342
  let { icon: t, type: a, iconTheme: s } = e;
343
- return t !== void 0 ? typeof t == "string" ? f.createElement(Ue, null, t) : t : a === "blank" ? null : f.createElement(He, null, f.createElement(Pe, { ...s }), a !== "loading" && f.createElement(Me, null, a === "error" ? f.createElement(Ie, { ...s }) : f.createElement(Le, { ...s })));
343
+ return t !== void 0 ? typeof t == "string" ? f.createElement(Ue, null, t) : t : a === "blank" ? null : f.createElement(He, null, f.createElement(Ce, { ...s }), a !== "loading" && f.createElement(Me, null, a === "error" ? f.createElement(Pe, { ...s }) : f.createElement(Le, { ...s })));
344
344
  }, Be = (e) => `
345
345
  0% {transform: translate3d(0,${e * -200}%,0) scale(.6); opacity:.5;}
346
346
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
@@ -370,7 +370,7 @@ to {
370
370
  let a = e.includes("top") ? 1 : -1, [s, i] = te() ? [Ze, Ke] : [Be(a), Ye(a)];
371
371
  return { animation: t ? `${x(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${x(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
372
372
  }, Xe = f.memo(({ toast: e, position: t, style: a, children: s }) => {
373
- let i = e.height ? Je(e.position || t || "top-center", e.visible) : { opacity: 0 }, o = f.createElement(We, { toast: e }), r = f.createElement(Ve, { ...e.ariaProps }, A(e.message, e));
373
+ let i = e.height ? Je(e.position || t || "top-center", e.visible) : { opacity: 0 }, o = f.createElement(We, { toast: e }), r = f.createElement(Ve, { ...e.ariaProps }, D(e.message, e));
374
374
  return f.createElement(Qe, { className: e.className, style: { ...i, ...a, ...e.style } }, typeof s == "function" ? s({ icon: o, message: r }) : f.createElement(f.Fragment, null, o, r));
375
375
  });
376
376
  _e(f.createElement);
@@ -388,16 +388,16 @@ var et = ({ id: e, className: t, style: a, onHeightUpdate: s, children: i }) =>
388
388
  }, tt = (e, t) => {
389
389
  let a = e.includes("top"), s = a ? { top: 0 } : { bottom: 0 }, i = e.includes("center") ? { justifyContent: "center" } : e.includes("right") ? { justifyContent: "flex-end" } : {};
390
390
  return { left: 0, right: 0, display: "flex", position: "absolute", transition: te() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)", transform: `translateY(${t * (a ? 1 : -1)}px)`, ...s, ...i };
391
- }, at = C`
391
+ }, at = A`
392
392
  z-index: 9999;
393
393
  > * {
394
394
  pointer-events: auto;
395
395
  }
396
396
  `, T = 16, ie = ({ reverseOrder: e, position: t = "top-center", toastOptions: a, gutter: s, children: i, toasterId: o, containerStyle: r, containerClassName: n }) => {
397
- let { toasts: l, handlers: c } = Ae(a, o);
398
- return f.createElement("div", { "data-rht-toaster": o || "", style: { position: "fixed", zIndex: 9999, top: T, left: T, right: T, bottom: T, pointerEvents: "none", ...r }, className: n, onMouseEnter: c.startPause, onMouseLeave: c.endPause }, l.map((d) => {
399
- let p = d.position || t, u = c.calculateOffset(d, { reverseOrder: e, gutter: s, defaultPosition: t }), g = tt(p, u);
400
- return f.createElement(et, { id: d.id, key: d.id, onHeightUpdate: c.updateHeight, className: d.visible ? at : "", style: g }, d.type === "custom" ? A(d.message, d) : i ? i(d) : f.createElement(Xe, { toast: d, position: p }));
397
+ let { toasts: l, handlers: p } = De(a, o);
398
+ return f.createElement("div", { "data-rht-toaster": o || "", style: { position: "fixed", zIndex: 9999, top: T, left: T, right: T, bottom: T, pointerEvents: "none", ...r }, className: n, onMouseEnter: p.startPause, onMouseLeave: p.endPause }, l.map((c) => {
399
+ let d = c.position || t, m = p.calculateOffset(c, { reverseOrder: e, gutter: s, defaultPosition: t }), g = tt(d, m);
400
+ return f.createElement(et, { id: c.id, key: c.id, onHeightUpdate: p.updateHeight, className: c.visible ? at : "", style: g }, c.type === "custom" ? D(c.message, c) : i ? i(c) : f.createElement(Xe, { toast: c, position: d }));
401
401
  }));
402
402
  };
403
403
  const rt = "_root_q0jyz_2", st = "_icon_q0jyz_17", ot = "_progress_q0jyz_40", it = "_snackbar_q0jyz_63", nt = "_growl_q0jyz_71", lt = "_content_q0jyz_79", ct = "_title_q0jyz_91", H = {
@@ -427,35 +427,54 @@ const rt = "_root_q0jyz_2", st = "_icon_q0jyz_17", ot = "_progress_q0jyz_40", it
427
427
  showProgressBar: r = !1,
428
428
  title: n,
429
429
  variant: l = "info",
430
- ...c
431
- }, d) => /* @__PURE__ */ z("div", { className: N("root", `variant-${l}`, t), ref: d, ...c, children: [
432
- /* @__PURE__ */ z("div", { className: N("growl"), children: [
433
- l ? /* @__PURE__ */ y(V, { className: N("icon"), name: pe[l], size: "lg" }) : null,
434
- /* @__PURE__ */ z("div", { className: N("content"), children: [
435
- /* @__PURE__ */ z("span", { children: [
436
- /* @__PURE__ */ y(P, { variant: "body-md-strong", children: n }),
437
- /* @__PURE__ */ y(P, { variant: "body-md", children: e })
430
+ ...p
431
+ }, c) => /* @__PURE__ */ k(
432
+ "div",
433
+ {
434
+ className: N("root", `variant-${l}`, t),
435
+ "data-wui-persistent": !0,
436
+ onClick: (d) => d.stopPropagation(),
437
+ ref: c,
438
+ ...p,
439
+ children: [
440
+ /* @__PURE__ */ k("div", { className: N("growl"), children: [
441
+ l ? /* @__PURE__ */ y(V, { className: N("icon"), name: pe[l], size: "lg" }) : null,
442
+ /* @__PURE__ */ k("div", { className: N("content"), children: [
443
+ /* @__PURE__ */ k("span", { children: [
444
+ /* @__PURE__ */ y(C, { variant: "body-md-strong", children: n }),
445
+ /* @__PURE__ */ y(C, { variant: "body-md", children: e })
446
+ ] }),
447
+ a ? /* @__PURE__ */ y(B, { children: a }) : null
448
+ ] }),
449
+ i ? /* @__PURE__ */ y(
450
+ Q,
451
+ {
452
+ className: N("close-button"),
453
+ onClick: (d) => {
454
+ d.preventDefault(), d.stopPropagation(), o == null || o();
455
+ },
456
+ size: "sm"
457
+ }
458
+ ) : null
438
459
  ] }),
439
- a ? /* @__PURE__ */ y(B, { children: a }) : null
440
- ] }),
441
- i ? /* @__PURE__ */ y(Q, { className: N("close-button"), onClick: o, size: "sm" }) : null
442
- ] }),
443
- /* @__PURE__ */ y(
444
- "div",
445
- {
446
- className: N(r && "progress"),
447
- style: {
448
- "--duration": i ? `${s}ms` : "5000ms"
449
- },
450
- children: /* @__PURE__ */ y("div", { className: N("progress-bar") })
451
- }
452
- )
453
- ] })
460
+ /* @__PURE__ */ y(
461
+ "div",
462
+ {
463
+ className: N(r && "progress"),
464
+ style: {
465
+ "--duration": i ? `${s}ms` : "5000ms"
466
+ },
467
+ children: /* @__PURE__ */ y("div", { className: N("progress-bar") })
468
+ }
469
+ )
470
+ ]
471
+ }
472
+ )
454
473
  );
455
474
  ne.displayName = "Toast.Growl";
456
475
  const le = J((e, t) => /* @__PURE__ */ y(K, { ref: t, size: "md", variant: "secondary", ...e }));
457
476
  le.displayName = "Toast.GrowlAction";
458
- const k = L(H), ce = Z(
477
+ const z = L(H), ce = Z(
459
478
  ({
460
479
  children: e,
461
480
  className: t,
@@ -466,24 +485,42 @@ const k = L(H), ce = Z(
466
485
  onClose: r,
467
486
  variant: n = "info",
468
487
  ...l
469
- }, c) => /* @__PURE__ */ z("div", { className: k("root", `variant-${n}`, t), ref: c, ...l, children: [
470
- /* @__PURE__ */ z("div", { className: k("snackbar"), children: [
471
- n ? /* @__PURE__ */ y(V, { className: k("icon"), name: pe[n], size: "lg" }) : null,
472
- /* @__PURE__ */ y(P, { variant: "body-md-strong", children: e }),
473
- a ? /* @__PURE__ */ y(B, { children: a }) : null,
474
- i ? /* @__PURE__ */ y(Q, { onClick: r, size: "sm" }) : null
475
- ] }),
476
- /* @__PURE__ */ y(
477
- "div",
478
- {
479
- className: k("progress", o && "hide-progress-bar"),
480
- style: {
481
- "--duration": i ? `${s}ms` : "5000ms"
482
- },
483
- children: /* @__PURE__ */ y("div", { className: k("progress-bar") })
484
- }
485
- )
486
- ] })
488
+ }, p) => /* @__PURE__ */ k(
489
+ "div",
490
+ {
491
+ className: z("root", `variant-${n}`, t),
492
+ "data-wui-persistent": !0,
493
+ onClick: (c) => c.stopPropagation(),
494
+ ref: p,
495
+ ...l,
496
+ children: [
497
+ /* @__PURE__ */ k("div", { className: z("snackbar"), children: [
498
+ n ? /* @__PURE__ */ y(V, { className: z("icon"), name: pe[n], size: "lg" }) : null,
499
+ /* @__PURE__ */ y(C, { variant: "body-md-strong", children: e }),
500
+ a ? /* @__PURE__ */ y(B, { children: a }) : null,
501
+ i ? /* @__PURE__ */ y(
502
+ Q,
503
+ {
504
+ onClick: (c) => {
505
+ c.preventDefault(), c.stopPropagation(), r == null || r();
506
+ },
507
+ size: "sm"
508
+ }
509
+ ) : null
510
+ ] }),
511
+ /* @__PURE__ */ y(
512
+ "div",
513
+ {
514
+ className: z("progress", o && "hide-progress-bar"),
515
+ style: {
516
+ "--duration": i ? `${s}ms` : "5000ms"
517
+ },
518
+ children: /* @__PURE__ */ y("div", { className: z("progress-bar") })
519
+ }
520
+ )
521
+ ]
522
+ }
523
+ )
487
524
  );
488
525
  ce.displayName = "Toast.Snackbar";
489
526
  const de = J((e, t) => /* @__PURE__ */ y(K, { ref: t, size: "md", variant: "secondary", ...e }));
@@ -498,11 +535,11 @@ const dt = L(H), pe = {
498
535
  info: 7e3,
499
536
  success: 7e3,
500
537
  warning: 8e3
501
- }, me = ({ children: e, className: t, ...a }) => /* @__PURE__ */ y("p", { className: dt("title", t), ...a, children: e });
502
- me.displayName = "Toast.Title";
538
+ }, ue = ({ children: e, className: t, ...a }) => /* @__PURE__ */ y("p", { className: dt("title", t), ...a, children: e });
539
+ ue.displayName = "Toast.Title";
503
540
  const xt = (e, t) => {
504
541
  const s = ("type" in e ? e.type.displayName || e.type.name : void 0) === "Growl" ? "top-right" : "bottom-center", i = () => {
505
- t.onClose && t.onClose(), m.dismiss(t.id);
542
+ t != null && t.onClose && t.onClose(), u.dismiss(t == null ? void 0 : t.id);
506
543
  }, o = e.props.variant || "info", r = {
507
544
  duration: pt[o],
508
545
  position: s,
@@ -514,7 +551,7 @@ const xt = (e, t) => {
514
551
  },
515
552
  ...t
516
553
  };
517
- return m(
554
+ return u(
518
555
  ge(e, { duration: r.duration, onClose: i }),
519
556
  r
520
557
  );
@@ -525,7 +562,7 @@ const wt = Object.assign(ie, {
525
562
  GrowlAction: le,
526
563
  Snackbar: ce,
527
564
  SnackbarAction: de,
528
- Title: me
565
+ Title: ue
529
566
  });
530
567
  export {
531
568
  pe as ICON,
@@ -19,6 +19,8 @@ export interface FileDropOptions {
19
19
  /** Pass a comma-separated string of file types e.g. "image/png" or "image/png,image/jpeg" */
20
20
  accept?: Accept;
21
21
  children?: (state: FileDropChildren) => JSX.Element;
22
+ deleteButtonText?: string;
23
+ editButtonText?: string;
22
24
  fileName?: string;
23
25
  forceFileType?: ForceFileType;
24
26
  handleAddFile?: (event: CreateEvent | DropEvent | React.ChangeEvent<HTMLInputElement>) => void;
@@ -1,6 +1,7 @@
1
1
  export declare const arrows: readonly ["angle-left-b", "angle-right-b", "angle-up", "angle-down", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "left-arrow-to-left", "arrow-to-right", "top-arrow-to-top", "arrow-to-bottom", "angle-double-left", "angle-double-right", "angle-left", "angle-right"];
2
- export declare const actions: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share"];
3
- export declare const miscellaneous: readonly ["music", "sparkles", "rocket", "file-alt", "user-square", "book-reader", "file-question-alt", "sad-solid", "smile-beam-solid", "sad", "smile-beam", "sign-right", "exclamation-triangle", "exclamation-circle", "exclamation-octagon", "chart-pie", "paperclip", "chart-bar", "fire", "user-check", "apps", "trophy", "bookmark-solid", "bookmark", "clock", "comment-alt-lines", "file-edit-alt", "illustration", "calendar", "users-alt", "globe", "graduation-cap", "envelope", "equal-circle", "minus", "venus", "mars", "estate", "info-circle", "columns", "english-to-chinese", "bag-alt", "chart-line", "map-marker-alt", "lock-alt", "flag", "at", "user", "user-circle", "clipboard-check", "building", "compass", "phone", "pin", "microphone", "user-search", "house-user", "star-solid", "star", "coins", "euro-circle", "file-search-alt", "question-circle", "gift", "birthday-cake", "bunting-flags", "tag-alt", "tablet", "mobile", "video", "plus-circle", "pen", "check-circle", "certified", "plug"];
2
+ export declare const actions: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "edit", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share"];
3
+ export declare const chat: string[];
4
+ export declare const miscellaneous: readonly ["music", "rocket", "file-alt", "user-square", "book-reader", "file-question-alt", "sad-solid", "smile-beam-solid", "sad", "smile-beam", "sign-right", "exclamation-triangle", "exclamation-circle", "exclamation-octagon", "chart-pie", "paperclip", "chart-bar", "fire", "user-check", "apps", "trophy", "bookmark-solid", "bookmark", "clock", "comment-alt-lines", "file-edit-alt", "illustration", "calendar", "users-alt", "globe", "graduation-cap", "envelope", "equal-circle", "minus", "venus", "mars", "estate", "info-circle", "columns", "english-to-chinese", "bag-alt", "chart-line", "map-marker-alt", "lock-alt", "flag", "at", "user", "user-circle", "clipboard-check", "building", "compass", "phone", "pin", "microphone", "user-search", "house-user", "star-solid", "star", "coins", "euro-circle", "file-search-alt", "question-circle", "gift", "birthday-cake", "bunting-flags", "tag-alt", "tablet", "mobile", "video", "plus-circle", "pen", "check-circle", "certified", "plug"];
4
5
  export declare const player: readonly ["play", "stop-circle-solid", "pause-circle-solid", "previous", "step-forward", "expand-arrows-alt", "compress-arrows", "screen-share", "stop-screen-share", "microphone", "microphone-slash", "cast", "cast-connected", "cast-unavailable", "video", "video-slash", "airplay", "history", "playlist", "volume-up", "volume-mute", "closed-captioning"];
5
6
  export declare const wtf: readonly ["package", "basketball", "book-alt", "lightbulb-alt", "life-ring", "calculator-alt", "camera", "shopping-cart", "clipboard-notes", "coffee", "ruler", "desktop", "hard-hat", "credit-card", "moon-solid", "moon", "crosshair", "crown", "restaurant", "diamond", "industry", "fingerprint", "flag", "flag-solid", "setting", "handshake", "hashtag", "headphones", "heart", "estate", "balance-scale", "key-skeleton", "leaf", "map", "masonry", "masonry-plus", "megaphone", "microphone", "processor", "euro-circle", "mountains", "pen", "images", "chart-pie-alt", "pizza-slice", "puzzle-piece-solid", "puzzle-piece", "shield", "wrench", "sparkles", "server", "sun", "hunting", "thumbs-up", "thumbs-down", "trees", "sofa", "exit", "redo", "play", "ban"];
6
7
  export declare const foldersAndFiles: readonly ["folder", "folder-open", "folder-full", "file", "image"];
@@ -8,4 +9,4 @@ export declare const markdown: readonly ["bold", "arrow", "brackets-curly", "ita
8
9
  export declare const brands: readonly ["behance", "dribbble", "facebook", "github", "google", "instagram", "linkedin", "npm", "pinterest", "slack", "stackoverflow", "tiktok", "twitch", "x", "xing", "youtube", "zapier"];
9
10
  export declare const welcome: readonly ["symbol", "wttj"];
10
11
  export declare const flags: readonly ["flag-fr", "flag-en", "flag-us"];
11
- export declare const icons: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share", "angle-left-b", "angle-right-b", "angle-up", "angle-down", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "left-arrow-to-left", "arrow-to-right", "top-arrow-to-top", "arrow-to-bottom", "angle-double-left", "angle-double-right", "angle-left", "angle-right", "behance", "dribbble", "facebook", "github", "google", "instagram", "linkedin", "npm", "pinterest", "slack", "stackoverflow", "tiktok", "twitch", "x", "xing", "youtube", "zapier", "folder", "folder-open", "folder-full", "file", "image", "flag-fr", "flag-en", "flag-us", "bold", "arrow", "brackets-curly", "italic", "list-ol-alt", "list-ul", "quote", "text-strike-through", "heading", "heading-1", "heading-2", "heading-3", "heading-4", "heading-5", "heading-6", "font", "underline", "music", "sparkles", "rocket", "file-alt", "user-square", "book-reader", "file-question-alt", "sad-solid", "smile-beam-solid", "sad", "smile-beam", "sign-right", "exclamation-triangle", "exclamation-circle", "exclamation-octagon", "chart-pie", "paperclip", "chart-bar", "fire", "user-check", "apps", "trophy", "bookmark-solid", "bookmark", "clock", "comment-alt-lines", "file-edit-alt", "illustration", "calendar", "users-alt", "globe", "graduation-cap", "envelope", "equal-circle", "minus", "venus", "mars", "estate", "info-circle", "columns", "english-to-chinese", "bag-alt", "chart-line", "map-marker-alt", "lock-alt", "flag", "at", "user", "user-circle", "clipboard-check", "building", "compass", "phone", "pin", "microphone", "user-search", "house-user", "star-solid", "star", "coins", "euro-circle", "file-search-alt", "question-circle", "gift", "birthday-cake", "bunting-flags", "tag-alt", "tablet", "mobile", "video", "plus-circle", "pen", "check-circle", "certified", "plug", "play", "stop-circle-solid", "pause-circle-solid", "previous", "step-forward", "expand-arrows-alt", "compress-arrows", "screen-share", "stop-screen-share", "microphone", "microphone-slash", "cast", "cast-connected", "cast-unavailable", "video", "video-slash", "airplay", "history", "playlist", "volume-up", "volume-mute", "closed-captioning", "symbol", "wttj", "package", "basketball", "book-alt", "lightbulb-alt", "life-ring", "calculator-alt", "camera", "shopping-cart", "clipboard-notes", "coffee", "ruler", "desktop", "hard-hat", "credit-card", "moon-solid", "moon", "crosshair", "crown", "restaurant", "diamond", "industry", "fingerprint", "flag", "flag-solid", "setting", "handshake", "hashtag", "headphones", "heart", "estate", "balance-scale", "key-skeleton", "leaf", "map", "masonry", "masonry-plus", "megaphone", "microphone", "processor", "euro-circle", "mountains", "pen", "images", "chart-pie-alt", "pizza-slice", "puzzle-piece-solid", "puzzle-piece", "shield", "wrench", "sparkles", "server", "sun", "hunting", "thumbs-up", "thumbs-down", "trees", "sofa", "exit", "redo", "play", "ban"];
12
+ export declare const icons: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "edit", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share", "angle-left-b", "angle-right-b", "angle-up", "angle-down", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "left-arrow-to-left", "arrow-to-right", "top-arrow-to-top", "arrow-to-bottom", "angle-double-left", "angle-double-right", "angle-left", "angle-right", "behance", "dribbble", "facebook", "github", "google", "instagram", "linkedin", "npm", "pinterest", "slack", "stackoverflow", "tiktok", "twitch", "x", "xing", "youtube", "zapier", ...string[], "folder", "folder-open", "folder-full", "file", "image", "flag-fr", "flag-en", "flag-us", "bold", "arrow", "brackets-curly", "italic", "list-ol-alt", "list-ul", "quote", "text-strike-through", "heading", "heading-1", "heading-2", "heading-3", "heading-4", "heading-5", "heading-6", "font", "underline", "music", "rocket", "file-alt", "user-square", "book-reader", "file-question-alt", "sad-solid", "smile-beam-solid", "sad", "smile-beam", "sign-right", "exclamation-triangle", "exclamation-circle", "exclamation-octagon", "chart-pie", "paperclip", "chart-bar", "fire", "user-check", "apps", "trophy", "bookmark-solid", "bookmark", "clock", "comment-alt-lines", "file-edit-alt", "illustration", "calendar", "users-alt", "globe", "graduation-cap", "envelope", "equal-circle", "minus", "venus", "mars", "estate", "info-circle", "columns", "english-to-chinese", "bag-alt", "chart-line", "map-marker-alt", "lock-alt", "flag", "at", "user", "user-circle", "clipboard-check", "building", "compass", "phone", "pin", "microphone", "user-search", "house-user", "star-solid", "star", "coins", "euro-circle", "file-search-alt", "question-circle", "gift", "birthday-cake", "bunting-flags", "tag-alt", "tablet", "mobile", "video", "plus-circle", "pen", "check-circle", "certified", "plug", "play", "stop-circle-solid", "pause-circle-solid", "previous", "step-forward", "expand-arrows-alt", "compress-arrows", "screen-share", "stop-screen-share", "microphone", "microphone-slash", "cast", "cast-connected", "cast-unavailable", "video", "video-slash", "airplay", "history", "playlist", "volume-up", "volume-mute", "closed-captioning", "symbol", "wttj", "package", "basketball", "book-alt", "lightbulb-alt", "life-ring", "calculator-alt", "camera", "shopping-cart", "clipboard-notes", "coffee", "ruler", "desktop", "hard-hat", "credit-card", "moon-solid", "moon", "crosshair", "crown", "restaurant", "diamond", "industry", "fingerprint", "flag", "flag-solid", "setting", "handshake", "hashtag", "headphones", "heart", "estate", "balance-scale", "key-skeleton", "leaf", "map", "masonry", "masonry-plus", "megaphone", "microphone", "processor", "euro-circle", "mountains", "pen", "images", "chart-pie-alt", "pizza-slice", "puzzle-piece-solid", "puzzle-piece", "shield", "wrench", "sparkles", "server", "sun", "hunting", "thumbs-up", "thumbs-down", "trees", "sofa", "exit", "redo", "play", "ban"];
@@ -1,5 +1,6 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
2
  export interface TextareaOptions {
3
+ isAdaptative?: boolean;
3
4
  minRows?: number;
4
5
  variant?: 'danger' | 'success' | 'warning';
5
6
  }