@versini/ui-textinput 1.1.2 → 1.1.3
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 z } from "react/jsx-runtime";
|
|
2
|
-
import W, { useRef as y, useEffect as _, useCallback as G, useState as
|
|
2
|
+
import W, { useRef as y, useEffect as _, useCallback as G, useState as P, useMemo as J, useId as K, useReducer as Q, useLayoutEffect as $ } from "react";
|
|
3
3
|
import o from "clsx";
|
|
4
4
|
const L = "av-text-input", ge = "av-text-input-simple", Y = "av-text-input-wrapper", I = "av-text-input-helper-text";
|
|
5
5
|
function Z() {
|
|
@@ -19,7 +19,7 @@ const B = {
|
|
|
19
19
|
right: 0
|
|
20
20
|
};
|
|
21
21
|
function ee(e) {
|
|
22
|
-
const r = Z(), t = y(0), n = y(null), [l, c] =
|
|
22
|
+
const r = Z(), t = y(0), n = y(null), [l, c] = P(B), a = J(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((u) => {
|
|
23
23
|
const p = u[0];
|
|
24
24
|
p && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
25
25
|
n.current && r() && c(p.contentRect);
|
|
@@ -70,7 +70,7 @@ const D = "SET_ANNOUNCEMENT", w = "CLEAR_ANNOUNCEMENT", re = {
|
|
|
70
70
|
r({
|
|
71
71
|
type: w
|
|
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 D = "SET_ANNOUNCEMENT", w = "CLEAR_ANNOUNCEMENT", re = {
|
|
|
96
96
|
onAnnouncementClear: c,
|
|
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: c,
|
|
104
104
|
dispatch: a
|
|
105
|
-
}) :
|
|
105
|
+
}) : S({
|
|
106
106
|
children: e,
|
|
107
107
|
clearAnnouncementDelay: n,
|
|
108
108
|
clearAnnouncementTimeoutRef: l,
|
|
@@ -172,7 +172,7 @@ const oe = (e) => {
|
|
|
172
172
|
try {
|
|
173
173
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
174
174
|
version: "1.4.16",
|
|
175
|
-
buildTime: "09/
|
|
175
|
+
buildTime: "09/27/2024 10:43 AM EDT",
|
|
176
176
|
homepage: "https://github.com/aversini/ui-components",
|
|
177
177
|
license: "MIT"
|
|
178
178
|
});
|
|
@@ -339,7 +339,7 @@ const se = ({
|
|
|
339
339
|
size: E = "md",
|
|
340
340
|
...M
|
|
341
341
|
}, U) => {
|
|
342
|
-
const [j, T] = ee(), [F, O] =
|
|
342
|
+
const [j, T] = ee(), [F, O] = P(0), k = te({ id: e, prefix: `${L}-` }), X = `${r} error, ${i}`, A = y(null), v = y(null), V = {
|
|
343
343
|
xs: { label: "-25px", helperText: "30px" },
|
|
344
344
|
sm: { label: "-29px", helperText: "34px" },
|
|
345
345
|
md: { label: "-33px", helperText: "38px" },
|
|
@@ -362,7 +362,7 @@ const se = ({
|
|
|
362
362
|
}, [T]), $(() => {
|
|
363
363
|
var R, N;
|
|
364
364
|
const { label: q, helperText: H } = V[E];
|
|
365
|
-
(R =
|
|
365
|
+
(R = A == null ? void 0 : A.current) == null || R.style.setProperty("--av-text-input-label", q), (N = v == null ? void 0 : v.current) == null || N.style.setProperty(
|
|
366
366
|
"--av-text-input-helper-text",
|
|
367
367
|
H
|
|
368
368
|
);
|
|
@@ -395,7 +395,7 @@ const se = ({
|
|
|
395
395
|
!l && !g && /* @__PURE__ */ f(
|
|
396
396
|
"label",
|
|
397
397
|
{
|
|
398
|
-
ref:
|
|
398
|
+
ref: A,
|
|
399
399
|
"aria-hidden": !0,
|
|
400
400
|
htmlFor: k,
|
|
401
401
|
className: h.visibleLabel,
|
|
@@ -405,7 +405,7 @@ const se = ({
|
|
|
405
405
|
i && /* @__PURE__ */ f(
|
|
406
406
|
"div",
|
|
407
407
|
{
|
|
408
|
-
ref:
|
|
408
|
+
ref: v,
|
|
409
409
|
id: `${k}-helper`,
|
|
410
410
|
className: h.helperText,
|
|
411
411
|
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.Dc_5h5h2.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.Dc_5h5h2.js";
|
|
2
|
+
import { TextInputMask as S } from "./components/TextInput/TextInputMask.js";
|
|
3
3
|
/*!
|
|
4
|
-
@versini/ui-textinput v1.1.
|
|
4
|
+
@versini/ui-textinput v1.1.3
|
|
5
5
|
© 2024 gizmette.com
|
|
6
6
|
*/
|
|
7
7
|
try {
|
|
8
8
|
window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
|
|
9
|
-
version: "1.1.
|
|
10
|
-
buildTime: "09/
|
|
9
|
+
version: "1.1.3",
|
|
10
|
+
buildTime: "09/27/2024 10:44 AM 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
|
+
S as TextInputMask
|
|
23
23
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-textinput",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"react-dom": "^18.3.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@versini/ui-button": "1.1.
|
|
42
|
-
"@versini/ui-icons": "1.
|
|
41
|
+
"@versini/ui-button": "1.1.8",
|
|
42
|
+
"@versini/ui-icons": "1.13.0",
|
|
43
43
|
"@versini/ui-styles": "1.10.2"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"sideEffects": [
|
|
53
53
|
"**/*.css"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "04197d90dcc3ff0223fe3fbcaa663b62c76439fa"
|
|
56
56
|
}
|