mimir-ui-kit 1.43.11 → 1.43.13
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-BU_6U1CW.js +227 -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/CheckboxMimir.css +1 -1
- package/dist/assets/Chip.css +1 -1
- package/dist/assets/ClearButton.css +1 -0
- 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/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/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 +3 -10
- package/dist/components/Accordion/Accordion.js +212 -286
- package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
- package/dist/components/Accordion/constants.d.ts +4 -0
- package/dist/components/Accordion/constants.js +5 -4
- package/dist/components/AnchorLink/Link.js +20 -21
- package/dist/components/Avatar/Avatar.js +26 -26
- package/dist/components/Button/Button.js +87 -110
- package/dist/components/Button/constants.d.ts +2 -8
- package/dist/components/Button/constants.js +5 -6
- package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +0 -2
- package/dist/components/CheckboxMimir/CheckboxMimir.js +35 -37
- package/dist/components/Chip/Chip.js +17 -17
- package/dist/components/DatePicker/DatePicker.d.ts +0 -8
- package/dist/components/DatePicker/DatePicker.js +169 -182
- package/dist/components/DatePicker/DatePickerModal.js +98 -134
- package/dist/components/DatePicker/MonthPickerModal.js +95 -115
- package/dist/components/DatePicker/YearPickerModal.js +89 -109
- package/dist/components/DatePicker/constants.d.ts +1 -1
- package/dist/components/DatePicker/constants.js +7 -6
- package/dist/components/DatePicker/hooks.d.ts +1 -2
- package/dist/components/DatePicker/hooks.js +13 -13
- package/dist/components/Drawer/Drawer.js +138 -172
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/hooks.js +1 -1
- package/dist/components/GosZnak/GosZnak.js +38 -47
- package/dist/components/Input/Input.d.ts +0 -4
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/index.js +1 -1
- package/dist/components/{MiniButton/MiniButton.d.ts → InputClearButton/ClearButton.d.ts} +8 -17
- package/dist/components/InputClearButton/ClearButton.js +41 -0
- package/dist/components/InputClearButton/constants.d.ts +8 -0
- package/dist/components/InputClearButton/constants.js +5 -0
- package/dist/components/InputClearButton/index.d.ts +4 -0
- package/dist/components/InputClearButton/index.js +6 -0
- package/dist/components/InputPassword/InputPassword.js +42 -38
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/InputRangeSlider/InputRangeSlider.js +139 -159
- package/dist/components/InputRangeSlider/constants.d.ts +0 -5
- package/dist/components/InputRangeSlider/constants.js +6 -11
- package/dist/components/ListFiles/ListFiles.js +39 -41
- package/dist/components/ListPhotos/ListPhotos.js +18 -17
- package/dist/components/MessageShortReply/MessageShortReply.js +34 -34
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +152 -153
- package/dist/components/MultiSelectSearch/constants.d.ts +0 -1
- package/dist/components/MultiSelectSearch/constants.js +7 -7
- package/dist/components/MultiSelectSearch/utils.d.ts +1 -1
- package/dist/components/MultiSelectSearch/utils.js +16 -18
- package/dist/components/NotificationBadge/NotificationBadge.js +33 -49
- package/dist/components/NotificationBadge/constants.d.ts +2 -9
- package/dist/components/NotificationBadge/constants.js +2 -3
- package/dist/components/NotificationBadge/types.d.ts +1 -11
- package/dist/components/OtpInput/OtpInput.js +40 -44
- package/dist/components/OtpInput/constants.d.ts +0 -4
- package/dist/components/OtpInput/constants.js +4 -6
- package/dist/components/OtpInput/index.d.ts +0 -1
- package/dist/components/OtpInput/index.js +0 -2
- package/dist/components/Pagination/Pagination.js +23 -23
- package/dist/components/SelectSearch/SelectSearch.js +241 -241
- package/dist/components/SelectSearch/utils.d.ts +1 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/Slider/Slider.d.ts +5 -1
- package/dist/components/Slider/Slider.js +36 -34
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/index.d.ts +1 -3
- package/dist/components/index.js +51 -55
- package/dist/hooks-HgN6Yauq.js +117 -0
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/64px/AdvancePaymentDiscount64px.js +59 -0
- package/dist/icons/components/64px/AtsVendors64px.js +37 -0
- package/dist/icons/components/64px/ButtonOn64px.js +31 -0
- package/dist/icons/components/64px/BuyoutAuto64px.js +45 -0
- package/dist/icons/components/64px/CarAssistance64px.js +44 -0
- package/dist/icons/components/64px/CarDelivery64px.js +37 -0
- package/dist/icons/components/64px/CarSearchReturn64px.js +45 -0
- package/dist/icons/components/64px/CarService64px.js +37 -0
- package/dist/icons/components/64px/Case64px.js +33 -0
- package/dist/icons/components/64px/CoatOfArms64px.js +149 -0
- package/dist/icons/components/64px/CoffeeCup64px.js +44 -0
- package/dist/icons/components/64px/Cup64px.js +38 -0
- package/dist/icons/components/64px/ExpertAdvice64px.js +40 -0
- package/dist/icons/components/64px/Fines64px.js +88 -0
- package/dist/icons/components/64px/Fuel64px.js +38 -0
- package/dist/icons/components/64px/GazprombankIcon24px.js +21 -0
- package/dist/icons/components/64px/Kasko64px.js +44 -0
- package/dist/icons/components/64px/LegalSupport64px.js +58 -0
- package/dist/icons/components/64px/Microphone64px.js +37 -0
- package/dist/icons/components/64px/Money64px.js +60 -0
- package/dist/icons/components/64px/PaymentSchedule64px.js +39 -0
- package/dist/icons/components/64px/PersonalManager64px.js +100 -0
- package/dist/icons/components/64px/PreApproval64px.js +44 -0
- package/dist/icons/components/64px/Questions64px.js +37 -0
- package/dist/icons/components/64px/SupportGeography64px.js +51 -0
- package/dist/icons/components/64px/Timer64px.js +45 -0
- package/dist/icons/components/64px/Twogis64px.js +51 -0
- package/dist/icons/components/64px/Vehicles64px.js +45 -0
- package/dist/icons/components/64px/Workplace64px.js +38 -0
- package/dist/icons/components/index.js +591 -564
- package/dist/{index-DrVFMaBi.js → index-C2dQUuc9.js} +1346 -1184
- package/dist/index.js +69 -73
- package/dist/styles.module-Cuqm31CO.js +28 -0
- package/package.json +1 -1
- package/dist/Input-CGZoshMl.js +0 -224
- package/dist/assets/CarBodyButton.css +0 -1
- package/dist/assets/MiniButton.css +0 -1
- package/dist/assets/RoundButton.css +0 -1
- package/dist/assets/ScrollWrapper.css +0 -1
- package/dist/components/CarBodyButton/CarBodyButton.d.ts +0 -26
- package/dist/components/CarBodyButton/CarBodyButton.js +0 -40
- package/dist/components/CarBodyButton/index.d.ts +0 -1
- package/dist/components/CarBodyButton/index.js +0 -4
- package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.d.ts +0 -11
- package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.js +0 -27
- package/dist/components/GosZnak/utils.d.ts +0 -6
- package/dist/components/GosZnak/utils.js +0 -15
- package/dist/components/MiniButton/MiniButton.js +0 -44
- package/dist/components/MiniButton/constants.d.ts +0 -9
- package/dist/components/MiniButton/constants.js +0 -5
- package/dist/components/MiniButton/index.d.ts +0 -4
- package/dist/components/MiniButton/index.js +0 -6
- package/dist/components/NotificationBadge/utils.d.ts +0 -8
- package/dist/components/NotificationBadge/utils.js +0 -4
- package/dist/components/RoundButton/RoundButton.d.ts +0 -82
- package/dist/components/RoundButton/RoundButton.js +0 -69
- package/dist/components/RoundButton/constants.d.ts +0 -11
- package/dist/components/RoundButton/constants.js +0 -5
- package/dist/components/RoundButton/index.d.ts +0 -2
- package/dist/components/RoundButton/index.js +0 -7
- package/dist/components/RoundButton/types.d.ts +0 -20
- package/dist/hooks-Cd4Ez6_j.js +0 -117
- package/dist/icons/components/16px/DropdownArrowDown16px.js +0 -23
- package/dist/icons/components/24px/EyeClosed24px.js +0 -65
- package/dist/styles.module-BfkM1-KJ.js +0 -32
@@ -1,137 +1,117 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { useState as
|
4
|
-
import { useDatePickerPosition as
|
5
|
-
import { c as
|
6
|
-
import { formating as
|
7
|
-
import { Button as
|
8
|
-
const
|
9
|
-
date:
|
10
|
-
selectedDate:
|
1
|
+
import { jsxs as b, jsx as c } from "react/jsx-runtime";
|
2
|
+
import { c as $ } from "../../index-DIxK0V-G.js";
|
3
|
+
import { useState as j } from "react";
|
4
|
+
import { useDatePickerPosition as z } from "./hooks.js";
|
5
|
+
import { c as n } from "../../styles.module-Cuqm31CO.js";
|
6
|
+
import { formating as F } from "../../utils/index.js";
|
7
|
+
import { Button as P } from "../Button/Button.js";
|
8
|
+
const p = 15, I = 7, W = ({
|
9
|
+
date: v,
|
10
|
+
selectedDate: u,
|
11
11
|
onChangeValue: E,
|
12
12
|
before: Y,
|
13
|
-
onChangeType:
|
14
|
-
onChangeYear:
|
15
|
-
disableFuture:
|
16
|
-
disablePast:
|
17
|
-
disabledDate:
|
13
|
+
onChangeType: d,
|
14
|
+
onChangeYear: N,
|
15
|
+
disableFuture: S = !1,
|
16
|
+
disablePast: _ = !1,
|
17
|
+
disabledDate: o,
|
18
18
|
validRange: k
|
19
19
|
}) => {
|
20
|
-
const
|
21
|
-
y:
|
22
|
-
d:
|
23
|
-
m:
|
20
|
+
const y = z(), i = new Date(v), l = u ? new Date(u) : i, G = {
|
21
|
+
y: l.getFullYear(),
|
22
|
+
d: l.getDate(),
|
23
|
+
m: l.getMonth() + 1
|
24
24
|
}, e = {
|
25
25
|
y: i.getFullYear(),
|
26
26
|
d: i.getDate(),
|
27
27
|
m: i.getMonth() + 1
|
28
|
-
},
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
},
|
33
|
-
(
|
34
|
-
|
35
|
-
h(w + N);
|
36
|
-
}, z = () => {
|
37
|
-
h(w - N);
|
38
|
-
}, x = (t) => {
|
28
|
+
}, [D, h] = j(e.y), M = D - I, Q = Array.from(Array(p).keys()).map(
|
29
|
+
(t) => t + M
|
30
|
+
), B = () => {
|
31
|
+
h(D + p);
|
32
|
+
}, H = () => {
|
33
|
+
h(D - p);
|
34
|
+
}, g = (t) => {
|
39
35
|
const s = (/* @__PURE__ */ new Date()).getFullYear();
|
40
36
|
if (k) {
|
41
|
-
const [a,
|
42
|
-
let
|
37
|
+
const [a, w] = k;
|
38
|
+
let r;
|
43
39
|
if (e.m && e.d)
|
44
|
-
|
40
|
+
r = new Date(t, e.m - 1, e.d);
|
45
41
|
else {
|
46
42
|
const A = /* @__PURE__ */ new Date();
|
47
|
-
|
43
|
+
r = new Date(t, A.getMonth(), A.getDate());
|
48
44
|
}
|
49
|
-
|
50
|
-
const m = new Date(a), f = new Date(
|
51
|
-
if (m.setHours(0, 0, 0, 0), f.setHours(23, 59, 59, 999),
|
45
|
+
r.setHours(0, 0, 0, 0);
|
46
|
+
const m = new Date(a), f = new Date(w);
|
47
|
+
if (m.setHours(0, 0, 0, 0), f.setHours(23, 59, 59, 999), r < m || r > f)
|
52
48
|
return !0;
|
53
49
|
}
|
54
|
-
if (Y && Y.getFullYear() > t ||
|
50
|
+
if (Y && Y.getFullYear() > t || S && t > s || _ && t < s)
|
55
51
|
return !0;
|
56
|
-
if (
|
52
|
+
if (o) {
|
57
53
|
const a = new Date(t, e.m - 1, e.d);
|
58
|
-
if (!
|
59
|
-
const
|
60
|
-
return
|
54
|
+
if (!o(a)) return !1;
|
55
|
+
const w = new Date(t, 2, 15), r = new Date(t, 5, 15), m = new Date(t, 8, 15), f = new Date(t, 11, 15);
|
56
|
+
return o(w) && o(r) && o(m) && o(f);
|
61
57
|
}
|
62
58
|
return !1;
|
63
|
-
},
|
64
|
-
|
59
|
+
}, R = (t) => {
|
60
|
+
g(t) || (N ? N(t) : E(
|
65
61
|
/* @__PURE__ */ new Date(
|
66
|
-
`${t}-${
|
62
|
+
`${t}-${F.Number(2, e.m)}-${F.Number(2, e.d)}`
|
67
63
|
)
|
68
64
|
));
|
69
65
|
};
|
70
|
-
return /* @__PURE__ */
|
71
|
-
"div",
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
66
|
+
return /* @__PURE__ */ b("div", { className: n["calendar-block"], ref: y, children: [
|
67
|
+
/* @__PURE__ */ b("div", { className: n.h, children: [
|
68
|
+
/* @__PURE__ */ c(
|
69
|
+
P,
|
70
|
+
{
|
71
|
+
isIconButton: !0,
|
72
|
+
iconName: "DropdownArrowLeft16px",
|
73
|
+
onClick: H,
|
74
|
+
variant: "secondary-gray",
|
75
|
+
size: "l"
|
76
|
+
}
|
76
77
|
),
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
{
|
114
|
-
type: "button",
|
115
|
-
onClick: () => I(t),
|
116
|
-
disabled: s,
|
117
|
-
className: P(
|
118
|
-
s ? o.m : o.a,
|
119
|
-
{
|
120
|
-
[o.current]: B.y === t
|
121
|
-
},
|
122
|
-
{
|
123
|
-
[o.selecte]: d && $.y === t
|
124
|
-
}
|
125
|
-
),
|
126
|
-
children: t
|
127
|
-
},
|
128
|
-
b
|
129
|
-
);
|
130
|
-
}) })
|
131
|
-
]
|
132
|
-
}
|
133
|
-
);
|
78
|
+
/* @__PURE__ */ c(
|
79
|
+
"button",
|
80
|
+
{
|
81
|
+
type: "button",
|
82
|
+
onClick: () => d == null ? void 0 : d("years"),
|
83
|
+
className: n.d
|
84
|
+
}
|
85
|
+
),
|
86
|
+
/* @__PURE__ */ c(
|
87
|
+
P,
|
88
|
+
{
|
89
|
+
isIconButton: !0,
|
90
|
+
iconName: "DropdownArrowRight16px",
|
91
|
+
onClick: B,
|
92
|
+
variant: "secondary-gray",
|
93
|
+
size: "l"
|
94
|
+
}
|
95
|
+
)
|
96
|
+
] }),
|
97
|
+
/* @__PURE__ */ c("div", { className: n.monthGrid, "data-testid": "year-picker", children: Q.map((t, x) => {
|
98
|
+
const s = g(t);
|
99
|
+
return /* @__PURE__ */ c(
|
100
|
+
"button",
|
101
|
+
{
|
102
|
+
type: "button",
|
103
|
+
onClick: () => R(t),
|
104
|
+
disabled: s,
|
105
|
+
className: $(s ? n.m : n.a, {
|
106
|
+
[n.current]: u && G.y === t
|
107
|
+
}),
|
108
|
+
children: t
|
109
|
+
},
|
110
|
+
x
|
111
|
+
);
|
112
|
+
}) })
|
113
|
+
] });
|
134
114
|
};
|
135
115
|
export {
|
136
|
-
|
116
|
+
W as YearPickerModal
|
137
117
|
};
|
@@ -10,9 +10,9 @@ export declare enum EDatePickerValue {
|
|
10
10
|
CurrentDate = "20240510",
|
11
11
|
CurrentDate3 = "2024-09-10"
|
12
12
|
}
|
13
|
-
export type TCalendarBlockPosition = 'top' | 'medium' | 'bottom';
|
14
13
|
export declare const BLOCK_WIDTH = 368;
|
15
14
|
export declare const COUNT_WORK_DAYS = 4;
|
16
15
|
export declare const MAX_DAY = 31;
|
17
16
|
export declare const MAX_MONTH = 12;
|
18
17
|
export declare const DATE_LENGTH = 10;
|
18
|
+
export declare const MAX_MOBILE_WIDTH = 500;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
var n = /* @__PURE__ */ ((t) => (t.CurrentDate1 = "2024-08-01", t.CurrentDate2 = "2024-07-01", t.CurrentDate3 = "1995-07-11", t))(n || {});
|
2
|
-
const s = ["
|
2
|
+
const s = ["пн", "вт", "ср", "чт", "пт", "сб", "вс"], o = [
|
3
3
|
"Январь",
|
4
4
|
"Февраль",
|
5
5
|
"Март",
|
@@ -14,15 +14,16 @@ const s = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], C = [
|
|
14
14
|
"Декабрь"
|
15
15
|
];
|
16
16
|
var r = /* @__PURE__ */ ((t) => (t.CurrentDate1 = "", t.CurrentDate = "20240510", t.CurrentDate3 = "2024-09-10", t))(r || {});
|
17
|
-
const
|
17
|
+
const C = 368, _ = 4, u = 31, A = 12, T = 10, D = 500;
|
18
18
|
export {
|
19
|
-
|
20
|
-
|
19
|
+
C as BLOCK_WIDTH,
|
20
|
+
_ as COUNT_WORK_DAYS,
|
21
21
|
T as DATE_LENGTH,
|
22
22
|
n as EDatePickerBeforeDate,
|
23
23
|
r as EDatePickerValue,
|
24
|
-
|
24
|
+
u as MAX_DAY,
|
25
|
+
D as MAX_MOBILE_WIDTH,
|
25
26
|
A as MAX_MONTH,
|
26
|
-
|
27
|
+
o as months,
|
27
28
|
s as week
|
28
29
|
};
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import { DependencyList } from 'react';
|
2
|
-
import { TCalendarBlockPosition } from './constants';
|
3
2
|
|
4
|
-
export declare const useDatePickerPosition: (deps?: DependencyList) =>
|
3
|
+
export declare const useDatePickerPosition: (deps?: DependencyList) => import('react').RefObject<HTMLDivElement>;
|
@@ -1,20 +1,20 @@
|
|
1
|
-
import { useRef as
|
2
|
-
import { BLOCK_WIDTH as
|
3
|
-
const
|
4
|
-
const t =
|
5
|
-
return
|
6
|
-
var s,
|
7
|
-
const
|
1
|
+
import { useRef as x, useEffect as w } from "react";
|
2
|
+
import { BLOCK_WIDTH as o, MAX_MOBILE_WIDTH as g } from "./constants.js";
|
3
|
+
const W = (a) => {
|
4
|
+
const t = x(null);
|
5
|
+
return w(() => {
|
6
|
+
var s, l, u, p, f, y;
|
7
|
+
const d = window.innerHeight, c = window.innerWidth;
|
8
8
|
if (t.current !== null) {
|
9
|
-
const
|
10
|
-
if (
|
11
|
-
const e =
|
9
|
+
const h = ((l = (s = t == null ? void 0 : t.current) == null ? void 0 : s.parentElement) == null ? void 0 : l.offsetWidth) ?? 0, r = ((p = (u = t == null ? void 0 : t.current) == null ? void 0 : u.parentElement) == null ? void 0 : p.offsetHeight) ?? 0, n = (y = (f = t == null ? void 0 : t.current) == null ? void 0 : f.parentElement) == null ? void 0 : y.getBoundingClientRect(), i = t.current.offsetHeight;
|
10
|
+
if (c < n.x + o) {
|
11
|
+
const e = h - o;
|
12
12
|
n.x - Math.abs(e) < 0 ? t.current.style.left = (e < 0 ? e / 2 : e) + "px" : t.current.style.left = e + "px";
|
13
13
|
}
|
14
|
-
|
14
|
+
d < n.y + i + r ? n.y - i > 0 ? t.current.style.top = -i + "px" : c > g ? t.current.style.top = r + "px" : (t.current.style.position = "fixed", t.current.style.top = `calc(50vh - ${i / 2}px)`, t.current.style.left = `calc(50vw - ${o / 2}px)`) : t.current.style.top = r + "px", t.current.style.opacity = "1";
|
15
15
|
}
|
16
|
-
}, [
|
16
|
+
}, [a]), t;
|
17
17
|
};
|
18
18
|
export {
|
19
|
-
|
19
|
+
W as useDatePickerPosition
|
20
20
|
};
|