mimir-ui-kit 1.36.12 → 1.36.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Input-BYrIS5GU.js +225 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/ListFiles.css +1 -1
- package/dist/assets/TextArea.css +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- 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/ListFiles/ListFiles.d.ts +11 -1
- package/dist/components/ListFiles/ListFiles.js +59 -40
- package/dist/components/ListFiles/constants.d.ts +4 -0
- package/dist/components/ListFiles/constants.js +4 -2
- package/dist/components/ListFiles/index.d.ts +2 -1
- package/dist/components/ListFiles/index.js +4 -2
- package/dist/components/ListPhotos/ListPhotos.d.ts +5 -1
- package/dist/components/ListPhotos/ListPhotos.js +14 -13
- package/dist/components/ListPhotos/index.d.ts +1 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/SelectSearch/SelectSearch.js +1 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/TextArea/TextArea.d.ts +3 -1
- package/dist/components/TextArea/TextArea.js +105 -91
- package/dist/components/TextArea/constants.d.ts +5 -0
- package/dist/components/TextArea/constants.js +4 -0
- package/dist/components/TextArea/hooks.d.ts +3 -1
- package/dist/components/TextArea/hooks.js +6 -6
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/TextArea/index.js +4 -2
- package/dist/components/TextArea/types.d.ts +4 -1
- package/dist/components/UniversalUploader/UniversalUploader.js +20 -18
- package/dist/components/Uploader/Uploader.d.ts +5 -0
- package/dist/components/Uploader/Uploader.js +26 -25
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +133 -125
- package/dist/index.js +159 -151
- package/package.json +1 -1
- package/dist/Input-CbgqYgLo.js +0 -226
package/dist/Input-CbgqYgLo.js
DELETED
@@ -1,226 +0,0 @@
|
|
1
|
-
import { jsxs as B, jsx as c, Fragment as Z } from "react/jsx-runtime";
|
2
|
-
import { c as r } from "./index-DIxK0V-G.js";
|
3
|
-
import { memo as $, forwardRef as ee, useState as R, useRef as te, useEffect as z } from "react";
|
4
|
-
import { EInputVariant as se } from "./components/Input/constants.js";
|
5
|
-
import { useMergeRefs as ae } from "./hooks/useMergeRefs/useMergeRefs.js";
|
6
|
-
import { Icon as le } from "./icons/Icon.js";
|
7
|
-
import { Button as oe } from "./components/Button/Button.js";
|
8
|
-
import './assets/Input.css';const re = "_label_1bpoc_27", ce = "_input_1bpoc_3", ne = "_focused_1bpoc_82", ie = "_disabled_1bpoc_88", de = "_clear_1bpoc_137", ue = "_s_1bpoc_188", pe = "_m_1bpoc_203", _e = "_l_1bpoc_27", me = "_success_1bpoc_259", be = "_alarm_1bpoc_279", fe = "_error_1bpoc_299", e = {
|
9
|
-
"input-wrapper": "_input-wrapper_1bpoc_3",
|
10
|
-
"required-mark": "_required-mark_1bpoc_17",
|
11
|
-
label: re,
|
12
|
-
"has-left-slot": "_has-left-slot_1bpoc_42",
|
13
|
-
"active-label": "_active-label_1bpoc_45",
|
14
|
-
input: ce,
|
15
|
-
"has-right-slot": "_has-right-slot_1bpoc_79",
|
16
|
-
focused: ne,
|
17
|
-
"has-label": "_has-label_1bpoc_85",
|
18
|
-
disabled: ie,
|
19
|
-
"auto-height": "_auto-height_1bpoc_94",
|
20
|
-
"addon-icon": "_addon-icon_1bpoc_101",
|
21
|
-
"left-slot": "_left-slot_1bpoc_105",
|
22
|
-
"right-slot": "_right-slot_1bpoc_106",
|
23
|
-
clear: de,
|
24
|
-
s: ue,
|
25
|
-
m: pe,
|
26
|
-
l: _e,
|
27
|
-
"default-gray": "_default-gray_1bpoc_232",
|
28
|
-
"default-white": "_default-white_1bpoc_244",
|
29
|
-
success: me,
|
30
|
-
alarm: be,
|
31
|
-
error: fe
|
32
|
-
}, L = (t) => {
|
33
|
-
var _, a;
|
34
|
-
if (!t)
|
35
|
-
return null;
|
36
|
-
switch (t.addonType) {
|
37
|
-
case "icon": {
|
38
|
-
const m = (_ = t.addonContent) == null ? void 0 : _.includes("16px"), g = (a = t.addonContent) == null ? void 0 : a.includes("24px");
|
39
|
-
return /* @__PURE__ */ c(
|
40
|
-
le,
|
41
|
-
{
|
42
|
-
style: {
|
43
|
-
"--icon-size": r({
|
44
|
-
"16px": m,
|
45
|
-
"24px": g
|
46
|
-
})
|
47
|
-
},
|
48
|
-
className: e["addon-icon"],
|
49
|
-
iconName: t.addonContent
|
50
|
-
}
|
51
|
-
);
|
52
|
-
}
|
53
|
-
case "text":
|
54
|
-
return t.addonContent;
|
55
|
-
case "react-node":
|
56
|
-
return /* @__PURE__ */ c(Z, { children: t.addonContent });
|
57
|
-
default:
|
58
|
-
return null;
|
59
|
-
}
|
60
|
-
}, he = $(
|
61
|
-
ee(
|
62
|
-
(t, _) => {
|
63
|
-
const {
|
64
|
-
value: a,
|
65
|
-
className: m,
|
66
|
-
wrapperClassName: g,
|
67
|
-
rightSlotClassName: j,
|
68
|
-
requiredMarkClassName: D,
|
69
|
-
variant: A = se.DefaultGray,
|
70
|
-
type: E = "text",
|
71
|
-
autofocus: N,
|
72
|
-
readonly: n,
|
73
|
-
id: F,
|
74
|
-
onFocus: x,
|
75
|
-
onBlur: C,
|
76
|
-
label: u,
|
77
|
-
withClearButton: M,
|
78
|
-
disabled: s,
|
79
|
-
onChange: i,
|
80
|
-
rightAddon: O,
|
81
|
-
status: V,
|
82
|
-
leftAddon: S,
|
83
|
-
size: y = "m",
|
84
|
-
numbersOnly: T,
|
85
|
-
required: v,
|
86
|
-
maxLength: w,
|
87
|
-
autocomplete: G = "on",
|
88
|
-
...P
|
89
|
-
} = t, [p, I] = R(N), [b, f] = R(!!a), d = te(null), W = ae(d, _);
|
90
|
-
z(() => {
|
91
|
-
N && I(!0);
|
92
|
-
}, [N]), z(() => {
|
93
|
-
f(!!a);
|
94
|
-
}, [a]);
|
95
|
-
const H = (l) => {
|
96
|
-
const o = l.currentTarget.value;
|
97
|
-
C == null || C(l), I(!1), f(!!o);
|
98
|
-
}, J = (l) => {
|
99
|
-
n || (I(!0), x == null || x(l));
|
100
|
-
}, K = () => {
|
101
|
-
d != null && d.current && (d.current.value = "", d.current.focus(), f(!1), i == null || i({
|
102
|
-
target: { value: "" }
|
103
|
-
}));
|
104
|
-
}, Q = (l) => {
|
105
|
-
let o = l.target.value;
|
106
|
-
T && (o = o.replace(/\D/g, "")), w !== void 0 && (o = o.slice(0, w)), l.target.value = o, i == null || i(l), f(!!o);
|
107
|
-
}, h = L(S), k = L(O), U = {
|
108
|
-
[e.readonly]: s || n,
|
109
|
-
[e.focused]: p,
|
110
|
-
[e.disabled]: s || n,
|
111
|
-
[e["has-label"]]: !!u,
|
112
|
-
[e["has-left-slot"]]: !!h,
|
113
|
-
[e["has-right-slot"]]: !!k
|
114
|
-
}, q = p || b || !!a, X = r(e.label, m, e[y], {
|
115
|
-
[e["active-label"]]: q,
|
116
|
-
[e.disabled]: s || n,
|
117
|
-
[e["has-left-slot"]]: !!h
|
118
|
-
}), Y = r(e.input, U, m, [
|
119
|
-
e[A],
|
120
|
-
e[V ?? ""],
|
121
|
-
e[y]
|
122
|
-
]);
|
123
|
-
return /* @__PURE__ */ B(
|
124
|
-
"div",
|
125
|
-
{
|
126
|
-
className: r(
|
127
|
-
e["input-wrapper"],
|
128
|
-
e[A],
|
129
|
-
e[V ?? ""],
|
130
|
-
e[y],
|
131
|
-
{
|
132
|
-
[e.disabled]: s || n,
|
133
|
-
[e.focused]: p
|
134
|
-
},
|
135
|
-
g
|
136
|
-
),
|
137
|
-
children: [
|
138
|
-
u && /* @__PURE__ */ B("label", { htmlFor: F, className: X, children: [
|
139
|
-
u,
|
140
|
-
v && (b || p) && /* @__PURE__ */ c(
|
141
|
-
"span",
|
142
|
-
{
|
143
|
-
className: e["required-mark"],
|
144
|
-
"data-testid": "required-mark"
|
145
|
-
}
|
146
|
-
)
|
147
|
-
] }),
|
148
|
-
h && /* @__PURE__ */ c(
|
149
|
-
"span",
|
150
|
-
{
|
151
|
-
className: r(e["left-slot"], {
|
152
|
-
[e.focused]: q,
|
153
|
-
[e["has-label"]]: !!u,
|
154
|
-
[e.disabled]: s
|
155
|
-
}),
|
156
|
-
children: h
|
157
|
-
}
|
158
|
-
),
|
159
|
-
/* @__PURE__ */ c(
|
160
|
-
"input",
|
161
|
-
{
|
162
|
-
ref: W,
|
163
|
-
type: E,
|
164
|
-
id: F,
|
165
|
-
className: Y,
|
166
|
-
onFocus: J,
|
167
|
-
onBlur: H,
|
168
|
-
readOnly: n,
|
169
|
-
value: a,
|
170
|
-
onChange: Q,
|
171
|
-
maxLength: w,
|
172
|
-
disabled: s,
|
173
|
-
required: v,
|
174
|
-
autoComplete: G,
|
175
|
-
...P
|
176
|
-
}
|
177
|
-
),
|
178
|
-
k && /* @__PURE__ */ c(
|
179
|
-
"span",
|
180
|
-
{
|
181
|
-
className: r(e["right-slot"], j, {
|
182
|
-
[e.focused]: q,
|
183
|
-
[e["has-label"]]: !!u,
|
184
|
-
[e.disabled]: s
|
185
|
-
}),
|
186
|
-
children: k
|
187
|
-
}
|
188
|
-
),
|
189
|
-
v && !b && !p && /* @__PURE__ */ c(
|
190
|
-
"span",
|
191
|
-
{
|
192
|
-
className: r(
|
193
|
-
e["required-mark"],
|
194
|
-
D
|
195
|
-
),
|
196
|
-
"data-testid": "required-mark"
|
197
|
-
}
|
198
|
-
),
|
199
|
-
M && b && /* @__PURE__ */ c(
|
200
|
-
oe,
|
201
|
-
{
|
202
|
-
tabIndex: -1,
|
203
|
-
className: r(e.clear, {
|
204
|
-
[e.disabled]: s
|
205
|
-
}),
|
206
|
-
isIconButton: !0,
|
207
|
-
iconName: "Close16px",
|
208
|
-
size: "m-s",
|
209
|
-
clear: !0,
|
210
|
-
disabled: s || n,
|
211
|
-
variant: "secondary-gray",
|
212
|
-
onClick: K,
|
213
|
-
"data-testid": "clear-button"
|
214
|
-
}
|
215
|
-
)
|
216
|
-
]
|
217
|
-
}
|
218
|
-
);
|
219
|
-
}
|
220
|
-
)
|
221
|
-
);
|
222
|
-
he.displayName = "Input";
|
223
|
-
export {
|
224
|
-
he as I,
|
225
|
-
e as c
|
226
|
-
};
|