mimir-ui-kit 1.43.27 → 1.44.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/Input-IzZ6B9kw.js +232 -0
- package/dist/assets/Avatar.css +1 -1
- package/dist/assets/Chip.css +1 -1
- package/dist/assets/CopyText.css +1 -0
- package/dist/assets/Counter.css +1 -0
- package/dist/assets/Drawer.css +1 -1
- package/dist/assets/DropdownSelect.css +1 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/TabTrail.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +41 -37
- package/dist/components/Avatar/constants.d.ts +5 -0
- package/dist/components/Avatar/constants.js +3 -2
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +5 -4
- package/dist/components/Avatar/types.d.ts +3 -1
- package/dist/components/Chip/Chip.d.ts +5 -1
- package/dist/components/Chip/Chip.js +45 -36
- package/dist/components/Chip/constants.d.ts +5 -1
- package/dist/components/Chip/constants.js +3 -3
- package/dist/components/CopyText/CopyText.d.ts +3 -0
- package/dist/components/CopyText/CopyText.js +96 -0
- package/dist/components/CopyText/index.d.ts +2 -0
- package/dist/components/CopyText/index.js +4 -0
- package/dist/components/CopyText/types.d.ts +32 -0
- package/dist/components/DatePicker/DatePicker.d.ts +11 -0
- package/dist/components/DatePicker/DatePicker.js +96 -93
- package/dist/components/DatePicker/DatePickerModal.js +1 -1
- package/dist/components/DatePicker/MonthPickerModal.js +1 -1
- package/dist/components/DatePicker/YearPickerModal.js +1 -1
- package/dist/components/DatePicker/constants.d.ts +6 -0
- package/dist/components/DatePicker/constants.js +13 -12
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/index.js +3 -1
- package/dist/components/Drawer/Drawer.js +47 -47
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +3 -0
- package/dist/components/DropdownSelect/DropdownSelect.js +115 -0
- package/dist/components/DropdownSelect/constants.d.ts +5 -0
- package/dist/components/DropdownSelect/constants.js +4 -0
- package/dist/components/DropdownSelect/index.d.ts +3 -0
- package/dist/components/DropdownSelect/index.js +6 -0
- package/dist/components/DropdownSelect/types.d.ts +56 -0
- package/dist/components/Input/Input.d.ts +5 -0
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/constants.d.ts +6 -0
- package/dist/components/Input/constants.js +4 -3
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/Pagination/Counter/Counter.d.ts +9 -0
- package/dist/components/Pagination/Counter/Counter.js +28 -0
- package/dist/components/Pagination/Pagination.d.ts +17 -0
- package/dist/components/Pagination/Pagination.js +167 -126
- package/dist/components/Pagination/constants.d.ts +6 -0
- package/dist/components/Pagination/constants.js +5 -3
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Pagination/index.js +4 -2
- package/dist/components/SelectSearch/SelectSearch.d.ts +2 -1
- package/dist/components/SelectSearch/SelectSearch.js +193 -187
- package/dist/components/SelectSearch/constants.d.ts +6 -0
- package/dist/components/SelectSearch/constants.js +7 -5
- package/dist/components/SelectSearch/index.d.ts +1 -1
- package/dist/components/SelectSearch/index.js +5 -4
- package/dist/components/SelectSearch/types.d.ts +6 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/TabTrail/TabTrail.d.ts +16 -0
- package/dist/components/TabTrail/TabTrail.js +257 -220
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/index.d.ts +8 -4
- package/dist/components/index.js +178 -166
- package/dist/index.js +203 -191
- package/dist/styles.module-D3nnIVCZ.js +31 -0
- package/package.json +1 -1
- package/dist/Input-BU_6U1CW.js +0 -227
- package/dist/styles.module-Cuqm31CO.js +0 -28
@@ -1,19 +1,19 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as z, jsx as D } from "react/jsx-runtime";
|
2
2
|
import { c as G } from "../../index-DIxK0V-G.js";
|
3
|
-
import { memo as
|
4
|
-
import { months as $, 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 { Icon as
|
3
|
+
import { memo as wt, forwardRef as kt, useState as b, useEffect as H } from "react";
|
4
|
+
import { months as $, EDatePickerBorderRadius as C, MAX_DAY as Nt, MAX_MONTH as ut, DATE_LENGTH as ht } from "./constants.js";
|
5
|
+
import { DatePickerModal as Mt } from "./DatePickerModal.js";
|
6
|
+
import { MonthPickerModal as gt } from "./MonthPickerModal.js";
|
7
|
+
import { c as l } from "../../styles.module-D3nnIVCZ.js";
|
8
|
+
import { formatDatePart as R } from "./utils.js";
|
9
|
+
import { YearPickerModal as Tt } from "./YearPickerModal.js";
|
10
|
+
import { useClickOutside as bt } from "../../hooks/useClickOutside/useClickOutside.js";
|
11
|
+
import { Icon as B } from "../../icons/Icon.js";
|
12
12
|
import { formating as p } from "../../utils/index.js";
|
13
|
-
import { I as
|
14
|
-
import { EInputStatus as
|
15
|
-
const
|
16
|
-
|
13
|
+
import { I as $t } from "../../Input-IzZ6B9kw.js";
|
14
|
+
import { EInputStatus as At, EInputSize as V } from "../Input/constants.js";
|
15
|
+
const Pt = wt(
|
16
|
+
kt(
|
17
17
|
({
|
18
18
|
size: j,
|
19
19
|
value: k,
|
@@ -26,22 +26,23 @@ const $t = dt(
|
|
26
26
|
onError: M,
|
27
27
|
onBlur: m,
|
28
28
|
validateImmediately: L,
|
29
|
-
variant:
|
29
|
+
variant: tt,
|
30
30
|
disabled: _ = !1,
|
31
31
|
editable: A = !1,
|
32
32
|
openOnInput: W = !0,
|
33
|
-
sendIntermediateValues:
|
33
|
+
sendIntermediateValues: et = !1,
|
34
34
|
disableFuture: q = !1,
|
35
|
-
disablePast:
|
35
|
+
disablePast: J = !1,
|
36
36
|
disabledDate: O,
|
37
37
|
validRange: o,
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
borderRadius: U = C.All,
|
39
|
+
...P
|
40
|
+
}, st) => {
|
41
|
+
const [S, d] = b(!1), [X, y] = b(n), [f, g] = b(
|
41
42
|
() => k && !isNaN(new Date(k).getTime()) ? new Date(k) : void 0
|
42
|
-
), [
|
43
|
-
|
44
|
-
|
43
|
+
), [Y, E] = b(v), [rt, I] = b(""), [at, T] = b();
|
44
|
+
P.status = !!Y && At.Error || P.status, H(() => {
|
45
|
+
E(v);
|
45
46
|
}, [v]), H(() => {
|
46
47
|
g(
|
47
48
|
k && !isNaN(new Date(k).getTime()) ? new Date(k) : void 0
|
@@ -68,23 +69,23 @@ const $t = dt(
|
|
68
69
|
break;
|
69
70
|
}
|
70
71
|
}
|
71
|
-
|
72
|
+
I(t);
|
72
73
|
} else
|
73
|
-
|
74
|
+
I("");
|
74
75
|
}, [f, N]);
|
75
|
-
const
|
76
|
+
const K = k && new Date(k).getTime;
|
76
77
|
H(() => {
|
77
|
-
L && (
|
78
|
-
}, [L, w,
|
79
|
-
isActive:
|
78
|
+
L && (K ? (E(!1), M == null || M({ name: w, active: !1 })) : (E(!0), M == null || M({ name: w, active: !0 })));
|
79
|
+
}, [L, w, K]), bt({
|
80
|
+
isActive: S,
|
80
81
|
setActive: (t) => {
|
81
|
-
d(t),
|
82
|
+
d(t), y(n), t || T(void 0);
|
82
83
|
},
|
83
|
-
className:
|
84
|
+
className: l["calendar-block"]
|
84
85
|
});
|
85
|
-
const
|
86
|
+
const ct = () => {
|
86
87
|
!_ && (W || !A) && d(!0);
|
87
|
-
},
|
88
|
+
}, Q = (t) => {
|
88
89
|
const s = t.getTime();
|
89
90
|
if (t.setHours(0, 0, 0, 0), h && (typeof h == "string" ? new Date(h) : h).getTime() > s)
|
90
91
|
return !1;
|
@@ -92,7 +93,7 @@ const $t = dt(
|
|
92
93
|
const e = /* @__PURE__ */ new Date();
|
93
94
|
if (e.setHours(0, 0, 0, 0), t.getTime() > e.getTime()) return !1;
|
94
95
|
}
|
95
|
-
if (
|
96
|
+
if (J) {
|
96
97
|
const e = /* @__PURE__ */ new Date();
|
97
98
|
if (e.setHours(0, 0, 0, 0), s < e.getTime()) return !1;
|
98
99
|
}
|
@@ -110,7 +111,7 @@ const $t = dt(
|
|
110
111
|
if (c.setHours(0, 0, 0, 0), u.setHours(23, 59, 59, 999), t < c || t > u) return !1;
|
111
112
|
}
|
112
113
|
return !0;
|
113
|
-
},
|
114
|
+
}, it = (t) => {
|
114
115
|
if (!isNaN(t.getTime())) {
|
115
116
|
g(t), T(void 0);
|
116
117
|
let e = "";
|
@@ -138,7 +139,7 @@ const $t = dt(
|
|
138
139
|
name: w
|
139
140
|
});
|
140
141
|
}
|
141
|
-
|
142
|
+
X === "years" && (n === "years" ? (d(!1), y(n)) : y("months")), X === "months" && (n === "months" ? (d(!1), y(n)) : y("days")), g(t);
|
142
143
|
let s = "";
|
143
144
|
switch (N) {
|
144
145
|
case "year": {
|
@@ -163,9 +164,9 @@ const $t = dt(
|
|
163
164
|
value: s,
|
164
165
|
name: w
|
165
166
|
}), m == null || m(s);
|
166
|
-
},
|
167
|
+
}, ot = (t) => {
|
167
168
|
const s = f || /* @__PURE__ */ new Date(), e = s.getDate(), i = s.getMonth() + 1, r = new Date(t, i - 1, e);
|
168
|
-
if (r.getFullYear() === t && r.getMonth() === i - 1 && r.getDate() === e &&
|
169
|
+
if (r.getFullYear() === t && r.getMonth() === i - 1 && r.getDate() === e && Q(r)) {
|
169
170
|
g(r), T(void 0);
|
170
171
|
let c = "";
|
171
172
|
switch (N) {
|
@@ -190,15 +191,15 @@ const $t = dt(
|
|
190
191
|
value: c,
|
191
192
|
name: w
|
192
193
|
}), m == null || m(c), n === "years") {
|
193
|
-
d(!1),
|
194
|
+
d(!1), y(n);
|
194
195
|
return;
|
195
196
|
}
|
196
197
|
} else
|
197
198
|
T(new Date(t, i - 1, 1));
|
198
|
-
n === "years" ? (d(!1),
|
199
|
-
},
|
199
|
+
n === "years" ? (d(!1), y(n)) : y("months");
|
200
|
+
}, mt = (t, s) => {
|
200
201
|
const i = (f || /* @__PURE__ */ new Date()).getDate(), r = new Date(t, s - 1, i);
|
201
|
-
if (r.getFullYear() === t && r.getMonth() === s - 1 && r.getDate() === i &&
|
202
|
+
if (r.getFullYear() === t && r.getMonth() === s - 1 && r.getDate() === i && Q(r)) {
|
202
203
|
g(r), T(void 0);
|
203
204
|
let c = "";
|
204
205
|
switch (N) {
|
@@ -223,31 +224,31 @@ const $t = dt(
|
|
223
224
|
value: c,
|
224
225
|
name: w
|
225
226
|
}), m == null || m(c), n === "months") {
|
226
|
-
d(!1),
|
227
|
+
d(!1), y(n);
|
227
228
|
return;
|
228
229
|
}
|
229
230
|
} else
|
230
231
|
T(new Date(t, s - 1, 1));
|
231
|
-
n === "months" ? (d(!1),
|
232
|
-
},
|
232
|
+
n === "months" ? (d(!1), y(n)) : y("days");
|
233
|
+
}, ft = (t) => {
|
233
234
|
if (A) {
|
234
235
|
const s = t.target.value.replace(/[^\d]/g, "");
|
235
236
|
if (s.length === 0)
|
236
|
-
|
237
|
+
I(""), a == null || a({ value: "", name: w }), m == null || m("");
|
237
238
|
else {
|
238
239
|
const [e, i, r] = [
|
239
|
-
|
240
|
-
|
240
|
+
R(s.substring(0, 2), Nt),
|
241
|
+
R(s.substring(2, 4), ut),
|
241
242
|
s.substring(4, 8)
|
242
243
|
], c = [e, i, r].filter(Boolean).join("/");
|
243
|
-
if (
|
244
|
+
if (I(c), et) {
|
244
245
|
const u = r ? `${r}-${i || "00"}-${e || "00"}` : [e, i, r].filter(Boolean).join("-");
|
245
246
|
a == null || a({
|
246
247
|
value: u,
|
247
248
|
name: w
|
248
249
|
});
|
249
250
|
}
|
250
|
-
if (c.length ===
|
251
|
+
if (c.length === ht) {
|
251
252
|
const u = parseInt(r), x = /* @__PURE__ */ new Date(
|
252
253
|
`${u}-${i.padStart(2, "0")}-${e.padStart(2, "0")}`
|
253
254
|
);
|
@@ -258,96 +259,98 @@ const $t = dt(
|
|
258
259
|
}
|
259
260
|
}
|
260
261
|
}
|
261
|
-
},
|
262
|
-
let
|
262
|
+
}, nt = G(l.wrapper, S && l.active), lt = G(l.input, l.inputBorderControl);
|
263
|
+
let Z;
|
263
264
|
if (o) {
|
264
265
|
let t, s;
|
265
|
-
typeof o[0] == "string" ? t = new Date(o[0]) : t = o[0], typeof o[1] == "string" ? s = new Date(o[1]) : s = o[1],
|
266
|
+
typeof o[0] == "string" ? t = new Date(o[0]) : t = o[0], typeof o[1] == "string" ? s = new Date(o[1]) : s = o[1], Z = [t, s];
|
266
267
|
}
|
267
268
|
const F = {
|
268
|
-
onChangeValue:
|
269
|
-
date:
|
269
|
+
onChangeValue: it,
|
270
|
+
date: at || f || /* @__PURE__ */ new Date(),
|
270
271
|
selectedDate: f,
|
271
272
|
before: typeof h == "string" ? new Date(h) : h,
|
272
|
-
onChangeType:
|
273
|
+
onChangeType: y,
|
273
274
|
setIsActive: d,
|
274
275
|
disableFuture: q,
|
275
|
-
disablePast:
|
276
|
+
disablePast: J,
|
276
277
|
disabledDate: O,
|
277
|
-
validRange:
|
278
|
+
validRange: Z,
|
278
279
|
dateFormat: N
|
279
|
-
},
|
280
|
+
}, yt = {
|
280
281
|
...F,
|
281
|
-
onChangeMonth:
|
282
|
+
onChangeMonth: mt,
|
282
283
|
dateFormat: N
|
283
|
-
},
|
284
|
+
}, pt = {
|
284
285
|
...F,
|
285
|
-
onChangeYear:
|
286
|
-
},
|
287
|
-
switch (
|
286
|
+
onChangeYear: ot
|
287
|
+
}, dt = (() => {
|
288
|
+
switch (X) {
|
288
289
|
case "months":
|
289
|
-
return () => /* @__PURE__ */ D(
|
290
|
+
return () => /* @__PURE__ */ D(gt, { ...yt });
|
290
291
|
case "years":
|
291
|
-
return () => /* @__PURE__ */ D(
|
292
|
+
return () => /* @__PURE__ */ D(Tt, { ...pt });
|
292
293
|
default:
|
293
|
-
return () => /* @__PURE__ */ D(
|
294
|
+
return () => /* @__PURE__ */ D(Mt, { ...F });
|
294
295
|
}
|
295
|
-
})(),
|
296
|
+
})(), Dt = ({ isActive: t }) => /* @__PURE__ */ D("button", { onClick: (e) => {
|
296
297
|
e.stopPropagation(), _ || d(!t);
|
297
|
-
}, className:
|
298
|
-
|
298
|
+
}, className: l["icon-button"], children: t ? /* @__PURE__ */ D(
|
299
|
+
B,
|
299
300
|
{
|
300
|
-
iconName: j ===
|
301
|
+
iconName: j === V.S ? "DropdownArrowUp16px" : "DropdownArrowUp24px"
|
301
302
|
}
|
302
303
|
) : /* @__PURE__ */ D(
|
303
|
-
|
304
|
+
B,
|
304
305
|
{
|
305
|
-
iconName: j ===
|
306
|
+
iconName: j === V.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px"
|
306
307
|
}
|
307
308
|
) });
|
308
|
-
return /* @__PURE__ */
|
309
|
-
/* @__PURE__ */
|
309
|
+
return /* @__PURE__ */ z("div", { className: l["input-field-group-datePicker"], children: [
|
310
|
+
/* @__PURE__ */ z("div", { className: nt, "data-disabled": _, children: [
|
310
311
|
/* @__PURE__ */ D(
|
311
312
|
"div",
|
312
313
|
{
|
313
314
|
role: "button",
|
314
|
-
"data-status":
|
315
|
-
className: G(
|
316
|
-
[
|
315
|
+
"data-status": P.status,
|
316
|
+
className: G(l["date-wrapper"], {
|
317
|
+
[l.editable]: A,
|
318
|
+
[l[`border-radius-${U}`]]: U !== C.All
|
317
319
|
}),
|
318
|
-
onClick:
|
320
|
+
onClick: ct,
|
319
321
|
children: /* @__PURE__ */ D(
|
320
|
-
|
322
|
+
$t,
|
321
323
|
{
|
322
|
-
ref:
|
323
|
-
className:
|
324
|
-
wrapperClassName:
|
324
|
+
ref: st,
|
325
|
+
className: lt,
|
326
|
+
wrapperClassName: l["input-wrapper"],
|
325
327
|
size: j,
|
326
328
|
type: "text",
|
327
|
-
variant:
|
328
|
-
value:
|
329
|
-
onChange:
|
329
|
+
variant: tt,
|
330
|
+
value: rt,
|
331
|
+
onChange: ft,
|
330
332
|
rightAddon: {
|
331
333
|
addonType: "react-node",
|
332
|
-
addonContent: /* @__PURE__ */ D(
|
334
|
+
addonContent: /* @__PURE__ */ D(Dt, { isActive: S })
|
333
335
|
},
|
334
|
-
rightSlotClassName:
|
336
|
+
rightSlotClassName: l["right-slot"],
|
335
337
|
onFocus: () => {
|
336
338
|
W && !A && d(!0);
|
337
339
|
},
|
338
|
-
|
340
|
+
borderRadius: U,
|
341
|
+
...P
|
339
342
|
}
|
340
343
|
)
|
341
344
|
}
|
342
345
|
),
|
343
|
-
|
346
|
+
S && /* @__PURE__ */ D(dt, {})
|
344
347
|
] }),
|
345
|
-
|
348
|
+
Y && typeof Y == "string" && /* @__PURE__ */ D("div", { className: l.textError, children: Y })
|
346
349
|
] });
|
347
350
|
}
|
348
351
|
)
|
349
352
|
);
|
350
|
-
|
353
|
+
Pt.displayName = "DatePicker";
|
351
354
|
export {
|
352
|
-
|
355
|
+
Pt as DatePicker
|
353
356
|
};
|
@@ -3,7 +3,7 @@ import { c as A } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { useState as U } from "react";
|
4
4
|
import { week as V, COUNT_WORK_DAYS as W } from "./constants.js";
|
5
5
|
import { useDatePickerPosition as E } from "./hooks.js";
|
6
|
-
import { c as n } from "../../styles.module-
|
6
|
+
import { c as n } from "../../styles.module-D3nnIVCZ.js";
|
7
7
|
import { getUpdateDate as B } from "./utils.js";
|
8
8
|
import { Icon as K } from "../../icons/Icon.js";
|
9
9
|
import { formating as m } from "../../utils/index.js";
|
@@ -3,7 +3,7 @@ import { c as _ } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { useState as C } from "react";
|
4
4
|
import { months as L } from "./constants.js";
|
5
5
|
import { useDatePickerPosition as b } from "./hooks.js";
|
6
|
-
import { c } from "../../styles.module-
|
6
|
+
import { c } from "../../styles.module-D3nnIVCZ.js";
|
7
7
|
import { Icon as q } from "../../icons/Icon.js";
|
8
8
|
import { formating as P } from "../../utils/index.js";
|
9
9
|
import { Button as A } from "../Button/Button.js";
|
@@ -2,7 +2,7 @@ import { jsxs as b, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { c as $ } from "../../index-DIxK0V-G.js";
|
3
3
|
import { useState as j } from "react";
|
4
4
|
import { useDatePickerPosition as z } from "./hooks.js";
|
5
|
-
import { c as n } from "../../styles.module-
|
5
|
+
import { c as n } from "../../styles.module-D3nnIVCZ.js";
|
6
6
|
import { formating as F } from "../../utils/index.js";
|
7
7
|
import { Button as P } from "../Button/Button.js";
|
8
8
|
const p = 15, I = 7, W = ({
|
@@ -10,6 +10,12 @@ export declare enum EDatePickerValue {
|
|
10
10
|
CurrentDate = "20240510",
|
11
11
|
CurrentDate3 = "2024-09-10"
|
12
12
|
}
|
13
|
+
export declare enum EDatePickerBorderRadius {
|
14
|
+
All = "all",
|
15
|
+
Left = "left",
|
16
|
+
Right = "right",
|
17
|
+
None = "none"
|
18
|
+
}
|
13
19
|
export declare const BLOCK_WIDTH = 368;
|
14
20
|
export declare const COUNT_WORK_DAYS = 4;
|
15
21
|
export declare const MAX_DAY = 31;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
var
|
2
|
-
const
|
1
|
+
var t = /* @__PURE__ */ ((n) => (n.CurrentDate1 = "2024-08-01", n.CurrentDate2 = "2024-07-01", n.CurrentDate3 = "1995-07-11", n))(t || {});
|
2
|
+
const _ = ["пн", "вт", "ср", "чт", "пт", "сб", "вс"], o = [
|
3
3
|
"Январь",
|
4
4
|
"Февраль",
|
5
5
|
"Март",
|
@@ -13,17 +13,18 @@ const s = ["пн", "вт", "ср", "чт", "пт", "сб", "вс"], o = [
|
|
13
13
|
"Ноябрь",
|
14
14
|
"Декабрь"
|
15
15
|
];
|
16
|
-
var r = /* @__PURE__ */ ((
|
17
|
-
const
|
16
|
+
var r = /* @__PURE__ */ ((n) => (n.CurrentDate1 = "", n.CurrentDate = "20240510", n.CurrentDate3 = "2024-09-10", n))(r || {}), C = /* @__PURE__ */ ((n) => (n.All = "all", n.Left = "left", n.Right = "right", n.None = "none", n))(C || {});
|
17
|
+
const A = 368, s = 4, T = 31, M = 12, O = 10, u = 500;
|
18
18
|
export {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
A as BLOCK_WIDTH,
|
20
|
+
s as COUNT_WORK_DAYS,
|
21
|
+
O as DATE_LENGTH,
|
22
|
+
t as EDatePickerBeforeDate,
|
23
|
+
C as EDatePickerBorderRadius,
|
23
24
|
r as EDatePickerValue,
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
T as MAX_DAY,
|
26
|
+
u as MAX_MOBILE_WIDTH,
|
27
|
+
M as MAX_MONTH,
|
27
28
|
o as months,
|
28
|
-
|
29
|
+
_ as week
|
29
30
|
};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
2
2
|
import { c as t } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as
|
3
|
+
import { forwardRef as re, useState as p, useRef as L, useEffect as M, useCallback as z } from "react";
|
4
4
|
import { EDrawerPosition as R } from "./constants.js";
|
5
|
-
import { useContainer as
|
5
|
+
import { useContainer as ne } from "./hooks.js";
|
6
6
|
import { ScrollWrapper as se } from "./ScrollWrapper/index.js";
|
7
7
|
import { useMediaQuery as ie } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
8
8
|
import { EMediaQuery as ae } from "../../hooks/useMediaQuery/constants.js";
|
@@ -13,27 +13,27 @@ import { EButtonVariantDefault as de, EButtonSize as c } from "../Button/constan
|
|
13
13
|
import { Loader as ue } from "../Loader/Loader.js";
|
14
14
|
import { Portal as me } from "../Portal/Portal.js";
|
15
15
|
import { EScrollBarVariant as fe, EScrollBarSize as _e } from "../ScrollBar/constants.js";
|
16
|
-
import '../../assets/Drawer.css';const
|
17
|
-
drawerContainer:
|
16
|
+
import '../../assets/Drawer.css';const ve = "_drawerContainer_1rv8z_2", he = "_drawer_1rv8z_2", pe = "_content_1rv8z_31", ze = "_header_1rv8z_46", Ce = "_title_1rv8z_60", ge = "_space_1rv8z_74", we = "_inner_1rv8z_85", ye = "_button_1rv8z_101", be = "_footer_1rv8z_106", Ne = "_left_1rv8z_122", ke = "_right_1rv8z_126", Se = "_full_1rv8z_130", Be = "_bottom_1rv8z_140", Ee = "_opened_1rv8z_157", Ie = "_overlay_1rv8z_213", Oe = "_unmount_1rv8z_231", e = {
|
17
|
+
drawerContainer: ve,
|
18
18
|
drawer: he,
|
19
|
-
content:
|
20
|
-
header:
|
21
|
-
"sticky-header": "_sticky-
|
22
|
-
title:
|
23
|
-
space:
|
24
|
-
inner:
|
25
|
-
"is-loading": "_is-
|
26
|
-
button:
|
27
|
-
footer:
|
28
|
-
"has-scroll": "_has-
|
29
|
-
"footer-button": "_footer-
|
19
|
+
content: pe,
|
20
|
+
header: ze,
|
21
|
+
"sticky-header": "_sticky-header_1rv8z_54",
|
22
|
+
title: Ce,
|
23
|
+
space: ge,
|
24
|
+
inner: we,
|
25
|
+
"is-loading": "_is-loading_1rv8z_90",
|
26
|
+
button: ye,
|
27
|
+
footer: be,
|
28
|
+
"has-scroll": "_has-scroll_1rv8z_115",
|
29
|
+
"footer-button": "_footer-button_1rv8z_118",
|
30
30
|
left: Ne,
|
31
31
|
right: ke,
|
32
32
|
full: Se,
|
33
33
|
bottom: Be,
|
34
|
-
"full-bottom-height": "_full-bottom-
|
34
|
+
"full-bottom-height": "_full-bottom-height_1rv8z_151",
|
35
35
|
opened: Ee,
|
36
|
-
"is-closing": "_is-
|
36
|
+
"is-closing": "_is-closing_1rv8z_176",
|
37
37
|
overlay: Ie,
|
38
38
|
unmount: Oe
|
39
39
|
}, Le = 300, Me = (d) => d ? {
|
@@ -45,15 +45,15 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
45
45
|
position: "absolute",
|
46
46
|
zIndex: 90
|
47
47
|
}
|
48
|
-
} : {}, qe =
|
48
|
+
} : {}, qe = re(
|
49
49
|
(d, T) => {
|
50
50
|
const {
|
51
51
|
as: x = "div",
|
52
|
-
isOpen:
|
52
|
+
isOpen: n,
|
53
53
|
onClose: u,
|
54
54
|
title: D,
|
55
55
|
className: A,
|
56
|
-
unmount:
|
56
|
+
unmount: C = !0,
|
57
57
|
isLoading: s = !1,
|
58
58
|
stickyHeader: P,
|
59
59
|
fullBottomHeight: X = !1,
|
@@ -67,13 +67,13 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
67
67
|
classNameDrawerContainer: F,
|
68
68
|
classNameContent: K,
|
69
69
|
classNameFooter: Y,
|
70
|
-
closeOnClickOutside:
|
71
|
-
showCloseButton:
|
70
|
+
closeOnClickOutside: g = !0,
|
71
|
+
showCloseButton: w = !0,
|
72
72
|
getContainer: _,
|
73
73
|
...q
|
74
|
-
} = d, [
|
74
|
+
} = d, [y, b] = p(!1), [J, N] = p(!1), k = L(), v = ie(ae.XS1), { ref: U } = ce({
|
75
75
|
enabled: m === R.BOTTOM
|
76
|
-
}), S =
|
76
|
+
}), S = ne(_), i = L(null), [Z, $] = p(!1);
|
77
77
|
M(() => {
|
78
78
|
const a = () => {
|
79
79
|
if (i.current) {
|
@@ -86,32 +86,32 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
86
86
|
return i.current && O.observe(i.current), () => {
|
87
87
|
O.disconnect();
|
88
88
|
};
|
89
|
-
}, [
|
90
|
-
on:
|
89
|
+
}, [n, s]), le({
|
90
|
+
on: n && !y,
|
91
91
|
paddingRight: j
|
92
92
|
});
|
93
|
-
const
|
94
|
-
u && (
|
95
|
-
u(),
|
93
|
+
const r = z(() => {
|
94
|
+
u && (b(!0), k.current = setTimeout(() => {
|
95
|
+
u(), b(!1);
|
96
96
|
}, Le));
|
97
|
-
}, [u]), ee =
|
98
|
-
|
99
|
-
}, [
|
97
|
+
}, [u]), ee = z(() => {
|
98
|
+
g && r();
|
99
|
+
}, [g, r]), h = z(
|
100
100
|
(a) => {
|
101
|
-
a.key === "Escape" &&
|
101
|
+
a.key === "Escape" && r();
|
102
102
|
},
|
103
|
-
[
|
103
|
+
[r]
|
104
104
|
);
|
105
|
-
M(() => (
|
105
|
+
M(() => (n && (N(!0), window.addEventListener("keydown", h)), () => {
|
106
106
|
N(!1), clearTimeout(k.current), window.removeEventListener("keydown", h);
|
107
|
-
}), [
|
107
|
+
}), [n, h]);
|
108
108
|
const B = {
|
109
109
|
[e.opened]: J,
|
110
|
-
[e["is-closing"]]:
|
110
|
+
[e["is-closing"]]: y,
|
111
111
|
[e["full-bottom-height"]]: X,
|
112
112
|
[e["is-loading"]]: s
|
113
113
|
};
|
114
|
-
if (!
|
114
|
+
if (!n && C)
|
115
115
|
return null;
|
116
116
|
const E = Me(_ !== void 0 && _ !== !1), I = /* @__PURE__ */ l(
|
117
117
|
"div",
|
@@ -122,7 +122,7 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
122
122
|
x,
|
123
123
|
{
|
124
124
|
ref: T,
|
125
|
-
"aria-hidden": !
|
125
|
+
"aria-hidden": !n,
|
126
126
|
role: "dialog",
|
127
127
|
style: E.drawer,
|
128
128
|
className: t(e.drawer, e[m], B, A),
|
@@ -149,14 +149,14 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
149
149
|
}),
|
150
150
|
children: [
|
151
151
|
/* @__PURE__ */ o("h2", { className: t(e.title, Q), children: D }),
|
152
|
-
/* @__PURE__ */ o("div", { className: e.space, children:
|
152
|
+
/* @__PURE__ */ o("div", { className: e.space, children: w && /* @__PURE__ */ o(
|
153
153
|
H,
|
154
154
|
{
|
155
155
|
variant: de.SecondaryWhite,
|
156
156
|
isIconButton: !0,
|
157
|
-
size:
|
157
|
+
size: v ? c.S : c.M,
|
158
158
|
iconName: "Close16px",
|
159
|
-
onClick:
|
159
|
+
onClick: r,
|
160
160
|
className: e.button
|
161
161
|
}
|
162
162
|
) })
|
@@ -188,12 +188,12 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
188
188
|
className: t(e.footer, Y, {
|
189
189
|
[e["has-scroll"]]: Z
|
190
190
|
}),
|
191
|
-
children: typeof f == "function" ? f({ handleClose:
|
191
|
+
children: typeof f == "function" ? f({ handleClose: r }) : f || w && /* @__PURE__ */ o(
|
192
192
|
H,
|
193
193
|
{
|
194
|
-
size:
|
195
|
-
full:
|
196
|
-
onClick:
|
194
|
+
size: v ? c.L : c.XXL,
|
195
|
+
full: v,
|
196
|
+
onClick: r,
|
197
197
|
className: e["footer-button"],
|
198
198
|
children: "Закрыть"
|
199
199
|
}
|
@@ -209,7 +209,7 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
209
209
|
className: t(
|
210
210
|
e.overlay,
|
211
211
|
{
|
212
|
-
[e.unmount]: !
|
212
|
+
[e.unmount]: !C
|
213
213
|
},
|
214
214
|
B
|
215
215
|
),
|