welcome-ui 0.0.0-dev.1763389246174 → 0.0.0-dev.1763736449682

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 (128) 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 +11 -10
  4. package/dist/Alert.js +39 -31
  5. package/dist/Avatar.js +12 -11
  6. package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
  7. package/dist/Breadcrumb.js +75 -71
  8. package/dist/Button.css +1 -1
  9. package/dist/Button.js +42 -41
  10. package/dist/ButtonGroup.js +5 -4
  11. package/dist/Card.css +1 -1
  12. package/dist/Card.js +67 -15
  13. package/dist/Checkbox.js +29 -29
  14. package/dist/CloseButton.js +6 -5
  15. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  16. package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  17. package/dist/DatePicker.js +81 -78
  18. package/dist/DateTimePicker.js +22 -21
  19. package/dist/Drawer.js +100 -80
  20. package/dist/DropdownMenu.css +1 -1
  21. package/dist/DropdownMenu.js +898 -462
  22. package/dist/FieldGroup.js +8 -7
  23. package/dist/FileDrop.js +183 -176
  24. package/dist/FileUpload.js +42 -40
  25. package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
  26. package/dist/Hint.js +8 -7
  27. package/dist/Icon.js +20 -15
  28. package/dist/InputText.css +1 -1
  29. package/dist/InputText.js +63 -62
  30. package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  31. package/dist/Label.js +8 -7
  32. package/dist/Link.css +1 -1
  33. package/dist/Link.js +51 -48
  34. package/dist/Loader.js +11 -10
  35. package/dist/Logo.js +20 -13
  36. package/dist/Modal.js +144 -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 +38 -37
  42. package/dist/PasswordInput.js +20 -17
  43. package/dist/Popover.js +88 -72
  44. package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
  45. package/dist/Radio.js +19 -19
  46. package/dist/RadioGroup.js +28 -27
  47. package/dist/RadioTab.js +1 -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 +107 -101
  52. package/dist/Select.css +1 -1
  53. package/dist/Select.js +203 -202
  54. package/dist/Slider.js +65 -61
  55. package/dist/Stepper.js +33 -27
  56. package/dist/StickyNote.js +29 -23
  57. package/dist/Swiper.js +51 -50
  58. package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
  59. package/dist/Table.js +33 -21
  60. package/dist/Tabs.js +160 -152
  61. package/dist/Tag.css +1 -1
  62. package/dist/Tag.js +69 -65
  63. package/dist/Text.js +3 -2
  64. package/dist/Textarea.css +1 -1
  65. package/dist/Textarea.js +25 -18
  66. package/dist/TimePicker.js +22 -21
  67. package/dist/Toast.js +226 -201
  68. package/dist/Toggle.js +15 -14
  69. package/dist/Tooltip.js +28 -27
  70. package/dist/VariantIcon.js +6 -5
  71. package/dist/VisuallyHidden.js +7 -6
  72. package/dist/WelcomeLoader.js +3 -2
  73. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  74. package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
  75. package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  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/Icon/icons.d.ts +4 -3
  102. package/dist/types/components/Loader/index.d.ts +4 -1
  103. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  104. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  105. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  106. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  107. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  108. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  109. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  110. package/dist/types/components/Modal/index.d.ts +16 -4
  111. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  112. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  113. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  114. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  115. package/dist/types/components/Stepper/index.d.ts +8 -2
  116. package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
  117. package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
  118. package/dist/types/components/StickyNote/index.d.ts +8 -2
  119. package/dist/types/components/Swiper/index.d.ts +4 -1
  120. package/dist/types/components/Table/index.d.ts +20 -5
  121. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  122. package/dist/types/components/Tag/types.d.ts +4 -2
  123. package/dist/types/components/Textarea/types.d.ts +1 -0
  124. package/dist/types/components/Toast/index.d.ts +4 -1
  125. package/package.json +1 -1
  126. package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
  127. package/dist/SQZLCNLX-CUlXoT69.js +0 -82
  128. package/dist/XCKGTAUF-CahZE721.js +0 -25
package/dist/Swiper.js CHANGED
@@ -3,8 +3,8 @@ import './Swiper.css';
3
3
  import { jsxs as le, jsx as A } from "react/jsx-runtime";
4
4
  import { a as K, g as ce, c as ue } from "./index-PAaZGbyz.js";
5
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";
6
- import { Button as ne } from "./Button.js";
7
- import { Icon as re } from "./Icon.js";
6
+ import { Button as re } from "./Button.js";
7
+ import { Icon as ne } from "./Icon.js";
8
8
  import { u as fe } from "./use-viewport-CgrficYB.js";
9
9
  var ee, ie;
10
10
  function me() {
@@ -14,24 +14,24 @@ function me() {
14
14
  return B.Date.now();
15
15
  };
16
16
  function P(e, o, a) {
17
- 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;
18
18
  if (typeof e != "function")
19
19
  throw new TypeError(i);
20
- 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);
21
- 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) {
22
22
  var l = k, f = I;
23
23
  return k = I = void 0, H = t, b = e.apply(f, l), b;
24
24
  }
25
25
  function Q(t) {
26
- return H = t, g = setTimeout(x, o), M ? N(t) : b;
26
+ return H = t, g = setTimeout(x, o), M ? j(t) : b;
27
27
  }
28
28
  function Y(t) {
29
29
  var l = t - S, f = t - H, $ = o - l;
30
- return j ? F($, E - f) : $;
30
+ return N ? F($, E - f) : $;
31
31
  }
32
32
  function y(t) {
33
33
  var l = t - S, f = t - H;
34
- return S === void 0 || l >= o || l < 0 || j && f >= E;
34
+ return S === void 0 || l >= o || l < 0 || N && f >= E;
35
35
  }
36
36
  function x() {
37
37
  var t = w();
@@ -40,25 +40,25 @@ function me() {
40
40
  g = setTimeout(x, Y(t));
41
41
  }
42
42
  function O(t) {
43
- 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);
44
44
  }
45
45
  function d() {
46
46
  g !== void 0 && clearTimeout(g), H = 0, k = S = I = g = void 0;
47
47
  }
48
- function n() {
48
+ function r() {
49
49
  return g === void 0 ? b : O(w());
50
50
  }
51
- function r() {
51
+ function n() {
52
52
  var t = w(), l = y(t);
53
53
  if (k = arguments, I = this, S = t, l) {
54
54
  if (g === void 0)
55
55
  return Q(S);
56
- if (j)
57
- return g = setTimeout(x, o), N(S);
56
+ if (N)
57
+ return g = setTimeout(x, o), j(S);
58
58
  }
59
59
  return g === void 0 && (g = setTimeout(x, o)), b;
60
60
  }
61
- return r.cancel = d, r.flush = n, r;
61
+ return n.cancel = d, n.flush = r, n;
62
62
  }
63
63
  function _(e) {
64
64
  var o = typeof e;
@@ -137,7 +137,7 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
137
137
  return `${100 / i}%`;
138
138
  const h = s * (i === 1 ? 4 : 2) / 16;
139
139
  return `calc(${100 / i}% - ${h}rem)`;
140
- }, R = ue(xe), Ae = (i = {}) => {
140
+ }, R = ue(xe), De = (i = {}) => {
141
141
  const {
142
142
  autoplay: s = !1,
143
143
  centeredSlides: p = !1,
@@ -176,7 +176,7 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
176
176
  withNavigation: C,
177
177
  withPagination: c
178
178
  };
179
- }, De = ({ children: i, className: s, store: p, ...h }) => {
179
+ }, He = ({ children: i, className: s, store: p, ...h }) => {
180
180
  const {
181
181
  autoplay: W,
182
182
  centeredSlides: L,
@@ -199,15 +199,15 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
199
199
  withDarkUI: o,
200
200
  withNavigation: a,
201
201
  withPagination: k
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, j = oe.map(i, (d, n) => {
203
- 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;
204
204
  return pe(d, {
205
205
  ...d.props,
206
206
  "aria-hidden": f,
207
207
  "aria-label": `${t} of ${I}`,
208
208
  "aria-roledescription": "slide",
209
- id: r,
210
- key: r
209
+ id: n,
210
+ key: n
211
211
  });
212
212
  }), U = L ? (
213
213
  // if centeredSlides is true, we calculate which number is the middle page
@@ -215,29 +215,29 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
215
215
  ) : (
216
216
  // if centeredSlides is false, we calculate on which page the number in firstSlideToShow props is
217
217
  Math.ceil(T / v) - 1
218
- ), N = X(() => {
218
+ ), j = X(() => {
219
219
  const d = c == null ? void 0 : c.current;
220
220
  if (d && !_) {
221
- 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);
222
222
  w(!l), P(!f);
223
223
  } else
224
224
  w(!0), P(!0);
225
225
  }, [c, w, P, _, e]), Q = () => {
226
- var n, r;
226
+ var r, n;
227
227
  const d = c == null ? void 0 : c.current;
228
228
  if (d) {
229
- 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));
230
230
  te !== m && F(te);
231
231
  }
232
232
  }, Y = ge(() => {
233
- N(), Q();
233
+ j(), Q();
234
234
  }, 100), y = X(
235
- (d, n = !1) => {
235
+ (d, r = !1) => {
236
236
  var l, f, $;
237
- 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;
238
- 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({
239
239
  // We don't want to have a scroll effect when we first render the swiper
240
- behavior: n ? "auto" : "smooth",
240
+ behavior: r ? "auto" : "smooth",
241
241
  left: d * (t + e) * v,
242
242
  top: 0
243
243
  });
@@ -254,15 +254,15 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
254
254
  },
255
255
  W ? G : null
256
256
  ), q(() => {
257
- const d = (n) => {
258
- n.code === "ArrowLeft" && O(), n.code === "ArrowRight" && x();
257
+ const d = (r) => {
258
+ r.code === "ArrowLeft" && O(), r.code === "ArrowRight" && x();
259
259
  };
260
260
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
261
261
  }, [O, x]), q(() => {
262
262
  y(U, !0);
263
263
  }, []), q(() => {
264
- N();
265
- }, [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: [
266
266
  /* @__PURE__ */ A(
267
267
  "ul",
268
268
  {
@@ -285,11 +285,11 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
285
285
  "--slideWithDesktopFullWidth": J(u.desktop + 2, e),
286
286
  "--spaceBetween": `${e / 16}rem`
287
287
  },
288
- children: j
288
+ children: N
289
289
  }
290
290
  ),
291
291
  /* @__PURE__ */ A(
292
- ne,
292
+ re,
293
293
  {
294
294
  "aria-label": "Previous slide",
295
295
  className: R(
@@ -303,11 +303,11 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
303
303
  onClick: O,
304
304
  size: C,
305
305
  variant: o ? "primary-neutral" : "tertiary",
306
- children: /* @__PURE__ */ A(re, { name: "angle-left-b" })
306
+ children: /* @__PURE__ */ A(ne, { name: "angle-left-b" })
307
307
  }
308
308
  ),
309
309
  /* @__PURE__ */ A(
310
- ne,
310
+ re,
311
311
  {
312
312
  "aria-label": "Next slide",
313
313
  className: R(
@@ -321,7 +321,7 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
321
321
  onClick: x,
322
322
  size: C,
323
323
  variant: o ? "primary-neutral" : "tertiary",
324
- children: /* @__PURE__ */ A(re, { name: "angle-right-b" })
324
+ children: /* @__PURE__ */ A(ne, { name: "angle-right-b" })
325
325
  }
326
326
  ),
327
327
  /* @__PURE__ */ A(
@@ -333,29 +333,30 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
333
333
  k.desktop && "pagination-desktop"
334
334
  ),
335
335
  role: "tablist",
336
- children: b.length > 1 && b.map((d, n) => {
337
- const r = {
338
- "aria-controls": `${D}-${n}`,
339
- "aria-label": `${n + 1} of ${b.length}`,
340
- "aria-selected": n === m,
341
- idx: n,
342
- 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),
343
343
  role: "tab"
344
344
  };
345
345
  return /* @__PURE__ */ A(
346
346
  "div",
347
347
  {
348
- className: R("bullet", n === m && "bullet-active"),
349
- ...r
348
+ className: R("bullet", r === m && "bullet-active"),
349
+ ...n
350
350
  },
351
- `bullet-${n + 1}`
351
+ `bullet-${r + 1}`
352
352
  );
353
353
  })
354
354
  }
355
355
  )
356
356
  ] });
357
357
  };
358
+ He.displayName = "Swiper";
358
359
  export {
359
- De as Swiper,
360
- Ae as useSwiper
360
+ He as Swiper,
361
+ De as useSwiper
361
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,34 +1,46 @@
1
1
  "use client";
2
2
  import './Table.css';
3
- import { jsx as n } from "react/jsx-runtime";
4
- import { forwardRef as s } from "react";
5
- import { c as i } from "./index-PAaZGbyz.js";
6
- const _ = "_root_10vth_2", l = "_content_10vth_6", v = "_clickable_10vth_48", d = "_indent_10vth_70", h = {
7
- root: _,
8
- content: l,
9
- clickable: v,
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,
10
10
  "variant-danger": "_variant-danger_10vth_54",
11
11
  "variant-warning": "_variant-warning_10vth_58",
12
12
  "variant-success": "_variant-success_10vth_62",
13
13
  "variant-info": "_variant-info_10vth_66",
14
- indent: d
15
- }, c = i(h), b = s(
16
- ({ 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 }) }) })
17
- ), 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(
18
28
  "tr",
19
29
  {
20
- className: c(e && `variant-${e}`, !!a && "clickable", t),
21
- onClick: a,
30
+ className: s(e && `variant-${e}`, !!n && "clickable", t),
31
+ onClick: n,
22
32
  ...r
23
33
  }
24
- ), w = Object.assign(b, {
25
- Tbody: m,
26
- Td: T,
27
- Th: u,
28
- Thead: f,
29
- 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: _
30
42
  });
31
43
  export {
32
- w as Table,
33
- b as TableComponent
44
+ k as Table,
45
+ o as TableComponent
34
46
  };