@fabio.caffarello/react-design-system 1.23.8 → 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.
@@ -14,6 +14,12 @@ export interface MultiSelectProps {
14
14
  className?: string;
15
15
  inputClassName?: string;
16
16
  size?: "sm" | "md" | "lg";
17
+ /**
18
+ * Required label for the multi-select input. Becomes the accessible
19
+ * name via <label htmlFor>. Make this a real domain term ("Tags",
20
+ * "Select fruits"), not the element type ("multi-select" / "input").
21
+ */
22
+ label: string;
17
23
  }
18
24
  /**
19
25
  * MultiSelect Component
@@ -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
- * Follows Atomic Design principles as an Atom component.
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>>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fabio.caffarello/react-design-system",
3
3
  "private": false,
4
- "version": "1.23.8",
4
+ "version": "1.23.10",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",