@fabio.caffarello/react-design-system 1.23.9 → 1.23.10
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.cjs +25 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1001 -966
- package/dist/index.js.map +1 -1
- package/dist/ui/primitives/Textarea/Textarea.d.ts +10 -5
- package/package.json +1 -1
|
@@ -2,19 +2,24 @@ import type { TextareaHTMLAttributes } from "react";
|
|
|
2
2
|
interface Props extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
3
|
error?: boolean;
|
|
4
4
|
resize?: "none" | "both" | "horizontal" | "vertical";
|
|
5
|
+
label?: string;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Textarea Component
|
|
8
9
|
*
|
|
9
10
|
* A styled textarea component for longer text input.
|
|
10
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* For an accessible name, supply ONE of:
|
|
13
|
+
* - `label` prop (renders a visible `<label>` above the textarea), OR
|
|
14
|
+
* - `aria-label` / `aria-labelledby`, OR
|
|
15
|
+
* - an external `<Label htmlFor={id}>` paired with the same `id` prop
|
|
16
|
+
* (use the Label primitive when you need `variant="required" | "optional"`).
|
|
17
|
+
*
|
|
18
|
+
* In development, a missing accessible name logs a warning to the console.
|
|
11
19
|
*
|
|
12
20
|
* @example
|
|
13
21
|
* ```tsx
|
|
14
|
-
* <Textarea
|
|
15
|
-
* placeholder="Enter description..."
|
|
16
|
-
* rows={4}
|
|
17
|
-
* />
|
|
22
|
+
* <Textarea label="Description" rows={4} />
|
|
18
23
|
* ```
|
|
19
24
|
*/
|
|
20
25
|
declare const Textarea: import("react").NamedExoticComponent<Props & import("react").RefAttributes<HTMLTextAreaElement>>;
|