welcome-ui 10.0.0-alpha.4 → 10.0.0-alpha.5

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 (127) hide show
  1. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  2. package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
  3. package/dist/Accordion.js +19 -17
  4. package/dist/Alert.js +40 -31
  5. package/dist/AspectRatio.js +1 -0
  6. package/dist/Avatar.js +13 -11
  7. package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
  8. package/dist/Badge.js +1 -0
  9. package/dist/Breadcrumb.js +76 -71
  10. package/dist/Button.js +8 -6
  11. package/dist/ButtonGroup.js +6 -4
  12. package/dist/Card.css +1 -1
  13. package/dist/Card.js +68 -15
  14. package/dist/Checkbox.js +30 -29
  15. package/dist/CloseButton.js +7 -5
  16. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  17. package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  18. package/dist/DatePicker.js +82 -78
  19. package/dist/DateTimePicker.js +22 -21
  20. package/dist/Drawer.js +101 -80
  21. package/dist/DropdownMenu.css +1 -1
  22. package/dist/DropdownMenu.js +889 -462
  23. package/dist/Field.js +1 -0
  24. package/dist/FieldGroup.js +9 -7
  25. package/dist/FileDrop.js +184 -176
  26. package/dist/FileUpload.js +43 -40
  27. package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
  28. package/dist/Hint.js +9 -7
  29. package/dist/Icon.js +6 -4
  30. package/dist/InputText.js +30 -28
  31. package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  32. package/dist/Label.js +9 -7
  33. package/dist/Link.js +25 -21
  34. package/dist/Loader.js +12 -10
  35. package/dist/Logo.js +21 -13
  36. package/dist/Modal.js +145 -114
  37. package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
  38. package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
  39. package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  40. package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
  41. package/dist/Pagination.js +39 -37
  42. package/dist/PasswordInput.js +20 -17
  43. package/dist/Popover.js +89 -72
  44. package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
  45. package/dist/Radio.js +20 -19
  46. package/dist/RadioGroup.js +29 -27
  47. package/dist/RadioTab.js +2 -1
  48. package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
  49. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  50. package/dist/Search.css +1 -1
  51. package/dist/Search.js +62 -60
  52. package/dist/Select.css +1 -1
  53. package/dist/Select.js +204 -202
  54. package/dist/Slider.js +66 -61
  55. package/dist/Stepper.js +34 -27
  56. package/dist/StickyNote.js +30 -23
  57. package/dist/Swiper.js +52 -50
  58. package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
  59. package/dist/Table.js +34 -21
  60. package/dist/Tabs.js +161 -152
  61. package/dist/Tag.css +1 -1
  62. package/dist/Tag.js +70 -65
  63. package/dist/Text.js +4 -2
  64. package/dist/Textarea.js +10 -8
  65. package/dist/TimePicker.js +22 -21
  66. package/dist/Toast.js +186 -177
  67. package/dist/Toggle.js +16 -14
  68. package/dist/Tooltip.js +29 -27
  69. package/dist/VariantIcon.js +7 -5
  70. package/dist/VisuallyHidden.js +8 -6
  71. package/dist/WelcomeLoader.js +3 -2
  72. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  73. package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
  74. package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  75. package/dist/theme.js +1 -0
  76. package/dist/types/components/Alert/components/Title.d.ts +4 -1
  77. package/dist/types/components/Alert/index.d.ts +4 -1
  78. package/dist/types/components/Card/Body.d.ts +2 -3
  79. package/dist/types/components/Card/Footer.d.ts +6 -0
  80. package/dist/types/components/Card/Header.d.ts +5 -0
  81. package/dist/types/components/Card/index.d.ts +7 -8
  82. package/dist/types/components/Card/types.d.ts +16 -3
  83. package/dist/types/components/Checkbox/index.d.ts +1 -2
  84. package/dist/types/components/Checkbox/types.d.ts +3 -1
  85. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  86. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  87. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  88. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  89. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  90. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  91. package/dist/types/components/Drawer/index.d.ts +12 -3
  92. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  93. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  94. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  95. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  96. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  97. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  98. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  99. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  100. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  101. package/dist/types/components/Loader/index.d.ts +4 -1
  102. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  103. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  104. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  105. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  106. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  107. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  108. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  109. package/dist/types/components/Modal/index.d.ts +16 -4
  110. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  111. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  112. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  113. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  114. package/dist/types/components/Stepper/index.d.ts +8 -2
  115. package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
  116. package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
  117. package/dist/types/components/StickyNote/index.d.ts +8 -2
  118. package/dist/types/components/Swiper/index.d.ts +4 -1
  119. package/dist/types/components/Table/index.d.ts +20 -5
  120. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  121. package/dist/types/components/Tag/types.d.ts +4 -2
  122. package/dist/types/components/Toast/index.d.ts +4 -1
  123. package/dist/utils.js +1 -0
  124. package/package.json +2 -2
  125. package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
  126. package/dist/SQZLCNLX-CUlXoT69.js +0 -82
  127. package/dist/XCKGTAUF-CahZE721.js +0 -25
package/dist/Swiper.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use client";
2
+ import './Swiper.css';
2
3
  import { jsxs as le, jsx as A } from "react/jsx-runtime";
3
4
  import { a as K, g as ce, c as ue } from "./index-PAaZGbyz.js";
4
5
  import { useRef as se, useEffect as q, useState as Z, useMemo as de, Children as oe, cloneElement as pe, useCallback as X } from "react";
5
- import { Button as ne } from "./Button.js";
6
- import { Icon as re } from "./Icon.js";
6
+ import { Button as re } from "./Button.js";
7
+ import { Icon as ne } from "./Icon.js";
7
8
  import { u as fe } from "./use-viewport-CgrficYB.js";
8
9
  var ee, ie;
9
10
  function me() {
@@ -13,24 +14,24 @@ function me() {
13
14
  return B.Date.now();
14
15
  };
15
16
  function P(e, o, a) {
16
- var k, I, E, b, g, S, H = 0, M = !1, j = !1, U = !0;
17
+ var k, I, E, b, g, S, H = 0, M = !1, N = !1, U = !0;
17
18
  if (typeof e != "function")
18
19
  throw new TypeError(i);
19
- o = u(o) || 0, _(a) && (M = !!a.leading, j = "maxWait" in a, E = j ? c(u(a.maxWait) || 0, o) : E, U = "trailing" in a ? !!a.trailing : U);
20
- function N(t) {
20
+ o = u(o) || 0, _(a) && (M = !!a.leading, N = "maxWait" in a, E = N ? c(u(a.maxWait) || 0, o) : E, U = "trailing" in a ? !!a.trailing : U);
21
+ function j(t) {
21
22
  var l = k, f = I;
22
23
  return k = I = void 0, H = t, b = e.apply(f, l), b;
23
24
  }
24
25
  function Q(t) {
25
- return H = t, g = setTimeout(x, o), M ? N(t) : b;
26
+ return H = t, g = setTimeout(x, o), M ? j(t) : b;
26
27
  }
27
28
  function Y(t) {
28
29
  var l = t - S, f = t - H, $ = o - l;
29
- return j ? F($, E - f) : $;
30
+ return N ? F($, E - f) : $;
30
31
  }
31
32
  function y(t) {
32
33
  var l = t - S, f = t - H;
33
- return S === void 0 || l >= o || l < 0 || j && f >= E;
34
+ return S === void 0 || l >= o || l < 0 || N && f >= E;
34
35
  }
35
36
  function x() {
36
37
  var t = w();
@@ -39,25 +40,25 @@ function me() {
39
40
  g = setTimeout(x, Y(t));
40
41
  }
41
42
  function O(t) {
42
- return g = void 0, U && k ? N(t) : (k = I = void 0, b);
43
+ return g = void 0, U && k ? j(t) : (k = I = void 0, b);
43
44
  }
44
45
  function d() {
45
46
  g !== void 0 && clearTimeout(g), H = 0, k = S = I = g = void 0;
46
47
  }
47
- function n() {
48
+ function r() {
48
49
  return g === void 0 ? b : O(w());
49
50
  }
50
- function r() {
51
+ function n() {
51
52
  var t = w(), l = y(t);
52
53
  if (k = arguments, I = this, S = t, l) {
53
54
  if (g === void 0)
54
55
  return Q(S);
55
- if (j)
56
- return g = setTimeout(x, o), N(S);
56
+ if (N)
57
+ return g = setTimeout(x, o), j(S);
57
58
  }
58
59
  return g === void 0 && (g = setTimeout(x, o)), b;
59
60
  }
60
- return r.cancel = d, r.flush = n, r;
61
+ return n.cancel = d, n.flush = r, n;
61
62
  }
62
63
  function _(e) {
63
64
  var o = typeof e;
@@ -136,7 +137,7 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
136
137
  return `${100 / i}%`;
137
138
  const h = s * (i === 1 ? 4 : 2) / 16;
138
139
  return `calc(${100 / i}% - ${h}rem)`;
139
- }, R = ue(xe), Ae = (i = {}) => {
140
+ }, R = ue(xe), De = (i = {}) => {
140
141
  const {
141
142
  autoplay: s = !1,
142
143
  centeredSlides: p = !1,
@@ -175,7 +176,7 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
175
176
  withNavigation: C,
176
177
  withPagination: c
177
178
  };
178
- }, De = ({ children: i, className: s, store: p, ...h }) => {
179
+ }, He = ({ children: i, className: s, store: p, ...h }) => {
179
180
  const {
180
181
  autoplay: W,
181
182
  centeredSlides: L,
@@ -198,15 +199,15 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
198
199
  withDarkUI: o,
199
200
  withNavigation: a,
200
201
  withPagination: k
201
- } = p, I = oe.toArray(i).length, E = Math.ceil(I / v), b = Array.from(Array(E).keys()), g = a.mobile || !1, S = a.desktop || !1, H = m === 0, M = m === b.length - 1, j = oe.map(i, (d, n) => {
202
- const r = `${D}-${n}`, t = n + 1, l = Math.ceil(t / v) - 1, f = M ? I - t >= v : l !== m;
202
+ } = p, I = oe.toArray(i).length, E = Math.ceil(I / v), b = Array.from(Array(E).keys()), g = a.mobile || !1, S = a.desktop || !1, H = m === 0, M = m === b.length - 1, N = oe.map(i, (d, r) => {
203
+ const n = `${D}-${r}`, t = r + 1, l = Math.ceil(t / v) - 1, f = M ? I - t >= v : l !== m;
203
204
  return pe(d, {
204
205
  ...d.props,
205
206
  "aria-hidden": f,
206
207
  "aria-label": `${t} of ${I}`,
207
208
  "aria-roledescription": "slide",
208
- id: r,
209
- key: r
209
+ id: n,
210
+ key: n
210
211
  });
211
212
  }), U = L ? (
212
213
  // if centeredSlides is true, we calculate which number is the middle page
@@ -214,29 +215,29 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
214
215
  ) : (
215
216
  // if centeredSlides is false, we calculate on which page the number in firstSlideToShow props is
216
217
  Math.ceil(T / v) - 1
217
- ), N = X(() => {
218
+ ), j = X(() => {
218
219
  const d = c == null ? void 0 : c.current;
219
220
  if (d && !_) {
220
- const { offsetWidth: n, scrollLeft: r, scrollWidth: t } = d, l = !(r > e), f = !(t - (r + n) > e);
221
+ const { offsetWidth: r, scrollLeft: n, scrollWidth: t } = d, l = !(n > e), f = !(t - (n + r) > e);
221
222
  w(!l), P(!f);
222
223
  } else
223
224
  w(!0), P(!0);
224
225
  }, [c, w, P, _, e]), Q = () => {
225
- var n, r;
226
+ var r, n;
226
227
  const d = c == null ? void 0 : c.current;
227
228
  if (d) {
228
- const { children: t, offsetWidth: l, scrollLeft: f, scrollWidth: $ } = d, ae = (r = (n = t == null ? void 0 : t[0]) == null ? void 0 : n.getBoundingClientRect()) == null ? void 0 : r.width, te = !($ - (f + l) > e) ? b.length - 1 : Math.round(f / ((ae + e) * v));
229
+ const { children: t, offsetWidth: l, scrollLeft: f, scrollWidth: $ } = d, ae = (n = (r = t == null ? void 0 : t[0]) == null ? void 0 : r.getBoundingClientRect()) == null ? void 0 : n.width, te = !($ - (f + l) > e) ? b.length - 1 : Math.round(f / ((ae + e) * v));
229
230
  te !== m && F(te);
230
231
  }
231
232
  }, Y = ge(() => {
232
- N(), Q();
233
+ j(), Q();
233
234
  }, 100), y = X(
234
- (d, n = !1) => {
235
+ (d, r = !1) => {
235
236
  var l, f, $;
236
- const r = c == null ? void 0 : c.current, t = ($ = (f = (l = r == null ? void 0 : r.children) == null ? void 0 : l[0]) == null ? void 0 : f.getBoundingClientRect()) == null ? void 0 : $.width;
237
- r == null || r.scrollTo({
237
+ const n = c == null ? void 0 : c.current, t = ($ = (f = (l = n == null ? void 0 : n.children) == null ? void 0 : l[0]) == null ? void 0 : f.getBoundingClientRect()) == null ? void 0 : $.width;
238
+ n == null || n.scrollTo({
238
239
  // We don't want to have a scroll effect when we first render the swiper
239
- behavior: n ? "auto" : "smooth",
240
+ behavior: r ? "auto" : "smooth",
240
241
  left: d * (t + e) * v,
241
242
  top: 0
242
243
  });
@@ -253,15 +254,15 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
253
254
  },
254
255
  W ? G : null
255
256
  ), q(() => {
256
- const d = (n) => {
257
- n.code === "ArrowLeft" && O(), n.code === "ArrowRight" && x();
257
+ const d = (r) => {
258
+ r.code === "ArrowLeft" && O(), r.code === "ArrowRight" && x();
258
259
  };
259
260
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
260
261
  }, [O, x]), q(() => {
261
262
  y(U, !0);
262
263
  }, []), q(() => {
263
- N();
264
- }, [N, i]), /* @__PURE__ */ le("div", { className: R("root", o && "dark", s), ...h, children: [
264
+ j();
265
+ }, [j, i]), /* @__PURE__ */ le("div", { className: R("root", o && "dark", s), ...h, children: [
265
266
  /* @__PURE__ */ A(
266
267
  "ul",
267
268
  {
@@ -284,11 +285,11 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
284
285
  "--slideWithDesktopFullWidth": J(u.desktop + 2, e),
285
286
  "--spaceBetween": `${e / 16}rem`
286
287
  },
287
- children: j
288
+ children: N
288
289
  }
289
290
  ),
290
291
  /* @__PURE__ */ A(
291
- ne,
292
+ re,
292
293
  {
293
294
  "aria-label": "Previous slide",
294
295
  className: R(
@@ -302,11 +303,11 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
302
303
  onClick: O,
303
304
  size: C,
304
305
  variant: o ? "primary-neutral" : "tertiary",
305
- children: /* @__PURE__ */ A(re, { name: "angle-left-b" })
306
+ children: /* @__PURE__ */ A(ne, { name: "angle-left-b" })
306
307
  }
307
308
  ),
308
309
  /* @__PURE__ */ A(
309
- ne,
310
+ re,
310
311
  {
311
312
  "aria-label": "Next slide",
312
313
  className: R(
@@ -320,7 +321,7 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
320
321
  onClick: x,
321
322
  size: C,
322
323
  variant: o ? "primary-neutral" : "tertiary",
323
- children: /* @__PURE__ */ A(re, { name: "angle-right-b" })
324
+ children: /* @__PURE__ */ A(ne, { name: "angle-right-b" })
324
325
  }
325
326
  ),
326
327
  /* @__PURE__ */ A(
@@ -332,29 +333,30 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
332
333
  k.desktop && "pagination-desktop"
333
334
  ),
334
335
  role: "tablist",
335
- children: b.length > 1 && b.map((d, n) => {
336
- const r = {
337
- "aria-controls": `${D}-${n}`,
338
- "aria-label": `${n + 1} of ${b.length}`,
339
- "aria-selected": n === m,
340
- idx: n,
341
- onClick: () => y(n),
336
+ children: b.length > 1 && b.map((d, r) => {
337
+ const n = {
338
+ "aria-controls": `${D}-${r}`,
339
+ "aria-label": `${r + 1} of ${b.length}`,
340
+ "aria-selected": r === m,
341
+ idx: r,
342
+ onClick: () => y(r),
342
343
  role: "tab"
343
344
  };
344
345
  return /* @__PURE__ */ A(
345
346
  "div",
346
347
  {
347
- className: R("bullet", n === m && "bullet-active"),
348
- ...r
348
+ className: R("bullet", r === m && "bullet-active"),
349
+ ...n
349
350
  },
350
- `bullet-${n + 1}`
351
+ `bullet-${r + 1}`
351
352
  );
352
353
  })
353
354
  }
354
355
  )
355
356
  ] });
356
357
  };
358
+ He.displayName = "Swiper";
357
359
  export {
358
- De as Swiper,
359
- Ae as useSwiper
360
+ He as Swiper,
361
+ De as useSwiper
360
362
  };
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { e as T, f as j, _ as I, a as b, c as Y, b as Z, i as ee, w as te, L as p, x as ne, d as w, p as oe, r as ae, H as S, G as se, I as re, K as ie } from "./OE2EFRVA-DkdhQLJL.js";
3
- import { createContext as R, useRef as ue, useState as le, useMemo as ce } from "react";
4
- import { u as F, m as de, o as me, t as fe, c as ve, s as y, a as A, e as pe, b as Se, d as P } from "./RTNCFSKZ-LcIdBwa8.js";
2
+ import { e as j, f as H, _ as R, a as b, c as Y, b as Z, i as ee, l as te, m as p, k as ne, d as O, v as oe, r as ae, z as S, A as se, B as re, C as ie } from "./OE2EFRVA-Dg1R6gaC.js";
3
+ import { createContext as F, useRef as ue, useState as le, useMemo as ce } from "react";
4
+ import { b as I, m as de, o as me, t as fe, c as ve, s as y, d as V, e as pe, u as Se, a as P } from "./RTNCFSKZ-BywELldk.js";
5
5
  import { flushSync as De } from "react-dom";
6
6
  import { jsx as M } from "react/jsx-runtime";
7
- var _ = T(), N = _.useProviderContext, Ce = _.ContextProvider, xe = _.ScopedContextProvider, D = T(
7
+ var _ = j(), N = _.useProviderContext, Ce = _.ContextProvider, xe = _.ScopedContextProvider, D = j(
8
8
  [Ce],
9
9
  [xe]
10
- ), Ie = D.useScopedContext, Re = D.useProviderContext, Fe = D.ContextProvider, ge = D.ScopedContextProvider, Me = R(void 0), Ne = R(void 0), Ee = "div";
11
- function V(n, o) {
10
+ ), Re = D.useScopedContext, Fe = D.useProviderContext, Ie = D.ContextProvider, ge = D.ScopedContextProvider, Me = F(void 0), Ne = F(void 0), Ee = "div";
11
+ function w(n, o) {
12
12
  const e = setTimeout(o, n);
13
13
  return () => clearTimeout(e);
14
14
  }
@@ -18,7 +18,7 @@ function ye(n) {
18
18
  });
19
19
  return () => cancelAnimationFrame(o);
20
20
  }
21
- function H(...n) {
21
+ function T(...n) {
22
22
  return n.join(", ").split(", ").reduce((o, e) => {
23
23
  const t = e.endsWith("ms") ? 1 : 1e3, i = Number.parseFloat(e || "0s") * t;
24
24
  return i > o ? i : o;
@@ -28,13 +28,13 @@ function Pe(n, o, e) {
28
28
  return !e && o !== !1 && (!n || !!o);
29
29
  }
30
30
  var be = Y(function(o) {
31
- var e = o, { store: t, alwaysVisible: i } = e, r = I(e, ["store", "alwaysVisible"]);
31
+ var e = o, { store: t, alwaysVisible: i } = e, r = R(e, ["store", "alwaysVisible"]);
32
32
  const a = N();
33
33
  t = t || a, ee(
34
34
  t,
35
35
  process.env.NODE_ENV !== "production" && "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
36
36
  );
37
- const s = ue(null), f = te(r.id), [l, h] = le(null), c = t.useState("open"), C = t.useState("mounted"), d = t.useState("animated"), m = t.useState("contentElement"), x = F(t.disclosure, "contentElement");
37
+ const s = ue(null), f = te(r.id), [l, h] = le(null), c = t.useState("open"), C = t.useState("mounted"), d = t.useState("animated"), m = t.useState("contentElement"), x = I(t.disclosure, "contentElement");
38
38
  p(() => {
39
39
  s.current && (t == null || t.setContentElement(s.current));
40
40
  }, [t]), p(() => {
@@ -57,41 +57,41 @@ var be = Y(function(o) {
57
57
  const u = () => t == null ? void 0 : t.setState("animating", !1), v = () => De(u);
58
58
  if (l === "leave" && c || l === "enter" && !c) return;
59
59
  if (typeof d == "number")
60
- return V(d, v);
60
+ return w(d, v);
61
61
  const {
62
- transitionDuration: k,
62
+ transitionDuration: $,
63
63
  animationDuration: q,
64
- transitionDelay: L,
65
- animationDelay: U
64
+ transitionDelay: U,
65
+ animationDelay: W
66
66
  } = getComputedStyle(m), {
67
- transitionDuration: W = "0",
68
- animationDuration: G = "0",
69
- transitionDelay: K = "0",
70
- animationDelay: z = "0"
71
- } = x ? getComputedStyle(x) : {}, B = H(
72
- L,
67
+ transitionDuration: z = "0",
68
+ animationDuration: B = "0",
69
+ transitionDelay: L = "0",
70
+ animationDelay: G = "0"
71
+ } = x ? getComputedStyle(x) : {}, J = T(
73
72
  U,
74
- K,
75
- z
76
- ), J = H(
77
- k,
78
- q,
79
73
  W,
74
+ L,
80
75
  G
81
- ), O = B + J;
82
- if (!O) {
76
+ ), K = T(
77
+ $,
78
+ q,
79
+ z,
80
+ B
81
+ ), A = J + K;
82
+ if (!A) {
83
83
  l === "enter" && t.setState("animated", !1), u();
84
84
  return;
85
85
  }
86
- const Q = 1e3 / 60, X = Math.max(O - Q, 0);
87
- return V(X, v);
86
+ const Q = 1e3 / 60, X = Math.max(A - Q, 0);
87
+ return w(X, v);
88
88
  }, [t, d, m, x, c, l]), r = ne(
89
89
  r,
90
90
  (u) => /* @__PURE__ */ M(ge, { value: t, children: u }),
91
91
  [t]
92
92
  );
93
- const g = Pe(C, r.hidden, i), E = r.style, $ = ce(() => g ? w(b({}, E), { display: "none" }) : E, [g, E]);
94
- return r = w(b({
93
+ const g = Pe(C, r.hidden, i), E = r.style, k = ce(() => g ? O(b({}, E), { display: "none" }) : E, [g, E]);
94
+ return r = O(b({
95
95
  id: f,
96
96
  "data-open": c || void 0,
97
97
  "data-enter": l === "enter" || void 0,
@@ -99,19 +99,19 @@ var be = Y(function(o) {
99
99
  hidden: g
100
100
  }, r), {
101
101
  ref: oe(f ? t.setContentElement : null, s, r.ref),
102
- style: $
102
+ style: k
103
103
  }), ae(r);
104
- }), _e = j(function(o) {
104
+ }), _e = H(function(o) {
105
105
  const e = be(o);
106
106
  return Z(Ee, e);
107
- }), $e = j(function(o) {
107
+ }), ke = H(function(o) {
108
108
  var e = o, {
109
109
  unmountOnHide: t
110
- } = e, i = I(e, [
110
+ } = e, i = R(e, [
111
111
  "unmountOnHide"
112
112
  ]);
113
113
  const r = N(), a = i.store || r;
114
- return F(
114
+ return I(
115
115
  a,
116
116
  (f) => !t || (f == null ? void 0 : f.mounted)
117
117
  ) === !1 ? null : /* @__PURE__ */ M(_e, b({}, i));
@@ -137,7 +137,7 @@ function he(n = {}) {
137
137
  }, a = ve(r, o);
138
138
  return y(
139
139
  a,
140
- () => A(a, ["animated", "animating"], (s) => {
140
+ () => V(a, ["animated", "animating"], (s) => {
141
141
  s.animated || a.setState("animating", !1);
142
142
  })
143
143
  ), y(
@@ -147,7 +147,7 @@ function he(n = {}) {
147
147
  })
148
148
  ), y(
149
149
  a,
150
- () => A(a, ["open", "animating"], (s) => {
150
+ () => V(a, ["open", "animating"], (s) => {
151
151
  a.setState("mounted", s.open || s.animating);
152
152
  })
153
153
  ), se(re({}, a), {
@@ -161,25 +161,25 @@ function he(n = {}) {
161
161
  setDisclosureElement: (s) => a.setState("disclosureElement", s)
162
162
  });
163
163
  }
164
- function Oe(n, o, e) {
164
+ function Ae(n, o, e) {
165
165
  return ie(o, [e.store, e.disclosure]), P(n, e, "open", "setOpen"), P(n, e, "mounted", "setMounted"), P(n, e, "animated"), Object.assign(n, { disclosure: e.disclosure });
166
166
  }
167
- function ke(n = {}) {
167
+ function $e(n = {}) {
168
168
  const [o, e] = Se(he, n);
169
- return Oe(o, e, n);
169
+ return Ae(o, e, n);
170
170
  }
171
171
  export {
172
- $e as D,
173
- Ie as a,
174
- Re as b,
172
+ ke as D,
173
+ Re as a,
174
+ Fe as b,
175
175
  N as c,
176
176
  be as d,
177
177
  he as e,
178
- Oe as f,
178
+ Ae as f,
179
179
  ge as g,
180
180
  Me as h,
181
181
  Pe as i,
182
182
  Ne as j,
183
- Fe as k,
184
- ke as u
183
+ Ie as k,
184
+ $e as u
185
185
  };
package/dist/Table.js CHANGED
@@ -1,33 +1,46 @@
1
1
  "use client";
2
- import { jsx as n } from "react/jsx-runtime";
3
- import { forwardRef as s } from "react";
4
- import { c as i } from "./index-PAaZGbyz.js";
5
- const _ = "_root_10vth_2", l = "_content_10vth_6", v = "_clickable_10vth_48", d = "_indent_10vth_70", h = {
6
- root: _,
7
- content: l,
8
- clickable: v,
2
+ import './Table.css';
3
+ import { jsx as a } from "react/jsx-runtime";
4
+ import { forwardRef as v } from "react";
5
+ import { c as T } from "./index-PAaZGbyz.js";
6
+ const m = "_root_10vth_2", h = "_content_10vth_6", p = "_clickable_10vth_48", y = "_indent_10vth_70", N = {
7
+ root: m,
8
+ content: h,
9
+ clickable: p,
9
10
  "variant-danger": "_variant-danger_10vth_54",
10
11
  "variant-warning": "_variant-warning_10vth_58",
11
12
  "variant-success": "_variant-success_10vth_62",
12
13
  "variant-info": "_variant-info_10vth_66",
13
- indent: d
14
- }, c = i(h), b = s(
15
- ({ children: t, className: a, indent: e, ...r }, o) => /* @__PURE__ */ n("div", { className: c("root", a), ref: o, ...r, children: /* @__PURE__ */ n("div", { className: c("content", e && "indent"), children: /* @__PURE__ */ n("table", { children: t }) }) })
16
- ), m = (t) => /* @__PURE__ */ n("tbody", { ...t }), u = (t) => /* @__PURE__ */ n("th", { ...t }), f = (t) => /* @__PURE__ */ n("thead", { ...t }), T = (t) => /* @__PURE__ */ n("td", { ...t }), g = ({ className: t, onClick: a, variant: e, ...r }) => /* @__PURE__ */ n(
14
+ indent: y
15
+ }, s = T(N), o = v(
16
+ ({ children: t, className: n, indent: e, ...r }, b) => /* @__PURE__ */ a("div", { className: s("root", n), ref: b, ...r, children: /* @__PURE__ */ a("div", { className: s("content", e && "indent"), children: /* @__PURE__ */ a("table", { children: t }) }) })
17
+ );
18
+ o.displayName = "Table";
19
+ const c = (t) => /* @__PURE__ */ a("tbody", { ...t });
20
+ c.displayName = "Table.Tbody";
21
+ const i = (t) => /* @__PURE__ */ a("th", { ...t });
22
+ i.displayName = "Table.Th";
23
+ const l = (t) => /* @__PURE__ */ a("thead", { ...t });
24
+ l.displayName = "Table.Thead";
25
+ const d = (t) => /* @__PURE__ */ a("td", { ...t });
26
+ d.displayName = "Table.Td";
27
+ const _ = ({ className: t, onClick: n, variant: e, ...r }) => /* @__PURE__ */ a(
17
28
  "tr",
18
29
  {
19
- className: c(e && `variant-${e}`, !!a && "clickable", t),
20
- onClick: a,
30
+ className: s(e && `variant-${e}`, !!n && "clickable", t),
31
+ onClick: n,
21
32
  ...r
22
33
  }
23
- ), w = Object.assign(b, {
24
- Tbody: m,
25
- Td: T,
26
- Th: u,
27
- Thead: f,
28
- Tr: g
34
+ );
35
+ _.displayName = "Table.Tr";
36
+ const k = Object.assign(o, {
37
+ Tbody: c,
38
+ Td: d,
39
+ Th: i,
40
+ Thead: l,
41
+ Tr: _
29
42
  });
30
43
  export {
31
- w as Table,
32
- b as TableComponent
44
+ k as Table,
45
+ o as TableComponent
33
46
  };