welcome-ui 8.1.0 → 8.2.0-alpha.0
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/Alert.mjs +28 -28
- package/dist/Avatar.mjs +47 -44
- package/dist/Breadcrumb.mjs +169 -167
- package/dist/ButtonGroup.mjs +14 -14
- package/dist/Checkbox.mjs +1 -1
- package/dist/{CustomPopper-B2Cqfph4.mjs → CustomPopper-DezjKb9n.mjs} +12 -17
- package/dist/DatePicker.mjs +74 -74
- package/dist/DateTimePicker.mjs +60 -59
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +51 -55
- package/dist/DropdownMenu.mjs +183 -183
- package/dist/Field.mjs +9 -10
- package/dist/FileDrop.mjs +455 -465
- package/dist/FileUpload.mjs +74 -81
- package/dist/Files.mjs +15 -15
- package/dist/InputText.mjs +42 -42
- package/dist/Label.mjs +1 -1
- package/dist/Modal.mjs +115 -119
- package/dist/Pagination.mjs +31 -29
- package/dist/PasswordInput.mjs +9 -9
- package/dist/Picker.mjs +23 -23
- package/dist/Radio.mjs +35 -35
- package/dist/RadioTab.mjs +1 -1
- package/dist/Search.mjs +123 -127
- package/dist/Select.mjs +301 -318
- package/dist/Slider.mjs +228 -224
- package/dist/Stack.mjs +15 -12
- package/dist/Swiper.mjs +126 -127
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +19 -19
- package/dist/Text.mjs +35 -37
- package/dist/Textarea.mjs +1 -1
- package/dist/TimePicker.mjs +61 -61
- package/dist/Toast.mjs +3 -3
- package/dist/Toggle.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/VariantIcon.mjs +14 -5
- package/dist/WuiProvider.mjs +35 -38
- package/dist/{field-styles-BVlRlvuu.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{hex-to-rgba-DU_XzKIK.mjs → hex-to-rgba-BIDK-3ab.mjs} +2 -2
- package/dist/{index-5HBq1O6Z.mjs → index-62h-enZF.mjs} +31 -31
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/theme.mjs +23 -23
- package/dist/throttle-BDBzFeFj.mjs +13 -0
- package/dist/types/components/Accordion/styles.d.ts +2 -2
- package/dist/types/components/Accordion/theme.d.ts +1 -1
- package/dist/types/components/Alert/styles.d.ts +9 -9
- package/dist/types/components/Alert/theme.d.ts +3 -3
- package/dist/types/components/AspectRatio/styles.d.ts +2 -3
- package/dist/types/components/Avatar/index.d.ts +2 -1
- package/dist/types/components/Avatar/styles.d.ts +8 -8
- package/dist/types/components/Avatar/theme.d.ts +2 -2
- package/dist/types/components/Avatar/utils.d.ts +1 -1
- package/dist/types/components/Badge/styles.d.ts +4 -4
- package/dist/types/components/Badge/theme.d.ts +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +1 -1
- package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Button/styles.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +3 -3
- package/dist/types/components/ButtonGroup/index.d.ts +2 -2
- package/dist/types/components/Card/Cover.styles.d.ts +4 -4
- package/dist/types/components/Card/theme.d.ts +1 -1
- package/dist/types/components/Checkbox/styles.d.ts +1 -1
- package/dist/types/components/Checkbox/theme.d.ts +1 -1
- package/dist/types/components/ClearButton/index.d.ts +4 -4
- package/dist/types/components/ClearButton/styles.d.ts +4 -4
- package/dist/types/components/CloseButton/styles.d.ts +4 -4
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/utils.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +5 -5
- package/dist/types/components/Drawer/styles.d.ts +4 -4
- package/dist/types/components/Drawer/theme.d.ts +2 -2
- package/dist/types/components/DropdownMenu/index.d.ts +1 -1
- package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
- package/dist/types/components/Field/utils.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +4 -4
- package/dist/types/components/FileDrop/theme.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +2 -2
- package/dist/types/components/Files/index.d.ts +3 -3
- package/dist/types/components/Files/types.d.ts +1 -1
- package/dist/types/components/Hint/theme.d.ts +1 -1
- package/dist/types/components/Icon/theme.d.ts +2 -2
- package/dist/types/components/Icons/Sun/content.json.d.ts +1 -2
- package/dist/types/components/Label/theme.d.ts +1 -1
- package/dist/types/components/Link/index.d.ts +2 -2
- package/dist/types/components/Link/styles.d.ts +4 -4
- package/dist/types/components/Link/theme.d.ts +1 -1
- package/dist/types/components/Loader/styles.d.ts +4 -4
- package/dist/types/components/Loader/theme.d.ts +2 -2
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +4 -4
- package/dist/types/components/Modal/Assets/index.d.ts +8 -8
- package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
- package/dist/types/components/Modal/Close.d.ts +2 -2
- package/dist/types/components/Modal/Content.d.ts +5 -3
- package/dist/types/components/Modal/index.d.ts +10 -10
- package/dist/types/components/Modal/styles.d.ts +7 -7
- package/dist/types/components/Modal/theme.d.ts +1 -1
- package/dist/types/components/Pagination/theme.d.ts +1 -1
- package/dist/types/components/Picker/index.d.ts +1 -1
- package/dist/types/components/Picker/styles.d.ts +1 -1
- package/dist/types/components/Popover/styles.d.ts +4 -4
- package/dist/types/components/Popover/theme.d.ts +1 -1
- package/dist/types/components/Radio/index.d.ts +2 -2
- package/dist/types/components/Radio/styles.d.ts +5 -5
- package/dist/types/components/Radio/theme.d.ts +1 -1
- package/dist/types/components/RadioTab/index.d.ts +1 -1
- package/dist/types/components/RadioTab/styles.d.ts +10 -4
- package/dist/types/components/RadioTab/theme.d.ts +1 -1
- package/dist/types/components/Search/index.d.ts +1 -1
- package/dist/types/components/Select/index.d.ts +4 -4
- package/dist/types/components/Select/styles.d.ts +4 -4
- package/dist/types/components/Select/utils.d.ts +4 -8
- package/dist/types/components/Shape/styles.d.ts +3 -3
- package/dist/types/components/Slider/styles.d.ts +16 -16
- package/dist/types/components/Slider/theme.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +1 -1
- package/dist/types/components/Swiper/styles.d.ts +16 -16
- package/dist/types/components/Swiper/theme.d.ts +1 -1
- package/dist/types/components/System/index.d.ts +6 -6
- package/dist/types/components/Table/theme.d.ts +1 -1
- package/dist/types/components/Tabs/ActiveBar.d.ts +2 -2
- package/dist/types/components/Tabs/TabList.d.ts +2 -2
- package/dist/types/components/Tabs/styles.d.ts +2 -2
- package/dist/types/components/Tabs/theme.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Textarea/theme.d.ts +1 -1
- package/dist/types/components/Toast/ToastWrapper.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +1 -1
- package/dist/types/components/Toast/styles.d.ts +14 -14
- package/dist/types/components/Toast/theme.d.ts +1 -1
- package/dist/types/components/Toggle/index.d.ts +2 -2
- package/dist/types/components/Toggle/styles.d.ts +4 -5
- package/dist/types/components/Toggle/theme.d.ts +1 -1
- package/dist/types/components/Tooltip/index.d.ts +2 -2
- package/dist/types/components/Tooltip/styles.d.ts +1 -1
- package/dist/types/components/Tooltip/theme.d.ts +1 -1
- package/dist/types/components/VariantIcon/theme.d.ts +1 -1
- package/dist/types/components/WuiProvider/font.d.ts +5 -3
- package/dist/types/components/WuiProvider/index.d.ts +1 -1
- package/dist/types/theme/colors.d.ts +9 -1
- package/dist/types/theme/defaultFields.d.ts +5 -5
- package/dist/types/theme/index.d.ts +2 -2
- package/dist/types/theme/screens.d.ts +7 -7
- package/dist/types/theme/space.d.ts +9 -9
- package/dist/types/theme/typography.d.ts +1 -1
- package/dist/types/utils/field-styles.d.ts +6 -6
- package/dist/types/utils/use-create-portal.d.ts +1 -1
- package/dist/types/utils/use-viewport.d.ts +2 -2
- package/dist/{use-fork-ref-DvaCTfQ_.mjs → use-fork-ref-CUZErtAC.mjs} +3 -4
- package/dist/utils.mjs +29 -102
- package/dist/wrap-children-CzmhoRzd.mjs +13 -0
- package/package.json +2 -2
- package/dist/throttle-CW18pWlW.mjs +0 -13
- package/dist/wrap-children-DBSD-X5-.mjs +0 -9
|
@@ -10,7 +10,7 @@ import { StyledSelect as bo, Select as wa } from "./Select.mjs";
|
|
|
10
10
|
import { g as lr } from "./_commonjsHelpers-CXJ7dpIk.mjs";
|
|
11
11
|
import { ClearButton as _o } from "./ClearButton.mjs";
|
|
12
12
|
import { IconGroupWrapper as fn, IconWrapper as hn } from "./Field.mjs";
|
|
13
|
-
import { d as mn, F as ko } from "./field-styles-
|
|
13
|
+
import { d as mn, F as ko } from "./field-styles-CfVLcVQp.mjs";
|
|
14
14
|
import gt, { system as vn, css as yt, th as jt } from "@xstyled/styled-components";
|
|
15
15
|
import { _ as Do, a as C } from "./downshift.esm-B7Jil1wW.mjs";
|
|
16
16
|
import { r as gn, a as xo } from "./index-CBBbX29m.mjs";
|
|
@@ -6844,18 +6844,15 @@ const hl = /* @__PURE__ */ lr(fl), dn = [
|
|
|
6844
6844
|
{ label: "December", value: 11 }
|
|
6845
6845
|
], Al = /* @__PURE__ */ new Date(), Fl = (n, a = 15) => {
|
|
6846
6846
|
if (!n)
|
|
6847
|
-
return
|
|
6847
|
+
return null;
|
|
6848
6848
|
let r = new Date(n);
|
|
6849
6849
|
isNaN(r.getTime()) && (r = /* @__PURE__ */ new Date());
|
|
6850
6850
|
const t = Math.ceil(r.getMinutes() / a) * a;
|
|
6851
6851
|
return new Date(r.setMinutes(t, 0, 0));
|
|
6852
|
-
}, ml = (n) => n ? dn.map((a, r) => {
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
label: (t = n == null ? void 0 : n.localize) == null ? void 0 : t.month(r)
|
|
6857
|
-
};
|
|
6858
|
-
}) : dn, vl = (n, a) => hl(n, a + 1).map((r) => ({
|
|
6852
|
+
}, ml = (n) => n ? dn.map((a, r) => ({
|
|
6853
|
+
...a,
|
|
6854
|
+
label: n.localize.month(r)
|
|
6855
|
+
})) : dn, vl = (n, a) => hl(n, a + 1).map((r) => ({
|
|
6859
6856
|
label: r.toString(),
|
|
6860
6857
|
value: r
|
|
6861
6858
|
})).reverse(), gl = ({
|
|
@@ -6896,7 +6893,7 @@ const hl = /* @__PURE__ */ lr(fl), dn = [
|
|
|
6896
6893
|
onChange: n,
|
|
6897
6894
|
options: y,
|
|
6898
6895
|
size: "sm",
|
|
6899
|
-
value: d
|
|
6896
|
+
value: d
|
|
6900
6897
|
}
|
|
6901
6898
|
),
|
|
6902
6899
|
/* @__PURE__ */ fe.jsx(
|
|
@@ -6907,7 +6904,7 @@ const hl = /* @__PURE__ */ lr(fl), dn = [
|
|
|
6907
6904
|
onChange: a,
|
|
6908
6905
|
options: w,
|
|
6909
6906
|
size: "sm",
|
|
6910
|
-
value: m
|
|
6907
|
+
value: m
|
|
6911
6908
|
}
|
|
6912
6909
|
)
|
|
6913
6910
|
] }),
|
|
@@ -6927,13 +6924,13 @@ const hl = /* @__PURE__ */ lr(fl), dn = [
|
|
|
6927
6924
|
gl.displayName = "CustomHeader";
|
|
6928
6925
|
const yl = mo(
|
|
6929
6926
|
({ focused: n, handleBlur: a, handleFocus: r, icon: t, iconPlacement: e, onReset: o, size: i, value: s, ...c }, u) => {
|
|
6930
|
-
const l = ko[i
|
|
6927
|
+
const l = ko[i];
|
|
6931
6928
|
return /* @__PURE__ */ fe.jsxs(cl, { focused: n, onBlur: a, onFocus: r, children: [
|
|
6932
|
-
/* @__PURE__ */ fe.jsx("input", { value: s
|
|
6933
|
-
t && e !== "right" ? /* @__PURE__ */ fe.jsx(hn, { iconPlacement: e
|
|
6929
|
+
/* @__PURE__ */ fe.jsx("input", { value: s, ...c, ref: u }),
|
|
6930
|
+
t && e !== "right" ? /* @__PURE__ */ fe.jsx(hn, { iconPlacement: e, size: l, children: v.cloneElement(t, { ...t.props, size: l }) }) : null,
|
|
6934
6931
|
s ? /* @__PURE__ */ fe.jsxs(fn, { size: l, children: [
|
|
6935
6932
|
/* @__PURE__ */ fe.jsx(_o, { "aria-label": "clear date", onClick: o }),
|
|
6936
|
-
|
|
6933
|
+
e === "right" && v.cloneElement(t, { ...t.props, size: l })
|
|
6937
6934
|
] }) : null
|
|
6938
6935
|
] });
|
|
6939
6936
|
}
|
|
@@ -7905,7 +7902,6 @@ const wl = yt`
|
|
|
7905
7902
|
background-color: beige-20;
|
|
7906
7903
|
}
|
|
7907
7904
|
|
|
7908
|
-
/* stylelint-disable-next-line no-descending-specificity */
|
|
7909
7905
|
.react-datepicker__day,
|
|
7910
7906
|
.react-datepicker__day--keyboard-selected,
|
|
7911
7907
|
.react-datepicker__day--selected,
|
|
@@ -7917,7 +7913,6 @@ const wl = yt`
|
|
|
7917
7913
|
}
|
|
7918
7914
|
}
|
|
7919
7915
|
|
|
7920
|
-
/* stylelint-disable-next-line no-descending-specificity */
|
|
7921
7916
|
.react-datepicker__month-text,
|
|
7922
7917
|
.react-datepicker__month-text--selected,
|
|
7923
7918
|
.react-datepicker__month-text--keyboard-selected,
|
package/dist/DatePicker.mjs
CHANGED
|
@@ -1,113 +1,113 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
3
|
-
import { useState as k, useRef as
|
|
4
|
-
import { g as
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
const
|
|
2
|
+
import { j as d } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { useState as k, useRef as w, useEffect as E } from "react";
|
|
4
|
+
import { g as G, D as R, S as J, c as Q, C as V, b as W } from "./CustomPopper-DezjKb9n.mjs";
|
|
5
|
+
import { forwardRef as X } from "./System.mjs";
|
|
6
|
+
const Z = X(
|
|
7
7
|
({
|
|
8
8
|
autoFocus: I,
|
|
9
9
|
dataTestId: P,
|
|
10
10
|
dateFormat: S = "dd/MM/yyyy",
|
|
11
11
|
disabled: b,
|
|
12
|
-
endYear:
|
|
13
|
-
icon:
|
|
14
|
-
iconPlacement:
|
|
15
|
-
locale:
|
|
16
|
-
onBlur:
|
|
17
|
-
onChange:
|
|
18
|
-
onFocus:
|
|
19
|
-
placeholder:
|
|
20
|
-
popperProps:
|
|
21
|
-
preventVirtualKeyboard:
|
|
22
|
-
showMonthYearPicker:
|
|
12
|
+
endYear: F = R.getFullYear(),
|
|
13
|
+
icon: p,
|
|
14
|
+
iconPlacement: u = "left",
|
|
15
|
+
locale: l,
|
|
16
|
+
onBlur: i,
|
|
17
|
+
onChange: s,
|
|
18
|
+
onFocus: m,
|
|
19
|
+
placeholder: H,
|
|
20
|
+
popperProps: M,
|
|
21
|
+
preventVirtualKeyboard: g = !1,
|
|
22
|
+
showMonthYearPicker: f,
|
|
23
23
|
size: y = "md",
|
|
24
|
-
startYear:
|
|
25
|
-
transparent:
|
|
26
|
-
useWeekdaysShort:
|
|
27
|
-
value:
|
|
28
|
-
...
|
|
24
|
+
startYear: h = 1900,
|
|
25
|
+
transparent: C,
|
|
26
|
+
useWeekdaysShort: N = !0,
|
|
27
|
+
value: t = R,
|
|
28
|
+
...o
|
|
29
29
|
}, c) => {
|
|
30
|
-
const
|
|
30
|
+
const A = o == null ? void 0 : o.timeIntervals, r = (e) => G(e, A), K = H || o.placeholderText, [B, D] = k(I && "date" || null), [L, a] = k(r(t)), x = w();
|
|
31
31
|
E(() => {
|
|
32
|
-
|
|
32
|
+
s && s(r(t));
|
|
33
33
|
}, []), E(() => {
|
|
34
34
|
var j;
|
|
35
|
-
const
|
|
36
|
-
((j = new Date(Date.parse(
|
|
37
|
-
}, [
|
|
35
|
+
const e = r(t), n = typeof t == "object" ? t == null ? void 0 : t.toISOString() : t;
|
|
36
|
+
((j = new Date(Date.parse(n))) == null ? void 0 : j.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && s && s(e), a(e);
|
|
37
|
+
}, [t]);
|
|
38
38
|
const T = () => {
|
|
39
|
-
var
|
|
40
|
-
return (
|
|
41
|
-
},
|
|
42
|
-
D("date"),
|
|
43
|
-
},
|
|
44
|
-
D(null),
|
|
45
|
-
},
|
|
46
|
-
["Enter", "Escape"].includes(
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
if (!
|
|
51
|
-
const
|
|
52
|
-
|
|
39
|
+
var e;
|
|
40
|
+
return (e = x.current) == null ? void 0 : e.blur();
|
|
41
|
+
}, O = (e) => {
|
|
42
|
+
D("date"), m && m(e);
|
|
43
|
+
}, U = (e) => {
|
|
44
|
+
D(null), i && i(e);
|
|
45
|
+
}, Y = (e) => {
|
|
46
|
+
["Enter", "Escape"].includes(e.key) && T();
|
|
47
|
+
}, _ = (e) => {
|
|
48
|
+
e.preventDefault(), T(), a(null), s && s(null);
|
|
49
|
+
}, q = (e) => {
|
|
50
|
+
if (!e) return;
|
|
51
|
+
const n = r(e);
|
|
52
|
+
e.setHours(n.getHours(), n.getMinutes()), a(e), s && s(new Date(e));
|
|
53
53
|
};
|
|
54
54
|
return (
|
|
55
55
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
56
56
|
// @ts-ignore
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
57
|
+
/* @__PURE__ */ d.jsx(
|
|
58
|
+
J,
|
|
59
59
|
{
|
|
60
60
|
autoComplete: "off",
|
|
61
61
|
calendarClassName: "date-picker-popper",
|
|
62
|
-
customInput: /* @__PURE__ */
|
|
63
|
-
|
|
62
|
+
customInput: /* @__PURE__ */ d.jsx(
|
|
63
|
+
W,
|
|
64
64
|
{
|
|
65
65
|
className: "date-picker",
|
|
66
66
|
"data-testid": P,
|
|
67
|
-
focused:
|
|
68
|
-
handleBlur: (
|
|
69
|
-
handleFocus: (
|
|
70
|
-
icon:
|
|
71
|
-
iconPlacement:
|
|
72
|
-
inputMode:
|
|
73
|
-
onReset:
|
|
74
|
-
ref: (
|
|
75
|
-
x.current =
|
|
67
|
+
focused: B,
|
|
68
|
+
handleBlur: (e) => U(e),
|
|
69
|
+
handleFocus: (e) => O(e),
|
|
70
|
+
icon: p,
|
|
71
|
+
iconPlacement: u,
|
|
72
|
+
inputMode: g ? "none" : "text",
|
|
73
|
+
onReset: _,
|
|
74
|
+
ref: (e) => {
|
|
75
|
+
x.current = e, typeof c == "function" ? c(e) : c.current = e;
|
|
76
76
|
},
|
|
77
77
|
size: y
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
80
|
dateFormat: S,
|
|
81
81
|
disabled: b,
|
|
82
|
-
iconPlacement: !!
|
|
83
|
-
locale:
|
|
84
|
-
onChange:
|
|
85
|
-
onKeyDown:
|
|
86
|
-
placeholderText:
|
|
87
|
-
popperContainer:
|
|
88
|
-
popperProps:
|
|
89
|
-
renderCustomHeader: (
|
|
90
|
-
|
|
82
|
+
iconPlacement: !!p && u,
|
|
83
|
+
locale: l,
|
|
84
|
+
onChange: q,
|
|
85
|
+
onKeyDown: Y,
|
|
86
|
+
placeholderText: K,
|
|
87
|
+
popperContainer: Q,
|
|
88
|
+
popperProps: M,
|
|
89
|
+
renderCustomHeader: (e) => /* @__PURE__ */ d.jsx(
|
|
90
|
+
V,
|
|
91
91
|
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
endYear: F,
|
|
93
|
+
isMonthYearPicker: f,
|
|
94
|
+
locale: l,
|
|
95
|
+
startYear: h,
|
|
96
|
+
...e
|
|
97
97
|
}
|
|
98
98
|
),
|
|
99
|
-
selected:
|
|
100
|
-
showMonthYearPicker:
|
|
99
|
+
selected: L,
|
|
100
|
+
showMonthYearPicker: f,
|
|
101
101
|
size: y,
|
|
102
|
-
transparent:
|
|
103
|
-
useWeekdaysShort:
|
|
104
|
-
...
|
|
102
|
+
transparent: C,
|
|
103
|
+
useWeekdaysShort: N,
|
|
104
|
+
...o
|
|
105
105
|
}
|
|
106
106
|
)
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
|
-
|
|
110
|
+
Z.displayName = "DatePicker";
|
|
111
111
|
export {
|
|
112
|
-
|
|
112
|
+
Z as DatePicker
|
|
113
113
|
};
|
package/dist/DateTimePicker.mjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
3
|
-
import
|
|
4
|
-
import { DatePicker as
|
|
5
|
-
import { S as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { TimePicker as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
2
|
+
import { j as s } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import D, { Children as d, useState as h, useEffect as g, cloneElement as $ } from "react";
|
|
4
|
+
import { DatePicker as b } from "./DatePicker.mjs";
|
|
5
|
+
import { S as j, a as w, g as E, D as S } from "./CustomPopper-DezjKb9n.mjs";
|
|
6
|
+
import { forwardRef as _ } from "./System.mjs";
|
|
7
|
+
import { TimePicker as A } from "./TimePicker.mjs";
|
|
8
|
+
import N, { css as R } from "@xstyled/styled-components";
|
|
9
|
+
const P = R`
|
|
10
10
|
&:focus {
|
|
11
11
|
position: relative;
|
|
12
12
|
z-index: 1;
|
|
13
13
|
}
|
|
14
|
-
`,
|
|
14
|
+
`, C = N.divBox`
|
|
15
15
|
position: relative;
|
|
16
16
|
display: inline-flex;
|
|
17
17
|
flex-wrap: nowrap;
|
|
18
18
|
|
|
19
19
|
.react-datepicker-wrapper {
|
|
20
20
|
flex-grow: 1;
|
|
21
|
-
${
|
|
22
|
-
${
|
|
21
|
+
${j} {
|
|
22
|
+
${P};
|
|
23
23
|
border-top-right-radius: 0;
|
|
24
24
|
border-bottom-right-radius: 0;
|
|
25
25
|
}
|
|
26
|
-
${
|
|
27
|
-
${
|
|
26
|
+
${w} {
|
|
27
|
+
${P};
|
|
28
28
|
border-top-left-radius: 0;
|
|
29
29
|
border-bottom-left-radius: 0;
|
|
30
30
|
}
|
|
@@ -41,64 +41,65 @@ const g = F`
|
|
|
41
41
|
.react-datepicker {
|
|
42
42
|
font-family: inherit;
|
|
43
43
|
}
|
|
44
|
-
`,
|
|
44
|
+
`, F = _(
|
|
45
45
|
({
|
|
46
|
-
children:
|
|
46
|
+
children: i,
|
|
47
47
|
dataTestId: m,
|
|
48
48
|
disabled: l,
|
|
49
|
-
locale:
|
|
50
|
-
onChange:
|
|
51
|
-
size:
|
|
52
|
-
transparent:
|
|
53
|
-
value: t =
|
|
54
|
-
},
|
|
55
|
-
const
|
|
56
|
-
(e) =>
|
|
57
|
-
),
|
|
58
|
-
|
|
49
|
+
locale: c,
|
|
50
|
+
onChange: a,
|
|
51
|
+
size: f = "md",
|
|
52
|
+
transparent: n,
|
|
53
|
+
value: t = S
|
|
54
|
+
}, k) => {
|
|
55
|
+
const u = d.count(i) > 1 && d.toArray(i).find(
|
|
56
|
+
(e) => e.type.displayName === "TimePicker"
|
|
57
|
+
), x = D.isValidElement(u) ? u.props.timeIntervals : void 0, p = (e) => E(e, x), [T, y] = h(p(t)), r = (e) => {
|
|
58
|
+
y(e || null), a && a(e && new Date(e));
|
|
59
59
|
};
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
}, []),
|
|
63
|
-
var
|
|
60
|
+
return g(() => {
|
|
61
|
+
a && r(p(t));
|
|
62
|
+
}, []), g(() => {
|
|
63
|
+
var o;
|
|
64
64
|
const e = p(t);
|
|
65
|
-
((
|
|
66
|
-
}, [t]), /* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
65
|
+
((o = new Date(t)) == null ? void 0 : o.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && a && r(e), y(e);
|
|
66
|
+
}, [t]), /* @__PURE__ */ s.jsxs(C, { "data-testid": m, children: [
|
|
67
|
+
i ? d.map(
|
|
68
|
+
i,
|
|
69
|
+
(e, o) => $(e, {
|
|
70
|
+
// give ref only to the first child
|
|
71
|
+
inputRef: o < 1 ? k : null,
|
|
72
|
+
key: o,
|
|
73
|
+
locale: c,
|
|
74
|
+
onChange: r,
|
|
75
|
+
timeIntervals: x,
|
|
76
|
+
transparent: n,
|
|
77
|
+
value: T
|
|
78
|
+
})
|
|
79
|
+
) : null,
|
|
80
|
+
!i && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
81
|
+
/* @__PURE__ */ s.jsx(
|
|
82
|
+
b,
|
|
82
83
|
{
|
|
83
84
|
dataTestId: `${m}-datePicker`,
|
|
84
85
|
disabled: l,
|
|
85
|
-
locale:
|
|
86
|
-
onChange:
|
|
87
|
-
ref:
|
|
88
|
-
size:
|
|
89
|
-
transparent:
|
|
86
|
+
locale: c,
|
|
87
|
+
onChange: r,
|
|
88
|
+
ref: k,
|
|
89
|
+
size: f,
|
|
90
|
+
transparent: n,
|
|
90
91
|
value: t
|
|
91
92
|
}
|
|
92
93
|
),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
94
|
+
/* @__PURE__ */ s.jsx(
|
|
95
|
+
A,
|
|
95
96
|
{
|
|
96
97
|
dataTestId: `${m}-timePicker`,
|
|
97
98
|
disabled: l,
|
|
98
|
-
locale:
|
|
99
|
-
onChange:
|
|
100
|
-
size:
|
|
101
|
-
transparent:
|
|
99
|
+
locale: c,
|
|
100
|
+
onChange: r,
|
|
101
|
+
size: f,
|
|
102
|
+
transparent: n,
|
|
102
103
|
value: t
|
|
103
104
|
}
|
|
104
105
|
)
|
|
@@ -106,7 +107,7 @@ const g = F`
|
|
|
106
107
|
] });
|
|
107
108
|
}
|
|
108
109
|
);
|
|
109
|
-
|
|
110
|
+
F.displayName = "DateTimePicker";
|
|
110
111
|
export {
|
|
111
|
-
|
|
112
|
+
F as DateTimePicker
|
|
112
113
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { C as a, b as t, c as r, D as o, S as i, a as g, f as m, g as u, d as D, e as c } from "./CustomPopper-
|
|
2
|
+
import { C as a, b as t, c as r, D as o, S as i, a as g, f as m, g as u, d as D, e as c } from "./CustomPopper-DezjKb9n.mjs";
|
|
3
3
|
export {
|
|
4
4
|
a as CustomHeader,
|
|
5
5
|
t as CustomInput,
|