mimir-ui-kit 1.64.4 → 1.64.5
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/assets/Drawer.css +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +5 -4
- package/dist/components/DatePicker/DatePicker.js +195 -194
- package/dist/components/Drawer/Drawer.js +79 -78
- package/dist/components/Drawer/constants.d.ts +2 -1
- package/dist/components/Drawer/constants.js +1 -1
- package/package.json +1 -1
package/dist/assets/Drawer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._drawerContainer_abn3o_2{position:fixed;z-index:1000000}._drawer_abn3o_2{--drawer-width: 808px;--drawer-z-index: 10000;position:fixed;z-index:10000;z-index:var(--drawer-z-index);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:808px;width:var(--drawer-width);height:100%;overflow:auto;background-color:var(--black-5);-webkit-transition:all .3s ease;transition:all .3s ease;pointer-events:none}._drawer_abn3o_2::-webkit-scrollbar{width:3px}._drawer_abn3o_2::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:2px}._drawer_abn3o_2::-webkit-scrollbar-track{background-color:var(--white)}._drawer_abn3o_2 ._content_abn3o_31{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:var(--mimir-space-m) var(--mimir-space-xs) var(--mimir-space-3xs) var(--mimir-space-4xl);overflow:hidden;-webkit-transition:all .3s ease;transition:all .3s ease}@media (max-width: 600px){._drawer_abn3o_2 ._content_abn3o_31{--drawer-width: 100%;padding:var(--mimir-space-m)}}._drawer_abn3o_2 ._header_abn3o_46{display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--mimir-space-xs);min-height:68px}._drawer_abn3o_2 ._header_abn3o_46:not(:last-child){margin-bottom:var(--mimir-space-2xl)}._drawer_abn3o_2 ._header_abn3o_46._sticky-header_abn3o_54{position:-webkit-sticky;position:sticky;top:0;left:0;background-color:var(--black-5)}._drawer_abn3o_2 ._header_abn3o_46 ._title_abn3o_60{-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-item-align:end;align-self:flex-end;font-weight:var(--mimir-font-weight-text-medium);font-size:var(--mimir-size-text-xl3);line-height:var(--mimir-space-2xxl);letter-spacing:.7px}@media (max-width: 600px){._drawer_abn3o_2 ._header_abn3o_46 ._title_abn3o_60{font-size:var(--mimir-size-text-xl2);line-height:var(--mimir-line-height-text-xs)}}._drawer_abn3o_2 ._header_abn3o_46 ._space_abn3o_74{-webkit-box-flex:0;-ms-flex:0 0 var(--button-height-m);flex:0 0 var(--button-height-m)}@media (max-width: 600px){._drawer_abn3o_2 ._header_abn3o_46{min-height:55px}._drawer_abn3o_2 ._header_abn3o_46:not(:last-child){margin-bottom:var(--mimir-space-m)}}._drawer_abn3o_2 ._inner_abn3o_85{-webkit-box-flex:1;-ms-flex:1;flex:1;padding-right:var(--mimir-space-xxl);overflow-y:auto}._drawer_abn3o_2 ._inner_abn3o_85._is-loading_abn3o_90{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media (max-width: 600px){._drawer_abn3o_2 ._inner_abn3o_85{padding-right:0}}._drawer_abn3o_2 ._button_abn3o_101{position:absolute;top:var(--mimir-space-m);right:var(--mimir-space-m)}._drawer_abn3o_2 ._footer_abn3o_106{display:block;padding:var(--mimir-space-2xl) var(--mimir-space-xxl) var(--mimir-space-4xl) var(--mimir-space-xxl)}@media (max-width: 600px){._drawer_abn3o_2 ._footer_abn3o_106{padding:var(--mimir-space-m)}}._drawer_abn3o_2 ._footer_abn3o_106._has-scroll_abn3o_115{-webkit-box-shadow:var(--mimir-modal-window-bottom-panel-shadow);box-shadow:var(--mimir-modal-window-bottom-panel-shadow)}._drawer_abn3o_2 ._footer-button_abn3o_118{display:block;margin-left:auto}._drawer_abn3o_2._left_abn3o_122{top:0;left:-100%}._drawer_abn3o_2._right_abn3o_126{top:0;right:-100%}._drawer_abn3o_2._center_abn3o_130{left:50%;top:50%;-webkit-transform:translate(-50%,-50%) scale(.95);transform:translate(-50%,-50%) scale(.95);height:auto;height:initial;border-radius:var(--mimir-control-radius);opacity:0;-webkit-transition:opacity .3s ease-in-out,-webkit-transform .3s ease-in-out;transition:opacity .3s ease-in-out,-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out,opacity .3s ease-in-out;transition:transform .3s ease-in-out,opacity .3s ease-in-out,-webkit-transform .3s ease-in-out}._drawer_abn3o_2._full_abn3o_139{top:0;right:0;bottom:0;left:0;width:100%;height:100%;max-height:100vh;border-radius:0;-webkit-transform:scale(.95);transform:scale(.95);opacity:0;-webkit-transition:opacity .3s ease-in-out,-webkit-transform .3s ease-in-out;transition:opacity .3s ease-in-out,-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out,opacity .3s ease-in-out;transition:transform .3s ease-in-out,opacity .3s ease-in-out,-webkit-transform .3s ease-in-out}._drawer_abn3o_2._bottom_abn3o_149{--drawer-width: calc(100% - var(--mimir-space-m));right:50%;bottom:-100%;left:50%;height:auto;max-height:calc(100% - var(--mimir-space-xs));border-top-left-radius:var(--mimir-control-radius);border-top-right-radius:var(--mimir-control-radius);-webkit-transform:translate(-50%,0);transform:translate(-50%)}._drawer_abn3o_2._bottom_abn3o_149._full-bottom-height_abn3o_160{height:calc(100% - var(--mimir-space-xs))}._drawer_abn3o_2._bottom_abn3o_149._is-loading_abn3o_90{height:50vh}._drawer_abn3o_2._opened_abn3o_166{-webkit-transition:all .3s ease;transition:all .3s ease;pointer-events:auto}._drawer_abn3o_2._opened_abn3o_166._left_abn3o_122{left:0%;-webkit-transition:left .3s ease;transition:left .3s ease}._drawer_abn3o_2._opened_abn3o_166._right_abn3o_126{right:0%;-webkit-transition:right .3s ease;transition:right .3s ease}._drawer_abn3o_2._opened_abn3o_166._bottom_abn3o_149{bottom:0%}._drawer_abn3o_2._opened_abn3o_166._full_abn3o_139{-webkit-transform:scale(1);transform:scale(1);opacity:1}._drawer_abn3o_2._opened_abn3o_166._center_abn3o_130{-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);opacity:1}._drawer_abn3o_2._is-closing_abn3o_189._left_abn3o_122{left:-100%}._drawer_abn3o_2._is-closing_abn3o_189._right_abn3o_126{right:-100%}._drawer_abn3o_2._is-closing_abn3o_189._bottom_abn3o_149{bottom:-100%}._drawer_abn3o_2._is-closing_abn3o_189._full_abn3o_139{-webkit-transform:scale(.95);transform:scale(.95);opacity:0}._drawer_abn3o_2._is-closing_abn3o_189._center_abn3o_130{-webkit-transform:translate(-50%,-50%) scale(.95);transform:translate(-50%,-50%) scale(.95);opacity:0}@media (max-width: 1440px){._drawer_abn3o_2{--drawer-width: 608px}}@media (max-width: 1280px){._drawer_abn3o_2{--drawer-width: 648px}}@media (max-width: 768px){._drawer_abn3o_2{--drawer-width: 584px}}@media (max-width: 600px){._drawer_abn3o_2{--drawer-width: 100%}._drawer_abn3o_2._bottom_abn3o_149{--drawer-width: calc(100% - var(--mimir-space-m))}}._overlay_abn3o_230{--overlay-z-index: 9990;position:fixed;top:0;left:0;z-index:9990;z-index:var(--overlay-z-index);width:100%;height:100%;background-color:#0009;opacity:0;-webkit-transition:all .3s ease;transition:all .3s ease;pointer-events:none}._overlay_abn3o_230._opened_abn3o_166{opacity:1;-webkit-transition:all .3s ease;transition:all .3s ease;pointer-events:auto}._overlay_abn3o_230._opened_abn3o_166._unmount_abn3o_248{z-index:var(--overlay-z-index);-webkit-appearance:none;-moz-appearance:none;appearance:none}._overlay_abn3o_230._is-closing_abn3o_189{opacity:0;-webkit-transition:all .3s ease;transition:all .3s ease}._overlay_abn3o_230._unmount_abn3o_248{z-index:-1;-webkit-appearance:none;-moz-appearance:none;appearance:none}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FocusEventHandler } from 'react';
|
|
1
2
|
import { EDatePickerBorderRadius } from './constants';
|
|
2
3
|
import { TInputProps } from '../Input';
|
|
3
4
|
|
|
@@ -11,9 +12,9 @@ export type TProps = {
|
|
|
11
12
|
*/
|
|
12
13
|
onError?: (e: TDatePickerOnError) => void;
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* Стандартный обработчик потери фокуса input
|
|
15
16
|
*/
|
|
16
|
-
onBlur?:
|
|
17
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
17
18
|
/**
|
|
18
19
|
* Функция ограничения выбора даты (до какой даты выбор не доступен)
|
|
19
20
|
*/
|
|
@@ -106,9 +107,9 @@ export declare const DatePicker: import('react').MemoExoticComponent<import('rea
|
|
|
106
107
|
*/
|
|
107
108
|
onError?: (e: TDatePickerOnError) => void;
|
|
108
109
|
/**
|
|
109
|
-
*
|
|
110
|
+
* Стандартный обработчик потери фокуса input
|
|
110
111
|
*/
|
|
111
|
-
onBlur?:
|
|
112
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
112
113
|
/**
|
|
113
114
|
* Функция ограничения выбора даты (до какой даты выбор не доступен)
|
|
114
115
|
*/
|
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { memo as ht, forwardRef as Mt, useState as
|
|
4
|
-
import { months as
|
|
1
|
+
import { jsxs as F, jsx as D } from "react/jsx-runtime";
|
|
2
|
+
import { c as v } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { memo as ht, forwardRef as Mt, useState as b, useEffect as P } from "react";
|
|
4
|
+
import { months as S, EDatePickerBorderRadius as C, MAX_DAY as gt, MAX_MONTH as Tt, DATE_LENGTH as $t } from "./constants.js";
|
|
5
5
|
import { DatePickerModal as bt } from "./DatePickerModal.js";
|
|
6
6
|
import { MonthPickerModal as At } from "./MonthPickerModal.js";
|
|
7
|
-
import { c as
|
|
8
|
-
import { formatDatePart as
|
|
7
|
+
import { c as m } from "../../styles.module-DjQdoVeY.js";
|
|
8
|
+
import { formatDatePart as R } from "./utils.js";
|
|
9
9
|
import { YearPickerModal as Pt } from "./YearPickerModal.js";
|
|
10
10
|
import { useClickOutside as St } from "../../hooks/useClickOutside/useClickOutside.js";
|
|
11
|
-
import { Icon as
|
|
11
|
+
import { Icon as V } from "../../icons/Icon.js";
|
|
12
12
|
import { formating as p } from "../../utils/index.js";
|
|
13
13
|
import { I as Yt } from "../../Input-JwHUiwVK.js";
|
|
14
|
-
import { EInputStatus as It, EInputSize as
|
|
14
|
+
import { EInputStatus as It, EInputSize as tt } from "../Input/constants.js";
|
|
15
15
|
const xt = ht(
|
|
16
16
|
Mt(
|
|
17
17
|
({
|
|
18
|
-
size:
|
|
19
|
-
value:
|
|
18
|
+
size: H,
|
|
19
|
+
value: w,
|
|
20
20
|
onChangeValue: r,
|
|
21
|
-
name:
|
|
22
|
-
before:
|
|
23
|
-
type:
|
|
24
|
-
dateFormat:
|
|
25
|
-
error:
|
|
26
|
-
onError:
|
|
27
|
-
onBlur:
|
|
28
|
-
validateImmediately:
|
|
21
|
+
name: d,
|
|
22
|
+
before: h,
|
|
23
|
+
type: f = "days",
|
|
24
|
+
dateFormat: N = "full",
|
|
25
|
+
error: B,
|
|
26
|
+
onError: g,
|
|
27
|
+
onBlur: et,
|
|
28
|
+
validateImmediately: G,
|
|
29
29
|
variant: st,
|
|
30
|
-
disabled:
|
|
31
|
-
editable:
|
|
32
|
-
openOnInput:
|
|
30
|
+
disabled: j = !1,
|
|
31
|
+
editable: A = !1,
|
|
32
|
+
openOnInput: W = !0,
|
|
33
33
|
sendIntermediateValues: rt = !1,
|
|
34
|
-
disableFuture:
|
|
35
|
-
disablePast:
|
|
36
|
-
disabledDate:
|
|
37
|
-
validRange:
|
|
38
|
-
borderRadius:
|
|
39
|
-
full:
|
|
40
|
-
position:
|
|
41
|
-
isFixed:
|
|
42
|
-
...
|
|
34
|
+
disableFuture: q = !1,
|
|
35
|
+
disablePast: J = !1,
|
|
36
|
+
disabledDate: E,
|
|
37
|
+
validRange: a,
|
|
38
|
+
borderRadius: L = C.All,
|
|
39
|
+
full: ot,
|
|
40
|
+
position: at,
|
|
41
|
+
isFixed: O = !1,
|
|
42
|
+
...Y
|
|
43
43
|
}, ct) => {
|
|
44
|
-
const [
|
|
45
|
-
() =>
|
|
46
|
-
), [
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
44
|
+
const [T, y] = b(!1), [_, u] = b(f), [i, M] = b(
|
|
45
|
+
() => w && !isNaN(new Date(w).getTime()) ? new Date(w) : void 0
|
|
46
|
+
), [I, U] = b(B), [it, x] = b(""), [nt, $] = b();
|
|
47
|
+
Y.status = !!I && It.Error || Y.status;
|
|
48
|
+
const K = () => {
|
|
49
|
+
y(!1);
|
|
50
50
|
};
|
|
51
|
-
|
|
52
|
-
if (!(
|
|
53
|
-
return window.addEventListener("scroll",
|
|
54
|
-
}, [
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
P(() => {
|
|
52
|
+
if (!(!T || !O))
|
|
53
|
+
return window.addEventListener("scroll", K, !0), () => window.removeEventListener("scroll", K, !0);
|
|
54
|
+
}, [T, O]), P(() => {
|
|
55
|
+
U(B);
|
|
56
|
+
}, [B]), P(() => {
|
|
57
|
+
M(
|
|
58
|
+
w && !isNaN(new Date(w).getTime()) ? new Date(w) : void 0
|
|
59
59
|
);
|
|
60
|
-
}, [
|
|
61
|
-
if (
|
|
60
|
+
}, [w]), P(() => {
|
|
61
|
+
if (i && typeof i != "string" && !isNaN(i == null ? void 0 : i.getTime())) {
|
|
62
62
|
let t = "";
|
|
63
|
-
switch (
|
|
63
|
+
switch (N) {
|
|
64
64
|
case "year": {
|
|
65
|
-
t =
|
|
65
|
+
t = i.getFullYear().toString();
|
|
66
66
|
break;
|
|
67
67
|
}
|
|
68
68
|
case "month": {
|
|
69
|
-
const s =
|
|
69
|
+
const s = S[i.getMonth()], e = i.getFullYear();
|
|
70
70
|
t = `${s} ${e}`;
|
|
71
71
|
break;
|
|
72
72
|
}
|
|
73
73
|
case "full": {
|
|
74
|
-
t = p.Date(
|
|
74
|
+
t = p.Date(i, "dd/mm/yyyy");
|
|
75
75
|
break;
|
|
76
76
|
}
|
|
77
77
|
default: {
|
|
78
|
-
t = p.Date(
|
|
78
|
+
t = p.Date(i, "dd/mm/yyyy");
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
x(t);
|
|
83
83
|
} else
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}, [
|
|
90
|
-
isActive:
|
|
84
|
+
x("");
|
|
85
|
+
}, [i, N]);
|
|
86
|
+
const Q = w && new Date(w).getTime;
|
|
87
|
+
P(() => {
|
|
88
|
+
G && (Q ? (U(!1), g == null || g({ name: d, active: !1 })) : (U(!0), g == null || g({ name: d, active: !0 })));
|
|
89
|
+
}, [G, d, Q]), St({
|
|
90
|
+
isActive: T,
|
|
91
91
|
setActive: (t) => {
|
|
92
|
-
|
|
92
|
+
y(t), u(f), t || $(void 0);
|
|
93
93
|
},
|
|
94
|
-
className:
|
|
94
|
+
className: m["calendar-block"]
|
|
95
95
|
});
|
|
96
|
-
const
|
|
97
|
-
!
|
|
98
|
-
},
|
|
96
|
+
const ft = () => {
|
|
97
|
+
!j && (W || !A) && y(!0);
|
|
98
|
+
}, Z = (t) => {
|
|
99
99
|
const s = t.getTime();
|
|
100
|
-
if (t.setHours(0, 0, 0, 0),
|
|
100
|
+
if (t.setHours(0, 0, 0, 0), h && (typeof h == "string" ? new Date(h) : h).getTime() > s)
|
|
101
101
|
return !1;
|
|
102
|
-
if (
|
|
102
|
+
if (q) {
|
|
103
103
|
const e = /* @__PURE__ */ new Date();
|
|
104
104
|
if (e.setHours(0, 0, 0, 0), t.getTime() > e.getTime()) return !1;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
106
|
+
if (J) {
|
|
107
107
|
const e = /* @__PURE__ */ new Date();
|
|
108
108
|
if (e.setHours(0, 0, 0, 0), s < e.getTime()) return !1;
|
|
109
109
|
}
|
|
110
|
-
if (
|
|
111
|
-
if (
|
|
110
|
+
if (E && E(t)) return !1;
|
|
111
|
+
if (a) {
|
|
112
112
|
let e;
|
|
113
|
-
typeof
|
|
114
|
-
new Date(
|
|
115
|
-
typeof
|
|
113
|
+
typeof a[0] == "string" ? e = [
|
|
114
|
+
new Date(a[0]),
|
|
115
|
+
typeof a[1] == "string" ? new Date(a[1]) : a[1]
|
|
116
116
|
] : e = [
|
|
117
|
-
|
|
118
|
-
typeof
|
|
117
|
+
a[0],
|
|
118
|
+
typeof a[1] == "string" ? new Date(a[1]) : a[1]
|
|
119
119
|
];
|
|
120
|
-
const [c,
|
|
121
|
-
if (
|
|
120
|
+
const [c, o] = e, l = new Date(c), n = new Date(o);
|
|
121
|
+
if (l.setHours(0, 0, 0, 0), n.setHours(23, 59, 59, 999), t < l || t > n) return !1;
|
|
122
122
|
}
|
|
123
123
|
return !0;
|
|
124
|
-
},
|
|
124
|
+
}, lt = (t) => {
|
|
125
125
|
if (!isNaN(t.getTime())) {
|
|
126
|
-
|
|
126
|
+
M(t), $(void 0);
|
|
127
127
|
let e = "";
|
|
128
|
-
switch (
|
|
128
|
+
switch (N) {
|
|
129
129
|
case "year": {
|
|
130
130
|
e = t.getFullYear().toString();
|
|
131
131
|
break;
|
|
132
132
|
}
|
|
133
133
|
case "month": {
|
|
134
|
-
const c =
|
|
135
|
-
e = `${c} ${
|
|
134
|
+
const c = S[t.getMonth()], o = t.getFullYear();
|
|
135
|
+
e = `${c} ${o}`;
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
138
|
case "full": {
|
|
@@ -146,18 +146,18 @@ const xt = ht(
|
|
|
146
146
|
}
|
|
147
147
|
r == null || r({
|
|
148
148
|
value: e,
|
|
149
|
-
name:
|
|
149
|
+
name: d
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
_ === "years" && (f === "years" ? (y(!1), u(f)) : u("months")), _ === "months" && (f === "months" ? (y(!1), u(f)) : u("days")), M(t);
|
|
153
153
|
let s = "";
|
|
154
|
-
switch (
|
|
154
|
+
switch (N) {
|
|
155
155
|
case "year": {
|
|
156
156
|
s = t.getFullYear().toString();
|
|
157
157
|
break;
|
|
158
158
|
}
|
|
159
159
|
case "month": {
|
|
160
|
-
const e =
|
|
160
|
+
const e = S[t.getMonth()], c = t.getFullYear();
|
|
161
161
|
s = `${e} ${c}`;
|
|
162
162
|
break;
|
|
163
163
|
}
|
|
@@ -172,201 +172,202 @@ const xt = ht(
|
|
|
172
172
|
}
|
|
173
173
|
r == null || r({
|
|
174
174
|
value: s,
|
|
175
|
-
name:
|
|
176
|
-
})
|
|
177
|
-
},
|
|
178
|
-
const s =
|
|
179
|
-
if (
|
|
180
|
-
|
|
181
|
-
let
|
|
182
|
-
switch (
|
|
175
|
+
name: d
|
|
176
|
+
});
|
|
177
|
+
}, mt = (t) => {
|
|
178
|
+
const s = i || /* @__PURE__ */ new Date(), e = s.getDate(), c = s.getMonth() + 1, o = new Date(t, c - 1, e);
|
|
179
|
+
if (o.getFullYear() === t && o.getMonth() === c - 1 && o.getDate() === e && Z(o)) {
|
|
180
|
+
M(o), $(void 0);
|
|
181
|
+
let l = "";
|
|
182
|
+
switch (N) {
|
|
183
183
|
case "year": {
|
|
184
|
-
|
|
184
|
+
l = t.toString();
|
|
185
185
|
break;
|
|
186
186
|
}
|
|
187
187
|
case "month": {
|
|
188
|
-
|
|
188
|
+
l = `${S[c - 1]} ${t}`;
|
|
189
189
|
break;
|
|
190
190
|
}
|
|
191
191
|
case "full": {
|
|
192
|
-
|
|
192
|
+
l = p.Date(o, "yyyy-mm-dd");
|
|
193
193
|
break;
|
|
194
194
|
}
|
|
195
195
|
default: {
|
|
196
|
-
|
|
196
|
+
l = p.Date(o, "yyyy-mm-dd");
|
|
197
197
|
break;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
if (r == null || r({
|
|
201
|
-
value:
|
|
202
|
-
name:
|
|
203
|
-
}),
|
|
204
|
-
|
|
201
|
+
value: l,
|
|
202
|
+
name: d
|
|
203
|
+
}), f === "years") {
|
|
204
|
+
y(!1), u(f);
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
207
|
} else
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
$(new Date(t, c - 1, 1));
|
|
209
|
+
f === "years" ? (y(!1), u(f)) : u("months");
|
|
210
210
|
}, yt = (t, s) => {
|
|
211
|
-
const c = (
|
|
212
|
-
if (n.getFullYear() === t && n.getMonth() === s - 1 && n.getDate() ===
|
|
213
|
-
|
|
214
|
-
let
|
|
215
|
-
switch (
|
|
211
|
+
const c = (i || /* @__PURE__ */ new Date()).getDate(), o = new Date(t, s, 0).getDate(), l = Math.min(c, o), n = new Date(t, s - 1, l);
|
|
212
|
+
if (n.getFullYear() === t && n.getMonth() === s - 1 && n.getDate() === l && Z(n)) {
|
|
213
|
+
M(n), $(void 0);
|
|
214
|
+
let k = "";
|
|
215
|
+
switch (N) {
|
|
216
216
|
case "year": {
|
|
217
|
-
|
|
217
|
+
k = t.toString();
|
|
218
218
|
break;
|
|
219
219
|
}
|
|
220
220
|
case "month": {
|
|
221
|
-
|
|
221
|
+
k = `${S[s - 1]} ${t}`;
|
|
222
222
|
break;
|
|
223
223
|
}
|
|
224
224
|
case "full": {
|
|
225
|
-
|
|
225
|
+
k = p.Date(n, "yyyy-mm-dd");
|
|
226
226
|
break;
|
|
227
227
|
}
|
|
228
228
|
default: {
|
|
229
|
-
|
|
229
|
+
k = p.Date(n, "yyyy-mm-dd");
|
|
230
230
|
break;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
if (r == null || r({
|
|
234
|
-
value:
|
|
235
|
-
name:
|
|
236
|
-
}),
|
|
237
|
-
|
|
234
|
+
value: k,
|
|
235
|
+
name: d
|
|
236
|
+
}), f === "months") {
|
|
237
|
+
y(!1), u(f);
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
240
240
|
} else
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
},
|
|
244
|
-
if (
|
|
241
|
+
$(new Date(t, s - 1, 1));
|
|
242
|
+
f === "months" ? (y(!1), u(f)) : u("days");
|
|
243
|
+
}, ut = (t) => {
|
|
244
|
+
if (A || t.target.value === "") {
|
|
245
245
|
const s = t.target.value.replace(/[^\d]/g, "");
|
|
246
246
|
if (s.length === 0)
|
|
247
|
-
|
|
247
|
+
x(""), M(void 0), y(!1), r == null || r({ value: "", name: d });
|
|
248
248
|
else {
|
|
249
|
-
const [e, c,
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
const [e, c, o] = [
|
|
250
|
+
R(s.substring(0, 2), gt),
|
|
251
|
+
R(s.substring(2, 4), Tt),
|
|
252
252
|
s.substring(4, 8)
|
|
253
|
-
],
|
|
254
|
-
if (
|
|
255
|
-
const n =
|
|
253
|
+
], l = [e, c, o].filter(Boolean).join("/");
|
|
254
|
+
if (x(l), rt) {
|
|
255
|
+
const n = o ? `${o}-${c || "00"}-${e || "00"}` : [e, c, o].filter(Boolean).join("-");
|
|
256
256
|
r == null || r({
|
|
257
257
|
value: n,
|
|
258
|
-
name:
|
|
258
|
+
name: d
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
if (
|
|
262
|
-
const n = parseInt(
|
|
261
|
+
if (l.length === $t) {
|
|
262
|
+
const n = parseInt(o), k = /* @__PURE__ */ new Date(
|
|
263
263
|
`${n}-${c.padStart(2, "0")}-${e.padStart(2, "0")}`
|
|
264
264
|
);
|
|
265
|
-
isNaN(
|
|
266
|
-
value: p.Date(
|
|
267
|
-
name:
|
|
268
|
-
})
|
|
265
|
+
isNaN(k.getTime()) || (M(k), r == null || r({
|
|
266
|
+
value: p.Date(k, "yyyy-mm-dd"),
|
|
267
|
+
name: d
|
|
268
|
+
}));
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
},
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
), pt =
|
|
276
|
-
let
|
|
277
|
-
if (
|
|
272
|
+
}, Dt = v(
|
|
273
|
+
m.wrapper,
|
|
274
|
+
T && !A && m.active
|
|
275
|
+
), pt = v(m.input, m.inputBorderControl);
|
|
276
|
+
let z;
|
|
277
|
+
if (a) {
|
|
278
278
|
let t, s;
|
|
279
|
-
typeof
|
|
279
|
+
typeof a[0] == "string" ? t = new Date(a[0]) : t = a[0], typeof a[1] == "string" ? s = new Date(a[1]) : s = a[1], z = [t, s];
|
|
280
280
|
}
|
|
281
|
-
const
|
|
282
|
-
onChangeValue:
|
|
283
|
-
date:
|
|
284
|
-
selectedDate:
|
|
285
|
-
before: typeof
|
|
286
|
-
onChangeType:
|
|
287
|
-
setIsActive:
|
|
288
|
-
disableFuture:
|
|
289
|
-
disablePast:
|
|
290
|
-
disabledDate:
|
|
291
|
-
validRange:
|
|
292
|
-
dateFormat:
|
|
293
|
-
position:
|
|
294
|
-
isFixed:
|
|
295
|
-
},
|
|
296
|
-
...
|
|
281
|
+
const X = {
|
|
282
|
+
onChangeValue: lt,
|
|
283
|
+
date: nt || i || /* @__PURE__ */ new Date(),
|
|
284
|
+
selectedDate: i,
|
|
285
|
+
before: typeof h == "string" ? new Date(h) : h,
|
|
286
|
+
onChangeType: u,
|
|
287
|
+
setIsActive: y,
|
|
288
|
+
disableFuture: q,
|
|
289
|
+
disablePast: J,
|
|
290
|
+
disabledDate: E,
|
|
291
|
+
validRange: z,
|
|
292
|
+
dateFormat: N,
|
|
293
|
+
position: at,
|
|
294
|
+
isFixed: O
|
|
295
|
+
}, dt = {
|
|
296
|
+
...X,
|
|
297
297
|
onChangeMonth: yt,
|
|
298
|
-
dateFormat:
|
|
299
|
-
},
|
|
300
|
-
...
|
|
301
|
-
onChangeYear:
|
|
298
|
+
dateFormat: N
|
|
299
|
+
}, wt = {
|
|
300
|
+
...X,
|
|
301
|
+
onChangeYear: mt
|
|
302
302
|
}, kt = (() => {
|
|
303
|
-
switch (
|
|
303
|
+
switch (_) {
|
|
304
304
|
case "months":
|
|
305
|
-
return () => /* @__PURE__ */
|
|
305
|
+
return () => /* @__PURE__ */ D(At, { ...dt });
|
|
306
306
|
case "years":
|
|
307
|
-
return () => /* @__PURE__ */
|
|
307
|
+
return () => /* @__PURE__ */ D(Pt, { ...wt });
|
|
308
308
|
default:
|
|
309
|
-
return () => /* @__PURE__ */
|
|
309
|
+
return () => /* @__PURE__ */ D(bt, { ...X });
|
|
310
310
|
}
|
|
311
|
-
})(), Nt = ({ isActive: t }) => /* @__PURE__ */
|
|
312
|
-
e.stopPropagation(),
|
|
313
|
-
}, className:
|
|
314
|
-
|
|
311
|
+
})(), Nt = ({ isActive: t }) => /* @__PURE__ */ D("button", { onClick: (e) => {
|
|
312
|
+
e.stopPropagation(), j || y(!t);
|
|
313
|
+
}, className: m["icon-button"], children: t ? /* @__PURE__ */ D(
|
|
314
|
+
V,
|
|
315
315
|
{
|
|
316
|
-
iconName:
|
|
316
|
+
iconName: H === tt.S ? "DropdownArrowUp16px" : "DropdownArrowUp24px"
|
|
317
317
|
}
|
|
318
|
-
) : /* @__PURE__ */
|
|
319
|
-
|
|
318
|
+
) : /* @__PURE__ */ D(
|
|
319
|
+
V,
|
|
320
320
|
{
|
|
321
|
-
iconName:
|
|
321
|
+
iconName: H === tt.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px"
|
|
322
322
|
}
|
|
323
323
|
) });
|
|
324
|
-
return /* @__PURE__ */
|
|
324
|
+
return /* @__PURE__ */ F(
|
|
325
325
|
"div",
|
|
326
326
|
{
|
|
327
|
-
className:
|
|
328
|
-
[
|
|
327
|
+
className: v(m["input-field-group-datePicker"], {
|
|
328
|
+
[m.full]: ot
|
|
329
329
|
}),
|
|
330
330
|
children: [
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ F("div", { className: Dt, "data-disabled": j, children: [
|
|
332
|
+
/* @__PURE__ */ D(
|
|
333
333
|
"div",
|
|
334
334
|
{
|
|
335
335
|
role: "button",
|
|
336
|
-
"data-status":
|
|
337
|
-
className:
|
|
338
|
-
[
|
|
339
|
-
[
|
|
336
|
+
"data-status": Y.status,
|
|
337
|
+
className: v(m["date-wrapper"], {
|
|
338
|
+
[m.editable]: A,
|
|
339
|
+
[m[`border-radius-${L}`]]: L !== C.All
|
|
340
340
|
}),
|
|
341
|
-
onClick:
|
|
342
|
-
children: /* @__PURE__ */
|
|
341
|
+
onClick: ft,
|
|
342
|
+
children: /* @__PURE__ */ D(
|
|
343
343
|
Yt,
|
|
344
344
|
{
|
|
345
345
|
ref: ct,
|
|
346
346
|
className: pt,
|
|
347
|
-
wrapperClassName:
|
|
348
|
-
size:
|
|
347
|
+
wrapperClassName: m["input-wrapper"],
|
|
348
|
+
size: H,
|
|
349
349
|
type: "text",
|
|
350
350
|
variant: st,
|
|
351
351
|
value: it,
|
|
352
|
-
onChange:
|
|
352
|
+
onChange: ut,
|
|
353
353
|
rightAddon: {
|
|
354
354
|
addonType: "react-node",
|
|
355
|
-
addonContent: /* @__PURE__ */
|
|
355
|
+
addonContent: /* @__PURE__ */ D(Nt, { isActive: T })
|
|
356
356
|
},
|
|
357
|
-
rightSlotClassName:
|
|
357
|
+
rightSlotClassName: m["right-slot"],
|
|
358
358
|
onFocus: () => {
|
|
359
|
-
|
|
359
|
+
W && !A && y(!0);
|
|
360
360
|
},
|
|
361
|
-
borderRadius:
|
|
362
|
-
...
|
|
361
|
+
borderRadius: L,
|
|
362
|
+
...Y,
|
|
363
|
+
onBlur: et
|
|
363
364
|
}
|
|
364
365
|
)
|
|
365
366
|
}
|
|
366
367
|
),
|
|
367
|
-
|
|
368
|
+
T && /* @__PURE__ */ D(kt, {})
|
|
368
369
|
] }),
|
|
369
|
-
|
|
370
|
+
I && typeof I == "string" && /* @__PURE__ */ D("div", { className: m.textError, children: I })
|
|
370
371
|
]
|
|
371
372
|
}
|
|
372
373
|
);
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as n } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { forwardRef as re, useState as C, useRef as x, useEffect as D, useCallback as w } from "react";
|
|
4
4
|
import { EDrawerPosition as A } from "./constants.js";
|
|
5
|
-
import { useContainer as
|
|
5
|
+
import { useContainer as se } from "./hooks.js";
|
|
6
6
|
import { ScrollWrapper as ie } from "./ScrollWrapper/index.js";
|
|
7
|
-
import { useMediaQuery as
|
|
7
|
+
import { useMediaQuery as ae } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
|
8
8
|
import { EMediaQuery as le } from "../../hooks/useMediaQuery/constants.js";
|
|
9
|
-
import { useLockBodyScroll as
|
|
9
|
+
import { useLockBodyScroll as ce } from "../../hooks/useLockBodyScroll/useLockBodyScroll.js";
|
|
10
10
|
import { useResizeObserver as ue } from "../../hooks/useResizeObserver/useResizeObserver.js";
|
|
11
11
|
import { Button as P } from "../Button/Button.js";
|
|
12
12
|
import { EButtonVariantDefault as de, EButtonSize as u } from "../Button/constants.js";
|
|
13
13
|
import { Loader as me } from "../Loader/Loader.js";
|
|
14
|
-
import { Portal as
|
|
15
|
-
import { EScrollBarVariant as
|
|
16
|
-
import '../../assets/Drawer.css';const he = "
|
|
14
|
+
import { Portal as _e } from "../Portal/Portal.js";
|
|
15
|
+
import { EScrollBarVariant as fe, EScrollBarSize as be } from "../ScrollBar/constants.js";
|
|
16
|
+
import '../../assets/Drawer.css';const he = "_drawerContainer_abn3o_2", pe = "_drawer_abn3o_2", Ce = "_content_abn3o_31", we = "_header_abn3o_46", ye = "_title_abn3o_60", ge = "_space_abn3o_74", ve = "_inner_abn3o_85", Ne = "_button_abn3o_101", ke = "_footer_abn3o_106", Se = "_left_abn3o_122", Be = "_right_abn3o_126", Ee = "_center_abn3o_130", ze = "_full_abn3o_139", Oe = "_bottom_abn3o_149", Le = "_opened_abn3o_166", He = "_overlay_abn3o_230", xe = "_unmount_abn3o_248", e = {
|
|
17
17
|
drawerContainer: he,
|
|
18
|
-
drawer:
|
|
18
|
+
drawer: pe,
|
|
19
19
|
content: Ce,
|
|
20
20
|
header: we,
|
|
21
|
-
"sticky-header": "_sticky-
|
|
21
|
+
"sticky-header": "_sticky-header_abn3o_54",
|
|
22
22
|
title: ye,
|
|
23
23
|
space: ge,
|
|
24
24
|
inner: ve,
|
|
25
|
-
"is-loading": "_is-
|
|
26
|
-
button:
|
|
27
|
-
footer:
|
|
28
|
-
"has-scroll": "_has-
|
|
29
|
-
"footer-button": "_footer-
|
|
30
|
-
left:
|
|
31
|
-
right:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
"is-loading": "_is-loading_abn3o_90",
|
|
26
|
+
button: Ne,
|
|
27
|
+
footer: ke,
|
|
28
|
+
"has-scroll": "_has-scroll_abn3o_115",
|
|
29
|
+
"footer-button": "_footer-button_abn3o_118",
|
|
30
|
+
left: Se,
|
|
31
|
+
right: Be,
|
|
32
|
+
center: Ee,
|
|
33
|
+
full: ze,
|
|
34
|
+
bottom: Oe,
|
|
35
|
+
"full-bottom-height": "_full-bottom-height_abn3o_160",
|
|
36
|
+
opened: Le,
|
|
37
|
+
"is-closing": "_is-closing_abn3o_189",
|
|
38
|
+
overlay: He,
|
|
39
|
+
unmount: xe
|
|
40
|
+
}, De = 300, Ae = (d) => d ? {
|
|
40
41
|
drawer: {
|
|
41
42
|
position: "absolute",
|
|
42
43
|
zIndex: 100
|
|
@@ -45,11 +46,11 @@ import '../../assets/Drawer.css';const he = "_drawerContainer_zs4pc_2", ze = "_d
|
|
|
45
46
|
position: "absolute",
|
|
46
47
|
zIndex: 90
|
|
47
48
|
}
|
|
48
|
-
} : {},
|
|
49
|
+
} : {}, Ze = re(
|
|
49
50
|
(d, X) => {
|
|
50
51
|
const {
|
|
51
52
|
as: j = "div",
|
|
52
|
-
isOpen:
|
|
53
|
+
isOpen: s,
|
|
53
54
|
onClose: m,
|
|
54
55
|
title: G,
|
|
55
56
|
className: Q,
|
|
@@ -57,9 +58,9 @@ import '../../assets/Drawer.css';const he = "_drawerContainer_zs4pc_2", ze = "_d
|
|
|
57
58
|
isLoading: i = !1,
|
|
58
59
|
stickyHeader: V,
|
|
59
60
|
fullBottomHeight: W = !1,
|
|
60
|
-
position:
|
|
61
|
+
position: _ = A.RIGHT,
|
|
61
62
|
paddingRight: F = 8,
|
|
62
|
-
footer:
|
|
63
|
+
footer: f,
|
|
63
64
|
children: I,
|
|
64
65
|
classNameTitle: K,
|
|
65
66
|
classNameHeader: Y,
|
|
@@ -69,88 +70,88 @@ import '../../assets/Drawer.css';const he = "_drawerContainer_zs4pc_2", ze = "_d
|
|
|
69
70
|
classNameFooter: R,
|
|
70
71
|
closeOnClickOutside: g = !0,
|
|
71
72
|
showCloseButton: v = !0,
|
|
72
|
-
getContainer:
|
|
73
|
+
getContainer: b,
|
|
73
74
|
dataTestIdReactMap: o,
|
|
74
75
|
...U
|
|
75
|
-
} = d, [
|
|
76
|
-
enabled:
|
|
77
|
-
}),
|
|
76
|
+
} = d, [N, k] = C(!1), [Z, S] = C(!1), B = x(), h = ae(le.XS1), { ref: $ } = ue({
|
|
77
|
+
enabled: _ === A.BOTTOM
|
|
78
|
+
}), E = se(b), a = x(null), [T, ee] = C(!1);
|
|
78
79
|
D(() => {
|
|
79
80
|
const l = () => {
|
|
80
|
-
if (
|
|
81
|
-
const { scrollHeight: te, clientHeight:
|
|
82
|
-
ee(te >
|
|
81
|
+
if (a.current) {
|
|
82
|
+
const { scrollHeight: te, clientHeight: ne } = a.current;
|
|
83
|
+
ee(te > ne);
|
|
83
84
|
}
|
|
84
85
|
};
|
|
85
86
|
l();
|
|
86
87
|
const H = new ResizeObserver(l);
|
|
87
|
-
return
|
|
88
|
+
return a.current && H.observe(a.current), () => {
|
|
88
89
|
H.disconnect();
|
|
89
90
|
};
|
|
90
|
-
}, [
|
|
91
|
-
on:
|
|
91
|
+
}, [s, i]), ce({
|
|
92
|
+
on: s && !N,
|
|
92
93
|
paddingRight: F
|
|
93
94
|
});
|
|
94
|
-
const
|
|
95
|
-
m && (
|
|
96
|
-
m(),
|
|
97
|
-
},
|
|
95
|
+
const r = w(() => {
|
|
96
|
+
m && (k(!0), B.current = setTimeout(() => {
|
|
97
|
+
m(), k(!1);
|
|
98
|
+
}, De));
|
|
98
99
|
}, [m]), oe = w(() => {
|
|
99
|
-
g &&
|
|
100
|
-
}, [g,
|
|
100
|
+
g && r();
|
|
101
|
+
}, [g, r]), p = w(
|
|
101
102
|
(l) => {
|
|
102
|
-
l.key === "Escape" &&
|
|
103
|
+
l.key === "Escape" && r();
|
|
103
104
|
},
|
|
104
|
-
[
|
|
105
|
+
[r]
|
|
105
106
|
);
|
|
106
|
-
D(() => (
|
|
107
|
-
|
|
108
|
-
}), [
|
|
109
|
-
const
|
|
107
|
+
D(() => (s && (S(!0), window.addEventListener("keydown", p)), () => {
|
|
108
|
+
S(!1), clearTimeout(B.current), window.removeEventListener("keydown", p);
|
|
109
|
+
}), [s, p]);
|
|
110
|
+
const z = {
|
|
110
111
|
[e.opened]: Z,
|
|
111
|
-
[e["is-closing"]]:
|
|
112
|
+
[e["is-closing"]]: N,
|
|
112
113
|
[e["full-bottom-height"]]: W,
|
|
113
114
|
[e["is-loading"]]: i
|
|
114
115
|
};
|
|
115
|
-
if (!
|
|
116
|
+
if (!s && y)
|
|
116
117
|
return null;
|
|
117
|
-
const O =
|
|
118
|
+
const O = Ae(b !== void 0 && b !== !1), L = /* @__PURE__ */ c(
|
|
118
119
|
"div",
|
|
119
120
|
{
|
|
120
121
|
"data-testid-react": o == null ? void 0 : o.drawer,
|
|
121
|
-
className:
|
|
122
|
+
className: n(e.drawerContainer, J),
|
|
122
123
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ c(
|
|
124
125
|
j,
|
|
125
126
|
{
|
|
126
127
|
ref: X,
|
|
127
|
-
"aria-hidden": !
|
|
128
|
+
"aria-hidden": !s,
|
|
128
129
|
role: "dialog",
|
|
129
130
|
style: O.drawer,
|
|
130
|
-
className:
|
|
131
|
+
className: n(e.drawer, e[_], z, Q),
|
|
131
132
|
...U,
|
|
132
133
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ c(
|
|
134
135
|
"section",
|
|
135
136
|
{
|
|
136
137
|
ref: $,
|
|
137
|
-
className:
|
|
138
|
+
className: n(
|
|
138
139
|
e.content,
|
|
139
140
|
M,
|
|
140
|
-
e[
|
|
141
|
+
e[_],
|
|
141
142
|
{
|
|
142
143
|
[e["is-loading"]]: !!i
|
|
143
144
|
}
|
|
144
145
|
),
|
|
145
146
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ c(
|
|
147
148
|
"header",
|
|
148
149
|
{
|
|
149
|
-
className:
|
|
150
|
+
className: n(e.header, Y, {
|
|
150
151
|
[e["sticky-header"]]: V
|
|
151
152
|
}),
|
|
152
153
|
children: [
|
|
153
|
-
/* @__PURE__ */ t("h2", { className:
|
|
154
|
+
/* @__PURE__ */ t("h2", { className: n(e.title, K), children: G }),
|
|
154
155
|
/* @__PURE__ */ t("div", { className: e.space, children: v && /* @__PURE__ */ t(
|
|
155
156
|
P,
|
|
156
157
|
{
|
|
@@ -159,7 +160,7 @@ import '../../assets/Drawer.css';const he = "_drawerContainer_zs4pc_2", ze = "_d
|
|
|
159
160
|
isIconButton: !0,
|
|
160
161
|
size: h ? u.S : u.M,
|
|
161
162
|
iconName: "Close16px",
|
|
162
|
-
onClick:
|
|
163
|
+
onClick: r,
|
|
163
164
|
className: e.button
|
|
164
165
|
}
|
|
165
166
|
) })
|
|
@@ -169,16 +170,16 @@ import '../../assets/Drawer.css';const he = "_drawerContainer_zs4pc_2", ze = "_d
|
|
|
169
170
|
/* @__PURE__ */ t(
|
|
170
171
|
ie,
|
|
171
172
|
{
|
|
172
|
-
ref:
|
|
173
|
-
className:
|
|
173
|
+
ref: a,
|
|
174
|
+
className: n(
|
|
174
175
|
e.inner,
|
|
175
176
|
{
|
|
176
177
|
[e["is-loading"]]: !!i
|
|
177
178
|
},
|
|
178
179
|
q
|
|
179
180
|
),
|
|
180
|
-
variant:
|
|
181
|
-
size:
|
|
181
|
+
variant: fe.LIGHT,
|
|
182
|
+
size: be.M,
|
|
182
183
|
children: i ? /* @__PURE__ */ t(me, {}) : I
|
|
183
184
|
}
|
|
184
185
|
)
|
|
@@ -189,16 +190,16 @@ import '../../assets/Drawer.css';const he = "_drawerContainer_zs4pc_2", ze = "_d
|
|
|
189
190
|
"footer",
|
|
190
191
|
{
|
|
191
192
|
"data-testid-react": o == null ? void 0 : o.footer,
|
|
192
|
-
className:
|
|
193
|
+
className: n(e.footer, R, {
|
|
193
194
|
[e["has-scroll"]]: T
|
|
194
195
|
}),
|
|
195
|
-
children: typeof
|
|
196
|
+
children: typeof f == "function" ? f({ handleClose: r }) : f || v && /* @__PURE__ */ t(
|
|
196
197
|
P,
|
|
197
198
|
{
|
|
198
199
|
"data-testid-react": o == null ? void 0 : o.footerCloseButton,
|
|
199
200
|
size: h ? u.L : u.XXL,
|
|
200
201
|
full: h,
|
|
201
|
-
onClick:
|
|
202
|
+
onClick: r,
|
|
202
203
|
className: e["footer-button"],
|
|
203
204
|
children: "Закрыть"
|
|
204
205
|
}
|
|
@@ -212,12 +213,12 @@ import '../../assets/Drawer.css';const he = "_drawerContainer_zs4pc_2", ze = "_d
|
|
|
212
213
|
"div",
|
|
213
214
|
{
|
|
214
215
|
"data-testid-react": o == null ? void 0 : o.overlay,
|
|
215
|
-
className:
|
|
216
|
+
className: n(
|
|
216
217
|
e.overlay,
|
|
217
218
|
{
|
|
218
219
|
[e.unmount]: !y
|
|
219
220
|
},
|
|
220
|
-
|
|
221
|
+
z
|
|
221
222
|
),
|
|
222
223
|
style: O.overlay,
|
|
223
224
|
"data-testid": "drawer-overlay",
|
|
@@ -227,10 +228,10 @@ import '../../assets/Drawer.css';const he = "_drawerContainer_zs4pc_2", ze = "_d
|
|
|
227
228
|
]
|
|
228
229
|
}
|
|
229
230
|
);
|
|
230
|
-
return
|
|
231
|
+
return E === !1 ? L : /* @__PURE__ */ t(_e, { element: E, children: L });
|
|
231
232
|
}
|
|
232
233
|
);
|
|
233
234
|
export {
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
De as ANIMATION_DELAY,
|
|
236
|
+
Ze as Drawer
|
|
236
237
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var l = /* @__PURE__ */ ((T) => (T.LEFT = "left", T.RIGHT = "right", T.BOTTOM = "bottom", T.FULL = "full", T))(l || {});
|
|
1
|
+
var l = /* @__PURE__ */ ((T) => (T.LEFT = "left", T.RIGHT = "right", T.BOTTOM = "bottom", T.FULL = "full", T.CENTER = "center", T))(l || {});
|
|
2
2
|
export {
|
|
3
3
|
l as EDrawerPosition
|
|
4
4
|
};
|