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