mimir-ui-kit 1.36.7 → 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/assets/TextArea.css +1 -1
- 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 +39 -39
- 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,102 +1,104 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as s, jsxs as _, Fragment as z } from "react/jsx-runtime";
|
2
2
|
import { c as i } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as
|
3
|
+
import { forwardRef as K, useState as D, useMemo as U, useCallback as R, useEffect as $ } from "react";
|
4
4
|
import { ESelectSearchSize as v } from "./constants.js";
|
5
|
-
import { mapSizeToInputSize as
|
5
|
+
import { mapSizeToInputSize as j, getDropdownArrowIcon as J } from "./utils.js";
|
6
6
|
import { Icon as q } from "../../icons/Icon.js";
|
7
|
-
import { Button as
|
8
|
-
import { I as A } from "../../Input-
|
9
|
-
import { EInputVariant as
|
10
|
-
import { H as
|
11
|
-
import '../../assets/SelectSearch.css';const
|
7
|
+
import { Button as Q } from "../Button/Button.js";
|
8
|
+
import { I as A } from "../../Input-CbgqYgLo.js";
|
9
|
+
import { EInputVariant as W } from "../Input/constants.js";
|
10
|
+
import { H as X, U as O, G as B, K as Y, j as Z } from "../../combobox-BpYucpxz.js";
|
11
|
+
import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_container_rphak_9", oe = "_full_rphak_22", ae = "_button_rphak_34", ne = "_options_rphak_48", se = "_top_rphak_59", re = "_bottom_rphak_64", ie = "_m_rphak_91", le = "_l_rphak_106", ce = "_option_rphak_48", pe = "_clear_rphak_160", e = {
|
12
12
|
"select-search": "_select-search_rphak_2",
|
13
|
-
disabled:
|
14
|
-
container:
|
13
|
+
disabled: ee,
|
14
|
+
container: te,
|
15
15
|
"container-open": "_container-open_rphak_18",
|
16
|
-
full:
|
16
|
+
full: oe,
|
17
17
|
"selected-icon": "_selected-icon_rphak_26",
|
18
18
|
"selector-icon-open": "_selector-icon-open_rphak_30",
|
19
|
-
button:
|
19
|
+
button: ae,
|
20
20
|
"selector-icon": "_selector-icon_rphak_30",
|
21
|
-
options:
|
22
|
-
top:
|
23
|
-
bottom:
|
21
|
+
options: ne,
|
22
|
+
top: se,
|
23
|
+
bottom: re,
|
24
24
|
"no-options": "_no-options_rphak_85",
|
25
|
-
m:
|
26
|
-
l:
|
25
|
+
m: ie,
|
26
|
+
l: le,
|
27
27
|
"select-input": "_select-input_rphak_121",
|
28
28
|
"select-input-disabled": "_select-input-disabled_rphak_124",
|
29
|
-
option:
|
29
|
+
option: ce,
|
30
30
|
"option-active": "_option-active_rphak_140",
|
31
31
|
"option-inner": "_option-inner_rphak_143",
|
32
32
|
"right-slot": "_right-slot_rphak_150",
|
33
33
|
"required-mark": "_required-mark_rphak_155",
|
34
|
-
clear:
|
34
|
+
clear: pe,
|
35
35
|
"icon-button": "_icon-button_rphak_169"
|
36
|
-
},
|
37
|
-
(
|
36
|
+
}, ge = K(
|
37
|
+
(M, E) => {
|
38
38
|
const {
|
39
39
|
placeholder: g,
|
40
|
-
size:
|
41
|
-
value:
|
42
|
-
onChange:
|
43
|
-
full:
|
44
|
-
showArrow:
|
40
|
+
size: r = v.L,
|
41
|
+
value: a,
|
42
|
+
onChange: n,
|
43
|
+
full: L,
|
44
|
+
showArrow: V = !0,
|
45
45
|
items: d = [],
|
46
|
-
classNameOption:
|
47
|
-
displayValue:
|
46
|
+
classNameOption: F,
|
47
|
+
displayValue: G = "name",
|
48
48
|
filterOnSearch: w = !0,
|
49
49
|
onSearch: m,
|
50
|
-
variant: C =
|
51
|
-
menuPlacement:
|
50
|
+
variant: C = W.DefaultGray,
|
51
|
+
menuPlacement: b = "bottom",
|
52
52
|
disabled: l = !1,
|
53
53
|
searchProps: I,
|
54
54
|
withClearButton: f = !1,
|
55
|
-
disableInput: c = !1
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
55
|
+
disableInput: c = !1,
|
56
|
+
autocomplete: S = "on"
|
57
|
+
} = M, k = String((a == null ? void 0 : a[G]) || ""), [p, u] = D(k), [N, h] = D(a), y = U(() => !w || a && (a.id || a.name) ? d : p.trim().toLowerCase() ? d.filter(
|
58
|
+
(o) => o.name.toLowerCase().includes(p.toLowerCase())
|
59
|
+
) : d, [p, d, a, w]), P = (o) => {
|
60
|
+
o ? (u(o.name), h(o), n == null || n(o)) : (u(""), h(null), n == null || n({ id: "", name: "" }));
|
61
|
+
}, x = R(
|
62
|
+
(o) => {
|
62
63
|
if (c) return;
|
63
|
-
const t =
|
64
|
-
|
64
|
+
const t = o.target.value;
|
65
|
+
u(t), m == null || m(t), !t && a && (n == null || n({ id: "", name: "" }));
|
65
66
|
},
|
66
|
-
[c,
|
67
|
-
),
|
68
|
-
|
67
|
+
[c, n, m, a]
|
68
|
+
), T = () => {
|
69
|
+
u(""), h(null), n == null || n({ id: "", name: "" });
|
69
70
|
};
|
70
|
-
return
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
return $(() => {
|
72
|
+
const o = !a || typeof a == "object" && !Object.keys(a).length;
|
73
|
+
u(o ? "" : k), h(o ? null : a);
|
74
|
+
}, [a, k]), /* @__PURE__ */ s(
|
75
|
+
X,
|
74
76
|
{
|
75
77
|
as: "div",
|
76
|
-
value:
|
78
|
+
value: N,
|
77
79
|
className: i(e["select-search"], {
|
78
|
-
[e.full]:
|
80
|
+
[e.full]: L,
|
79
81
|
[e.disabled]: l
|
80
82
|
}),
|
81
|
-
onChange:
|
82
|
-
ref:
|
83
|
+
onChange: P,
|
84
|
+
ref: E,
|
83
85
|
disabled: l,
|
84
|
-
virtual: { options:
|
85
|
-
children: ({ open:
|
86
|
-
/* @__PURE__ */
|
86
|
+
virtual: { options: y },
|
87
|
+
children: ({ open: o }) => /* @__PURE__ */ _(z, { children: [
|
88
|
+
/* @__PURE__ */ _(
|
87
89
|
"div",
|
88
90
|
{
|
89
|
-
className: i(e.container, e[
|
90
|
-
[e["container-open"]]:
|
91
|
+
className: i(e.container, e[r], {
|
92
|
+
[e["container-open"]]: o
|
91
93
|
}),
|
92
94
|
children: [
|
93
|
-
c && /* @__PURE__ */
|
94
|
-
/* @__PURE__ */
|
95
|
-
|
95
|
+
c && /* @__PURE__ */ _("div", { style: { position: "relative", width: "100%" }, children: [
|
96
|
+
/* @__PURE__ */ s(O, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ s(
|
97
|
+
B,
|
96
98
|
{
|
97
99
|
as: A,
|
98
100
|
label: g,
|
99
|
-
size:
|
101
|
+
size: j(r),
|
100
102
|
className: i(e["select-input"], {
|
101
103
|
[e["select-input-disabled"]]: c && f
|
102
104
|
}),
|
@@ -112,13 +114,14 @@ import '../../assets/SelectSearch.css';const Z = "_disabled_rphak_5", ee = "_con
|
|
112
114
|
},
|
113
115
|
rightAddon: {
|
114
116
|
addonType: "icon",
|
115
|
-
addonContent:
|
117
|
+
addonContent: J(o, r)
|
116
118
|
},
|
119
|
+
autocomplete: S,
|
117
120
|
...I
|
118
121
|
}
|
119
122
|
) }),
|
120
|
-
f && p && /* @__PURE__ */
|
121
|
-
|
123
|
+
f && p && /* @__PURE__ */ s(
|
124
|
+
Q,
|
122
125
|
{
|
123
126
|
tabIndex: -1,
|
124
127
|
className: i(e.clear, {
|
@@ -132,18 +135,18 @@ import '../../assets/SelectSearch.css';const Z = "_disabled_rphak_5", ee = "_con
|
|
132
135
|
disabled: l,
|
133
136
|
variant: "secondary-gray",
|
134
137
|
onClick: (t) => {
|
135
|
-
t.stopPropagation(),
|
138
|
+
t.stopPropagation(), T();
|
136
139
|
},
|
137
140
|
"data-testid": "clear-button"
|
138
141
|
}
|
139
142
|
)
|
140
143
|
] }),
|
141
|
-
!c && /* @__PURE__ */
|
142
|
-
|
144
|
+
!c && /* @__PURE__ */ s(
|
145
|
+
B,
|
143
146
|
{
|
144
147
|
as: A,
|
145
148
|
label: g,
|
146
|
-
size:
|
149
|
+
size: j(r),
|
147
150
|
className: e["select-input"],
|
148
151
|
onChange: x,
|
149
152
|
value: p,
|
@@ -155,19 +158,19 @@ import '../../assets/SelectSearch.css';const Z = "_disabled_rphak_5", ee = "_con
|
|
155
158
|
"data-testid": "select-search-input",
|
156
159
|
rightAddon: {
|
157
160
|
addonType: "react-node",
|
158
|
-
addonContent:
|
159
|
-
|
161
|
+
addonContent: V && /* @__PURE__ */ s(
|
162
|
+
O,
|
160
163
|
{
|
161
164
|
className: i(e.button, {
|
162
165
|
[e.disabled]: l
|
163
166
|
}),
|
164
167
|
disabled: l,
|
165
|
-
children: /* @__PURE__ */
|
168
|
+
children: /* @__PURE__ */ s(
|
166
169
|
q,
|
167
170
|
{
|
168
|
-
iconName:
|
171
|
+
iconName: r == v.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
169
172
|
className: i(e["selector-icon"], {
|
170
|
-
[e["selector-icon-open"]]:
|
173
|
+
[e["selector-icon-open"]]: o
|
171
174
|
})
|
172
175
|
}
|
173
176
|
)
|
@@ -177,43 +180,44 @@ import '../../assets/SelectSearch.css';const Z = "_disabled_rphak_5", ee = "_con
|
|
177
180
|
onFocus: (t) => {
|
178
181
|
c && t.target.blur();
|
179
182
|
},
|
183
|
+
autocomplete: S,
|
180
184
|
...I
|
181
185
|
}
|
182
186
|
)
|
183
187
|
]
|
184
188
|
}
|
185
189
|
),
|
186
|
-
|
187
|
-
|
190
|
+
o && /* @__PURE__ */ s(z, { children: d.length ? y.length ? /* @__PURE__ */ s(
|
191
|
+
Y,
|
188
192
|
{
|
189
193
|
"data-testid": "select-search-options",
|
190
194
|
className: i(
|
191
195
|
e.options,
|
192
|
-
e[
|
193
|
-
e[
|
196
|
+
e[r],
|
197
|
+
e[b]
|
194
198
|
),
|
195
|
-
children: ({ option: t }) => /* @__PURE__ */
|
196
|
-
|
199
|
+
children: ({ option: t }) => /* @__PURE__ */ _(
|
200
|
+
Z,
|
197
201
|
{
|
198
202
|
value: t,
|
199
|
-
className: ({ focus:
|
203
|
+
className: ({ focus: H }) => i(
|
200
204
|
e.option,
|
201
|
-
|
202
|
-
|
205
|
+
F,
|
206
|
+
r && e[r],
|
203
207
|
{
|
204
|
-
[e["option-active"]]:
|
208
|
+
[e["option-active"]]: H
|
205
209
|
}
|
206
210
|
),
|
207
211
|
"data-testid": `select-search-option-${t.id}`,
|
208
212
|
children: [
|
209
|
-
/* @__PURE__ */
|
213
|
+
/* @__PURE__ */ _("div", { className: e["option-inner"], children: [
|
210
214
|
t.name,
|
211
|
-
t.bottom && /* @__PURE__ */
|
215
|
+
t.bottom && /* @__PURE__ */ s("div", { children: t.bottom })
|
212
216
|
] }),
|
213
|
-
|
217
|
+
N && N.id === t.id && /* @__PURE__ */ s(
|
214
218
|
q,
|
215
219
|
{
|
216
|
-
iconName:
|
220
|
+
iconName: r === v.M ? "Done16px" : "Done24px",
|
217
221
|
className: e["selected-icon"]
|
218
222
|
}
|
219
223
|
)
|
@@ -222,25 +226,25 @@ import '../../assets/SelectSearch.css';const Z = "_disabled_rphak_5", ee = "_con
|
|
222
226
|
t.id
|
223
227
|
)
|
224
228
|
}
|
225
|
-
) : /* @__PURE__ */
|
229
|
+
) : /* @__PURE__ */ s(
|
226
230
|
"div",
|
227
231
|
{
|
228
232
|
className: i(
|
229
233
|
e.options,
|
230
|
-
e[
|
234
|
+
e[r],
|
231
235
|
e["no-options"],
|
232
|
-
e[
|
236
|
+
e[b]
|
233
237
|
),
|
234
238
|
children: "Ничего не найдено"
|
235
239
|
}
|
236
|
-
) : /* @__PURE__ */
|
240
|
+
) : /* @__PURE__ */ s(
|
237
241
|
"div",
|
238
242
|
{
|
239
243
|
className: i(
|
240
244
|
e.options,
|
241
|
-
e[
|
245
|
+
e[r],
|
242
246
|
e["no-options"],
|
243
|
-
e[
|
247
|
+
e[b]
|
244
248
|
),
|
245
249
|
children: "Нет данных"
|
246
250
|
}
|
@@ -251,5 +255,5 @@ import '../../assets/SelectSearch.css';const Z = "_disabled_rphak_5", ee = "_con
|
|
251
255
|
}
|
252
256
|
);
|
253
257
|
export {
|
254
|
-
|
258
|
+
ge as SelectSearch
|
255
259
|
};
|
@@ -52,4 +52,6 @@ export type TSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'variant'
|
|
52
52
|
searchProps?: Pick<TInputProps, 'numbersOnly' | 'maxLength' | 'required'>;
|
53
53
|
/** Отключает инпут, но позволяет открывать меню*/
|
54
54
|
disableInput?: boolean;
|
55
|
+
/** Управляет поведением автозаполнения браузера */
|
56
|
+
autocomplete?: 'on' | 'off';
|
55
57
|
};
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { jsxs as L, jsx as N } from "react/jsx-runtime";
|
2
|
-
import { H as te } from "../../field-
|
3
|
-
import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-
|
4
|
-
import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-
|
2
|
+
import { H as te } from "../../field-C1kt7aNM.js";
|
3
|
+
import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-D4GFpe5F.js";
|
4
|
+
import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-mgWkd2Vh.js";
|
5
5
|
import u, { createContext as $e, useState as x, useMemo as G, useId as ge, useContext as ve, useRef as ke, useCallback as xe, Fragment as ye, forwardRef as Pe } from "react";
|
6
|
-
import { w as Ce } from "../../use-active-press-
|
6
|
+
import { w as Ce } from "../../use-active-press-CqLGIFz7.js";
|
7
7
|
import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
|
8
8
|
import { r as Fe } from "../../bugs-diTMAGNw.js";
|
9
9
|
import { c as g } from "../../index-DIxK0V-G.js";
|
@@ -5,11 +5,11 @@ import N, { useRef as U, useState as Q, createContext as oe, useReducer as ke, u
|
|
5
5
|
import { ETabTrailSize as Ae } from "./constants.js";
|
6
6
|
import { TabButtons as Se } from "./TabButtons/TabButtons.js";
|
7
7
|
import { NotificationBadge as Fe } from "../NotificationBadge/NotificationBadge.js";
|
8
|
-
import { n as W, M as se, W as q, s as H, y as z, o as E, H as V, $ as ce, b as De, D as de, a as B, u as Ne, c as h, t as Re } from "../../keyboard-
|
9
|
-
import { w as Me } from "../../use-active-press-
|
8
|
+
import { n as W, M as se, W as q, s as H, y as z, o as E, H as V, $ as ce, b as De, D as de, a as B, u as Ne, c as h, t as Re } from "../../keyboard-mgWkd2Vh.js";
|
9
|
+
import { w as Me } from "../../use-active-press-CqLGIFz7.js";
|
10
10
|
import { e as Ce } from "../../use-resolve-button-type-DhFdPxnv.js";
|
11
|
-
import { T as pe, s as Le } from "../../hidden-
|
12
|
-
import { _ as G, T as J, P as D, F as T } from "../../focus-management-
|
11
|
+
import { T as pe, s as Le } from "../../hidden-PvGXrYUY.js";
|
12
|
+
import { _ as G, T as J, P as D, F as T } from "../../focus-management-DOYCPyGg.js";
|
13
13
|
import '../../assets/TabTrail.css';function Oe() {
|
14
14
|
let e = U(!1);
|
15
15
|
return W(() => (e.current = !0, () => {
|
@@ -5,33 +5,33 @@ 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-CbgqYgLo.js";
|
9
9
|
import { EInputVariant as ae } from "../Input/constants.js";
|
10
|
-
import '../../assets/TextArea.css';const te = "
|
11
|
-
"textarea-wrapper": "_textarea-
|
10
|
+
import '../../assets/TextArea.css';const te = "_textarea_1b24r_2", se = "_label_1b24r_22", re = "_s_1b24r_53", le = "_m_1b24r_60", oe = "_l_1b24r_22", a = {
|
11
|
+
"textarea-wrapper": "_textarea-wrapper_1b24r_2",
|
12
12
|
textarea: te,
|
13
|
-
"has-label": "_has-
|
14
|
-
"required-mark": "_required-
|
13
|
+
"has-label": "_has-label_1b24r_8",
|
14
|
+
"required-mark": "_required-mark_1b24r_11",
|
15
15
|
label: se,
|
16
|
-
"has-left-slot": "_has-left-
|
17
|
-
"active-label": "_active-
|
16
|
+
"has-left-slot": "_has-left-slot_1b24r_37",
|
17
|
+
"active-label": "_active-label_1b24r_40",
|
18
18
|
s: re,
|
19
19
|
m: le,
|
20
20
|
l: oe
|
21
21
|
}, F = (t) => {
|
22
|
-
var
|
22
|
+
var p, n;
|
23
23
|
if (!t)
|
24
24
|
return null;
|
25
25
|
switch (t.addonType) {
|
26
26
|
case "icon": {
|
27
|
-
const
|
27
|
+
const b = (p = t.addonContent) == null ? void 0 : p.includes("16px"), x = (n = t.addonContent) == null ? void 0 : n.includes("24px");
|
28
28
|
return /* @__PURE__ */ o(
|
29
29
|
$,
|
30
30
|
{
|
31
31
|
style: {
|
32
32
|
"--icon-size": i({
|
33
|
-
"16px":
|
34
|
-
"24px":
|
33
|
+
"16px": b,
|
34
|
+
"24px": x
|
35
35
|
})
|
36
36
|
},
|
37
37
|
className: e["addon-icon"],
|
@@ -46,18 +46,18 @@ import '../../assets/TextArea.css';const te = "_textarea_rmhew_2", se = "_label_
|
|
46
46
|
}
|
47
47
|
}, ne = K(
|
48
48
|
Q(
|
49
|
-
(t,
|
49
|
+
(t, p) => {
|
50
50
|
const {
|
51
51
|
value: n,
|
52
|
-
className:
|
53
|
-
wrapperClassName:
|
52
|
+
className: b,
|
53
|
+
wrapperClassName: x,
|
54
54
|
variant: R = ae.DefaultGray,
|
55
|
-
autofocus:
|
55
|
+
autofocus: N,
|
56
56
|
readonly: s,
|
57
57
|
status: T,
|
58
58
|
id: z,
|
59
|
-
onFocus:
|
60
|
-
onBlur:
|
59
|
+
onFocus: g,
|
60
|
+
onBlur: C,
|
61
61
|
label: d,
|
62
62
|
onChange: c,
|
63
63
|
withClearButton: j,
|
@@ -65,46 +65,46 @@ import '../../assets/TextArea.css';const te = "_textarea_rmhew_2", se = "_label_
|
|
65
65
|
rightAddon: E,
|
66
66
|
leftAddon: L,
|
67
67
|
size: m = "m",
|
68
|
-
required:
|
68
|
+
required: v,
|
69
69
|
...D
|
70
|
-
} = t, [
|
70
|
+
} = t, [f, A] = B(N), [_, w] = B(!!n), r = U(null), G = Z(r, p);
|
71
71
|
X(() => {
|
72
|
-
|
73
|
-
}, [
|
72
|
+
N && A(!0);
|
73
|
+
}, [N]);
|
74
74
|
const I = Y(r.current), M = (l) => {
|
75
75
|
const q = l.currentTarget.value;
|
76
|
-
|
76
|
+
C == null || C(l), A(!1), w(!!q);
|
77
77
|
}, O = (l) => {
|
78
|
-
s || (
|
78
|
+
s || (A(!0), g == null || g(l));
|
79
79
|
}, P = () => {
|
80
|
-
r != null && r.current && (r.current.value = "", r.current.focus(),
|
80
|
+
r != null && r.current && (r.current.value = "", r.current.focus(), w(!1), I(), c == null || c({
|
81
81
|
target: { value: "" }
|
82
82
|
}));
|
83
83
|
}, S = (l) => {
|
84
84
|
const q = l.target.value;
|
85
|
-
|
86
|
-
},
|
85
|
+
w(!!q), I(), c == null || c(l);
|
86
|
+
}, h = F(L), y = F(E), W = {
|
87
87
|
[e.readonly]: u || s,
|
88
|
-
[e.focused]:
|
88
|
+
[e.focused]: f,
|
89
89
|
[e.disabled]: u || s,
|
90
|
-
[e["has-left-slot"]]: !!
|
90
|
+
[e["has-left-slot"]]: !!h,
|
91
91
|
[e["has-right-slot"]]: !!y,
|
92
92
|
[a["has-label"]]: !!d
|
93
|
-
}, k =
|
93
|
+
}, k = f || _ || !!n, H = i(
|
94
94
|
e.label,
|
95
95
|
a.label,
|
96
96
|
{
|
97
97
|
[a["active-label"]]: k,
|
98
98
|
[e.disabled]: u || s,
|
99
|
-
[a["has-left-slot"]]: !!
|
99
|
+
[a["has-left-slot"]]: !!h
|
100
100
|
},
|
101
|
-
|
101
|
+
b,
|
102
102
|
e[m]
|
103
103
|
), J = i(
|
104
104
|
a.textarea,
|
105
105
|
e.input,
|
106
106
|
W,
|
107
|
-
|
107
|
+
b,
|
108
108
|
[e[R], a[m], e[m], e[T ?? ""]]
|
109
109
|
);
|
110
110
|
return /* @__PURE__ */ V(
|
@@ -119,14 +119,14 @@ import '../../assets/TextArea.css';const te = "_textarea_rmhew_2", se = "_label_
|
|
119
119
|
e[m],
|
120
120
|
{
|
121
121
|
[e.disabled]: u || s,
|
122
|
-
[e.focused]:
|
122
|
+
[e.focused]: f
|
123
123
|
},
|
124
|
-
|
124
|
+
x
|
125
125
|
),
|
126
126
|
children: [
|
127
127
|
d && /* @__PURE__ */ V("label", { htmlFor: z, className: H, children: [
|
128
128
|
d,
|
129
|
-
|
129
|
+
v && (_ || f) && /* @__PURE__ */ o(
|
130
130
|
"span",
|
131
131
|
{
|
132
132
|
className: a["required-mark"],
|
@@ -134,7 +134,7 @@ import '../../assets/TextArea.css';const te = "_textarea_rmhew_2", se = "_label_
|
|
134
134
|
}
|
135
135
|
)
|
136
136
|
] }),
|
137
|
-
|
137
|
+
h && /* @__PURE__ */ o(
|
138
138
|
"span",
|
139
139
|
{
|
140
140
|
className: i(e["left-slot"], {
|
@@ -142,7 +142,7 @@ import '../../assets/TextArea.css';const te = "_textarea_rmhew_2", se = "_label_
|
|
142
142
|
[e["has-label"]]: !!d
|
143
143
|
}),
|
144
144
|
"data-testid": "left-addon",
|
145
|
-
children:
|
145
|
+
children: h
|
146
146
|
}
|
147
147
|
),
|
148
148
|
/* @__PURE__ */ o(
|
@@ -156,7 +156,7 @@ import '../../assets/TextArea.css';const te = "_textarea_rmhew_2", se = "_label_
|
|
156
156
|
readOnly: s,
|
157
157
|
value: n,
|
158
158
|
onChange: S,
|
159
|
-
required:
|
159
|
+
required: v,
|
160
160
|
...D
|
161
161
|
}
|
162
162
|
),
|
@@ -171,7 +171,7 @@ import '../../assets/TextArea.css';const te = "_textarea_rmhew_2", se = "_label_
|
|
171
171
|
children: y
|
172
172
|
}
|
173
173
|
),
|
174
|
-
|
174
|
+
v && !_ && !f && /* @__PURE__ */ o(
|
175
175
|
"span",
|
176
176
|
{
|
177
177
|
className: a["required-mark"],
|
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 i, EButtonVariantDefault as m, EButtonVariantOutline as f, EButtonVariantRound as x } from "./Button/constants.js";
|
3
|
-
import { I as S } from "../Input-
|
3
|
+
import { I as S } from "../Input-CbgqYgLo.js";
|
4
4
|
import { EInputSize as u, EInputStatus as l, EInputVariant as s } from "./Input/constants.js";
|
5
5
|
import { TextArea as c } from "./TextArea/TextArea.js";
|
6
6
|
import { InputPassword as I } from "./InputPassword/InputPassword.js";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import l, { useId as u, useMemo as f } from "react";
|
2
|
-
import { z as p, U as h, a as v, l as E, f as b, W as $ } from "./label-
|
3
|
-
import { W as H, H as W } from "./keyboard-
|
2
|
+
import { z as p, U as h, a as v, l as E, f as b, W as $ } from "./label-D4GFpe5F.js";
|
3
|
+
import { W as H, H as W } from "./keyboard-mgWkd2Vh.js";
|
4
4
|
let P = "div";
|
5
5
|
function _(a, i) {
|
6
6
|
let d = `headlessui-control-${u()}`, [o, n] = p(), [m, s] = h(), c = v(), { disabled: e = c || !1, ...t } = a, r = f(() => ({ disabled: e }), [e]);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { u as N, a as v } from "./keyboard-
|
1
|
+
import { u as N, a as v } from "./keyboard-mgWkd2Vh.js";
|
2
2
|
let m = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","), F = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
3
3
|
var h = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(h || {}), x = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(x || {}), A = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(A || {});
|
4
4
|
function y(e = document.body) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { W as t, H as a } from "./keyboard-
|
1
|
+
import { W as t, H as a } from "./keyboard-mgWkd2Vh.js";
|
2
2
|
let l = "span";
|
3
3
|
var p = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(p || {});
|
4
4
|
function s(e, n) {
|
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-CbgqYgLo.js";
|
4
4
|
import { EInputSize as S, EInputStatus as E, EInputVariant as l } 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";
|