mimir-ui-kit 1.34.4-t → 1.34.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{Input-BQldEv37.js → Input-DGr0q5AJ.js} +77 -65
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Drawer/Drawer.d.ts +3 -2
- package/dist/components/Drawer/Drawer.js +35 -33
- package/dist/components/Input/Input.js +1 -1
- 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/Loader/Loader.js +6 -6
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -0
- package/dist/components/SelectSearch/SelectSearch.js +1 -1
- package/dist/components/TextArea/TextArea.js +60 -46
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
@@ -3,67 +3,67 @@ import { c as u } from "./index-DIxK0V-G.js";
|
|
3
3
|
import { memo as Q, forwardRef as U, useState as R, useRef as X, useEffect as Y } from "react";
|
4
4
|
import { EInputVariant as Z } from "./components/Input/constants.js";
|
5
5
|
import { useMergeRefs as $ } from "./hooks/useMergeRefs/useMergeRefs.js";
|
6
|
-
import { Icon as
|
7
|
-
import { Button as
|
8
|
-
import './assets/Input.css';const
|
6
|
+
import { Icon as ee } from "./icons/Icon.js";
|
7
|
+
import { Button as se } from "./components/Button/Button.js";
|
8
|
+
import './assets/Input.css';const te = "_label_1rkts_27", ae = "_input_1rkts_3", re = "_focused_1rkts_82", le = "_disabled_1rkts_88", ne = "_clear_1rkts_121", oe = "_s_1rkts_169", ce = "_m_1rkts_184", ie = "_l_1rkts_27", ue = "_success_1rkts_241", de = "_alarm_1rkts_261", _e = "_error_1rkts_281", e = {
|
9
9
|
"input-wrapper": "_input-wrapper_1rkts_3",
|
10
10
|
"required-mark": "_required-mark_1rkts_17",
|
11
|
-
label:
|
11
|
+
label: te,
|
12
12
|
"has-left-slot": "_has-left-slot_1rkts_42",
|
13
13
|
"active-label": "_active-label_1rkts_45",
|
14
|
-
input:
|
14
|
+
input: ae,
|
15
15
|
"has-right-slot": "_has-right-slot_1rkts_79",
|
16
|
-
focused:
|
16
|
+
focused: re,
|
17
17
|
"has-label": "_has-label_1rkts_85",
|
18
|
-
disabled:
|
18
|
+
disabled: le,
|
19
19
|
"left-slot": "_left-slot_1rkts_94",
|
20
20
|
"right-slot": "_right-slot_1rkts_95",
|
21
21
|
"addon-icon": "_addon-icon_1rkts_117",
|
22
|
-
clear:
|
23
|
-
s:
|
24
|
-
m:
|
25
|
-
l:
|
22
|
+
clear: ne,
|
23
|
+
s: oe,
|
24
|
+
m: ce,
|
25
|
+
l: ie,
|
26
26
|
"default-gray": "_default-gray_1rkts_214",
|
27
27
|
"default-white": "_default-white_1rkts_226",
|
28
|
-
success:
|
29
|
-
alarm:
|
30
|
-
error:
|
31
|
-
}, z = (
|
28
|
+
success: ue,
|
29
|
+
alarm: de,
|
30
|
+
error: _e
|
31
|
+
}, z = (s) => {
|
32
32
|
var m, n;
|
33
|
-
if (!
|
33
|
+
if (!s)
|
34
34
|
return null;
|
35
|
-
switch (
|
35
|
+
switch (s.addonType) {
|
36
36
|
case "icon": {
|
37
|
-
const f = (m =
|
37
|
+
const f = (m = s.addonContent) == null ? void 0 : m.includes("16px"), k = (n = s.addonContent) == null ? void 0 : n.includes("24px");
|
38
38
|
return /* @__PURE__ */ l(
|
39
|
-
|
39
|
+
ee,
|
40
40
|
{
|
41
41
|
style: {
|
42
42
|
"--icon-size": u({
|
43
43
|
"16px": f,
|
44
|
-
"24px":
|
44
|
+
"24px": k
|
45
45
|
})
|
46
46
|
},
|
47
|
-
className:
|
48
|
-
iconName:
|
47
|
+
className: e["addon-icon"],
|
48
|
+
iconName: s.addonContent
|
49
49
|
}
|
50
50
|
);
|
51
51
|
}
|
52
52
|
case "text":
|
53
|
-
return
|
53
|
+
return s.addonContent;
|
54
54
|
default:
|
55
55
|
return null;
|
56
56
|
}
|
57
|
-
},
|
57
|
+
}, me = Q(
|
58
58
|
U(
|
59
|
-
(
|
59
|
+
(s, m) => {
|
60
60
|
const {
|
61
61
|
value: n,
|
62
62
|
className: f,
|
63
|
-
wrapperClassName:
|
64
|
-
variant:
|
63
|
+
wrapperClassName: k,
|
64
|
+
variant: A = Z.DefaultGray,
|
65
65
|
type: L = "text",
|
66
|
-
autofocus:
|
66
|
+
autofocus: b,
|
67
67
|
readonly: r,
|
68
68
|
id: V,
|
69
69
|
onFocus: g,
|
@@ -80,10 +80,10 @@ import './assets/Input.css';const ts = "_label_1rkts_27", as = "_input_1rkts_3",
|
|
80
80
|
required: y,
|
81
81
|
maxLength: v,
|
82
82
|
...T
|
83
|
-
} =
|
83
|
+
} = s, [_, w] = R(b), [p, C] = R(!!n), i = X(null), G = $(i, m);
|
84
84
|
Y(() => {
|
85
|
-
|
86
|
-
}, [
|
85
|
+
b && w(!0);
|
86
|
+
}, [b]);
|
87
87
|
const M = (t) => {
|
88
88
|
const a = t.currentTarget.value;
|
89
89
|
N == null || N(t), w(!1), C(!!a);
|
@@ -97,46 +97,52 @@ import './assets/Input.css';const ts = "_label_1rkts_27", as = "_input_1rkts_3",
|
|
97
97
|
let a = t.target.value;
|
98
98
|
O && (a = a.replace(/\D/g, "")), v !== void 0 && (a = a.slice(0, v)), t.target.value = a, c == null || c(t), C(!!a);
|
99
99
|
}, h = z(E), I = z(D), H = {
|
100
|
-
[
|
101
|
-
[
|
102
|
-
[
|
103
|
-
[
|
104
|
-
[
|
105
|
-
[
|
106
|
-
},
|
107
|
-
[
|
108
|
-
[
|
109
|
-
[
|
110
|
-
}), K = u(
|
111
|
-
|
112
|
-
|
113
|
-
|
100
|
+
[e.readonly]: o || r,
|
101
|
+
[e.focused]: _,
|
102
|
+
[e.disabled]: o || r,
|
103
|
+
[e["has-label"]]: !!d,
|
104
|
+
[e["has-left-slot"]]: !!h,
|
105
|
+
[e["has-right-slot"]]: !!I
|
106
|
+
}, q = _ || p || !!n, J = u(e.label, f, e[x], {
|
107
|
+
[e["active-label"]]: q,
|
108
|
+
[e.disabled]: o || r,
|
109
|
+
[e["has-left-slot"]]: !!h
|
110
|
+
}), K = u(e.input, H, f, [
|
111
|
+
e[A],
|
112
|
+
e[B ?? ""],
|
113
|
+
e[x]
|
114
114
|
]);
|
115
115
|
return /* @__PURE__ */ F(
|
116
116
|
"div",
|
117
117
|
{
|
118
118
|
className: u(
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
119
|
+
e["input-wrapper"],
|
120
|
+
e[A],
|
121
|
+
e[B ?? ""],
|
122
|
+
e[x],
|
123
123
|
{
|
124
|
-
[
|
125
|
-
[
|
124
|
+
[e.disabled]: o || r,
|
125
|
+
[e.focused]: _
|
126
126
|
},
|
127
|
-
|
127
|
+
k
|
128
128
|
),
|
129
129
|
children: [
|
130
130
|
d && /* @__PURE__ */ F("label", { htmlFor: V, className: J, children: [
|
131
131
|
d,
|
132
|
-
y && (p || _) && /* @__PURE__ */ l(
|
132
|
+
y && (p || _) && /* @__PURE__ */ l(
|
133
|
+
"span",
|
134
|
+
{
|
135
|
+
className: e["required-mark"],
|
136
|
+
"data-testid": "required-mark"
|
137
|
+
}
|
138
|
+
)
|
133
139
|
] }),
|
134
140
|
h && /* @__PURE__ */ l(
|
135
141
|
"span",
|
136
142
|
{
|
137
|
-
className: u(
|
138
|
-
[
|
139
|
-
[
|
143
|
+
className: u(e["left-slot"], {
|
144
|
+
[e.focused]: q,
|
145
|
+
[e["has-label"]]: !!d
|
140
146
|
}),
|
141
147
|
children: h
|
142
148
|
}
|
@@ -162,19 +168,25 @@ import './assets/Input.css';const ts = "_label_1rkts_27", as = "_input_1rkts_3",
|
|
162
168
|
I && /* @__PURE__ */ l(
|
163
169
|
"span",
|
164
170
|
{
|
165
|
-
className: u(
|
166
|
-
[
|
167
|
-
[
|
171
|
+
className: u(e["right-slot"], {
|
172
|
+
[e.focused]: q,
|
173
|
+
[e["has-label"]]: !!d
|
168
174
|
}),
|
169
175
|
children: I
|
170
176
|
}
|
171
177
|
),
|
172
|
-
y && !p && !_ && /* @__PURE__ */ l(
|
178
|
+
y && !p && !_ && /* @__PURE__ */ l(
|
179
|
+
"span",
|
180
|
+
{
|
181
|
+
className: e["required-mark"],
|
182
|
+
"data-testid": "required-mark"
|
183
|
+
}
|
184
|
+
),
|
173
185
|
j && p && /* @__PURE__ */ l(
|
174
|
-
|
186
|
+
se,
|
175
187
|
{
|
176
188
|
tabIndex: -1,
|
177
|
-
className:
|
189
|
+
className: e.clear,
|
178
190
|
isIconButton: !0,
|
179
191
|
iconName: "Close16px",
|
180
192
|
size: "m-s",
|
@@ -191,8 +203,8 @@ import './assets/Input.css';const ts = "_label_1rkts_27", as = "_input_1rkts_3",
|
|
191
203
|
}
|
192
204
|
)
|
193
205
|
);
|
194
|
-
|
206
|
+
me.displayName = "Input";
|
195
207
|
export {
|
196
|
-
|
197
|
-
|
208
|
+
me as I,
|
209
|
+
e as c
|
198
210
|
};
|
@@ -8,7 +8,7 @@ import { formatDatePart as h } from "./utils.js";
|
|
8
8
|
import { YearPickerModal as B } from "./YearPickerModal.js";
|
9
9
|
import { useClickOutside as C } from "../../hooks/useClickOutside/useClickOutside.js";
|
10
10
|
import { formating as E } from "../../utils/index.js";
|
11
|
-
import { I as V } from "../../Input-
|
11
|
+
import { I as V } from "../../Input-DGr0q5AJ.js";
|
12
12
|
import { EInputStatus as tt } from "../Input/constants.js";
|
13
13
|
const st = 31, et = 12, it = 10, at = Q(
|
14
14
|
W(
|
@@ -1,17 +1,18 @@
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
2
2
|
import { EDrawerPosition } from './constants';
|
3
3
|
|
4
|
+
export declare const ANIMATION_DELAY = 300;
|
4
5
|
type TProps = {
|
5
6
|
/**
|
6
7
|
* Обязательный заголовок.
|
7
8
|
*/
|
8
9
|
title: string | ReactNode;
|
9
10
|
/**
|
10
|
-
* Флаг
|
11
|
+
* Флаг отвечающий за показ/скрытие.
|
11
12
|
*/
|
12
13
|
isOpen?: boolean;
|
13
14
|
/**
|
14
|
-
* Флаг
|
15
|
+
* Флаг отвечающий за то, должен ли компонент полностью размонтироваться.
|
15
16
|
*/
|
16
17
|
unmount?: boolean;
|
17
18
|
/**
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import { jsxs as m, jsx as t, Fragment as A } from "react/jsx-runtime";
|
2
2
|
import { c as s } from "../../index-DIxK0V-G.js";
|
3
3
|
import { useState as u, useRef as X, useCallback as g, useEffect as j } from "react";
|
4
|
-
import { EDrawerPosition as
|
4
|
+
import { EDrawerPosition as v } from "./constants.js";
|
5
5
|
import { useMediaQuery as P } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
6
6
|
import { EMediaQuery as Q } from "../../hooks/useMediaQuery/constants.js";
|
7
7
|
import { useLockBodyScroll as F } from "../../hooks/useLockBodyScroll/useLockBodyScroll.js";
|
8
8
|
import { useResizeObserver as G } from "../../hooks/useResizeObserver/useResizeObserver.js";
|
9
|
-
import { Button as
|
10
|
-
import { EButtonVariantDefault as H, EButtonSize as
|
9
|
+
import { Button as w } from "../Button/Button.js";
|
10
|
+
import { EButtonVariantDefault as H, EButtonSize as n } from "../Button/constants.js";
|
11
11
|
import { Loader as K } from "../Loader/Loader.js";
|
12
12
|
import { Portal as O } from "../Portal/Portal.js";
|
13
|
-
import '../../assets/Drawer.css';const V = "_drawer_1xs4d_3", W = "_content_1xs4d_27", Y = "_header_1xs4d_45", q = "_title_1xs4d_59", J = "_space_1xs4d_73", U = "_inner_1xs4d_84", Z = "_button_1xs4d_87", $ = "_footer_1xs4d_92", ee = "_left_1xs4d_105", te = "_right_1xs4d_109", oe = "_full_1xs4d_113", se = "_bottom_1xs4d_123",
|
13
|
+
import '../../assets/Drawer.css';const V = "_drawer_1xs4d_3", W = "_content_1xs4d_27", Y = "_header_1xs4d_45", q = "_title_1xs4d_59", J = "_space_1xs4d_73", U = "_inner_1xs4d_84", Z = "_button_1xs4d_87", $ = "_footer_1xs4d_92", ee = "_left_1xs4d_105", te = "_right_1xs4d_109", oe = "_full_1xs4d_113", se = "_bottom_1xs4d_123", re = "_opened_1xs4d_140", ne = "_overlay_1xs4d_196", le = "_unmount_1xs4d_212", e = {
|
14
14
|
drawer: V,
|
15
15
|
content: W,
|
16
16
|
"is-loading": "_is-loading_1xs4d_41",
|
@@ -27,28 +27,28 @@ import '../../assets/Drawer.css';const V = "_drawer_1xs4d_3", W = "_content_1xs4
|
|
27
27
|
full: oe,
|
28
28
|
bottom: se,
|
29
29
|
"full-bottom-height": "_full-bottom-height_1xs4d_134",
|
30
|
-
opened:
|
30
|
+
opened: re,
|
31
31
|
"is-closing": "_is-closing_1xs4d_159",
|
32
|
-
overlay:
|
32
|
+
overlay: ne,
|
33
33
|
unmount: le
|
34
|
-
},
|
35
|
-
isOpen:
|
34
|
+
}, ae = 300, ge = ({
|
35
|
+
isOpen: r,
|
36
36
|
onClose: l,
|
37
|
-
title:
|
38
|
-
className:
|
37
|
+
title: N,
|
38
|
+
className: k,
|
39
39
|
unmount: f = !0,
|
40
|
-
isLoading:
|
40
|
+
isLoading: a = !1,
|
41
41
|
stickyHeader: B,
|
42
42
|
fullBottomHeight: E = !1,
|
43
|
-
position:
|
43
|
+
position: i = v.RIGHT,
|
44
44
|
paddingRight: M = 8,
|
45
|
-
footer:
|
46
|
-
children:
|
47
|
-
classNameInner:
|
45
|
+
footer: c,
|
46
|
+
children: I,
|
47
|
+
classNameInner: S,
|
48
48
|
classNameFooter: C
|
49
49
|
}) => {
|
50
50
|
const [L, h] = u(!1), [T, x] = u(!1), [D, p] = u(!1), y = X(), d = P(Q.XS1), { ref: z } = G({
|
51
|
-
enabled:
|
51
|
+
enabled: i === v.BOTTOM
|
52
52
|
});
|
53
53
|
F({
|
54
54
|
on: D,
|
@@ -57,37 +57,37 @@ import '../../assets/Drawer.css';const V = "_drawer_1xs4d_3", W = "_content_1xs4
|
|
57
57
|
const o = g(() => {
|
58
58
|
l && (h(!0), p(!1), y.current = setTimeout(() => {
|
59
59
|
l(), h(!1);
|
60
|
-
},
|
60
|
+
}, ae));
|
61
61
|
}, [l]), _ = g(
|
62
62
|
(R) => {
|
63
63
|
R.key === "Escape" && o();
|
64
64
|
},
|
65
65
|
[o]
|
66
66
|
);
|
67
|
-
j(() => (
|
67
|
+
j(() => (r && (p(!0), x(!0), window.addEventListener("keydown", _)), () => {
|
68
68
|
x(!1), clearTimeout(y.current), window.removeEventListener("keydown", _);
|
69
|
-
}), [
|
69
|
+
}), [r, _]);
|
70
70
|
const b = {
|
71
71
|
[e.opened]: T,
|
72
72
|
[e["is-closing"]]: L,
|
73
73
|
[e["full-bottom-height"]]: E,
|
74
|
-
[e["is-loading"]]:
|
74
|
+
[e["is-loading"]]: a
|
75
75
|
};
|
76
|
-
return !
|
76
|
+
return !r && f ? null : /* @__PURE__ */ m(O, { children: [
|
77
77
|
/* @__PURE__ */ t(
|
78
78
|
"div",
|
79
79
|
{
|
80
|
-
"aria-hidden": !
|
80
|
+
"aria-hidden": !r,
|
81
81
|
role: "dialog",
|
82
|
-
className: s(e.drawer, e[
|
82
|
+
className: s(e.drawer, e[i], b, k),
|
83
83
|
children: /* @__PURE__ */ t(
|
84
84
|
"section",
|
85
85
|
{
|
86
86
|
ref: z,
|
87
|
-
className: s(e.content, e[
|
88
|
-
[e["is-loading"]]: !!
|
87
|
+
className: s(e.content, e[i], {
|
88
|
+
[e["is-loading"]]: !!a
|
89
89
|
}),
|
90
|
-
children:
|
90
|
+
children: a ? /* @__PURE__ */ t(K, {}) : /* @__PURE__ */ m(A, { children: [
|
91
91
|
/* @__PURE__ */ m(
|
92
92
|
"header",
|
93
93
|
{
|
@@ -95,13 +95,13 @@ import '../../assets/Drawer.css';const V = "_drawer_1xs4d_3", W = "_content_1xs4
|
|
95
95
|
[e["sticky-header"]]: B
|
96
96
|
}),
|
97
97
|
children: [
|
98
|
-
/* @__PURE__ */ t("h2", { className: e.title, children:
|
98
|
+
/* @__PURE__ */ t("h2", { className: e.title, children: N }),
|
99
99
|
/* @__PURE__ */ t("div", { className: e.space, children: /* @__PURE__ */ t(
|
100
|
-
|
100
|
+
w,
|
101
101
|
{
|
102
102
|
variant: H.SecondaryWhite,
|
103
103
|
isIconButton: !0,
|
104
|
-
size: d ?
|
104
|
+
size: d ? n.S : n.M,
|
105
105
|
iconName: "Close16px",
|
106
106
|
onClick: o,
|
107
107
|
className: e.button
|
@@ -110,11 +110,11 @@ import '../../assets/Drawer.css';const V = "_drawer_1xs4d_3", W = "_content_1xs4
|
|
110
110
|
]
|
111
111
|
}
|
112
112
|
),
|
113
|
-
/* @__PURE__ */ t("div", { className: s(e.inner,
|
114
|
-
/* @__PURE__ */ t("footer", { className: s(e.footer, C), children: typeof
|
115
|
-
|
113
|
+
/* @__PURE__ */ t("div", { className: s(e.inner, S), children: I }),
|
114
|
+
/* @__PURE__ */ t("footer", { className: s(e.footer, C), children: typeof c == "function" ? c({ handleClose: o }) : c || /* @__PURE__ */ t(
|
115
|
+
w,
|
116
116
|
{
|
117
|
-
size: d ?
|
117
|
+
size: d ? n.M : n.XXL,
|
118
118
|
full: d,
|
119
119
|
onClick: o,
|
120
120
|
className: e["footer-button"],
|
@@ -136,11 +136,13 @@ import '../../assets/Drawer.css';const V = "_drawer_1xs4d_3", W = "_content_1xs4
|
|
136
136
|
},
|
137
137
|
b
|
138
138
|
),
|
139
|
+
"data-testId": "drawer-overlay",
|
139
140
|
onClick: o
|
140
141
|
}
|
141
142
|
)
|
142
143
|
] });
|
143
144
|
};
|
144
145
|
export {
|
146
|
+
ae as ANIMATION_DELAY,
|
145
147
|
ge as Drawer
|
146
148
|
};
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
2
2
|
import "../../index-DIxK0V-G.js";
|
3
3
|
import "react";
|
4
4
|
import "./constants.js";
|
5
|
-
import { I as f } from "../../Input-
|
5
|
+
import { I as f } from "../../Input-DGr0q5AJ.js";
|
6
6
|
import "../../hooks/useMergeRefs/useMergeRefs.js";
|
7
7
|
import "../../icons/Icon.js";
|
8
8
|
import "../Button/Button.js";
|
@@ -3,7 +3,7 @@ import { c as i } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { memo as m, forwardRef as w, useState as u } from "react";
|
4
4
|
import { Icon as _ } from "../../icons/Icon.js";
|
5
5
|
import { Button as l } from "../Button/Button.js";
|
6
|
-
import { I as b } from "../../Input-
|
6
|
+
import { I as b } from "../../Input-DGr0q5AJ.js";
|
7
7
|
import '../../assets/InputPassword.css';const d = "_input_7b9x2_2", x = "_wrapper_7b9x2_6", h = "_button_7b9x2_17", f = "_icon_7b9x2_33", N = "_show_7b9x2_38", t = {
|
8
8
|
input: d,
|
9
9
|
wrapper: x,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
2
2
|
import { memo as I, forwardRef as i, useState as c, useCallback as f, useImperativeHandle as P } from "react";
|
3
3
|
import { getMaskedInputPhoneValue as m, getUnmaskedInputValue as o } from "./utils.js";
|
4
|
-
import { I as b } from "../../Input-
|
4
|
+
import { I as b } from "../../Input-DGr0q5AJ.js";
|
5
5
|
const h = I(
|
6
6
|
i(
|
7
7
|
({ value: s = "", onChange: e, ...p }, a) => {
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { jsxs as a, jsx as
|
2
|
-
import '../../assets/Loader.css';const s = "_loader_eco13_2", o = "_circle_eco13_11", r = "_animate_eco13_1",
|
1
|
+
import { jsxs as a, jsx as c } from "react/jsx-runtime";
|
2
|
+
import '../../assets/Loader.css';const s = "_loader_eco13_2", o = "_circle_eco13_11", r = "_animate_eco13_1", e = {
|
3
3
|
loader: s,
|
4
4
|
circle: o,
|
5
5
|
animate: r
|
6
|
-
},
|
7
|
-
/* @__PURE__ */
|
8
|
-
/* @__PURE__ */
|
6
|
+
}, t = () => /* @__PURE__ */ a("div", { className: e.loader, "data-testid": "loader", children: [
|
7
|
+
/* @__PURE__ */ c("span", { className: e.circle }),
|
8
|
+
/* @__PURE__ */ c("span", { className: e.circle })
|
9
9
|
] });
|
10
10
|
export {
|
11
|
-
|
11
|
+
t as Loader
|
12
12
|
};
|
@@ -3,7 +3,7 @@ import { c as u } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { forwardRef as P, useImperativeHandle as R, Fragment as T } from "react";
|
4
4
|
import { ITEMS_PER_SEPARATOR as q, DEFAULT_VALUE_LENGTH as v } from "./constants.js";
|
5
5
|
import { useOTPInput as y } from "./hooks.js";
|
6
|
-
import { I as A } from "../../Input-
|
6
|
+
import { I as A } from "../../Input-DGr0q5AJ.js";
|
7
7
|
import '../../assets/OtpInput.css';const C = "_otp_1shq3_3", F = "_input_1shq3_14", L = "_separator_1shq3_28", n = {
|
8
8
|
otp: C,
|
9
9
|
"input-wrapper": "_input-wrapper_1shq3_14",
|
@@ -146,6 +146,7 @@ const Qe = "_group_yses6_3", Ye = "_radio_yses6_18", Ze = "_disabled_yses6_40",
|
|
146
146
|
value: t,
|
147
147
|
disabled: d.disabled,
|
148
148
|
className: n,
|
149
|
+
"data-testid": `radio-option-${t}`,
|
149
150
|
children: ({ checked: u, disabled: y }) => /* @__PURE__ */ ee(_e, { children: [
|
150
151
|
/* @__PURE__ */ L(
|
151
152
|
V,
|
@@ -4,7 +4,7 @@ import * as y from "react";
|
|
4
4
|
import j, { useReducer as on, useMemo as q, useSyncExternalStore as Vn, useId as Ue, useEffect as ne, useCallback as He, useRef as Y, useLayoutEffect as rn, createContext as ve, useContext as ae, useState as ue, Fragment as rt, createRef as Wn, forwardRef as Bn } from "react";
|
5
5
|
import { ESelectSearchSize as Le } from "./constants.js";
|
6
6
|
import { Icon as Dt } from "../../icons/Icon.js";
|
7
|
-
import { I as jn } from "../../Input-
|
7
|
+
import { I as jn } from "../../Input-DGr0q5AJ.js";
|
8
8
|
import { EInputVariant as Un, EInputSize as ft } from "../Input/constants.js";
|
9
9
|
import { n as U, u as Et, d as Me, s as Ae, o as A, p as sn, t as Yn, e as ke, W as be, y as Oe, T as Kn, H as xe, M as $t, a as Te, $ as ln, b as an, D as Rt, c as X } from "../../keyboard-B0lm_zyn.js";
|
10
10
|
import * as Ve from "react-dom";
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { jsxs as V, jsx as n } from "react/jsx-runtime";
|
2
|
-
import { c as
|
2
|
+
import { c as d } from "../../index-DIxK0V-G.js";
|
3
3
|
import { memo as K, forwardRef as Q, useState as B, useRef as U, useEffect as X } from "react";
|
4
4
|
import { useAutoResizeTextArea as Y } from "./hooks.js";
|
5
5
|
import { useMergeRefs as Z } from "../../hooks/useMergeRefs/useMergeRefs.js";
|
6
6
|
import { Icon as $ } from "../../icons/Icon.js";
|
7
7
|
import { Button as ee } from "../Button/Button.js";
|
8
|
-
import { c as e } from "../../Input-
|
8
|
+
import { c as e } from "../../Input-DGr0q5AJ.js";
|
9
9
|
import { EInputVariant as ae } from "../Input/constants.js";
|
10
10
|
import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_1n8kz_22", re = "_s_1n8kz_54", le = "_m_1n8kz_62", ne = "_l_1n8kz_22", a = {
|
11
11
|
"textarea-wrapper": "_textarea-wrapper_1n8kz_2",
|
@@ -19,17 +19,17 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
19
19
|
m: le,
|
20
20
|
l: ne
|
21
21
|
}, F = (t) => {
|
22
|
-
var
|
22
|
+
var p, o;
|
23
23
|
if (!t)
|
24
24
|
return null;
|
25
25
|
switch (t.addonType) {
|
26
26
|
case "icon": {
|
27
|
-
const _ = (
|
27
|
+
const _ = (p = t.addonContent) == null ? void 0 : p.includes("16px"), b = (o = t.addonContent) == null ? void 0 : o.includes("24px");
|
28
28
|
return /* @__PURE__ */ n(
|
29
29
|
$,
|
30
30
|
{
|
31
31
|
style: {
|
32
|
-
"--icon-size":
|
32
|
+
"--icon-size": d({
|
33
33
|
"16px": _,
|
34
34
|
"24px": b
|
35
35
|
})
|
@@ -46,95 +46,102 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
46
46
|
}
|
47
47
|
}, oe = K(
|
48
48
|
Q(
|
49
|
-
(t,
|
49
|
+
(t, p) => {
|
50
50
|
const {
|
51
51
|
value: o,
|
52
52
|
className: _,
|
53
53
|
wrapperClassName: b,
|
54
|
-
variant:
|
55
|
-
autofocus:
|
54
|
+
variant: q = ae.DefaultGray,
|
55
|
+
autofocus: k,
|
56
56
|
readonly: s,
|
57
|
-
status:
|
58
|
-
id:
|
59
|
-
onFocus:
|
57
|
+
status: I,
|
58
|
+
id: R,
|
59
|
+
onFocus: N,
|
60
60
|
onBlur: z,
|
61
|
-
label:
|
61
|
+
label: i,
|
62
62
|
onChange: c,
|
63
63
|
withClearButton: j,
|
64
|
-
disabled:
|
64
|
+
disabled: u,
|
65
65
|
rightAddon: E,
|
66
66
|
leftAddon: L,
|
67
67
|
size: m = "m",
|
68
|
-
required:
|
68
|
+
required: g,
|
69
69
|
...D
|
70
|
-
} = t, [
|
70
|
+
} = t, [f, C] = B(k), [h, v] = B(!!o), r = U(null), G = Z(r, p);
|
71
71
|
X(() => {
|
72
|
-
|
73
|
-
}, [
|
74
|
-
const
|
72
|
+
k && C(!0);
|
73
|
+
}, [k]);
|
74
|
+
const T = Y(r.current), M = (l) => {
|
75
75
|
const y = l.currentTarget.value;
|
76
|
-
z == null || z(l),
|
76
|
+
z == null || z(l), C(!1), v(!!y);
|
77
77
|
}, O = (l) => {
|
78
|
-
s || (
|
78
|
+
s || (C(!0), N == null || N(l));
|
79
79
|
}, P = () => {
|
80
|
-
r != null && r.current && (r.current.value = "", r.current.focus(), v(!1),
|
80
|
+
r != null && r.current && (r.current.value = "", r.current.focus(), v(!1), T(), c == null || c({
|
81
81
|
target: { value: "" }
|
82
82
|
}));
|
83
83
|
}, S = (l) => {
|
84
84
|
const y = l.target.value;
|
85
|
-
v(!!y),
|
85
|
+
v(!!y), T(), c == null || c(l);
|
86
86
|
}, x = F(L), A = F(E), W = {
|
87
|
-
[e.readonly]:
|
88
|
-
[e.focused]:
|
89
|
-
[e.disabled]:
|
87
|
+
[e.readonly]: u || s,
|
88
|
+
[e.focused]: f,
|
89
|
+
[e.disabled]: u || s,
|
90
90
|
[e["has-left-slot"]]: !!x,
|
91
91
|
[e["has-right-slot"]]: !!A,
|
92
|
-
[a["has-label"]]: !!
|
93
|
-
}, w =
|
92
|
+
[a["has-label"]]: !!i
|
93
|
+
}, w = f || h || !!o, H = d(
|
94
94
|
e.label,
|
95
95
|
a.label,
|
96
96
|
{
|
97
97
|
[a["active-label"]]: w,
|
98
|
-
[e.disabled]:
|
98
|
+
[e.disabled]: u || s,
|
99
99
|
[a["has-left-slot"]]: !!x
|
100
100
|
},
|
101
101
|
_,
|
102
102
|
e[m]
|
103
|
-
), J =
|
103
|
+
), J = d(
|
104
104
|
a.textarea,
|
105
105
|
e.input,
|
106
106
|
W,
|
107
107
|
_,
|
108
|
-
[e[
|
108
|
+
[e[q], a[m], e[m], e[I ?? ""]]
|
109
109
|
);
|
110
110
|
return /* @__PURE__ */ V(
|
111
111
|
"div",
|
112
112
|
{
|
113
|
-
className:
|
113
|
+
className: d(
|
114
114
|
e["input-wrapper"],
|
115
115
|
a["textarea-wrapper"],
|
116
|
-
e[
|
117
|
-
e[
|
116
|
+
e[q],
|
117
|
+
e[I ?? ""],
|
118
118
|
a[m],
|
119
119
|
e[m],
|
120
120
|
{
|
121
|
-
[e.disabled]:
|
122
|
-
[e.focused]:
|
121
|
+
[e.disabled]: u || s,
|
122
|
+
[e.focused]: f
|
123
123
|
},
|
124
124
|
b
|
125
125
|
),
|
126
126
|
children: [
|
127
|
-
|
128
|
-
|
129
|
-
|
127
|
+
i && /* @__PURE__ */ V("label", { htmlFor: R, className: H, children: [
|
128
|
+
i,
|
129
|
+
g && (h || f) && /* @__PURE__ */ n(
|
130
|
+
"span",
|
131
|
+
{
|
132
|
+
className: a["required-mark"],
|
133
|
+
"data-testid": "required-mark"
|
134
|
+
}
|
135
|
+
)
|
130
136
|
] }),
|
131
137
|
x && /* @__PURE__ */ n(
|
132
138
|
"span",
|
133
139
|
{
|
134
|
-
className:
|
140
|
+
className: d(e["left-slot"], {
|
135
141
|
[e.focused]: w,
|
136
|
-
[e["has-label"]]: !!
|
142
|
+
[e["has-label"]]: !!i
|
137
143
|
}),
|
144
|
+
"data-testId": "left-addon",
|
138
145
|
children: x
|
139
146
|
}
|
140
147
|
),
|
@@ -142,28 +149,35 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
142
149
|
"textarea",
|
143
150
|
{
|
144
151
|
ref: G,
|
145
|
-
id:
|
152
|
+
id: R,
|
146
153
|
className: J,
|
147
154
|
onFocus: O,
|
148
155
|
onBlur: M,
|
149
156
|
readOnly: s,
|
150
157
|
value: o,
|
151
158
|
onChange: S,
|
152
|
-
required:
|
159
|
+
required: g,
|
153
160
|
...D
|
154
161
|
}
|
155
162
|
),
|
156
163
|
A && /* @__PURE__ */ n(
|
157
164
|
"span",
|
158
165
|
{
|
159
|
-
className:
|
166
|
+
className: d(e["right-slot"], {
|
160
167
|
[e.focused]: w,
|
161
|
-
[e["has-label"]]: !!
|
168
|
+
[e["has-label"]]: !!i
|
162
169
|
}),
|
170
|
+
"data-testId": "right-addon",
|
163
171
|
children: A
|
164
172
|
}
|
165
173
|
),
|
166
|
-
|
174
|
+
g && !h && !f && /* @__PURE__ */ n(
|
175
|
+
"span",
|
176
|
+
{
|
177
|
+
className: a["required-mark"],
|
178
|
+
"data-testid": "required-mark"
|
179
|
+
}
|
180
|
+
),
|
167
181
|
j && h && /* @__PURE__ */ n(
|
168
182
|
ee,
|
169
183
|
{
|
@@ -173,7 +187,7 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
173
187
|
iconName: "Close16px",
|
174
188
|
size: "m-s",
|
175
189
|
clear: !0,
|
176
|
-
disabled:
|
190
|
+
disabled: u || s,
|
177
191
|
variant: "secondary-gray",
|
178
192
|
onClick: P
|
179
193
|
}
|
package/dist/components/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Button as e } from "./Button/Button.js";
|
2
2
|
import { EButtonForm as p, EButtonSize as a, EButtonVariantBorderless as m, EButtonVariantDefault as i, EButtonVariantOutline as f, EButtonVariantRound as n } from "./Button/constants.js";
|
3
|
-
import { I as E } from "../Input-
|
3
|
+
import { I as E } from "../Input-DGr0q5AJ.js";
|
4
4
|
import { EInputSize as u, EInputStatus as s, EInputVariant as d } from "./Input/constants.js";
|
5
5
|
import { TextArea as c } from "./TextArea/TextArea.js";
|
6
6
|
import { InputPassword as I } from "./InputPassword/InputPassword.js";
|
package/dist/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Button as e } from "./components/Button/Button.js";
|
2
2
|
import { EButtonForm as p, EButtonSize as a, EButtonVariantBorderless as m, EButtonVariantDefault as f, EButtonVariantOutline as i, EButtonVariantRound as x } from "./components/Button/constants.js";
|
3
|
-
import { I as u } from "./Input-
|
3
|
+
import { I as u } from "./Input-DGr0q5AJ.js";
|
4
4
|
import { EInputSize as E, EInputStatus as S, EInputVariant as d } from "./components/Input/constants.js";
|
5
5
|
import { TextArea as c } from "./components/TextArea/TextArea.js";
|
6
6
|
import { InputPassword as I } from "./components/InputPassword/InputPassword.js";
|