@versini/ui-textarea 6.0.0 → 6.0.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.
- package/dist/index.js +14 -14
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-textarea v6.0.
|
|
2
|
+
@versini/ui-textarea v6.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_TEXTAREA__) {
|
|
7
7
|
window.__VERSINI_UI_TEXTAREA__ = {
|
|
8
|
-
version: "6.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "6.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:21 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-textarea",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -67,7 +67,7 @@ const getTextAreaColorClasses = ({ mode })=>{
|
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
69
|
const getTextAreaFocusClasses = ({ focusMode })=>{
|
|
70
|
-
return clsx("focus:outline
|
|
70
|
+
return clsx("focus:outline-2 focus:outline-offset-2", {
|
|
71
71
|
"focus:outline-focus-dark": focusMode === "dark",
|
|
72
72
|
"focus:outline-focus-light": focusMode === "light",
|
|
73
73
|
"focus:outline-focus-light dark:focus:outline-focus-dark": focusMode === "alt-system",
|
|
@@ -88,28 +88,28 @@ const getTextAreaLabelClasses = ({ disabled, raw, error, mode, leftElement, righ
|
|
|
88
88
|
}
|
|
89
89
|
if (disabled) {
|
|
90
90
|
return clsx("transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium", {
|
|
91
|
-
"translate-x-
|
|
91
|
+
"translate-x-2.5": rightElement === true && !leftElement || !rightElement && !leftElement
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
if (!error) {
|
|
95
95
|
return clsx("absolute px-2 cursor-text font-medium transform translate-y-0 scale-100", {
|
|
96
|
-
"translate-x-
|
|
96
|
+
"translate-x-2.5": rightElement === true && !leftElement || !rightElement && !leftElement,
|
|
97
97
|
"text-copy-medium": mode === "dark",
|
|
98
98
|
"text-copy-dark": mode === "light",
|
|
99
99
|
"text-copy-dark dark:text-copy-medium": mode === "system",
|
|
100
100
|
"text-copy-medium dark:text-copy-dark": mode === "alt-system"
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
-
if (error) {
|
|
103
|
+
/* v8 ignore start - error state edge case */ if (error) {
|
|
104
104
|
return clsx("absolute px-2 cursor-text font-medium transform translate-y-0 scale-100", {
|
|
105
|
-
"translate-x-
|
|
105
|
+
"translate-x-2.5": rightElement === true && !leftElement || !rightElement && !leftElement,
|
|
106
106
|
"text-copy-medium": mode === "dark",
|
|
107
107
|
"text-copy-error-dark": mode === "light",
|
|
108
108
|
"text-copy-error-dark dark:text-copy-error-light": mode === "system",
|
|
109
109
|
"text-copy-medium dark:text-copy-error-dark": mode === "alt-system"
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
};
|
|
112
|
+
/* v8 ignore stop */ };
|
|
113
113
|
const getTextAreaHelperTextClasses = ({ error, raw, mode, disabled })=>{
|
|
114
114
|
if (raw) {
|
|
115
115
|
return "";
|
|
@@ -125,7 +125,7 @@ const getTextAreaHelperTextClasses = ({ error, raw, mode, disabled })=>{
|
|
|
125
125
|
"text-copy-medium dark:text-copy-dark": mode === "alt-system"
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
if (error) {
|
|
128
|
+
/* v8 ignore start - error state edge case */ if (error) {
|
|
129
129
|
return clsx(TEXT_AREA_HELPER_TEXT_CLASSNAME, "absolute px-2 font-medium", {
|
|
130
130
|
"text-copy-error-light": mode === "dark",
|
|
131
131
|
"text-copy-error-dark": mode === "light",
|
|
@@ -133,7 +133,7 @@ const getTextAreaHelperTextClasses = ({ error, raw, mode, disabled })=>{
|
|
|
133
133
|
"dark:text-copy-error-dark text-copy-error-light": mode === "alt-system"
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
};
|
|
136
|
+
/* v8 ignore stop */ };
|
|
137
137
|
const getTextAreaClasses = ({ className, textAreaClassName, raw, focusMode, disabled, noBorder, error, mode, leftElement, rightElement })=>{
|
|
138
138
|
const wrapper = raw ? className : clsx("relative flex w-full flex-col justify-center", TEXT_AREA_WRAPPER_CLASSNAME, className);
|
|
139
139
|
const textArea = raw ? clsx(textAreaClassName) : clsx(TEXT_AREA_CLASSNAME, textAreaClassName, getTextAreaBaseClasses(), getTextAreaColorClasses({
|
|
@@ -352,15 +352,15 @@ const TextArea = /*#__PURE__*/ react.forwardRef(({ id, name, label, error = fals
|
|
|
352
352
|
currentLabelOffset: labelOffsetRef.current,
|
|
353
353
|
currentHelperTextOffset: helperTextOffsetRef.current
|
|
354
354
|
});
|
|
355
|
-
/* v8 ignore
|
|
355
|
+
/* v8 ignore start */ if (labelOffset) {
|
|
356
356
|
labelOffsetRef.current = labelOffset;
|
|
357
357
|
labelRef?.current?.style.setProperty("--av-text-area-label", `${labelOffset}px`);
|
|
358
358
|
}
|
|
359
|
-
/* v8 ignore
|
|
359
|
+
/* v8 ignore stop */ /* v8 ignore start */ if (helperTextOffset) {
|
|
360
360
|
helperTextOffsetRef.current = helperTextOffset;
|
|
361
361
|
helperTextRef?.current?.style.setProperty("--av-text-area-helper-text", `${helperTextOffset}px`);
|
|
362
362
|
}
|
|
363
|
-
textAreaHeightRef.current = scrollHeight || textAreaHeightRef.current;
|
|
363
|
+
/* v8 ignore stop */ textAreaHeightRef.current = scrollHeight || textAreaHeightRef.current;
|
|
364
364
|
}
|
|
365
365
|
}, [
|
|
366
366
|
userInput,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-textarea",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@tailwindcss/typography": "0.5.19",
|
|
45
|
-
"@versini/ui-hooks": "6.0.
|
|
46
|
-
"@versini/ui-liveregion": "3.1.
|
|
45
|
+
"@versini/ui-hooks": "6.0.1",
|
|
46
|
+
"@versini/ui-liveregion": "3.1.4",
|
|
47
47
|
"clsx": "2.1.1",
|
|
48
48
|
"tailwindcss": "4.1.18"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": [
|
|
51
51
|
"**/*.css"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "7b2640a0650a4c3aa6ca078888f765cb400f9f13"
|
|
54
54
|
}
|