@versini/ui-textinput 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/chunks/TextInput.Cd4led5l.js +396 -0
- package/dist/components/TextInput/TextInput.js +6 -0
- package/dist/components/TextInput/TextInputMask.js +98 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +23 -0
- package/dist/style.css +1 -0
- package/dist/style.js +0 -0
- package/package.json +56 -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
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { jsx as d, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import U, { useRef as k, useEffect as v, useCallback as j, useState as I, useMemo as F, useId as O, useReducer as X, useLayoutEffect as V } from "react";
|
|
3
|
+
import l from "clsx";
|
|
4
|
+
const R = "av-text-input", ie = "av-text-input-simple", q = "av-text-input-wrapper", A = "av-text-input-helper-text";
|
|
5
|
+
function z() {
|
|
6
|
+
const e = k(!1);
|
|
7
|
+
return v(() => (e.current = !0, () => {
|
|
8
|
+
e.current = !1;
|
|
9
|
+
}), []), j(() => e.current, []);
|
|
10
|
+
}
|
|
11
|
+
const H = {
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0,
|
|
14
|
+
width: 0,
|
|
15
|
+
height: 0,
|
|
16
|
+
top: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
bottom: 0,
|
|
19
|
+
right: 0
|
|
20
|
+
};
|
|
21
|
+
function W(e) {
|
|
22
|
+
const n = z(), t = k(0), r = k(null), [o, a] = I(H), c = F(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
|
|
23
|
+
const u = s[0];
|
|
24
|
+
u && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
25
|
+
r.current && n() && a(u.contentRect);
|
|
26
|
+
}));
|
|
27
|
+
}), [n]);
|
|
28
|
+
return v(() => (r.current && (c == null || c.observe(r.current, e)), () => {
|
|
29
|
+
c == null || c.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
30
|
+
}), [c, e]), [r, o];
|
|
31
|
+
}
|
|
32
|
+
function G(e) {
|
|
33
|
+
const n = O();
|
|
34
|
+
if (!e)
|
|
35
|
+
return n;
|
|
36
|
+
if (typeof e == "number" || typeof e == "string")
|
|
37
|
+
return `${e}${n}`;
|
|
38
|
+
if (typeof e == "object") {
|
|
39
|
+
const { id: t, prefix: r = "" } = e;
|
|
40
|
+
return typeof t == "number" || typeof t == "string" ? `${r}${t}` : `${r}${n}`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const _ = "SET_ANNOUNCEMENT", C = "CLEAR_ANNOUNCEMENT", J = {
|
|
44
|
+
alert: null,
|
|
45
|
+
alertdialog: null,
|
|
46
|
+
log: "polite",
|
|
47
|
+
marquee: null,
|
|
48
|
+
progressbar: null,
|
|
49
|
+
status: "polite",
|
|
50
|
+
timer: "assertive"
|
|
51
|
+
}, K = (e, n) => {
|
|
52
|
+
switch (n == null ? void 0 : n.type) {
|
|
53
|
+
case _:
|
|
54
|
+
return {
|
|
55
|
+
...e,
|
|
56
|
+
announcement: n.payload
|
|
57
|
+
};
|
|
58
|
+
case C:
|
|
59
|
+
return {
|
|
60
|
+
...e,
|
|
61
|
+
announcement: null
|
|
62
|
+
};
|
|
63
|
+
default:
|
|
64
|
+
return e;
|
|
65
|
+
}
|
|
66
|
+
}, Q = ({
|
|
67
|
+
onAnnouncementClear: e,
|
|
68
|
+
dispatch: n
|
|
69
|
+
}) => {
|
|
70
|
+
n({
|
|
71
|
+
type: C
|
|
72
|
+
}), typeof e == "function" && e();
|
|
73
|
+
}, E = ({
|
|
74
|
+
children: e,
|
|
75
|
+
clearAnnouncementDelay: n,
|
|
76
|
+
clearAnnouncementTimeoutRef: t,
|
|
77
|
+
onAnnouncementClear: r,
|
|
78
|
+
dispatch: o
|
|
79
|
+
}) => {
|
|
80
|
+
(t == null ? void 0 : t.current) !== null && clearTimeout(t.current), e !== null && o({
|
|
81
|
+
type: _,
|
|
82
|
+
payload: e
|
|
83
|
+
}), n && (t.current = setTimeout(
|
|
84
|
+
() => Q({
|
|
85
|
+
onAnnouncementClear: r,
|
|
86
|
+
dispatch: o
|
|
87
|
+
}),
|
|
88
|
+
n
|
|
89
|
+
));
|
|
90
|
+
}, Y = ({
|
|
91
|
+
children: e,
|
|
92
|
+
announcementTimeoutRef: n,
|
|
93
|
+
announcementDelay: t,
|
|
94
|
+
clearAnnouncementDelay: r,
|
|
95
|
+
clearAnnouncementTimeoutRef: o,
|
|
96
|
+
onAnnouncementClear: a,
|
|
97
|
+
dispatch: c
|
|
98
|
+
}) => {
|
|
99
|
+
clearTimeout(n.current), t ? n.current = setTimeout(E, t, {
|
|
100
|
+
children: e,
|
|
101
|
+
clearAnnouncementDelay: r,
|
|
102
|
+
clearAnnouncementTimeoutRef: o,
|
|
103
|
+
onAnnouncementClear: a,
|
|
104
|
+
dispatch: c
|
|
105
|
+
}) : E({
|
|
106
|
+
children: e,
|
|
107
|
+
clearAnnouncementDelay: r,
|
|
108
|
+
clearAnnouncementTimeoutRef: o,
|
|
109
|
+
onAnnouncementClear: a,
|
|
110
|
+
dispatch: c
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
function Z({
|
|
114
|
+
children: e,
|
|
115
|
+
className: n,
|
|
116
|
+
politeness: t,
|
|
117
|
+
role: r = null,
|
|
118
|
+
announcementDelay: o,
|
|
119
|
+
clearAnnouncementDelay: a,
|
|
120
|
+
onAnnouncementClear: c,
|
|
121
|
+
visible: s,
|
|
122
|
+
...u
|
|
123
|
+
}) {
|
|
124
|
+
const f = k(), y = k(), [h, g] = X(K, {
|
|
125
|
+
announcement: null
|
|
126
|
+
});
|
|
127
|
+
let p = t;
|
|
128
|
+
typeof p > "u" && (p = r ? J[r] : "assertive"), v(() => {
|
|
129
|
+
Y({
|
|
130
|
+
announcementTimeoutRef: f,
|
|
131
|
+
announcementDelay: o,
|
|
132
|
+
children: e,
|
|
133
|
+
clearAnnouncementDelay: a,
|
|
134
|
+
clearAnnouncementTimeoutRef: y,
|
|
135
|
+
onAnnouncementClear: c,
|
|
136
|
+
dispatch: g
|
|
137
|
+
});
|
|
138
|
+
}, [
|
|
139
|
+
e,
|
|
140
|
+
o,
|
|
141
|
+
a,
|
|
142
|
+
c
|
|
143
|
+
]);
|
|
144
|
+
const i = l(n, {
|
|
145
|
+
"sr-only": !s
|
|
146
|
+
});
|
|
147
|
+
return /* @__PURE__ */ d(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
"aria-live": p,
|
|
151
|
+
...r && { role: r },
|
|
152
|
+
className: i,
|
|
153
|
+
...u,
|
|
154
|
+
children: h.announcement
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
const B = (e) => {
|
|
159
|
+
let n = "";
|
|
160
|
+
if (typeof e == "number" || typeof e == "string")
|
|
161
|
+
n = "m-" + e;
|
|
162
|
+
else {
|
|
163
|
+
const t = [];
|
|
164
|
+
(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(" ");
|
|
165
|
+
}
|
|
166
|
+
return n;
|
|
167
|
+
};
|
|
168
|
+
/*!
|
|
169
|
+
@versini/ui-private v1.4.10
|
|
170
|
+
© 2024 gizmette.com
|
|
171
|
+
*/
|
|
172
|
+
try {
|
|
173
|
+
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
174
|
+
version: "1.4.10",
|
|
175
|
+
buildTime: "09/18/2024 10:59 AM EDT",
|
|
176
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
177
|
+
license: "MIT"
|
|
178
|
+
});
|
|
179
|
+
} catch {
|
|
180
|
+
}
|
|
181
|
+
const ee = ({
|
|
182
|
+
mode: e
|
|
183
|
+
}) => l({
|
|
184
|
+
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
185
|
+
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
186
|
+
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
187
|
+
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
188
|
+
}), te = ({
|
|
189
|
+
focusMode: e
|
|
190
|
+
}) => l("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
191
|
+
"focus:outline-focus-dark": e === "dark",
|
|
192
|
+
"focus:outline-focus-light": e === "light",
|
|
193
|
+
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
194
|
+
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
195
|
+
}), ne = ({
|
|
196
|
+
noBorder: e,
|
|
197
|
+
error: n
|
|
198
|
+
}) => l("border-2", {
|
|
199
|
+
"border-border-dark": !e && !n,
|
|
200
|
+
"focus:border-border-dark": !e && n,
|
|
201
|
+
"border-border-error-dark": !e && n,
|
|
202
|
+
"border-transparent": e
|
|
203
|
+
}), re = ({
|
|
204
|
+
disabled: e,
|
|
205
|
+
raw: n,
|
|
206
|
+
error: t,
|
|
207
|
+
mode: r
|
|
208
|
+
}) => {
|
|
209
|
+
if (n)
|
|
210
|
+
return "";
|
|
211
|
+
if (e)
|
|
212
|
+
return l("absolute px-2 cursor-not-allowed opacity-50 font-medium");
|
|
213
|
+
if (!t)
|
|
214
|
+
return l("absolute px-2 cursor-text font-medium", {
|
|
215
|
+
"text-copy-lighter": r === "dark",
|
|
216
|
+
"text-copy-dark": r === "light",
|
|
217
|
+
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
218
|
+
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
219
|
+
});
|
|
220
|
+
if (t)
|
|
221
|
+
return l("absolute px-2 cursor-text font-medium", {
|
|
222
|
+
"text-copy-lighter": r === "dark",
|
|
223
|
+
"text-copy-error-dark": r === "light",
|
|
224
|
+
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
225
|
+
"text-copy-lighter dark:text-copy-error-dark": r === "alt-system"
|
|
226
|
+
});
|
|
227
|
+
}, oe = ({
|
|
228
|
+
error: e,
|
|
229
|
+
raw: n,
|
|
230
|
+
mode: t,
|
|
231
|
+
disabled: r
|
|
232
|
+
}) => {
|
|
233
|
+
if (n)
|
|
234
|
+
return "";
|
|
235
|
+
if (r)
|
|
236
|
+
return l(
|
|
237
|
+
A,
|
|
238
|
+
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
239
|
+
);
|
|
240
|
+
if (!e)
|
|
241
|
+
return l(A, "absolute px-2 font-medium", {
|
|
242
|
+
"text-copy-lighter": t === "dark",
|
|
243
|
+
"text-copy-dark": t === "light",
|
|
244
|
+
"text-copy-dark dark:text-copy-lighter": t === "system",
|
|
245
|
+
"text-copy-lighter dark:text-copy-dark": t === "alt-system"
|
|
246
|
+
});
|
|
247
|
+
if (e)
|
|
248
|
+
return l(A, "absolute px-2 font-medium", {
|
|
249
|
+
"text-copy-error-light bg-surface-darker": t === "dark",
|
|
250
|
+
"text-copy-error-dark": t === "light",
|
|
251
|
+
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": t === "system",
|
|
252
|
+
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": t === "alt-system"
|
|
253
|
+
});
|
|
254
|
+
}, ce = ({
|
|
255
|
+
className: e,
|
|
256
|
+
inputClassName: n,
|
|
257
|
+
raw: t,
|
|
258
|
+
disabled: r,
|
|
259
|
+
noBorder: o,
|
|
260
|
+
error: a,
|
|
261
|
+
spacing: c,
|
|
262
|
+
mode: s,
|
|
263
|
+
focusMode: u
|
|
264
|
+
}) => {
|
|
265
|
+
const f = t ? e : l(
|
|
266
|
+
"relative flex w-full flex-col justify-center",
|
|
267
|
+
q,
|
|
268
|
+
e,
|
|
269
|
+
B(c)
|
|
270
|
+
), y = t ? l(n) : l(
|
|
271
|
+
R,
|
|
272
|
+
n,
|
|
273
|
+
"h-12 rounded-md px-4 text-base",
|
|
274
|
+
ee({ mode: s }),
|
|
275
|
+
te({ focusMode: u }),
|
|
276
|
+
ne({ noBorder: o, error: a }),
|
|
277
|
+
{
|
|
278
|
+
"disabled:cursor-not-allowed disabled:opacity-50": r
|
|
279
|
+
}
|
|
280
|
+
), h = t ? void 0 : "sr-only", g = re({
|
|
281
|
+
disabled: r,
|
|
282
|
+
raw: t,
|
|
283
|
+
error: a,
|
|
284
|
+
mode: s
|
|
285
|
+
}), p = oe({
|
|
286
|
+
error: a,
|
|
287
|
+
raw: t,
|
|
288
|
+
mode: s,
|
|
289
|
+
disabled: r
|
|
290
|
+
});
|
|
291
|
+
return {
|
|
292
|
+
wrapper: f,
|
|
293
|
+
input: y,
|
|
294
|
+
accessibleLabel: h,
|
|
295
|
+
visibleLabel: g,
|
|
296
|
+
helperText: p,
|
|
297
|
+
rightElement: t ? void 0 : "absolute right-3"
|
|
298
|
+
};
|
|
299
|
+
}, ae = U.forwardRef(
|
|
300
|
+
({
|
|
301
|
+
id: e,
|
|
302
|
+
name: n,
|
|
303
|
+
label: t,
|
|
304
|
+
error: r = !1,
|
|
305
|
+
raw: o = !1,
|
|
306
|
+
className: a,
|
|
307
|
+
inputClassName: c,
|
|
308
|
+
mode: s = "system",
|
|
309
|
+
focusMode: u = "system",
|
|
310
|
+
disabled: f = !1,
|
|
311
|
+
noBorder: y = !1,
|
|
312
|
+
labelId: h,
|
|
313
|
+
labelHidden: g = !1,
|
|
314
|
+
type: p = "text",
|
|
315
|
+
helperText: i = "",
|
|
316
|
+
rightElement: T,
|
|
317
|
+
spacing: N,
|
|
318
|
+
...$
|
|
319
|
+
}, S) => {
|
|
320
|
+
const [L, b] = W(), [P, D] = I(0), x = G({ id: e, prefix: `${R}-` }), w = `${n} error, ${i}`, m = ce({
|
|
321
|
+
className: a,
|
|
322
|
+
inputClassName: c,
|
|
323
|
+
error: r,
|
|
324
|
+
raw: o,
|
|
325
|
+
focusMode: u,
|
|
326
|
+
disabled: f,
|
|
327
|
+
noBorder: y,
|
|
328
|
+
spacing: N,
|
|
329
|
+
mode: s
|
|
330
|
+
});
|
|
331
|
+
return V(() => {
|
|
332
|
+
b && b.width && D(b.width + 18 + 10);
|
|
333
|
+
}, [b]), /* @__PURE__ */ M("div", { className: m.wrapper, children: [
|
|
334
|
+
/* @__PURE__ */ d(
|
|
335
|
+
"label",
|
|
336
|
+
{
|
|
337
|
+
htmlFor: x,
|
|
338
|
+
id: h,
|
|
339
|
+
className: m.accessibleLabel,
|
|
340
|
+
children: t
|
|
341
|
+
}
|
|
342
|
+
),
|
|
343
|
+
/* @__PURE__ */ d(
|
|
344
|
+
"input",
|
|
345
|
+
{
|
|
346
|
+
ref: S,
|
|
347
|
+
id: x,
|
|
348
|
+
name: n,
|
|
349
|
+
type: p,
|
|
350
|
+
disabled: f,
|
|
351
|
+
placeholder: o ? void 0 : " ",
|
|
352
|
+
className: m.input,
|
|
353
|
+
...i && { "aria-describedby": `${x}-helper` },
|
|
354
|
+
...r && { "aria-invalid": "true" },
|
|
355
|
+
...T && !o && { style: { paddingRight: P } },
|
|
356
|
+
...$
|
|
357
|
+
}
|
|
358
|
+
),
|
|
359
|
+
!o && !g && /* @__PURE__ */ d(
|
|
360
|
+
"label",
|
|
361
|
+
{
|
|
362
|
+
"aria-hidden": !0,
|
|
363
|
+
htmlFor: x,
|
|
364
|
+
className: m.visibleLabel,
|
|
365
|
+
children: t
|
|
366
|
+
}
|
|
367
|
+
),
|
|
368
|
+
i && /* @__PURE__ */ d(
|
|
369
|
+
"div",
|
|
370
|
+
{
|
|
371
|
+
id: `${x}-helper`,
|
|
372
|
+
className: m.helperText,
|
|
373
|
+
children: i
|
|
374
|
+
}
|
|
375
|
+
),
|
|
376
|
+
T && /* @__PURE__ */ d(
|
|
377
|
+
"div",
|
|
378
|
+
{
|
|
379
|
+
ref: L,
|
|
380
|
+
className: m.rightElement,
|
|
381
|
+
children: T
|
|
382
|
+
}
|
|
383
|
+
),
|
|
384
|
+
r && i && /* @__PURE__ */ d(Z, { politeness: "polite", clearAnnouncementDelay: 500, children: w })
|
|
385
|
+
] });
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
ae.displayName = "TextInput";
|
|
389
|
+
export {
|
|
390
|
+
R as TEXT_INPUT_CLASSNAME,
|
|
391
|
+
A as TEXT_INPUT_HELPER_TEXT_CLASSNAME,
|
|
392
|
+
ie as TEXT_INPUT_SIMPLE_CLASSNAME,
|
|
393
|
+
q as TEXT_INPUT_WRAPPER_CLASSNAME,
|
|
394
|
+
ae as TextInput,
|
|
395
|
+
Z as j
|
|
396
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { TextInput as H, j as L } from "../../chunks/TextInput.Cd4led5l.js";
|
|
2
|
+
import { jsxs as j, Fragment as B, jsx as w } from "react/jsx-runtime";
|
|
3
|
+
import A, { useMemo as b, useState as _, useRef as m, useEffect as $ } from "react";
|
|
4
|
+
function q(r) {
|
|
5
|
+
return b(() => r.every((t) => t == null) ? () => {
|
|
6
|
+
} : (t) => {
|
|
7
|
+
r.forEach((n) => {
|
|
8
|
+
typeof n == "function" ? n(t) : n != null && (n.current = t);
|
|
9
|
+
});
|
|
10
|
+
}, r);
|
|
11
|
+
}
|
|
12
|
+
const z = 500, G = 5e3, J = 2e4, K = A.forwardRef(
|
|
13
|
+
({
|
|
14
|
+
name: r,
|
|
15
|
+
disabled: t,
|
|
16
|
+
label: n,
|
|
17
|
+
labelHidden: k,
|
|
18
|
+
onMaskChange: o,
|
|
19
|
+
onChange: d,
|
|
20
|
+
onBlur: T,
|
|
21
|
+
onFocus: p,
|
|
22
|
+
onTextInputMaskBlur: f,
|
|
23
|
+
rightElement: x,
|
|
24
|
+
spacing: O,
|
|
25
|
+
...U
|
|
26
|
+
}, E) => {
|
|
27
|
+
const [h, g] = _(!0), [a, R] = _({
|
|
28
|
+
message: null,
|
|
29
|
+
politeness: null
|
|
30
|
+
}), u = m(!0), i = m(), I = m(null), C = q([E, I]), S = h ? "Show" : "Hide", c = () => {
|
|
31
|
+
clearTimeout(i.current), u.current || (i.current = window.setTimeout(() => {
|
|
32
|
+
u.current = !0, g(!0), R({
|
|
33
|
+
announcementTimeout: G,
|
|
34
|
+
politeness: "polite",
|
|
35
|
+
message: `${n} hiding characters`
|
|
36
|
+
}), o && o(!0);
|
|
37
|
+
}, J));
|
|
38
|
+
}, v = (e) => {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
const s = !u.current;
|
|
41
|
+
u.current = s, c(), g(s), R({
|
|
42
|
+
announcementTimeout: z,
|
|
43
|
+
politeness: "assertive",
|
|
44
|
+
message: s ? "Characters hidden" : "Characters showing"
|
|
45
|
+
}), o && o(s);
|
|
46
|
+
}, M = (e) => {
|
|
47
|
+
var N;
|
|
48
|
+
const { relatedTarget: s } = e, l = (N = I.current) == null ? void 0 : N.parentElement;
|
|
49
|
+
l != null && l.contains(s) || f && f();
|
|
50
|
+
}, y = (e) => {
|
|
51
|
+
c(), T && T(e), M(e);
|
|
52
|
+
}, D = (e) => {
|
|
53
|
+
c(), p && p(e);
|
|
54
|
+
}, F = (e) => {
|
|
55
|
+
c(), d && d(e);
|
|
56
|
+
};
|
|
57
|
+
return $(() => () => {
|
|
58
|
+
clearTimeout(i.current);
|
|
59
|
+
}, []), /* @__PURE__ */ j(B, { children: [
|
|
60
|
+
/* @__PURE__ */ w(
|
|
61
|
+
H,
|
|
62
|
+
{
|
|
63
|
+
ref: C,
|
|
64
|
+
name: r,
|
|
65
|
+
label: n,
|
|
66
|
+
labelHidden: k,
|
|
67
|
+
type: h ? "password" : "text",
|
|
68
|
+
disabled: t,
|
|
69
|
+
spacing: O,
|
|
70
|
+
onBlur: y,
|
|
71
|
+
onFocus: D,
|
|
72
|
+
onChange: F,
|
|
73
|
+
rightElement: A.cloneElement(x, {
|
|
74
|
+
ref: E,
|
|
75
|
+
label: S,
|
|
76
|
+
onClick: v,
|
|
77
|
+
onBlur: M,
|
|
78
|
+
disabled: t
|
|
79
|
+
}),
|
|
80
|
+
...U
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ w(
|
|
84
|
+
L,
|
|
85
|
+
{
|
|
86
|
+
role: "status",
|
|
87
|
+
politeness: a.politeness,
|
|
88
|
+
clearAnnouncementDelay: a.announcementTimeout,
|
|
89
|
+
children: a.message
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
] });
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
K.displayName = "TextInputMask";
|
|
96
|
+
export {
|
|
97
|
+
K as TextInputMask
|
|
98
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as _versini_ui_private_dist_utilities from '@versini/ui-private/dist/utilities';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const TEXT_INPUT_CLASSNAME = "av-text-input";
|
|
5
|
+
declare const TEXT_INPUT_SIMPLE_CLASSNAME = "av-text-input-simple";
|
|
6
|
+
declare const TEXT_INPUT_WRAPPER_CLASSNAME = "av-text-input-wrapper";
|
|
7
|
+
declare const TEXT_INPUT_HELPER_TEXT_CLASSNAME = "av-text-input-helper-text";
|
|
8
|
+
|
|
9
|
+
declare const TextInput: React.ForwardRefExoticComponent<{
|
|
10
|
+
rightElement?: React.ReactElement;
|
|
11
|
+
} & {
|
|
12
|
+
label: string;
|
|
13
|
+
name: string;
|
|
14
|
+
error?: boolean;
|
|
15
|
+
focusMode?: "dark" | "light" | "system" | "alt-system";
|
|
16
|
+
helperText?: string;
|
|
17
|
+
inputClassName?: string;
|
|
18
|
+
labelHidden?: boolean;
|
|
19
|
+
labelId?: string;
|
|
20
|
+
mode?: "dark" | "light" | "system" | "alt-system";
|
|
21
|
+
noBorder?: boolean;
|
|
22
|
+
raw?: boolean;
|
|
23
|
+
} & _versini_ui_private_dist_utilities.SpacingProps & React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
|
24
|
+
|
|
25
|
+
declare const TextInputMask: React.ForwardRefExoticComponent<{
|
|
26
|
+
rightElement: React.ReactElement;
|
|
27
|
+
onMaskChange?: (masked: boolean) => void;
|
|
28
|
+
onTextInputMaskBlur?: () => void;
|
|
29
|
+
} & {
|
|
30
|
+
label: string;
|
|
31
|
+
name: string;
|
|
32
|
+
error?: boolean;
|
|
33
|
+
focusMode?: "dark" | "light" | "system" | "alt-system";
|
|
34
|
+
helperText?: string;
|
|
35
|
+
inputClassName?: string;
|
|
36
|
+
labelHidden?: boolean;
|
|
37
|
+
labelId?: string;
|
|
38
|
+
mode?: "dark" | "light" | "system" | "alt-system";
|
|
39
|
+
noBorder?: boolean;
|
|
40
|
+
raw?: boolean;
|
|
41
|
+
} & _versini_ui_private_dist_utilities.SpacingProps & React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
|
42
|
+
|
|
43
|
+
export { TEXT_INPUT_CLASSNAME, TEXT_INPUT_HELPER_TEXT_CLASSNAME, TEXT_INPUT_SIMPLE_CLASSNAME, TEXT_INPUT_WRAPPER_CLASSNAME, TextInput, TextInputMask };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TEXT_INPUT_CLASSNAME as I, TEXT_INPUT_HELPER_TEXT_CLASSNAME as e, TEXT_INPUT_SIMPLE_CLASSNAME as o, TEXT_INPUT_WRAPPER_CLASSNAME as t, TextInput as N } from "./chunks/TextInput.Cd4led5l.js";
|
|
2
|
+
import { TextInputMask as S } from "./components/TextInput/TextInputMask.js";
|
|
3
|
+
/*!
|
|
4
|
+
@versini/ui-textinput v0.0.0
|
|
5
|
+
© 2024 gizmette.com
|
|
6
|
+
*/
|
|
7
|
+
try {
|
|
8
|
+
window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
|
|
9
|
+
version: "0.0.0",
|
|
10
|
+
buildTime: "09/18/2024 11:00 AM EDT",
|
|
11
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
12
|
+
license: "MIT"
|
|
13
|
+
});
|
|
14
|
+
} catch {
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
I as TEXT_INPUT_CLASSNAME,
|
|
18
|
+
e as TEXT_INPUT_HELPER_TEXT_CLASSNAME,
|
|
19
|
+
o as TEXT_INPUT_SIMPLE_CLASSNAME,
|
|
20
|
+
t as TEXT_INPUT_WRAPPER_CLASSNAME,
|
|
21
|
+
N as TextInput,
|
|
22
|
+
S as TextInputMask
|
|
23
|
+
};
|
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-input-wrapper label[aria-hidden=true]{transform:translate(12px) scale(1);transform-origin:top left;transition:var(--av-text-input-wrapper-transition, all .2s ease-out)}.av-text-input:focus+label[aria-hidden=true],.av-text-input:not(:placeholder-shown)+label[aria-hidden=true]{transform:translate(12px,var(--av-text-input-label, -37px)) scale(.75)}.av-text-input-helper-text{transform:translate(12px,var(--av-text-input-helper-text, 44px)) scale(.75);transform-origin:top left}@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}.right-3{right:.75rem}.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}.hidden{display:none}.size-5{width:1.25rem;height:1.25rem}.h-12{height:3rem}.w-full{width:100%}.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}.flex-col{flex-direction:column}.justify-center{justify-content:center}.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}.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)))}.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)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.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\: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,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@versini/ui-textinput",
|
|
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-button": "1.1.1",
|
|
42
|
+
"@versini/ui-icons": "1.12.2",
|
|
43
|
+
"@versini/ui-styles": "1.9.8"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@tailwindcss/typography": "0.5.15",
|
|
47
|
+
"@versini/ui-hooks": "4.1.3",
|
|
48
|
+
"@versini/ui-private": "1.4.10",
|
|
49
|
+
"clsx": "2.1.1",
|
|
50
|
+
"tailwindcss": "3.4.12"
|
|
51
|
+
},
|
|
52
|
+
"sideEffects": [
|
|
53
|
+
"**/*.css"
|
|
54
|
+
],
|
|
55
|
+
"gitHead": "34c0cf3254dc18a88bcab992a066c53e59f80e3f"
|
|
56
|
+
}
|