welcome-ui 9.0.0-alpha.2 → 9.0.0

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 (111) hide show
  1. package/README.md +47 -3
  2. package/dist/2W3RN7C5-bkX-rIa3.js +61 -0
  3. package/dist/4I4MLMKD-BLxAidnq.js +43 -0
  4. package/dist/Accordion.js +6 -6
  5. package/dist/Alert.js +1 -1
  6. package/dist/AspectRatio.js +1 -1
  7. package/dist/Avatar.js +1 -1
  8. package/dist/{4CMBR7SL-Dhp8uJop.js → B7UTNDHN-BlIblHCu.js} +59 -59
  9. package/dist/Badge.js +1 -1
  10. package/dist/Breadcrumb.css +1 -1
  11. package/dist/Breadcrumb.js +27 -27
  12. package/dist/Button.js +2 -2
  13. package/dist/ButtonGroup.js +1 -1
  14. package/dist/Card.js +1 -1
  15. package/dist/Checkbox.css +1 -1
  16. package/dist/Checkbox.js +22 -22
  17. package/dist/CloseButton.js +3 -3
  18. package/dist/{SYRFVSLH-CHNUB1rW.js → DSAASPLT-BaaCUKsb.js} +7 -7
  19. package/dist/DatePicker.js +5 -5
  20. package/dist/DateTimePicker.js +2 -2
  21. package/dist/Drawer.css +1 -1
  22. package/dist/Drawer.js +67 -67
  23. package/dist/DropdownMenu.js +261 -259
  24. package/dist/Field.js +1 -1
  25. package/dist/FieldGroup.js +1 -1
  26. package/dist/FileDrop.js +194 -221
  27. package/dist/FileUpload.js +2 -2
  28. package/dist/GVVKDT6A-bET6V7Py.js +724 -0
  29. package/dist/Hint.js +1 -1
  30. package/dist/{Icon-BisRi8B3.js → Icon-EG7O4YwD.js} +1 -1
  31. package/dist/Icon.js +12 -12
  32. package/dist/InputText.js +1 -1
  33. package/dist/{ASMQKSDT-SH1qSiMi.js → KPUWHTQJ-D2TPji47.js} +30 -30
  34. package/dist/Label.js +3 -3
  35. package/dist/Link.css +1 -1
  36. package/dist/Link.js +27 -27
  37. package/dist/Loader.js +1 -1
  38. package/dist/Logo.js +1 -1
  39. package/dist/Modal.js +10 -10
  40. package/dist/{JC64G2H7-DPy9R0De.js → NI3IVY7K-Ztb3-XAv.js} +571 -571
  41. package/dist/{P4IRICAX-7kH4HzWI.js → NMGNQVTG-C6TqBngP.js} +5 -5
  42. package/dist/{LVA2YJMS-NUHCRwFZ.js → OE2EFRVA-C3721cM3.js} +316 -315
  43. package/dist/{ITI7HKP4-C5xLpoVY.js → OLVWQA7U-DysaSaZj.js} +59 -59
  44. package/dist/Pagination.css +1 -1
  45. package/dist/Pagination.js +81 -73
  46. package/dist/PasswordInput.js +17 -18
  47. package/dist/Popover.js +14 -14
  48. package/dist/{YV4JVR4I-CVFstk2K.js → RTNCFSKZ-qpPg689E.js} +75 -73
  49. package/dist/Radio.css +1 -1
  50. package/dist/Radio.js +29 -29
  51. package/dist/RadioGroup.js +21 -21
  52. package/dist/RadioTab.js +2 -2
  53. package/dist/{P2CTZE2T-D1TepwxQ.js → SBSPVDDI-DJKkC1eb.js} +43 -43
  54. package/dist/{NLEBE274-B4zy25kL.js → SQZLCNLX-CHDXnZ16.js} +16 -16
  55. package/dist/Search.js +2 -2
  56. package/dist/Select.js +170 -181
  57. package/dist/Slider.js +1 -1
  58. package/dist/Swiper.css +1 -1
  59. package/dist/Swiper.js +151 -151
  60. package/dist/{VGCJ63VH-CVhs4PYt.js → T22PY7TE-C1N0q8Kn.js} +109 -109
  61. package/dist/Table.js +1 -1
  62. package/dist/Tabs.js +303 -308
  63. package/dist/Tag.js +3 -3
  64. package/dist/Text.js +1 -1
  65. package/dist/Textarea.js +1 -1
  66. package/dist/TimePicker.js +2 -2
  67. package/dist/Toast.js +1 -1
  68. package/dist/Toggle.js +2 -2
  69. package/dist/Tooltip.js +72 -72
  70. package/dist/VariantIcon.js +3 -3
  71. package/dist/WelcomeLoader.js +1 -1
  72. package/dist/XCKGTAUF-DkxWCbaW.js +25 -0
  73. package/dist/Y67KZUMI-DFEgrUv2.js +15 -0
  74. package/dist/{AXB53BZF-BHeessqV.js → ZTXFEM5L-CkrIQCN1.js} +7 -7
  75. package/dist/{field-icon-size-Du58qHNC.js → field-icon-size-Z5NulTSk.js} +216 -224
  76. package/dist/{index-5rXezknO.js → index-BC2bF45u.js} +1 -1
  77. package/dist/{index-C8GsqBDe.js → index-BeetbagJ.js} +1 -1
  78. package/dist/{index-BJLXLdM3.js → index-Bt79XJ8R.js} +1 -1
  79. package/dist/{index-Dcq5gh3E.js → index-BtwrJ6N4.js} +1 -1
  80. package/dist/{index-DL4-ut3P.js → index-CCASZBtz.js} +1 -1
  81. package/dist/{index-lbUBMgHp.js → index-CPqDZeah.js} +2 -2
  82. package/dist/{index-CTgip19b.js → index-CQEPCbEE.js} +1 -1
  83. package/dist/{index-CnxSNAPH.js → index-Crpe9CvH.js} +1 -1
  84. package/dist/{index-CWVOLBDY.js → index-D5a8Oe6k.js} +1 -1
  85. package/dist/{index-C1jjVTAc.js → index-D8dq-I5s.js} +1 -1
  86. package/dist/{index-Cvtm6uuS.js → index-DkwTwo3z.js} +1 -1
  87. package/dist/{index-BG2aV9o8.js → index-DnO8yBVT.js} +1 -1
  88. package/dist/index.css +0 -0
  89. package/dist/tslib.es6-DpB4Y59c.js +683 -0
  90. package/dist/types/components/Pagination/index.d.ts +1 -2
  91. package/dist/types/components/Pagination/types.d.ts +5 -2
  92. package/dist/types/components/PasswordInput/ToggleButton.d.ts +1 -1
  93. package/dist/types/components/PasswordInput/types.d.ts +1 -1
  94. package/dist/types/components/Tabs/components/TabList/index.d.ts +1 -1
  95. package/dist/types/components/Tabs/index.d.ts +1 -1
  96. package/dist/types/components/Tabs/types.d.ts +1 -2
  97. package/dist/types/components/Tabs/utils.d.ts +1 -2
  98. package/dist/types/utils/index.d.ts +1 -0
  99. package/dist/types/utils/theme/index.d.ts +0 -0
  100. package/dist/types/utils/useForkRef.d.ts +7 -1
  101. package/dist/useForkRef-D807AV7D.js +22 -0
  102. package/dist/{utils-BNMgUIHQ.js → utils-BpbIqM56.js} +1 -1
  103. package/dist/utils.js +2 -2
  104. package/package.json +5 -5
  105. package/dist/BYC7LY2E-DbSoi9cN.js +0 -673
  106. package/dist/KUU7WJ55-CsIy9XMu.js +0 -61
  107. package/dist/MTZPJQMC-D_TnSwZf.js +0 -15
  108. package/dist/QYJ6MIDR-Dm7lYMh6.js +0 -43
  109. package/dist/X5NMLKT6-PeY306ft.js +0 -25
  110. package/dist/index--0U5Rubs.js +0 -644
  111. /package/dist/{index-PAaZGbyz.js → index-CdiHdiVB.js} +0 -0
@@ -1,185 +1,185 @@
1
1
  "use client";
2
- import { m as Y, o as Z, t as ee, c as te, s as E, a as A, e as ne, u as oe, b as P, d as j } from "./YV4JVR4I-CVFstk2K.js";
3
- import { y as p, x as ae, z as se, B as re, v as H, l as M, _ as R, g as _, c as ie, n as ue, i as le, C as ce, M as S, D as de, e as V, f as me, r as fe } from "./LVA2YJMS-NUHCRwFZ.js";
4
- import { createContext as F, useRef as ve, useState as pe, useMemo as Se } from "react";
2
+ import { e as T, f as j, _ as I, a as b, c as Y, b as Z, i as ee, w as te, M as p, x as ne, d as w, p as oe, r as ae, H as S, G as se, I as re, K as ie } from "./OE2EFRVA-C3721cM3.js";
3
+ import { createContext as M, useRef as ue, useState as le, useMemo as ce } from "react";
4
+ import { u as R, m as de, o as me, t as fe, c as ve, s as y, a as A, e as pe, b as Se, d as P } from "./RTNCFSKZ-qpPg689E.js";
5
5
  import { flushSync as De } from "react-dom";
6
- import { jsx as I } from "react/jsx-runtime";
7
- function Ce(n = {}) {
8
- const o = Y(
9
- n.store,
10
- Z(n.disclosure, ["contentElement", "disclosureElement"])
11
- );
12
- ee(n, o);
13
- const e = o == null ? void 0 : o.getState(), t = p(
14
- n.open,
15
- e == null ? void 0 : e.open,
16
- n.defaultOpen,
17
- !1
18
- ), i = p(n.animated, e == null ? void 0 : e.animated, !1), r = {
19
- open: t,
20
- animated: i,
21
- animating: !!i && t,
22
- mounted: t,
23
- contentElement: p(e == null ? void 0 : e.contentElement, null),
24
- disclosureElement: p(e == null ? void 0 : e.disclosureElement, null)
25
- }, a = te(r, o);
26
- return E(
27
- a,
28
- () => A(a, ["animated", "animating"], (s) => {
29
- s.animated || a.setState("animating", !1);
30
- })
31
- ), E(
32
- a,
33
- () => ne(a, ["open"], () => {
34
- a.getState().animated && a.setState("animating", !0);
35
- })
36
- ), E(
37
- a,
38
- () => A(a, ["open", "animating"], (s) => {
39
- a.setState("mounted", s.open || s.animating);
40
- })
41
- ), ae(se({}, a), {
42
- disclosure: n.disclosure,
43
- setOpen: (s) => a.setState("open", s),
44
- show: () => a.setState("open", !0),
45
- hide: () => a.setState("open", !1),
46
- toggle: () => a.setState("open", (s) => !s),
47
- stopAnimation: () => a.setState("animating", !1),
48
- setContentElement: (s) => a.setState("contentElement", s),
49
- setDisclosureElement: (s) => a.setState("disclosureElement", s)
50
- });
51
- }
52
- function xe(n, o, e) {
53
- return re(o, [e.store, e.disclosure]), P(n, e, "open", "setOpen"), P(n, e, "mounted", "setMounted"), P(n, e, "animated"), Object.assign(n, { disclosure: e.disclosure });
54
- }
55
- function Me(n = {}) {
56
- const [o, e] = oe(Ce, n);
57
- return xe(o, e, n);
58
- }
59
- var b = H(), N = b.useProviderContext, ge = b.ContextProvider, ye = b.ScopedContextProvider, D = H(
60
- [ge],
61
- [ye]
62
- ), Re = D.useScopedContext, Fe = D.useProviderContext, Ie = D.ContextProvider, Ee = D.ScopedContextProvider, Ne = F(void 0), $e = F(void 0), Pe = "div";
63
- function w(n, o) {
6
+ import { jsx as F } from "react/jsx-runtime";
7
+ var _ = T(), N = _.useProviderContext, Ce = _.ContextProvider, xe = _.ScopedContextProvider, D = T(
8
+ [Ce],
9
+ [xe]
10
+ ), Ie = D.useScopedContext, Me = D.useProviderContext, Re = D.ContextProvider, ge = D.ScopedContextProvider, Fe = M(void 0), Ne = M(void 0), Ee = "div";
11
+ function V(n, o) {
64
12
  const e = setTimeout(o, n);
65
13
  return () => clearTimeout(e);
66
14
  }
67
- function _e(n) {
15
+ function ye(n) {
68
16
  let o = requestAnimationFrame(() => {
69
17
  o = requestAnimationFrame(n);
70
18
  });
71
19
  return () => cancelAnimationFrame(o);
72
20
  }
73
- function T(...n) {
21
+ function H(...n) {
74
22
  return n.join(", ").split(", ").reduce((o, e) => {
75
23
  const t = e.endsWith("ms") ? 1 : 1e3, i = Number.parseFloat(e || "0s") * t;
76
24
  return i > o ? i : o;
77
25
  }, 0);
78
26
  }
79
- function be(n, o, e) {
27
+ function Pe(n, o, e) {
80
28
  return !e && o !== !1 && (!n || !!o);
81
29
  }
82
- var he = ie(function(o) {
83
- var e = o, { store: t, alwaysVisible: i } = e, r = R(e, ["store", "alwaysVisible"]);
30
+ var be = Y(function(o) {
31
+ var e = o, { store: t, alwaysVisible: i } = e, r = I(e, ["store", "alwaysVisible"]);
84
32
  const a = N();
85
- t = t || a, le(
33
+ t = t || a, ee(
86
34
  t,
87
35
  process.env.NODE_ENV !== "production" && "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
88
36
  );
89
- const s = ve(null), f = ce(r.id), [l, h] = pe(null), c = t.useState("open"), C = t.useState("mounted"), d = t.useState("animated"), m = t.useState("contentElement"), x = j(t.disclosure, "contentElement");
90
- S(() => {
37
+ const s = ue(null), f = te(r.id), [l, h] = le(null), c = t.useState("open"), C = t.useState("mounted"), d = t.useState("animated"), m = t.useState("contentElement"), x = R(t.disclosure, "contentElement");
38
+ p(() => {
91
39
  s.current && (t == null || t.setContentElement(s.current));
92
- }, [t]), S(() => {
40
+ }, [t]), p(() => {
93
41
  let u;
94
42
  return t == null || t.setState("animated", (v) => (u = v, !0)), () => {
95
43
  u !== void 0 && (t == null || t.setState("animated", u));
96
44
  };
97
- }, [t]), S(() => {
45
+ }, [t]), p(() => {
98
46
  if (d) {
99
47
  if (!(m != null && m.isConnected)) {
100
48
  h(null);
101
49
  return;
102
50
  }
103
- return _e(() => {
51
+ return ye(() => {
104
52
  h(c ? "enter" : C ? "leave" : null);
105
53
  });
106
54
  }
107
- }, [d, m, c, C]), S(() => {
55
+ }, [d, m, c, C]), p(() => {
108
56
  if (!t || !d || !l || !m) return;
109
57
  const u = () => t == null ? void 0 : t.setState("animating", !1), v = () => De(u);
110
58
  if (l === "leave" && c || l === "enter" && !c) return;
111
59
  if (typeof d == "number")
112
- return w(d, v);
60
+ return V(d, v);
113
61
  const {
114
62
  transitionDuration: k,
115
63
  animationDuration: q,
116
64
  transitionDelay: U,
117
65
  animationDelay: W
118
66
  } = getComputedStyle(m), {
119
- transitionDuration: z = "0",
120
- animationDuration: B = "0",
67
+ transitionDuration: G = "0",
68
+ animationDuration: K = "0",
121
69
  transitionDelay: L = "0",
122
- animationDelay: G = "0"
123
- } = x ? getComputedStyle(x) : {}, J = T(
70
+ animationDelay: z = "0"
71
+ } = x ? getComputedStyle(x) : {}, B = H(
124
72
  U,
125
73
  W,
126
74
  L,
127
- G
128
- ), K = T(
75
+ z
76
+ ), J = H(
129
77
  k,
130
78
  q,
131
- z,
132
- B
133
- ), O = J + K;
79
+ G,
80
+ K
81
+ ), O = B + J;
134
82
  if (!O) {
135
83
  l === "enter" && t.setState("animated", !1), u();
136
84
  return;
137
85
  }
138
86
  const Q = 1e3 / 60, X = Math.max(O - Q, 0);
139
- return w(X, v);
140
- }, [t, d, m, x, c, l]), r = de(
87
+ return V(X, v);
88
+ }, [t, d, m, x, c, l]), r = ne(
141
89
  r,
142
- (u) => /* @__PURE__ */ I(Ee, { value: t, children: u }),
90
+ (u) => /* @__PURE__ */ F(ge, { value: t, children: u }),
143
91
  [t]
144
92
  );
145
- const g = be(C, r.hidden, i), y = r.style, $ = Se(() => g ? V(_({}, y), { display: "none" }) : y, [g, y]);
146
- return r = V(_({
93
+ const g = Pe(C, r.hidden, i), E = r.style, $ = ce(() => g ? w(b({}, E), { display: "none" }) : E, [g, E]);
94
+ return r = w(b({
147
95
  id: f,
148
96
  "data-open": c || void 0,
149
97
  "data-enter": l === "enter" || void 0,
150
98
  "data-leave": l === "leave" || void 0,
151
99
  hidden: g
152
100
  }, r), {
153
- ref: me(f ? t.setContentElement : null, s, r.ref),
101
+ ref: oe(f ? t.setContentElement : null, s, r.ref),
154
102
  style: $
155
- }), fe(r);
156
- }), Oe = M(function(o) {
157
- const e = he(o);
158
- return ue(Pe, e);
159
- }), ke = M(function(o) {
103
+ }), ae(r);
104
+ }), _e = j(function(o) {
105
+ const e = be(o);
106
+ return Z(Ee, e);
107
+ }), $e = j(function(o) {
160
108
  var e = o, {
161
109
  unmountOnHide: t
162
- } = e, i = R(e, [
110
+ } = e, i = I(e, [
163
111
  "unmountOnHide"
164
112
  ]);
165
113
  const r = N(), a = i.store || r;
166
- return j(
114
+ return R(
167
115
  a,
168
116
  (f) => !t || (f == null ? void 0 : f.mounted)
169
- ) === !1 ? null : /* @__PURE__ */ I(Oe, _({}, i));
117
+ ) === !1 ? null : /* @__PURE__ */ F(_e, b({}, i));
170
118
  });
119
+ function he(n = {}) {
120
+ const o = de(
121
+ n.store,
122
+ me(n.disclosure, ["contentElement", "disclosureElement"])
123
+ );
124
+ fe(n, o);
125
+ const e = o == null ? void 0 : o.getState(), t = S(
126
+ n.open,
127
+ e == null ? void 0 : e.open,
128
+ n.defaultOpen,
129
+ !1
130
+ ), i = S(n.animated, e == null ? void 0 : e.animated, !1), r = {
131
+ open: t,
132
+ animated: i,
133
+ animating: !!i && t,
134
+ mounted: t,
135
+ contentElement: S(e == null ? void 0 : e.contentElement, null),
136
+ disclosureElement: S(e == null ? void 0 : e.disclosureElement, null)
137
+ }, a = ve(r, o);
138
+ return y(
139
+ a,
140
+ () => A(a, ["animated", "animating"], (s) => {
141
+ s.animated || a.setState("animating", !1);
142
+ })
143
+ ), y(
144
+ a,
145
+ () => pe(a, ["open"], () => {
146
+ a.getState().animated && a.setState("animating", !0);
147
+ })
148
+ ), y(
149
+ a,
150
+ () => A(a, ["open", "animating"], (s) => {
151
+ a.setState("mounted", s.open || s.animating);
152
+ })
153
+ ), se(re({}, a), {
154
+ disclosure: n.disclosure,
155
+ setOpen: (s) => a.setState("open", s),
156
+ show: () => a.setState("open", !0),
157
+ hide: () => a.setState("open", !1),
158
+ toggle: () => a.setState("open", (s) => !s),
159
+ stopAnimation: () => a.setState("animating", !1),
160
+ setContentElement: (s) => a.setState("contentElement", s),
161
+ setDisclosureElement: (s) => a.setState("disclosureElement", s)
162
+ });
163
+ }
164
+ function Oe(n, o, e) {
165
+ return ie(o, [e.store, e.disclosure]), P(n, e, "open", "setOpen"), P(n, e, "mounted", "setMounted"), P(n, e, "animated"), Object.assign(n, { disclosure: e.disclosure });
166
+ }
167
+ function ke(n = {}) {
168
+ const [o, e] = Se(he, n);
169
+ return Oe(o, e, n);
170
+ }
171
171
  export {
172
- ke as D,
173
- Re as a,
174
- Fe as b,
172
+ $e as D,
173
+ Ie as a,
174
+ Me as b,
175
175
  N as c,
176
- Ce as d,
177
- xe as e,
178
- he as f,
179
- Ee as g,
180
- Ne as h,
181
- be as i,
182
- $e as j,
183
- Ie as k,
184
- Me as u
176
+ be as d,
177
+ he as e,
178
+ Oe as f,
179
+ ge as g,
180
+ Fe as h,
181
+ Pe as i,
182
+ Ne as j,
183
+ Re as k,
184
+ ke as u
185
185
  };
package/dist/Table.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import { forwardRef as s } from "react";
4
- import { c as i } from "./index-PAaZGbyz.js";
4
+ import { c as i } from "./index-CdiHdiVB.js";
5
5
  const _ = "_root_8bmny_2", b = "_content_8bmny_6", l = "_clickable_8bmny_48", m = "_indent_8bmny_70", d = {
6
6
  root: _,
7
7
  content: b,