@versini/ui-textarea 6.3.4 → 7.0.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.
package/README.md CHANGED
@@ -99,7 +99,6 @@ function App() {
99
99
  | helperText | `string` | - | Text to add to the bottom of the TextArea |
100
100
  | helperTextOnFocus | `boolean` | `false` | Show helper text only when focused |
101
101
  | mode | `"dark" \| "light" \| "system" \| "alt-system"` | `"system"` | Theme mode |
102
- | focusMode | `"dark" \| "light" \| "system" \| "alt-system"` | `"system"` | Focus ring color mode |
103
102
  | labelHidden | `boolean` | `false` | Hide label visually but retain accessibility |
104
103
  | noBorder | `boolean` | `false` | Whether to render without border |
105
104
  | raw | `boolean` | `false` | Whether to render without styles |
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare const TEXT_AREA_HELPER_TEXT_CLASSNAME = "av-text-area-helper-text
10
10
 
11
11
  export declare const TEXT_AREA_WRAPPER_CLASSNAME = "av-text-area-wrapper";
12
12
 
13
- export declare function TextArea({ id, name, label, error, raw, className, textAreaClassName, mode, focusMode, value, defaultValue, disabled, noBorder, labelId, helperText, helperTextOnFocus, rightElement, leftElement, onChange, onFocus, onBlur, ref, ...extraProps }: TextAreaProps): JSX.Element;
13
+ export declare function TextArea({ id, name, label, error, raw, className, textAreaClassName, mode, value, defaultValue, disabled, noBorder, labelId, helperText, helperTextOnFocus, rightElement, leftElement, onChange, onFocus, onBlur, ref, ...extraProps }: TextAreaProps): JSX.Element;
14
14
 
15
15
  declare type TextAreaProps = {
16
16
  /**
@@ -30,11 +30,6 @@ declare type TextAreaProps = {
30
30
  * @default false
31
31
  */
32
32
  error?: boolean;
33
- /**
34
- * The type of focus for the TextArea. This will change the color
35
- * of the focus ring around the TextArea.
36
- */
37
- focusMode?: "dark" | "light" | "system" | "alt-system";
38
33
  /**
39
34
  * Text to add to the bottom of the TextArea.
40
35
  */
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- @versini/ui-textarea v6.3.4
2
+ @versini/ui-textarea v7.0.0
3
3
  © 2026 gizmette.com
4
4
  */
5
5
 
@@ -44,13 +44,8 @@ const getTextAreaColorClasses = ({ mode })=>{
44
44
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": mode === "alt-system"
45
45
  });
46
46
  };
47
- const getTextAreaFocusClasses = ({ focusMode })=>{
48
- return clsx("focus:outline-2 focus:outline-offset-2", {
49
- "focus:outline-focus-dark": focusMode === "dark",
50
- "focus:outline-focus-light": focusMode === "light",
51
- "focus:outline-focus-light dark:focus:outline-focus-dark": focusMode === "alt-system",
52
- "focus:outline-focus-dark dark:focus:outline-focus-light": focusMode === "system"
53
- });
47
+ const getTextAreaFocusClasses = ()=>{
48
+ return clsx("focus:outline-2 focus:outline-offset-2 focus:outline-focus-dark");
54
49
  };
55
50
  const getTextAreaBorderClasses = ({ noBorder, error })=>{
56
51
  return clsx("border-2", {
@@ -112,13 +107,11 @@ const getTextAreaHelperTextClasses = ({ error, raw, mode, disabled })=>{
112
107
  });
113
108
  }
114
109
  /* v8 ignore stop */ };
115
- const getTextAreaClasses = ({ className, textAreaClassName, raw, focusMode, disabled, noBorder, error, mode, leftElement, rightElement })=>{
110
+ const getTextAreaClasses = ({ className, textAreaClassName, raw, disabled, noBorder, error, mode, leftElement, rightElement })=>{
116
111
  const wrapper = raw ? className : clsx("relative flex w-full flex-col justify-center", TEXT_AREA_WRAPPER_CLASSNAME, className);
117
112
  const textArea = raw ? clsx(textAreaClassName) : clsx(TEXT_AREA_CLASSNAME, textAreaClassName, getTextAreaBaseClasses(), getTextAreaColorClasses({
118
113
  mode
119
- }), getTextAreaFocusClasses({
120
- focusMode
121
- }), getTextAreaBorderClasses({
114
+ }), getTextAreaFocusClasses(), getTextAreaBorderClasses({
122
115
  noBorder,
123
116
  error
124
117
  }), {
@@ -177,7 +170,7 @@ const adjustLabelAndHelperText = ({ scrollHeight, currentHeight, currentLabelOff
177
170
 
178
171
 
179
172
 
180
- function TextArea({ id, name, label, error = false, raw = false, className, textAreaClassName, mode = "system", focusMode = "system", value, defaultValue, disabled = false, noBorder = false, labelId, helperText = "", helperTextOnFocus = false, rightElement, leftElement, onChange, onFocus, onBlur, ref, ...extraProps }) {
173
+ function TextArea({ id, name, label, error = false, raw = false, className, textAreaClassName, mode = "system", value, defaultValue, disabled = false, noBorder = false, labelId, helperText = "", helperTextOnFocus = false, rightElement, leftElement, onChange, onFocus, onBlur, ref, ...extraProps }) {
181
174
  const textAreaRef = useRef(null);
182
175
  const mergedTextAreaRef = useMergeRefs([
183
176
  ref,
@@ -203,7 +196,6 @@ function TextArea({ id, name, label, error = false, raw = false, className, text
203
196
  textAreaClassName,
204
197
  error,
205
198
  raw,
206
- focusMode,
207
199
  disabled,
208
200
  noBorder,
209
201
  mode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-textarea",
3
- "version": "6.3.4",
3
+ "version": "7.0.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -38,16 +38,16 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@testing-library/jest-dom": "6.9.1",
41
- "@versini/ui-types": "8.4.0"
41
+ "@versini/ui-types": "9.0.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "@versini/ui-hooks": "6.1.1",
45
- "@versini/ui-liveregion": "3.2.5",
45
+ "@versini/ui-liveregion": "3.2.6",
46
46
  "clsx": "2.1.1",
47
47
  "tailwindcss": "4.2.1"
48
48
  },
49
49
  "sideEffects": [
50
50
  "**/*.css"
51
51
  ],
52
- "gitHead": "08f46d8b356d5cfbb4e58dca300428ed6bb03789"
52
+ "gitHead": "a295349019d1512796f266bba535de383f12b6ee"
53
53
  }