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.
- package/dist/2W3RN7C5-DMC82gDP.js +61 -0
- package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
- package/dist/Accordion.js +11 -10
- package/dist/Alert.js +39 -31
- package/dist/Avatar.js +12 -11
- package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
- package/dist/Breadcrumb.js +75 -71
- package/dist/Button.css +1 -1
- package/dist/Button.js +42 -41
- package/dist/ButtonGroup.js +5 -4
- package/dist/Card.css +1 -1
- package/dist/Card.js +67 -15
- package/dist/Checkbox.js +29 -29
- package/dist/CloseButton.js +6 -5
- package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
- package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
- package/dist/DatePicker.js +81 -78
- package/dist/DateTimePicker.js +22 -21
- package/dist/Drawer.js +100 -80
- package/dist/DropdownMenu.css +1 -1
- package/dist/DropdownMenu.js +898 -462
- package/dist/FieldGroup.js +8 -7
- package/dist/FileDrop.js +183 -176
- package/dist/FileUpload.js +42 -40
- package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
- package/dist/Hint.js +8 -7
- package/dist/Icon.js +20 -15
- package/dist/InputText.css +1 -1
- package/dist/InputText.js +63 -62
- package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
- package/dist/Label.js +8 -7
- package/dist/Link.css +1 -1
- package/dist/Link.js +51 -48
- package/dist/Loader.js +11 -10
- package/dist/Logo.js +20 -13
- package/dist/Modal.js +144 -114
- package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
- package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
- package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
- package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
- package/dist/Pagination.js +38 -37
- package/dist/PasswordInput.js +20 -17
- package/dist/Popover.js +88 -72
- package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
- package/dist/Radio.js +19 -19
- package/dist/RadioGroup.js +28 -27
- package/dist/RadioTab.js +1 -1
- package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
- package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
- package/dist/Search.css +1 -1
- package/dist/Search.js +107 -101
- package/dist/Select.css +1 -1
- package/dist/Select.js +203 -202
- package/dist/Slider.js +65 -61
- package/dist/Stepper.js +33 -27
- package/dist/StickyNote.js +29 -23
- package/dist/Swiper.js +51 -50
- package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
- package/dist/Table.js +33 -21
- package/dist/Tabs.js +160 -152
- package/dist/Tag.css +1 -1
- package/dist/Tag.js +69 -65
- package/dist/Text.js +3 -2
- package/dist/Textarea.css +1 -1
- package/dist/Textarea.js +25 -18
- package/dist/TimePicker.js +22 -21
- package/dist/Toast.js +226 -201
- package/dist/Toggle.js +15 -14
- package/dist/Tooltip.js +28 -27
- package/dist/VariantIcon.js +6 -5
- package/dist/VisuallyHidden.js +7 -6
- package/dist/WelcomeLoader.js +3 -2
- package/dist/XCKGTAUF-CJwwVibW.js +25 -0
- package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
- package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
- package/dist/types/components/Alert/components/Title.d.ts +4 -1
- package/dist/types/components/Alert/index.d.ts +4 -1
- package/dist/types/components/Card/Body.d.ts +2 -3
- package/dist/types/components/Card/Footer.d.ts +6 -0
- package/dist/types/components/Card/Header.d.ts +5 -0
- package/dist/types/components/Card/index.d.ts +7 -8
- package/dist/types/components/Card/types.d.ts +16 -3
- package/dist/types/components/Checkbox/index.d.ts +1 -2
- package/dist/types/components/Checkbox/types.d.ts +3 -1
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
- package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
- package/dist/types/components/Drawer/components/Close.d.ts +4 -1
- package/dist/types/components/Drawer/components/Title.d.ts +4 -1
- package/dist/types/components/Drawer/index.d.ts +12 -3
- package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
- package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
- package/dist/types/components/DropdownMenu/index.d.ts +11 -0
- package/dist/types/components/DropdownMenu/types.d.ts +26 -5
- package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
- package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
- package/dist/types/components/Icon/icons.d.ts +4 -3
- package/dist/types/components/Loader/index.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
- package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
- package/dist/types/components/Modal/Assets/index.d.ts +16 -4
- package/dist/types/components/Modal/components/Close.d.ts +4 -1
- package/dist/types/components/Modal/index.d.ts +16 -4
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
- package/dist/types/components/Popover/Arrow.d.ts +4 -1
- package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
- package/dist/types/components/RadioGroup/index.d.ts +4 -1
- package/dist/types/components/Stepper/index.d.ts +8 -2
- package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
- package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
- package/dist/types/components/StickyNote/index.d.ts +8 -2
- package/dist/types/components/Swiper/index.d.ts +4 -1
- package/dist/types/components/Table/index.d.ts +20 -5
- package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
- package/dist/types/components/Tag/types.d.ts +4 -2
- package/dist/types/components/Textarea/types.d.ts +1 -0
- package/dist/types/components/Toast/index.d.ts +4 -1
- package/package.json +1 -1
- package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
- package/dist/SQZLCNLX-CUlXoT69.js +0 -82
- 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
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { c
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
|
4
|
-
import {
|
|
5
|
-
import { forwardRef as C, useState as
|
|
6
|
-
import { useField as
|
|
7
|
-
import { VisuallyHidden as
|
|
8
|
-
import { c as
|
|
9
|
-
import { Icon as
|
|
10
|
-
const
|
|
11
|
-
root:
|
|
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:
|
|
16
|
-
},
|
|
17
|
-
({ checked:
|
|
18
|
-
const [e,
|
|
19
|
-
|
|
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__ */
|
|
21
|
+
return /* @__PURE__ */ b(
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
24
24
|
"aria-checked": e,
|
|
25
|
-
"aria-disabled":
|
|
26
|
-
className:
|
|
25
|
+
"aria-disabled": c,
|
|
26
|
+
className: N(
|
|
27
27
|
"root",
|
|
28
|
-
|
|
28
|
+
r && `variant-${r}`,
|
|
29
29
|
a && "indeterminate",
|
|
30
|
-
|
|
30
|
+
u
|
|
31
31
|
),
|
|
32
|
-
"data-focus-visible":
|
|
33
|
-
onClick:
|
|
32
|
+
"data-focus-visible": k || void 0,
|
|
33
|
+
onClick: c ? void 0 : h,
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */ s(
|
|
35
|
+
/* @__PURE__ */ s(V, { children: /* @__PURE__ */ s(
|
|
36
36
|
x,
|
|
37
37
|
{
|
|
38
|
-
...
|
|
38
|
+
...n(o),
|
|
39
39
|
checked: e,
|
|
40
|
-
onBlur: () =>
|
|
41
|
-
|
|
42
|
-
onFocusVisible: () => o(!0),
|
|
40
|
+
onBlur: () => t(!1),
|
|
41
|
+
onFocusVisible: () => t(!0),
|
|
43
42
|
ref: p
|
|
44
43
|
}
|
|
45
44
|
) }),
|
|
46
|
-
e ? /* @__PURE__ */ s(
|
|
47
|
-
!e && a ? /* @__PURE__ */ s(
|
|
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
|
-
|
|
54
|
+
j as Checkbox
|
|
55
55
|
};
|
package/dist/CloseButton.js
CHANGED
|
@@ -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
|
|
9
|
-
root:
|
|
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 =
|
|
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
|
-
|
|
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.",
|
|
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
|
|
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
|
-
|
|
6323
|
-
|
|
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-
|
|
3
|
-
import { u as d } from "./XCKGTAUF-
|
|
4
|
-
import { f as p, c as f, b as D, _ as x, u as g, d as k, a as v } from "./OE2EFRVA-
|
|
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(
|
package/dist/DatePicker.js
CHANGED
|
@@ -1,139 +1,141 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './DatePicker.css';
|
|
3
|
-
import { jsxs as q, jsx as
|
|
4
|
-
import { useState as $, useMemo as
|
|
5
|
-
import { D as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { Select as
|
|
9
|
-
import { c as
|
|
10
|
-
import { g as
|
|
11
|
-
import { InputText as
|
|
12
|
-
const
|
|
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:
|
|
14
|
+
changeYear: N,
|
|
15
15
|
date: f,
|
|
16
|
-
decreaseMonth:
|
|
17
|
-
decreaseYear:
|
|
18
|
-
endYear:
|
|
19
|
-
increaseMonth:
|
|
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:
|
|
23
|
+
startYear: a
|
|
24
24
|
}) => {
|
|
25
|
-
const [
|
|
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),
|
|
28
|
-
|
|
29
|
-
}, [f,
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
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:
|
|
34
|
-
onClick: t ?
|
|
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__ */
|
|
38
|
+
children: /* @__PURE__ */ l(M, { name: "angle-left-b", size: "xs" })
|
|
39
39
|
}
|
|
40
40
|
),
|
|
41
|
-
!t && /* @__PURE__ */
|
|
42
|
-
|
|
41
|
+
!t && /* @__PURE__ */ l(
|
|
42
|
+
w,
|
|
43
43
|
{
|
|
44
44
|
id: "month",
|
|
45
45
|
name: "month",
|
|
46
46
|
onChange: x,
|
|
47
|
-
options:
|
|
47
|
+
options: o,
|
|
48
48
|
size: "md",
|
|
49
|
-
value:
|
|
49
|
+
value: u
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
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:
|
|
57
|
-
onClick: t ? y :
|
|
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__ */
|
|
61
|
+
children: /* @__PURE__ */ l(M, { name: "angle-right-b", size: "xs" })
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
] });
|
|
65
|
-
}
|
|
65
|
+
};
|
|
66
|
+
B.displayName = "DateTimePicker.CustomHeader";
|
|
67
|
+
const h = P(v), C = G(
|
|
66
68
|
({
|
|
67
69
|
autoFocus: x,
|
|
68
|
-
className:
|
|
70
|
+
className: N,
|
|
69
71
|
dateFormat: f = "dd/MM/yyyy",
|
|
70
|
-
disabled:
|
|
71
|
-
endYear:
|
|
72
|
-
icon:
|
|
73
|
-
iconPlacement:
|
|
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:
|
|
78
|
-
showMonthYearPicker:
|
|
79
|
-
size:
|
|
79
|
+
preventVirtualKeyboard: a = !1,
|
|
80
|
+
showMonthYearPicker: u,
|
|
81
|
+
size: R = "md",
|
|
80
82
|
startYear: i = 1900,
|
|
81
83
|
transparent: E,
|
|
82
|
-
useWeekdaysShort:
|
|
83
|
-
value: r =
|
|
84
|
-
...
|
|
85
|
-
},
|
|
86
|
-
const b =
|
|
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(
|
|
90
|
+
t == null || t(d(r));
|
|
89
91
|
}, []), j(() => {
|
|
90
92
|
var p;
|
|
91
|
-
const e =
|
|
92
|
-
((p = new Date(Date.parse(s))) == null ? void 0 : p.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && (t == null || t(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(),
|
|
101
|
+
e.preventDefault(), (s = S.current) == null || s.blur(), n(null), t == null || t(null);
|
|
100
102
|
}, _ = (e) => {
|
|
101
103
|
if (!e) {
|
|
102
|
-
|
|
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
|
-
|
|
109
|
+
n(null), t == null || t(null);
|
|
108
110
|
return;
|
|
109
111
|
}
|
|
110
|
-
const p =
|
|
111
|
-
s.setHours(p.getHours(), p.getMinutes()),
|
|
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__ */
|
|
118
|
-
|
|
119
|
+
/* @__PURE__ */ l(
|
|
120
|
+
Q,
|
|
119
121
|
{
|
|
120
122
|
autoComplete: "off",
|
|
121
123
|
calendarClassName: "date-picker-popper",
|
|
122
|
-
customInput: /* @__PURE__ */
|
|
123
|
-
|
|
124
|
+
customInput: /* @__PURE__ */ l(
|
|
125
|
+
Y,
|
|
124
126
|
{
|
|
125
127
|
autoFocus: x,
|
|
126
|
-
className: h("date-picker",
|
|
127
|
-
"data-testid":
|
|
128
|
-
disabled:
|
|
129
|
-
icon:
|
|
130
|
-
iconPlacement:
|
|
131
|
-
inputMode:
|
|
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:
|
|
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:
|
|
145
|
-
renderCustomHeader: (e) => /* @__PURE__ */
|
|
146
|
-
|
|
146
|
+
popperContainer: V,
|
|
147
|
+
renderCustomHeader: (e) => /* @__PURE__ */ l(
|
|
148
|
+
B,
|
|
147
149
|
{
|
|
148
|
-
endYear:
|
|
149
|
-
isMonthYearPicker:
|
|
150
|
+
endYear: z,
|
|
151
|
+
isMonthYearPicker: u,
|
|
150
152
|
locale: y,
|
|
151
153
|
startYear: i,
|
|
152
154
|
...e
|
|
153
155
|
}
|
|
154
156
|
),
|
|
155
|
-
selected:
|
|
156
|
-
showMonthYearPicker:
|
|
157
|
-
useWeekdaysShort:
|
|
158
|
-
...
|
|
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
|
-
|
|
168
|
+
C as DatePicker
|
|
166
169
|
};
|
package/dist/DateTimePicker.js
CHANGED
|
@@ -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
|
|
4
|
-
import { b as
|
|
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),
|
|
6
|
+
const L = F(j), M = E(
|
|
7
7
|
({
|
|
8
|
-
children:
|
|
8
|
+
children: o,
|
|
9
9
|
disabled: d,
|
|
10
10
|
locale: p,
|
|
11
11
|
onChange: s,
|
|
12
12
|
size: D = "md",
|
|
13
|
-
transparent:
|
|
13
|
+
transparent: k,
|
|
14
14
|
value: r = b,
|
|
15
15
|
...l
|
|
16
|
-
},
|
|
17
|
-
const u = l == null ? void 0 : l.timeIntervals,
|
|
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
|
-
|
|
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
|
-
|
|
24
|
+
c(null), s == null || s(null);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
const f =
|
|
28
|
-
e.setHours(f.getHours(), f.getMinutes()),
|
|
27
|
+
const f = i(e);
|
|
28
|
+
e.setHours(f.getHours(), f.getMinutes()), c(e), s == null || s(new Date(e));
|
|
29
29
|
};
|
|
30
|
-
return
|
|
31
|
-
m(
|
|
32
|
-
}, []),
|
|
30
|
+
return a(() => {
|
|
31
|
+
m(i(r));
|
|
32
|
+
}, []), a(() => {
|
|
33
33
|
var e;
|
|
34
|
-
const t =
|
|
35
|
-
((e = new Date(r)) == null ? void 0 : e.getTime()) - (t == null ? void 0 : t.getTime()) !== 0 && m(t),
|
|
36
|
-
}, [r]), /* @__PURE__ */ A("div", { className: L("date-time-picker"), children:
|
|
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 ?
|
|
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:
|
|
46
|
-
value:
|
|
45
|
+
transparent: k,
|
|
46
|
+
value: T
|
|
47
47
|
})) });
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
|
+
M.displayName = "DateTimePicker";
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
M as DateTimePicker
|
|
52
53
|
};
|