mimir-ui-kit 1.43.9 → 1.43.11
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/Input-CGZoshMl.js +224 -0
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/AccordionItem.css +1 -1
- package/dist/assets/Avatar.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/CarBodyButton.css +1 -0
- package/dist/assets/CheckboxMimir.css +1 -1
- package/dist/assets/Chip.css +1 -1
- package/dist/assets/Drawer.css +1 -1
- package/dist/assets/GosZnak.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputPassword.css +1 -1
- package/dist/assets/InputRangeSlider.css +1 -1
- package/dist/assets/Link.css +1 -1
- package/dist/assets/ListFiles.css +1 -1
- package/dist/assets/ListPhotos.css +1 -1
- package/dist/assets/MessageShortReply.css +1 -1
- package/dist/assets/MiniButton.css +1 -0
- package/dist/assets/MultiSelectSearch.css +1 -1
- package/dist/assets/NotificationBadge.css +1 -1
- package/dist/assets/OtpInput.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/RoundButton.css +1 -0
- package/dist/assets/ScrollWrapper.css +1 -0
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/hooks.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Accordion/Accordion.d.ts +10 -3
- package/dist/components/Accordion/Accordion.js +286 -212
- package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
- package/dist/components/Accordion/constants.d.ts +0 -4
- package/dist/components/Accordion/constants.js +4 -5
- package/dist/components/AnchorLink/Link.js +21 -20
- package/dist/components/Avatar/Avatar.js +26 -26
- package/dist/components/Button/Button.js +110 -87
- package/dist/components/Button/constants.d.ts +8 -2
- package/dist/components/Button/constants.js +6 -5
- package/dist/components/CarBodyButton/CarBodyButton.d.ts +26 -0
- package/dist/components/CarBodyButton/CarBodyButton.js +40 -0
- package/dist/components/CarBodyButton/index.d.ts +1 -0
- package/dist/components/CarBodyButton/index.js +4 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +2 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.js +37 -35
- package/dist/components/Chip/Chip.js +17 -17
- package/dist/components/DatePicker/DatePicker.d.ts +8 -0
- package/dist/components/DatePicker/DatePicker.js +182 -169
- package/dist/components/DatePicker/DatePickerModal.js +134 -98
- package/dist/components/DatePicker/MonthPickerModal.js +115 -95
- package/dist/components/DatePicker/YearPickerModal.js +109 -89
- package/dist/components/DatePicker/constants.d.ts +1 -0
- package/dist/components/DatePicker/constants.js +1 -1
- package/dist/components/DatePicker/hooks.d.ts +2 -1
- package/dist/components/DatePicker/hooks.js +12 -12
- package/dist/components/Drawer/Drawer.js +172 -138
- package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.d.ts +11 -0
- package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.js +27 -0
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/hooks.js +1 -1
- package/dist/components/GosZnak/GosZnak.js +47 -38
- package/dist/components/GosZnak/utils.d.ts +6 -0
- package/dist/components/GosZnak/utils.js +15 -0
- package/dist/components/Input/Input.d.ts +4 -0
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +38 -42
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/InputRangeSlider/InputRangeSlider.js +159 -139
- package/dist/components/InputRangeSlider/constants.d.ts +5 -0
- package/dist/components/InputRangeSlider/constants.js +11 -6
- package/dist/components/ListFiles/ListFiles.js +41 -39
- package/dist/components/ListPhotos/ListPhotos.js +17 -18
- package/dist/components/MessageShortReply/MessageShortReply.js +34 -34
- package/dist/components/{InputClearButton/ClearButton.d.ts → MiniButton/MiniButton.d.ts} +17 -8
- package/dist/components/MiniButton/MiniButton.js +44 -0
- package/dist/components/MiniButton/constants.d.ts +9 -0
- package/dist/components/MiniButton/constants.js +5 -0
- package/dist/components/MiniButton/index.d.ts +4 -0
- package/dist/components/MiniButton/index.js +6 -0
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +153 -152
- package/dist/components/MultiSelectSearch/constants.d.ts +1 -0
- package/dist/components/MultiSelectSearch/constants.js +7 -7
- package/dist/components/MultiSelectSearch/utils.d.ts +1 -1
- package/dist/components/MultiSelectSearch/utils.js +18 -16
- package/dist/components/NotificationBadge/NotificationBadge.js +49 -33
- package/dist/components/NotificationBadge/constants.d.ts +9 -2
- package/dist/components/NotificationBadge/constants.js +3 -2
- package/dist/components/NotificationBadge/types.d.ts +11 -1
- package/dist/components/NotificationBadge/utils.d.ts +8 -0
- package/dist/components/NotificationBadge/utils.js +4 -0
- package/dist/components/OtpInput/OtpInput.js +44 -40
- package/dist/components/OtpInput/constants.d.ts +4 -0
- package/dist/components/OtpInput/constants.js +6 -4
- package/dist/components/OtpInput/index.d.ts +1 -0
- package/dist/components/OtpInput/index.js +2 -0
- package/dist/components/Pagination/Pagination.js +23 -23
- package/dist/components/RoundButton/RoundButton.d.ts +82 -0
- package/dist/components/RoundButton/RoundButton.js +69 -0
- package/dist/components/RoundButton/constants.d.ts +11 -0
- package/dist/components/RoundButton/constants.js +5 -0
- package/dist/components/RoundButton/index.d.ts +2 -0
- package/dist/components/RoundButton/index.js +7 -0
- package/dist/components/RoundButton/types.d.ts +20 -0
- package/dist/components/SelectSearch/SelectSearch.d.ts +2 -0
- package/dist/components/SelectSearch/SelectSearch.js +273 -236
- package/dist/components/SelectSearch/types.d.ts +9 -1
- package/dist/components/SelectSearch/utils.d.ts +1 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -5
- package/dist/components/Slider/Slider.js +34 -36
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +55 -51
- package/dist/hooks-Cd4Ez6_j.js +117 -0
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/16px/DropdownArrowDown16px.js +23 -0
- package/dist/icons/components/24px/EyeClosed24px.js +65 -0
- package/dist/icons/components/Avito.js +36 -13
- package/dist/icons/components/Site.js +13 -36
- package/dist/icons/components/index.js +564 -591
- package/dist/{index-C2dQUuc9.js → index-DrVFMaBi.js} +1184 -1346
- package/dist/index.js +73 -69
- package/dist/styles.module-BfkM1-KJ.js +32 -0
- package/package.json +1 -1
- package/dist/Input-BU_6U1CW.js +0 -227
- package/dist/assets/ClearButton.css +0 -1
- package/dist/components/InputClearButton/ClearButton.js +0 -41
- package/dist/components/InputClearButton/constants.d.ts +0 -8
- package/dist/components/InputClearButton/constants.js +0 -5
- package/dist/components/InputClearButton/index.d.ts +0 -4
- package/dist/components/InputClearButton/index.js +0 -6
- package/dist/hooks-HgN6Yauq.js +0 -117
- package/dist/icons/components/64px/AdvancePaymentDiscount64px.js +0 -59
- package/dist/icons/components/64px/AtsVendors64px.js +0 -37
- package/dist/icons/components/64px/ButtonOn64px.js +0 -31
- package/dist/icons/components/64px/BuyoutAuto64px.js +0 -45
- package/dist/icons/components/64px/CarAssistance64px.js +0 -44
- package/dist/icons/components/64px/CarDelivery64px.js +0 -37
- package/dist/icons/components/64px/CarSearchReturn64px.js +0 -45
- package/dist/icons/components/64px/CarService64px.js +0 -37
- package/dist/icons/components/64px/Case64px.js +0 -33
- package/dist/icons/components/64px/CoatOfArms64px.js +0 -149
- package/dist/icons/components/64px/CoffeeCup64px.js +0 -44
- package/dist/icons/components/64px/Cup64px.js +0 -38
- package/dist/icons/components/64px/ExpertAdvice64px.js +0 -40
- package/dist/icons/components/64px/Fines64px.js +0 -88
- package/dist/icons/components/64px/Fuel64px.js +0 -38
- package/dist/icons/components/64px/GazprombankIcon24px.js +0 -21
- package/dist/icons/components/64px/Kasko64px.js +0 -44
- package/dist/icons/components/64px/LegalSupport64px.js +0 -58
- package/dist/icons/components/64px/Microphone64px.js +0 -37
- package/dist/icons/components/64px/Money64px.js +0 -60
- package/dist/icons/components/64px/PaymentSchedule64px.js +0 -39
- package/dist/icons/components/64px/PersonalManager64px.js +0 -100
- package/dist/icons/components/64px/PreApproval64px.js +0 -44
- package/dist/icons/components/64px/Questions64px.js +0 -37
- package/dist/icons/components/64px/SupportGeography64px.js +0 -51
- package/dist/icons/components/64px/Timer64px.js +0 -45
- package/dist/icons/components/64px/Twogis64px.js +0 -51
- package/dist/icons/components/64px/Vehicles64px.js +0 -45
- package/dist/icons/components/64px/Workplace64px.js +0 -38
- package/dist/styles.module-Cuqm31CO.js +0 -28
@@ -1,30 +1,30 @@
|
|
1
|
-
import { jsxs as r, jsx as
|
2
|
-
import { c as
|
3
|
-
import { EChipSize as
|
1
|
+
import { jsxs as r, jsx as j } from "react/jsx-runtime";
|
2
|
+
import { c as m } from "../../index-DIxK0V-G.js";
|
3
|
+
import { EChipSize as p, EChipVariant as h } from "./constants.js";
|
4
4
|
import { Button as l } from "../Button/Button.js";
|
5
|
-
import '../../assets/Chip.css';const
|
6
|
-
chip:
|
7
|
-
"with-action": "_with-
|
8
|
-
disabled:
|
9
|
-
xs:
|
10
|
-
s:
|
11
|
-
m:
|
12
|
-
sapphire:
|
13
|
-
citrine:
|
5
|
+
import '../../assets/Chip.css';const d = "_chip_10jmj_2", x = "_disabled_10jmj_41", g = "_xs_10jmj_52", u = "_s_10jmj_60", w = "_m_10jmj_68", C = "_sapphire_10jmj_78", b = "_citrine_10jmj_87", f = "_asphalt_10jmj_96", y = "_gray_10jmj_105", N = "_white_10jmj_114", B = "_green_10jmj_123", s = {
|
6
|
+
chip: d,
|
7
|
+
"with-action": "_with-action_10jmj_19",
|
8
|
+
disabled: x,
|
9
|
+
xs: g,
|
10
|
+
s: u,
|
11
|
+
m: w,
|
12
|
+
sapphire: C,
|
13
|
+
citrine: b,
|
14
14
|
asphalt: f,
|
15
15
|
gray: y,
|
16
16
|
white: N,
|
17
|
-
green:
|
17
|
+
green: B
|
18
18
|
}, z = ({
|
19
|
-
size: i =
|
20
|
-
variant: _ =
|
19
|
+
size: i = p.M,
|
20
|
+
variant: _ = h.Sapphire,
|
21
21
|
className: c,
|
22
22
|
disabled: e,
|
23
23
|
withAction: t,
|
24
24
|
children: o,
|
25
25
|
onClose: a
|
26
26
|
}) => {
|
27
|
-
const n =
|
27
|
+
const n = m(
|
28
28
|
s.chip,
|
29
29
|
c,
|
30
30
|
{
|
@@ -36,7 +36,7 @@ import '../../assets/Chip.css';const v = "_chip_19bvm_2", d = "_disabled_19bvm_4
|
|
36
36
|
);
|
37
37
|
return /* @__PURE__ */ r("div", { className: n, children: [
|
38
38
|
o,
|
39
|
-
t && /* @__PURE__ */
|
39
|
+
t && /* @__PURE__ */ j(l, { isIconButton: !0, iconName: "Close16px", onClick: a, clear: !0 })
|
40
40
|
] });
|
41
41
|
};
|
42
42
|
export {
|
@@ -65,6 +65,10 @@ export type TProps = {
|
|
65
65
|
* Диапазон доступных дат [от, до]
|
66
66
|
*/
|
67
67
|
validRange?: [Date | string, Date | string];
|
68
|
+
/**
|
69
|
+
* Флаг показывающий необходилось кнопки очиски
|
70
|
+
*/
|
71
|
+
withClearButton?: boolean;
|
68
72
|
} & TInputProps;
|
69
73
|
export type TDatePickerValue = {
|
70
74
|
value?: string;
|
@@ -139,4 +143,8 @@ export declare const DatePicker: import('react').MemoExoticComponent<import('rea
|
|
139
143
|
* Диапазон доступных дат [от, до]
|
140
144
|
*/
|
141
145
|
validRange?: [Date | string, Date | string];
|
146
|
+
/**
|
147
|
+
* Флаг показывающий необходилось кнопки очиски
|
148
|
+
*/
|
149
|
+
withClearButton?: boolean;
|
142
150
|
} & import('../Input/types').TInputProps & import('../Input').TAdditionalProps & import('react').RefAttributes<HTMLInputElement>>>;
|
@@ -1,242 +1,255 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as J, jsx as l } from "react/jsx-runtime";
|
2
2
|
import { c as X } from "../../index-DIxK0V-G.js";
|
3
|
-
import { memo as pt, forwardRef as dt, useState as
|
4
|
-
import { MAX_DAY as
|
5
|
-
import { DatePickerModal as
|
6
|
-
import { MonthPickerModal as
|
7
|
-
import { c as
|
8
|
-
import { formatDatePart as
|
9
|
-
import { YearPickerModal as
|
10
|
-
import { useClickOutside as
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
const
|
3
|
+
import { memo as pt, forwardRef as dt, useState as A, useEffect as S } from "react";
|
4
|
+
import { MAX_DAY as wt, MAX_MONTH as lt, DATE_LENGTH as Nt } from "./constants.js";
|
5
|
+
import { DatePickerModal as Tt } from "./DatePickerModal.js";
|
6
|
+
import { MonthPickerModal as Mt } from "./MonthPickerModal.js";
|
7
|
+
import { c as y } from "../../styles.module-BfkM1-KJ.js";
|
8
|
+
import { formatDatePart as Q } from "./utils.js";
|
9
|
+
import { YearPickerModal as kt } from "./YearPickerModal.js";
|
10
|
+
import { useClickOutside as Pt } from "../../hooks/useClickOutside/useClickOutside.js";
|
11
|
+
import { formating as d } from "../../utils/index.js";
|
12
|
+
import { I as At } from "../../Input-CGZoshMl.js";
|
13
|
+
import { EInputStatus as ut } from "../Input/constants.js";
|
14
|
+
import { MiniButton as xt } from "../MiniButton/MiniButton.js";
|
15
|
+
const It = pt(
|
16
16
|
dt(
|
17
17
|
({
|
18
|
-
size:
|
19
|
-
value:
|
20
|
-
onChangeValue:
|
21
|
-
name:
|
18
|
+
size: j,
|
19
|
+
value: w,
|
20
|
+
onChangeValue: i,
|
21
|
+
name: p,
|
22
22
|
before: N,
|
23
|
-
type:
|
24
|
-
error:
|
23
|
+
type: f = "days",
|
24
|
+
error: v,
|
25
25
|
onError: T,
|
26
|
-
onBlur:
|
26
|
+
onBlur: c,
|
27
27
|
validateImmediately: G,
|
28
|
-
variant:
|
29
|
-
disabled:
|
30
|
-
editable:
|
28
|
+
variant: Z,
|
29
|
+
disabled: $ = !1,
|
30
|
+
editable: u = !1,
|
31
31
|
openOnInput: L = !0,
|
32
|
-
sendIntermediateValues:
|
33
|
-
disableFuture:
|
34
|
-
disablePast:
|
32
|
+
sendIntermediateValues: b = !1,
|
33
|
+
disableFuture: U = !1,
|
34
|
+
disablePast: W = !1,
|
35
35
|
disabledDate: _,
|
36
|
-
validRange:
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
36
|
+
validRange: o,
|
37
|
+
withClearButton: C = !1,
|
38
|
+
...h
|
39
|
+
}, R) => {
|
40
|
+
const [H, m] = A(!1), [F, n] = A(f), [D, M] = A(
|
41
|
+
() => w && !isNaN(new Date(w).getTime()) ? new Date(w) : void 0
|
42
|
+
), [Y, K] = A(v), [B, x] = A(""), [V, k] = A();
|
43
|
+
h.status = !!Y && ut.Error || h.status, S(() => {
|
44
|
+
K(v);
|
45
|
+
}, [v]), S(() => {
|
45
46
|
M(
|
46
|
-
|
47
|
+
w && !isNaN(new Date(w).getTime()) ? new Date(w) : void 0
|
47
48
|
);
|
48
|
-
}, [
|
49
|
-
|
50
|
-
}, [
|
51
|
-
const
|
52
|
-
|
53
|
-
G && (
|
54
|
-
}, [G,
|
55
|
-
isActive:
|
49
|
+
}, [w]), S(() => {
|
50
|
+
D && typeof D != "string" && !isNaN(D == null ? void 0 : D.getTime()) ? x(d.Date(D, "dd/mm/yyyy")) : x("");
|
51
|
+
}, [D]);
|
52
|
+
const q = w && new Date(w).getTime;
|
53
|
+
S(() => {
|
54
|
+
G && (q ? (K(!1), T == null || T({ name: p, active: !1 })) : (K(!0), T == null || T({ name: p, active: !0 })));
|
55
|
+
}, [G, p, q]), Pt({
|
56
|
+
isActive: H,
|
56
57
|
setActive: (t) => {
|
57
|
-
|
58
|
+
m(t), n(f), t || k(void 0);
|
58
59
|
},
|
59
|
-
className:
|
60
|
+
className: y["calendar-block"]
|
60
61
|
});
|
61
|
-
const
|
62
|
-
|
63
|
-
},
|
62
|
+
const tt = () => {
|
63
|
+
!$ && (L || !u) && m(!0);
|
64
|
+
}, z = (t) => {
|
64
65
|
const r = t.getTime();
|
65
66
|
if (t.setHours(0, 0, 0, 0), N && (typeof N == "string" ? new Date(N) : N).getTime() > r)
|
66
67
|
return !1;
|
67
|
-
if (
|
68
|
-
const
|
69
|
-
if (
|
68
|
+
if (U) {
|
69
|
+
const s = /* @__PURE__ */ new Date();
|
70
|
+
if (s.setHours(0, 0, 0, 0), t.getTime() > s.getTime()) return !1;
|
70
71
|
}
|
71
|
-
if (
|
72
|
-
const
|
73
|
-
if (
|
72
|
+
if (W) {
|
73
|
+
const s = /* @__PURE__ */ new Date();
|
74
|
+
if (s.setHours(0, 0, 0, 0), r < s.getTime()) return !1;
|
74
75
|
}
|
75
76
|
if (_ && _(t)) return !1;
|
76
|
-
if (
|
77
|
-
let
|
78
|
-
typeof
|
79
|
-
new Date(
|
80
|
-
typeof
|
81
|
-
] :
|
82
|
-
|
83
|
-
typeof
|
77
|
+
if (o) {
|
78
|
+
let s;
|
79
|
+
typeof o[0] == "string" ? s = [
|
80
|
+
new Date(o[0]),
|
81
|
+
typeof o[1] == "string" ? new Date(o[1]) : o[1]
|
82
|
+
] : s = [
|
83
|
+
o[0],
|
84
|
+
typeof o[1] == "string" ? new Date(o[1]) : o[1]
|
84
85
|
];
|
85
|
-
const [
|
86
|
-
if (
|
86
|
+
const [a, e] = s, I = new Date(a), P = new Date(e);
|
87
|
+
if (I.setHours(0, 0, 0, 0), P.setHours(23, 59, 59, 999), t < I || t > P) return !1;
|
87
88
|
}
|
88
89
|
return !0;
|
90
|
+
}, et = (t) => {
|
91
|
+
isNaN(t.getTime()) || (M(t), k(void 0), i == null || i({
|
92
|
+
value: d.Date(t, "yyyy-mm-dd"),
|
93
|
+
name: p
|
94
|
+
})), F === "years" && (f === "years" ? (m(!1), n(f)) : n("months")), F === "months" && (f === "months" ? (m(!1), n(f)) : n("days")), M(t), i == null || i({
|
95
|
+
value: d.Date(t, "yyyy-mm-dd"),
|
96
|
+
name: p
|
97
|
+
}), c == null || c(d.Date(t, "yyyy-mm-dd"));
|
89
98
|
}, st = (t) => {
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
}, it = (t) => {
|
98
|
-
const r = p || /* @__PURE__ */ new Date(), i = r.getDate(), f = r.getMonth() + 1, e = new Date(t, f - 1, i);
|
99
|
-
if (e.getFullYear() === t && e.getMonth() === f - 1 && e.getDate() === i && J(e)) {
|
100
|
-
if (M(e), k(void 0), s == null || s({
|
101
|
-
value: w.Date(e, "yyyy-mm-dd"),
|
102
|
-
name: y
|
103
|
-
}), o == null || o(w.Date(e, "yyyy-mm-dd")), a === "years") {
|
104
|
-
D(!1), m(a);
|
99
|
+
const r = D || /* @__PURE__ */ new Date(), s = r.getDate(), a = r.getMonth() + 1, e = new Date(t, a - 1, s);
|
100
|
+
if (e.getFullYear() === t && e.getMonth() === a - 1 && e.getDate() === s && z(e)) {
|
101
|
+
if (M(e), k(void 0), i == null || i({
|
102
|
+
value: d.Date(e, "yyyy-mm-dd"),
|
103
|
+
name: p
|
104
|
+
}), c == null || c(d.Date(e, "yyyy-mm-dd")), f === "years") {
|
105
|
+
m(!1), n(f);
|
105
106
|
return;
|
106
107
|
}
|
107
108
|
} else
|
108
|
-
k(new Date(t,
|
109
|
-
|
110
|
-
},
|
111
|
-
const
|
112
|
-
if (e.getFullYear() === t && e.getMonth() === r - 1 && e.getDate() ===
|
113
|
-
if (M(e), k(void 0),
|
114
|
-
value:
|
115
|
-
name:
|
116
|
-
}),
|
117
|
-
|
109
|
+
k(new Date(t, a - 1, 1));
|
110
|
+
f === "years" ? (m(!1), n(f)) : n("months");
|
111
|
+
}, it = (t, r) => {
|
112
|
+
const a = (D || /* @__PURE__ */ new Date()).getDate(), e = new Date(t, r - 1, a);
|
113
|
+
if (e.getFullYear() === t && e.getMonth() === r - 1 && e.getDate() === a && z(e)) {
|
114
|
+
if (M(e), k(void 0), i == null || i({
|
115
|
+
value: d.Date(e, "yyyy-mm-dd"),
|
116
|
+
name: p
|
117
|
+
}), c == null || c(d.Date(e, "yyyy-mm-dd")), f === "months") {
|
118
|
+
m(!1), n(f);
|
118
119
|
return;
|
119
120
|
}
|
120
121
|
} else
|
121
122
|
k(new Date(t, r - 1, 1));
|
122
|
-
|
123
|
-
},
|
124
|
-
if (
|
123
|
+
f === "months" ? (m(!1), n(f)) : n("days");
|
124
|
+
}, rt = (t) => {
|
125
|
+
if (u) {
|
125
126
|
const r = t.target.value.replace(/[^\d]/g, "");
|
126
127
|
if (r.length === 0)
|
127
|
-
|
128
|
+
x(""), i == null || i({ value: "", name: p }), c == null || c("");
|
128
129
|
else {
|
129
|
-
const [
|
130
|
-
|
131
|
-
|
130
|
+
const [s, a, e] = [
|
131
|
+
Q(r.substring(0, 2), wt),
|
132
|
+
Q(r.substring(2, 4), lt),
|
132
133
|
r.substring(4, 8)
|
133
|
-
],
|
134
|
-
if (
|
135
|
-
const
|
136
|
-
|
137
|
-
value:
|
138
|
-
name:
|
134
|
+
], I = [s, a, e].filter(Boolean).join("/");
|
135
|
+
if (x(I), b) {
|
136
|
+
const P = e ? `${e}-${a || "00"}-${s || "00"}` : [s, a, e].filter(Boolean).join("-");
|
137
|
+
i == null || i({
|
138
|
+
value: P,
|
139
|
+
name: p
|
139
140
|
});
|
140
141
|
}
|
141
|
-
if (
|
142
|
-
const
|
143
|
-
`${
|
142
|
+
if (I.length === Nt) {
|
143
|
+
const P = parseInt(e), g = /* @__PURE__ */ new Date(
|
144
|
+
`${P}-${a.padStart(2, "0")}-${s.padStart(2, "0")}`
|
144
145
|
);
|
145
|
-
isNaN(
|
146
|
-
value:
|
147
|
-
name:
|
148
|
-
}),
|
146
|
+
isNaN(g.getTime()) || (M(g), i == null || i({
|
147
|
+
value: d.Date(g, "yyyy-mm-dd"),
|
148
|
+
name: p
|
149
|
+
}), c == null || c(d.Date(g, "yyyy-mm-dd")));
|
149
150
|
}
|
150
151
|
}
|
151
152
|
}
|
152
|
-
}, ot =
|
153
|
-
|
154
|
-
|
153
|
+
}, ot = (t) => {
|
154
|
+
if (u && t.key === "Enter") {
|
155
|
+
m(!1);
|
156
|
+
return;
|
157
|
+
}
|
158
|
+
}, ct = (t) => {
|
159
|
+
t == null || t.stopPropagation(), x("");
|
160
|
+
}, at = X(y.wrapper, H && y.active), ft = X(y.input, y.inputBorderControl);
|
161
|
+
let E;
|
162
|
+
if (o) {
|
155
163
|
let t, r;
|
156
|
-
typeof
|
164
|
+
typeof o[0] == "string" ? t = new Date(o[0]) : t = o[0], typeof o[1] == "string" ? r = new Date(o[1]) : r = o[1], E = [t, r];
|
157
165
|
}
|
158
|
-
const
|
159
|
-
onChangeValue:
|
160
|
-
date:
|
161
|
-
selectedDate:
|
166
|
+
const O = {
|
167
|
+
onChangeValue: et,
|
168
|
+
date: V || D || /* @__PURE__ */ new Date(),
|
169
|
+
selectedDate: D,
|
162
170
|
before: typeof N == "string" ? new Date(N) : N,
|
163
|
-
onChangeType:
|
164
|
-
setIsActive:
|
165
|
-
disableFuture:
|
166
|
-
disablePast:
|
171
|
+
onChangeType: n,
|
172
|
+
setIsActive: m,
|
173
|
+
disableFuture: U,
|
174
|
+
disablePast: W,
|
167
175
|
disabledDate: _,
|
168
|
-
validRange:
|
169
|
-
}, ft = {
|
170
|
-
...U,
|
171
|
-
onChangeMonth: rt
|
176
|
+
validRange: E
|
172
177
|
}, mt = {
|
173
|
-
...
|
174
|
-
|
175
|
-
}, nt =
|
178
|
+
...O,
|
179
|
+
onChangeMonth: it
|
180
|
+
}, nt = {
|
181
|
+
...O,
|
182
|
+
onChangeYear: st
|
183
|
+
}, Dt = (() => {
|
176
184
|
switch (F) {
|
177
185
|
case "months":
|
178
|
-
return () => /* @__PURE__ */
|
186
|
+
return () => /* @__PURE__ */ l(Mt, { ...mt });
|
179
187
|
case "years":
|
180
|
-
return () => /* @__PURE__ */
|
188
|
+
return () => /* @__PURE__ */ l(kt, { ...nt });
|
181
189
|
default:
|
182
|
-
return () => /* @__PURE__ */
|
190
|
+
return () => /* @__PURE__ */ l(Tt, { ...O });
|
183
191
|
}
|
184
|
-
})(),
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
192
|
+
})(), yt = ({ isActive: t }) => {
|
193
|
+
const r = (a) => {
|
194
|
+
a.stopPropagation(), $ || m(!t);
|
195
|
+
}, s = j === "l" ? 16 : 12;
|
196
|
+
return /* @__PURE__ */ l(
|
197
|
+
xt,
|
198
|
+
{
|
199
|
+
variant: "transparent",
|
200
|
+
disabled: $,
|
201
|
+
size: j === "l" ? "l" : "m-s",
|
202
|
+
onClick: r,
|
203
|
+
iconName: t ? `DropdownArrowUp${s}px` : `DropdownArrowBottom${s}px`
|
204
|
+
}
|
205
|
+
);
|
206
|
+
};
|
207
|
+
return /* @__PURE__ */ J("div", { className: y["input-field-group-datePicker"], children: [
|
208
|
+
/* @__PURE__ */ J("div", { className: at, "data-disabled": $, children: [
|
209
|
+
/* @__PURE__ */ l(
|
200
210
|
"div",
|
201
211
|
{
|
202
212
|
role: "button",
|
203
|
-
"data-status":
|
204
|
-
className: X(
|
205
|
-
[
|
213
|
+
"data-status": h.status,
|
214
|
+
className: X(y["date-wrapper"], {
|
215
|
+
[y.editable]: u
|
206
216
|
}),
|
207
|
-
onClick:
|
208
|
-
children: /* @__PURE__ */
|
217
|
+
onClick: tt,
|
218
|
+
children: /* @__PURE__ */ l(
|
209
219
|
At,
|
210
220
|
{
|
211
|
-
ref:
|
212
|
-
className:
|
213
|
-
wrapperClassName:
|
214
|
-
size:
|
221
|
+
ref: R,
|
222
|
+
className: ft,
|
223
|
+
wrapperClassName: y["input-wrapper"],
|
224
|
+
size: j,
|
215
225
|
type: "text",
|
216
|
-
variant:
|
217
|
-
value:
|
218
|
-
onChange:
|
226
|
+
variant: Z,
|
227
|
+
value: B,
|
228
|
+
onChange: rt,
|
229
|
+
onKeyDown: ot,
|
219
230
|
rightAddon: {
|
220
231
|
addonType: "react-node",
|
221
|
-
addonContent: /* @__PURE__ */
|
232
|
+
addonContent: /* @__PURE__ */ l(yt, { isActive: H })
|
222
233
|
},
|
223
|
-
rightSlotClassName:
|
234
|
+
rightSlotClassName: y["right-slot"],
|
224
235
|
onFocus: () => {
|
225
|
-
L && !
|
236
|
+
L && !u && m(!0);
|
226
237
|
},
|
227
|
-
|
238
|
+
withClearButton: C,
|
239
|
+
onClearButtonClick: ct,
|
240
|
+
...h
|
228
241
|
}
|
229
242
|
)
|
230
243
|
}
|
231
244
|
),
|
232
|
-
|
245
|
+
H && /* @__PURE__ */ l(Dt, {})
|
233
246
|
] }),
|
234
|
-
|
247
|
+
Y && typeof Y == "string" && /* @__PURE__ */ l("div", { className: y.textError, children: Y })
|
235
248
|
] });
|
236
249
|
}
|
237
250
|
)
|
238
251
|
);
|
239
|
-
|
252
|
+
It.displayName = "DatePicker";
|
240
253
|
export {
|
241
|
-
|
254
|
+
It as DatePicker
|
242
255
|
};
|