mimir-ui-kit 1.36.6 → 1.36.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/TextArea.css +1 -1
- package/dist/{combobox-BpYucpxz.js → combobox-CDU06zJj.js} +1080 -1121
- package/dist/components/Accordion/Accordion.js +15 -15
- package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +22 -22
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/SelectSearch/SelectSearch.js +26 -26
- package/dist/components/Switcher/Switcher.js +4 -4
- package/dist/components/TabTrail/TabTrail.js +4 -4
- package/dist/components/TextArea/TextArea.js +61 -61
- package/dist/{field-C1kt7aNM.js → field-FJ34aSs4.js} +2 -2
- package/dist/{focus-management-DOYCPyGg.js → focus-management-XwV-9qkO.js} +1 -1
- package/dist/{hidden-PvGXrYUY.js → hidden-DbgtYPOH.js} +1 -1
- package/dist/{keyboard-mgWkd2Vh.js → keyboard-B0lm_zyn.js} +111 -114
- package/dist/{label-D4GFpe5F.js → label-y3ANLTNC.js} +2 -2
- package/dist/open-closed-CdldUPoq.js +86 -0
- package/dist/{use-active-press-CqLGIFz7.js → use-active-press-86hajhdd.js} +1 -1
- package/package.json +1 -1
- package/dist/open-closed-D2VjDhAN.js +0 -86
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsxs as V, jsx as
|
1
|
+
import { jsxs as V, jsx as o } from "react/jsx-runtime";
|
2
2
|
import { c as i } 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";
|
@@ -7,31 +7,31 @@ import { Icon as $ } from "../../icons/Icon.js";
|
|
7
7
|
import { Button as ee } from "../Button/Button.js";
|
8
8
|
import { c as e } from "../../Input-WnjLXNpw.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
|
-
l:
|
20
|
+
l: oe
|
21
21
|
}, F = (t) => {
|
22
|
-
var p,
|
22
|
+
var p, n;
|
23
23
|
if (!t)
|
24
24
|
return null;
|
25
25
|
switch (t.addonType) {
|
26
26
|
case "icon": {
|
27
|
-
const
|
28
|
-
return /* @__PURE__ */
|
27
|
+
const b = (p = t.addonContent) == null ? void 0 : p.includes("16px"), x = (n = t.addonContent) == null ? void 0 : n.includes("24px");
|
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"],
|
@@ -44,20 +44,20 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
44
44
|
default:
|
45
45
|
return null;
|
46
46
|
}
|
47
|
-
},
|
47
|
+
}, ne = K(
|
48
48
|
Q(
|
49
49
|
(t, p) => {
|
50
50
|
const {
|
51
|
-
value:
|
52
|
-
className:
|
53
|
-
wrapperClassName:
|
54
|
-
variant:
|
55
|
-
autofocus:
|
51
|
+
value: n,
|
52
|
+
className: b,
|
53
|
+
wrapperClassName: x,
|
54
|
+
variant: R = ae.DefaultGray,
|
55
|
+
autofocus: N,
|
56
56
|
readonly: s,
|
57
|
-
status:
|
58
|
-
id:
|
59
|
-
onFocus:
|
60
|
-
onBlur:
|
57
|
+
status: T,
|
58
|
+
id: z,
|
59
|
+
onFocus: g,
|
60
|
+
onBlur: C,
|
61
61
|
label: d,
|
62
62
|
onChange: c,
|
63
63
|
withClearButton: j,
|
@@ -65,47 +65,47 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_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, [f,
|
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
|
-
const
|
76
|
-
|
75
|
+
const q = l.currentTarget.value;
|
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
|
-
const
|
85
|
-
|
86
|
-
},
|
84
|
+
const q = l.target.value;
|
85
|
+
w(!!q), I(), c == null || c(l);
|
86
|
+
}, h = F(L), y = F(E), W = {
|
87
87
|
[e.readonly]: u || s,
|
88
88
|
[e.focused]: f,
|
89
89
|
[e.disabled]: u || s,
|
90
|
-
[e["has-left-slot"]]: !!
|
91
|
-
[e["has-right-slot"]]: !!
|
90
|
+
[e["has-left-slot"]]: !!h,
|
91
|
+
[e["has-right-slot"]]: !!y,
|
92
92
|
[a["has-label"]]: !!d
|
93
|
-
},
|
93
|
+
}, k = f || _ || !!n, H = i(
|
94
94
|
e.label,
|
95
95
|
a.label,
|
96
96
|
{
|
97
|
-
[a["active-label"]]:
|
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
|
-
|
108
|
-
[e[
|
107
|
+
b,
|
108
|
+
[e[R], a[m], e[m], e[T ?? ""]]
|
109
109
|
);
|
110
110
|
return /* @__PURE__ */ V(
|
111
111
|
"div",
|
@@ -113,20 +113,20 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
113
113
|
className: i(
|
114
114
|
e["input-wrapper"],
|
115
115
|
a["textarea-wrapper"],
|
116
|
-
e[
|
117
|
-
e[
|
116
|
+
e[R],
|
117
|
+
e[T ?? ""],
|
118
118
|
a[m],
|
119
119
|
e[m],
|
120
120
|
{
|
121
121
|
[e.disabled]: u || s,
|
122
122
|
[e.focused]: f
|
123
123
|
},
|
124
|
-
|
124
|
+
x
|
125
125
|
),
|
126
126
|
children: [
|
127
|
-
d && /* @__PURE__ */ V("label", { htmlFor:
|
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,51 +134,51 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_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"], {
|
141
|
-
[e.focused]:
|
141
|
+
[e.focused]: k,
|
142
142
|
[e["has-label"]]: !!d
|
143
143
|
}),
|
144
144
|
"data-testid": "left-addon",
|
145
|
-
children:
|
145
|
+
children: h
|
146
146
|
}
|
147
147
|
),
|
148
|
-
/* @__PURE__ */
|
148
|
+
/* @__PURE__ */ o(
|
149
149
|
"textarea",
|
150
150
|
{
|
151
151
|
ref: G,
|
152
|
-
id:
|
152
|
+
id: z,
|
153
153
|
className: J,
|
154
154
|
onFocus: O,
|
155
155
|
onBlur: M,
|
156
156
|
readOnly: s,
|
157
|
-
value:
|
157
|
+
value: n,
|
158
158
|
onChange: S,
|
159
|
-
required:
|
159
|
+
required: v,
|
160
160
|
...D
|
161
161
|
}
|
162
162
|
),
|
163
|
-
|
163
|
+
y && /* @__PURE__ */ o(
|
164
164
|
"span",
|
165
165
|
{
|
166
166
|
className: i(e["right-slot"], {
|
167
|
-
[e.focused]:
|
167
|
+
[e.focused]: k,
|
168
168
|
[e["has-label"]]: !!d
|
169
169
|
}),
|
170
170
|
"data-testid": "right-addon",
|
171
|
-
children:
|
171
|
+
children: y
|
172
172
|
}
|
173
173
|
),
|
174
|
-
|
174
|
+
v && !_ && !f && /* @__PURE__ */ o(
|
175
175
|
"span",
|
176
176
|
{
|
177
177
|
className: a["required-mark"],
|
178
178
|
"data-testid": "required-mark"
|
179
179
|
}
|
180
180
|
),
|
181
|
-
j &&
|
181
|
+
j && _ && /* @__PURE__ */ o(
|
182
182
|
ee,
|
183
183
|
{
|
184
184
|
tabIndex: -1,
|
@@ -198,7 +198,7 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
198
198
|
}
|
199
199
|
)
|
200
200
|
);
|
201
|
-
|
201
|
+
ne.displayName = "TextArea";
|
202
202
|
export {
|
203
|
-
|
203
|
+
ne as TextArea
|
204
204
|
};
|
@@ -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-y3ANLTNC.js";
|
3
|
+
import { W as H, H as W } from "./keyboard-B0lm_zyn.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-B0lm_zyn.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-B0lm_zyn.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) {
|