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/Card.js CHANGED
@@ -1,20 +1,72 @@
1
1
  "use client";
2
2
  import './Card.css';
3
- import { jsx as c } from "react/jsx-runtime";
4
- import { forwardRef as n } from "react";
5
- import { c as e } from "./index-PAaZGbyz.js";
6
- const a = "_root_zwvv3_2", m = "_body_zwvv3_13", d = {
7
- root: a,
8
- body: m
9
- }, i = e(d), v = n(
10
- ({ children: o, className: r, ...t }, s) => /* @__PURE__ */ c("div", { className: i("body", r), ref: s, ...t, children: o })
11
- ), l = n(({ alt: o, src: r, ...t }, s) => /* @__PURE__ */ c("div", { ref: s, ...t, children: /* @__PURE__ */ c("img", { alt: o, src: r }) })), y = e(d), _ = n(
12
- ({ children: o, className: r, ...t }, s) => /* @__PURE__ */ c("div", { className: y("root", r), ref: s, ...t, children: o })
13
- ), u = Object.assign(_, {
14
- Body: v,
15
- Cover: l
3
+ import { jsxs as _, jsx as r } from "react/jsx-runtime";
4
+ import { forwardRef as d } from "react";
5
+ import { c } from "./index-PAaZGbyz.js";
6
+ import { Button as N } from "./Button.js";
7
+ import { Icon as C } from "./Icon.js";
8
+ import { f as b } from "./forwardRefWithAs-8eP3ZN15.js";
9
+ const u = "_root_8fygh_2", v = "_header_8fygh_33", z = "_close_8fygh_46", x = "_body_8fygh_74", $ = "_metadata_8fygh_83", j = "_footer_8fygh_91", i = {
10
+ root: u,
11
+ header: v,
12
+ close: z,
13
+ body: x,
14
+ metadata: $,
15
+ footer: j,
16
+ "size-sm": "_size-sm_8fygh_104",
17
+ "size-md": "_size-md_8fygh_118",
18
+ "size-lg": "_size-lg_8fygh_132"
19
+ }, m = c(i), f = d(
20
+ ({ children: o, className: a, metadata: e, ...s }, t) => /* @__PURE__ */ _("div", { className: m("body", a), ref: t, ...s, children: [
21
+ o,
22
+ e ? /* @__PURE__ */ r("div", { className: m("metadata"), children: e }) : null
23
+ ] })
24
+ );
25
+ f.displayName = "Card.Body";
26
+ const y = d(({ alt: o, src: a, ...e }, s) => /* @__PURE__ */ r("div", { ref: s, ...e, children: /* @__PURE__ */ r("img", { alt: o, src: a }) }));
27
+ y.displayName = "Card.Cover";
28
+ const B = c(i), h = d(
29
+ ({ children: o, className: a, ...e }, s) => /* @__PURE__ */ r("div", { className: B("footer", a), ref: s, ...e, children: o })
30
+ );
31
+ h.displayName = "Card.Footer";
32
+ const l = c(i), g = d(
33
+ ({ children: o, className: a, disabled: e, onClose: s, ...t }, n) => /* @__PURE__ */ _("div", { className: l("header", a), ref: n, ...t, children: [
34
+ o,
35
+ s ? /* @__PURE__ */ r(
36
+ N,
37
+ {
38
+ accessibleWhenDisabled: !1,
39
+ "aria-label": "Close",
40
+ className: l("close"),
41
+ disabled: e,
42
+ onClick: () => s(),
43
+ size: "sm",
44
+ variant: "tertiary",
45
+ children: /* @__PURE__ */ r(C, { name: "times" })
46
+ }
47
+ ) : null
48
+ ] })
49
+ );
50
+ g.displayName = "Card.Header";
51
+ const w = c(i), p = b(
52
+ ({ as: o = "div", className: a, disabled: e, size: s = "md", ...t }, n) => /* @__PURE__ */ r(
53
+ o,
54
+ {
55
+ "aria-disabled": e,
56
+ ...t,
57
+ className: w("root", `size-${s}`, a),
58
+ ref: n
59
+ }
60
+ )
61
+ );
62
+ p.displayName = "Card";
63
+ const D = Object.assign(p, {
64
+ Body: f,
65
+ Cover: y,
66
+ Footer: h,
67
+ Header: g
16
68
  });
17
69
  export {
18
- u as Card,
19
- _ as CardComponent
70
+ D as Card,
71
+ p as CardComponent
20
72
  };
package/dist/Checkbox.js CHANGED
@@ -1,55 +1,55 @@
1
1
  "use client";
2
2
  import './Checkbox.css';
3
- import { jsxs as g, jsx as s } from "react/jsx-runtime";
4
- import { C as x } from "./KPUWHTQJ-Byij2al4.js";
5
- import { forwardRef as C, useState as m } from "react";
6
- import { useField as V } from "./Field.js";
7
- import { VisuallyHidden as w } from "./VisuallyHidden.js";
8
- import { c as F } from "./index-PAaZGbyz.js";
9
- import { Icon as u } from "./Icon.js";
10
- const I = "_root_luk8p_2", j = "_indeterminate_luk8p_67", y = {
11
- root: I,
3
+ import { jsxs as b, jsx as s } from "react/jsx-runtime";
4
+ import { a as x } from "./KPUWHTQJ-Dv3cAqjP.js";
5
+ import { forwardRef as C, useState as l } from "react";
6
+ import { useField as g } from "./Field.js";
7
+ import { VisuallyHidden as V } from "./VisuallyHidden.js";
8
+ import { c as w } from "./index-PAaZGbyz.js";
9
+ import { Icon as d } from "./Icon.js";
10
+ const y = "_root_luk8p_2", F = "_indeterminate_luk8p_67", I = {
11
+ root: y,
12
12
  "variant-danger": "_variant-danger_luk8p_49",
13
13
  "variant-warning": "_variant-warning_luk8p_55",
14
14
  "variant-success": "_variant-success_luk8p_61",
15
- indeterminate: j
16
- }, z = F(y), q = C(
17
- ({ checked: f = !1, className: _, indeterminate: a = !1, onChange: i, variant: k, ...t }, p) => {
18
- const [e, n] = m(f), [h, o] = m(!1), { getInputProps: r, variant: v } = V(), c = v || k, { disabled: l } = r(t), b = (d) => {
19
- n(d.target.checked), i && i(d);
15
+ indeterminate: F
16
+ }, N = w(I), j = C(
17
+ ({ checked: m = !1, className: u, indeterminate: a = !1, onChange: i, variant: f, ...o }, p) => {
18
+ const [e, _] = l(m), [k, t] = l(!1), { getInputProps: n, variant: v } = g(), r = v || f, { disabled: c } = n(o), h = () => {
19
+ _(!e), i && i(!e);
20
20
  };
21
- return /* @__PURE__ */ g(
21
+ return /* @__PURE__ */ b(
22
22
  "div",
23
23
  {
24
24
  "aria-checked": e,
25
- "aria-disabled": l,
26
- className: z(
25
+ "aria-disabled": c,
26
+ className: N(
27
27
  "root",
28
- c && `variant-${c}`,
28
+ r && `variant-${r}`,
29
29
  a && "indeterminate",
30
- _
30
+ u
31
31
  ),
32
- "data-focus-visible": h || void 0,
33
- onClick: l ? void 0 : () => n(!e),
32
+ "data-focus-visible": k || void 0,
33
+ onClick: c ? void 0 : h,
34
34
  children: [
35
- /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(
35
+ /* @__PURE__ */ s(V, { children: /* @__PURE__ */ s(
36
36
  x,
37
37
  {
38
- ...r(t),
38
+ ...n(o),
39
39
  checked: e,
40
- onBlur: () => o(!1),
41
- onChange: b,
42
- onFocusVisible: () => o(!0),
40
+ onBlur: () => t(!1),
41
+ onFocusVisible: () => t(!0),
43
42
  ref: p
44
43
  }
45
44
  ) }),
46
- e ? /* @__PURE__ */ s(u, { name: "check", size: "sm" }) : null,
47
- !e && a ? /* @__PURE__ */ s(u, { name: "minus", size: "sm" }) : null
45
+ e ? /* @__PURE__ */ s(d, { name: "check", size: "sm" }) : null,
46
+ !e && a ? /* @__PURE__ */ s(d, { name: "minus", size: "sm" }) : null
48
47
  ]
49
48
  }
50
49
  );
51
50
  }
52
51
  );
52
+ j.displayName = "Checkbox";
53
53
  export {
54
- q as Checkbox
54
+ j as Checkbox
55
55
  };
@@ -4,12 +4,12 @@ import { jsx as e } from "react/jsx-runtime";
4
4
  import { forwardRef as a } from "react";
5
5
  import { Button as n } from "./Button.js";
6
6
  import { Icon as m } from "./Icon.js";
7
- import { c } from "./index-PAaZGbyz.js";
8
- const i = "_root_1r27z_2", l = "_fade_1r27z_1", f = {
9
- root: i,
7
+ import { c as i } from "./index-PAaZGbyz.js";
8
+ const c = "_root_1r27z_2", l = "_fade_1r27z_1", f = {
9
+ root: c,
10
10
  "animate-presence": "_animate-presence_1r27z_6",
11
11
  fade: l
12
- }, p = c(f), B = a(
12
+ }, p = i(f), _ = a(
13
13
  ({ animatePresence: o = !1, className: t, ...r }, s) => /* @__PURE__ */ e(
14
14
  n,
15
15
  {
@@ -23,6 +23,7 @@ const i = "_root_1r27z_2", l = "_fade_1r27z_1", f = {
23
23
  }
24
24
  )
25
25
  );
26
+ _.displayName = "CloseButton";
26
27
  export {
27
- B as CloseButton
28
+ _ as CloseButton
28
29
  };
@@ -5870,7 +5870,7 @@ var us = (
5870
5870
  function ps(a, n) {
5871
5871
  return a && n ? ee(a) !== ee(n) || P(a) !== P(n) : a !== n;
5872
5872
  }
5873
- var Rt = "Date input not valid.", ws = (
5873
+ var Rt = "Date input not valid.", ys = (
5874
5874
  /** @class */
5875
5875
  function(a) {
5876
5876
  Z(n, a);
@@ -6312,13 +6312,14 @@ var Rt = "Date input not valid.", ws = (
6312
6312
  }, n;
6313
6313
  }(z)
6314
6314
  ), fs = "input", It = "navigate";
6315
- const ys = ({ children: a }) => {
6315
+ const hs = ({ children: a }) => {
6316
6316
  if (!a)
6317
6317
  return null;
6318
6318
  const { children: n, className: t, modifiers: e, placement: r, ...o } = a.props;
6319
6319
  return /* @__PURE__ */ je("div", { style: o, children: a });
6320
6320
  };
6321
+ hs.displayName = "DateTimePicker.CustomPopper";
6321
6322
  export {
6322
- ys as C,
6323
- ws as D
6323
+ hs as C,
6324
+ ys as D
6324
6325
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { a as c } from "./T22PY7TE-CzEDuEn1.js";
3
- import { u as d } from "./XCKGTAUF-CahZE721.js";
4
- import { f as p, c as f, b as D, _ as x, u as g, d as k, a as v } from "./OE2EFRVA-DkdhQLJL.js";
2
+ import { a as c } from "./T22PY7TE-gLuJpoOm.js";
3
+ import { u as d } from "./XCKGTAUF-CJwwVibW.js";
4
+ import { f as p, c as f, b as D, _ as x, u as g, d as k, a as v } from "./OE2EFRVA-Dg1R6gaC.js";
5
5
  import { useMemo as h } from "react";
6
6
  import { jsxs as _, jsx as a } from "react/jsx-runtime";
7
7
  var b = "button", y = f(
@@ -1,139 +1,141 @@
1
1
  "use client";
2
2
  import './DatePicker.css';
3
- import { jsxs as q, jsx as o } from "react/jsx-runtime";
4
- import { useState as $, useMemo as F, useEffect as j, forwardRef as G, useRef as J } from "react";
5
- import { D as P, C as Q } from "./CustomPopper-vwbOQq72.js";
6
- import { Button as M } from "./Button.js";
7
- import { Icon as w } from "./Icon.js";
8
- import { Select as K } from "./Select.js";
9
- import { c as v } from "./index-PAaZGbyz.js";
10
- import { g as V, a as W, s as B, b as X, D as k } from "./utils-BD597oo6.js";
11
- import { InputText as Z } from "./InputText.js";
12
- const Y = v(B), g = ({
3
+ import { jsxs as q, jsx as l } from "react/jsx-runtime";
4
+ import { useState as $, useMemo as k, useEffect as j, forwardRef as G, useRef as J } from "react";
5
+ import { D as Q, C as V } from "./CustomPopper-C1wIDHbM.js";
6
+ import { Button as F } from "./Button.js";
7
+ import { Icon as M } from "./Icon.js";
8
+ import { Select as w } from "./Select.js";
9
+ import { c as P } from "./index-PAaZGbyz.js";
10
+ import { g as W, a as X, s as v, b as Z, D as K } from "./utils-BD597oo6.js";
11
+ import { InputText as Y } from "./InputText.js";
12
+ const g = P(v), B = ({
13
13
  changeMonth: x,
14
- changeYear: z,
14
+ changeYear: N,
15
15
  date: f,
16
- decreaseMonth: I,
17
- decreaseYear: N,
18
- endYear: m,
19
- increaseMonth: R,
16
+ decreaseMonth: T,
17
+ decreaseYear: z,
18
+ endYear: c,
19
+ increaseMonth: I,
20
20
  increaseYear: y,
21
21
  isMonthYearPicker: t,
22
22
  locale: D,
23
- startYear: u
23
+ startYear: a
24
24
  }) => {
25
- const [a, T] = $(null), [i, E] = $(null), l = F(() => V(D), [D]), r = F(() => W(u, m), [u, m]), c = (t || a === l[0].label) && i === u, A = (t || a === l[l.length - 1].label) && i === m;
25
+ const [u, R] = $(null), [i, E] = $(null), o = k(() => W(D), [D]), r = k(() => X(a, c), [a, c]), m = (t || u === o[0].label) && i === a, H = (t || u === o[o.length - 1].label) && i === c;
26
26
  return j(() => {
27
- const b = new Date(f), n = l[b.getMonth()].label, H = b.getFullYear();
28
- T(n), E(H);
29
- }, [f, l]), /* @__PURE__ */ q("div", { className: Y("custom-header"), children: [
30
- /* @__PURE__ */ o(
31
- M,
27
+ const b = new Date(f), d = o[b.getMonth()].label, A = b.getFullYear();
28
+ R(d), E(A);
29
+ }, [f, o]), /* @__PURE__ */ q("div", { className: g("custom-header"), children: [
30
+ /* @__PURE__ */ l(
31
+ F,
32
32
  {
33
- disabled: c,
34
- onClick: t ? N : I,
33
+ disabled: m,
34
+ onClick: t ? z : T,
35
35
  size: "sm",
36
36
  title: `Previous ${t ? "year" : "month"}`,
37
37
  variant: "tertiary",
38
- children: /* @__PURE__ */ o(w, { name: "angle-left-b", size: "xs" })
38
+ children: /* @__PURE__ */ l(M, { name: "angle-left-b", size: "xs" })
39
39
  }
40
40
  ),
41
- !t && /* @__PURE__ */ o(
42
- K,
41
+ !t && /* @__PURE__ */ l(
42
+ w,
43
43
  {
44
44
  id: "month",
45
45
  name: "month",
46
46
  onChange: x,
47
- options: l,
47
+ options: o,
48
48
  size: "md",
49
- value: a
49
+ value: u
50
50
  }
51
51
  ),
52
- /* @__PURE__ */ o(K, { id: "year", name: "year", onChange: z, options: r, size: "md", value: i }),
53
- /* @__PURE__ */ o(
54
- M,
52
+ /* @__PURE__ */ l(w, { id: "year", name: "year", onChange: N, options: r, size: "md", value: i }),
53
+ /* @__PURE__ */ l(
54
+ F,
55
55
  {
56
- disabled: A,
57
- onClick: t ? y : R,
56
+ disabled: H,
57
+ onClick: t ? y : I,
58
58
  size: "sm",
59
59
  title: `Next ${t ? "year" : "month"}`,
60
60
  variant: "tertiary",
61
- children: /* @__PURE__ */ o(w, { name: "angle-right-b", size: "xs" })
61
+ children: /* @__PURE__ */ l(M, { name: "angle-right-b", size: "xs" })
62
62
  }
63
63
  )
64
64
  ] });
65
- }, h = v(B), mt = G(
65
+ };
66
+ B.displayName = "DateTimePicker.CustomHeader";
67
+ const h = P(v), C = G(
66
68
  ({
67
69
  autoFocus: x,
68
- className: z,
70
+ className: N,
69
71
  dateFormat: f = "dd/MM/yyyy",
70
- disabled: I,
71
- endYear: N = k.getFullYear(),
72
- icon: m,
73
- iconPlacement: R = "left",
72
+ disabled: T,
73
+ endYear: z = K.getFullYear(),
74
+ icon: c,
75
+ iconPlacement: I = "left",
74
76
  locale: y,
75
77
  onChange: t,
76
78
  placeholder: D,
77
- preventVirtualKeyboard: u = !1,
78
- showMonthYearPicker: a,
79
- size: T = "md",
79
+ preventVirtualKeyboard: a = !1,
80
+ showMonthYearPicker: u,
81
+ size: R = "md",
80
82
  startYear: i = 1900,
81
83
  transparent: E,
82
- useWeekdaysShort: l = !0,
83
- value: r = k,
84
- ...c
85
- }, A) => {
86
- const b = c == null ? void 0 : c.timeIntervals, n = (e) => X(e, b), [H, d] = $(n(r)), L = J(), S = A || L;
84
+ useWeekdaysShort: o = !0,
85
+ value: r = K,
86
+ ...m
87
+ }, H) => {
88
+ const b = m == null ? void 0 : m.timeIntervals, d = (e) => Z(e, b), [A, n] = $(d(r)), L = J(), S = H || L;
87
89
  j(() => {
88
- t == null || t(n(r));
90
+ t == null || t(d(r));
89
91
  }, []), j(() => {
90
92
  var p;
91
- const e = n(r), s = typeof r == "object" ? r == null ? void 0 : r.toISOString() : r;
92
- ((p = new Date(Date.parse(s))) == null ? void 0 : p.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && (t == null || t(e)), d(e);
93
+ const e = d(r), s = typeof r == "object" ? r == null ? void 0 : r.toISOString() : r;
94
+ ((p = new Date(Date.parse(s))) == null ? void 0 : p.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && (t == null || t(e)), n(e);
93
95
  }, [r]);
94
96
  const O = (e) => {
95
97
  var s;
96
98
  ["Enter", "Escape"].includes(e.key) && ((s = S.current) == null || s.blur());
97
99
  }, U = (e) => {
98
100
  var s;
99
- e.preventDefault(), (s = S.current) == null || s.blur(), d(null), t == null || t(null);
101
+ e.preventDefault(), (s = S.current) == null || s.blur(), n(null), t == null || t(null);
100
102
  }, _ = (e) => {
101
103
  if (!e) {
102
- d(null), t == null || t(null);
104
+ n(null), t == null || t(null);
103
105
  return;
104
106
  }
105
107
  const s = Array.isArray(e) ? e[0] : e;
106
108
  if (!s) {
107
- d(null), t == null || t(null);
109
+ n(null), t == null || t(null);
108
110
  return;
109
111
  }
110
- const p = n(s);
111
- s.setHours(p.getHours(), p.getMinutes()), d(s), t == null || t(new Date(s));
112
+ const p = d(s);
113
+ s.setHours(p.getHours(), p.getMinutes()), n(s), t == null || t(new Date(s));
112
114
  };
113
115
  return (
114
116
  // type issue in react-datepicker (https://github.com/Hacker0x01/react-datepicker/issues/5391)
115
117
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
116
118
  // @ts-expect-error
117
- /* @__PURE__ */ o(
118
- P,
119
+ /* @__PURE__ */ l(
120
+ Q,
119
121
  {
120
122
  autoComplete: "off",
121
123
  calendarClassName: "date-picker-popper",
122
- customInput: /* @__PURE__ */ o(
123
- Z,
124
+ customInput: /* @__PURE__ */ l(
125
+ Y,
124
126
  {
125
127
  autoFocus: x,
126
- className: h("date-picker", z),
127
- "data-testid": c["data-testid"],
128
- disabled: I,
129
- icon: m,
130
- iconPlacement: R,
131
- inputMode: u ? "none" : "text",
128
+ className: h("date-picker", N),
129
+ "data-testid": m["data-testid"],
130
+ disabled: T,
131
+ icon: c,
132
+ iconPlacement: I,
133
+ inputMode: a ? "none" : "text",
132
134
  isClearable: !0,
133
135
  onReset: U,
134
136
  placeholder: D,
135
137
  ref: S,
136
- size: T,
138
+ size: R,
137
139
  transparent: E
138
140
  }
139
141
  ),
@@ -141,26 +143,27 @@ const Y = v(B), g = ({
141
143
  locale: y,
142
144
  onChange: _,
143
145
  onKeyDown: O,
144
- popperContainer: Q,
145
- renderCustomHeader: (e) => /* @__PURE__ */ o(
146
- g,
146
+ popperContainer: V,
147
+ renderCustomHeader: (e) => /* @__PURE__ */ l(
148
+ B,
147
149
  {
148
- endYear: N,
149
- isMonthYearPicker: a,
150
+ endYear: z,
151
+ isMonthYearPicker: u,
150
152
  locale: y,
151
153
  startYear: i,
152
154
  ...e
153
155
  }
154
156
  ),
155
- selected: H,
156
- showMonthYearPicker: a,
157
- useWeekdaysShort: l,
158
- ...c
157
+ selected: A,
158
+ showMonthYearPicker: u,
159
+ useWeekdaysShort: o,
160
+ ...m
159
161
  }
160
162
  )
161
163
  );
162
164
  }
163
165
  );
166
+ C.displayName = "DatePicker";
164
167
  export {
165
- mt as DatePicker
168
+ C as DatePicker
166
169
  };
@@ -1,52 +1,53 @@
1
1
  "use client";
2
2
  import { jsx as A } from "react/jsx-runtime";
3
- import { forwardRef as E, useState as x, useRef as P, useEffect as o, Children as H, cloneElement as I } from "react";
4
- import { b as N, D as b, s as j } from "./utils-BD597oo6.js";
3
+ import { forwardRef as E, useState as P, useRef as x, useEffect as a, Children as N, cloneElement as H } from "react";
4
+ import { b as I, D as b, s as j } from "./utils-BD597oo6.js";
5
5
  import { c as F } from "./index-PAaZGbyz.js";
6
- const L = F(j), q = E(
6
+ const L = F(j), M = E(
7
7
  ({
8
- children: a,
8
+ children: o,
9
9
  disabled: d,
10
10
  locale: p,
11
11
  onChange: s,
12
12
  size: D = "md",
13
- transparent: n,
13
+ transparent: k,
14
14
  value: r = b,
15
15
  ...l
16
- }, k) => {
17
- const u = l == null ? void 0 : l.timeIntervals, c = (t) => N(t, u), [R, i] = x(c(r)), T = P(), y = k || T, m = (t) => {
16
+ }, n) => {
17
+ const u = l == null ? void 0 : l.timeIntervals, i = (t) => I(t, u), [T, c] = P(i(r)), y = x(), R = n || y, m = (t) => {
18
18
  if (!t) {
19
- i(null), s == null || s(null);
19
+ c(null), s == null || s(null);
20
20
  return;
21
21
  }
22
22
  const e = Array.isArray(t) ? t[0] : t;
23
23
  if (!e) {
24
- i(null), s == null || s(null);
24
+ c(null), s == null || s(null);
25
25
  return;
26
26
  }
27
- const f = c(e);
28
- e.setHours(f.getHours(), f.getMinutes()), i(e), s == null || s(new Date(e));
27
+ const f = i(e);
28
+ e.setHours(f.getHours(), f.getMinutes()), c(e), s == null || s(new Date(e));
29
29
  };
30
- return o(() => {
31
- m(c(r));
32
- }, []), o(() => {
30
+ return a(() => {
31
+ m(i(r));
32
+ }, []), a(() => {
33
33
  var e;
34
- const t = c(r);
35
- ((e = new Date(r)) == null ? void 0 : e.getTime()) - (t == null ? void 0 : t.getTime()) !== 0 && m(t), i(t);
36
- }, [r]), /* @__PURE__ */ A("div", { className: L("date-time-picker"), children: H.map(a, (t, e) => I(t, {
34
+ const t = i(r);
35
+ ((e = new Date(r)) == null ? void 0 : e.getTime()) - (t == null ? void 0 : t.getTime()) !== 0 && m(t), c(t);
36
+ }, [r]), /* @__PURE__ */ A("div", { className: L("date-time-picker"), children: N.map(o, (t, e) => H(t, {
37
37
  disabled: d,
38
- inputRef: e === 0 ? y : null,
38
+ inputRef: e === 0 ? R : null,
39
39
  // give ref only to the DatePicker
40
40
  key: e,
41
41
  locale: p,
42
42
  onChange: m,
43
43
  size: D,
44
44
  timeIntervals: u,
45
- transparent: n,
46
- value: R
45
+ transparent: k,
46
+ value: T
47
47
  })) });
48
48
  }
49
49
  );
50
+ M.displayName = "DateTimePicker";
50
51
  export {
51
- q as DateTimePicker
52
+ M as DateTimePicker
52
53
  };