@versini/ui-textarea 6.0.0 → 6.1.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.
Files changed (2) hide show
  1. package/dist/index.js +13 -24
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,19 +1,7 @@
1
1
  /*!
2
- @versini/ui-textarea v6.0.0
2
+ @versini/ui-textarea v6.1.0
3
3
  © 2025 gizmette.com
4
4
  */
5
- try {
6
- if (!window.__VERSINI_UI_TEXTAREA__) {
7
- window.__VERSINI_UI_TEXTAREA__ = {
8
- version: "6.0.0",
9
- buildTime: "12/16/2025 06:23 PM EST",
10
- homepage: "https://www.npmjs.com/package/@versini/ui-textarea",
11
- license: "MIT",
12
- };
13
- }
14
- } catch (error) {
15
- // nothing to declare officer
16
- }
17
5
 
18
6
  import { jsx, jsxs } from "react/jsx-runtime";
19
7
  import { useMergeRefs } from "@versini/ui-hooks/use-merge-refs";
@@ -67,7 +55,7 @@ const getTextAreaColorClasses = ({ mode })=>{
67
55
  });
68
56
  };
69
57
  const getTextAreaFocusClasses = ({ focusMode })=>{
70
- return clsx("focus:outline focus:outline-2 focus:outline-offset-2", {
58
+ return clsx("focus:outline-2 focus:outline-offset-2", {
71
59
  "focus:outline-focus-dark": focusMode === "dark",
72
60
  "focus:outline-focus-light": focusMode === "light",
73
61
  "focus:outline-focus-light dark:focus:outline-focus-dark": focusMode === "alt-system",
@@ -88,28 +76,28 @@ const getTextAreaLabelClasses = ({ disabled, raw, error, mode, leftElement, righ
88
76
  }
89
77
  if (disabled) {
90
78
  return clsx("transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium", {
91
- "translate-x-[10px]": rightElement === true && !leftElement || !rightElement && !leftElement
79
+ "translate-x-2.5": rightElement === true && !leftElement || !rightElement && !leftElement
92
80
  });
93
81
  }
94
82
  if (!error) {
95
83
  return clsx("absolute px-2 cursor-text font-medium transform translate-y-0 scale-100", {
96
- "translate-x-[10px]": rightElement === true && !leftElement || !rightElement && !leftElement,
84
+ "translate-x-2.5": rightElement === true && !leftElement || !rightElement && !leftElement,
97
85
  "text-copy-medium": mode === "dark",
98
86
  "text-copy-dark": mode === "light",
99
87
  "text-copy-dark dark:text-copy-medium": mode === "system",
100
88
  "text-copy-medium dark:text-copy-dark": mode === "alt-system"
101
89
  });
102
90
  }
103
- if (error) {
91
+ /* v8 ignore start - error state edge case */ if (error) {
104
92
  return clsx("absolute px-2 cursor-text font-medium transform translate-y-0 scale-100", {
105
- "translate-x-[10px]": rightElement === true && !leftElement || !rightElement && !leftElement,
93
+ "translate-x-2.5": rightElement === true && !leftElement || !rightElement && !leftElement,
106
94
  "text-copy-medium": mode === "dark",
107
95
  "text-copy-error-dark": mode === "light",
108
96
  "text-copy-error-dark dark:text-copy-error-light": mode === "system",
109
97
  "text-copy-medium dark:text-copy-error-dark": mode === "alt-system"
110
98
  });
111
99
  }
112
- };
100
+ /* v8 ignore stop */ };
113
101
  const getTextAreaHelperTextClasses = ({ error, raw, mode, disabled })=>{
114
102
  if (raw) {
115
103
  return "";
@@ -125,7 +113,7 @@ const getTextAreaHelperTextClasses = ({ error, raw, mode, disabled })=>{
125
113
  "text-copy-medium dark:text-copy-dark": mode === "alt-system"
126
114
  });
127
115
  }
128
- if (error) {
116
+ /* v8 ignore start - error state edge case */ if (error) {
129
117
  return clsx(TEXT_AREA_HELPER_TEXT_CLASSNAME, "absolute px-2 font-medium", {
130
118
  "text-copy-error-light": mode === "dark",
131
119
  "text-copy-error-dark": mode === "light",
@@ -133,7 +121,7 @@ const getTextAreaHelperTextClasses = ({ error, raw, mode, disabled })=>{
133
121
  "dark:text-copy-error-dark text-copy-error-light": mode === "alt-system"
134
122
  });
135
123
  }
136
- };
124
+ /* v8 ignore stop */ };
137
125
  const getTextAreaClasses = ({ className, textAreaClassName, raw, focusMode, disabled, noBorder, error, mode, leftElement, rightElement })=>{
138
126
  const wrapper = raw ? className : clsx("relative flex w-full flex-col justify-center", TEXT_AREA_WRAPPER_CLASSNAME, className);
139
127
  const textArea = raw ? clsx(textAreaClassName) : clsx(TEXT_AREA_CLASSNAME, textAreaClassName, getTextAreaBaseClasses(), getTextAreaColorClasses({
@@ -352,15 +340,15 @@ const TextArea = /*#__PURE__*/ react.forwardRef(({ id, name, label, error = fals
352
340
  currentLabelOffset: labelOffsetRef.current,
353
341
  currentHelperTextOffset: helperTextOffsetRef.current
354
342
  });
355
- /* v8 ignore next 7 */ if (labelOffset) {
343
+ /* v8 ignore start */ if (labelOffset) {
356
344
  labelOffsetRef.current = labelOffset;
357
345
  labelRef?.current?.style.setProperty("--av-text-area-label", `${labelOffset}px`);
358
346
  }
359
- /* v8 ignore next 7 */ if (helperTextOffset) {
347
+ /* v8 ignore stop */ /* v8 ignore start */ if (helperTextOffset) {
360
348
  helperTextOffsetRef.current = helperTextOffset;
361
349
  helperTextRef?.current?.style.setProperty("--av-text-area-helper-text", `${helperTextOffset}px`);
362
350
  }
363
- textAreaHeightRef.current = scrollHeight || textAreaHeightRef.current;
351
+ /* v8 ignore stop */ textAreaHeightRef.current = scrollHeight || textAreaHeightRef.current;
364
352
  }
365
353
  }, [
366
354
  userInput,
@@ -452,6 +440,7 @@ const TextArea = /*#__PURE__*/ react.forwardRef(({ id, name, label, error = fals
452
440
  TextArea.displayName = "TextArea";
453
441
 
454
442
  ;// CONCATENATED MODULE: ./src/components/index.ts
443
+ // force new release
455
444
 
456
445
 
457
446
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-textarea",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -38,17 +38,17 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@testing-library/jest-dom": "6.9.1",
41
- "@versini/ui-types": "8.0.0"
41
+ "@versini/ui-types": "8.1.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "@tailwindcss/typography": "0.5.19",
45
- "@versini/ui-hooks": "6.0.0",
46
- "@versini/ui-liveregion": "3.1.3",
45
+ "@versini/ui-hooks": "6.1.0",
46
+ "@versini/ui-liveregion": "3.2.0",
47
47
  "clsx": "2.1.1",
48
48
  "tailwindcss": "4.1.18"
49
49
  },
50
50
  "sideEffects": [
51
51
  "**/*.css"
52
52
  ],
53
- "gitHead": "30d86d13d4369cc841fc267c970cca423d27bf2f"
53
+ "gitHead": "b2ee2e328ecadfbedcb26d14afa896a30f0ab54b"
54
54
  }