welcome-ui 7.0.0 → 7.0.1-alpha.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 (48) hide show
  1. package/dist/Checkbox.js +1 -1
  2. package/dist/Checkbox.mjs +1 -1
  3. package/dist/{CustomInput-BCCxIle7.mjs → CustomInput-Cewo45Hd.mjs} +1 -1
  4. package/dist/{CustomInput-CDNZy-pz.js → CustomInput-DVH2rh9-.js} +1 -1
  5. package/dist/DatePicker.js +1 -1
  6. package/dist/DatePicker.mjs +1 -1
  7. package/dist/DateTimePicker.js +1 -1
  8. package/dist/DateTimePicker.mjs +1 -1
  9. package/dist/DateTimePickerCommon.js +1 -1
  10. package/dist/DateTimePickerCommon.mjs +1 -1
  11. package/dist/InputText.js +1 -1
  12. package/dist/InputText.mjs +1 -1
  13. package/dist/Radio.js +1 -1
  14. package/dist/Radio.mjs +1 -1
  15. package/dist/RadioTab.js +1 -1
  16. package/dist/RadioTab.mjs +1 -1
  17. package/dist/Search.js +1 -1
  18. package/dist/Search.mjs +1 -1
  19. package/dist/Select.js +1 -1
  20. package/dist/Select.mjs +1 -1
  21. package/dist/Tabs.js +9 -9
  22. package/dist/Tabs.mjs +83 -90
  23. package/dist/Textarea.js +1 -1
  24. package/dist/Textarea.mjs +1 -1
  25. package/dist/TimePicker.js +1 -1
  26. package/dist/TimePicker.mjs +1 -1
  27. package/dist/Toast.js +6 -6
  28. package/dist/Toast.mjs +17 -18
  29. package/dist/Toggle.js +1 -1
  30. package/dist/Toggle.mjs +1 -1
  31. package/dist/{field-styles-CeV7pnOp.mjs → field-styles-DLIhqG_8.mjs} +3 -3
  32. package/dist/{field-styles-D_gf6ypV.js → field-styles-DYEc1l_A.js} +1 -1
  33. package/dist/{index-CDjY0N2Z.mjs → index-BSdL4wPb.mjs} +1 -1
  34. package/dist/{index-CUtaVckz.js → index-Dn-QEAu6.js} +1 -1
  35. package/dist/theme.js +5 -5
  36. package/dist/theme.mjs +613 -532
  37. package/dist/types/components/Field/index.d.ts +2 -2
  38. package/dist/types/components/Field/styles.d.ts +3 -3
  39. package/dist/types/components/Select/styles.d.ts +3 -3
  40. package/dist/types/components/Toast/index.d.ts +5 -7
  41. package/dist/types/theme/defaultFields.d.ts +3 -3
  42. package/dist/types/utils/field-styles.d.ts +4 -8
  43. package/dist/types/utils/index.d.ts +7 -3
  44. package/dist/use-fork-ref-Bjf1e56Z.js +1 -0
  45. package/dist/use-fork-ref-CUZErtAC.mjs +14 -0
  46. package/dist/utils.js +1 -1
  47. package/dist/utils.mjs +36 -26
  48. package/package.json +3 -1
package/dist/Tabs.mjs CHANGED
@@ -1,22 +1,23 @@
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";
2
+ import L, { createContext as re, useMemo as ge, useCallback as ae, useRef as z, useEffect as Z, useState as K, Children as Te, Fragment as Pe, cloneElement as Ce } from "react";
3
+ import { u as Ee } from "./use-fork-ref-CUZErtAC.mjs";
3
4
  import { u as $e } from "./use-viewport-m3glsbna.mjs";
4
5
  import { u as ye } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
5
6
  import j, { css as D, th as x, system as we } from "@xstyled/styled-components";
6
- import { C as le, a as de, d as ee, u as _e, e as Re } from "./P2CTZE2T-YPes1GXe.mjs";
7
- import { v as ue, A as Le, B as V, C as O, D as k, Q as te, d as g, g as p, H as ne, c as Q, _ as U, i as X, x as me, l as Ne, b as H, t as M, w as Be, f as Y, h as q, E as fe, aa as Oe, e as ke, r as Ae } from "./LVA2YJMS-qFC9J-lt.mjs";
7
+ import { C as ie, a as ce, d as ee, u as _e, e as Re } from "./P2CTZE2T-YPes1GXe.mjs";
8
+ import { v as le, A as Le, B as V, C as A, D as O, Q as te, d as g, g as p, H as oe, c as Q, _ as U, i as X, x as de, l as Ne, b as H, t as M, w as Be, f as Y, h as q, E as ue, aa as Ae, e as Oe, r as ke } from "./LVA2YJMS-qFC9J-lt.mjs";
8
9
  import { c as De, b as Ve, u as Fe, a as Me } from "./ITI7HKP4-BONrZ9Pq.mjs";
9
10
  import { e as je, f as ze } from "./VGCJ63VH-B39w1tBw.mjs";
10
- 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 F } from "./YV4JVR4I-BGfUf3Nu.mjs";
11
+ import { m as He, o as ne, s as k, d as y, g as We, c as Ke, a as me, b as se, u as F } from "./YV4JVR4I-BGfUf3Nu.mjs";
11
12
  import { forwardRef as G } from "./System.mjs";
12
13
  import { u as Qe } from "./VEVQD5MH-ZMnHV8ZJ.mjs";
13
14
  import { P as Ue, a as Xe } from "./MTZPJQMC-C0Xe_WK4.mjs";
14
- var Ye = ue(
15
- [Xe, de],
16
- [Ue, le]
15
+ var Ye = le(
16
+ [Xe, ce],
17
+ [Ue, ie]
17
18
  ), qe = Ye.useContext;
18
- ae(!1);
19
- ae(null);
19
+ re(!1);
20
+ re(null);
20
21
  function Ge(t = {}) {
21
22
  var n = t, {
22
23
  composite: o,
@@ -38,38 +39,38 @@ function Ge(t = {}) {
38
39
  "focusWrap"
39
40
  ], m = He(
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(o, r),
43
+ ne(e, r)
44
+ ), c = m == null ? void 0 : m.getState(), d = De(V(O({}, 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`
47
48
  // when the activeId state is null, which could be the case when rendering
48
49
  // combobox with tab.
49
- includesBaseElement: O(
50
+ includesBaseElement: A(
50
51
  s.includesBaseElement,
51
52
  c == null ? void 0 : c.includesBaseElement,
52
53
  !1
53
54
  ),
54
- orientation: O(
55
+ orientation: A(
55
56
  s.orientation,
56
57
  c == null ? void 0 : c.orientation,
57
58
  "horizontal"
58
59
  ),
59
- focusLoop: O(s.focusLoop, c == null ? void 0 : c.focusLoop, !0)
60
- })), a = Ve(), T = V(k({}, d.getState()), {
61
- selectedId: O(
60
+ focusLoop: A(s.focusLoop, c == null ? void 0 : c.focusLoop, !0)
61
+ })), a = Ve(), T = V(O({}, d.getState()), {
62
+ selectedId: A(
62
63
  s.selectedId,
63
64
  c == null ? void 0 : c.selectedId,
64
65
  s.defaultSelectedId
65
66
  ),
66
- selectOnMove: O(
67
+ selectOnMove: A(
67
68
  s.selectOnMove,
68
69
  c == null ? void 0 : c.selectOnMove,
69
70
  !0
70
71
  )
71
72
  }), i = Ke(T, d, m);
72
- A(
73
+ k(
73
74
  i,
74
75
  () => y(i, ["moves"], () => {
75
76
  const { activeId: u, selectOnMove: b } = i.getState();
@@ -79,7 +80,7 @@ function Ge(t = {}) {
79
80
  })
80
81
  );
81
82
  let v = !0;
82
- A(
83
+ k(
83
84
  i,
84
85
  () => We(i, ["selectedId"], (u, b) => {
85
86
  if (!v) {
@@ -88,7 +89,7 @@ function Ge(t = {}) {
88
89
  }
89
90
  o && u.selectedId === b.selectedId || i.setState("activeId", u.selectedId);
90
91
  })
91
- ), A(
92
+ ), k(
92
93
  i,
93
94
  () => y(i, ["selectedId", "renderedItems"], (u) => {
94
95
  if (u.selectedId !== void 0) return;
@@ -102,7 +103,7 @@ function Ge(t = {}) {
102
103
  i.setState("selectedId", E == null ? void 0 : E.id);
103
104
  }
104
105
  })
105
- ), A(
106
+ ), k(
106
107
  i,
107
108
  () => y(i, ["renderedItems"], (u) => {
108
109
  const b = u.renderedItems;
@@ -112,13 +113,13 @@ function Ge(t = {}) {
112
113
  S.some((P) => !P.tabId) && S.forEach((P, _) => {
113
114
  if (P.tabId) return;
114
115
  const N = b[_];
115
- N && a.renderItem(V(k({}, P), { tabId: N.id }));
116
+ N && a.renderItem(V(O({}, P), { tabId: N.id }));
116
117
  });
117
118
  });
118
119
  })
119
120
  );
120
121
  let h = null;
121
- return A(i, () => {
122
+ return k(i, () => {
122
123
  const u = () => {
123
124
  h = i.getState().selectedId;
124
125
  }, b = () => {
@@ -134,7 +135,7 @@ function Ge(t = {}) {
134
135
  y(e, ["selectedValue"], u),
135
136
  y(e, ["mounted"], b)
136
137
  );
137
- }), V(k(k({}, d), i), {
138
+ }), V(O(O({}, d), i), {
138
139
  panels: a,
139
140
  setSelectedId: (u) => i.setState("selectedId", u),
140
141
  select: (u) => {
@@ -143,10 +144,10 @@ function Ge(t = {}) {
143
144
  });
144
145
  }
145
146
  function Je(t, n, o) {
146
- ne(n, [o.composite, o.combobox]), t = Fe(t, n, o), se(t, o, "selectedId", "setSelectedId"), se(t, o, "selectOnMove");
147
- const [e, s] = be(() => t.panels, {});
148
- return ne(s, [t, s]), Object.assign(
149
- ie(() => g(p({}, t), { panels: e }), [t, e]),
147
+ oe(n, [o.composite, o.combobox]), t = Fe(t, n, o), se(t, o, "selectedId", "setSelectedId"), se(t, o, "selectOnMove");
148
+ const [e, s] = me(() => t.panels, {});
149
+ return oe(s, [t, s]), Object.assign(
150
+ ge(() => g(p({}, t), { panels: e }), [t, e]),
150
151
  { composite: o.composite, combobox: o.combobox }
151
152
  );
152
153
  }
@@ -156,13 +157,13 @@ function Ze(t = {}) {
156
157
  composite: t.composite !== void 0 ? t.composite : o,
157
158
  combobox: t.combobox !== void 0 ? t.combobox : n
158
159
  });
159
- const [e, s] = be(Ge, t);
160
+ const [e, s] = me(Ge, t);
160
161
  return Je(e, s, t);
161
162
  }
162
- var J = ue(
163
- [de],
164
- [le]
165
- ), et = J.useScopedContext, pe = J.useProviderContext, ve = J.ScopedContextProvider, tt = "button", nt = Q(function(n) {
163
+ var J = le(
164
+ [ce],
165
+ [ie]
166
+ ), et = J.useScopedContext, fe = J.useProviderContext, be = J.ScopedContextProvider, tt = "button", ot = Q(function(n) {
166
167
  var o = n, {
167
168
  store: e,
168
169
  getItem: s
@@ -175,7 +176,7 @@ var J = ue(
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 = de(), a = r.id || d, T = Ne(r), i = ae(
179
180
  (f) => {
180
181
  const w = g(p({}, f), { dimmed: T });
181
182
  return s ? s(w) : w;
@@ -226,15 +227,15 @@ var J = ue(
226
227
  getItem: i,
227
228
  shouldRegisterItem: b
228
229
  })), r;
229
- }), ot = Be(
230
+ }), nt = Be(
230
231
  Y(function(n) {
231
- const o = nt(n);
232
+ const o = ot(n);
232
233
  return q(tt, o);
233
234
  })
234
235
  ), st = "div", rt = Q(
235
236
  function(n) {
236
237
  var o = n, { store: e } = o, s = U(o, ["store"]);
237
- const r = pe();
238
+ const r = fe();
238
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."
@@ -242,9 +243,9 @@ var J = ue(
242
243
  const m = e.useState(
243
244
  (c) => c.orientation === "both" ? void 0 : c.orientation
244
245
  );
245
- return s = fe(
246
+ return s = ue(
246
247
  s,
247
- (c) => /* @__PURE__ */ M.jsx(ve, { value: e, children: c }),
248
+ (c) => /* @__PURE__ */ M.jsx(be, { value: e, children: c }),
248
249
  [e]
249
250
  ), e.composite && (s = p({
250
251
  focusable: !1
@@ -273,12 +274,12 @@ var J = ue(
273
274
  "scrollRestoration",
274
275
  "scrollElement"
275
276
  ]);
276
- const T = pe();
277
+ const T = fe();
277
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
  );
281
- const i = z(null), v = me(a.id), h = F(
282
+ const i = z(null), v = de(a.id), h = F(
282
283
  e.panels,
283
284
  () => {
284
285
  var l;
@@ -319,10 +320,10 @@ var J = ue(
319
320
  Z(() => {
320
321
  const l = i.current;
321
322
  if (!l) return;
322
- const $ = Oe(l);
323
+ const $ = Ae(l);
323
324
  _(!!$.length);
324
325
  }, []);
325
- const N = ce(
326
+ const N = ae(
326
327
  (l) => {
327
328
  const $ = g(p({}, l), { id: v || l.id, tabId: r });
328
329
  return m ? m($) : $;
@@ -340,9 +341,9 @@ var J = ue(
340
341
  const { selectedId: R } = e.getState(), B = C({ activeId: R });
341
342
  B && (l.preventDefault(), e.move(B));
342
343
  });
343
- return a = fe(
344
+ return a = ue(
344
345
  a,
345
- (l) => /* @__PURE__ */ M.jsx(ve, { value: e, children: l }),
346
+ (l) => /* @__PURE__ */ M.jsx(be, { value: e, children: l }),
346
347
  [e]
347
348
  ), a = g(p({
348
349
  id: v,
@@ -350,9 +351,9 @@ 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
+ ref: Oe(i, a.ref),
354
355
  onKeyDown: w
355
- }), a = Ae(p({
356
+ }), a = ke(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
359
  focusable: !e.composite && !P
@@ -363,20 +364,12 @@ var J = ue(
363
364
  return q(it, o);
364
365
  });
365
366
  function W(t) {
366
- var n = Pe.toArray(t);
367
+ var n = Te.toArray(t);
367
368
  return n.reduce(function(o, e) {
368
- return e.type === Ce ? o.concat(W(e.props.children)) : (o.push(e), o);
369
+ return e.type === Pe ? o.concat(W(e.props.children)) : (o.push(e), o);
369
370
  }, []);
370
371
  }
371
- function re(t, n) {
372
- typeof t == "function" ? t(n) : t && (t.current = n);
373
- }
374
- function dt(t, n) {
375
- return ie(() => t == null && n == null ? null : (o) => {
376
- re(t, o), re(n, o);
377
- }, [t, n]);
378
- }
379
- const ut = j(at)(
372
+ const dt = j(at)(
380
373
  ({ size: t }) => D`
381
374
  position: relative;
382
375
  width: 100%;
@@ -392,12 +385,12 @@ const ut = j(at)(
392
385
 
393
386
  ${x("tabs.tabsBorder.horizontal")};
394
387
 
395
- ${Ie} {
388
+ ${pe} {
396
389
  ${x(`tabs.item.size.${t}`)}
397
390
  }
398
391
  ${we};
399
392
  `
400
- ), Ie = j.button`
393
+ ), pe = j.button`
401
394
  border: 0;
402
395
  background: none;
403
396
  ${x("tabs.item.default")};
@@ -439,41 +432,41 @@ const ut = j(at)(
439
432
  & > span {
440
433
  ${x("tabs.badge")};
441
434
  }
442
- `, mt = j(lt)(
435
+ `, ut = j(lt)(
443
436
  ({ orientation: t }) => D`
444
437
  ${t === "vertical" ? x("tabs.panel.vertical") : x("tabs.panel.horizontal")};
445
438
  `
446
- ), ft = ({ offset: t = 0, size: n = 0 }) => D`
439
+ ), mt = ({ offset: t = 0, size: n = 0 }) => D`
447
440
  ${x("tabs.activeBar.horizontal")};
448
441
  left: 0;
449
442
  bottom: 0;
450
443
  width: ${n}px;
451
444
  transform: translateX(${t}px);
452
- `, bt = ({ offset: t = 0, size: n = 0 }) => D`
445
+ `, ft = ({ offset: t = 0, size: n = 0 }) => D`
453
446
  ${x("tabs.activeBar.vertical")};
454
447
  right: 0;
455
448
  top: 0;
456
449
  height: ${n}px;
457
450
  transform: translateY(${t}px);
458
- `, pt = j.span(
451
+ `, bt = j.span(
459
452
  ({ orientation: t, ...n }) => D`
460
453
  position: absolute;
461
- ${t === "vertical" ? bt(n) : ft(n)}
454
+ ${t === "vertical" ? ft(n) : mt(n)}
462
455
  will-change: width, transform;
463
456
  transition: medium;
464
457
  transition-property: transform, width;
465
458
  `
466
- ), Se = (t) => {
459
+ ), ve = (t) => {
467
460
  if (!t || typeof window > "u") return 1;
468
461
  const n = Number(window.getComputedStyle(t).scale);
469
- return isNaN(n) ? Se(t.parentElement) : n;
462
+ return isNaN(n) ? ve(t.parentElement) : n;
470
463
  };
471
- function vt(t, n, o) {
464
+ function pt(t, n, o) {
472
465
  const [e, s] = K({}), { height: r, width: m } = $e();
473
466
  return ye(() => {
474
467
  const c = t.current;
475
468
  if (!c || !n) return;
476
- const d = c.getBoundingClientRect(), a = n.getBoundingClientRect(), T = Se(c);
469
+ const d = c.getBoundingClientRect(), a = n.getBoundingClientRect(), T = ve(c);
477
470
  if (o === "vertical") {
478
471
  const i = a.top - d.top, v = a.height;
479
472
  s({
@@ -491,49 +484,49 @@ function vt(t, n, o) {
491
484
  }
492
485
  }, [t, n, m, r, o]), e;
493
486
  }
494
- const xe = ({ activeTab: t, listRef: n, orientation: o }) => {
495
- const e = vt(n, t, o);
496
- return /* @__PURE__ */ L.createElement(pt, { ...e });
487
+ const Ie = ({ activeTab: t, listRef: n, orientation: o }) => {
488
+ const e = pt(n, t, o);
489
+ return /* @__PURE__ */ L.createElement(bt, { ...e });
497
490
  };
498
- xe.displayName = "ActiveBar";
499
- const It = W.default || W;
500
- function St(t, n) {
491
+ Ie.displayName = "ActiveBar";
492
+ const vt = W.default || W;
493
+ function It(t, n) {
501
494
  const [o, e] = K(null);
502
- return [It(n).map((r) => r.props.id === t ? Ee(r, { ref: e }) : r), o];
495
+ return [vt(n).map((r) => r.props.id === t ? Ce(r, { ref: e }) : r), o];
503
496
  }
504
- const he = G(
497
+ const Se = G(
505
498
  ({ 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 r = z(), m = Ee(s, r), { orientation: c, selectedId: d } = o.useState(), [a, T] = It(d, t);
500
+ return /* @__PURE__ */ L.createElement(dt, { orientation: c, ref: m, size: n, store: o, ...e }, a, a.length > 1 && /* @__PURE__ */ L.createElement(Ie, { activeTab: T, listRef: r, orientation: c }));
508
501
  }
509
502
  );
510
- he.displayName = "TabList";
511
- const ge = G(
503
+ Se.displayName = "TabList";
504
+ const xe = G(
512
505
  ({ children: t, store: n, tabId: o, ...e }, s) => {
513
506
  const r = n.useState("orientation");
514
- return /* @__PURE__ */ L.createElement(mt, { orientation: r, ref: s, store: n, tabId: o, ...e }, t);
507
+ return /* @__PURE__ */ L.createElement(ut, { orientation: r, ref: s, store: n, tabId: o, ...e }, t);
515
508
  }
516
509
  );
517
- ge.displayName = "TabPanel";
518
- const Te = G(
510
+ xe.displayName = "TabPanel";
511
+ const he = G(
519
512
  ({ as: t, children: n, id: o, store: e, ...s }, r) => /* @__PURE__ */ L.createElement(
520
- ot,
513
+ nt,
521
514
  {
522
515
  id: o,
523
- render: (m) => /* @__PURE__ */ L.createElement(Ie, { as: t, ...m, ref: r }),
516
+ render: (m) => /* @__PURE__ */ L.createElement(pe, { as: t, ...m, ref: r }),
524
517
  store: e,
525
518
  ...s
526
519
  },
527
520
  n
528
521
  )
529
522
  );
530
- Te.displayName = "Tab";
531
- const Lt = Object.assign(Te, { List: he, Panel: ge });
523
+ he.displayName = "Tab";
524
+ const Lt = Object.assign(he, { List: Se, Panel: xe });
532
525
  function Nt(t) {
533
526
  return Ze(t);
534
527
  }
535
528
  export {
536
529
  Lt as Tab,
537
- Te as TabComponent,
530
+ he as TabComponent,
538
531
  Nt as useTab
539
532
  };
package/dist/Textarea.js CHANGED
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),e=require("@xstyled/styled-components"),T=require("./field-styles-D_gf6ypV.js"),a=require("./System.js"),p=e("textarea").withConfig({shouldForwardProp:a.shouldForwardProp})(({size:t,variant:r})=>e.css`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),e=require("@xstyled/styled-components"),T=require("./field-styles-DYEc1l_A.js"),a=require("./System.js"),p=e("textarea").withConfig({shouldForwardProp:a.shouldForwardProp})(({size:t,variant:r})=>e.css`
2
2
  ${T.defaultFieldStyles({size:t,variant:r})};
3
3
  ${e.th("textareas")};
4
4
  line-height: lg;
package/dist/Textarea.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import u from "react";
3
3
  import w, { css as y, th as _, system as $ } from "@xstyled/styled-components";
4
- import { d as g } from "./field-styles-CeV7pnOp.mjs";
4
+ import { d as g } from "./field-styles-DLIhqG_8.mjs";
5
5
  import { shouldForwardProp as T, forwardRef as F } from "./System.mjs";
6
6
  const R = w("textarea").withConfig({ shouldForwardProp: T })(
7
7
  ({ size: e, variant: t }) => y`
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),H=require("@xstyled/styled-components"),c=require("./CustomInput-CDNZy-pz.js"),I=require("./System.js"),O=H.div`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),H=require("@xstyled/styled-components"),c=require("./CustomInput-DVH2rh9-.js"),I=require("./System.js"),O=H.div`
2
2
  position: relative;
3
3
  ${c.fixAriaMessageStyle}
4
4
  `,S=I.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,7 +1,7 @@
1
1
  "use client";
2
2
  import c, { useState as T, useEffect as E } from "react";
3
3
  import M from "@xstyled/styled-components";
4
- import { f as Y, a as w, c as I, b as L, D as O, g as U } from "./CustomInput-BCCxIle7.mjs";
4
+ import { f as Y, a as w, c as I, b as L, D as O, g as U } from "./CustomInput-Cewo45Hd.mjs";
5
5
  import { forwardRef as W } from "./System.mjs";
6
6
  const $ = M.div`
7
7
  position: relative;
package/dist/Toast.js CHANGED
@@ -1,11 +1,11 @@
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"),O=require("./index-BHi0wohR.js"),w=require("./Box.js"),A=require("./Alert.js"),B=require("./CloseButton.js"),C=require("./System.js"),q=require("./Button.js");var M=t=>typeof t=="function",$=(t,e)=>M(t)?t(e):t,N=(()=>{let t=0;return()=>(++t).toString()})(),R=20,x=new Map,G=1e3,P=t=>{if(x.has(t))return;let e=setTimeout(()=>{x.delete(t),h({type:4,toastId:t})},G);x.set(t,e)},z=t=>{let e=x.get(t);e&&clearTimeout(e)},T=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,R)};case 1:return e.toast.id&&z(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)?T(t,{type:1,toast:s}):T(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=T(k,t),E.forEach(e=>{e(k)})},H={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},L=(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)||H[r.type],style:{...t.style,...(u=t[r.type])==null?void 0:u.style,...r.style}}});return{...e,toasts:n}},W=(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)||N()}),v=t=>(e,s)=>{let n=W(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 Y=(t,e)=>{h({type:1,toast:{id:t,height:e}})},_=()=>{h({type:5,time:Date.now()})},j=t=>{let{toasts:e,pausedAt:s}=L(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:Y,startPause:_,endPause:n,calculateOffset:r}}},S=c;function U(t=!1){const[e,s]=a.useState(!1);return a.useEffect(()=>{s(!0)},[]),a.useMemo(()=>t?n=>n:e?(n,r,o)=>O.reactDomExports.createPortal(n,r||document.body,o):()=>null,[t,e])}const F=l(w.Box)(({isBottom:t})=>l.css`
2
2
  ${l.th("toasts.default")}
3
3
  ${t?l.th("toasts.bottom"):l.th("toasts.top")}
4
4
 
5
5
  position: fixed;
6
6
  z-index: 9999;
7
7
  transition: all 400ms ease-out;
8
- `),K=l(A.Alert)(()=>l.css`
8
+ `),J=l(A.Alert)(()=>l.css`
9
9
  position: relative;
10
10
  padding: lg;
11
11
  ${l.th("toasts.growls.default")};
@@ -17,7 +17,7 @@
17
17
  button {
18
18
  flex-shrink: 0;
19
19
  }
20
- `),Q=l(T.Box)(()=>l.css`
20
+ `),K=l(w.Box)(()=>l.css`
21
21
  display: flex;
22
22
  align-items: center;
23
23
  padding-bottom: xs;
@@ -26,7 +26,7 @@
26
26
  & > *:first-child {
27
27
  flex-shrink: 0;
28
28
  }
29
- `),V=l(A.Alert)`
29
+ `),Q=l(A.Alert)`
30
30
  display: flex;
31
31
  align-items: center;
32
32
  padding: sm md;
@@ -35,8 +35,8 @@
35
35
  > div {
36
36
  align-self: center !important;
37
37
  }
38
- `,X=l.box(({variant:t})=>l.css`
38
+ `,V=l.box(({variant:t})=>l.css`
39
39
  ${l.th("toasts.snackbar.separator.default")};
40
40
  ${l.th(`toasts.snackbar.separator.${t}`)};
41
41
  padding-left: sm;
42
- `),Z={"top-left":{top:0,left:0},"top-center":{top:0,left:"50%"},"top-right":{top:0,right:0},"bottom-left":{bottom:0,left:0},"bottom-center":{bottom:0,left:"50%"},"bottom-right":{bottom:0,right:0}},tt=({calculateOffset:t,toast:e,updateHeight:s})=>{var m,g,y;if(typeof e.message=="string")return console.warn("You must pass a React component or a HTML element."),null;const n=t(e,{reverseOrder:!1,gutter:0}),r=d=>{if(d&&typeof e.height!="number"){const b=d.getBoundingClientRect().height;s(e.id,b)}},o=(m=e.position)==null?void 0:m.includes("center"),u=(g=e.position)==null?void 0:g.includes("top"),i=(y=e.position)==null?void 0:y.includes("bottom"),f=()=>{e.onClose&&e.onClose(),w.dismiss(e.id)},p={opacity:e.visible?1:0,transform:`translate(${o?"-50%":"0"}, ${n*(u?1:-1)}px)`,...Z[e.position]};return a.createElement(J,{isBottom:i,opacity:p.opacity,ref:r,style:p,transform:p.transform,...e.ariaProps},a.cloneElement(e.message,{onClose:f}))},D=C.forwardRef(({children:t,dataTestId:e,hasCloseButton:s=!0,icon:n,onClose:r,variant:o="default"},u)=>{const i=e?`${e}-close-button`:void 0;return a.createElement(K,{"data-testid":e,hasCloseButton:s,icon:n,ref:u,variant:o},s&&a.createElement(B.CloseButton,{dataTestId:i,onClick:r,position:"absolute",right:"sm",top:"sm"}),a.createElement(T.Box,{pr:"xl"},t))});D.displayName="Growl";const I=C.forwardRef(({children:t,cta:e,hasCloseButton:s=!0,icon:n,onClose:r,variant:o="default",...u},i)=>a.createElement(V,{icon:n,ref:i,variant:o,...u},a.createElement(T.Box,{alignItems:"center",display:"flex",gap:"sm"},t,e&&a.createElement(X,{variant:o},e),s&&a.createElement(B.CloseButton,{onClick:r,size:"xs"})))),et=C.forwardRef((t,e)=>a.createElement(M.Button,{flexShrink:0,ref:e,size:"xs",variant:"ghost",...t}));I.displayName="Snackbar";const st=({pauseOnHover:t=!0})=>{const e=a.useContext(l.ThemeContext),s=F(),{handlers:n,toasts:r}=U(),{calculateOffset:o,endPause:u,startPause:i,updateHeight:f}=n,p=t?i:void 0,m=t?u:void 0;return a.createElement(l.ThemeProvider,{theme:e},r.length>0&&s(a.createElement("div",{onMouseEnter:p,onMouseLeave:m},r.map(g=>a.createElement(tt,{calculateOffset:o,key:g.id,toast:g,updateHeight:f})))))},ot=({children:t,...e})=>a.createElement(Q,{...e},t),O=(t,e)=>{var o,u;const r={duration:7e3,position:(typeof t=="string"?void 0:((o=t==null?void 0:t.type)==null?void 0:o.displayName)||((u=t==null?void 0:t.type)==null?void 0:u.name))==="Growl"?"top-right":"bottom-center",...e};return w(t,r)},rt=t=>{w.remove(t)},nt=t=>{w.dismiss(t)},at=()=>O,it={Title:ot,Growl:D,Snackbar:I,SnackbarAction:et};exports.Notifications=st;exports.Toast=it;exports.dismiss=nt;exports.remove=rt;exports.toast=O;exports.useToast=at;
42
+ `),X={"top-left":{top:0,left:0},"top-center":{top:0,left:"50%"},"top-right":{top:0,right:0},"bottom-left":{bottom:0,left:0},"bottom-center":{bottom:0,left:"50%"},"bottom-right":{bottom:0,right:0}},Z=({calculateOffset:t,toast:e,updateHeight:s})=>{var m,g,y;if(typeof e.message=="string")return console.warn("You must pass a React component or a HTML element."),null;const n=t(e,{reverseOrder:!1,gutter:0}),r=d=>{if(d&&typeof e.height!="number"){const b=d.getBoundingClientRect().height;s(e.id,b)}},o=(m=e.position)==null?void 0:m.includes("center"),u=(g=e.position)==null?void 0:g.includes("top"),i=(y=e.position)==null?void 0:y.includes("bottom"),f=()=>{e.onClose&&e.onClose(),S.dismiss(e.id)},p={opacity:e.visible?1:0,transform:`translate(${o?"-50%":"0"}, ${n*(u?1:-1)}px)`,...X[e.position]};return a.createElement(F,{isBottom:i,opacity:p.opacity,ref:r,style:p,transform:p.transform,...e.ariaProps},a.cloneElement(e.message,{onClose:f}))},D=C.forwardRef(({children:t,dataTestId:e,hasCloseButton:s=!0,icon:n,onClose:r,variant:o="default"},u)=>{const i=e?`${e}-close-button`:void 0;return a.createElement(J,{"data-testid":e,hasCloseButton:s,icon:n,ref:u,variant:o},s&&a.createElement(B.CloseButton,{dataTestId:i,onClick:r,position:"absolute",right:"sm",top:"sm"}),a.createElement(w.Box,{pr:"xl"},t))});D.displayName="Growl";const I=C.forwardRef(({children:t,cta:e,hasCloseButton:s=!0,icon:n,onClose:r,variant:o="default",...u},i)=>a.createElement(Q,{icon:n,ref:i,variant:o,...u},a.createElement(w.Box,{alignItems:"center",display:"flex",gap:"sm"},t,e&&a.createElement(V,{variant:o},e),s&&a.createElement(B.CloseButton,{onClick:r,size:"xs"})))),tt=C.forwardRef((t,e)=>a.createElement(q.Button,{flexShrink:0,ref:e,size:"xs",variant:"ghost",...t}));I.displayName="Snackbar";const et=({pauseOnHover:t=!0})=>{const e=a.useContext(l.ThemeContext),s=U(),{handlers:n,toasts:r}=j(),{calculateOffset:o,endPause:u,startPause:i,updateHeight:f}=n,p=t?i:void 0,m=t?u:void 0;return a.createElement(l.ThemeProvider,{theme:e},r.length>0&&s(a.createElement("div",{onMouseEnter:p,onMouseLeave:m},r.map(g=>a.createElement(Z,{calculateOffset:o,key:g.id,toast:g,updateHeight:f})))))},st=({children:t,...e})=>a.createElement(K,{...e},t),ot=(t,e)=>{var o,u;const r={duration:7e3,position:(typeof t=="string"?void 0:((o=t==null?void 0:t.type)==null?void 0:o.displayName)||((u=t==null?void 0:t.type)==null?void 0:u.name))==="Growl"?"top-right":"bottom-center",...e};return S(t,r)},rt=t=>{S.remove(t)},nt=t=>{S.dismiss(t)},at={Title:st,Growl:D,Snackbar:I,SnackbarAction:tt};exports.Notifications=et;exports.Toast=at;exports.dismiss=nt;exports.remove=rt;exports.toast=ot;
package/dist/Toast.mjs CHANGED
@@ -1,6 +1,6 @@
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
- import v, { css as w, th as m, ThemeContext as L, ThemeProvider as W } from "@xstyled/styled-components";
3
+ import v, { css as T, th as m, ThemeContext as L, ThemeProvider as W } from "@xstyled/styled-components";
4
4
  import { r as Y } from "./index-BYdkhqH4.mjs";
5
5
  import { Box as $ } from "./Box.mjs";
6
6
  import { Alert as _ } from "./Alert.mjs";
@@ -41,12 +41,12 @@ var j = (t) => typeof t == "function", A = (t, e) => j(t) ? t(e) : t, q = /* @__
41
41
  let r = e.time - (t.pausedAt || 0);
42
42
  return { ...t, pausedAt: void 0, toasts: t.toasts.map((o) => ({ ...o, pauseDuration: o.pauseDuration + r })) };
43
43
  }
44
- }, k = [], T = { toasts: [], pausedAt: void 0 }, h = (t) => {
45
- T = S(T, t), k.forEach((e) => {
46
- e(T);
44
+ }, k = [], w = { toasts: [], pausedAt: void 0 }, h = (t) => {
45
+ w = S(w, t), k.forEach((e) => {
46
+ e(w);
47
47
  });
48
48
  }, Q = { blank: 4e3, error: 4e3, success: 2e3, loading: 1 / 0, custom: 4e3 }, V = (t = {}) => {
49
- let [e, s] = M(T);
49
+ let [e, s] = M(w);
50
50
  C(() => (k.push(s), () => {
51
51
  let r = k.indexOf(s);
52
52
  r > -1 && k.splice(r, 1);
@@ -110,7 +110,7 @@ function st(t = !1) {
110
110
  }, []), R(() => t ? (a) => a : e ? (a, r, o) => Y.createPortal(a, r || document.body, o) : () => null, [t, e]);
111
111
  }
112
112
  const ot = v($)(
113
- ({ isBottom: t }) => w`
113
+ ({ isBottom: t }) => T`
114
114
  ${m("toasts.default")}
115
115
  ${t ? m("toasts.bottom") : m("toasts.top")}
116
116
 
@@ -119,7 +119,7 @@ const ot = v($)(
119
119
  transition: all 400ms ease-out;
120
120
  `
121
121
  ), rt = v(_)(
122
- () => w`
122
+ () => T`
123
123
  position: relative;
124
124
  padding: lg;
125
125
  ${m("toasts.growls.default")};
@@ -133,7 +133,7 @@ const ot = v($)(
133
133
  }
134
134
  `
135
135
  ), at = v($)(
136
- () => w`
136
+ () => T`
137
137
  display: flex;
138
138
  align-items: center;
139
139
  padding-bottom: xs;
@@ -153,7 +153,7 @@ const ot = v($)(
153
153
  align-self: center !important;
154
154
  }
155
155
  `, it = v.box(
156
- ({ variant: t }) => w`
156
+ ({ variant: t }) => T`
157
157
  ${m("toasts.snackbar.separator.default")};
158
158
  ${m(`toasts.snackbar.separator.${t}`)};
159
159
  padding-left: sm;
@@ -228,7 +228,7 @@ const G = D(
228
228
  ({ children: t, cta: e, hasCloseButton: s = !0, icon: a, onClose: r, variant: o = "default", ...i }, n) => /* @__PURE__ */ d.createElement(nt, { icon: a, ref: n, variant: o, ...i }, /* @__PURE__ */ d.createElement($, { alignItems: "center", display: "flex", gap: "sm" }, t, e && /* @__PURE__ */ d.createElement(it, { variant: o }, e), s && /* @__PURE__ */ d.createElement(B, { onClick: r, size: "xs" })))
229
229
  ), ut = D((t, e) => /* @__PURE__ */ d.createElement(U, { flexShrink: 0, ref: e, size: "xs", variant: "ghost", ...t }));
230
230
  G.displayName = "Snackbar";
231
- const Et = ({ pauseOnHover: t = !0 }) => {
231
+ const xt = ({ pauseOnHover: t = !0 }) => {
232
232
  const e = H(L), s = st(), { handlers: a, toasts: r } = et(), { calculateOffset: o, endPause: i, startPause: n, updateHeight: c } = a, f = t ? n : void 0, p = t ? i : void 0;
233
233
  return /* @__PURE__ */ d.createElement(W, { theme: e }, r.length > 0 && s(
234
234
  /* @__PURE__ */ d.createElement("div", { onMouseEnter: f, onMouseLeave: p }, r.map((g) => /* @__PURE__ */ d.createElement(
@@ -241,7 +241,7 @@ const Et = ({ pauseOnHover: t = !0 }) => {
241
241
  }
242
242
  )))
243
243
  ));
244
- }, ct = ({ children: t, ...e }) => /* @__PURE__ */ d.createElement(at, { ...e }, t), ft = (t, e) => {
244
+ }, ct = ({ children: t, ...e }) => /* @__PURE__ */ d.createElement(at, { ...e }, t), Et = (t, e) => {
245
245
  var o, i;
246
246
  const r = {
247
247
  duration: 7e3,
@@ -251,14 +251,13 @@ const Et = ({ pauseOnHover: t = !0 }) => {
251
251
  return P(t, r);
252
252
  }, kt = (t) => {
253
253
  P.remove(t);
254
- }, Tt = (t) => {
254
+ }, wt = (t) => {
255
255
  P.dismiss(t);
256
- }, wt = () => ft, $t = { Title: ct, Growl: N, Snackbar: G, SnackbarAction: ut };
256
+ }, Tt = { Title: ct, Growl: N, Snackbar: G, SnackbarAction: ut };
257
257
  export {
258
- Et as Notifications,
259
- $t as Toast,
260
- Tt as dismiss,
258
+ xt as Notifications,
259
+ Tt as Toast,
260
+ wt as dismiss,
261
261
  kt as remove,
262
- ft as toast,
263
- wt as useToast
262
+ Et as toast
264
263
  };
package/dist/Toggle.js CHANGED
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),t=require("@xstyled/styled-components"),s=require("./System.js"),a=require("./index-CUtaVckz.js"),p=t(a.Checkbox).withConfig({shouldForwardProp:s.shouldForwardProp})(({order:o="-1",size:e})=>t.css`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),t=require("@xstyled/styled-components"),s=require("./System.js"),a=require("./index-Dn-QEAu6.js"),p=t(a.Checkbox).withConfig({shouldForwardProp:s.shouldForwardProp})(({order:o="-1",size:e})=>t.css`
2
2
  ${t.th("toggles.item.default")};
3
3
  ${t.th(`toggles.item.sizes.${e}`)};
4
4
  position: relative;
package/dist/Toggle.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import r from "react";
3
3
  import s, { css as i, th as t, system as f } from "@xstyled/styled-components";
4
4
  import { shouldForwardProp as g, forwardRef as $ } from "./System.mjs";
5
- import { C as c, a as u } from "./index-CDjY0N2Z.mjs";
5
+ import { C as c, a as u } from "./index-BSdL4wPb.mjs";
6
6
  const b = s(c).withConfig({ shouldForwardProp: g })(
7
7
  ({ order: o = "-1", size: e }) => i`
8
8
  ${t("toggles.item.default")};
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { css as a, th as d } from "@xstyled/styled-components";
3
3
  const o = {
4
- xs: "xs",
5
- sm: "sm",
4
+ lg: "sm",
6
5
  md: "sm",
7
- lg: "sm"
6
+ sm: "sm",
7
+ xs: "xs"
8
8
  }, f = ({
9
9
  iconPlacement: e,
10
10
  isClearable: i,