welcome-ui 1.0.0-beta.6 → 1.0.0-beta.8

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 (81) hide show
  1. package/dist/{AXB53BZF-KWM2jKTz.js → AXB53BZF-CAQ85RSy.js} +1 -1
  2. package/dist/{AXB53BZF-BxNazDnS.mjs → AXB53BZF-DCqNWRx3.mjs} +2 -2
  3. package/dist/Accordion.js +1 -1
  4. package/dist/Accordion.mjs +2 -2
  5. package/dist/{BYC7LY2E-BkAEL2VD.js → BYC7LY2E-BE1a2svb.js} +1 -1
  6. package/dist/{BYC7LY2E-BAjGN7k_.mjs → BYC7LY2E-BNqcw1O8.mjs} +2 -2
  7. package/dist/Breadcrumb.js +1 -1
  8. package/dist/Breadcrumb.mjs +4 -3
  9. package/dist/CustomInput-CHhz-wtr.js +1064 -0
  10. package/dist/CustomInput-DsJYqH0X.mjs +1272 -0
  11. package/dist/DatePicker.js +1 -1
  12. package/dist/DatePicker.mjs +1 -1
  13. package/dist/DateTimePicker.js +1 -1
  14. package/dist/DateTimePicker.mjs +1 -1
  15. package/dist/DateTimePickerCommon.js +1 -1
  16. package/dist/DateTimePickerCommon.mjs +1 -1
  17. package/dist/Drawer.js +1 -1
  18. package/dist/Drawer.mjs +3 -3
  19. package/dist/DropdownMenu.js +1 -1
  20. package/dist/DropdownMenu.mjs +5 -5
  21. package/dist/FileDrop.js +1 -1
  22. package/dist/FileDrop.mjs +4 -3
  23. package/dist/{JC64G2H7-CQsqXPS_.mjs → JC64G2H7-HxATiU-t.mjs} +2 -2
  24. package/dist/{JC64G2H7-YkBMNrtl.js → JC64G2H7-VmOGyhc1.js} +1 -1
  25. package/dist/{MTZPJQMC-DZ3zg4be.mjs → MTZPJQMC-C9lHSyrL.mjs} +1 -1
  26. package/dist/{MTZPJQMC-5Xg78Uyy.js → MTZPJQMC-D0pYOjc_.js} +1 -1
  27. package/dist/Modal.js +1 -1
  28. package/dist/Modal.mjs +3 -3
  29. package/dist/{P4IRICAX-DF0_vmod.mjs → P4IRICAX-C0oIr4wI.mjs} +1 -1
  30. package/dist/{P4IRICAX-nhgZ26A1.js → P4IRICAX-t3xfwWga.js} +1 -1
  31. package/dist/Popover.js +1 -1
  32. package/dist/Popover.mjs +1 -1
  33. package/dist/{QYJ6MIDR-CRK3satR.js → QYJ6MIDR-T-fJ_t8N.js} +1 -1
  34. package/dist/{QYJ6MIDR-Cy39pEs2.mjs → QYJ6MIDR-YegHsExc.mjs} +2 -2
  35. package/dist/{SYRFVSLH-BpAfr7UE.js → SYRFVSLH-Babm193P.js} +1 -1
  36. package/dist/{SYRFVSLH-DyepaZf7.mjs → SYRFVSLH-DXZgEwus.mjs} +1 -1
  37. package/dist/Search.js +7 -7
  38. package/dist/Search.mjs +36 -36
  39. package/dist/Select.js +1 -1
  40. package/dist/Select.mjs +5 -4
  41. package/dist/Tabs.js +8 -8
  42. package/dist/Tabs.mjs +168 -173
  43. package/dist/TimePicker.js +1 -1
  44. package/dist/TimePicker.mjs +1 -1
  45. package/dist/Toast.js +1 -1
  46. package/dist/Toast.mjs +1 -1
  47. package/dist/Tooltip.js +1 -1
  48. package/dist/Tooltip.mjs +2 -2
  49. package/dist/{VEVQD5MH-mN1wMozH.js → VEVQD5MH-Cal9SWXl.js} +1 -1
  50. package/dist/{VEVQD5MH-De4r89YE.mjs → VEVQD5MH-DOp_qaPw.mjs} +1 -1
  51. package/dist/{VGCJ63VH-fv0YLRh8.mjs → VGCJ63VH-BqPfqkK_.mjs} +1 -1
  52. package/dist/{VGCJ63VH-BNLwLOaC.js → VGCJ63VH-Cuf7P3qW.js} +1 -1
  53. package/dist/WelcomeLoader.js +1 -11
  54. package/dist/WelcomeLoader.mjs +25 -5086
  55. package/dist/{index-BPNky7_R.js → index-B8roHPE-.js} +1 -1
  56. package/dist/index-BFQbRuqA.mjs +165 -0
  57. package/dist/{index-BYdkhqH4.mjs → index-BZmKn5VO.mjs} +11 -14
  58. package/dist/index-BjGfAqCk.mjs +209 -0
  59. package/dist/{index-BHi0wohR.js → index-CQyLvMJP.js} +23 -23
  60. package/dist/{index-DG4lwZUW.mjs → index-Cjf3wLkx.mjs} +3 -3
  61. package/dist/index-CmBs24Im.mjs +413 -0
  62. package/dist/index-DG7ovxHW.js +117 -0
  63. package/dist/index-DSZG0Sqy.js +54 -0
  64. package/dist/index-DhF591OM.js +42 -0
  65. package/dist/index.js +7 -7
  66. package/dist/index.mjs +2154 -2216
  67. package/dist/{usePopover-Bbhh3p_j.mjs → usePopover-AbS2gpZq.mjs} +2 -2
  68. package/dist/{usePopover-PCWsuJNF.js → usePopover-CzPtX0h_.js} +1 -1
  69. package/package.json +1 -1
  70. package/dist/CustomInput-DUq7mNvC.mjs +0 -7826
  71. package/dist/CustomInput-NV_j0IWq.js +0 -1070
  72. package/dist/downshift.esm-DAo-GJwH.js +0 -1
  73. package/dist/downshift.esm-K4YLLQXl.mjs +0 -1085
  74. package/dist/index-BLom3M2B.js +0 -2
  75. package/dist/index-BZq8PyIk.js +0 -46
  76. package/dist/index-CGZVoNIN.mjs +0 -1077
  77. package/dist/index-DPMCsVtB.js +0 -54
  78. package/dist/index-R0G4mc9j.mjs +0 -2347
  79. package/dist/index-SbQUT2mU.mjs +0 -639
  80. package/dist/index-_oF_K5ZN.js +0 -122
  81. package/dist/index-mPb8TbpM.mjs +0 -447
package/dist/Tabs.mjs CHANGED
@@ -1,27 +1,28 @@
1
1
  "use client";
2
- import L, { createContext as ae, useMemo as ie, useCallback as ce, useRef as z, useEffect as Z, useState as K, Children as Pe, Fragment as Ce, cloneElement as Ee } from "react";
3
- import { forwardRef as Q } from "./System.mjs";
4
- import { u as $e } from "./use-viewport-m3glsbna.mjs";
5
- import { u as ye } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
6
- import M, { css as D, th as x, system as we } from "@xstyled/styled-components";
7
- import { C as le, a as de, d as ee, u as _e, e as Re } from "./P2CTZE2T-5jxBu6ix.mjs";
8
- import { n as ue, A as Le, B as V, C as O, D as k, Q as te, h as g, a as p, H as ne, c as U, _ as X, i as Y, x as me, o as Ne, e as H, m as F, w as Be, f as q, b as G, E as fe, aa as Oe, j as ke, v as Ae } from "./LVA2YJMS-Dm5ieEMw.mjs";
9
- import { c as De, b as Ve, u as je, a as Fe } from "./ITI7HKP4-Couz1Z73.mjs";
10
- import { e as Me, f as ze } from "./VGCJ63VH-fv0YLRh8.mjs";
11
- import { m as He, o as oe, s as A, d as y, g as We, c as Ke, a as be, b as se, u as j } from "./YV4JVR4I-1ezWeCCz.mjs";
12
- import { u as Qe } from "./VEVQD5MH-De4r89YE.mjs";
13
- import { P as Ue, a as Xe } from "./MTZPJQMC-DZ3zg4be.mjs";
14
- var Ye = ue(
15
- [Xe, de],
16
- [Ue, le]
17
- ), qe = Ye.useContext;
2
+ import L, { createContext as ae, useMemo as ie, useCallback as ce, useRef as z, useEffect as J, useState as W, cloneElement as Ce } from "react";
3
+ import { forwardRef as K } from "./System.mjs";
4
+ import Z from "react-flatten-children";
5
+ import { u as Pe } from "./use-viewport-m3glsbna.mjs";
6
+ import { u as Ee } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
7
+ import M, { css as V, th as x, system as $e } from "@xstyled/styled-components";
8
+ import { C as le, a as de, d as ee, u as we, e as ye } from "./P2CTZE2T-5jxBu6ix.mjs";
9
+ import { n as ue, A as _e, B as A, C as O, D as k, Q as te, h as g, a as p, H as oe, c as Q, _ as U, i as X, x as me, o as Re, e as H, m as F, w as Le, f as Y, b as q, E as fe, aa as Ne, j as Be, v as Oe } from "./LVA2YJMS-Dm5ieEMw.mjs";
10
+ import { c as ke, b as De, u as Ve, a as Ae } from "./ITI7HKP4-Couz1Z73.mjs";
11
+ import { e as je, f as Fe } from "./VGCJ63VH-BqPfqkK_.mjs";
12
+ import { m as Me, o as ne, s as D, d as w, g as ze, c as He, a as be, b as se, u as j } from "./YV4JVR4I-1ezWeCCz.mjs";
13
+ import { u as We } from "./VEVQD5MH-DOp_qaPw.mjs";
14
+ import { P as Ke, a as Qe } from "./MTZPJQMC-C9lHSyrL.mjs";
15
+ var Ue = ue(
16
+ [Qe, de],
17
+ [Ke, le]
18
+ ), Xe = Ue.useContext;
18
19
  ae(!1);
19
20
  ae(null);
20
- function Ge(t = {}) {
21
- var n = t, {
22
- composite: o,
21
+ function Ye(t = {}) {
22
+ var o = t, {
23
+ composite: n,
23
24
  combobox: e
24
- } = n, s = Le(n, [
25
+ } = o, s = _e(o, [
25
26
  "composite",
26
27
  "combobox"
27
28
  ]);
@@ -36,11 +37,11 @@ function Ge(t = {}) {
36
37
  "focusLoop",
37
38
  "focusShift",
38
39
  "focusWrap"
39
- ], m = He(
40
+ ], m = Me(
40
41
  s.store,
41
- oe(o, r),
42
- oe(e, r)
43
- ), c = m == null ? void 0 : m.getState(), d = De(V(k({}, s), {
42
+ ne(n, r),
43
+ ne(e, r)
44
+ ), c = m == null ? void 0 : m.getState(), d = ke(A(k({}, s), {
44
45
  store: m,
45
46
  // We need to explicitly set the default value of `includesBaseElement` to
46
47
  // `false` since we don't want the composite store to default it to `true`
@@ -57,7 +58,7 @@ function Ge(t = {}) {
57
58
  "horizontal"
58
59
  ),
59
60
  focusLoop: O(s.focusLoop, c == null ? void 0 : c.focusLoop, !0)
60
- })), a = Ve(), T = V(k({}, d.getState()), {
61
+ })), a = De(), T = A(k({}, d.getState()), {
61
62
  selectedId: O(
62
63
  s.selectedId,
63
64
  c == null ? void 0 : c.selectedId,
@@ -68,10 +69,10 @@ function Ge(t = {}) {
68
69
  c == null ? void 0 : c.selectOnMove,
69
70
  !0
70
71
  )
71
- }), i = Ke(T, d, m);
72
- A(
72
+ }), i = He(T, d, m);
73
+ D(
73
74
  i,
74
- () => y(i, ["moves"], () => {
75
+ () => w(i, ["moves"], () => {
75
76
  const { activeId: u, selectOnMove: b } = i.getState();
76
77
  if (!b || !u) return;
77
78
  const I = d.item(u);
@@ -79,62 +80,62 @@ function Ge(t = {}) {
79
80
  })
80
81
  );
81
82
  let v = !0;
82
- A(
83
+ D(
83
84
  i,
84
- () => We(i, ["selectedId"], (u, b) => {
85
+ () => ze(i, ["selectedId"], (u, b) => {
85
86
  if (!v) {
86
87
  v = !0;
87
88
  return;
88
89
  }
89
- o && u.selectedId === b.selectedId || i.setState("activeId", u.selectedId);
90
+ n && u.selectedId === b.selectedId || i.setState("activeId", u.selectedId);
90
91
  })
91
- ), A(
92
+ ), D(
92
93
  i,
93
- () => y(i, ["selectedId", "renderedItems"], (u) => {
94
+ () => w(i, ["selectedId", "renderedItems"], (u) => {
94
95
  if (u.selectedId !== void 0) return;
95
96
  const { activeId: b, renderedItems: I } = i.getState(), S = d.item(b);
96
97
  if (S && !S.disabled && !S.dimmed)
97
98
  i.setState("selectedId", S.id);
98
99
  else {
99
100
  const E = I.find(
100
- (P) => !P.disabled && !P.dimmed
101
+ (C) => !C.disabled && !C.dimmed
101
102
  );
102
103
  i.setState("selectedId", E == null ? void 0 : E.id);
103
104
  }
104
105
  })
105
- ), A(
106
+ ), D(
106
107
  i,
107
- () => y(i, ["renderedItems"], (u) => {
108
+ () => w(i, ["renderedItems"], (u) => {
108
109
  const b = u.renderedItems;
109
110
  if (b.length)
110
- return y(a, ["renderedItems"], (I) => {
111
+ return w(a, ["renderedItems"], (I) => {
111
112
  const S = I.renderedItems;
112
- S.some((P) => !P.tabId) && S.forEach((P, _) => {
113
- if (P.tabId) return;
113
+ S.some((C) => !C.tabId) && S.forEach((C, _) => {
114
+ if (C.tabId) return;
114
115
  const N = b[_];
115
- N && a.renderItem(V(k({}, P), { tabId: N.id }));
116
+ N && a.renderItem(A(k({}, C), { tabId: N.id }));
116
117
  });
117
118
  });
118
119
  })
119
120
  );
120
121
  let h = null;
121
- return A(i, () => {
122
+ return D(i, () => {
122
123
  const u = () => {
123
124
  h = i.getState().selectedId;
124
125
  }, b = () => {
125
126
  v = !1, i.setState("selectedId", h);
126
127
  };
127
- if (o && "setSelectElement" in o)
128
+ if (n && "setSelectElement" in n)
128
129
  return te(
129
- y(o, ["value"], u),
130
- y(o, ["mounted"], b)
130
+ w(n, ["value"], u),
131
+ w(n, ["mounted"], b)
131
132
  );
132
133
  if (e)
133
134
  return te(
134
- y(e, ["selectedValue"], u),
135
- y(e, ["mounted"], b)
135
+ w(e, ["selectedValue"], u),
136
+ w(e, ["mounted"], b)
136
137
  );
137
- }), V(k(k({}, d), i), {
138
+ }), A(k(k({}, d), i), {
138
139
  panels: a,
139
140
  setSelectedId: (u) => i.setState("selectedId", u),
140
141
  select: (u) => {
@@ -142,53 +143,53 @@ function Ge(t = {}) {
142
143
  }
143
144
  });
144
145
  }
145
- function Je(t, n, o) {
146
- ne(n, [o.composite, o.combobox]), t = je(t, n, o), se(t, o, "selectedId", "setSelectedId"), se(t, o, "selectOnMove");
146
+ function qe(t, o, n) {
147
+ oe(o, [n.composite, n.combobox]), t = Ve(t, o, n), se(t, n, "selectedId", "setSelectedId"), se(t, n, "selectOnMove");
147
148
  const [e, s] = be(() => t.panels, {});
148
- return ne(s, [t, s]), Object.assign(
149
+ return oe(s, [t, s]), Object.assign(
149
150
  ie(() => g(p({}, t), { panels: e }), [t, e]),
150
- { composite: o.composite, combobox: o.combobox }
151
+ { composite: n.composite, combobox: n.combobox }
151
152
  );
152
153
  }
153
- function Ze(t = {}) {
154
- const n = Qe(), o = qe() || n;
154
+ function Ge(t = {}) {
155
+ const o = We(), n = Xe() || o;
155
156
  t = g(p({}, t), {
156
- composite: t.composite !== void 0 ? t.composite : o,
157
- combobox: t.combobox !== void 0 ? t.combobox : n
157
+ composite: t.composite !== void 0 ? t.composite : n,
158
+ combobox: t.combobox !== void 0 ? t.combobox : o
158
159
  });
159
- const [e, s] = be(Ge, t);
160
- return Je(e, s, t);
160
+ const [e, s] = be(Ye, t);
161
+ return qe(e, s, t);
161
162
  }
162
- var J = ue(
163
+ var G = ue(
163
164
  [de],
164
165
  [le]
165
- ), et = J.useScopedContext, pe = J.useProviderContext, ve = J.ScopedContextProvider, tt = "button", nt = U(function(n) {
166
- var o = n, {
166
+ ), Je = G.useScopedContext, pe = G.useProviderContext, ve = G.ScopedContextProvider, Ze = "button", et = Q(function(o) {
167
+ var n = o, {
167
168
  store: e,
168
169
  getItem: s
169
- } = o, r = X(o, [
170
+ } = n, r = U(n, [
170
171
  "store",
171
172
  "getItem"
172
173
  ]), m;
173
- const c = et();
174
- e = e || c, Y(
174
+ const c = Je();
175
+ e = e || c, X(
175
176
  e,
176
177
  process.env.NODE_ENV !== "production" && "Tab must be wrapped in a TabList component."
177
178
  );
178
- const d = me(), a = r.id || d, T = Ne(r), i = ce(
179
+ const d = me(), a = r.id || d, T = Re(r), i = ce(
179
180
  (f) => {
180
- const w = g(p({}, f), { dimmed: T });
181
- return s ? s(w) : w;
181
+ const y = g(p({}, f), { dimmed: T });
182
+ return s ? s(y) : y;
182
183
  },
183
184
  [T, s]
184
185
  ), v = r.onClick, h = H((f) => {
185
186
  v == null || v(f), !f.defaultPrevented && (e == null || e.setSelectedId(a));
186
187
  }), u = e.panels.useState(
187
188
  (f) => {
188
- var w;
189
- return (w = f.items.find((l) => l.tabId === a)) == null ? void 0 : w.id;
189
+ var y;
190
+ return (y = f.items.find((l) => l.tabId === a)) == null ? void 0 : y.id;
190
191
  }
191
- ), b = d ? r.shouldRegisterItem : !1, I = e.useState((f) => !!a && f.activeId === a), S = e.useState((f) => !!a && f.selectedId === a), E = e.useState((f) => !!e.item(f.activeId)), P = I || S && !E, _ = S || ((m = r.accessibleWhenDisabled) != null ? m : !0);
192
+ ), b = d ? r.shouldRegisterItem : !1, I = e.useState((f) => !!a && f.activeId === a), S = e.useState((f) => !!a && f.selectedId === a), E = e.useState((f) => !!e.item(f.activeId)), C = I || S && !E, _ = S || ((m = r.accessibleWhenDisabled) != null ? m : !0);
192
193
  if (j(
193
194
  e.combobox || e.composite,
194
195
  "virtualFocus"
@@ -206,7 +207,7 @@ var J = ue(
206
207
  id: a,
207
208
  accessibleWhenDisabled: _,
208
209
  store: e.composite,
209
- shouldRegisterItem: P && b,
210
+ shouldRegisterItem: C && b,
210
211
  rowId: r.rowId,
211
212
  render: r.render
212
213
  };
@@ -219,23 +220,23 @@ var J = ue(
219
220
  )
220
221
  });
221
222
  }
222
- return r = _e(g(p({
223
+ return r = we(g(p({
223
224
  store: e
224
225
  }, r), {
225
226
  accessibleWhenDisabled: _,
226
227
  getItem: i,
227
228
  shouldRegisterItem: b
228
229
  })), r;
229
- }), ot = Be(
230
- q(function(n) {
231
- const o = nt(n);
232
- return G(tt, o);
230
+ }), tt = Le(
231
+ Y(function(o) {
232
+ const n = et(o);
233
+ return q(Ze, n);
233
234
  })
234
- ), st = "div", rt = U(
235
- function(n) {
236
- var o = n, { store: e } = o, s = X(o, ["store"]);
235
+ ), ot = "div", nt = Q(
236
+ function(o) {
237
+ var n = o, { store: e } = n, s = U(n, ["store"]);
237
238
  const r = pe();
238
- e = e || r, Y(
239
+ e = e || r, X(
239
240
  e,
240
241
  process.env.NODE_ENV !== "production" && "TabList must receive a `store` prop or be wrapped in a TabProvider component."
241
242
  );
@@ -251,21 +252,21 @@ var J = ue(
251
252
  }, s)), s = p({
252
253
  role: "tablist",
253
254
  "aria-orientation": m
254
- }, s), s = Fe(p({ store: e }, s)), s;
255
+ }, s), s = Ae(p({ store: e }, s)), s;
255
256
  }
256
- ), at = q(function(n) {
257
- const o = rt(n);
258
- return G(st, o);
259
- }), it = "div", ct = U(
260
- function(n) {
261
- var o = n, {
257
+ ), st = Y(function(o) {
258
+ const n = nt(o);
259
+ return q(ot, n);
260
+ }), rt = "div", at = Q(
261
+ function(o) {
262
+ var n = o, {
262
263
  store: e,
263
264
  unmountOnHide: s,
264
265
  tabId: r,
265
266
  getItem: m,
266
267
  scrollRestoration: c,
267
268
  scrollElement: d
268
- } = o, a = X(o, [
269
+ } = n, a = U(n, [
269
270
  "store",
270
271
  "unmountOnHide",
271
272
  "tabId",
@@ -274,7 +275,7 @@ var J = ue(
274
275
  "scrollElement"
275
276
  ]);
276
277
  const T = pe();
277
- e = e || T, Y(
278
+ e = e || T, X(
278
279
  e,
279
280
  process.env.NODE_ENV !== "production" && "TabPanel must receive a `store` prop or be wrapped in a TabProvider component."
280
281
  );
@@ -287,39 +288,39 @@ var J = ue(
287
288
  ), u = j(
288
289
  e,
289
290
  (l) => !!h && l.selectedId === h
290
- ), b = Me({ open: u }), I = j(b, "mounted"), S = z(
291
+ ), b = je({ open: u }), I = j(b, "mounted"), S = z(
291
292
  /* @__PURE__ */ new Map()
292
293
  ), E = H(() => {
293
294
  const l = i.current;
294
295
  return l ? d ? typeof d == "function" ? d(l) : "current" in d ? d.current : d : l : null;
295
296
  });
296
- Z(() => {
297
+ J(() => {
297
298
  var l, $;
298
299
  if (!c || !I) return;
299
- const C = E();
300
- if (!C) return;
300
+ const P = E();
301
+ if (!P) return;
301
302
  if (c === "reset") {
302
- C.scroll(0, 0);
303
+ P.scroll(0, 0);
303
304
  return;
304
305
  }
305
306
  if (!h) return;
306
307
  const R = S.current.get(h);
307
- C.scroll((l = R == null ? void 0 : R.x) != null ? l : 0, ($ = R == null ? void 0 : R.y) != null ? $ : 0);
308
+ P.scroll((l = R == null ? void 0 : R.x) != null ? l : 0, ($ = R == null ? void 0 : R.y) != null ? $ : 0);
308
309
  const B = () => {
309
310
  S.current.set(h, {
310
- x: C.scrollLeft,
311
- y: C.scrollTop
311
+ x: P.scrollLeft,
312
+ y: P.scrollTop
312
313
  });
313
314
  };
314
- return C.addEventListener("scroll", B), () => {
315
- C.removeEventListener("scroll", B);
315
+ return P.addEventListener("scroll", B), () => {
316
+ P.removeEventListener("scroll", B);
316
317
  };
317
318
  }, [c, I, h, E, e]);
318
- const [P, _] = K(!1);
319
- Z(() => {
319
+ const [C, _] = W(!1);
320
+ J(() => {
320
321
  const l = i.current;
321
322
  if (!l) return;
322
- const $ = Oe(l);
323
+ const $ = Ne(l);
323
324
  _(!!$.length);
324
325
  }, []);
325
326
  const N = ce(
@@ -328,16 +329,16 @@ var J = ue(
328
329
  return m ? m($) : $;
329
330
  },
330
331
  [v, r, m]
331
- ), f = a.onKeyDown, w = H((l) => {
332
+ ), f = a.onKeyDown, y = H((l) => {
332
333
  if (f == null || f(l), l.defaultPrevented || !(e != null && e.composite)) return;
333
- const C = {
334
+ const P = {
334
335
  ArrowLeft: e.previous,
335
336
  ArrowRight: e.next,
336
337
  Home: e.first,
337
338
  End: e.last
338
339
  }[l.key];
339
- if (!C) return;
340
- const { selectedId: R } = e.getState(), B = C({ activeId: R });
340
+ if (!P) return;
341
+ const { selectedId: R } = e.getState(), B = P({ activeId: R });
341
342
  B && (l.preventDefault(), e.move(B));
342
343
  });
343
344
  return a = fe(
@@ -350,34 +351,28 @@ var J = ue(
350
351
  "aria-labelledby": h || void 0
351
352
  }, a), {
352
353
  children: s && !I ? null : a.children,
353
- ref: ke(i, a.ref),
354
- onKeyDown: w
355
- }), a = Ae(p({
354
+ ref: Be(i, a.ref),
355
+ onKeyDown: y
356
+ }), a = Oe(p({
356
357
  // If the tab panel is rendered as part of another composite widget such
357
358
  // as combobox, it should not be focusable.
358
- focusable: !e.composite && !P
359
- }, a)), a = ze(p({ store: b }, a)), a = Re(g(p({ store: e.panels }, a), { getItem: N })), a;
359
+ focusable: !e.composite && !C
360
+ }, a)), a = Fe(p({ store: b }, a)), a = ye(g(p({ store: e.panels }, a), { getItem: N })), a;
360
361
  }
361
- ), lt = q(function(n) {
362
- const o = ct(n);
363
- return G(it, o);
362
+ ), it = Y(function(o) {
363
+ const n = at(o);
364
+ return q(rt, n);
364
365
  });
365
- function W(t) {
366
- var n = Pe.toArray(t);
367
- return n.reduce(function(o, e) {
368
- return e.type === Ce ? o.concat(W(e.props.children)) : (o.push(e), o);
369
- }, []);
370
- }
371
- function re(t, n) {
372
- typeof t == "function" ? t(n) : t && (t.current = n);
366
+ function re(t, o) {
367
+ typeof t == "function" ? t(o) : t && (t.current = o);
373
368
  }
374
- function dt(t, n) {
375
- return ie(() => t == null && n == null ? null : (o) => {
376
- re(t, o), re(n, o);
377
- }, [t, n]);
369
+ function ct(t, o) {
370
+ return ie(() => t == null && o == null ? null : (n) => {
371
+ re(t, n), re(o, n);
372
+ }, [t, o]);
378
373
  }
379
- const ut = M(at)(
380
- ({ size: t }) => D`
374
+ const lt = M(st)(
375
+ ({ size: t }) => V`
381
376
  position: relative;
382
377
  width: 100%;
383
378
  overflow-x: auto;
@@ -395,7 +390,7 @@ const ut = M(at)(
395
390
  ${Ie} {
396
391
  ${x(`tabs.item.size.${t}`)}
397
392
  }
398
- ${we};
393
+ ${$e};
399
394
  `
400
395
  ), Ie = M.button`
401
396
  border: 0;
@@ -439,101 +434,101 @@ const ut = M(at)(
439
434
  & > span {
440
435
  ${x("tabs.badge")};
441
436
  }
442
- `, mt = M(lt)(
443
- ({ orientation: t }) => D`
437
+ `, dt = M(it)(
438
+ ({ orientation: t }) => V`
444
439
  ${t === "vertical" ? x("tabs.panel.vertical") : x("tabs.panel.horizontal")};
445
440
  `
446
- ), ft = ({ offset: t = 0, size: n = 0 }) => D`
441
+ ), ut = ({ offset: t = 0, size: o = 0 }) => V`
447
442
  ${x("tabs.activeBar.horizontal")};
448
443
  left: 0;
449
444
  bottom: 0;
450
- width: ${n}px;
445
+ width: ${o}px;
451
446
  transform: translateX(${t}px);
452
- `, bt = ({ offset: t = 0, size: n = 0 }) => D`
447
+ `, mt = ({ offset: t = 0, size: o = 0 }) => V`
453
448
  ${x("tabs.activeBar.vertical")};
454
449
  right: 0;
455
450
  top: 0;
456
- height: ${n}px;
451
+ height: ${o}px;
457
452
  transform: translateY(${t}px);
458
- `, pt = M.span(
459
- ({ orientation: t, ...n }) => D`
453
+ `, ft = M.span(
454
+ ({ orientation: t, ...o }) => V`
460
455
  position: absolute;
461
- ${t === "vertical" ? bt(n) : ft(n)}
456
+ ${t === "vertical" ? mt(o) : ut(o)}
462
457
  will-change: width, transform;
463
458
  transition: medium;
464
459
  transition-property: transform, width;
465
460
  `
466
461
  ), Se = (t) => {
467
462
  if (!t || typeof window > "u") return 1;
468
- const n = Number(window.getComputedStyle(t).scale);
469
- return isNaN(n) ? Se(t.parentElement) : n;
463
+ const o = Number(window.getComputedStyle(t).scale);
464
+ return isNaN(o) ? Se(t.parentElement) : o;
470
465
  };
471
- function vt(t, n, o) {
472
- const [e, s] = K({}), { height: r, width: m } = $e();
473
- return ye(() => {
466
+ function bt(t, o, n) {
467
+ const [e, s] = W({}), { height: r, width: m } = Pe();
468
+ return Ee(() => {
474
469
  const c = t.current;
475
- if (!c || !n) return;
476
- const d = c.getBoundingClientRect(), a = n.getBoundingClientRect(), T = Se(c);
477
- if (o === "vertical") {
470
+ if (!c || !o) return;
471
+ const d = c.getBoundingClientRect(), a = o.getBoundingClientRect(), T = Se(c);
472
+ if (n === "vertical") {
478
473
  const i = a.top - d.top, v = a.height;
479
474
  s({
480
475
  size: v,
481
476
  offset: i,
482
- orientation: o
477
+ orientation: n
483
478
  });
484
479
  } else {
485
480
  const i = (a.left - d.left + c.scrollLeft) / T, v = a.width / T;
486
481
  s({
487
482
  size: isNaN(v) ? 0 : v,
488
483
  offset: isNaN(i) ? 0 : i,
489
- orientation: o
484
+ orientation: n
490
485
  });
491
486
  }
492
- }, [t, n, m, r, o]), e;
487
+ }, [t, o, m, r, n]), e;
493
488
  }
494
- const xe = ({ activeTab: t, listRef: n, orientation: o }) => {
495
- const e = vt(n, t, o);
496
- return /* @__PURE__ */ L.createElement(pt, { ...e });
489
+ const xe = ({ activeTab: t, listRef: o, orientation: n }) => {
490
+ const e = bt(o, t, n);
491
+ return /* @__PURE__ */ L.createElement(ft, { ...e });
497
492
  };
498
493
  xe.displayName = "ActiveBar";
499
- const It = W.default || W;
500
- function St(t, n) {
501
- const [o, e] = K(null);
502
- return [It(n).map((r) => r.props.id === t ? Ee(r, { ref: e }) : r), o];
494
+ const pt = Z.default || Z;
495
+ function vt(t, o) {
496
+ const [n, e] = W(null);
497
+ return [pt(o).map((r) => r.props.id === t ? Ce(r, { ref: e }) : r), n];
503
498
  }
504
- const he = Q(
505
- ({ children: t, size: n = "md", store: o, ...e }, s) => {
506
- const r = z(), m = dt(s, r), { orientation: c, selectedId: d } = o.useState(), [a, T] = St(d, t);
507
- return /* @__PURE__ */ L.createElement(ut, { orientation: c, ref: m, size: n, store: o, ...e }, a, a.length > 1 && /* @__PURE__ */ L.createElement(xe, { activeTab: T, listRef: r, orientation: c }));
499
+ const he = K(
500
+ ({ children: t, size: o = "md", store: n, ...e }, s) => {
501
+ const r = z(), m = ct(s, r), { orientation: c, selectedId: d } = n.useState(), [a, T] = vt(d, t);
502
+ return /* @__PURE__ */ L.createElement(lt, { orientation: c, ref: m, size: o, store: n, ...e }, a, a.length > 1 && /* @__PURE__ */ L.createElement(xe, { activeTab: T, listRef: r, orientation: c }));
508
503
  }
509
504
  );
510
505
  he.displayName = "TabList";
511
- const ge = Q(
512
- ({ children: t, store: n, tabId: o, ...e }, s) => {
513
- const r = n.useState("orientation");
514
- return /* @__PURE__ */ L.createElement(mt, { orientation: r, ref: s, store: n, tabId: o, ...e }, t);
506
+ const ge = K(
507
+ ({ children: t, store: o, tabId: n, ...e }, s) => {
508
+ const r = o.useState("orientation");
509
+ return /* @__PURE__ */ L.createElement(dt, { orientation: r, ref: s, store: o, tabId: n, ...e }, t);
515
510
  }
516
511
  );
517
512
  ge.displayName = "TabPanel";
518
- const Te = Q(
519
- ({ as: t, children: n, id: o, store: e, ...s }, r) => /* @__PURE__ */ L.createElement(
520
- ot,
513
+ const Te = K(
514
+ ({ as: t, children: o, id: n, store: e, ...s }, r) => /* @__PURE__ */ L.createElement(
515
+ tt,
521
516
  {
522
- id: o,
517
+ id: n,
523
518
  render: (m) => /* @__PURE__ */ L.createElement(Ie, { as: t, ...m, ref: r }),
524
519
  store: e,
525
520
  ...s
526
521
  },
527
- n
522
+ o
528
523
  )
529
524
  );
530
525
  Te.displayName = "Tab";
531
- const Lt = Object.assign(Te, { List: he, Panel: ge });
532
- function Nt(t) {
533
- return Ze(t);
526
+ const Rt = Object.assign(Te, { List: he, Panel: ge });
527
+ function Lt(t) {
528
+ return Ge(t);
534
529
  }
535
530
  export {
536
- Lt as Tab,
531
+ Rt as Tab,
537
532
  Te as TabComponent,
538
- Nt as useTab
533
+ Lt as useTab
539
534
  };
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),c=require("./CustomInput-NV_j0IWq.js"),H=require("./System.js"),I=require("@xstyled/styled-components"),O=I.div`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),c=require("./CustomInput-CHhz-wtr.js"),H=require("./System.js"),I=require("@xstyled/styled-components"),O=I.div`
2
2
  position: relative;
3
3
  ${c.fixAriaMessageStyle}
4
4
  `,S=H.forwardRef(({autoFocus:y,dataTestId:E,dateFormat:k="HH:mm",disabled:P,icon:a,iconPlacement:u="left",onBlur:m,onChange:t,onFocus:n,placeholder:g,popperProps:h,size:d="md",timeIntervals:p=15,transparent:q,value:l=c.DEFAULT_DATE,...f},D)=>{const i=e=>c.getDate(e,p),F=g||f.placeholderText,[R,T]=s.useState(y&&"time"||null),[b,o]=s.useState(i(l));s.useEffect(()=>{t&&t(i(l))},[]),s.useEffect(()=>{var r;const e=i(l);((r=new Date(l))==null?void 0:r.getTime())-(e==null?void 0:e.getTime())!==0&&t&&t(e),o(e)},[l]);const x=e=>{T("time"),n&&n(e)},A=e=>{T(null),m&&m(e)},M=e=>{e.preventDefault(),o(null),t&&t()},N=e=>{if(!e)return;const r=i(e);e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),o(e),t&&t(new Date(e))};return s.createElement(O,null,s.createElement(c.StyledTimePicker,{calendarClassName:"time-picker-popper",customInput:s.createElement(c.CustomInput,{className:"time-picker","data-testid":E,focused:R,handleBlur:A,handleFocus:x,icon:a,iconPlacement:u,onReset:M,ref:D,size:d}),dateFormat:k,disabled:P,iconPlacement:!!a&&u,onChange:N,placeholderText:F,popperContainer:c.CustomPopper,popperProps:h,selected:b,showTimeSelect:!0,showTimeSelectOnly:!0,size:d,timeIntervals:p,transparent:q,...f,isClearable:!1}))});S.displayName="TimePicker";exports.TimePicker=S;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import c, { useState as T, useEffect as E } from "react";
3
- import { f as M, a as Y, c as w, b as I, D as L, g as O } from "./CustomInput-DUq7mNvC.mjs";
3
+ import { f as M, a as Y, c as w, b as I, D as L, g as O } from "./CustomInput-DsJYqH0X.mjs";
4
4
  import { forwardRef as U } from "./System.mjs";
5
5
  import W from "@xstyled/styled-components";
6
6
  const $ = W.div`
package/dist/Toast.js CHANGED
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),l=require("@xstyled/styled-components"),q=require("./index-BHi0wohR.js"),T=require("./Box.js"),A=require("./Alert.js"),B=require("./CloseButton.js"),C=require("./System.js"),M=require("./Button.js");var N=t=>typeof t=="function",$=(t,e)=>N(t)?t(e):t,R=(()=>{let t=0;return()=>(++t).toString()})(),G=20,x=new Map,z=1e3,P=t=>{if(x.has(t))return;let e=setTimeout(()=>{x.delete(t),h({type:4,toastId:t})},z);x.set(t,e)},H=t=>{let e=x.get(t);e&&clearTimeout(e)},S=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,G)};case 1:return e.toast.id&&H(e.toast.id),{...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case 2:let{toast:s}=e;return t.toasts.find(o=>o.id===s.id)?S(t,{type:1,toast:s}):S(t,{type:0,toast:s});case 3:let{toastId:n}=e;return n?P(n):t.toasts.forEach(o=>{P(o.id)}),{...t,toasts:t.toasts.map(o=>o.id===n||n===void 0?{...o,visible:!1}:o)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let r=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+r}))}}},E=[],k={toasts:[],pausedAt:void 0},h=t=>{k=S(k,t),E.forEach(e=>{e(k)})},L={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},W=(t={})=>{let[e,s]=a.useState(k);a.useEffect(()=>(E.push(s),()=>{let r=E.indexOf(s);r>-1&&E.splice(r,1)}),[e]);let n=e.toasts.map(r=>{var o,u;return{...t,...t[r.type],...r,duration:r.duration||((o=t[r.type])==null?void 0:o.duration)||(t==null?void 0:t.duration)||L[r.type],style:{...t.style,...(u=t[r.type])==null?void 0:u.style,...r.style}}});return{...e,toasts:n}},Y=(t,e="blank",s)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...s,id:(s==null?void 0:s.id)||R()}),v=t=>(e,s)=>{let n=Y(e,t,s);return h({type:2,toast:n}),n.id},c=(t,e)=>v("blank")(t,e);c.error=v("error");c.success=v("success");c.loading=v("loading");c.custom=v("custom");c.dismiss=t=>{h({type:3,toastId:t})};c.remove=t=>h({type:4,toastId:t});c.promise=(t,e,s)=>{let n=c.loading(e.loading,{...s,...s==null?void 0:s.loading});return t.then(r=>(c.success($(e.success,r),{id:n,...s,...s==null?void 0:s.success}),r)).catch(r=>{c.error($(e.error,r),{id:n,...s,...s==null?void 0:s.error})}),t};var _=(t,e)=>{h({type:1,toast:{id:t,height:e}})},j=()=>{h({type:5,time:Date.now()})},U=t=>{let{toasts:e,pausedAt:s}=W(t);a.useEffect(()=>{if(s)return;let o=Date.now(),u=e.map(i=>{if(i.duration===1/0)return;let f=(i.duration||0)+i.pauseDuration-(o-i.createdAt);if(f<0){i.visible&&c.dismiss(i.id);return}return setTimeout(()=>c.dismiss(i.id),f)});return()=>{u.forEach(i=>i&&clearTimeout(i))}},[e,s]);let n=a.useCallback(()=>{s&&h({type:6,time:Date.now()})},[s]),r=a.useCallback((o,u)=>{let{reverseOrder:i=!1,gutter:f=8,defaultPosition:p}=u||{},m=e.filter(d=>(d.position||p)===(o.position||p)&&d.height),g=m.findIndex(d=>d.id===o.id),y=m.filter((d,b)=>b<g&&d.visible).length;return m.filter(d=>d.visible).slice(...i?[y+1]:[0,y]).reduce((d,b)=>d+(b.height||0)+f,0)},[e]);return{toasts:e,handlers:{updateHeight:_,startPause:j,endPause:n,calculateOffset:r}}},w=c;function F(t=!1){const[e,s]=a.useState(!1);return a.useEffect(()=>{s(!0)},[]),a.useMemo(()=>t?n=>n:e?(n,r,o)=>q.reactDomExports.createPortal(n,r||document.body,o):()=>null,[t,e])}const J=l(T.Box)(({isBottom:t})=>l.css`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),l=require("@xstyled/styled-components"),q=require("./index-CQyLvMJP.js"),T=require("./Box.js"),A=require("./Alert.js"),B=require("./CloseButton.js"),C=require("./System.js"),M=require("./Button.js");var N=t=>typeof t=="function",$=(t,e)=>N(t)?t(e):t,R=(()=>{let t=0;return()=>(++t).toString()})(),G=20,x=new Map,z=1e3,P=t=>{if(x.has(t))return;let e=setTimeout(()=>{x.delete(t),h({type:4,toastId:t})},z);x.set(t,e)},H=t=>{let e=x.get(t);e&&clearTimeout(e)},S=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,G)};case 1:return e.toast.id&&H(e.toast.id),{...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case 2:let{toast:s}=e;return t.toasts.find(o=>o.id===s.id)?S(t,{type:1,toast:s}):S(t,{type:0,toast:s});case 3:let{toastId:n}=e;return n?P(n):t.toasts.forEach(o=>{P(o.id)}),{...t,toasts:t.toasts.map(o=>o.id===n||n===void 0?{...o,visible:!1}:o)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let r=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+r}))}}},E=[],k={toasts:[],pausedAt:void 0},h=t=>{k=S(k,t),E.forEach(e=>{e(k)})},L={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},W=(t={})=>{let[e,s]=a.useState(k);a.useEffect(()=>(E.push(s),()=>{let r=E.indexOf(s);r>-1&&E.splice(r,1)}),[e]);let n=e.toasts.map(r=>{var o,u;return{...t,...t[r.type],...r,duration:r.duration||((o=t[r.type])==null?void 0:o.duration)||(t==null?void 0:t.duration)||L[r.type],style:{...t.style,...(u=t[r.type])==null?void 0:u.style,...r.style}}});return{...e,toasts:n}},Y=(t,e="blank",s)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...s,id:(s==null?void 0:s.id)||R()}),v=t=>(e,s)=>{let n=Y(e,t,s);return h({type:2,toast:n}),n.id},c=(t,e)=>v("blank")(t,e);c.error=v("error");c.success=v("success");c.loading=v("loading");c.custom=v("custom");c.dismiss=t=>{h({type:3,toastId:t})};c.remove=t=>h({type:4,toastId:t});c.promise=(t,e,s)=>{let n=c.loading(e.loading,{...s,...s==null?void 0:s.loading});return t.then(r=>(c.success($(e.success,r),{id:n,...s,...s==null?void 0:s.success}),r)).catch(r=>{c.error($(e.error,r),{id:n,...s,...s==null?void 0:s.error})}),t};var _=(t,e)=>{h({type:1,toast:{id:t,height:e}})},j=()=>{h({type:5,time:Date.now()})},U=t=>{let{toasts:e,pausedAt:s}=W(t);a.useEffect(()=>{if(s)return;let o=Date.now(),u=e.map(i=>{if(i.duration===1/0)return;let f=(i.duration||0)+i.pauseDuration-(o-i.createdAt);if(f<0){i.visible&&c.dismiss(i.id);return}return setTimeout(()=>c.dismiss(i.id),f)});return()=>{u.forEach(i=>i&&clearTimeout(i))}},[e,s]);let n=a.useCallback(()=>{s&&h({type:6,time:Date.now()})},[s]),r=a.useCallback((o,u)=>{let{reverseOrder:i=!1,gutter:f=8,defaultPosition:p}=u||{},m=e.filter(d=>(d.position||p)===(o.position||p)&&d.height),g=m.findIndex(d=>d.id===o.id),y=m.filter((d,b)=>b<g&&d.visible).length;return m.filter(d=>d.visible).slice(...i?[y+1]:[0,y]).reduce((d,b)=>d+(b.height||0)+f,0)},[e]);return{toasts:e,handlers:{updateHeight:_,startPause:j,endPause:n,calculateOffset:r}}},w=c;function F(t=!1){const[e,s]=a.useState(!1);return a.useEffect(()=>{s(!0)},[]),a.useMemo(()=>t?n=>n:e?(n,r,o)=>q.reactDomExports.createPortal(n,r||document.body,o):()=>null,[t,e])}const J=l(T.Box)(({isBottom:t})=>l.css`
2
2
  ${l.th("toasts.default")}
3
3
  ${t?l.th("toasts.bottom"):l.th("toasts.top")}
4
4
 
package/dist/Toast.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import d, { useEffect as C, useCallback as I, useState as M, useMemo as R, cloneElement as z, useContext as H } from "react";
3
3
  import v, { css as w, th as m, ThemeContext as L, ThemeProvider as W } from "@xstyled/styled-components";
4
- import { r as Y } from "./index-BYdkhqH4.mjs";
4
+ import { r as Y } from "./index-BZmKn5VO.mjs";
5
5
  import { Box as $ } from "./Box.mjs";
6
6
  import { Alert as _ } from "./Alert.mjs";
7
7
  import { CloseButton as B } from "./CloseButton.mjs";