mimir-ui-kit 1.35.0 → 1.35.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Input-B-gKQ9FT.js +219 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Input/Input.d.ts +8 -0
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Input/types.d.ts +6 -2
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/SelectSearch/SelectSearch.d.ts +1 -1
- package/dist/components/SelectSearch/SelectSearch.js +891 -860
- package/dist/components/SelectSearch/types.d.ts +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/Input-DGr0q5AJ.js +0 -210
@@ -49,7 +49,7 @@ export type TSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'variant'
|
|
49
49
|
/** Отключает компонент SelectSearch */
|
50
50
|
disabled?: boolean;
|
51
51
|
/** Пропсы для инпута поиска опций */
|
52
|
-
searchProps?: Pick<TInputProps, 'numbersOnly' | 'maxLength'>;
|
52
|
+
searchProps?: Pick<TInputProps, 'numbersOnly' | 'maxLength' | 'required'>;
|
53
53
|
/** Отключает инпут, но позволяет открывать меню*/
|
54
54
|
disableInput?: boolean;
|
55
55
|
};
|
@@ -5,7 +5,7 @@ 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-B-gKQ9FT.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",
|
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 x } from "./Button/constants.js";
|
3
|
-
import { I as E } from "../Input-
|
3
|
+
import { I as E } from "../Input-B-gKQ9FT.js";
|
4
4
|
import { EInputSize as u, EInputStatus as s, EInputVariant as l } 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-B-gKQ9FT.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";
|
package/package.json
CHANGED
package/dist/Input-DGr0q5AJ.js
DELETED
@@ -1,210 +0,0 @@
|
|
1
|
-
import { jsxs as F, jsx as l } from "react/jsx-runtime";
|
2
|
-
import { c as u } from "./index-DIxK0V-G.js";
|
3
|
-
import { memo as Q, forwardRef as U, useState as R, useRef as X, useEffect as Y } from "react";
|
4
|
-
import { EInputVariant as Z } from "./components/Input/constants.js";
|
5
|
-
import { useMergeRefs as $ } from "./hooks/useMergeRefs/useMergeRefs.js";
|
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
|
-
"input-wrapper": "_input-wrapper_1rkts_3",
|
10
|
-
"required-mark": "_required-mark_1rkts_17",
|
11
|
-
label: te,
|
12
|
-
"has-left-slot": "_has-left-slot_1rkts_42",
|
13
|
-
"active-label": "_active-label_1rkts_45",
|
14
|
-
input: ae,
|
15
|
-
"has-right-slot": "_has-right-slot_1rkts_79",
|
16
|
-
focused: re,
|
17
|
-
"has-label": "_has-label_1rkts_85",
|
18
|
-
disabled: le,
|
19
|
-
"left-slot": "_left-slot_1rkts_94",
|
20
|
-
"right-slot": "_right-slot_1rkts_95",
|
21
|
-
"addon-icon": "_addon-icon_1rkts_117",
|
22
|
-
clear: ne,
|
23
|
-
s: oe,
|
24
|
-
m: ce,
|
25
|
-
l: ie,
|
26
|
-
"default-gray": "_default-gray_1rkts_214",
|
27
|
-
"default-white": "_default-white_1rkts_226",
|
28
|
-
success: ue,
|
29
|
-
alarm: de,
|
30
|
-
error: _e
|
31
|
-
}, z = (s) => {
|
32
|
-
var m, n;
|
33
|
-
if (!s)
|
34
|
-
return null;
|
35
|
-
switch (s.addonType) {
|
36
|
-
case "icon": {
|
37
|
-
const f = (m = s.addonContent) == null ? void 0 : m.includes("16px"), k = (n = s.addonContent) == null ? void 0 : n.includes("24px");
|
38
|
-
return /* @__PURE__ */ l(
|
39
|
-
ee,
|
40
|
-
{
|
41
|
-
style: {
|
42
|
-
"--icon-size": u({
|
43
|
-
"16px": f,
|
44
|
-
"24px": k
|
45
|
-
})
|
46
|
-
},
|
47
|
-
className: e["addon-icon"],
|
48
|
-
iconName: s.addonContent
|
49
|
-
}
|
50
|
-
);
|
51
|
-
}
|
52
|
-
case "text":
|
53
|
-
return s.addonContent;
|
54
|
-
default:
|
55
|
-
return null;
|
56
|
-
}
|
57
|
-
}, me = Q(
|
58
|
-
U(
|
59
|
-
(s, m) => {
|
60
|
-
const {
|
61
|
-
value: n,
|
62
|
-
className: f,
|
63
|
-
wrapperClassName: k,
|
64
|
-
variant: A = Z.DefaultGray,
|
65
|
-
type: L = "text",
|
66
|
-
autofocus: b,
|
67
|
-
readonly: r,
|
68
|
-
id: V,
|
69
|
-
onFocus: g,
|
70
|
-
onBlur: N,
|
71
|
-
label: d,
|
72
|
-
withClearButton: j,
|
73
|
-
disabled: o,
|
74
|
-
onChange: c,
|
75
|
-
rightAddon: D,
|
76
|
-
status: B,
|
77
|
-
leftAddon: E,
|
78
|
-
size: x = "m",
|
79
|
-
numbersOnly: O,
|
80
|
-
required: y,
|
81
|
-
maxLength: v,
|
82
|
-
...T
|
83
|
-
} = s, [_, w] = R(b), [p, C] = R(!!n), i = X(null), G = $(i, m);
|
84
|
-
Y(() => {
|
85
|
-
b && w(!0);
|
86
|
-
}, [b]);
|
87
|
-
const M = (t) => {
|
88
|
-
const a = t.currentTarget.value;
|
89
|
-
N == null || N(t), w(!1), C(!!a);
|
90
|
-
}, P = (t) => {
|
91
|
-
r || (w(!0), g == null || g(t));
|
92
|
-
}, S = () => {
|
93
|
-
i != null && i.current && (i.current.value = "", i.current.focus(), C(!1), c == null || c({
|
94
|
-
target: { value: "" }
|
95
|
-
}));
|
96
|
-
}, W = (t) => {
|
97
|
-
let a = t.target.value;
|
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
|
-
}, h = z(E), I = z(D), H = {
|
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
|
-
]);
|
115
|
-
return /* @__PURE__ */ F(
|
116
|
-
"div",
|
117
|
-
{
|
118
|
-
className: u(
|
119
|
-
e["input-wrapper"],
|
120
|
-
e[A],
|
121
|
-
e[B ?? ""],
|
122
|
-
e[x],
|
123
|
-
{
|
124
|
-
[e.disabled]: o || r,
|
125
|
-
[e.focused]: _
|
126
|
-
},
|
127
|
-
k
|
128
|
-
),
|
129
|
-
children: [
|
130
|
-
d && /* @__PURE__ */ F("label", { htmlFor: V, className: J, children: [
|
131
|
-
d,
|
132
|
-
y && (p || _) && /* @__PURE__ */ l(
|
133
|
-
"span",
|
134
|
-
{
|
135
|
-
className: e["required-mark"],
|
136
|
-
"data-testid": "required-mark"
|
137
|
-
}
|
138
|
-
)
|
139
|
-
] }),
|
140
|
-
h && /* @__PURE__ */ l(
|
141
|
-
"span",
|
142
|
-
{
|
143
|
-
className: u(e["left-slot"], {
|
144
|
-
[e.focused]: q,
|
145
|
-
[e["has-label"]]: !!d
|
146
|
-
}),
|
147
|
-
children: h
|
148
|
-
}
|
149
|
-
),
|
150
|
-
/* @__PURE__ */ l(
|
151
|
-
"input",
|
152
|
-
{
|
153
|
-
ref: G,
|
154
|
-
type: L,
|
155
|
-
id: V,
|
156
|
-
className: K,
|
157
|
-
onFocus: P,
|
158
|
-
onBlur: M,
|
159
|
-
readOnly: r,
|
160
|
-
value: n,
|
161
|
-
onChange: W,
|
162
|
-
maxLength: v,
|
163
|
-
disabled: o,
|
164
|
-
required: y,
|
165
|
-
...T
|
166
|
-
}
|
167
|
-
),
|
168
|
-
I && /* @__PURE__ */ l(
|
169
|
-
"span",
|
170
|
-
{
|
171
|
-
className: u(e["right-slot"], {
|
172
|
-
[e.focused]: q,
|
173
|
-
[e["has-label"]]: !!d
|
174
|
-
}),
|
175
|
-
children: I
|
176
|
-
}
|
177
|
-
),
|
178
|
-
y && !p && !_ && /* @__PURE__ */ l(
|
179
|
-
"span",
|
180
|
-
{
|
181
|
-
className: e["required-mark"],
|
182
|
-
"data-testid": "required-mark"
|
183
|
-
}
|
184
|
-
),
|
185
|
-
j && p && /* @__PURE__ */ l(
|
186
|
-
se,
|
187
|
-
{
|
188
|
-
tabIndex: -1,
|
189
|
-
className: e.clear,
|
190
|
-
isIconButton: !0,
|
191
|
-
iconName: "Close16px",
|
192
|
-
size: "m-s",
|
193
|
-
clear: !0,
|
194
|
-
disabled: o || r,
|
195
|
-
variant: "secondary-gray",
|
196
|
-
onClick: S,
|
197
|
-
"data-testid": "clear-button"
|
198
|
-
}
|
199
|
-
)
|
200
|
-
]
|
201
|
-
}
|
202
|
-
);
|
203
|
-
}
|
204
|
-
)
|
205
|
-
);
|
206
|
-
me.displayName = "Input";
|
207
|
-
export {
|
208
|
-
me as I,
|
209
|
-
e as c
|
210
|
-
};
|