@versini/ui-textarea 0.0.0
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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/components/TextArea/TextArea.js +6 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +510 -0
- package/dist/style.css +1 -0
- package/dist/style.js +0 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Arno Versini
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as _versini_ui_private_dist_utilities from '@versini/ui-private/dist/utilities';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const TEXT_AREA_CLASSNAME = "av-text-area";
|
|
5
|
+
declare const TEXT_AREA_WRAPPER_CLASSNAME = "av-text-area-wrapper";
|
|
6
|
+
declare const TEXT_AREA_HELPER_TEXT_CLASSNAME = "av-text-area-helper-text";
|
|
7
|
+
declare const TEXT_AREA_CONTROL_RIGHT_CLASSNAME = "av-text-area__control--right";
|
|
8
|
+
|
|
9
|
+
declare const TextArea: React.ForwardRefExoticComponent<{
|
|
10
|
+
label: string;
|
|
11
|
+
name: string;
|
|
12
|
+
error?: boolean;
|
|
13
|
+
focusMode?: "dark" | "light" | "system" | "alt-system";
|
|
14
|
+
helperText?: string;
|
|
15
|
+
helperTextOnFocus?: boolean;
|
|
16
|
+
labelId?: string;
|
|
17
|
+
mode?: "dark" | "light" | "system" | "alt-system";
|
|
18
|
+
noBorder?: boolean;
|
|
19
|
+
raw?: boolean;
|
|
20
|
+
rightElement?: React.ReactElement;
|
|
21
|
+
textAreaClassName?: string;
|
|
22
|
+
} & _versini_ui_private_dist_utilities.SpacingProps & React.TextareaHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
23
|
+
|
|
24
|
+
export { TEXT_AREA_CLASSNAME, TEXT_AREA_CONTROL_RIGHT_CLASSNAME, TEXT_AREA_HELPER_TEXT_CLASSNAME, TEXT_AREA_WRAPPER_CLASSNAME, TextArea };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
import { jsx as g, jsxs as le } from "react/jsx-runtime";
|
|
2
|
+
import se, { useRef as f, useEffect as N, useCallback as ie, useMemo as X, useState as _, useId as ue, useReducer as de, useLayoutEffect as C } from "react";
|
|
3
|
+
import s from "clsx";
|
|
4
|
+
/*!
|
|
5
|
+
@versini/ui-textarea v0.0.0
|
|
6
|
+
© 2024 gizmette.com
|
|
7
|
+
*/
|
|
8
|
+
try {
|
|
9
|
+
window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
|
|
10
|
+
version: "0.0.0",
|
|
11
|
+
buildTime: "09/18/2024 11:28 AM EDT",
|
|
12
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
13
|
+
license: "MIT"
|
|
14
|
+
});
|
|
15
|
+
} catch {
|
|
16
|
+
}
|
|
17
|
+
const z = "av-text-area", fe = "av-text-area-wrapper", D = "av-text-area-helper-text", pe = "av-text-area__control--right";
|
|
18
|
+
function me() {
|
|
19
|
+
const e = f(!1);
|
|
20
|
+
return N(() => (e.current = !0, () => {
|
|
21
|
+
e.current = !1;
|
|
22
|
+
}), []), ie(() => e.current, []);
|
|
23
|
+
}
|
|
24
|
+
function ye(e) {
|
|
25
|
+
return X(() => e.every((n) => n == null) ? () => {
|
|
26
|
+
} : (n) => {
|
|
27
|
+
e.forEach((t) => {
|
|
28
|
+
typeof t == "function" ? t(n) : t != null && (t.current = n);
|
|
29
|
+
});
|
|
30
|
+
}, e);
|
|
31
|
+
}
|
|
32
|
+
const he = {
|
|
33
|
+
x: 0,
|
|
34
|
+
y: 0,
|
|
35
|
+
width: 0,
|
|
36
|
+
height: 0,
|
|
37
|
+
top: 0,
|
|
38
|
+
left: 0,
|
|
39
|
+
bottom: 0,
|
|
40
|
+
right: 0
|
|
41
|
+
};
|
|
42
|
+
function xe(e) {
|
|
43
|
+
const n = me(), t = f(0), r = f(null), [o, c] = _(he), a = X(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((u) => {
|
|
44
|
+
const l = u[0];
|
|
45
|
+
l && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
46
|
+
r.current && n() && c(l.contentRect);
|
|
47
|
+
}));
|
|
48
|
+
}), [n]);
|
|
49
|
+
return N(() => (r.current && (a == null || a.observe(r.current, e)), () => {
|
|
50
|
+
a == null || a.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
51
|
+
}), [a, e]), [r, o];
|
|
52
|
+
}
|
|
53
|
+
function Ae({
|
|
54
|
+
value: e,
|
|
55
|
+
defaultValue: n,
|
|
56
|
+
finalValue: t,
|
|
57
|
+
onChange: r = () => {
|
|
58
|
+
},
|
|
59
|
+
initialControlledDelay: o = 0
|
|
60
|
+
}) {
|
|
61
|
+
const [c, a] = _(!1), [u, l] = _(
|
|
62
|
+
n !== void 0 ? n : t
|
|
63
|
+
), p = (m) => {
|
|
64
|
+
l(m), r == null || r(m);
|
|
65
|
+
};
|
|
66
|
+
return N(() => {
|
|
67
|
+
(async () => e !== void 0 && !c && o > 0 && (await new Promise(
|
|
68
|
+
(m) => setTimeout(m, o)
|
|
69
|
+
), a(!0)))();
|
|
70
|
+
}, [e, o, c]), e !== void 0 ? !c && o > 0 ? ["", r, !0] : [e, r, !0] : [u, p, !1];
|
|
71
|
+
}
|
|
72
|
+
function ge(e) {
|
|
73
|
+
const n = ue();
|
|
74
|
+
if (!e)
|
|
75
|
+
return n;
|
|
76
|
+
if (typeof e == "number" || typeof e == "string")
|
|
77
|
+
return `${e}${n}`;
|
|
78
|
+
if (typeof e == "object") {
|
|
79
|
+
const { id: t, prefix: r = "" } = e;
|
|
80
|
+
return typeof t == "number" || typeof t == "string" ? `${r}${t}` : `${r}${n}`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const G = "SET_ANNOUNCEMENT", W = "CLEAR_ANNOUNCEMENT", Te = {
|
|
84
|
+
alert: null,
|
|
85
|
+
alertdialog: null,
|
|
86
|
+
log: "polite",
|
|
87
|
+
marquee: null,
|
|
88
|
+
progressbar: null,
|
|
89
|
+
status: "polite",
|
|
90
|
+
timer: "assertive"
|
|
91
|
+
}, be = (e, n) => {
|
|
92
|
+
switch (n == null ? void 0 : n.type) {
|
|
93
|
+
case G:
|
|
94
|
+
return {
|
|
95
|
+
...e,
|
|
96
|
+
announcement: n.payload
|
|
97
|
+
};
|
|
98
|
+
case W:
|
|
99
|
+
return {
|
|
100
|
+
...e,
|
|
101
|
+
announcement: null
|
|
102
|
+
};
|
|
103
|
+
default:
|
|
104
|
+
return e;
|
|
105
|
+
}
|
|
106
|
+
}, ve = ({
|
|
107
|
+
onAnnouncementClear: e,
|
|
108
|
+
dispatch: n
|
|
109
|
+
}) => {
|
|
110
|
+
n({
|
|
111
|
+
type: W
|
|
112
|
+
}), typeof e == "function" && e();
|
|
113
|
+
}, j = ({
|
|
114
|
+
children: e,
|
|
115
|
+
clearAnnouncementDelay: n,
|
|
116
|
+
clearAnnouncementTimeoutRef: t,
|
|
117
|
+
onAnnouncementClear: r,
|
|
118
|
+
dispatch: o
|
|
119
|
+
}) => {
|
|
120
|
+
(t == null ? void 0 : t.current) !== null && clearTimeout(t.current), e !== null && o({
|
|
121
|
+
type: G,
|
|
122
|
+
payload: e
|
|
123
|
+
}), n && (t.current = setTimeout(
|
|
124
|
+
() => ve({
|
|
125
|
+
onAnnouncementClear: r,
|
|
126
|
+
dispatch: o
|
|
127
|
+
}),
|
|
128
|
+
n
|
|
129
|
+
));
|
|
130
|
+
}, ke = ({
|
|
131
|
+
children: e,
|
|
132
|
+
announcementTimeoutRef: n,
|
|
133
|
+
announcementDelay: t,
|
|
134
|
+
clearAnnouncementDelay: r,
|
|
135
|
+
clearAnnouncementTimeoutRef: o,
|
|
136
|
+
onAnnouncementClear: c,
|
|
137
|
+
dispatch: a
|
|
138
|
+
}) => {
|
|
139
|
+
clearTimeout(n.current), t ? n.current = setTimeout(j, t, {
|
|
140
|
+
children: e,
|
|
141
|
+
clearAnnouncementDelay: r,
|
|
142
|
+
clearAnnouncementTimeoutRef: o,
|
|
143
|
+
onAnnouncementClear: c,
|
|
144
|
+
dispatch: a
|
|
145
|
+
}) : j({
|
|
146
|
+
children: e,
|
|
147
|
+
clearAnnouncementDelay: r,
|
|
148
|
+
clearAnnouncementTimeoutRef: o,
|
|
149
|
+
onAnnouncementClear: c,
|
|
150
|
+
dispatch: a
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
function _e({
|
|
154
|
+
children: e,
|
|
155
|
+
className: n,
|
|
156
|
+
politeness: t,
|
|
157
|
+
role: r = null,
|
|
158
|
+
announcementDelay: o,
|
|
159
|
+
clearAnnouncementDelay: c,
|
|
160
|
+
onAnnouncementClear: a,
|
|
161
|
+
visible: u,
|
|
162
|
+
...l
|
|
163
|
+
}) {
|
|
164
|
+
const p = f(), m = f(), [T, v] = de(be, {
|
|
165
|
+
announcement: null
|
|
166
|
+
});
|
|
167
|
+
let x = t;
|
|
168
|
+
typeof x > "u" && (x = r ? Te[r] : "assertive"), N(() => {
|
|
169
|
+
ke({
|
|
170
|
+
announcementTimeoutRef: p,
|
|
171
|
+
announcementDelay: o,
|
|
172
|
+
children: e,
|
|
173
|
+
clearAnnouncementDelay: c,
|
|
174
|
+
clearAnnouncementTimeoutRef: m,
|
|
175
|
+
onAnnouncementClear: a,
|
|
176
|
+
dispatch: v
|
|
177
|
+
});
|
|
178
|
+
}, [
|
|
179
|
+
e,
|
|
180
|
+
o,
|
|
181
|
+
c,
|
|
182
|
+
a
|
|
183
|
+
]);
|
|
184
|
+
const d = s(n, {
|
|
185
|
+
"sr-only": !u
|
|
186
|
+
});
|
|
187
|
+
return /* @__PURE__ */ g(
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
"aria-live": x,
|
|
191
|
+
...r && { role: r },
|
|
192
|
+
className: d,
|
|
193
|
+
...l,
|
|
194
|
+
children: T.announcement
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
const Ee = (e) => {
|
|
199
|
+
let n = "";
|
|
200
|
+
if (typeof e == "number" || typeof e == "string")
|
|
201
|
+
n = "m-" + e;
|
|
202
|
+
else {
|
|
203
|
+
const t = [];
|
|
204
|
+
(e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), n = t.join(" ");
|
|
205
|
+
}
|
|
206
|
+
return n;
|
|
207
|
+
};
|
|
208
|
+
/*!
|
|
209
|
+
@versini/ui-private v1.4.10
|
|
210
|
+
© 2024 gizmette.com
|
|
211
|
+
*/
|
|
212
|
+
try {
|
|
213
|
+
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
214
|
+
version: "1.4.10",
|
|
215
|
+
buildTime: "09/18/2024 11:27 AM EDT",
|
|
216
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
217
|
+
license: "MIT"
|
|
218
|
+
});
|
|
219
|
+
} catch {
|
|
220
|
+
}
|
|
221
|
+
const Re = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Ce = ({
|
|
222
|
+
mode: e
|
|
223
|
+
}) => s({
|
|
224
|
+
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
225
|
+
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
226
|
+
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
227
|
+
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
228
|
+
}), Ne = ({
|
|
229
|
+
focusMode: e
|
|
230
|
+
}) => s("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
231
|
+
"focus:outline-focus-dark": e === "dark",
|
|
232
|
+
"focus:outline-focus-light": e === "light",
|
|
233
|
+
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
234
|
+
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
235
|
+
}), Ie = ({
|
|
236
|
+
noBorder: e,
|
|
237
|
+
error: n
|
|
238
|
+
}) => s("border-2", {
|
|
239
|
+
"border-border-dark": !e && !n,
|
|
240
|
+
"focus:border-border-dark": !e && n,
|
|
241
|
+
"border-border-error-dark": !e && n,
|
|
242
|
+
"border-transparent": e
|
|
243
|
+
}), Se = ({
|
|
244
|
+
disabled: e,
|
|
245
|
+
raw: n,
|
|
246
|
+
error: t,
|
|
247
|
+
mode: r
|
|
248
|
+
}) => {
|
|
249
|
+
if (n)
|
|
250
|
+
return "";
|
|
251
|
+
if (e)
|
|
252
|
+
return s("absolute px-2 cursor-not-allowed opacity-50 font-medium");
|
|
253
|
+
if (!t)
|
|
254
|
+
return s("absolute px-2 cursor-text font-medium", {
|
|
255
|
+
"text-copy-medium": r === "dark",
|
|
256
|
+
"text-copy-dark": r === "light",
|
|
257
|
+
"text-copy-dark dark:text-copy-medium": r === "system",
|
|
258
|
+
"text-copy-medium dark:text-copy-dark": r === "alt-system"
|
|
259
|
+
});
|
|
260
|
+
if (t)
|
|
261
|
+
return s("absolute px-2 cursor-text font-medium", {
|
|
262
|
+
"text-copy-medium": r === "dark",
|
|
263
|
+
"text-copy-error-dark": r === "light",
|
|
264
|
+
"text-copy-error-dark dark:text-copy-error-light": r === "system",
|
|
265
|
+
"text-copy-medium dark:text-copy-error-dark": r === "alt-system"
|
|
266
|
+
});
|
|
267
|
+
}, Oe = ({
|
|
268
|
+
error: e,
|
|
269
|
+
raw: n,
|
|
270
|
+
mode: t,
|
|
271
|
+
disabled: r
|
|
272
|
+
}) => {
|
|
273
|
+
if (n)
|
|
274
|
+
return "";
|
|
275
|
+
if (r)
|
|
276
|
+
return s(
|
|
277
|
+
D,
|
|
278
|
+
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
279
|
+
);
|
|
280
|
+
if (!e)
|
|
281
|
+
return s(D, "absolute px-2 font-medium", {
|
|
282
|
+
"text-copy-medium": t === "dark",
|
|
283
|
+
"text-copy-dark": t === "light",
|
|
284
|
+
"text-copy-dark dark:text-copy-medium": t === "system",
|
|
285
|
+
"text-copy-medium dark:text-copy-dark": t === "alt-system"
|
|
286
|
+
});
|
|
287
|
+
if (e)
|
|
288
|
+
return s(D, "absolute px-2 font-medium", {
|
|
289
|
+
"text-copy-error-light": t === "dark",
|
|
290
|
+
"text-copy-error-dark": t === "light",
|
|
291
|
+
"text-copy-error-dark dark:text-copy-error-light": t === "system",
|
|
292
|
+
"dark:text-copy-error-dark text-copy-error-light": t === "alt-system"
|
|
293
|
+
});
|
|
294
|
+
}, $e = ({
|
|
295
|
+
className: e,
|
|
296
|
+
textAreaClassName: n,
|
|
297
|
+
raw: t,
|
|
298
|
+
focusMode: r,
|
|
299
|
+
disabled: o,
|
|
300
|
+
noBorder: c,
|
|
301
|
+
error: a,
|
|
302
|
+
spacing: u,
|
|
303
|
+
mode: l
|
|
304
|
+
}) => {
|
|
305
|
+
const p = t ? e : s(
|
|
306
|
+
"relative flex w-full flex-col justify-center",
|
|
307
|
+
fe,
|
|
308
|
+
e,
|
|
309
|
+
Ee(u)
|
|
310
|
+
), m = t ? s(n) : s(
|
|
311
|
+
z,
|
|
312
|
+
n,
|
|
313
|
+
Re(),
|
|
314
|
+
Ce({ mode: l }),
|
|
315
|
+
Ne({ focusMode: r }),
|
|
316
|
+
Ie({
|
|
317
|
+
noBorder: c,
|
|
318
|
+
error: a
|
|
319
|
+
}),
|
|
320
|
+
{
|
|
321
|
+
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
322
|
+
}
|
|
323
|
+
), T = t ? void 0 : "sr-only", v = Se({
|
|
324
|
+
disabled: o,
|
|
325
|
+
raw: t,
|
|
326
|
+
error: a,
|
|
327
|
+
mode: l
|
|
328
|
+
}), x = Oe({
|
|
329
|
+
error: a,
|
|
330
|
+
raw: t,
|
|
331
|
+
mode: l,
|
|
332
|
+
disabled: o
|
|
333
|
+
}), d = t ? void 0 : s(pe, "absolute");
|
|
334
|
+
return {
|
|
335
|
+
wrapper: p,
|
|
336
|
+
textArea: m,
|
|
337
|
+
accessibleLabel: T,
|
|
338
|
+
visibleLabel: v,
|
|
339
|
+
helperText: x,
|
|
340
|
+
rightElement: d
|
|
341
|
+
};
|
|
342
|
+
}, Le = ({
|
|
343
|
+
scrollHeight: e,
|
|
344
|
+
currentHeight: n,
|
|
345
|
+
currentLabelOffset: t = 0,
|
|
346
|
+
currentHelperTextOffset: r = 0
|
|
347
|
+
}) => {
|
|
348
|
+
let a, u;
|
|
349
|
+
if (e > 0 && e !== n) {
|
|
350
|
+
const l = e - n, p = Math.abs(l / 24);
|
|
351
|
+
a = t + -1 * Math.sign(l) * (12 * p), u = r + Math.sign(l) * (12 * p);
|
|
352
|
+
}
|
|
353
|
+
return {
|
|
354
|
+
labelOffset: a,
|
|
355
|
+
helperTextOffset: u,
|
|
356
|
+
scrollHeight: e
|
|
357
|
+
};
|
|
358
|
+
}, we = se.forwardRef(
|
|
359
|
+
({
|
|
360
|
+
id: e,
|
|
361
|
+
name: n,
|
|
362
|
+
label: t,
|
|
363
|
+
error: r = !1,
|
|
364
|
+
raw: o = !1,
|
|
365
|
+
className: c,
|
|
366
|
+
textAreaClassName: a,
|
|
367
|
+
mode: u = "system",
|
|
368
|
+
focusMode: l = "system",
|
|
369
|
+
value: p,
|
|
370
|
+
defaultValue: m,
|
|
371
|
+
disabled: T = !1,
|
|
372
|
+
noBorder: v = !1,
|
|
373
|
+
labelId: x,
|
|
374
|
+
helperText: d = "",
|
|
375
|
+
helperTextOnFocus: I = !1,
|
|
376
|
+
rightElement: S,
|
|
377
|
+
onChange: H,
|
|
378
|
+
onFocus: M,
|
|
379
|
+
onBlur: F,
|
|
380
|
+
spacing: q,
|
|
381
|
+
...B
|
|
382
|
+
}, J) => {
|
|
383
|
+
const y = f(null), K = ye([J, y]), [Q, E] = xe(), O = f(80), P = f(-25), A = f(null), U = f(30), R = f(null), k = ge({ id: e, prefix: `${z}-` }), [Y, Z] = _(0), [ee, V] = _(
|
|
384
|
+
!!(!I && d)
|
|
385
|
+
), te = `${n} error, ${d}`, b = $e({
|
|
386
|
+
className: c,
|
|
387
|
+
textAreaClassName: a,
|
|
388
|
+
error: r,
|
|
389
|
+
raw: o,
|
|
390
|
+
focusMode: l,
|
|
391
|
+
disabled: T,
|
|
392
|
+
noBorder: v,
|
|
393
|
+
spacing: q,
|
|
394
|
+
mode: u
|
|
395
|
+
}), [h, ne] = Ae({
|
|
396
|
+
value: p,
|
|
397
|
+
initialControlledDelay: 20,
|
|
398
|
+
defaultValue: m,
|
|
399
|
+
onChange: (i) => {
|
|
400
|
+
H && H({
|
|
401
|
+
target: {
|
|
402
|
+
value: i
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}), re = (i) => {
|
|
407
|
+
ne(i.target.value);
|
|
408
|
+
}, oe = (i) => {
|
|
409
|
+
I && d && V(!0), M && M(i);
|
|
410
|
+
}, ae = (i) => {
|
|
411
|
+
I && d && !h && V(!1), F && F(i);
|
|
412
|
+
};
|
|
413
|
+
return C(() => {
|
|
414
|
+
E && E.width && Z(E.width + 18 + 10);
|
|
415
|
+
}, [E]), C(() => {
|
|
416
|
+
o || y && y.current && h !== void 0 && (y.current.style.height = "inherit", y.current.style.height = y.current.scrollHeight + "px");
|
|
417
|
+
}, [h, o]), C(() => {
|
|
418
|
+
o || setTimeout(() => {
|
|
419
|
+
var i;
|
|
420
|
+
(i = A == null ? void 0 : A.current) == null || i.style.setProperty(
|
|
421
|
+
"--av-text-area-wrapper-transition",
|
|
422
|
+
h ? "none" : "all 0.2s ease-out"
|
|
423
|
+
);
|
|
424
|
+
}, 0);
|
|
425
|
+
}, [h, o]), C(() => {
|
|
426
|
+
var i, $;
|
|
427
|
+
if (!o && y && y.current && h !== void 0) {
|
|
428
|
+
const { labelOffset: L, helperTextOffset: w, scrollHeight: ce } = Le({
|
|
429
|
+
scrollHeight: y.current.scrollHeight,
|
|
430
|
+
currentHeight: O.current,
|
|
431
|
+
currentLabelOffset: P.current,
|
|
432
|
+
currentHelperTextOffset: U.current
|
|
433
|
+
});
|
|
434
|
+
L && (P.current = L, (i = A == null ? void 0 : A.current) == null || i.style.setProperty(
|
|
435
|
+
"--av-text-area-label",
|
|
436
|
+
`${L}px`
|
|
437
|
+
)), w && (U.current = w, ($ = R == null ? void 0 : R.current) == null || $.style.setProperty(
|
|
438
|
+
"--av-text-area-helper-text",
|
|
439
|
+
`${w}px`
|
|
440
|
+
)), O.current = ce || O.current;
|
|
441
|
+
}
|
|
442
|
+
}, [h, o]), /* @__PURE__ */ le("div", { className: b.wrapper, children: [
|
|
443
|
+
/* @__PURE__ */ g(
|
|
444
|
+
"label",
|
|
445
|
+
{
|
|
446
|
+
htmlFor: k,
|
|
447
|
+
id: x,
|
|
448
|
+
className: b.accessibleLabel,
|
|
449
|
+
children: t
|
|
450
|
+
}
|
|
451
|
+
),
|
|
452
|
+
/* @__PURE__ */ g(
|
|
453
|
+
"textarea",
|
|
454
|
+
{
|
|
455
|
+
ref: K,
|
|
456
|
+
id: k,
|
|
457
|
+
name: n,
|
|
458
|
+
disabled: T,
|
|
459
|
+
placeholder: o ? void 0 : " ",
|
|
460
|
+
className: b.textArea,
|
|
461
|
+
rows: 1,
|
|
462
|
+
...d && { "aria-describedby": `${k}-helper` },
|
|
463
|
+
...r && { "aria-invalid": "true" },
|
|
464
|
+
...S && !o && { style: { paddingRight: Y } },
|
|
465
|
+
value: h,
|
|
466
|
+
onChange: re,
|
|
467
|
+
onFocus: oe,
|
|
468
|
+
onBlur: ae,
|
|
469
|
+
...B
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
!o && /* @__PURE__ */ g(
|
|
473
|
+
"label",
|
|
474
|
+
{
|
|
475
|
+
ref: A,
|
|
476
|
+
"aria-hidden": !0,
|
|
477
|
+
htmlFor: k,
|
|
478
|
+
className: b.visibleLabel,
|
|
479
|
+
children: t
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
ee && /* @__PURE__ */ g(
|
|
483
|
+
"div",
|
|
484
|
+
{
|
|
485
|
+
ref: R,
|
|
486
|
+
id: `${k}-helper`,
|
|
487
|
+
className: b.helperText,
|
|
488
|
+
children: d
|
|
489
|
+
}
|
|
490
|
+
),
|
|
491
|
+
S && /* @__PURE__ */ g(
|
|
492
|
+
"div",
|
|
493
|
+
{
|
|
494
|
+
ref: Q,
|
|
495
|
+
className: b.rightElement,
|
|
496
|
+
children: S
|
|
497
|
+
}
|
|
498
|
+
),
|
|
499
|
+
r && d && /* @__PURE__ */ g(_e, { politeness: "polite", clearAnnouncementDelay: 500, children: te })
|
|
500
|
+
] });
|
|
501
|
+
}
|
|
502
|
+
);
|
|
503
|
+
we.displayName = "TextArea";
|
|
504
|
+
export {
|
|
505
|
+
z as TEXT_AREA_CLASSNAME,
|
|
506
|
+
pe as TEXT_AREA_CONTROL_RIGHT_CLASSNAME,
|
|
507
|
+
D as TEXT_AREA_HELPER_TEXT_CLASSNAME,
|
|
508
|
+
fe as TEXT_AREA_WRAPPER_CLASSNAME,
|
|
509
|
+
we as TextArea
|
|
510
|
+
};
|
package/dist/style.css
ADDED
|
@@ -0,0 +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]{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}.absolute{position:absolute}.relative{position:relative}.m-0{margin:0}.m-1{margin:.25rem}.m-10{margin:2.5rem}.m-11{margin:2.75rem}.m-12{margin:3rem}.m-14{margin:3.5rem}.m-16{margin:4rem}.m-2{margin:.5rem}.m-20{margin:5rem}.m-24{margin:6rem}.m-28{margin:7rem}.m-3{margin:.75rem}.m-32{margin:8rem}.m-36{margin:9rem}.m-4{margin:1rem}.m-44{margin:11rem}.m-48{margin:12rem}.m-5{margin:1.25rem}.m-52{margin:13rem}.m-56{margin:14rem}.m-6{margin:1.5rem}.m-60{margin:15rem}.m-64{margin:16rem}.m-7{margin:1.75rem}.m-72{margin:18rem}.m-8{margin:2rem}.m-80{margin:20rem}.m-9{margin:2.25rem}.m-96{margin:24rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-11{margin-bottom:2.75rem}.mb-12{margin-bottom:3rem}.mb-14{margin-bottom:3.5rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-28{margin-bottom:7rem}.mb-3{margin-bottom:.75rem}.mb-32{margin-bottom:8rem}.mb-36{margin-bottom:9rem}.mb-4{margin-bottom:1rem}.mb-44{margin-bottom:11rem}.mb-48{margin-bottom:12rem}.mb-5{margin-bottom:1.25rem}.mb-52{margin-bottom:13rem}.mb-56{margin-bottom:14rem}.mb-6{margin-bottom:1.5rem}.mb-60{margin-bottom:15rem}.mb-64{margin-bottom:16rem}.mb-7{margin-bottom:1.75rem}.mb-72{margin-bottom:18rem}.mb-8{margin-bottom:2rem}.mb-80{margin-bottom:20rem}.mb-9{margin-bottom:2.25rem}.mb-96{margin-bottom:24rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-10{margin-left:2.5rem}.ml-11{margin-left:2.75rem}.ml-12{margin-left:3rem}.ml-14{margin-left:3.5rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.ml-24{margin-left:6rem}.ml-28{margin-left:7rem}.ml-3{margin-left:.75rem}.ml-32{margin-left:8rem}.ml-36{margin-left:9rem}.ml-4{margin-left:1rem}.ml-44{margin-left:11rem}.ml-48{margin-left:12rem}.ml-5{margin-left:1.25rem}.ml-52{margin-left:13rem}.ml-56{margin-left:14rem}.ml-6{margin-left:1.5rem}.ml-60{margin-left:15rem}.ml-64{margin-left:16rem}.ml-7{margin-left:1.75rem}.ml-72{margin-left:18rem}.ml-8{margin-left:2rem}.ml-80{margin-left:20rem}.ml-9{margin-left:2.25rem}.ml-96{margin-left:24rem}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-10{margin-right:2.5rem}.mr-11{margin-right:2.75rem}.mr-12{margin-right:3rem}.mr-14{margin-right:3.5rem}.mr-16{margin-right:4rem}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mr-24{margin-right:6rem}.mr-28{margin-right:7rem}.mr-3{margin-right:.75rem}.mr-32{margin-right:8rem}.mr-36{margin-right:9rem}.mr-4{margin-right:1rem}.mr-44{margin-right:11rem}.mr-48{margin-right:12rem}.mr-5{margin-right:1.25rem}.mr-52{margin-right:13rem}.mr-56{margin-right:14rem}.mr-6{margin-right:1.5rem}.mr-60{margin-right:15rem}.mr-64{margin-right:16rem}.mr-7{margin-right:1.75rem}.mr-72{margin-right:18rem}.mr-8{margin-right:2rem}.mr-80{margin-right:20rem}.mr-9{margin-right:2.25rem}.mr-96{margin-right:24rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-11{margin-top:2.75rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-28{margin-top:7rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-36{margin-top:9rem}.mt-4{margin-top:1rem}.mt-44{margin-top:11rem}.mt-48{margin-top:12rem}.mt-5{margin-top:1.25rem}.mt-52{margin-top:13rem}.mt-56{margin-top:14rem}.mt-6{margin-top:1.5rem}.mt-60{margin-top:15rem}.mt-64{margin-top:16rem}.mt-7{margin-top:1.75rem}.mt-72{margin-top:18rem}.mt-8{margin-top:2rem}.mt-80{margin-top:20rem}.mt-9{margin-top:2.25rem}.mt-96{margin-top:24rem}.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)))}.border-border-error-dark{--tw-border-opacity: 1;border-color:var(--av-border-error-dark, rgb(185 28 28 / var(--tw-border-opacity)))}.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)))}.bg-surface-lighter{--tw-bg-opacity: 1;background-color:var(--av-surface-lighter, rgb(226 232 240 / var(--tw-bg-opacity)))}.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)))}.text-copy-error-dark{--tw-text-opacity: 1;color:var(--av-copy-error-dark, rgb(185 28 28 / var(--tw-text-opacity)))}.text-copy-error-light{--tw-text-opacity: 1;color:var(--av-copy-error-light, rgb(239 68 68 / var(--tw-text-opacity)))}.text-copy-lighter{--tw-text-opacity: 1;color:var(--av-copy-lighter, rgb(255 255 255 / var(--tw-text-opacity)))}.text-copy-medium{--tw-text-opacity: 1;color:var(--av-copy-medium, rgb(148 163 184 / var(--tw-text-opacity)))}.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)))}.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)))}.dark\:bg-surface-lighter{--tw-bg-opacity: 1;background-color:var(--av-surface-lighter, rgb(226 232 240 / var(--tw-bg-opacity)))}.dark\:text-copy-dark{--tw-text-opacity: 1;color:var(--av-copy-dark, rgb(15 23 42 / var(--tw-text-opacity)))}.dark\:text-copy-error-dark{--tw-text-opacity: 1;color:var(--av-copy-error-dark, rgb(185 28 28 / var(--tw-text-opacity)))}.dark\:text-copy-error-light{--tw-text-opacity: 1;color:var(--av-copy-error-light, rgb(239 68 68 / var(--tw-text-opacity)))}.dark\:text-copy-lighter{--tw-text-opacity: 1;color:var(--av-copy-lighter, rgb(255 255 255 / var(--tw-text-opacity)))}.dark\:text-copy-medium{--tw-text-opacity: 1;color:var(--av-copy-medium, rgb(148 163 184 / var(--tw-text-opacity)))}.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/dist/style.js
ADDED
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@versini/ui-textarea",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": "Arno Versini",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/aversini/ui-components",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git@github.com:aversini/ui-components.git"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build:check": "tsc",
|
|
22
|
+
"build:js": "vite build",
|
|
23
|
+
"build:types": "tsup",
|
|
24
|
+
"build": "npm-run-all --serial clean build:check build:js build:types",
|
|
25
|
+
"clean": "rimraf dist tmp",
|
|
26
|
+
"dev:js": "vite build --watch --mode development",
|
|
27
|
+
"dev:types": "tsup --watch src",
|
|
28
|
+
"dev": "npm-run-all clean --parallel dev:js dev:types",
|
|
29
|
+
"lint": "biome lint src",
|
|
30
|
+
"start": "static-server dist --port 5173",
|
|
31
|
+
"test:coverage:ui": "vitest --coverage --ui",
|
|
32
|
+
"test:coverage": "vitest run --coverage",
|
|
33
|
+
"test:watch": "vitest",
|
|
34
|
+
"test": "vitest run"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"react": "^18.3.1",
|
|
38
|
+
"react-dom": "^18.3.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@versini/ui-styles": "1.9.8"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@tailwindcss/typography": "0.5.15",
|
|
45
|
+
"@versini/ui-hooks": "4.1.3",
|
|
46
|
+
"@versini/ui-private": "1.4.10",
|
|
47
|
+
"clsx": "2.1.1",
|
|
48
|
+
"tailwindcss": "3.4.12"
|
|
49
|
+
},
|
|
50
|
+
"sideEffects": [
|
|
51
|
+
"**/*.css"
|
|
52
|
+
],
|
|
53
|
+
"gitHead": "cfa6472810a5979b082e4e77c8d6898693b190dc"
|
|
54
|
+
}
|