welcome-ui 8.0.0-alpha.0 → 8.0.2

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 (90) hide show
  1. package/dist/AXB53BZF-BOEe01VW.mjs +25 -0
  2. package/dist/Accordion.mjs +17 -17
  3. package/dist/Alert.mjs +19 -19
  4. package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-B1IDizRs.mjs} +298 -295
  5. package/dist/Badge.mjs +1 -1
  6. package/dist/Breadcrumb.mjs +27 -26
  7. package/dist/Button.mjs +2 -2
  8. package/dist/Checkbox.mjs +1 -1
  9. package/dist/{CustomInput-D_13Gd_3.mjs → CustomInput-IA_gVoXd.mjs} +2991 -2859
  10. package/dist/DatePicker.mjs +4 -4
  11. package/dist/DateTimePicker.mjs +9 -9
  12. package/dist/DateTimePickerCommon.mjs +1 -1
  13. package/dist/Drawer.mjs +7 -7
  14. package/dist/DropdownMenu.mjs +262 -262
  15. package/dist/Field.mjs +25 -25
  16. package/dist/FileDrop.mjs +273 -267
  17. package/dist/FileUpload.mjs +26 -26
  18. package/dist/Files.mjs +1 -1
  19. package/dist/Hint.mjs +1 -1
  20. package/dist/{ITI7HKP4-BONrZ9Pq.mjs → ITI7HKP4-EL9KXYBU.mjs} +150 -150
  21. package/dist/Icons.mjs +88 -88
  22. package/dist/IconsFont.mjs +159 -159
  23. package/dist/InputText.mjs +1 -1
  24. package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-BzklVBKM.mjs} +70 -70
  25. package/dist/KUU7WJ55-CS4NemC6.mjs +61 -0
  26. package/dist/{LVA2YJMS-qFC9J-lt.mjs → LVA2YJMS-DDEmK0pp.mjs} +491 -488
  27. package/dist/Label.mjs +2 -2
  28. package/dist/Link.mjs +3 -3
  29. package/dist/MTZPJQMC-CMjAwC0N.mjs +15 -0
  30. package/dist/Modal.mjs +13 -13
  31. package/dist/NLEBE274-QOMV1l7e.mjs +84 -0
  32. package/dist/P2CTZE2T-Cl2w7OLV.mjs +300 -0
  33. package/dist/P4IRICAX-DezbJY4s.mjs +37 -0
  34. package/dist/Pagination.mjs +22 -22
  35. package/dist/Picker.mjs +2 -2
  36. package/dist/Popover.mjs +2 -2
  37. package/dist/QYJ6MIDR-Bb0O5xUM.mjs +97 -0
  38. package/dist/Radio.mjs +18 -18
  39. package/dist/RadioGroup.mjs +15 -15
  40. package/dist/RadioTab.mjs +9 -9
  41. package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-jn06-eLy.mjs} +17 -17
  42. package/dist/Search.mjs +2 -2
  43. package/dist/Select.mjs +719 -716
  44. package/dist/Shape.mjs +1 -1
  45. package/dist/Slider.mjs +1 -1
  46. package/dist/Swiper.mjs +284 -278
  47. package/dist/Tabs.mjs +128 -128
  48. package/dist/Tag.mjs +16 -16
  49. package/dist/Text.mjs +1 -1
  50. package/dist/Textarea.mjs +4 -4
  51. package/dist/TimePicker.mjs +6 -6
  52. package/dist/Toast.mjs +69 -69
  53. package/dist/Toggle.mjs +2 -2
  54. package/dist/Tooltip.mjs +60 -60
  55. package/dist/UniversalLink.mjs +8 -8
  56. package/dist/VEVQD5MH-CuegL0m0.mjs +20 -0
  57. package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-BMzoZtCu.mjs} +31 -33
  58. package/dist/VariantIcon.mjs +4 -4
  59. package/dist/WelcomeLoader.mjs +4862 -9223
  60. package/dist/X5NMLKT6-CvSCix-_.mjs +25 -0
  61. package/dist/YV4JVR4I-Bh7B7TET.mjs +344 -0
  62. package/dist/downshift.esm-D0ns_SQs.mjs +1082 -0
  63. package/dist/{field-styles-DLIhqG_8.mjs → field-styles-CfVLcVQp.mjs} +1 -1
  64. package/dist/{index-BDeIsk2X.mjs → index-5PUh49rV.mjs} +56 -56
  65. package/dist/{index-DEJJvyGk.mjs → index-B0gDDiFm.mjs} +7 -7
  66. package/dist/{index-CExLVjET.mjs → index-B22SHR8h.mjs} +4 -4
  67. package/dist/index-BhcLigYU.mjs +77 -0
  68. package/dist/{index-BJAZgeHL.mjs → index-Bkl89twW.mjs} +4 -4
  69. package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
  70. package/dist/{index-BpRjq7lj.mjs → index-CQD9fgf_.mjs} +3 -3
  71. package/dist/{index-BRDOakbf.mjs → index-CmsWSKKs.mjs} +5 -5
  72. package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
  73. package/dist/{index-BrfXjmHY.mjs → index-wr_b5GSV.mjs} +6 -6
  74. package/dist/radio-group-RFyDp0KD.mjs +51 -0
  75. package/dist/theme.mjs +670 -615
  76. package/dist/{use-viewport-m3glsbna.mjs → use-viewport-CfklieD-.mjs} +5 -5
  77. package/dist/utils.mjs +29 -91
  78. package/package.json +12 -15
  79. package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
  80. package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
  81. package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
  82. package/dist/NLEBE274-C94QU78N.mjs +0 -84
  83. package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
  84. package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
  85. package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
  86. package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
  87. package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
  88. package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
  89. package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
  90. package/dist/radio-group-CGC6DTFJ.mjs +0 -51
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { u as f } from "./KUU7WJ55-CS4NemC6.mjs";
3
+ import { f as c, c as m, h as i, j as B, k as u, d as l, e as d, g as v } from "./LVA2YJMS-DDEmK0pp.mjs";
4
+ import { useRef as g, useState as N, useEffect as _ } from "react";
5
+ var s = "button", R = m(
6
+ function(t) {
7
+ const e = g(null), a = B(e, s), [n, o] = N(
8
+ () => !!a && u({ tagName: a, type: t.type })
9
+ );
10
+ return _(() => {
11
+ e.current && o(u(e.current));
12
+ }, []), t = l(v({
13
+ role: !n && a !== "a" ? "button" : void 0
14
+ }, t), {
15
+ ref: d(e, t.ref)
16
+ }), t = f(t), t;
17
+ }
18
+ ), y = c(function(t) {
19
+ const e = R(t);
20
+ return i(s, e);
21
+ });
22
+ export {
23
+ y as B,
24
+ R as u
25
+ };
@@ -0,0 +1,344 @@
1
+ "use client";
2
+ import { i as ot, $ as C, a0 as at, a1 as st, a2 as ut, Q as F, a3 as it, B as ct, D as ft, a4 as lt, J as dt, F as G, d as St, g as P, b as pt, a5 as vt } from "./LVA2YJMS-DDEmK0pp.mjs";
3
+ import * as I from "react";
4
+ import X from "react";
5
+ import { g as _t } from "./_commonjsHelpers-CXJ7dpIk.mjs";
6
+ function D(t, n) {
7
+ const e = t.__unstableInternals;
8
+ return ot(e, "Invalid store"), e[n];
9
+ }
10
+ function W(t, ...n) {
11
+ let e = t, l = e, s = Symbol(), o = lt;
12
+ const u = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), g = (a) => (v.add(a), () => v.delete(a)), x = () => {
13
+ const a = u.size, r = Symbol();
14
+ u.add(r);
15
+ const b = () => {
16
+ u.delete(r), !u.size && o();
17
+ };
18
+ if (a) return b;
19
+ const w = ut(e).map(
20
+ (L) => F(
21
+ ...n.map((V) => {
22
+ var h;
23
+ const T = (h = V == null ? void 0 : V.getState) == null ? void 0 : h.call(V);
24
+ if (T && C(T, L))
25
+ return tt(V, [L], (j) => {
26
+ p(
27
+ L,
28
+ j[L],
29
+ // @ts-expect-error - Not public API. This is just to prevent
30
+ // infinite loops.
31
+ !0
32
+ );
33
+ });
34
+ })
35
+ )
36
+ ), A = [];
37
+ for (const L of v)
38
+ A.push(L());
39
+ const K = n.map(Z);
40
+ return o = F(...w, ...A, ...K), b;
41
+ }, E = (a, r, b = m) => (b.add(r), d.set(r, a), () => {
42
+ var w;
43
+ (w = i.get(r)) == null || w(), i.delete(r), d.delete(r), b.delete(r);
44
+ }), R = (a, r) => E(a, r), B = (a, r) => (i.set(r, r(e, e)), E(a, r)), q = (a, r) => (i.set(r, r(e, l)), E(a, r, _)), S = (a) => W(st(e, a), y), f = (a) => W(at(e, a), y), O = () => e, p = (a, r, b = !1) => {
45
+ var w;
46
+ if (!C(e, a)) return;
47
+ const A = it(r, e[a]);
48
+ if (A === e[a]) return;
49
+ if (!b)
50
+ for (const h of n)
51
+ (w = h == null ? void 0 : h.setState) == null || w.call(h, a, A);
52
+ const K = e;
53
+ e = ct(ft({}, e), { [a]: A });
54
+ const L = Symbol();
55
+ s = L, c.add(a);
56
+ const V = (h, T, j) => {
57
+ var $;
58
+ const H = d.get(h), rt = (z) => j ? j.has(z) : z === a;
59
+ (!H || H.some(rt)) && (($ = i.get(h)) == null || $(), i.set(h, h(e, T)));
60
+ };
61
+ for (const h of m)
62
+ V(h, K);
63
+ queueMicrotask(() => {
64
+ if (s !== L) return;
65
+ const h = e;
66
+ for (const T of _)
67
+ V(T, l, c);
68
+ l = h, c.clear();
69
+ });
70
+ }, y = {
71
+ getState: O,
72
+ setState: p,
73
+ __unstableInternals: {
74
+ setup: g,
75
+ init: x,
76
+ subscribe: R,
77
+ sync: B,
78
+ batch: q,
79
+ pick: S,
80
+ omit: f
81
+ }
82
+ };
83
+ return y;
84
+ }
85
+ function Rt(t, ...n) {
86
+ if (t)
87
+ return D(t, "setup")(...n);
88
+ }
89
+ function Z(t, ...n) {
90
+ if (t)
91
+ return D(t, "init")(...n);
92
+ }
93
+ function k(t, ...n) {
94
+ if (t)
95
+ return D(t, "subscribe")(...n);
96
+ }
97
+ function tt(t, ...n) {
98
+ if (t)
99
+ return D(t, "sync")(...n);
100
+ }
101
+ function ht(t, ...n) {
102
+ if (t)
103
+ return D(t, "batch")(...n);
104
+ }
105
+ function Vt(t, ...n) {
106
+ if (t)
107
+ return D(t, "omit")(...n);
108
+ }
109
+ function Dt(t, ...n) {
110
+ if (t)
111
+ return D(t, "pick")(...n);
112
+ }
113
+ function At(...t) {
114
+ const n = t.reduce((l, s) => {
115
+ var o;
116
+ const u = (o = s == null ? void 0 : s.getState) == null ? void 0 : o.call(s);
117
+ return u ? Object.assign(l, u) : l;
118
+ }, {}), e = W(n, ...t);
119
+ return Object.assign({}, ...t, e);
120
+ }
121
+ function Tt(t, n) {
122
+ if (process.env.NODE_ENV === "production" || !n) return;
123
+ const e = Object.entries(t).filter(([o, u]) => o.startsWith("default") && u !== void 0).map(([o]) => {
124
+ var u;
125
+ const c = o.replace("default", "");
126
+ return `${((u = c[0]) == null ? void 0 : u.toLowerCase()) || ""}${c.slice(1)}`;
127
+ });
128
+ if (!e.length) return;
129
+ const l = n.getState();
130
+ if (e.filter(
131
+ (o) => C(l, o)
132
+ ).length)
133
+ throw new Error(
134
+ `Passing a store prop in conjunction with a default state is not supported.
135
+
136
+ const store = useSelectStore();
137
+ <SelectProvider store={store} defaultValue="Apple" />
138
+ ^ ^
139
+
140
+ Instead, pass the default state to the topmost store:
141
+
142
+ const store = useSelectStore({ defaultValue: "Apple" });
143
+ <SelectProvider store={store} />
144
+
145
+ See https://github.com/ariakit/ariakit/pull/2745 for more details.
146
+
147
+ If there's a particular need for this, please submit a feature request at https://github.com/ariakit/ariakit
148
+ `
149
+ );
150
+ }
151
+ var U = { exports: {} }, M = {}, Y;
152
+ function mt() {
153
+ if (Y) return M;
154
+ Y = 1;
155
+ var t = X;
156
+ function n(i, d) {
157
+ return i === d && (i !== 0 || 1 / i === 1 / d) || i !== i && d !== d;
158
+ }
159
+ var e = typeof Object.is == "function" ? Object.is : n, l = t.useState, s = t.useEffect, o = t.useLayoutEffect, u = t.useDebugValue;
160
+ function c(i, d) {
161
+ var g = d(), x = l({ inst: { value: g, getSnapshot: d } }), E = x[0].inst, R = x[1];
162
+ return o(function() {
163
+ E.value = g, E.getSnapshot = d, v(E) && R({ inst: E });
164
+ }, [i, g, d]), s(function() {
165
+ return v(E) && R({ inst: E }), i(function() {
166
+ v(E) && R({ inst: E });
167
+ });
168
+ }, [i]), u(g), g;
169
+ }
170
+ function v(i) {
171
+ var d = i.getSnapshot;
172
+ i = i.value;
173
+ try {
174
+ var g = d();
175
+ return !e(i, g);
176
+ } catch {
177
+ return !0;
178
+ }
179
+ }
180
+ function m(i, d) {
181
+ return d();
182
+ }
183
+ var _ = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? m : c;
184
+ return M.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : _, M;
185
+ }
186
+ var N = {}, J;
187
+ function Et() {
188
+ return J || (J = 1, process.env.NODE_ENV !== "production" && function() {
189
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
190
+ var t = X, n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
191
+ function e(S) {
192
+ {
193
+ for (var f = arguments.length, O = new Array(f > 1 ? f - 1 : 0), p = 1; p < f; p++)
194
+ O[p - 1] = arguments[p];
195
+ l("error", S, O);
196
+ }
197
+ }
198
+ function l(S, f, O) {
199
+ {
200
+ var p = n.ReactDebugCurrentFrame, y = p.getStackAddendum();
201
+ y !== "" && (f += "%s", O = O.concat([y]));
202
+ var a = O.map(function(r) {
203
+ return String(r);
204
+ });
205
+ a.unshift("Warning: " + f), Function.prototype.apply.call(console[S], console, a);
206
+ }
207
+ }
208
+ function s(S, f) {
209
+ return S === f && (S !== 0 || 1 / S === 1 / f) || S !== S && f !== f;
210
+ }
211
+ var o = typeof Object.is == "function" ? Object.is : s, u = t.useState, c = t.useEffect, v = t.useLayoutEffect, m = t.useDebugValue, _ = !1, i = !1;
212
+ function d(S, f, O) {
213
+ _ || t.startTransition !== void 0 && (_ = !0, e("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
214
+ var p = f();
215
+ if (!i) {
216
+ var y = f();
217
+ o(p, y) || (e("The result of getSnapshot should be cached to avoid an infinite loop"), i = !0);
218
+ }
219
+ var a = u({
220
+ inst: {
221
+ value: p,
222
+ getSnapshot: f
223
+ }
224
+ }), r = a[0].inst, b = a[1];
225
+ return v(function() {
226
+ r.value = p, r.getSnapshot = f, g(r) && b({
227
+ inst: r
228
+ });
229
+ }, [S, p, f]), c(function() {
230
+ g(r) && b({
231
+ inst: r
232
+ });
233
+ var w = function() {
234
+ g(r) && b({
235
+ inst: r
236
+ });
237
+ };
238
+ return S(w);
239
+ }, [S]), m(p), p;
240
+ }
241
+ function g(S) {
242
+ var f = S.getSnapshot, O = S.value;
243
+ try {
244
+ var p = f();
245
+ return !o(O, p);
246
+ } catch {
247
+ return !0;
248
+ }
249
+ }
250
+ function x(S, f, O) {
251
+ return f();
252
+ }
253
+ var E = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", R = !E, B = R ? x : d, q = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : B;
254
+ N.useSyncExternalStore = q, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
255
+ }()), N;
256
+ }
257
+ var Q;
258
+ function gt() {
259
+ return Q || (Q = 1, process.env.NODE_ENV === "production" ? U.exports = mt() : U.exports = Et()), U.exports;
260
+ }
261
+ var Ot = gt();
262
+ const bt = /* @__PURE__ */ _t(Ot);
263
+ var { useSyncExternalStore: et } = bt, nt = () => () => {
264
+ };
265
+ function yt(t, n = dt) {
266
+ const e = I.useCallback(
267
+ (s) => t ? k(t, null, s) : nt(),
268
+ [t]
269
+ ), l = () => {
270
+ const s = typeof n == "string" ? n : null, o = typeof n == "function" ? n : null, u = t == null ? void 0 : t.getState();
271
+ if (o) return o(u);
272
+ if (u && s && C(u, s))
273
+ return u[s];
274
+ };
275
+ return et(e, l, l);
276
+ }
277
+ function It(t, n) {
278
+ const e = I.useRef(
279
+ {}
280
+ ), l = I.useCallback(
281
+ (o) => t ? k(t, null, o) : nt(),
282
+ [t]
283
+ ), s = () => {
284
+ const o = t == null ? void 0 : t.getState();
285
+ let u = !1;
286
+ const c = e.current;
287
+ for (const v in n) {
288
+ const m = n[v];
289
+ if (typeof m == "function") {
290
+ const _ = m(o);
291
+ _ !== c[v] && (c[v] = _, u = !0);
292
+ }
293
+ if (typeof m == "string") {
294
+ if (!o || !C(o, m)) continue;
295
+ const _ = o[m];
296
+ _ !== c[v] && (c[v] = _, u = !0);
297
+ }
298
+ }
299
+ return u && (e.current = P({}, c)), e.current;
300
+ };
301
+ return et(l, s, s);
302
+ }
303
+ function Ct(t, n, e, l) {
304
+ const s = C(n, e) ? n[e] : void 0, o = l ? n[l] : void 0, u = vt({ value: s, setValue: o });
305
+ G(() => tt(t, [e], (c, v) => {
306
+ const { value: m, setValue: _ } = u.current;
307
+ _ && c[e] !== v[e] && c[e] !== m && _(c[e]);
308
+ }), [t, e]), G(() => {
309
+ if (s !== void 0)
310
+ return t.setState(e, s), ht(t, [e], () => {
311
+ s !== void 0 && t.setState(e, s);
312
+ });
313
+ });
314
+ }
315
+ function jt(t, n) {
316
+ const [e, l] = I.useState(() => t(n));
317
+ G(() => Z(e), [e]);
318
+ const s = I.useCallback(
319
+ (c) => yt(e, c),
320
+ [e]
321
+ ), o = I.useMemo(
322
+ () => St(P({}, e), { useState: s }),
323
+ [e, s]
324
+ ), u = pt(() => {
325
+ l((c) => t(P(P({}, n), c.getState())));
326
+ });
327
+ return [o, u];
328
+ }
329
+ export {
330
+ jt as a,
331
+ Ct as b,
332
+ W as c,
333
+ tt as d,
334
+ k as e,
335
+ It as f,
336
+ ht as g,
337
+ Z as i,
338
+ At as m,
339
+ Vt as o,
340
+ Dt as p,
341
+ Rt as s,
342
+ Tt as t,
343
+ yt as u
344
+ };