welcome-ui 8.0.0 → 8.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/AXB53BZF-BOEe01VW.mjs +25 -0
  2. package/dist/Accordion.mjs +17 -17
  3. package/dist/Alert.mjs +19 -19
  4. package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-B1IDizRs.mjs} +298 -295
  5. package/dist/Badge.mjs +1 -1
  6. package/dist/Breadcrumb.mjs +27 -26
  7. package/dist/Button.mjs +2 -2
  8. package/dist/Checkbox.mjs +1 -1
  9. package/dist/{CustomInput-D_13Gd_3.mjs → CustomInput-IA_gVoXd.mjs} +2991 -2859
  10. package/dist/DatePicker.mjs +4 -4
  11. package/dist/DateTimePicker.mjs +9 -9
  12. package/dist/DateTimePickerCommon.mjs +1 -1
  13. package/dist/Drawer.mjs +7 -7
  14. package/dist/DropdownMenu.mjs +262 -262
  15. package/dist/Field.mjs +25 -25
  16. package/dist/FileDrop.mjs +273 -267
  17. package/dist/FileUpload.mjs +26 -26
  18. package/dist/Files.mjs +1 -1
  19. package/dist/Hint.mjs +1 -1
  20. package/dist/{ITI7HKP4-BONrZ9Pq.mjs → ITI7HKP4-EL9KXYBU.mjs} +150 -150
  21. package/dist/Icons.mjs +88 -88
  22. package/dist/IconsFont.mjs +159 -159
  23. package/dist/InputText.mjs +1 -1
  24. package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-BzklVBKM.mjs} +70 -70
  25. package/dist/KUU7WJ55-CS4NemC6.mjs +61 -0
  26. package/dist/{LVA2YJMS-qFC9J-lt.mjs → LVA2YJMS-DDEmK0pp.mjs} +491 -488
  27. package/dist/Label.mjs +2 -2
  28. package/dist/Link.mjs +3 -3
  29. package/dist/MTZPJQMC-CMjAwC0N.mjs +15 -0
  30. package/dist/Modal.mjs +13 -13
  31. package/dist/NLEBE274-QOMV1l7e.mjs +84 -0
  32. package/dist/P2CTZE2T-Cl2w7OLV.mjs +300 -0
  33. package/dist/P4IRICAX-DezbJY4s.mjs +37 -0
  34. package/dist/Pagination.mjs +22 -22
  35. package/dist/Picker.mjs +2 -2
  36. package/dist/Popover.mjs +2 -2
  37. package/dist/QYJ6MIDR-Bb0O5xUM.mjs +97 -0
  38. package/dist/Radio.mjs +18 -18
  39. package/dist/RadioGroup.mjs +15 -15
  40. package/dist/RadioTab.mjs +9 -9
  41. package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-jn06-eLy.mjs} +17 -17
  42. package/dist/Search.mjs +2 -2
  43. package/dist/Select.mjs +719 -716
  44. package/dist/Shape.mjs +1 -1
  45. package/dist/Slider.mjs +1 -1
  46. package/dist/Swiper.mjs +284 -278
  47. package/dist/Tabs.mjs +128 -128
  48. package/dist/Tag.mjs +16 -16
  49. package/dist/Text.mjs +1 -1
  50. package/dist/Textarea.mjs +4 -4
  51. package/dist/TimePicker.mjs +6 -6
  52. package/dist/Toast.mjs +69 -69
  53. package/dist/Toggle.mjs +2 -2
  54. package/dist/Tooltip.mjs +60 -60
  55. package/dist/UniversalLink.mjs +8 -8
  56. package/dist/VEVQD5MH-CuegL0m0.mjs +20 -0
  57. package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-BMzoZtCu.mjs} +31 -33
  58. package/dist/VariantIcon.mjs +4 -4
  59. package/dist/WelcomeLoader.mjs +4862 -9223
  60. package/dist/X5NMLKT6-CvSCix-_.mjs +25 -0
  61. package/dist/YV4JVR4I-Bh7B7TET.mjs +344 -0
  62. package/dist/downshift.esm-D0ns_SQs.mjs +1082 -0
  63. package/dist/{field-styles-DLIhqG_8.mjs → field-styles-CfVLcVQp.mjs} +1 -1
  64. package/dist/{index-BDeIsk2X.mjs → index-5PUh49rV.mjs} +56 -56
  65. package/dist/{index-DEJJvyGk.mjs → index-B0gDDiFm.mjs} +7 -7
  66. package/dist/{index-CExLVjET.mjs → index-B22SHR8h.mjs} +4 -4
  67. package/dist/index-BhcLigYU.mjs +77 -0
  68. package/dist/{index-BJAZgeHL.mjs → index-Bkl89twW.mjs} +4 -4
  69. package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
  70. package/dist/{index-BpRjq7lj.mjs → index-CQD9fgf_.mjs} +3 -3
  71. package/dist/{index-BRDOakbf.mjs → index-CmsWSKKs.mjs} +5 -5
  72. package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
  73. package/dist/{index-BrfXjmHY.mjs → index-wr_b5GSV.mjs} +6 -6
  74. package/dist/radio-group-RFyDp0KD.mjs +51 -0
  75. package/dist/theme.mjs +670 -615
  76. package/dist/{use-viewport-m3glsbna.mjs → use-viewport-CfklieD-.mjs} +5 -5
  77. package/dist/utils.mjs +29 -91
  78. package/package.json +13 -13
  79. package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
  80. package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
  81. package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
  82. package/dist/NLEBE274-C94QU78N.mjs +0 -84
  83. package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
  84. package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
  85. package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
  86. package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
  87. package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
  88. package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
  89. package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
  90. package/dist/radio-group-CGC6DTFJ.mjs +0 -51
@@ -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-D_13Gd_3.mjs";
4
+ import { f as Y, g as w, D as I, a as L, b as O, c as U } from "./CustomInput-IA_gVoXd.mjs";
5
5
  import { forwardRef as W } from "./System.mjs";
6
6
  const $ = M.div`
7
7
  position: relative;
@@ -22,10 +22,10 @@ const $ = M.div`
22
22
  size: d = "md",
23
23
  timeIntervals: n = 15,
24
24
  transparent: F,
25
- value: r = O,
25
+ value: r = I,
26
26
  ...u
27
27
  }, P) => {
28
- const l = (e) => U(e, n), R = h || u.placeholderText, [g, f] = T(k && "time" || null), [A, a] = T(l(r));
28
+ const l = (e) => w(e, n), R = h || u.placeholderText, [g, f] = T(k && "time" || null), [A, a] = T(l(r));
29
29
  E(() => {
30
30
  t && t(l(r));
31
31
  }, []), E(() => {
@@ -45,11 +45,11 @@ const $ = M.div`
45
45
  e.setFullYear(s.getFullYear(), s.getMonth(), s.getDate()), a(e), t && t(new Date(e));
46
46
  };
47
47
  return /* @__PURE__ */ c.createElement($, null, /* @__PURE__ */ c.createElement(
48
- w,
48
+ L,
49
49
  {
50
50
  calendarClassName: "time-picker-popper",
51
51
  customInput: /* @__PURE__ */ c.createElement(
52
- I,
52
+ U,
53
53
  {
54
54
  className: "time-picker",
55
55
  "data-testid": y,
@@ -68,7 +68,7 @@ const $ = M.div`
68
68
  iconPlacement: !!i && m,
69
69
  onChange: H,
70
70
  placeholderText: R,
71
- popperContainer: L,
71
+ popperContainer: O,
72
72
  popperProps: x,
73
73
  selected: A,
74
74
  showTimeSelect: !0,
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 _, cloneElement as z, useContext as H } from "react";
3
- import v, { css as T, th as m, ThemeContext as L, ThemeProvider as W } from "@xstyled/styled-components";
4
- import { r as Y } from "./index-BYdkhqH4.mjs";
3
+ import b, { th as f, css as T, ThemeContext as L, ThemeProvider as W } from "@xstyled/styled-components";
4
+ import { r as Y } from "./index-CBBbX29m.mjs";
5
5
  import { Box as $ } from "./Box.mjs";
6
6
  import { Alert as B } from "./Alert.mjs";
7
7
  import { CloseButton as N } from "./CloseButton.mjs";
@@ -13,7 +13,7 @@ var j = (t) => typeof t == "function", A = (t, e) => j(t) ? t(e) : t, q = /* @__
13
13
  })(), F = 20, E = /* @__PURE__ */ new Map(), J = 1e3, O = (t) => {
14
14
  if (E.has(t)) return;
15
15
  let e = setTimeout(() => {
16
- E.delete(t), h({ type: 4, toastId: t });
16
+ E.delete(t), v({ type: 4, toastId: t });
17
17
  }, J);
18
18
  E.set(t, e);
19
19
  }, K = (t) => {
@@ -41,7 +41,7 @@ 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 = [], w = { toasts: [], pausedAt: void 0 }, h = (t) => {
44
+ }, k = [], w = { toasts: [], pausedAt: void 0 }, v = (t) => {
45
45
  w = S(w, t), k.forEach((e) => {
46
46
  e(w);
47
47
  });
@@ -52,77 +52,77 @@ var j = (t) => typeof t == "function", A = (t, e) => j(t) ? t(e) : t, q = /* @__
52
52
  r > -1 && k.splice(r, 1);
53
53
  }), [e]);
54
54
  let a = e.toasts.map((r) => {
55
- var o, i;
56
- return { ...t, ...t[r.type], ...r, duration: r.duration || ((o = t[r.type]) == null ? void 0 : o.duration) || (t == null ? void 0 : t.duration) || Q[r.type], style: { ...t.style, ...(i = t[r.type]) == null ? void 0 : i.style, ...r.style } };
55
+ var o, n;
56
+ return { ...t, ...t[r.type], ...r, duration: r.duration || ((o = t[r.type]) == null ? void 0 : o.duration) || (t == null ? void 0 : t.duration) || Q[r.type], style: { ...t.style, ...(n = t[r.type]) == null ? void 0 : n.style, ...r.style } };
57
57
  });
58
58
  return { ...e, toasts: a };
59
59
  }, X = (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) || q() }), x = (t) => (e, s) => {
60
60
  let a = X(e, t, s);
61
- return h({ type: 2, toast: a }), a.id;
62
- }, u = (t, e) => x("blank")(t, e);
63
- u.error = x("error");
64
- u.success = x("success");
65
- u.loading = x("loading");
66
- u.custom = x("custom");
67
- u.dismiss = (t) => {
68
- h({ type: 3, toastId: t });
61
+ return v({ type: 2, toast: a }), a.id;
62
+ }, c = (t, e) => x("blank")(t, e);
63
+ c.error = x("error");
64
+ c.success = x("success");
65
+ c.loading = x("loading");
66
+ c.custom = x("custom");
67
+ c.dismiss = (t) => {
68
+ v({ type: 3, toastId: t });
69
69
  };
70
- u.remove = (t) => h({ type: 4, toastId: t });
71
- u.promise = (t, e, s) => {
72
- let a = u.loading(e.loading, { ...s, ...s == null ? void 0 : s.loading });
73
- return t.then((r) => (u.success(A(e.success, r), { id: a, ...s, ...s == null ? void 0 : s.success }), r)).catch((r) => {
74
- u.error(A(e.error, r), { id: a, ...s, ...s == null ? void 0 : s.error });
70
+ c.remove = (t) => v({ type: 4, toastId: t });
71
+ c.promise = (t, e, s) => {
72
+ let a = c.loading(e.loading, { ...s, ...s == null ? void 0 : s.loading });
73
+ return t.then((r) => (c.success(A(e.success, r), { id: a, ...s, ...s == null ? void 0 : s.success }), r)).catch((r) => {
74
+ c.error(A(e.error, r), { id: a, ...s, ...s == null ? void 0 : s.error });
75
75
  }), t;
76
76
  };
77
77
  var Z = (t, e) => {
78
- h({ type: 1, toast: { id: t, height: e } });
78
+ v({ type: 1, toast: { id: t, height: e } });
79
79
  }, tt = () => {
80
- h({ type: 5, time: Date.now() });
80
+ v({ type: 5, time: Date.now() });
81
81
  }, et = (t) => {
82
82
  let { toasts: e, pausedAt: s } = V(t);
83
83
  C(() => {
84
84
  if (s) return;
85
- let o = Date.now(), i = e.map((n) => {
86
- if (n.duration === 1 / 0) return;
87
- let c = (n.duration || 0) + n.pauseDuration - (o - n.createdAt);
88
- if (c < 0) {
89
- n.visible && u.dismiss(n.id);
85
+ let o = Date.now(), n = e.map((i) => {
86
+ if (i.duration === 1 / 0) return;
87
+ let u = (i.duration || 0) + i.pauseDuration - (o - i.createdAt);
88
+ if (u < 0) {
89
+ i.visible && c.dismiss(i.id);
90
90
  return;
91
91
  }
92
- return setTimeout(() => u.dismiss(n.id), c);
92
+ return setTimeout(() => c.dismiss(i.id), u);
93
93
  });
94
94
  return () => {
95
- i.forEach((n) => n && clearTimeout(n));
95
+ n.forEach((i) => i && clearTimeout(i));
96
96
  };
97
97
  }, [e, s]);
98
98
  let a = I(() => {
99
- s && h({ type: 6, time: Date.now() });
100
- }, [s]), r = I((o, i) => {
101
- let { reverseOrder: n = !1, gutter: c = 8, defaultPosition: f } = i || {}, p = e.filter((l) => (l.position || f) === (o.position || f) && l.height), g = p.findIndex((l) => l.id === o.id), y = p.filter((l, b) => b < g && l.visible).length;
102
- return p.filter((l) => l.visible).slice(...n ? [y + 1] : [0, y]).reduce((l, b) => l + (b.height || 0) + c, 0);
99
+ s && v({ type: 6, time: Date.now() });
100
+ }, [s]), r = I((o, n) => {
101
+ let { reverseOrder: i = !1, gutter: u = 8, defaultPosition: p } = n || {}, m = e.filter((l) => (l.position || p) === (o.position || p) && l.height), g = m.findIndex((l) => l.id === o.id), h = m.filter((l, y) => y < g && l.visible).length;
102
+ return m.filter((l) => l.visible).slice(...i ? [h + 1] : [0, h]).reduce((l, y) => l + (y.height || 0) + u, 0);
103
103
  }, [e]);
104
104
  return { toasts: e, handlers: { updateHeight: Z, startPause: tt, endPause: a, calculateOffset: r } };
105
- }, P = u;
105
+ }, P = c;
106
106
  function st(t = !1) {
107
107
  const [e, s] = M(!1);
108
108
  return C(() => {
109
109
  s(!0);
110
110
  }, []), _(() => t ? (a) => a : e ? (a, r, o) => Y.createPortal(a, r || document.body, o) : () => null, [t, e]);
111
111
  }
112
- const ot = v($)(
112
+ const ot = b($)(
113
113
  ({ isBottom: t }) => T`
114
- ${m("toasts.default")}
115
- ${t ? m("toasts.bottom") : m("toasts.top")}
114
+ ${f("toasts.default")}
115
+ ${t ? f("toasts.bottom") : f("toasts.top")}
116
116
 
117
117
  position: fixed;
118
118
  z-index: 9999;
119
119
  transition: all 400ms ease-out;
120
120
  `
121
- ), rt = v(B)(
121
+ ), rt = b(B)(
122
122
  () => T`
123
123
  position: relative;
124
124
  padding: lg;
125
- ${m("toasts.growls.default")};
125
+ ${f("toasts.growls.default")};
126
126
 
127
127
  div:first-of-type {
128
128
  align-self: baseline;
@@ -132,30 +132,30 @@ const ot = v($)(
132
132
  flex-shrink: 0;
133
133
  }
134
134
  `
135
- ), at = v($)(
135
+ ), at = b($)(
136
136
  () => T`
137
137
  display: flex;
138
138
  align-items: center;
139
139
  padding-bottom: xs;
140
- ${m("toasts.growls.title")};
140
+ ${f("toasts.growls.title")};
141
141
 
142
142
  & > *:first-child {
143
143
  flex-shrink: 0;
144
144
  }
145
145
  `
146
- ), nt = v(B)`
146
+ ), it = b(B)`
147
147
  display: flex;
148
148
  align-items: center;
149
149
  padding: sm md;
150
- ${m("toasts.snackbar.default")};
150
+ ${f("toasts.snackbar.default")};
151
151
 
152
152
  > div {
153
153
  align-self: center !important;
154
154
  }
155
- `, it = v.divBox(
155
+ `, nt = b.divBox(
156
156
  ({ variant: t }) => T`
157
- ${m("toasts.snackbar.separator.default")};
158
- ${m(`toasts.snackbar.separator.${t}`)};
157
+ ${f("toasts.snackbar.separator.default")};
158
+ ${f(`toasts.snackbar.separator.${t}`)};
159
159
  padding-left: sm;
160
160
  `
161
161
  ), lt = {
@@ -170,49 +170,49 @@ const ot = v($)(
170
170
  toast: e,
171
171
  updateHeight: s
172
172
  }) => {
173
- var p, g, y;
173
+ var m, g, h;
174
174
  if (typeof e.message == "string")
175
175
  return console.warn("You must pass a React component or a HTML element."), null;
176
176
  const a = t(e, { reverseOrder: !1, gutter: 0 }), r = (l) => {
177
177
  if (l && typeof e.height != "number") {
178
- const b = l.getBoundingClientRect().height;
179
- s(e.id, b);
178
+ const y = l.getBoundingClientRect().height;
179
+ s(e.id, y);
180
180
  }
181
- }, o = (p = e.position) == null ? void 0 : p.includes("center"), i = (g = e.position) == null ? void 0 : g.includes("top"), n = (y = e.position) == null ? void 0 : y.includes("bottom"), c = () => {
181
+ }, o = (m = e.position) == null ? void 0 : m.includes("center"), n = (g = e.position) == null ? void 0 : g.includes("top"), i = (h = e.position) == null ? void 0 : h.includes("bottom"), u = () => {
182
182
  e.onClose && e.onClose(), P.dismiss(e.id);
183
- }, f = {
183
+ }, p = {
184
184
  opacity: e.visible ? 1 : 0,
185
- transform: `translate(${o ? "-50%" : "0"}, ${a * (i ? 1 : -1)}px)`,
185
+ transform: `translate(${o ? "-50%" : "0"}, ${a * (n ? 1 : -1)}px)`,
186
186
  ...lt[e.position]
187
187
  };
188
188
  return /* @__PURE__ */ d.createElement(
189
189
  ot,
190
190
  {
191
- isBottom: n,
192
- opacity: f.opacity,
191
+ isBottom: i,
192
+ opacity: p.opacity,
193
193
  ref: r,
194
- style: f,
195
- transform: f.transform,
194
+ style: p,
195
+ transform: p.transform,
196
196
  ...e.ariaProps
197
197
  },
198
- z(e.message, { onClose: c })
198
+ z(e.message, { onClose: u })
199
199
  );
200
200
  }, G = D(
201
- ({ children: t, dataTestId: e, hasCloseButton: s = !0, icon: a, onClose: r, variant: o = "default" }, i) => {
202
- const n = e ? `${e}-close-button` : void 0;
201
+ ({ children: t, dataTestId: e, hasCloseButton: s = !0, icon: a, onClose: r, variant: o = "default" }, n) => {
202
+ const i = e ? `${e}-close-button` : void 0;
203
203
  return /* @__PURE__ */ d.createElement(
204
204
  rt,
205
205
  {
206
206
  "data-testid": e,
207
207
  hasCloseButton: s,
208
208
  icon: a,
209
- ref: i,
209
+ ref: n,
210
210
  variant: o
211
211
  },
212
212
  s && /* @__PURE__ */ d.createElement(
213
213
  N,
214
214
  {
215
- dataTestId: n,
215
+ dataTestId: i,
216
216
  onClick: r,
217
217
  position: "absolute",
218
218
  right: "sm",
@@ -225,27 +225,27 @@ const ot = v($)(
225
225
  );
226
226
  G.displayName = "Growl";
227
227
  const R = D(
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(N, { onClick: r, size: "xs" })))
229
- ), ut = D((t, e) => /* @__PURE__ */ d.createElement(U, { flexShrink: 0, ref: e, size: "xs", variant: "ghost", ...t }));
228
+ ({ children: t, cta: e, hasCloseButton: s = !0, icon: a, onClose: r, variant: o = "default", ...n }, i) => /* @__PURE__ */ d.createElement(it, { icon: a, ref: i, variant: o, ...n }, /* @__PURE__ */ d.createElement($, { alignItems: "center", display: "flex", gap: "sm" }, t, e && /* @__PURE__ */ d.createElement(nt, { variant: o }, e), s && /* @__PURE__ */ d.createElement(N, { onClick: r, size: "xs" })))
229
+ ), ct = D((t, e) => /* @__PURE__ */ d.createElement(U, { flexShrink: 0, ref: e, size: "xs", variant: "ghost", ...t }));
230
230
  R.displayName = "Snackbar";
231
231
  const xt = ({ pauseOnHover: t = !0 }) => {
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;
232
+ const e = H(L), s = st(), { handlers: a, toasts: r } = et(), { calculateOffset: o, endPause: n, startPause: i, updateHeight: u } = a, p = t ? i : void 0, m = t ? n : void 0;
233
233
  return /* @__PURE__ */ d.createElement(W, { theme: e }, r.length > 0 && s(
234
- /* @__PURE__ */ d.createElement("div", { "data-wui-persistent": !0, onMouseEnter: f, onMouseLeave: p }, r.map((g) => /* @__PURE__ */ d.createElement(
234
+ /* @__PURE__ */ d.createElement("div", { "data-wui-persistent": !0, onMouseEnter: p, onMouseLeave: m }, r.map((g) => /* @__PURE__ */ d.createElement(
235
235
  dt,
236
236
  {
237
237
  calculateOffset: o,
238
238
  key: g.id,
239
239
  toast: g,
240
- updateHeight: c
240
+ updateHeight: u
241
241
  }
242
242
  )))
243
243
  ));
244
- }, ct = ({ children: t, ...e }) => /* @__PURE__ */ d.createElement(at, { ...e }, t), Et = (t, e) => {
245
- var o, i;
244
+ }, ut = ({ children: t, ...e }) => /* @__PURE__ */ d.createElement(at, { ...e }, t), Et = (t, e) => {
245
+ var o, n;
246
246
  const r = {
247
247
  duration: 7e3,
248
- position: (typeof t == "string" ? void 0 : ((o = t == null ? void 0 : t.type) == null ? void 0 : o.displayName) || ((i = t == null ? void 0 : t.type) == null ? void 0 : i.name)) === "Growl" ? "top-right" : "bottom-center",
248
+ position: (typeof t == "string" ? void 0 : ((o = t == null ? void 0 : t.type) == null ? void 0 : o.displayName) || ((n = t == null ? void 0 : t.type) == null ? void 0 : n.name)) === "Growl" ? "top-right" : "bottom-center",
249
249
  ...e
250
250
  };
251
251
  return P(t, r);
@@ -253,7 +253,7 @@ const xt = ({ pauseOnHover: t = !0 }) => {
253
253
  P.remove(t);
254
254
  }, wt = (t) => {
255
255
  P.dismiss(t);
256
- }, Tt = { Title: ct, Growl: G, Snackbar: R, SnackbarAction: ut };
256
+ }, Tt = { Title: ut, Growl: G, Snackbar: R, SnackbarAction: ct };
257
257
  export {
258
258
  xt as Notifications,
259
259
  Tt as Toast,
package/dist/Toggle.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import r from "react";
3
- import s, { css as i, th as t, system as f } from "@xstyled/styled-components";
3
+ import s, { th as t, system as f, css as i } 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-BDeIsk2X.mjs";
5
+ import { C as c, a as u } from "./index-5PUh49rV.mjs";
6
6
  const b = s(c).withConfig({ shouldForwardProp: g })(
7
7
  ({ order: o = "-1", size: e }) => i`
8
8
  ${t("toggles.item.default")};
package/dist/Tooltip.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import p, { useRef as G, useEffect as C, useState as J } from "react";
3
- import M, { css as f, th as y } from "@xstyled/styled-components";
3
+ import M, { css as v, th as y } from "@xstyled/styled-components";
4
4
  import { Box as U } from "./Box.mjs";
5
5
  import { forwardRef as tt } from "./System.mjs";
6
- import { c as et, d as ot, e as rt, f as nt, g as it, h as st } from "./BYC7LY2E-CVjUW1dr.mjs";
7
- import { c as j, a as at, b as A, d as B } from "./YV4JVR4I-BGfUf3Nu.mjs";
8
- import { B as I, C as E, D as $, v as ut, c as z, _ as Y, i as L, E as lt, g as P, d as K, f as Q, h as W, t as dt, Y as H, Z as ct, Q as pt, b as w } from "./LVA2YJMS-qFC9J-lt.mjs";
9
- import { c as ft } from "./JC64G2H7-Dey-8h60.mjs";
10
- function mt(t = {}) {
6
+ import { c as et, d as ot, e as rt, f as nt, g as it, h as st } from "./BYC7LY2E-B1IDizRs.mjs";
7
+ import { c as j, a as at, b as A, d as B } from "./YV4JVR4I-Bh7B7TET.mjs";
8
+ import { B as I, C as E, D as $, v as ut, f as z, c as Y, h as L, _ as K, i as Q, E as lt, t as ct, g as P, d as W, Y as H, Z as dt, Q as pt, b as w } from "./LVA2YJMS-DDEmK0pp.mjs";
9
+ import { c as vt } from "./JC64G2H7-BzklVBKM.mjs";
10
+ function ft(t = {}) {
11
11
  var r;
12
12
  process.env.NODE_ENV !== "production" && t.type === "label" && console.warn(
13
13
  "The `type` option on the tooltip store is deprecated.",
@@ -21,32 +21,32 @@ function mt(t = {}) {
21
21
  "top"
22
22
  ),
23
23
  hideTimeout: E(t.hideTimeout, o == null ? void 0 : o.hideTimeout, 0)
24
- })), m = I($({}, e.getState()), {
24
+ })), f = I($({}, e.getState()), {
25
25
  type: E(t.type, o == null ? void 0 : o.type, "description"),
26
26
  skipTimeout: E(t.skipTimeout, o == null ? void 0 : o.skipTimeout, 300)
27
- }), i = j(m, e, t.store);
27
+ }), i = j(f, e, t.store);
28
28
  return $($({}, e), i);
29
29
  }
30
- function vt(t, r, o) {
30
+ function mt(t, r, o) {
31
31
  return A(t, o, "type"), A(t, o, "skipTimeout"), ot(t, r, o);
32
32
  }
33
33
  function ht(t = {}) {
34
- const [r, o] = at(mt, t);
35
- return vt(r, o, t);
34
+ const [r, o] = at(ft, t);
35
+ return mt(r, o, t);
36
36
  }
37
37
  var X = ut(
38
38
  [nt],
39
39
  [rt]
40
- ), k = X.useProviderContext, bt = X.ScopedContextProvider, St = "div", gt = z(
40
+ ), k = X.useProviderContext, bt = X.ScopedContextProvider, St = "div", gt = Y(
41
41
  function(r) {
42
42
  var o = r, {
43
43
  store: e,
44
- portal: m = !0,
44
+ portal: f = !0,
45
45
  gutter: i = 8,
46
46
  preserveTabOrder: g = !1,
47
- hideOnHoverOutside: c = !0,
48
- hideOnInteractOutside: d = !0
49
- } = o, a = Y(o, [
47
+ hideOnHoverOutside: d = !0,
48
+ hideOnInteractOutside: c = !0
49
+ } = o, a = K(o, [
50
50
  "store",
51
51
  "portal",
52
52
  "gutter",
@@ -55,60 +55,60 @@ var X = ut(
55
55
  "hideOnInteractOutside"
56
56
  ]);
57
57
  const h = k();
58
- e = e || h, L(
58
+ e = e || h, Q(
59
59
  e,
60
60
  process.env.NODE_ENV !== "production" && "Tooltip must receive a `store` prop or be wrapped in a TooltipProvider component."
61
61
  ), a = lt(
62
62
  a,
63
- (s) => /* @__PURE__ */ dt.jsx(bt, { value: e, children: s }),
63
+ (s) => /* @__PURE__ */ ct.jsx(bt, { value: e, children: s }),
64
64
  [e]
65
65
  );
66
66
  const b = e.useState(
67
67
  (s) => s.type === "description" ? "tooltip" : "none"
68
68
  );
69
- return a = P({ role: b }, a), a = it(K(P({}, a), {
69
+ return a = P({ role: b }, a), a = it(W(P({}, a), {
70
70
  store: e,
71
- portal: m,
71
+ portal: f,
72
72
  gutter: i,
73
73
  preserveTabOrder: g,
74
74
  hideOnHoverOutside(s) {
75
- if (H(c, s)) return !1;
75
+ if (H(d, s)) return !1;
76
76
  const u = e == null ? void 0 : e.getState().anchorElement;
77
77
  return u ? !("focusVisible" in u.dataset) : !0;
78
78
  },
79
79
  hideOnInteractOutside: (s) => {
80
- if (H(d, s)) return !1;
80
+ if (H(c, s)) return !1;
81
81
  const u = e == null ? void 0 : e.getState().anchorElement;
82
- return u ? !ct(u, s.target) : !0;
82
+ return u ? !dt(u, s.target) : !0;
83
83
  }
84
84
  })), a;
85
85
  }
86
- ), Tt = ft(
87
- Q(function(r) {
86
+ ), Tt = vt(
87
+ z(function(r) {
88
88
  const o = gt(r);
89
- return W(St, o);
89
+ return L(St, o);
90
90
  }),
91
91
  k
92
- ), xt = "div", v = j({
92
+ ), xt = "div", m = j({
93
93
  activeStore: null
94
94
  });
95
95
  function N(t) {
96
96
  return () => {
97
- const { activeStore: r } = v.getState();
98
- r === t && v.setState("activeStore", null);
97
+ const { activeStore: r } = m.getState();
98
+ r === t && m.setState("activeStore", null);
99
99
  };
100
100
  }
101
- var yt = z(
101
+ var yt = Y(
102
102
  function(r) {
103
- var o = r, { store: e, showOnHover: m = !0 } = o, i = Y(o, ["store", "showOnHover"]);
103
+ var o = r, { store: e, showOnHover: f = !0 } = o, i = K(o, ["store", "showOnHover"]);
104
104
  const g = k();
105
- e = e || g, L(
105
+ e = e || g, Q(
106
106
  e,
107
107
  process.env.NODE_ENV !== "production" && "TooltipAnchor must receive a `store` prop or be wrapped in a TooltipProvider component."
108
108
  );
109
- const c = G(!1);
109
+ const d = G(!1);
110
110
  C(() => B(e, ["mounted"], (n) => {
111
- n.mounted || (c.current = !1);
111
+ n.mounted || (d.current = !1);
112
112
  }), [e]), C(() => {
113
113
  if (e)
114
114
  return pt(
@@ -119,8 +119,8 @@ var yt = z(
119
119
  B(e, ["mounted", "skipTimeout"], (n) => {
120
120
  if (!e) return;
121
121
  if (n.mounted) {
122
- const { activeStore: T } = v.getState();
123
- return T !== e && (T == null || T.hide()), v.setState("activeStore", e);
122
+ const { activeStore: T } = m.getState();
123
+ return T !== e && (T == null || T.hide()), m.setState("activeStore", e);
124
124
  }
125
125
  const l = setTimeout(
126
126
  N(e),
@@ -130,19 +130,19 @@ var yt = z(
130
130
  })
131
131
  );
132
132
  }, [e]);
133
- const d = i.onMouseEnter, a = w((n) => {
134
- d == null || d(n), c.current = !0;
133
+ const c = i.onMouseEnter, a = w((n) => {
134
+ c == null || c(n), d.current = !0;
135
135
  }), h = i.onFocusVisible, b = w((n) => {
136
136
  h == null || h(n), !n.defaultPrevented && (e == null || e.setAnchorElement(n.currentTarget), e == null || e.show());
137
137
  }), s = i.onBlur, u = w((n) => {
138
138
  if (s == null || s(n), n.defaultPrevented) return;
139
- const { activeStore: l } = v.getState();
140
- c.current = !1, l === e && v.setState("activeStore", null);
139
+ const { activeStore: l } = m.getState();
140
+ d.current = !1, l === e && m.setState("activeStore", null);
141
141
  }), O = e.useState("type"), _ = e.useState((n) => {
142
142
  var l;
143
143
  return (l = n.contentElement) == null ? void 0 : l.id;
144
144
  });
145
- return i = K(P({
145
+ return i = W(P({
146
146
  "aria-labelledby": O === "label" ? _ : void 0
147
147
  }, i), {
148
148
  onMouseEnter: a,
@@ -151,15 +151,15 @@ var yt = z(
151
151
  }), i = st(P({
152
152
  store: e,
153
153
  showOnHover(n) {
154
- if (!c.current || H(m, n)) return !1;
155
- const { activeStore: l } = v.getState();
154
+ if (!d.current || H(f, n)) return !1;
155
+ const { activeStore: l } = m.getState();
156
156
  return l ? (e == null || e.show(), !1) : !0;
157
157
  }
158
158
  }, i)), i;
159
159
  }
160
- ), Et = Q(function(r) {
160
+ ), Et = z(function(r) {
161
161
  const o = yt(r);
162
- return W(xt, o);
162
+ return L(xt, o);
163
163
  });
164
164
  const $t = {
165
165
  top: "translate3d(0, -4px, 0)",
@@ -175,7 +175,7 @@ const $t = {
175
175
  let e = "0, 0";
176
176
  return (t == "right-end" || t == "bottom-end") && (e = "4px, 4px"), (t == "right-start" || t == "top-end") && (e = "4px, -4px"), (t == "left-end" || t == "bottom-start") && (e = "-4px, 4px"), (t == "left-start" || t == "top-start") && (e = "-4px, -4px"), `translate3d(${e}, 0)`;
177
177
  }
178
- }, Ot = f`
178
+ }, Ot = v`
179
179
  visibility: visible;
180
180
  opacity: 1;
181
181
  transform: translate3d(0, 0, 0);
@@ -183,7 +183,7 @@ const $t = {
183
183
  const o = r - x < S;
184
184
  return t.includes("end") ? o ? `${S}px` : `calc(100% - ${x}px)` : t.includes("start") ? o ? `${S}px` : `${x}px` : "50%";
185
185
  }, _t = M.divBox(
186
- ({ fixed: t, placement: r, popoverHeight: o, withArrow: e }) => f`
186
+ ({ fixed: t, placement: r, popoverHeight: o, withArrow: e }) => v`
187
187
  ${y("tooltips")};
188
188
  transition:
189
189
  opacity ${y.transition("medium")},
@@ -194,7 +194,7 @@ const $t = {
194
194
  transform-origin: top center;
195
195
  z-index: 10;
196
196
 
197
- ${t && e && f`
197
+ ${t && e && v`
198
198
  &::after {
199
199
  content: '';
200
200
  position: absolute;
@@ -209,26 +209,26 @@ const $t = {
209
209
  z-index: 0;
210
210
  translate: -50% -50%;
211
211
 
212
- ${r.includes("top") && f`
212
+ ${r.includes("top") && v`
213
213
  top: 100%;
214
214
  left: ${D(r)};
215
215
  rotate: 45deg;
216
216
  `}
217
217
 
218
- ${r.includes("bottom") && f`
218
+ ${r.includes("bottom") && v`
219
219
  bottom: 100%;
220
220
  left: ${D(r)};
221
221
  translate: -50% 50%;
222
222
  rotate: 225deg;
223
223
  `}
224
224
 
225
- ${r.includes("left") && f`
225
+ ${r.includes("left") && v`
226
226
  top: ${F(r, o)};
227
227
  left: 100%;
228
228
  rotate: -45deg;
229
229
  `}
230
230
 
231
- ${r.includes("right") && f`
231
+ ${r.includes("right") && v`
232
232
  top: ${F(r, o)};
233
233
  left: 0%;
234
234
  rotate: 135deg;
@@ -236,7 +236,7 @@ const $t = {
236
236
  }
237
237
  `}
238
238
 
239
- ${t && f`
239
+ ${t && v`
240
240
  transform: ${Pt(r)};
241
241
  `}
242
242
 
@@ -252,12 +252,12 @@ const $t = {
252
252
  content: r,
253
253
  fixed: o = !1,
254
254
  placement: e = o ? "top" : "bottom",
255
- gutter: m = 8,
255
+ gutter: f = 8,
256
256
  withArrow: i,
257
257
  ...g
258
- }, c) => {
258
+ }, d) => {
259
259
  var R;
260
- const d = ht({ placement: e, animated: 300 }), [a, h] = J({ x: 0, y: 0 }), { render: b, stopAnimation: s } = d, { anchorElement: u, currentPlacement: O, mounted: _, popoverElement: n } = d.useState(), l = () => {
260
+ const c = ht({ placement: e, animated: 300 }), [a, h] = J({ x: 0, y: 0 }), { render: b, stopAnimation: s } = c, { anchorElement: u, currentPlacement: O, mounted: _, popoverElement: n } = c.useState(), l = () => {
261
261
  n && Object.assign(n.style, {
262
262
  display: _ ? "block" : "none",
263
263
  position: "absolute",
@@ -273,14 +273,14 @@ const $t = {
273
273
  return u.addEventListener("mousemove", V), () => {
274
274
  u.removeEventListener("mousemove", V);
275
275
  };
276
- }, [b, o, u]), r ? /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement(Et, { render: T, store: d }), /* @__PURE__ */ p.createElement(
276
+ }, [b, o, u]), r ? /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement(Et, { render: T, store: c }), /* @__PURE__ */ p.createElement(
277
277
  Tt,
278
278
  {
279
279
  fixed: o,
280
- gutter: m,
281
- ref: c,
280
+ gutter: f,
281
+ ref: d,
282
282
  render: /* @__PURE__ */ p.createElement(U, { ...g }),
283
- store: d,
283
+ store: c,
284
284
  updatePosition: o ? void 0 : l
285
285
  },
286
286
  /* @__PURE__ */ p.createElement(