@versini/ui-textarea 2.0.5 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -1
- package/dist/index.js +270 -227
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ declare const TEXT_AREA_CLASSNAME = "av-text-area";
|
|
|
4
4
|
declare const TEXT_AREA_WRAPPER_CLASSNAME = "av-text-area-wrapper";
|
|
5
5
|
declare const TEXT_AREA_HELPER_TEXT_CLASSNAME = "av-text-area-helper-text";
|
|
6
6
|
declare const TEXT_AREA_CONTROL_RIGHT_CLASSNAME = "av-text-area__control--right";
|
|
7
|
+
declare const TEXT_AREA_CONTROL_LEFT_CLASSNAME = "av-text-area__control--left";
|
|
7
8
|
|
|
8
9
|
declare const TextArea: React.ForwardRefExoticComponent<{
|
|
9
10
|
label: string;
|
|
@@ -17,7 +18,8 @@ declare const TextArea: React.ForwardRefExoticComponent<{
|
|
|
17
18
|
noBorder?: boolean;
|
|
18
19
|
raw?: boolean;
|
|
19
20
|
rightElement?: React.ReactElement;
|
|
21
|
+
leftElement?: React.ReactElement;
|
|
20
22
|
textAreaClassName?: string;
|
|
21
23
|
} & React.TextareaHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
22
24
|
|
|
23
|
-
export { TEXT_AREA_CLASSNAME, TEXT_AREA_CONTROL_RIGHT_CLASSNAME, TEXT_AREA_HELPER_TEXT_CLASSNAME, TEXT_AREA_WRAPPER_CLASSNAME, TextArea };
|
|
25
|
+
export { TEXT_AREA_CLASSNAME, TEXT_AREA_CONTROL_LEFT_CLASSNAME, TEXT_AREA_CONTROL_RIGHT_CLASSNAME, TEXT_AREA_HELPER_TEXT_CLASSNAME, TEXT_AREA_WRAPPER_CLASSNAME, TextArea };
|
package/dist/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as T, jsxs as pe } from "react/jsx-runtime";
|
|
2
|
+
import ye, { useRef as f, useEffect as O, useCallback as me, useMemo as J, useState as v, useId as xe, useReducer as he, useLayoutEffect as I } from "react";
|
|
3
|
+
import c from "clsx";
|
|
4
4
|
/*!
|
|
5
|
-
@versini/ui-textarea v2.
|
|
5
|
+
@versini/ui-textarea v2.1.1
|
|
6
6
|
© 2024 gizmette.com
|
|
7
7
|
*/
|
|
8
8
|
try {
|
|
9
9
|
window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
|
|
10
|
-
version: "2.
|
|
11
|
-
buildTime: "12/
|
|
10
|
+
version: "2.1.1",
|
|
11
|
+
buildTime: "12/31/2024 06:19 PM EST",
|
|
12
12
|
homepage: "https://github.com/aversini/ui-components",
|
|
13
13
|
license: "MIT"
|
|
14
14
|
});
|
|
15
15
|
} catch {
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
19
|
-
const e =
|
|
20
|
-
return
|
|
17
|
+
const K = "av-text-area", Ae = "av-text-area-wrapper", M = "av-text-area-helper-text", Te = "av-text-area__control--right", ge = "av-text-area__control--left";
|
|
18
|
+
function _e() {
|
|
19
|
+
const e = f(!1);
|
|
20
|
+
return O(() => (e.current = !0, () => {
|
|
21
21
|
e.current = !1;
|
|
22
|
-
}), []),
|
|
22
|
+
}), []), me(() => e.current, []);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
24
|
+
function be(e) {
|
|
25
|
+
return J(() => e.every((r) => r == null) ? () => {
|
|
26
26
|
} : (r) => {
|
|
27
27
|
e.forEach((t) => {
|
|
28
28
|
typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
29
29
|
});
|
|
30
30
|
}, e);
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const ke = {
|
|
33
33
|
x: 0,
|
|
34
34
|
y: 0,
|
|
35
35
|
width: 0,
|
|
@@ -39,18 +39,18 @@ const ye = {
|
|
|
39
39
|
bottom: 0,
|
|
40
40
|
right: 0
|
|
41
41
|
};
|
|
42
|
-
function
|
|
43
|
-
const r =
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
n.current && r() &&
|
|
42
|
+
function W(e) {
|
|
43
|
+
const r = _e(), t = f(0), n = f(null), [a, o] = v(ke), s = J(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
|
|
44
|
+
const i = l[0];
|
|
45
|
+
i && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
46
|
+
n.current && r() && o(i.contentRect);
|
|
47
47
|
}));
|
|
48
48
|
}), [r]);
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
}), [
|
|
49
|
+
return O(() => (n.current && (s == null || s.observe(n.current, e)), () => {
|
|
50
|
+
s == null || s.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
51
|
+
}), [s, e]), [n, a];
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Re({
|
|
54
54
|
value: e,
|
|
55
55
|
defaultValue: r,
|
|
56
56
|
finalValue: t,
|
|
@@ -58,19 +58,19 @@ function xe({
|
|
|
58
58
|
},
|
|
59
59
|
initialControlledDelay: a = 0
|
|
60
60
|
}) {
|
|
61
|
-
const [
|
|
61
|
+
const [o, s] = v(!1), [l, i] = v(
|
|
62
62
|
r !== void 0 ? r : t
|
|
63
|
-
),
|
|
64
|
-
|
|
63
|
+
), p = (y) => {
|
|
64
|
+
i(y), n == null || n(y);
|
|
65
65
|
};
|
|
66
|
-
return
|
|
67
|
-
(async () => e !== void 0 && !
|
|
68
|
-
(
|
|
69
|
-
),
|
|
70
|
-
}, [e, a,
|
|
66
|
+
return O(() => {
|
|
67
|
+
(async () => e !== void 0 && !o && a > 0 && (await new Promise(
|
|
68
|
+
(y) => setTimeout(y, a)
|
|
69
|
+
), s(!0)))();
|
|
70
|
+
}, [e, a, o]), e !== void 0 ? !o && a > 0 ? ["", n, !0] : [e, n, !0] : [l, p, !1];
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
const r =
|
|
72
|
+
function ve(e) {
|
|
73
|
+
const r = xe();
|
|
74
74
|
if (!e)
|
|
75
75
|
return r;
|
|
76
76
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -80,7 +80,7 @@ function Ae(e) {
|
|
|
80
80
|
return typeof t == "number" || typeof t == "string" ? `${n}${t}` : `${n}${r}`;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const Q = "SET_ANNOUNCEMENT", Y = "CLEAR_ANNOUNCEMENT", Ee = {
|
|
84
84
|
alert: null,
|
|
85
85
|
alertdialog: null,
|
|
86
86
|
log: "polite",
|
|
@@ -88,14 +88,14 @@ const z = "SET_ANNOUNCEMENT", W = "CLEAR_ANNOUNCEMENT", ge = {
|
|
|
88
88
|
progressbar: null,
|
|
89
89
|
status: "polite",
|
|
90
90
|
timer: "assertive"
|
|
91
|
-
},
|
|
91
|
+
}, Ne = (e, r) => {
|
|
92
92
|
switch (r == null ? void 0 : r.type) {
|
|
93
|
-
case
|
|
93
|
+
case Q:
|
|
94
94
|
return {
|
|
95
95
|
...e,
|
|
96
96
|
announcement: r.payload
|
|
97
97
|
};
|
|
98
|
-
case
|
|
98
|
+
case Y:
|
|
99
99
|
return {
|
|
100
100
|
...e,
|
|
101
101
|
announcement: null
|
|
@@ -103,14 +103,14 @@ const z = "SET_ANNOUNCEMENT", W = "CLEAR_ANNOUNCEMENT", ge = {
|
|
|
103
103
|
default:
|
|
104
104
|
return e;
|
|
105
105
|
}
|
|
106
|
-
},
|
|
106
|
+
}, Ce = ({
|
|
107
107
|
onAnnouncementClear: e,
|
|
108
108
|
dispatch: r
|
|
109
109
|
}) => {
|
|
110
110
|
r({
|
|
111
|
-
type:
|
|
111
|
+
type: Y
|
|
112
112
|
}), typeof e == "function" && e();
|
|
113
|
-
},
|
|
113
|
+
}, q = ({
|
|
114
114
|
children: e,
|
|
115
115
|
clearAnnouncementDelay: r,
|
|
116
116
|
clearAnnouncementTimeoutRef: t,
|
|
@@ -118,80 +118,80 @@ const z = "SET_ANNOUNCEMENT", W = "CLEAR_ANNOUNCEMENT", ge = {
|
|
|
118
118
|
dispatch: a
|
|
119
119
|
}) => {
|
|
120
120
|
clearTimeout(t.current), e !== null && a({
|
|
121
|
-
type:
|
|
121
|
+
type: Q,
|
|
122
122
|
payload: e
|
|
123
123
|
}), r && (t.current = setTimeout(
|
|
124
|
-
() =>
|
|
124
|
+
() => Ce({
|
|
125
125
|
onAnnouncementClear: n,
|
|
126
126
|
dispatch: a
|
|
127
127
|
}),
|
|
128
128
|
r
|
|
129
129
|
));
|
|
130
|
-
},
|
|
130
|
+
}, Ie = ({
|
|
131
131
|
children: e,
|
|
132
132
|
announcementTimeoutRef: r,
|
|
133
133
|
announcementDelay: t,
|
|
134
134
|
clearAnnouncementDelay: n,
|
|
135
135
|
clearAnnouncementTimeoutRef: a,
|
|
136
|
-
onAnnouncementClear:
|
|
137
|
-
dispatch:
|
|
136
|
+
onAnnouncementClear: o,
|
|
137
|
+
dispatch: s
|
|
138
138
|
}) => {
|
|
139
|
-
clearTimeout(r.current), t ? r.current = setTimeout(
|
|
139
|
+
clearTimeout(r.current), t ? r.current = setTimeout(q, t, {
|
|
140
140
|
children: e,
|
|
141
141
|
clearAnnouncementDelay: n,
|
|
142
142
|
clearAnnouncementTimeoutRef: a,
|
|
143
|
-
onAnnouncementClear:
|
|
144
|
-
dispatch:
|
|
145
|
-
}) :
|
|
143
|
+
onAnnouncementClear: o,
|
|
144
|
+
dispatch: s
|
|
145
|
+
}) : q({
|
|
146
146
|
children: e,
|
|
147
147
|
clearAnnouncementDelay: n,
|
|
148
148
|
clearAnnouncementTimeoutRef: a,
|
|
149
|
-
onAnnouncementClear:
|
|
150
|
-
dispatch:
|
|
149
|
+
onAnnouncementClear: o,
|
|
150
|
+
dispatch: s
|
|
151
151
|
});
|
|
152
152
|
};
|
|
153
|
-
function
|
|
153
|
+
function Le({
|
|
154
154
|
children: e,
|
|
155
155
|
className: r,
|
|
156
156
|
politeness: t,
|
|
157
157
|
role: n = null,
|
|
158
158
|
announcementDelay: a,
|
|
159
|
-
clearAnnouncementDelay:
|
|
160
|
-
onAnnouncementClear:
|
|
161
|
-
visible:
|
|
162
|
-
...
|
|
159
|
+
clearAnnouncementDelay: o,
|
|
160
|
+
onAnnouncementClear: s,
|
|
161
|
+
visible: l,
|
|
162
|
+
...i
|
|
163
163
|
}) {
|
|
164
|
-
const
|
|
164
|
+
const p = f(null), y = f(null), [b, E] = he(Ne, {
|
|
165
165
|
announcement: null
|
|
166
166
|
});
|
|
167
|
-
let
|
|
168
|
-
typeof
|
|
169
|
-
|
|
170
|
-
announcementTimeoutRef:
|
|
167
|
+
let g = t;
|
|
168
|
+
typeof g > "u" && (g = n ? Ee[n] : "assertive"), O(() => {
|
|
169
|
+
Ie({
|
|
170
|
+
announcementTimeoutRef: p,
|
|
171
171
|
announcementDelay: a,
|
|
172
172
|
children: e,
|
|
173
|
-
clearAnnouncementDelay:
|
|
174
|
-
clearAnnouncementTimeoutRef:
|
|
175
|
-
onAnnouncementClear:
|
|
176
|
-
dispatch:
|
|
173
|
+
clearAnnouncementDelay: o,
|
|
174
|
+
clearAnnouncementTimeoutRef: y,
|
|
175
|
+
onAnnouncementClear: s,
|
|
176
|
+
dispatch: E
|
|
177
177
|
});
|
|
178
178
|
}, [
|
|
179
179
|
e,
|
|
180
180
|
a,
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
o,
|
|
182
|
+
s
|
|
183
183
|
]);
|
|
184
|
-
const
|
|
185
|
-
"sr-only": !
|
|
184
|
+
const d = c(r, {
|
|
185
|
+
"sr-only": !l
|
|
186
186
|
});
|
|
187
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ T(
|
|
188
188
|
"div",
|
|
189
189
|
{
|
|
190
|
-
"aria-live":
|
|
190
|
+
"aria-live": g,
|
|
191
191
|
...n && { role: n },
|
|
192
|
-
className:
|
|
193
|
-
...
|
|
194
|
-
children:
|
|
192
|
+
className: d,
|
|
193
|
+
...i,
|
|
194
|
+
children: b.announcement
|
|
195
195
|
}
|
|
196
196
|
);
|
|
197
197
|
}
|
|
@@ -202,59 +202,72 @@ function Ee({
|
|
|
202
202
|
try {
|
|
203
203
|
window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
|
|
204
204
|
version: "1.2.7",
|
|
205
|
-
buildTime: "12/
|
|
205
|
+
buildTime: "12/31/2024 06:19 PM EST",
|
|
206
206
|
homepage: "https://github.com/aversini/ui-components",
|
|
207
207
|
license: "MIT"
|
|
208
208
|
});
|
|
209
209
|
} catch {
|
|
210
210
|
}
|
|
211
|
-
const
|
|
212
|
-
mode: e
|
|
213
|
-
}) => i({
|
|
211
|
+
const Se = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Oe = ({ mode: e }) => c({
|
|
214
212
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
215
213
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
216
214
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
217
215
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
218
|
-
}),
|
|
216
|
+
}), we = ({
|
|
219
217
|
focusMode: e
|
|
220
|
-
}) =>
|
|
218
|
+
}) => c("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
221
219
|
"focus:outline-focus-dark": e === "dark",
|
|
222
220
|
"focus:outline-focus-light": e === "light",
|
|
223
221
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
224
222
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
225
|
-
}),
|
|
223
|
+
}), $e = ({
|
|
226
224
|
noBorder: e,
|
|
227
225
|
error: r
|
|
228
|
-
}) =>
|
|
226
|
+
}) => c("border-2", {
|
|
229
227
|
"border-border-dark": !e && !r,
|
|
230
228
|
"focus:border-border-dark": !e && r,
|
|
231
229
|
"border-border-error-dark": !e && r,
|
|
232
230
|
"border-transparent": e
|
|
233
|
-
}),
|
|
231
|
+
}), Pe = ({
|
|
234
232
|
disabled: e,
|
|
235
233
|
raw: r,
|
|
236
234
|
error: t,
|
|
237
|
-
mode: n
|
|
235
|
+
mode: n,
|
|
236
|
+
leftElement: a,
|
|
237
|
+
rightElement: o
|
|
238
238
|
}) => {
|
|
239
239
|
if (r)
|
|
240
240
|
return "";
|
|
241
241
|
if (e)
|
|
242
|
-
return
|
|
242
|
+
return c(
|
|
243
|
+
"transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
|
|
244
|
+
{
|
|
245
|
+
"translate-x-[12px]": o === !0 && !a || !o && !a
|
|
246
|
+
}
|
|
247
|
+
);
|
|
243
248
|
if (!t)
|
|
244
|
-
return
|
|
245
|
-
"text-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
return c(
|
|
250
|
+
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
251
|
+
{
|
|
252
|
+
"translate-x-[12px]": o === !0 && !a || !o && !a,
|
|
253
|
+
"text-copy-medium": n === "dark",
|
|
254
|
+
"text-copy-dark": n === "light",
|
|
255
|
+
"text-copy-dark dark:text-copy-medium": n === "system",
|
|
256
|
+
"text-copy-medium dark:text-copy-dark": n === "alt-system"
|
|
257
|
+
}
|
|
258
|
+
);
|
|
250
259
|
if (t)
|
|
251
|
-
return
|
|
252
|
-
"text-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
260
|
+
return c(
|
|
261
|
+
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
262
|
+
{
|
|
263
|
+
"translate-x-[12px]": o === !0 && !a || !o && !a,
|
|
264
|
+
"text-copy-medium": n === "dark",
|
|
265
|
+
"text-copy-error-dark": n === "light",
|
|
266
|
+
"text-copy-error-dark dark:text-copy-error-light": n === "system",
|
|
267
|
+
"text-copy-medium dark:text-copy-error-dark": n === "alt-system"
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
}, He = ({
|
|
258
271
|
error: e,
|
|
259
272
|
raw: r,
|
|
260
273
|
mode: t,
|
|
@@ -263,125 +276,134 @@ const _e = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
263
276
|
if (r)
|
|
264
277
|
return "";
|
|
265
278
|
if (n)
|
|
266
|
-
return
|
|
267
|
-
|
|
279
|
+
return c(
|
|
280
|
+
M,
|
|
268
281
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
269
282
|
);
|
|
270
283
|
if (!e)
|
|
271
|
-
return
|
|
284
|
+
return c(M, "absolute px-2 font-medium", {
|
|
272
285
|
"text-copy-medium": t === "dark",
|
|
273
286
|
"text-copy-dark": t === "light",
|
|
274
287
|
"text-copy-dark dark:text-copy-medium": t === "system",
|
|
275
288
|
"text-copy-medium dark:text-copy-dark": t === "alt-system"
|
|
276
289
|
});
|
|
277
290
|
if (e)
|
|
278
|
-
return
|
|
291
|
+
return c(M, "absolute px-2 font-medium", {
|
|
279
292
|
"text-copy-error-light": t === "dark",
|
|
280
293
|
"text-copy-error-dark": t === "light",
|
|
281
294
|
"text-copy-error-dark dark:text-copy-error-light": t === "system",
|
|
282
295
|
"dark:text-copy-error-dark text-copy-error-light": t === "alt-system"
|
|
283
296
|
});
|
|
284
|
-
},
|
|
297
|
+
}, Me = ({
|
|
285
298
|
className: e,
|
|
286
299
|
textAreaClassName: r,
|
|
287
300
|
raw: t,
|
|
288
301
|
focusMode: n,
|
|
289
302
|
disabled: a,
|
|
290
|
-
noBorder:
|
|
291
|
-
error:
|
|
292
|
-
mode:
|
|
303
|
+
noBorder: o,
|
|
304
|
+
error: s,
|
|
305
|
+
mode: l,
|
|
306
|
+
leftElement: i,
|
|
307
|
+
rightElement: p
|
|
293
308
|
}) => {
|
|
294
|
-
const
|
|
309
|
+
const y = t ? e : c(
|
|
295
310
|
"relative flex w-full flex-col justify-center",
|
|
296
|
-
|
|
311
|
+
Ae,
|
|
297
312
|
e
|
|
298
|
-
),
|
|
299
|
-
|
|
313
|
+
), b = t ? c(r) : c(
|
|
314
|
+
K,
|
|
300
315
|
r,
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
noBorder:
|
|
306
|
-
error:
|
|
316
|
+
Se(),
|
|
317
|
+
Oe({ mode: l }),
|
|
318
|
+
we({ focusMode: n }),
|
|
319
|
+
$e({
|
|
320
|
+
noBorder: o,
|
|
321
|
+
error: s
|
|
307
322
|
}),
|
|
308
323
|
{
|
|
309
324
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
310
325
|
}
|
|
311
|
-
),
|
|
326
|
+
), E = t ? void 0 : "sr-only", g = Pe({
|
|
312
327
|
disabled: a,
|
|
313
328
|
raw: t,
|
|
314
|
-
error:
|
|
315
|
-
mode:
|
|
316
|
-
|
|
317
|
-
|
|
329
|
+
error: s,
|
|
330
|
+
mode: l,
|
|
331
|
+
rightElement: p,
|
|
332
|
+
leftElement: i
|
|
333
|
+
}), d = He({
|
|
334
|
+
error: s,
|
|
318
335
|
raw: t,
|
|
319
|
-
mode:
|
|
336
|
+
mode: l,
|
|
320
337
|
disabled: a
|
|
321
|
-
}),
|
|
338
|
+
}), N = t ? void 0 : c(Te, "absolute"), h = t ? void 0 : c(ge, "absolute");
|
|
322
339
|
return {
|
|
323
|
-
wrapper:
|
|
324
|
-
textArea:
|
|
325
|
-
accessibleLabel:
|
|
326
|
-
visibleLabel:
|
|
327
|
-
helperText:
|
|
328
|
-
rightElement:
|
|
340
|
+
wrapper: y,
|
|
341
|
+
textArea: b,
|
|
342
|
+
accessibleLabel: E,
|
|
343
|
+
visibleLabel: g,
|
|
344
|
+
helperText: d,
|
|
345
|
+
rightElement: N,
|
|
346
|
+
leftElement: h
|
|
329
347
|
};
|
|
330
|
-
},
|
|
348
|
+
}, De = ({
|
|
331
349
|
scrollHeight: e,
|
|
332
350
|
currentHeight: r,
|
|
333
351
|
currentLabelOffset: t = 0,
|
|
334
352
|
currentHelperTextOffset: n = 0
|
|
335
353
|
}) => {
|
|
336
|
-
let
|
|
354
|
+
let s, l;
|
|
337
355
|
if (e > 0 && e !== r) {
|
|
338
|
-
const
|
|
339
|
-
|
|
356
|
+
const i = e - r, p = Math.abs(i / 24);
|
|
357
|
+
s = t + -1 * Math.sign(i) * (12 * p), l = n + Math.sign(i) * (12 * p);
|
|
340
358
|
}
|
|
341
359
|
return {
|
|
342
|
-
labelOffset:
|
|
343
|
-
helperTextOffset:
|
|
360
|
+
labelOffset: s,
|
|
361
|
+
helperTextOffset: l,
|
|
344
362
|
scrollHeight: e
|
|
345
363
|
};
|
|
346
|
-
},
|
|
364
|
+
}, Fe = ye.forwardRef(
|
|
347
365
|
({
|
|
348
366
|
id: e,
|
|
349
367
|
name: r,
|
|
350
368
|
label: t,
|
|
351
369
|
error: n = !1,
|
|
352
370
|
raw: a = !1,
|
|
353
|
-
className:
|
|
354
|
-
textAreaClassName:
|
|
355
|
-
mode:
|
|
356
|
-
focusMode:
|
|
357
|
-
value:
|
|
358
|
-
defaultValue:
|
|
359
|
-
disabled:
|
|
360
|
-
noBorder:
|
|
361
|
-
labelId:
|
|
362
|
-
helperText:
|
|
363
|
-
helperTextOnFocus:
|
|
364
|
-
rightElement:
|
|
371
|
+
className: o,
|
|
372
|
+
textAreaClassName: s,
|
|
373
|
+
mode: l = "system",
|
|
374
|
+
focusMode: i = "system",
|
|
375
|
+
value: p,
|
|
376
|
+
defaultValue: y,
|
|
377
|
+
disabled: b = !1,
|
|
378
|
+
noBorder: E = !1,
|
|
379
|
+
labelId: g,
|
|
380
|
+
helperText: d = "",
|
|
381
|
+
helperTextOnFocus: N = !1,
|
|
382
|
+
rightElement: h,
|
|
383
|
+
leftElement: k,
|
|
365
384
|
onChange: D,
|
|
366
|
-
onFocus:
|
|
367
|
-
onBlur:
|
|
368
|
-
...
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
385
|
+
onFocus: F,
|
|
386
|
+
onBlur: U,
|
|
387
|
+
...Z
|
|
388
|
+
}, ee) => {
|
|
389
|
+
var B;
|
|
390
|
+
const x = f(null), te = be([ee, x]), [re, L] = W(), [ne, R] = W(), w = f(80), V = f(-25), m = f(null), X = f(30), S = f(null), C = ve({ id: e, prefix: `${K}-` }), [j, ae] = v(0), [G, oe] = v(0), [se, z] = v(
|
|
391
|
+
!!(!N && d)
|
|
392
|
+
), ce = `${r} error, ${d}`, _ = Me({
|
|
393
|
+
className: o,
|
|
394
|
+
textAreaClassName: s,
|
|
375
395
|
error: n,
|
|
376
396
|
raw: a,
|
|
377
|
-
focusMode:
|
|
378
|
-
disabled:
|
|
379
|
-
noBorder:
|
|
380
|
-
mode:
|
|
381
|
-
|
|
382
|
-
|
|
397
|
+
focusMode: i,
|
|
398
|
+
disabled: b,
|
|
399
|
+
noBorder: E,
|
|
400
|
+
mode: l,
|
|
401
|
+
rightElement: !!h,
|
|
402
|
+
leftElement: !!k
|
|
403
|
+
}), [A, le] = Re({
|
|
404
|
+
value: p,
|
|
383
405
|
initialControlledDelay: 20,
|
|
384
|
-
defaultValue:
|
|
406
|
+
defaultValue: y,
|
|
385
407
|
onChange: (u) => {
|
|
386
408
|
D && D({
|
|
387
409
|
target: {
|
|
@@ -389,108 +411,129 @@ const _e = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
389
411
|
}
|
|
390
412
|
});
|
|
391
413
|
}
|
|
392
|
-
}),
|
|
393
|
-
|
|
394
|
-
},
|
|
395
|
-
|
|
396
|
-
},
|
|
397
|
-
|
|
414
|
+
}), ie = (u) => {
|
|
415
|
+
le(u.target.value);
|
|
416
|
+
}, ue = (u) => {
|
|
417
|
+
N && d && z(!0), F && F(u);
|
|
418
|
+
}, de = (u) => {
|
|
419
|
+
N && d && !A && z(!1), U && U(u);
|
|
398
420
|
};
|
|
399
|
-
return
|
|
400
|
-
|
|
401
|
-
}, [
|
|
402
|
-
|
|
403
|
-
}, [
|
|
421
|
+
return I(() => {
|
|
422
|
+
L && L.width && ae(L.width + 18 + 10);
|
|
423
|
+
}, [L]), I(() => {
|
|
424
|
+
R && R.width && oe(R.width + 18 + 10);
|
|
425
|
+
}, [R]), I(() => {
|
|
426
|
+
a || x && x.current && A !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
|
|
427
|
+
}, [A, a]), I(() => {
|
|
404
428
|
a || setTimeout(() => {
|
|
405
429
|
var u;
|
|
406
|
-
(u =
|
|
430
|
+
(u = m == null ? void 0 : m.current) == null || u.style.setProperty(
|
|
407
431
|
"--av-text-area-wrapper-transition",
|
|
408
|
-
|
|
432
|
+
A ? "none" : "all 0.2s ease-out"
|
|
409
433
|
);
|
|
410
434
|
}, 0);
|
|
411
|
-
}, [
|
|
412
|
-
var u,
|
|
413
|
-
if (!a &&
|
|
414
|
-
const { labelOffset:
|
|
415
|
-
scrollHeight:
|
|
416
|
-
currentHeight:
|
|
417
|
-
currentLabelOffset:
|
|
418
|
-
currentHelperTextOffset:
|
|
435
|
+
}, [A, a]), I(() => {
|
|
436
|
+
var u, $;
|
|
437
|
+
if (!a && x && x.current && A !== void 0) {
|
|
438
|
+
const { labelOffset: P, helperTextOffset: H, scrollHeight: fe } = De({
|
|
439
|
+
scrollHeight: x.current.scrollHeight,
|
|
440
|
+
currentHeight: w.current,
|
|
441
|
+
currentLabelOffset: V.current,
|
|
442
|
+
currentHelperTextOffset: X.current
|
|
419
443
|
});
|
|
420
|
-
|
|
444
|
+
P && (V.current = P, (u = m == null ? void 0 : m.current) == null || u.style.setProperty(
|
|
421
445
|
"--av-text-area-label",
|
|
422
|
-
`${
|
|
423
|
-
)),
|
|
446
|
+
`${P}px`
|
|
447
|
+
)), H && (X.current = H, ($ = S == null ? void 0 : S.current) == null || $.style.setProperty(
|
|
424
448
|
"--av-text-area-helper-text",
|
|
425
|
-
`${
|
|
426
|
-
)),
|
|
449
|
+
`${H}px`
|
|
450
|
+
)), w.current = fe || w.current;
|
|
427
451
|
}
|
|
428
|
-
}, [
|
|
429
|
-
|
|
452
|
+
}, [A, a]), R.width > 0 && ((B = m == null ? void 0 : m.current) == null || B.style.setProperty(
|
|
453
|
+
"--tw-translate-x",
|
|
454
|
+
`${12 + R.width + 5}px`
|
|
455
|
+
)), /* @__PURE__ */ pe("div", { className: _.wrapper, children: [
|
|
456
|
+
/* @__PURE__ */ T(
|
|
430
457
|
"label",
|
|
431
458
|
{
|
|
432
|
-
htmlFor:
|
|
433
|
-
id:
|
|
434
|
-
className:
|
|
459
|
+
htmlFor: C,
|
|
460
|
+
id: g,
|
|
461
|
+
className: _.accessibleLabel,
|
|
435
462
|
children: t
|
|
436
463
|
}
|
|
437
464
|
),
|
|
438
|
-
/* @__PURE__ */
|
|
465
|
+
k && /* @__PURE__ */ T(
|
|
466
|
+
"div",
|
|
467
|
+
{
|
|
468
|
+
ref: ne,
|
|
469
|
+
className: _.leftElement,
|
|
470
|
+
children: k
|
|
471
|
+
}
|
|
472
|
+
),
|
|
473
|
+
/* @__PURE__ */ T(
|
|
439
474
|
"textarea",
|
|
440
475
|
{
|
|
441
|
-
ref:
|
|
442
|
-
id:
|
|
476
|
+
ref: te,
|
|
477
|
+
id: C,
|
|
443
478
|
name: r,
|
|
444
|
-
disabled:
|
|
479
|
+
disabled: b,
|
|
445
480
|
placeholder: a ? void 0 : " ",
|
|
446
|
-
className:
|
|
481
|
+
className: _.textArea,
|
|
447
482
|
rows: 1,
|
|
448
|
-
...
|
|
483
|
+
...d && { "aria-describedby": `${C}-helper` },
|
|
449
484
|
...n && { "aria-invalid": "true" },
|
|
450
|
-
...
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
485
|
+
...h && !k && !a && { style: { paddingRight: j } },
|
|
486
|
+
...k && !h && !a && { style: { paddingLeft: G } },
|
|
487
|
+
...h && k && !a && {
|
|
488
|
+
style: {
|
|
489
|
+
paddingRight: j,
|
|
490
|
+
paddingLeft: G
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
value: A,
|
|
494
|
+
onChange: ie,
|
|
495
|
+
onFocus: ue,
|
|
496
|
+
onBlur: de,
|
|
497
|
+
...Z
|
|
456
498
|
}
|
|
457
499
|
),
|
|
458
|
-
!a && /* @__PURE__ */
|
|
500
|
+
!a && /* @__PURE__ */ T(
|
|
459
501
|
"label",
|
|
460
502
|
{
|
|
461
|
-
ref:
|
|
503
|
+
ref: m,
|
|
462
504
|
"aria-hidden": !0,
|
|
463
|
-
htmlFor:
|
|
464
|
-
className:
|
|
505
|
+
htmlFor: C,
|
|
506
|
+
className: `${_.visibleLabel}`,
|
|
465
507
|
children: t
|
|
466
508
|
}
|
|
467
509
|
),
|
|
468
|
-
|
|
510
|
+
se && /* @__PURE__ */ T(
|
|
469
511
|
"div",
|
|
470
512
|
{
|
|
471
|
-
ref:
|
|
472
|
-
id: `${
|
|
473
|
-
className:
|
|
474
|
-
children:
|
|
513
|
+
ref: S,
|
|
514
|
+
id: `${C}-helper`,
|
|
515
|
+
className: _.helperText,
|
|
516
|
+
children: d
|
|
475
517
|
}
|
|
476
518
|
),
|
|
477
|
-
|
|
519
|
+
h && /* @__PURE__ */ T(
|
|
478
520
|
"div",
|
|
479
521
|
{
|
|
480
|
-
ref:
|
|
481
|
-
className:
|
|
482
|
-
children:
|
|
522
|
+
ref: re,
|
|
523
|
+
className: _.rightElement,
|
|
524
|
+
children: h
|
|
483
525
|
}
|
|
484
526
|
),
|
|
485
|
-
n &&
|
|
527
|
+
n && d && /* @__PURE__ */ T(Le, { politeness: "polite", clearAnnouncementDelay: 500, children: ce })
|
|
486
528
|
] });
|
|
487
529
|
}
|
|
488
530
|
);
|
|
489
|
-
|
|
531
|
+
Fe.displayName = "TextArea";
|
|
490
532
|
export {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
533
|
+
K as TEXT_AREA_CLASSNAME,
|
|
534
|
+
ge as TEXT_AREA_CONTROL_LEFT_CLASSNAME,
|
|
535
|
+
Te as TEXT_AREA_CONTROL_RIGHT_CLASSNAME,
|
|
536
|
+
M as TEXT_AREA_HELPER_TEXT_CLASSNAME,
|
|
537
|
+
Ae as TEXT_AREA_WRAPPER_CLASSNAME,
|
|
538
|
+
Fe as TextArea
|
|
496
539
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::-ms-backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-ms-input-placeholder,textarea::-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.av-text-area-wrapper label[aria-hidden=true]{transform:translate(12px) scale(1);transform-origin:top left;transition:var(--av-text-area-wrapper-transition, all .2s ease-out)}.av-text-area:focus+label[aria-hidden=true],.av-text-area:not(:placeholder-shown)+label[aria-hidden=true]{transform:translate(12px,var(--av-text-area-label, -25px)) scale(.75)}.av-text-area-helper-text{transform:translate(12px,var(--av-text-area-helper-text, 32px)) scale(.75);transform-origin:top left}.av-text-area__control--right{right:18px}@keyframes blink{50%{fill:transparent}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.mr-2{margin-right:.5rem}.flex{display:flex}.h-20{height:5rem}.min-h-\[80px\]{min-height:80px}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-text{cursor:text}.resize-none{resize:none}.resize{resize:both}.flex-col{flex-direction:column}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-border-dark{--tw-border-opacity: 1;border-color:var(--av-border-dark, rgb(15 23 42 / var(--tw-border-opacity, 1)))}.border-border-error-dark{--tw-border-opacity: 1;border-color:var(--av-border-error-dark, rgb(185 28 28 / var(--tw-border-opacity, 1)))}.border-transparent{border-color:transparent}.bg-surface-darker{--tw-bg-opacity: 1;background-color:var(--av-surface-darker, rgb(15 23 42 / var(--tw-bg-opacity, 1)))}.bg-surface-lighter{--tw-bg-opacity: 1;background-color:var(--av-surface-lighter, rgb(226 232 240 / var(--tw-bg-opacity, 1)))}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-7{padding-top:1.75rem;padding-bottom:1.75rem}.text-base{font-size:1rem;line-height:1.5rem}.font-medium{font-weight:500}.text-copy-dark{--tw-text-opacity: 1;color:var(--av-copy-dark, rgb(15 23 42 / var(--tw-text-opacity, 1)))}.text-copy-error-dark{--tw-text-opacity: 1;color:var(--av-copy-error-dark, rgb(185 28 28 / var(--tw-text-opacity, 1)))}.text-copy-error-light{--tw-text-opacity: 1;color:var(--av-copy-error-light, rgb(239 68 68 / var(--tw-text-opacity, 1)))}.text-copy-lighter{--tw-text-opacity: 1;color:var(--av-copy-lighter, rgb(255 255 255 / var(--tw-text-opacity, 1)))}.text-copy-medium{--tw-text-opacity: 1;color:var(--av-copy-medium, rgb(148 163 184 / var(--tw-text-opacity, 1)))}.caret-copy-dark{caret-color:var(--av-copy-dark, rgb(15 23 42 / 1))}.caret-copy-light{caret-color:var(--av-copy-light, rgb(226 232 240 / 1))}.opacity-50{opacity:.5}.outline-focus-dark{outline-color:var(--av-focus-dark, rgb(21 128 61 / 1))}.outline-focus-light{outline-color:var(--av-focus-light, rgb(134 239 172 / 1))}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.focus\:border-border-dark:focus{--tw-border-opacity: 1;border-color:var(--av-border-dark, rgb(15 23 42 / var(--tw-border-opacity, 1)))}.focus\:outline:focus{outline-style:solid}.focus\:outline-2:focus{outline-width:2px}.focus\:outline-offset-2:focus{outline-offset:2px}.focus\:outline-focus-dark:focus{outline-color:var(--av-focus-dark, rgb(21 128 61 / 1))}.focus\:outline-focus-light:focus{outline-color:var(--av-focus-light, rgb(134 239 172 / 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (prefers-color-scheme: dark){.dark\:bg-surface-darker{--tw-bg-opacity: 1;background-color:var(--av-surface-darker, rgb(15 23 42 / var(--tw-bg-opacity, 1)))}.dark\:bg-surface-lighter{--tw-bg-opacity: 1;background-color:var(--av-surface-lighter, rgb(226 232 240 / var(--tw-bg-opacity, 1)))}.dark\:text-copy-dark{--tw-text-opacity: 1;color:var(--av-copy-dark, rgb(15 23 42 / var(--tw-text-opacity, 1)))}.dark\:text-copy-error-dark{--tw-text-opacity: 1;color:var(--av-copy-error-dark, rgb(185 28 28 / var(--tw-text-opacity, 1)))}.dark\:text-copy-error-light{--tw-text-opacity: 1;color:var(--av-copy-error-light, rgb(239 68 68 / var(--tw-text-opacity, 1)))}.dark\:text-copy-lighter{--tw-text-opacity: 1;color:var(--av-copy-lighter, rgb(255 255 255 / var(--tw-text-opacity, 1)))}.dark\:text-copy-medium{--tw-text-opacity: 1;color:var(--av-copy-medium, rgb(148 163 184 / var(--tw-text-opacity, 1)))}.dark\:caret-copy-dark{caret-color:var(--av-copy-dark, rgb(15 23 42 / 1))}.dark\:caret-copy-light{caret-color:var(--av-copy-light, rgb(226 232 240 / 1))}.dark\:focus\:outline-focus-dark:focus{outline-color:var(--av-focus-dark, rgb(21 128 61 / 1))}.dark\:focus\:outline-focus-light:focus{outline-color:var(--av-focus-light, rgb(134 239 172 / 1))}}
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::-ms-backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-ms-input-placeholder,textarea::-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.av-text-area-wrapper label[aria-hidden=true]{transform-origin:top left;transition:var(--av-text-area-wrapper-transition, all .2s ease-out)}.av-text-area:focus+label[aria-hidden=true],.av-text-area:not(:placeholder-shown)+label[aria-hidden=true]{transform:translate(12px,var(--av-text-area-label, -25px)) scale(.75)}.av-text-area-helper-text{transform:translate(12px,var(--av-text-area-helper-text, 32px)) scale(.75);transform-origin:top left}.av-text-area__control--right{right:18px}.av-text-area__control--left{left:18px}@keyframes blink{50%{fill:transparent}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.mr-2{margin-right:.5rem}.flex{display:flex}.h-20{height:5rem}.min-h-\[80px\]{min-height:80px}.w-full{width:100%}.translate-x-\[12px\]{--tw-translate-x: 12px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.cursor-text{cursor:text}.resize-none{resize:none}.resize{resize:both}.flex-col{flex-direction:column}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-border-dark{--tw-border-opacity: 1;border-color:var(--av-border-dark, rgb(15 23 42 / var(--tw-border-opacity, 1)))}.border-border-error-dark{--tw-border-opacity: 1;border-color:var(--av-border-error-dark, rgb(185 28 28 / var(--tw-border-opacity, 1)))}.border-transparent{border-color:transparent}.bg-surface-darker{--tw-bg-opacity: 1;background-color:var(--av-surface-darker, rgb(15 23 42 / var(--tw-bg-opacity, 1)))}.bg-surface-lighter{--tw-bg-opacity: 1;background-color:var(--av-surface-lighter, rgb(226 232 240 / var(--tw-bg-opacity, 1)))}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-7{padding-top:1.75rem;padding-bottom:1.75rem}.text-base{font-size:1rem;line-height:1.5rem}.font-medium{font-weight:500}.text-copy-dark{--tw-text-opacity: 1;color:var(--av-copy-dark, rgb(15 23 42 / var(--tw-text-opacity, 1)))}.text-copy-error-dark{--tw-text-opacity: 1;color:var(--av-copy-error-dark, rgb(185 28 28 / var(--tw-text-opacity, 1)))}.text-copy-error-light{--tw-text-opacity: 1;color:var(--av-copy-error-light, rgb(239 68 68 / var(--tw-text-opacity, 1)))}.text-copy-lighter{--tw-text-opacity: 1;color:var(--av-copy-lighter, rgb(255 255 255 / var(--tw-text-opacity, 1)))}.text-copy-medium{--tw-text-opacity: 1;color:var(--av-copy-medium, rgb(148 163 184 / var(--tw-text-opacity, 1)))}.caret-copy-dark{caret-color:var(--av-copy-dark, rgb(15 23 42 / 1))}.caret-copy-light{caret-color:var(--av-copy-light, rgb(226 232 240 / 1))}.opacity-50{opacity:.5}.outline-focus-dark{outline-color:var(--av-focus-dark, rgb(21 128 61 / 1))}.outline-focus-light{outline-color:var(--av-focus-light, rgb(134 239 172 / 1))}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.focus\:border-border-dark:focus{--tw-border-opacity: 1;border-color:var(--av-border-dark, rgb(15 23 42 / var(--tw-border-opacity, 1)))}.focus\:outline:focus{outline-style:solid}.focus\:outline-2:focus{outline-width:2px}.focus\:outline-offset-2:focus{outline-offset:2px}.focus\:outline-focus-dark:focus{outline-color:var(--av-focus-dark, rgb(21 128 61 / 1))}.focus\:outline-focus-light:focus{outline-color:var(--av-focus-light, rgb(134 239 172 / 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (prefers-color-scheme: dark){.dark\:bg-surface-darker{--tw-bg-opacity: 1;background-color:var(--av-surface-darker, rgb(15 23 42 / var(--tw-bg-opacity, 1)))}.dark\:bg-surface-lighter{--tw-bg-opacity: 1;background-color:var(--av-surface-lighter, rgb(226 232 240 / var(--tw-bg-opacity, 1)))}.dark\:text-copy-dark{--tw-text-opacity: 1;color:var(--av-copy-dark, rgb(15 23 42 / var(--tw-text-opacity, 1)))}.dark\:text-copy-error-dark{--tw-text-opacity: 1;color:var(--av-copy-error-dark, rgb(185 28 28 / var(--tw-text-opacity, 1)))}.dark\:text-copy-error-light{--tw-text-opacity: 1;color:var(--av-copy-error-light, rgb(239 68 68 / var(--tw-text-opacity, 1)))}.dark\:text-copy-lighter{--tw-text-opacity: 1;color:var(--av-copy-lighter, rgb(255 255 255 / var(--tw-text-opacity, 1)))}.dark\:text-copy-medium{--tw-text-opacity: 1;color:var(--av-copy-medium, rgb(148 163 184 / var(--tw-text-opacity, 1)))}.dark\:caret-copy-dark{caret-color:var(--av-copy-dark, rgb(15 23 42 / 1))}.dark\:caret-copy-light{caret-color:var(--av-copy-light, rgb(226 232 240 / 1))}.dark\:focus\:outline-focus-dark:focus{outline-color:var(--av-focus-dark, rgb(21 128 61 / 1))}.dark\:focus\:outline-focus-light:focus{outline-color:var(--av-focus-light, rgb(134 239 172 / 1))}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-textarea",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"sideEffects": [
|
|
49
49
|
"**/*.css"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "bf536f2cceac4f03157a0fbccfeabfbe70682c9e"
|
|
52
52
|
}
|