@allxsmith/bestax-bulma 5.8.2 → 5.8.3

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.
@@ -16,9 +16,17 @@ export interface AutocompleteItem {
16
16
  /**
17
17
  * Props for the Autocomplete component.
18
18
  * @extraProp {string} [className] - Additional CSS classes.
19
- * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the input element.
19
+ * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the input element.
20
20
  */
21
21
  export interface AutocompleteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'onInput'>, Omit<BulmaClassesProps, 'color'>, FormFieldProps {
22
+ /** Field label. Automatically associated with the text input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field` (label that `Field` yourself). */
23
+ label?: React.ReactNode;
24
+ /** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
25
+ labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
26
+ [key: string]: unknown;
27
+ };
28
+ /** Applied to the inner text input (the labellable control), not the wrapper div. */
29
+ id?: string;
22
30
  /** The options data to display (required). */
23
31
  data: AutocompleteItem[] | string[];
24
32
  /** The current input value (controlled). */
@@ -17,9 +17,17 @@ type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
17
17
  /**
18
18
  * Props for the Taginput component.
19
19
  * @extraProp {string} [className] - Additional CSS classes.
20
- * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the input element.
20
+ * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the input element.
21
21
  */
22
22
  export interface TaginputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'>, Omit<BulmaClassesProps, 'color'>, FormFieldProps {
23
+ /** Field label. Automatically associated with the text input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired when the tag limit is reached (the input is not rendered) and dropped inside an outer `Field`. */
24
+ label?: React.ReactNode;
25
+ /** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
26
+ labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
27
+ [key: string]: unknown;
28
+ };
29
+ /** Applied to the inner text input (the labellable control), not the wrapper div. */
30
+ id?: string;
23
31
  /** The current tags (controlled). */
24
32
  value?: TaginputTag[];
25
33
  /** Default tags (uncontrolled). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allxsmith/bestax-bulma",
3
- "version": "5.8.2",
3
+ "version": "5.8.3",
4
4
  "description": "A fully-typed React component library for the Bulma CSS framework. Build modern UIs quickly with reusable, accessible, and customizable Bulma-based React components.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",