@versini/ui-textarea 4.0.2 → 4.0.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.
- package/dist/components/TextArea/TextArea.js +14 -14
- package/dist/index.js +3 -3
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as g, jsxs as pe } from "react/jsx-runtime";
|
|
2
2
|
import ye, { useRef as f, useCallback as me, useEffect as S, useMemo as J, useState as _, useId as xe, useReducer as he, useLayoutEffect as L } from "react";
|
|
3
3
|
import c from "clsx";
|
|
4
|
-
const K = "av-text-area", Ae = "av-text-area-wrapper",
|
|
4
|
+
const K = "av-text-area", Ae = "av-text-area-wrapper", P = "av-text-area-helper-text", ge = "av-text-area__control--right", Te = "av-text-area__control--left";
|
|
5
5
|
function ke() {
|
|
6
6
|
const e = f(!1);
|
|
7
7
|
return S(() => (e.current = !0, () => {
|
|
@@ -183,13 +183,13 @@ function Oe({
|
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
185
|
/*!
|
|
186
|
-
@versini/ui-liveregion v2.0.
|
|
186
|
+
@versini/ui-liveregion v2.0.3
|
|
187
187
|
© 2025 gizmette.com
|
|
188
188
|
*/
|
|
189
189
|
try {
|
|
190
190
|
window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
|
|
191
|
-
version: "2.0.
|
|
192
|
-
buildTime: "
|
|
191
|
+
version: "2.0.3",
|
|
192
|
+
buildTime: "05/26/2025 03:48 PM EDT",
|
|
193
193
|
homepage: "https://github.com/aversini/ui-components",
|
|
194
194
|
license: "MIT"
|
|
195
195
|
});
|
|
@@ -264,24 +264,24 @@ const Ie = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
264
264
|
return "";
|
|
265
265
|
if (n)
|
|
266
266
|
return c(
|
|
267
|
-
|
|
267
|
+
P,
|
|
268
268
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
269
269
|
);
|
|
270
270
|
if (!e)
|
|
271
|
-
return c(
|
|
271
|
+
return c(P, "absolute px-2 font-medium", {
|
|
272
272
|
"text-copy-medium": t === "dark",
|
|
273
273
|
"text-copy-dark": t === "light",
|
|
274
274
|
"text-copy-dark dark:text-copy-medium": t === "system",
|
|
275
275
|
"text-copy-medium dark:text-copy-dark": t === "alt-system"
|
|
276
276
|
});
|
|
277
277
|
if (e)
|
|
278
|
-
return c(
|
|
278
|
+
return c(P, "absolute px-2 font-medium", {
|
|
279
279
|
"text-copy-error-light": t === "dark",
|
|
280
280
|
"text-copy-error-dark": t === "light",
|
|
281
281
|
"text-copy-error-dark dark:text-copy-error-light": t === "system",
|
|
282
282
|
"dark:text-copy-error-dark text-copy-error-light": t === "alt-system"
|
|
283
283
|
});
|
|
284
|
-
},
|
|
284
|
+
}, Pe = ({
|
|
285
285
|
className: e,
|
|
286
286
|
textAreaClassName: r,
|
|
287
287
|
raw: t,
|
|
@@ -332,7 +332,7 @@ const Ie = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
332
332
|
rightElement: C,
|
|
333
333
|
leftElement: h
|
|
334
334
|
};
|
|
335
|
-
},
|
|
335
|
+
}, Fe = ({
|
|
336
336
|
scrollHeight: e,
|
|
337
337
|
currentHeight: r,
|
|
338
338
|
currentLabelOffset: t = 0,
|
|
@@ -368,7 +368,7 @@ const Ie = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
368
368
|
helperTextOnFocus: C = !1,
|
|
369
369
|
rightElement: h,
|
|
370
370
|
leftElement: v,
|
|
371
|
-
onChange:
|
|
371
|
+
onChange: F,
|
|
372
372
|
onFocus: M,
|
|
373
373
|
onBlur: U,
|
|
374
374
|
...Z
|
|
@@ -376,7 +376,7 @@ const Ie = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
376
376
|
var B;
|
|
377
377
|
const x = f(null), te = be([ee, x]), [re, O] = W(), [ne, R] = W(), $ = f(80), V = f(-25), m = f(null), X = f(30), I = f(null), E = _e({ id: e, prefix: `${K}-` }), [j, ae] = _(0), [G, oe] = _(0), [se, z] = _(
|
|
378
378
|
!!(!C && d)
|
|
379
|
-
), ce = `${r} error, ${d}`, k =
|
|
379
|
+
), ce = `${r} error, ${d}`, k = Pe({
|
|
380
380
|
className: o,
|
|
381
381
|
textAreaClassName: s,
|
|
382
382
|
error: n,
|
|
@@ -392,7 +392,7 @@ const Ie = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
392
392
|
initialControlledDelay: 20,
|
|
393
393
|
defaultValue: y,
|
|
394
394
|
onChange: (i) => {
|
|
395
|
-
|
|
395
|
+
F && F({
|
|
396
396
|
target: {
|
|
397
397
|
value: i
|
|
398
398
|
}
|
|
@@ -422,7 +422,7 @@ const Ie = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
422
422
|
}, [A, a]), L(() => {
|
|
423
423
|
var i, w;
|
|
424
424
|
if (!a && x && x.current && A !== void 0) {
|
|
425
|
-
const { labelOffset: D, helperTextOffset: H, scrollHeight: fe } =
|
|
425
|
+
const { labelOffset: D, helperTextOffset: H, scrollHeight: fe } = Fe({
|
|
426
426
|
scrollHeight: x.current.scrollHeight,
|
|
427
427
|
currentHeight: $.current,
|
|
428
428
|
currentLabelOffset: V.current,
|
|
@@ -520,7 +520,7 @@ export {
|
|
|
520
520
|
K as TEXT_AREA_CLASSNAME,
|
|
521
521
|
Te as TEXT_AREA_CONTROL_LEFT_CLASSNAME,
|
|
522
522
|
ge as TEXT_AREA_CONTROL_RIGHT_CLASSNAME,
|
|
523
|
-
|
|
523
|
+
P as TEXT_AREA_HELPER_TEXT_CLASSNAME,
|
|
524
524
|
Ae as TEXT_AREA_WRAPPER_CLASSNAME,
|
|
525
525
|
Me as TextArea
|
|
526
526
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TEXT_AREA_CLASSNAME as T, TEXT_AREA_CONTROL_LEFT_CLASSNAME as R, TEXT_AREA_CONTROL_RIGHT_CLASSNAME as e, TEXT_AREA_HELPER_TEXT_CLASSNAME as S, TEXT_AREA_WRAPPER_CLASSNAME as i, TextArea as o } from "./components/TextArea/TextArea.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-textarea v4.0.
|
|
3
|
+
@versini/ui-textarea v4.0.3
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
|
|
8
|
-
version: "4.0.
|
|
9
|
-
buildTime: "
|
|
8
|
+
version: "4.0.3",
|
|
9
|
+
buildTime: "05/26/2025 03:48 PM EDT",
|
|
10
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
11
11
|
license: "MIT"
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-textarea",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"react-dom": "^18.3.1 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@versini/ui-types": "5.0.
|
|
42
|
+
"@versini/ui-types": "5.0.3"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@tailwindcss/typography": "0.5.16",
|
|
46
46
|
"@versini/ui-hooks": "4.7.3",
|
|
47
|
-
"@versini/ui-liveregion": "2.0.
|
|
47
|
+
"@versini/ui-liveregion": "2.0.3",
|
|
48
48
|
"clsx": "2.1.1",
|
|
49
|
-
"tailwindcss": "4.1.
|
|
49
|
+
"tailwindcss": "4.1.7"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": [
|
|
52
52
|
"**/*.css"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "863a399128080a19f2668e458d495110aa0f68f8"
|
|
55
55
|
}
|