@versini/ui-textinput 1.2.0 → 1.2.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as f, jsxs as W } from "react/jsx-runtime";
|
|
2
|
-
import G, { useRef as y, useEffect as R, useCallback as J, useState as L, useMemo as K, useId as Q, useReducer as Y, useLayoutEffect as
|
|
2
|
+
import G, { useRef as y, useEffect as R, useCallback as J, useState as L, useMemo as K, useId as Q, useReducer as Y, useLayoutEffect as P } from "react";
|
|
3
3
|
import c from "clsx";
|
|
4
4
|
const D = "av-text-input", be = "av-text-input-simple", Z = "av-text-input-wrapper", C = "av-text-input-helper-text";
|
|
5
5
|
function B() {
|
|
@@ -70,7 +70,7 @@ const w = "SET_ANNOUNCEMENT", M = "CLEAR_ANNOUNCEMENT", ne = {
|
|
|
70
70
|
r({
|
|
71
71
|
type: M
|
|
72
72
|
}), typeof e == "function" && e();
|
|
73
|
-
},
|
|
73
|
+
}, S = ({
|
|
74
74
|
children: e,
|
|
75
75
|
clearAnnouncementDelay: r,
|
|
76
76
|
clearAnnouncementTimeoutRef: t,
|
|
@@ -96,13 +96,13 @@ const w = "SET_ANNOUNCEMENT", M = "CLEAR_ANNOUNCEMENT", ne = {
|
|
|
96
96
|
onAnnouncementClear: o,
|
|
97
97
|
dispatch: a
|
|
98
98
|
}) => {
|
|
99
|
-
clearTimeout(r.current), t ? r.current = setTimeout(
|
|
99
|
+
clearTimeout(r.current), t ? r.current = setTimeout(S, t, {
|
|
100
100
|
children: e,
|
|
101
101
|
clearAnnouncementDelay: n,
|
|
102
102
|
clearAnnouncementTimeoutRef: l,
|
|
103
103
|
onAnnouncementClear: o,
|
|
104
104
|
dispatch: a
|
|
105
|
-
}) :
|
|
105
|
+
}) : S({
|
|
106
106
|
children: e,
|
|
107
107
|
clearAnnouncementDelay: n,
|
|
108
108
|
clearAnnouncementTimeoutRef: l,
|
|
@@ -172,7 +172,7 @@ const se = (e) => {
|
|
|
172
172
|
try {
|
|
173
173
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
174
174
|
version: "1.4.17",
|
|
175
|
-
buildTime: "
|
|
175
|
+
buildTime: "10/05/2024 07:22 PM EDT",
|
|
176
176
|
homepage: "https://github.com/aversini/ui-components",
|
|
177
177
|
license: "MIT"
|
|
178
178
|
});
|
|
@@ -341,7 +341,7 @@ const ue = ({
|
|
|
341
341
|
size: _ = "md",
|
|
342
342
|
...U
|
|
343
343
|
}, j) => {
|
|
344
|
-
const [F, T] = te(), [O, X] = L(0), k = re({ id: e, prefix: `${D}-` }), V = `${r} error, ${i}`,
|
|
344
|
+
const [F, T] = te(), [O, X] = L(0), k = re({ id: e, prefix: `${D}-` }), V = `${r} error, ${i}`, v = y(null), A = y(null), q = {
|
|
345
345
|
xs: { label: "-25px", helperText: "30px" },
|
|
346
346
|
sm: { label: "-29px", helperText: "34px" },
|
|
347
347
|
md: { label: "-33px", helperText: "38px" },
|
|
@@ -360,12 +360,12 @@ const ue = ({
|
|
|
360
360
|
size: _,
|
|
361
361
|
rightElementClassName: E
|
|
362
362
|
});
|
|
363
|
-
return
|
|
363
|
+
return P(() => {
|
|
364
364
|
T && T.width && X(T.width + 18 + 10);
|
|
365
|
-
}, [T]),
|
|
365
|
+
}, [T]), P(() => {
|
|
366
366
|
var N, $;
|
|
367
367
|
const { label: H, helperText: z } = q[_];
|
|
368
|
-
(N =
|
|
368
|
+
(N = v == null ? void 0 : v.current) == null || N.style.setProperty("--av-text-input-label", H), ($ = A == null ? void 0 : A.current) == null || $.style.setProperty(
|
|
369
369
|
"--av-text-input-helper-text",
|
|
370
370
|
z
|
|
371
371
|
);
|
|
@@ -398,7 +398,7 @@ const ue = ({
|
|
|
398
398
|
!l && !s && /* @__PURE__ */ f(
|
|
399
399
|
"label",
|
|
400
400
|
{
|
|
401
|
-
ref:
|
|
401
|
+
ref: v,
|
|
402
402
|
"aria-hidden": !0,
|
|
403
403
|
htmlFor: k,
|
|
404
404
|
className: h.visibleLabel,
|
|
@@ -408,7 +408,7 @@ const ue = ({
|
|
|
408
408
|
i && /* @__PURE__ */ f(
|
|
409
409
|
"div",
|
|
410
410
|
{
|
|
411
|
-
ref:
|
|
411
|
+
ref: A,
|
|
412
412
|
id: `${k}-helper`,
|
|
413
413
|
className: h.helperText,
|
|
414
414
|
children: i
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextInput as H, j as L } from "../../chunks/TextInput.
|
|
1
|
+
import { TextInput as H, j as L } from "../../chunks/TextInput.B9MxwV5w.js";
|
|
2
2
|
import { jsxs as j, Fragment as B, jsx as w } from "react/jsx-runtime";
|
|
3
3
|
import A, { useMemo as b, useState as _, useRef as m, useEffect as $ } from "react";
|
|
4
4
|
function q(r) {
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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.
|
|
2
|
-
import { TextInputMask as
|
|
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.B9MxwV5w.js";
|
|
2
|
+
import { TextInputMask as P } from "./components/TextInput/TextInputMask.js";
|
|
3
3
|
/*!
|
|
4
|
-
@versini/ui-textinput v1.2.
|
|
4
|
+
@versini/ui-textinput v1.2.1
|
|
5
5
|
© 2024 gizmette.com
|
|
6
6
|
*/
|
|
7
7
|
try {
|
|
8
8
|
window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
|
|
9
|
-
version: "1.2.
|
|
10
|
-
buildTime: "
|
|
9
|
+
version: "1.2.1",
|
|
10
|
+
buildTime: "10/05/2024 07:22 PM EDT",
|
|
11
11
|
homepage: "https://github.com/aversini/ui-components",
|
|
12
12
|
license: "MIT"
|
|
13
13
|
});
|
|
@@ -19,5 +19,5 @@ export {
|
|
|
19
19
|
o as TEXT_INPUT_SIMPLE_CLASSNAME,
|
|
20
20
|
t as TEXT_INPUT_WRAPPER_CLASSNAME,
|
|
21
21
|
N as TextInput,
|
|
22
|
-
|
|
22
|
+
P as TextInputMask
|
|
23
23
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-textinput",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@tailwindcss/typography": "0.5.15",
|
|
42
|
-
"@versini/ui-hooks": "4.2.
|
|
42
|
+
"@versini/ui-hooks": "4.2.2",
|
|
43
43
|
"@versini/ui-private": "1.4.17",
|
|
44
44
|
"clsx": "2.1.1",
|
|
45
45
|
"tailwindcss": "3.4.13"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"sideEffects": [
|
|
48
48
|
"**/*.css"
|
|
49
49
|
],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "cf5736be5f4a60df72f9517adf44f98769ff8d45"
|
|
51
51
|
}
|