mimir-ui-kit 1.44.0 → 1.44.1
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/styles.css +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +8 -0
- package/dist/components/DatePicker/DatePicker.js +116 -104
- 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/styles.module-B3lX7mJq.js +31 -0
- package/package.json +1 -1
- package/dist/styles.module-D3nnIVCZ.js +0 -31
package/dist/assets/styles.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
._input-field-group-
|
1
|
+
._input-field-group-datePicker_qlncs_3{display:flex;flex-direction:column;gap:var(--mimir-space-2xs)}._input-field-group-datePicker_qlncs_3._full_qlncs_8{width:100%}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11{--border-color: var(--citrine-100);position:relative;display:flex;align-items:center;border-radius:var(--mimir-control-radius-s)}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18{position:relative;width:100%}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18 ._input-wrapper_qlncs_22{flex:1}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18 ._input-wrapper_qlncs_22 ._right-slot_qlncs_25{order:2;padding-top:0}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18 ._inputBorderControl_qlncs_29{border:transparent}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18:hover ._input-wrapper_qlncs_22{background-color:var(--input-bg-color-hover)}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18:before{position:absolute;top:0;right:45px;bottom:0;left:0;z-index:3;cursor:pointer;content:""}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18._editable_qlncs_42:before{display:none}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18 svg{cursor:pointer}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18._border-radius-left_qlncs_48 ._input-wrapper_qlncs_22{border-top-right-radius:0!important;border-bottom-right-radius:0!important}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18._border-radius-right_qlncs_52 ._input-wrapper_qlncs_22{border-top-left-radius:0!important;border-bottom-left-radius:0!important}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11 ._date-wrapper_qlncs_18._border-radius-none_qlncs_56 ._input-wrapper_qlncs_22{border-radius:0!important}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11:has([data-status=error]){--border-color: var(--error-normal)}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11:has([data-status=success]){--border-color: var(--success-normal)}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11:has([data-status=alarm]){--border-color: var(--alarm-normal)}._input-field-group-datePicker_qlncs_3 ._wrapper_qlncs_11._active_qlncs_68{border-bottom:1px solid var(--border-color)}._input-field-group-datePicker_qlncs_3 ._textError_qlncs_71{color:var(--gos-znak-diplomatic-background-color);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-s);font-family:var(--mimir-font-inter);line-height:var(--mimir-size-text-m);text-align:left}[data-disabled=true] ._date-wrapper_qlncs_18:before{cursor:auto}[data-disabled=true] ._date-wrapper_qlncs_18 ._input-wrapper_qlncs_22{background:var(--black-20)}[data-disabled=true] ._date-wrapper_qlncs_18 ._input-wrapper_qlncs_22 label,[data-disabled=true] ._date-wrapper_qlncs_18 ._input-wrapper_qlncs_22 input{color:var(--white)}[data-disabled=true] ._button-wrapper_qlncs_90 svg{color:var(--white);cursor:default;fill:var(--white)}._button-wrapper_qlncs_90{position:absolute;top:0;right:0;z-index:2;display:flex;justify-content:center;width:44px;height:100%;max-height:var(--button-height-xxl)}._button_qlncs_90{align-self:center;background-color:transparent;border-radius:var(--mimir-control-radius-s)}._calendar-block_qlncs_114{position:absolute;z-index:var(--mimir-zindex-dropdown);display:flex;flex-direction:column;width:368px;max-height:none;padding:var(--mimir-space-m);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-l);font-family:var(--mimir-font-inter);line-height:var(--mimir-line-height-text-2xs);text-align:center;text-overflow:ellipsis;background:var(--white);border-radius:var(--mimir-control-radius-s);box-shadow:0 0 #16172705,0 2px 4px #16172705,0 6px 6px #16172705,0 15px 9px #16172703;opacity:0;transition:height .5s ease-in;font-feature-settings:"zero";font-variant-numeric:slashed-zero}._calendar-block_qlncs_114 ._h_qlncs_136{display:flex;width:100%;color:var(--black-100)}._calendar-block_qlncs_114 ._b_qlncs_48{display:grid;grid-template-columns:repeat(7,1fr)}._calendar-block_qlncs_114 ._d_qlncs_18{display:flex;flex:1;gap:var(--mimir-space-2xs);align-items:center;justify-content:center;color:var(--black-100);font-size:var(--mimir-size-text-l);cursor:pointer}._calendar-block_qlncs_114 ._m_qlncs_158,._calendar-block_qlncs_114 ._a_qlncs_68,._calendar-block_qlncs_114 ._prev_qlncs_160{width:auto;height:48px;overflow:hidden}._calendar-block_qlncs_114 ._m_qlncs_158{display:flex;align-items:center;justify-content:center;color:var(--disabled);font-size:var(--mimir-size-text-l)}._calendar-block_qlncs_114 ._orange_qlncs_174{color:var(--citrine-100)}._calendar-block_qlncs_114 ._a_qlncs_68{color:var(--black-100);font-size:var(--mimir-size-text-l);border-radius:var(--mimir-control-radius-s)}._calendar-block_qlncs_114 ._a_qlncs_68:hover{background:var(--black-10)}._calendar-block_qlncs_114 ._a_qlncs_68:active{color:var(--white);background:var(--sapphire-100)}._calendar-block_qlncs_114 ._current_qlncs_191{background:var(--sapphire-10);border-radius:var(--mimir-control-radius-s)}._calendar-block_qlncs_114 ._monthGrid_qlncs_196{display:grid;grid-template-columns:repeat(3,1fr)}._icon-button_qlncs_201{display:flex}
|
@@ -75,6 +75,10 @@ export type TProps = {
|
|
75
75
|
* @default 'all'
|
76
76
|
*/
|
77
77
|
borderRadius?: EDatePickerBorderRadius | `${EDatePickerBorderRadius}`;
|
78
|
+
/**
|
79
|
+
* Флаг для растяжки компонента на всю ширину экрана
|
80
|
+
*/
|
81
|
+
full?: boolean;
|
78
82
|
} & TInputProps;
|
79
83
|
export type TDatePickerValue = {
|
80
84
|
value?: string;
|
@@ -158,4 +162,8 @@ export declare const DatePicker: import('react').MemoExoticComponent<import('rea
|
|
158
162
|
* @default 'all'
|
159
163
|
*/
|
160
164
|
borderRadius?: EDatePickerBorderRadius | `${EDatePickerBorderRadius}`;
|
165
|
+
/**
|
166
|
+
* Флаг для растяжки компонента на всю ширину экрана
|
167
|
+
*/
|
168
|
+
full?: boolean;
|
161
169
|
} & import('../Input/types').TInputProps & import('../Input').TAdditionalProps & import('react').RefAttributes<HTMLInputElement>>>;
|
@@ -1,53 +1,54 @@
|
|
1
1
|
import { jsxs as z, jsx as D } from "react/jsx-runtime";
|
2
|
-
import { c as
|
3
|
-
import { memo as
|
4
|
-
import { months as
|
5
|
-
import { DatePickerModal as
|
6
|
-
import { MonthPickerModal as
|
7
|
-
import { c as l } from "../../styles.module-
|
2
|
+
import { c as H } from "../../index-DIxK0V-G.js";
|
3
|
+
import { memo as kt, forwardRef as Nt, useState as $, useEffect as j } from "react";
|
4
|
+
import { months as A, EDatePickerBorderRadius as C, MAX_DAY as ut, MAX_MONTH as ht, DATE_LENGTH as Mt } from "./constants.js";
|
5
|
+
import { DatePickerModal as gt } from "./DatePickerModal.js";
|
6
|
+
import { MonthPickerModal as Tt } from "./MonthPickerModal.js";
|
7
|
+
import { c as l } from "../../styles.module-B3lX7mJq.js";
|
8
8
|
import { formatDatePart as R } from "./utils.js";
|
9
|
-
import { YearPickerModal as
|
9
|
+
import { YearPickerModal as $t } from "./YearPickerModal.js";
|
10
10
|
import { useClickOutside as bt } from "../../hooks/useClickOutside/useClickOutside.js";
|
11
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 At } from "../../Input-IzZ6B9kw.js";
|
14
|
+
import { EInputStatus as Pt, EInputSize as V } from "../Input/constants.js";
|
15
|
+
const St = kt(
|
16
|
+
Nt(
|
17
17
|
({
|
18
|
-
size:
|
18
|
+
size: v,
|
19
19
|
value: k,
|
20
20
|
onChangeValue: a,
|
21
21
|
name: w,
|
22
22
|
before: h,
|
23
23
|
type: n = "days",
|
24
24
|
dateFormat: N = "full",
|
25
|
-
error:
|
25
|
+
error: _,
|
26
26
|
onError: M,
|
27
27
|
onBlur: m,
|
28
28
|
validateImmediately: L,
|
29
29
|
variant: tt,
|
30
|
-
disabled:
|
31
|
-
editable:
|
30
|
+
disabled: O = !1,
|
31
|
+
editable: b = !1,
|
32
32
|
openOnInput: W = !0,
|
33
33
|
sendIntermediateValues: et = !1,
|
34
34
|
disableFuture: q = !1,
|
35
35
|
disablePast: J = !1,
|
36
|
-
disabledDate:
|
36
|
+
disabledDate: U,
|
37
37
|
validRange: o,
|
38
|
-
borderRadius:
|
38
|
+
borderRadius: X = C.All,
|
39
|
+
full: st,
|
39
40
|
...P
|
40
|
-
},
|
41
|
-
const [S, d] =
|
41
|
+
}, rt) => {
|
42
|
+
const [S, d] = $(!1), [E, y] = $(n), [f, g] = $(
|
42
43
|
() => k && !isNaN(new Date(k).getTime()) ? new Date(k) : void 0
|
43
|
-
), [Y,
|
44
|
-
P.status = !!Y &&
|
45
|
-
|
46
|
-
}, [
|
44
|
+
), [Y, F] = $(_), [at, I] = $(""), [ct, T] = $();
|
45
|
+
P.status = !!Y && Pt.Error || P.status, j(() => {
|
46
|
+
F(_);
|
47
|
+
}, [_]), j(() => {
|
47
48
|
g(
|
48
49
|
k && !isNaN(new Date(k).getTime()) ? new Date(k) : void 0
|
49
50
|
);
|
50
|
-
}, [k]),
|
51
|
+
}, [k]), j(() => {
|
51
52
|
if (f && typeof f != "string" && !isNaN(f == null ? void 0 : f.getTime())) {
|
52
53
|
let t = "";
|
53
54
|
switch (N) {
|
@@ -56,7 +57,7 @@ const Pt = wt(
|
|
56
57
|
break;
|
57
58
|
}
|
58
59
|
case "month": {
|
59
|
-
const s =
|
60
|
+
const s = A[f.getMonth()], e = f.getFullYear();
|
60
61
|
t = `${s} ${e}`;
|
61
62
|
break;
|
62
63
|
}
|
@@ -74,8 +75,8 @@ const Pt = wt(
|
|
74
75
|
I("");
|
75
76
|
}, [f, N]);
|
76
77
|
const K = k && new Date(k).getTime;
|
77
|
-
|
78
|
-
L && (K ? (
|
78
|
+
j(() => {
|
79
|
+
L && (K ? (F(!1), M == null || M({ name: w, active: !1 })) : (F(!0), M == null || M({ name: w, active: !0 })));
|
79
80
|
}, [L, w, K]), bt({
|
80
81
|
isActive: S,
|
81
82
|
setActive: (t) => {
|
@@ -83,8 +84,8 @@ const Pt = wt(
|
|
83
84
|
},
|
84
85
|
className: l["calendar-block"]
|
85
86
|
});
|
86
|
-
const
|
87
|
-
!
|
87
|
+
const it = () => {
|
88
|
+
!O && (W || !b) && d(!0);
|
88
89
|
}, Q = (t) => {
|
89
90
|
const s = t.getTime();
|
90
91
|
if (t.setHours(0, 0, 0, 0), h && (typeof h == "string" ? new Date(h) : h).getTime() > s)
|
@@ -97,7 +98,7 @@ const Pt = wt(
|
|
97
98
|
const e = /* @__PURE__ */ new Date();
|
98
99
|
if (e.setHours(0, 0, 0, 0), s < e.getTime()) return !1;
|
99
100
|
}
|
100
|
-
if (
|
101
|
+
if (U && U(t)) return !1;
|
101
102
|
if (o) {
|
102
103
|
let e;
|
103
104
|
typeof o[0] == "string" ? e = [
|
@@ -111,7 +112,7 @@ const Pt = wt(
|
|
111
112
|
if (c.setHours(0, 0, 0, 0), u.setHours(23, 59, 59, 999), t < c || t > u) return !1;
|
112
113
|
}
|
113
114
|
return !0;
|
114
|
-
},
|
115
|
+
}, ot = (t) => {
|
115
116
|
if (!isNaN(t.getTime())) {
|
116
117
|
g(t), T(void 0);
|
117
118
|
let e = "";
|
@@ -121,7 +122,7 @@ const Pt = wt(
|
|
121
122
|
break;
|
122
123
|
}
|
123
124
|
case "month": {
|
124
|
-
const i =
|
125
|
+
const i = A[t.getMonth()], r = t.getFullYear();
|
125
126
|
e = `${i} ${r}`;
|
126
127
|
break;
|
127
128
|
}
|
@@ -139,7 +140,7 @@ const Pt = wt(
|
|
139
140
|
name: w
|
140
141
|
});
|
141
142
|
}
|
142
|
-
|
143
|
+
E === "years" && (n === "years" ? (d(!1), y(n)) : y("months")), E === "months" && (n === "months" ? (d(!1), y(n)) : y("days")), g(t);
|
143
144
|
let s = "";
|
144
145
|
switch (N) {
|
145
146
|
case "year": {
|
@@ -147,7 +148,7 @@ const Pt = wt(
|
|
147
148
|
break;
|
148
149
|
}
|
149
150
|
case "month": {
|
150
|
-
const e =
|
151
|
+
const e = A[t.getMonth()], i = t.getFullYear();
|
151
152
|
s = `${e} ${i}`;
|
152
153
|
break;
|
153
154
|
}
|
@@ -164,7 +165,7 @@ const Pt = wt(
|
|
164
165
|
value: s,
|
165
166
|
name: w
|
166
167
|
}), m == null || m(s);
|
167
|
-
},
|
168
|
+
}, mt = (t) => {
|
168
169
|
const s = f || /* @__PURE__ */ new Date(), e = s.getDate(), i = s.getMonth() + 1, r = new Date(t, i - 1, e);
|
169
170
|
if (r.getFullYear() === t && r.getMonth() === i - 1 && r.getDate() === e && Q(r)) {
|
170
171
|
g(r), T(void 0);
|
@@ -175,7 +176,7 @@ const Pt = wt(
|
|
175
176
|
break;
|
176
177
|
}
|
177
178
|
case "month": {
|
178
|
-
c = `${
|
179
|
+
c = `${A[i - 1]} ${t}`;
|
179
180
|
break;
|
180
181
|
}
|
181
182
|
case "full": {
|
@@ -197,7 +198,7 @@ const Pt = wt(
|
|
197
198
|
} else
|
198
199
|
T(new Date(t, i - 1, 1));
|
199
200
|
n === "years" ? (d(!1), y(n)) : y("months");
|
200
|
-
},
|
201
|
+
}, ft = (t, s) => {
|
201
202
|
const i = (f || /* @__PURE__ */ new Date()).getDate(), r = new Date(t, s - 1, i);
|
202
203
|
if (r.getFullYear() === t && r.getMonth() === s - 1 && r.getDate() === i && Q(r)) {
|
203
204
|
g(r), T(void 0);
|
@@ -208,7 +209,7 @@ const Pt = wt(
|
|
208
209
|
break;
|
209
210
|
}
|
210
211
|
case "month": {
|
211
|
-
c = `${
|
212
|
+
c = `${A[s - 1]} ${t}`;
|
212
213
|
break;
|
213
214
|
}
|
214
215
|
case "full": {
|
@@ -230,15 +231,15 @@ const Pt = wt(
|
|
230
231
|
} else
|
231
232
|
T(new Date(t, s - 1, 1));
|
232
233
|
n === "months" ? (d(!1), y(n)) : y("days");
|
233
|
-
},
|
234
|
-
if (
|
234
|
+
}, nt = (t) => {
|
235
|
+
if (b) {
|
235
236
|
const s = t.target.value.replace(/[^\d]/g, "");
|
236
237
|
if (s.length === 0)
|
237
238
|
I(""), a == null || a({ value: "", name: w }), m == null || m("");
|
238
239
|
else {
|
239
240
|
const [e, i, r] = [
|
240
|
-
R(s.substring(0, 2),
|
241
|
-
R(s.substring(2, 4),
|
241
|
+
R(s.substring(0, 2), ut),
|
242
|
+
R(s.substring(2, 4), ht),
|
242
243
|
s.substring(4, 8)
|
243
244
|
], c = [e, i, r].filter(Boolean).join("/");
|
244
245
|
if (I(c), et) {
|
@@ -248,7 +249,7 @@ const Pt = wt(
|
|
248
249
|
name: w
|
249
250
|
});
|
250
251
|
}
|
251
|
-
if (c.length ===
|
252
|
+
if (c.length === Mt) {
|
252
253
|
const u = parseInt(r), x = /* @__PURE__ */ new Date(
|
253
254
|
`${u}-${i.padStart(2, "0")}-${e.padStart(2, "0")}`
|
254
255
|
);
|
@@ -259,98 +260,109 @@ const Pt = wt(
|
|
259
260
|
}
|
260
261
|
}
|
261
262
|
}
|
262
|
-
},
|
263
|
+
}, lt = H(
|
264
|
+
l.wrapper,
|
265
|
+
S && !b && l.active
|
266
|
+
), yt = H(l.input, l.inputBorderControl);
|
263
267
|
let Z;
|
264
268
|
if (o) {
|
265
269
|
let t, s;
|
266
270
|
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];
|
267
271
|
}
|
268
|
-
const
|
269
|
-
onChangeValue:
|
270
|
-
date:
|
272
|
+
const G = {
|
273
|
+
onChangeValue: ot,
|
274
|
+
date: ct || f || /* @__PURE__ */ new Date(),
|
271
275
|
selectedDate: f,
|
272
276
|
before: typeof h == "string" ? new Date(h) : h,
|
273
277
|
onChangeType: y,
|
274
278
|
setIsActive: d,
|
275
279
|
disableFuture: q,
|
276
280
|
disablePast: J,
|
277
|
-
disabledDate:
|
281
|
+
disabledDate: U,
|
278
282
|
validRange: Z,
|
279
283
|
dateFormat: N
|
280
|
-
}, yt = {
|
281
|
-
...F,
|
282
|
-
onChangeMonth: mt,
|
283
|
-
dateFormat: N
|
284
284
|
}, pt = {
|
285
|
-
...
|
286
|
-
|
287
|
-
|
288
|
-
|
285
|
+
...G,
|
286
|
+
onChangeMonth: ft,
|
287
|
+
dateFormat: N
|
288
|
+
}, dt = {
|
289
|
+
...G,
|
290
|
+
onChangeYear: mt
|
291
|
+
}, Dt = (() => {
|
292
|
+
switch (E) {
|
289
293
|
case "months":
|
290
|
-
return () => /* @__PURE__ */ D(gt, { ...yt });
|
291
|
-
case "years":
|
292
294
|
return () => /* @__PURE__ */ D(Tt, { ...pt });
|
295
|
+
case "years":
|
296
|
+
return () => /* @__PURE__ */ D($t, { ...dt });
|
293
297
|
default:
|
294
|
-
return () => /* @__PURE__ */ D(
|
298
|
+
return () => /* @__PURE__ */ D(gt, { ...G });
|
295
299
|
}
|
296
|
-
})(),
|
297
|
-
e.stopPropagation(),
|
300
|
+
})(), wt = ({ isActive: t }) => /* @__PURE__ */ D("button", { onClick: (e) => {
|
301
|
+
e.stopPropagation(), O || d(!t);
|
298
302
|
}, className: l["icon-button"], children: t ? /* @__PURE__ */ D(
|
299
303
|
B,
|
300
304
|
{
|
301
|
-
iconName:
|
305
|
+
iconName: v === V.S ? "DropdownArrowUp16px" : "DropdownArrowUp24px"
|
302
306
|
}
|
303
307
|
) : /* @__PURE__ */ D(
|
304
308
|
B,
|
305
309
|
{
|
306
|
-
iconName:
|
310
|
+
iconName: v === V.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px"
|
307
311
|
}
|
308
312
|
) });
|
309
|
-
return /* @__PURE__ */ z(
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
}),
|
320
|
-
onClick: ct,
|
321
|
-
children: /* @__PURE__ */ D(
|
322
|
-
$t,
|
313
|
+
return /* @__PURE__ */ z(
|
314
|
+
"div",
|
315
|
+
{
|
316
|
+
className: H(l["input-field-group-datePicker"], {
|
317
|
+
[l.full]: st
|
318
|
+
}),
|
319
|
+
children: [
|
320
|
+
/* @__PURE__ */ z("div", { className: lt, "data-disabled": O, children: [
|
321
|
+
/* @__PURE__ */ D(
|
322
|
+
"div",
|
323
323
|
{
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
324
|
+
role: "button",
|
325
|
+
"data-status": P.status,
|
326
|
+
className: H(l["date-wrapper"], {
|
327
|
+
[l.editable]: b,
|
328
|
+
[l[`border-radius-${X}`]]: X !== C.All
|
329
|
+
}),
|
330
|
+
onClick: it,
|
331
|
+
children: /* @__PURE__ */ D(
|
332
|
+
At,
|
333
|
+
{
|
334
|
+
ref: rt,
|
335
|
+
className: yt,
|
336
|
+
wrapperClassName: l["input-wrapper"],
|
337
|
+
size: v,
|
338
|
+
type: "text",
|
339
|
+
variant: tt,
|
340
|
+
value: at,
|
341
|
+
onChange: nt,
|
342
|
+
rightAddon: {
|
343
|
+
addonType: "react-node",
|
344
|
+
addonContent: /* @__PURE__ */ D(wt, { isActive: S })
|
345
|
+
},
|
346
|
+
rightSlotClassName: l["right-slot"],
|
347
|
+
onFocus: () => {
|
348
|
+
W && !b && d(!0);
|
349
|
+
},
|
350
|
+
borderRadius: X,
|
351
|
+
...P
|
352
|
+
}
|
353
|
+
)
|
342
354
|
}
|
343
|
-
)
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
355
|
+
),
|
356
|
+
S && /* @__PURE__ */ D(Dt, {})
|
357
|
+
] }),
|
358
|
+
Y && typeof Y == "string" && /* @__PURE__ */ D("div", { className: l.textError, children: Y })
|
359
|
+
]
|
360
|
+
}
|
361
|
+
);
|
350
362
|
}
|
351
363
|
)
|
352
364
|
);
|
353
|
-
|
365
|
+
St.displayName = "DatePicker";
|
354
366
|
export {
|
355
|
-
|
367
|
+
St as DatePicker
|
356
368
|
};
|
@@ -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-B3lX7mJq.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-B3lX7mJq.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-B3lX7mJq.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 = ({
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import './assets/styles.css';const r = "_full_qlncs_8", _ = "_wrapper_qlncs_11", n = "_inputBorderControl_qlncs_29", t = "_editable_qlncs_42", c = "_active_qlncs_68", o = "_textError_qlncs_71", e = "_button_qlncs_90", s = "_h_qlncs_136", l = "_b_qlncs_48", a = "_d_qlncs_18", d = "_m_qlncs_158", i = "_a_qlncs_68", p = "_prev_qlncs_160", u = "_orange_qlncs_174", q = "_current_qlncs_191", b = "_monthGrid_qlncs_196", h = {
|
2
|
+
"input-field-group-datePicker": "_input-field-group-datePicker_qlncs_3",
|
3
|
+
full: r,
|
4
|
+
wrapper: _,
|
5
|
+
"date-wrapper": "_date-wrapper_qlncs_18",
|
6
|
+
"input-wrapper": "_input-wrapper_qlncs_22",
|
7
|
+
"right-slot": "_right-slot_qlncs_25",
|
8
|
+
inputBorderControl: n,
|
9
|
+
editable: t,
|
10
|
+
"border-radius-left": "_border-radius-left_qlncs_48",
|
11
|
+
"border-radius-right": "_border-radius-right_qlncs_52",
|
12
|
+
"border-radius-none": "_border-radius-none_qlncs_56",
|
13
|
+
active: c,
|
14
|
+
textError: o,
|
15
|
+
"button-wrapper": "_button-wrapper_qlncs_90",
|
16
|
+
button: e,
|
17
|
+
"calendar-block": "_calendar-block_qlncs_114",
|
18
|
+
h: s,
|
19
|
+
b: l,
|
20
|
+
d: a,
|
21
|
+
m: d,
|
22
|
+
a: i,
|
23
|
+
prev: p,
|
24
|
+
orange: u,
|
25
|
+
current: q,
|
26
|
+
monthGrid: b,
|
27
|
+
"icon-button": "_icon-button_qlncs_201"
|
28
|
+
};
|
29
|
+
export {
|
30
|
+
h as c
|
31
|
+
};
|
package/package.json
CHANGED
@@ -1,31 +0,0 @@
|
|
1
|
-
import './assets/styles.css';const r = "_wrapper_7sg5z_8", _ = "_inputBorderControl_7sg5z_26", t = "_editable_7sg5z_39", o = "_active_7sg5z_65", e = "_textError_7sg5z_68", n = "_input_7sg5z_3", s = "_button_7sg5z_91", a = "_h_7sg5z_137", g = "_b_7sg5z_45", i = "_d_7sg5z_15", p = "_m_7sg5z_159", c = "_a_7sg5z_65", d = "_prev_7sg5z_161", u = "_orange_7sg5z_175", z = "_current_7sg5z_192", b = "_monthGrid_7sg5z_197", l = {
|
2
|
-
"input-field-group-datePicker": "_input-field-group-datePicker_7sg5z_3",
|
3
|
-
wrapper: r,
|
4
|
-
"date-wrapper": "_date-wrapper_7sg5z_15",
|
5
|
-
"input-wrapper": "_input-wrapper_7sg5z_19",
|
6
|
-
"right-slot": "_right-slot_7sg5z_22",
|
7
|
-
inputBorderControl: _,
|
8
|
-
editable: t,
|
9
|
-
"border-radius-left": "_border-radius-left_7sg5z_45",
|
10
|
-
"border-radius-right": "_border-radius-right_7sg5z_49",
|
11
|
-
"border-radius-none": "_border-radius-none_7sg5z_53",
|
12
|
-
active: o,
|
13
|
-
textError: e,
|
14
|
-
input: n,
|
15
|
-
"button-wrapper": "_button-wrapper_7sg5z_91",
|
16
|
-
button: s,
|
17
|
-
"calendar-block": "_calendar-block_7sg5z_115",
|
18
|
-
h: a,
|
19
|
-
b: g,
|
20
|
-
d: i,
|
21
|
-
m: p,
|
22
|
-
a: c,
|
23
|
-
prev: d,
|
24
|
-
orange: u,
|
25
|
-
current: z,
|
26
|
-
monthGrid: b,
|
27
|
-
"icon-button": "_icon-button_7sg5z_202"
|
28
|
-
};
|
29
|
-
export {
|
30
|
-
l as c
|
31
|
-
};
|