@allxsmith/bestax-bulma 5.8.0 → 5.8.1

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 (101) hide show
  1. package/README.md +20 -0
  2. package/dist/index.cjs.js +205 -367
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +205 -367
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/types/columns/Column.d.ts +25 -30
  7. package/dist/types/columns/Columns.d.ts +23 -30
  8. package/dist/types/components/Avatar.d.ts +15 -20
  9. package/dist/types/components/Avatars.d.ts +8 -9
  10. package/dist/types/components/Badge.d.ts +13 -21
  11. package/dist/types/components/Breadcrumb.d.ts +6 -9
  12. package/dist/types/components/Card.d.ts +34 -36
  13. package/dist/types/components/Carousel.d.ts +29 -29
  14. package/dist/types/components/Collapse.d.ts +17 -18
  15. package/dist/types/components/Dialog.d.ts +24 -29
  16. package/dist/types/components/Dropdown.d.ts +16 -18
  17. package/dist/types/components/Loading.d.ts +13 -18
  18. package/dist/types/components/Menu.d.ts +11 -15
  19. package/dist/types/components/Message.d.ts +11 -14
  20. package/dist/types/components/Modal.d.ts +23 -29
  21. package/dist/types/components/Navbar.d.ts +60 -72
  22. package/dist/types/components/Pagination.d.ts +39 -35
  23. package/dist/types/components/Panel.d.ts +26 -33
  24. package/dist/types/components/Reveal.d.ts +11 -17
  25. package/dist/types/components/Sidebar.d.ts +17 -20
  26. package/dist/types/components/Steps.d.ts +28 -37
  27. package/dist/types/components/Tabs.d.ts +44 -43
  28. package/dist/types/components/Toast.d.ts +23 -28
  29. package/dist/types/components/Tooltip.d.ts +16 -20
  30. package/dist/types/elements/Block.d.ts +11 -10
  31. package/dist/types/elements/Box.d.ts +12 -10
  32. package/dist/types/elements/Button.d.ts +30 -23
  33. package/dist/types/elements/Buttons.d.ts +13 -9
  34. package/dist/types/elements/Code.d.ts +5 -10
  35. package/dist/types/elements/Content.d.ts +12 -11
  36. package/dist/types/elements/Delete.d.ts +14 -12
  37. package/dist/types/elements/Divider.d.ts +3 -7
  38. package/dist/types/elements/Emphasis.d.ts +5 -10
  39. package/dist/types/elements/Figure.d.ts +8 -10
  40. package/dist/types/elements/Icon.d.ts +18 -18
  41. package/dist/types/elements/IconText.d.ts +14 -11
  42. package/dist/types/elements/Image.d.ts +17 -17
  43. package/dist/types/elements/Link.d.ts +10 -14
  44. package/dist/types/elements/LinkButton.d.ts +3 -9
  45. package/dist/types/elements/ListItem.d.ts +6 -11
  46. package/dist/types/elements/Notification.d.ts +33 -24
  47. package/dist/types/elements/OrderedList.d.ts +7 -8
  48. package/dist/types/elements/Paragraph.d.ts +5 -10
  49. package/dist/types/elements/Pre.d.ts +5 -10
  50. package/dist/types/elements/Progress.d.ts +16 -10
  51. package/dist/types/elements/Skeleton.d.ts +4 -13
  52. package/dist/types/elements/Span.d.ts +5 -9
  53. package/dist/types/elements/Strong.d.ts +5 -10
  54. package/dist/types/elements/SubTitle.d.ts +9 -11
  55. package/dist/types/elements/Table.d.ts +8 -9
  56. package/dist/types/elements/Tag.d.ts +9 -12
  57. package/dist/types/elements/Tags.d.ts +4 -5
  58. package/dist/types/elements/Tbody.d.ts +2 -3
  59. package/dist/types/elements/Td.d.ts +3 -4
  60. package/dist/types/elements/Tfoot.d.ts +2 -3
  61. package/dist/types/elements/Th.d.ts +5 -6
  62. package/dist/types/elements/Thead.d.ts +2 -3
  63. package/dist/types/elements/Title.d.ts +10 -12
  64. package/dist/types/elements/Tr.d.ts +4 -5
  65. package/dist/types/elements/UnorderedList.d.ts +4 -5
  66. package/dist/types/form/Autocomplete.d.ts +35 -38
  67. package/dist/types/form/Checkbox.d.ts +7 -18
  68. package/dist/types/form/Checkboxes.d.ts +6 -7
  69. package/dist/types/form/Control.d.ts +21 -20
  70. package/dist/types/form/DateInput.d.ts +24 -24
  71. package/dist/types/form/DateInputBase.d.ts +36 -34
  72. package/dist/types/form/DateTimeInput.d.ts +22 -22
  73. package/dist/types/form/DateTimeInputBase.d.ts +44 -42
  74. package/dist/types/form/Field.d.ts +23 -26
  75. package/dist/types/form/File.d.ts +14 -16
  76. package/dist/types/form/Input.d.ts +20 -24
  77. package/dist/types/form/InputBase.d.ts +10 -11
  78. package/dist/types/form/Numberinput.d.ts +21 -24
  79. package/dist/types/form/Radio.d.ts +7 -18
  80. package/dist/types/form/Radios.d.ts +6 -7
  81. package/dist/types/form/Rate.d.ts +21 -37
  82. package/dist/types/form/Select.d.ts +16 -20
  83. package/dist/types/form/SelectBase.d.ts +13 -14
  84. package/dist/types/form/Slider.d.ts +56 -41
  85. package/dist/types/form/Switch.d.ts +16 -19
  86. package/dist/types/form/Taginput.d.ts +45 -48
  87. package/dist/types/form/TextArea.d.ts +11 -15
  88. package/dist/types/form/TextAreaBase.d.ts +13 -14
  89. package/dist/types/form/TimeInput.d.ts +24 -23
  90. package/dist/types/form/TimeInputBase.d.ts +38 -59
  91. package/dist/types/form/fieldProps.d.ts +1 -1
  92. package/dist/types/grid/Cell.d.ts +12 -13
  93. package/dist/types/grid/Grid.d.ts +16 -17
  94. package/dist/types/helpers/colorDeprecations.d.ts +17 -0
  95. package/dist/types/layout/Container.d.ts +16 -13
  96. package/dist/types/layout/Footer.d.ts +7 -8
  97. package/dist/types/layout/Hero.d.ts +34 -28
  98. package/dist/types/layout/Level.d.ts +30 -33
  99. package/dist/types/layout/Media.d.ts +25 -29
  100. package/dist/types/layout/Section.d.ts +7 -8
  101. package/package.json +18 -18
@@ -8,45 +8,41 @@ import { SelectBaseProps } from './SelectBase';
8
8
  * Composes Field, Control, and SelectBase into a single convenience component.
9
9
  * Supports all SelectBase props, plus Field-level (label, horizontal) and
10
10
  * Control-level (icons, loading) props.
11
- *
12
- * @property {React.ReactNode} [label] - Field label.
13
- * @property {FieldProps['labelSize']} [labelSize] - Size for the label.
14
- * @property {FieldProps['labelProps']} [labelProps] - Props for the label element.
15
- * @property {boolean} [horizontal] - Horizontal field layout.
16
- * @property {ControlBaseProps['iconLeft']} [iconLeft] - Icon props for left icon.
17
- * @property {string} [iconLeftName] - Shortcut for left icon name.
18
- * @property {ControlBaseProps['iconLeftSize']} [iconLeftSize] - Shortcut for left icon size.
19
- * @property {boolean} [hasIconsLeft] - Force left icon container.
20
- * @property {boolean} [isLoading] - Show loading indicator on the control.
21
- * @property {boolean} [isExpanded] - Expand the control.
22
- * @property {'small'|'medium'|'large'} [controlSize] - Control size.
23
- * @property {React.ReactNode} [message] - Help/validation message below the select.
24
- * @property {string} [messageColor] - Bulma color for the message.
25
- * @property {string} [fieldClassName] - Additional CSS classes for the Field.
26
- * @property {string} [controlClassName] - Additional CSS classes for the Control.
27
11
  */
28
12
  export interface SelectProps extends SelectBaseProps {
13
+ /** Field label. */
29
14
  label?: React.ReactNode;
15
+ /** Size for the label. */
30
16
  labelSize?: FieldProps['labelSize'];
17
+ /** Props for the label element. */
31
18
  labelProps?: FieldProps['labelProps'];
19
+ /** Horizontal field layout. */
32
20
  horizontal?: boolean;
21
+ /** Icon props for left icon. */
33
22
  iconLeft?: ControlBaseProps['iconLeft'];
23
+ /** Shortcut for left icon name. */
34
24
  iconLeftName?: string;
25
+ /** Shortcut for left icon size. */
35
26
  iconLeftSize?: ControlBaseProps['iconLeftSize'];
27
+ /** Force left icon container. */
36
28
  hasIconsLeft?: boolean;
29
+ /** Shows loading indicator. */
37
30
  isLoading?: boolean;
31
+ /** Expand the control. */
38
32
  isExpanded?: boolean;
33
+ /** Control size. */
39
34
  controlSize?: ControlBaseProps['size'];
35
+ /** Help/validation message below the select. */
40
36
  message?: React.ReactNode;
37
+ /** Bulma color for the message. */
41
38
  messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
39
+ /** Additional CSS classes for the Field. */
42
40
  fieldClassName?: string;
41
+ /** Additional CSS classes for the Control. */
43
42
  controlClassName?: string;
44
43
  }
45
44
  /**
46
- * Select is a convenience component that composes Field, Control, and SelectBase.
47
- *
48
- * Use this for typical form fields. For complex layouts (grouped fields,
49
- * addons, etc.), compose Field, Control, and SelectBase directly.
45
+ * The `Select` component provides a Bulma-styled dropdown for selecting one or more options.
50
46
  *
51
47
  * @function
52
48
  * @param {SelectProps} props - Props for Select.
@@ -2,34 +2,33 @@ import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
3
  /**
4
4
  * Props for the Select component.
5
- *
6
- * @property {'primary'|'link'|'info'|'success'|'warning'|'danger'|'black'|'dark'|'light'|'white'} [color] - Bulma color modifier for the select.
7
- * @property {'small'|'medium'|'large'} [size] - Size modifier for the select.
8
- * @property {boolean} [isRounded] - Renders the select with rounded corners.
9
- * @property {boolean} [isLoading] - Shows loading indicator.
10
- * @property {boolean} [isActive] - Applies Bulma's is-active modifier.
11
- * @property {boolean} [isHovered] - Forces the hovered state on the inner select element.
12
- * @property {boolean} [isFocused] - Forces the focused state on the inner select element.
13
- * @property {boolean} [isFullwidth] - Makes the select span the full width of its parent.
14
- * @property {string} [className] - Additional CSS classes to apply.
15
- * @property {boolean} [disabled] - Whether the select is disabled.
16
- * @property {boolean} [multiple] - Whether the select allows multiple values.
17
- * @property {number} [multipleSize] - For multiple select: number of visible options.
18
- * @property {React.ReactNode} [children] - Option elements.
19
5
  */
20
6
  export interface SelectBaseProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
7
+ /** Bulma color modifier for the select. */
21
8
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
9
+ /** Size modifier for the select. */
22
10
  size?: 'small' | 'medium' | 'large';
11
+ /** Rounded select corners. */
23
12
  isRounded?: boolean;
13
+ /** Shows loading indicator. */
24
14
  isLoading?: boolean;
15
+ /** Applies Bulma's is-active modifier. */
25
16
  isActive?: boolean;
17
+ /** Forces hovered state on the inner select. */
26
18
  isHovered?: boolean;
19
+ /** Forces focused state on the inner select. */
27
20
  isFocused?: boolean;
21
+ /** Makes the select span the full width of parent. */
28
22
  isFullwidth?: boolean;
23
+ /** Additional CSS classes to apply. */
29
24
  className?: string;
25
+ /** Disables the select. */
30
26
  disabled?: boolean;
27
+ /** Allows multiple selections. */
31
28
  multiple?: boolean;
29
+ /** Number of visible options in multiselect. */
32
30
  multipleSize?: number;
31
+ /** `<option>` elements. */
33
32
  children?: React.ReactNode;
34
33
  }
35
34
  /**
@@ -11,98 +11,113 @@ export type SliderTooltip = 'auto' | 'always' | 'hidden';
11
11
  export type SliderOrientation = 'horizontal' | 'vertical';
12
12
  /**
13
13
  * A tick mark displayed along the Slider track.
14
- *
15
- * @property {number} value - Position of the mark along the slider range.
16
- * @property {React.ReactNode} [label] - Optional label rendered below the tick mark.
17
14
  */
18
15
  export interface SliderMark {
16
+ /** Controlled value. */
19
17
  value: number;
18
+ /** Optional label rendered below the tick mark. */
20
19
  label?: React.ReactNode;
21
20
  }
22
21
  /**
23
22
  * Shared base props for single and range Slider modes.
24
- *
25
- * @property {number} [min] - Minimum slider value (default: 0).
26
- * @property {number} [max] - Maximum slider value (default: 100).
27
- * @property {number} [step] - Step increment (default: 1).
28
- * @property {SliderSize} [size] - Size of the slider.
29
- * @property {SliderColor} [color] - Color of the slider.
30
- * @property {boolean} [isRounded] - Whether the slider thumb is rounded.
31
- * @property {boolean} [isCircle] - Whether the slider thumb is circular.
32
- * @property {boolean} [showOutput] - Whether to show a tooltip with the current value (maps to tooltip 'auto').
33
- * @property {SliderTooltip} [tooltip] - Tooltip display mode (overrides showOutput).
34
- * @property {boolean} [ticks] - Whether to display tick marks at each step.
35
- * @property {SliderMark[]} [marks] - Custom tick mark positions and labels.
36
- * @property {SliderOrientation} [orientation] - Slider orientation (default: 'horizontal').
37
- * @property {(value: number) => number} [scale] - Non-linear scale function for displayed values.
38
- * @property {(value: number) => string} [getAriaValueText] - Custom aria-valuetext formatter.
39
- * @property {(value: number) => string} [formatOutput] - Custom formatter for the tooltip output.
40
23
  */
41
24
  interface SliderBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'size' | 'onChange' | 'value' | 'defaultValue'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>, FormFieldProps {
25
+ /** Minimum value. */
42
26
  min?: number;
27
+ /** Maximum value. */
43
28
  max?: number;
29
+ /** Step increment (default: 1). */
44
30
  step?: number;
31
+ /** Size variant. */
45
32
  size?: SliderSize;
33
+ /** Color variant. */
46
34
  color?: SliderColor;
35
+ /** Use rounded track ends. */
47
36
  isRounded?: boolean;
37
+ /** Use circular thumb. */
48
38
  isCircle?: boolean;
39
+ /** Show current value tooltip. */
49
40
  showOutput?: boolean;
41
+ /** Controls tooltip visibility on the thumb. */
50
42
  tooltip?: SliderTooltip;
43
+ /** Shows tick marks along the track. */
51
44
  ticks?: boolean;
45
+ /** Custom labeled marks along the track. Each mark has `{ value: number; label?: ReactNode }`. */
52
46
  marks?: SliderMark[];
47
+ /** Orientation of the slider. */
53
48
  orientation?: SliderOrientation;
49
+ /** Function to scale the displayed value. */
54
50
  scale?: (value: number) => number;
51
+ /** Function to generate the `aria-valuetext` attribute. */
55
52
  getAriaValueText?: (value: number) => string;
53
+ /** Format function for output display. */
56
54
  formatOutput?: (value: number) => string;
57
55
  }
58
56
  /**
59
57
  * Props for the Slider in single-value mode.
60
- *
61
- * @property {false} [range] - Must be false or omitted for single-value mode.
62
- * @property {number} [value] - Controlled slider value.
63
- * @property {number} [defaultValue] - Initial value for uncontrolled mode.
64
- * @property {(value: number) => void} [onChange] - Callback when the value changes.
65
- * @property {never} [minDistance] - Not applicable in single-value mode.
66
- * @property {string} [ariaLabel] - Accessible label for the slider input.
67
58
  */
68
59
  export interface SliderSingleProps extends SliderBaseProps {
60
+ /**
61
+ * Enables range mode with two thumbs.
62
+ * @defaultValue false
63
+ */
69
64
  range?: false;
65
+ /** Controlled value. */
70
66
  value?: number;
67
+ /**
68
+ * Default value for uncontrolled usage.
69
+ * @defaultValue 0
70
+ */
71
71
  defaultValue?: number;
72
+ /** Callback when value changes. */
72
73
  onChange?: (value: number) => void;
74
+ /**
75
+ * Minimum distance between thumbs in range mode.
76
+ * @defaultValue 0
77
+ */
73
78
  minDistance?: never;
79
+ /** ARIA label(s) for the slider thumb(s). */
74
80
  ariaLabel?: string;
75
81
  }
76
82
  /**
77
83
  * Props for the Slider in range (dual-thumb) mode.
78
- *
79
- * @property {true} range - Must be true to enable range mode.
80
- * @property {[number, number]} [value] - Controlled range value as [low, high].
81
- * @property {[number, number]} [defaultValue] - Initial range for uncontrolled mode.
82
- * @property {(value: [number, number]) => void} [onChange] - Callback when the range changes.
83
- * @property {number} [minDistance] - Minimum distance between the two thumbs.
84
- * @property {[string, string]} [ariaLabel] - Accessible labels for the low and high thumb inputs.
85
- * @property {string} [nameLow] - Form field name for the low thumb. Use this in range mode so each thumb submits with its own name.
86
- * @property {string} [nameHigh] - Form field name for the high thumb.
87
84
  */
88
85
  export interface SliderRangeProps extends SliderBaseProps {
86
+ /**
87
+ * Enables range mode with two thumbs.
88
+ * @defaultValue false
89
+ */
89
90
  range: true;
91
+ /** Controlled value. */
90
92
  value?: [number, number];
93
+ /**
94
+ * Default value for uncontrolled usage.
95
+ * @defaultValue 0
96
+ */
91
97
  defaultValue?: [number, number];
98
+ /** Callback when value changes. */
92
99
  onChange?: (value: [number, number]) => void;
100
+ /**
101
+ * Minimum distance between thumbs in range mode.
102
+ * @defaultValue 0
103
+ */
93
104
  minDistance?: number;
105
+ /** ARIA label(s) for the slider thumb(s). */
94
106
  ariaLabel?: [string, string];
107
+ /** Form field name for the low thumb. Use this in range mode so each thumb submits with its own name. */
95
108
  nameLow?: string;
109
+ /** Form field name for the high thumb. */
96
110
  nameHigh?: string;
97
111
  }
98
- /** Props for the Slider component — a discriminated union of single and range modes. */
112
+ /**
113
+ * Props for the Slider component — a discriminated union of single and range modes.
114
+ * @extraProp {boolean} [disabled=false] - Whether the slider is disabled.
115
+ * @extraProp {string} [className] - Additional CSS classes.
116
+ * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the input element.
117
+ */
99
118
  export type SliderProps = SliderSingleProps | SliderRangeProps;
100
119
  /**
101
- * Slider component for selecting a value or range from a range.
102
- *
103
- * A styled range input that supports different sizes, colors,
104
- * optional value display, ticks/marks, range mode (dual thumb),
105
- * vertical orientation, and non-linear scale.
120
+ * The `Slider` component provides a range slider input for selecting values within a range.
106
121
  *
107
122
  * @function
108
123
  * @param {SliderProps} props - Props for the Slider component.
@@ -10,38 +10,35 @@ export declare const switchColors: readonly ["primary", "link", "info", "success
10
10
  export declare const switchSizes: readonly ["small", "normal", "medium", "large"];
11
11
  /**
12
12
  * Props for the Switch component.
13
- *
14
- * @property {(typeof switchColors)[number]} [color] - Color variant for the switch.
15
- * @property {(typeof switchSizes)[number]} [size] - Size of the switch.
16
- * @property {boolean} [isRounded] - Use rounded switch style.
17
- * @property {boolean} [isThin] - Use thin switch style.
18
- * @property {boolean} [isOutlined] - Use outlined switch style.
19
- * @property {boolean} [isRtl] - Right-to-left layout (label on left).
20
- * @property {(typeof switchColors)[number]} [passiveType] - Color for the unchecked (inactive) state.
21
- * @property {boolean} [checked] - Whether the switch is checked.
22
- * @property {boolean} [defaultChecked] - Default checked state for uncontrolled usage.
23
- * @property {boolean} [disabled] - Whether the switch is disabled.
24
- * @property {string} [className] - Additional CSS classes.
25
- * @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color.
26
- * @property {React.ReactNode} [children] - Label content for the switch.
27
- * @property {(event: React.ChangeEvent<HTMLInputElement>) => void} [onChange] - Change handler.
13
+ * @extraProp {boolean} [checked] - Controlled checked state.
14
+ * @extraProp {boolean} [defaultChecked=false] - Default checked state for uncontrolled usage.
15
+ * @extraProp {boolean} [disabled=false] - Whether the switch is disabled.
16
+ * @extraProp {string} [className] - Additional CSS classes.
17
+ * @extraProp {(event: React.ChangeEvent<HTMLInputElement>) => void} [onChange] - Callback when switch state changes.
18
+ * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the input element.
28
19
  */
29
20
  export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
21
+ /** Color variant for the switch. */
30
22
  color?: (typeof switchColors)[number];
23
+ /** Size of the switch. */
31
24
  size?: (typeof switchSizes)[number];
25
+ /** Use rounded switch style. */
32
26
  isRounded?: boolean;
27
+ /** Use thin switch style. */
33
28
  isThin?: boolean;
29
+ /** Use outlined switch style. */
34
30
  isOutlined?: boolean;
31
+ /** Right-to-left layout (label on left). */
35
32
  isRtl?: boolean;
33
+ /** Color when the switch is in the off/passive state. */
36
34
  passiveType?: (typeof switchColors)[number];
35
+ /** Text color helper. */
37
36
  textColor?: (typeof validColors)[number] | 'inherit' | 'current';
37
+ /** Label content for the switch. */
38
38
  children?: React.ReactNode;
39
39
  }
40
40
  /**
41
- * Switch component for toggling between on/off states.
42
- *
43
- * A styled checkbox that appears as a toggle switch, commonly used for
44
- * settings and preferences. Supports various colors, sizes, and styles.
41
+ * The `Switch` component provides a toggle switch for boolean on/off states.
45
42
  *
46
43
  * @function
47
44
  * @param {SwitchProps} props - Props for the Switch component.
@@ -3,12 +3,11 @@ import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
3
  import { FormFieldProps } from './fieldProps';
4
4
  /**
5
5
  * Represents a tag item object with a value and optional label.
6
- *
7
- * @property {string} value - The tag value.
8
- * @property {string} [label] - Display label for the tag.
9
6
  */
10
7
  export interface TaginputItem {
8
+ /** The tag value. */
11
9
  value: string;
10
+ /** Display label (optional). */
12
11
  label?: string;
13
12
  [key: string]: unknown;
14
13
  }
@@ -17,95 +16,93 @@ export type TaginputTag = TaginputItem | string;
17
16
  type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
18
17
  /**
19
18
  * Props for the Taginput component.
20
- *
21
- * @property {TaginputTag[]} [value] - The current tags (controlled).
22
- * @property {TaginputTag[]} [defaultValue] - Default tags (uncontrolled).
23
- * @property {string[]} [data] - Autocomplete suggestions.
24
- * @property {string} [placeholder] - Placeholder text when no tags.
25
- * @property {string} [field] - Object property to use as display field.
26
- * @property {boolean} [allowNew] - Allow creating new tags not in suggestions.
27
- * @property {boolean} [allowDuplicates] - Allow duplicate tags.
28
- * @property {boolean} [openOnFocus] - Open autocomplete dropdown on focus.
29
- * @property {boolean} [removeOnKeys] - Remove tag on backspace. Default: true.
30
- * @property {string[]} [confirmKeys] - Keys to confirm tag creation. Default: ['Enter', ','].
31
- * @property {boolean} [closable] - Show close button on tags. Default: true.
32
- * @property {boolean} [attached] - Attach tags visually.
33
- * @property {number} [maxTags] - Maximum number of tags allowed.
34
- * @property {number} [maxlength] - Maximum length of input.
35
- * @property {boolean} [disabled] - Whether the input is disabled.
36
- * @property {boolean} [readonly] - Whether the input is read-only.
37
- * @property {boolean} [rounded] - Makes tags rounded.
38
- * @property {boolean} [ellipsis] - Truncate long tag text with ellipsis and show title tooltip.
39
- * @property {boolean} [hasCounter] - Show counter for maxTags/maxlength. Default: true.
40
- * @property {string[]} [onPasteSeparators] - Characters to split on paste. Default: [','].
41
- * @property {(tag: string) => boolean} [beforeAdding] - Validate before adding a tag.
42
- * @property {(input: string) => TaginputTag} [createTag] - Transform input string to tag.
43
- * @property {boolean} [keepFirst] - Auto-highlight first autocomplete result.
44
- * @property {boolean} [keepOpen] - Keep dropdown open after selecting. Default: true.
45
- * @property {boolean} [loading] - Show loading spinner in input.
46
- * @property {string} [ariaCloseLabel] - Accessibility label for close buttons.
47
- * @property {(tags: TaginputTag[]) => void} [onChange] - Callback when tags change.
48
- * @property {(tag: TaginputTag) => void} [onAdd] - Callback when tag is added.
49
- * @property {(tag: TaginputTag, index: number) => void} [onRemove] - Callback when tag is removed.
50
- * @property {(value: string) => void} [onTyping] - Callback when typing in input.
51
- * @property {(tag: TaginputTag) => React.ReactNode} [tagTemplate] - Custom render for tags.
52
- * @property {string} [name] - Form field name. When provided, one hidden input per tag is rendered so tags submit as a standard form-encoded array (e.g., `tags=react&tags=vue`).
53
- * @property {string} [form] - The id of the form the hidden inputs belong to.
54
- * @property {string} [icon] - Icon name for the input field.
55
- * @property {IconLibrary} [iconLibrary] - Icon library to use.
56
- * @property {string} [iconVariant] - Icon style variant (e.g., 'solid', 'outlined').
57
- * @property {string | string[]} [iconFeatures] - Additional icon modifiers.
58
- * @property {'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'} [color] - Bulma color modifier for the input.
59
- * @property {'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'dark' | 'light'} [tagColor] - Color modifier for tags.
60
- * @property {'small' | 'medium' | 'large'} [size] - Size modifier for the component.
19
+ * @extraProp {string} [className] - Additional CSS classes.
20
+ * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the input element.
61
21
  */
62
22
  export interface TaginputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'>, Omit<BulmaClassesProps, 'color'>, FormFieldProps {
23
+ /** The current tags (controlled). */
63
24
  value?: TaginputTag[];
25
+ /** Default tags (uncontrolled). */
64
26
  defaultValue?: TaginputTag[];
27
+ /** Autocomplete suggestions. */
65
28
  data?: string[];
29
+ /** Placeholder text when no tags. */
66
30
  placeholder?: string;
31
+ /** Object property to use as display field. */
67
32
  field?: string;
33
+ /** Allow creating new tags not in suggestions. */
68
34
  allowNew?: boolean;
35
+ /** Allow duplicate tags. */
69
36
  allowDuplicates?: boolean;
37
+ /** Open autocomplete dropdown on focus. */
70
38
  openOnFocus?: boolean;
39
+ /** Remove tag on backspace. Default: true. */
71
40
  removeOnKeys?: boolean;
41
+ /** Keys to confirm tag creation. Default: ['Enter', ',']. */
72
42
  confirmKeys?: string[];
43
+ /** Show close button on tags. Default: true. */
73
44
  closable?: boolean;
45
+ /** Attach tags visually. */
74
46
  attached?: boolean;
47
+ /** Maximum number of tags allowed. */
75
48
  maxTags?: number;
49
+ /** Maximum length of input. */
76
50
  maxlength?: number;
51
+ /** Whether the input is disabled. */
77
52
  disabled?: boolean;
53
+ /** Whether the input is read-only. */
78
54
  readonly?: boolean;
55
+ /** Applies rounded corners to the tags. */
79
56
  rounded?: boolean;
57
+ /** Truncates long tag text with ellipsis. */
80
58
  ellipsis?: boolean;
59
+ /** Shows a counter of the number of tags. */
81
60
  hasCounter?: boolean;
61
+ /** Characters that split pasted text into tags. */
82
62
  onPasteSeparators?: string[];
63
+ /** Validation function called before adding a tag. */
83
64
  beforeAdding?: (tag: string) => boolean;
65
+ /** Custom function for creating tag objects from input. */
84
66
  createTag?: (input: string) => TaginputTag;
67
+ /** Keeps the first autocomplete suggestion highlighted. */
85
68
  keepFirst?: boolean;
69
+ /** Keeps the autocomplete dropdown open after selection. */
86
70
  keepOpen?: boolean;
71
+ /** Shows a loading indicator. */
87
72
  loading?: boolean;
73
+ /** ARIA label for tag close buttons. */
88
74
  ariaCloseLabel?: string;
75
+ /** Icon name for the input field. */
89
76
  icon?: string;
77
+ /** Icon library to use. */
90
78
  iconLibrary?: IconLibrary;
79
+ /** Icon style variant (e.g., 'solid', 'outlined'). */
91
80
  iconVariant?: string;
81
+ /** Additional icon modifiers. */
92
82
  iconFeatures?: string | string[];
83
+ /** Input color variant. */
93
84
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
85
+ /** Tag color variant. */
94
86
  tagColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'dark' | 'light';
87
+ /** Size variant. */
95
88
  size?: 'small' | 'medium' | 'large';
89
+ /** Form field name. When set, one hidden input per tag is rendered. */
96
90
  name?: string;
91
+ /** Optional id of the form the hidden inputs belong to. */
97
92
  form?: string;
93
+ /** Callback when tags change. */
98
94
  onChange?: (tags: TaginputTag[]) => void;
95
+ /** Callback when tag is added. */
99
96
  onAdd?: (tag: TaginputTag) => void;
97
+ /** Callback when tag is removed. */
100
98
  onRemove?: (tag: TaginputTag, index: number) => void;
99
+ /** Callback when typing in input. */
101
100
  onTyping?: (value: string) => void;
101
+ /** Custom render for tags. */
102
102
  tagTemplate?: (tag: TaginputTag) => React.ReactNode;
103
103
  }
104
104
  /**
105
- * Taginput component for managing multiple tags.
106
- *
107
- * Allows users to create, edit, and remove tags with optional
108
- * autocomplete suggestions.
105
+ * The `Taginput` component provides a tag/chip input field for managing multiple tags.
109
106
  *
110
107
  * @function
111
108
  * @param {TaginputProps} props - Props for the Taginput component.
@@ -8,35 +8,31 @@ import { TextAreaBaseProps } from './TextAreaBase';
8
8
  * Composes Field, Control, and TextAreaBase into a single convenience component.
9
9
  * Supports all TextAreaBase props, plus Field-level (label, horizontal) and
10
10
  * Control-level (loading) props.
11
- *
12
- * @property {React.ReactNode} [label] - Field label.
13
- * @property {FieldProps['labelSize']} [labelSize] - Size for the label.
14
- * @property {FieldProps['labelProps']} [labelProps] - Props for the label element.
15
- * @property {boolean} [horizontal] - Horizontal field layout.
16
- * @property {boolean} [isLoading] - Show loading indicator on the control.
17
- * @property {'small'|'medium'|'large'} [controlSize] - Control size.
18
- * @property {React.ReactNode} [message] - Help/validation message below the textarea.
19
- * @property {string} [messageColor] - Bulma color for the message.
20
- * @property {string} [fieldClassName] - Additional CSS classes for the Field.
21
- * @property {string} [controlClassName] - Additional CSS classes for the Control.
22
11
  */
23
12
  export interface TextAreaProps extends TextAreaBaseProps {
13
+ /** Field label. */
24
14
  label?: React.ReactNode;
15
+ /** Size for the label. */
25
16
  labelSize?: FieldProps['labelSize'];
17
+ /** Props for the label element. */
26
18
  labelProps?: FieldProps['labelProps'];
19
+ /** Horizontal field layout. */
27
20
  horizontal?: boolean;
21
+ /** Shows loading indicator on the wrapping Control. */
28
22
  isLoading?: boolean;
23
+ /** Control size. */
29
24
  controlSize?: ControlBaseProps['size'];
25
+ /** Help/validation message below the textarea. */
30
26
  message?: React.ReactNode;
27
+ /** Bulma color for the message. */
31
28
  messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
29
+ /** Additional CSS classes for the Field. */
32
30
  fieldClassName?: string;
31
+ /** Additional CSS classes for the Control. */
33
32
  controlClassName?: string;
34
33
  }
35
34
  /**
36
- * TextArea is a convenience component that composes Field, Control, and TextAreaBase.
37
- *
38
- * Use this for typical form fields. For complex layouts (grouped fields,
39
- * addons, etc.), compose Field, Control, and TextAreaBase directly.
35
+ * The `TextArea` component provides a Bulma-styled multi-line text input, supporting color, size, rounded corners, static/read-only state, hover/focus/loading states, fixed size, and all Bulma helper props.
40
36
  *
41
37
  * @function
42
38
  * @param {TextAreaProps} props - Props for TextArea.
@@ -2,34 +2,33 @@ import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
3
  /**
4
4
  * Props for the TextArea component.
5
- *
6
- * @property {'primary'|'link'|'info'|'success'|'warning'|'danger'|'black'|'dark'|'light'|'white'} [color] - Bulma color modifier for the textarea.
7
- * @property {'small'|'medium'|'large'} [size] - Size modifier for the textarea.
8
- * @property {boolean} [isRounded] - Renders the textarea with rounded corners.
9
- * @property {boolean} [isStatic] - Renders the textarea as static text.
10
- * @property {boolean} [isHovered] - Applies the hovered state.
11
- * @property {boolean} [isFocused] - Applies the focused state.
12
- * @property {boolean} [isLoading] - Shows loading indicator.
13
- * @property {boolean} [isActive] - Applies Bulma's is-active modifier.
14
- * @property {boolean} [hasFixedSize] - Applies Bulma's has-fixed-size modifier.
15
- * @property {string} [className] - Additional CSS classes to apply.
16
- * @property {boolean} [disabled] - Whether the textarea is disabled.
17
- * @property {boolean} [readOnly] - Whether the textarea is read-only.
18
- * @property {number} [rows] - Number of visible text lines.
19
5
  */
20
6
  export interface TextAreaBaseProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
7
+ /** Bulma color modifier for the textarea. */
21
8
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
9
+ /** Size modifier for the textarea. */
22
10
  size?: 'small' | 'medium' | 'large';
11
+ /** Rounded textarea corners. */
23
12
  isRounded?: boolean;
13
+ /** Renders textarea as static (styled readonly). */
24
14
  isStatic?: boolean;
15
+ /** Applies hovered state. */
25
16
  isHovered?: boolean;
17
+ /** Applies focused state. */
26
18
  isFocused?: boolean;
19
+ /** Shows loading indicator on the wrapping Control. */
27
20
  isLoading?: boolean;
21
+ /** Applies Bulma's is-active modifier. */
28
22
  isActive?: boolean;
23
+ /** Fixed textarea size (no resize). */
29
24
  hasFixedSize?: boolean;
25
+ /** Additional CSS classes to apply. */
30
26
  className?: string;
27
+ /** Disables the textarea. */
31
28
  disabled?: boolean;
29
+ /** Read-only textarea. */
32
30
  readOnly?: boolean;
31
+ /** Number of visible text lines. */
33
32
  rows?: number;
34
33
  }
35
34
  /**
@@ -5,51 +5,52 @@ import { TimeInputBaseProps } from './TimeInputBase';
5
5
  /**
6
6
  * Props for the TimeInput convenience wrapper. Extends `TimeInputBaseProps`
7
7
  * with Field-level (label, horizontal) and Control-level (icons, loading) props.
8
- *
9
- * @property {React.ReactNode} [label] - Field label.
10
- * @property {FieldProps['labelSize']} [labelSize] - Size for the label.
11
- * @property {FieldProps['labelProps']} [labelProps] - Props for the label element.
12
- * @property {boolean} [horizontal] - Render the field with horizontal layout.
13
- * @property {ControlBaseProps['iconLeft']} [iconLeft] - Icon props for the left icon.
14
- * @property {ControlBaseProps['iconRight']} [iconRight] - Icon props for the right icon.
15
- * @property {string} [iconRightName] - Shortcut for the right icon name.
16
- * @property {ControlBaseProps['iconLeftSize']} [iconLeftSize] - Shortcut for left icon size.
17
- * @property {ControlBaseProps['iconRightSize']} [iconRightSize] - Shortcut for right icon size.
18
- * @property {boolean} [hasIconsLeft] - Force the left icon container.
19
- * @property {boolean} [hasIconsRight] - Force the right icon container.
20
- * @property {boolean} [isLoading] - Show a loading indicator on the control.
21
- * @property {boolean} [isExpanded] - Expand the control to fill its container.
22
- * @property {ControlBaseProps['size']} [controlSize] - Size of the wrapping Control.
23
- * @property {React.ReactNode} [message] - Help/validation text below the input.
24
- * @property {'primary'|'link'|'info'|'success'|'warning'|'danger'} [messageColor] - Message color.
25
- * @property {string} [fieldClassName] - Additional CSS classes for the Field wrapper.
26
- * @property {string} [controlClassName] - Additional CSS classes for the Control wrapper.
8
+ * @extraProp {string} [name] - Form field name.
9
+ * @extraProp {string} [form] - Form id the input belongs to.
10
+ * @extraProp {boolean} [required=false] - Marks the input as required.
11
+ * @extraProp {string} [className] - Additional CSS classes for the input.
12
+ * @extraProp {React.Ref<HTMLInputElement>} [ref] - Forwarded to the underlying `<input>`.
27
13
  */
28
14
  export interface TimeInputProps extends TimeInputBaseProps {
15
+ /** Field label. */
29
16
  label?: React.ReactNode;
17
+ /** Size for the label. */
30
18
  labelSize?: FieldProps['labelSize'];
19
+ /** Props for the label element. */
31
20
  labelProps?: FieldProps['labelProps'];
21
+ /** Render the field with horizontal layout. */
32
22
  horizontal?: boolean;
23
+ /** Icon props for the left icon. */
33
24
  iconLeft?: ControlBaseProps['iconLeft'];
25
+ /** Icon props for the right icon. */
34
26
  iconRight?: ControlBaseProps['iconRight'];
27
+ /** Shortcut for the right icon name. */
35
28
  iconRightName?: string;
29
+ /** Shortcut for left icon size. */
36
30
  iconLeftSize?: ControlBaseProps['iconLeftSize'];
31
+ /** Shortcut for right icon size. */
37
32
  iconRightSize?: ControlBaseProps['iconRightSize'];
33
+ /** Force the left icon container. */
38
34
  hasIconsLeft?: boolean;
35
+ /** Force the right icon container. */
39
36
  hasIconsRight?: boolean;
37
+ /** Show a loading indicator on the control. */
40
38
  isLoading?: boolean;
39
+ /** Expand the control to fill its container. */
41
40
  isExpanded?: boolean;
41
+ /** Size of the wrapping Control. */
42
42
  controlSize?: ControlBaseProps['size'];
43
+ /** Help/validation text below the input. */
43
44
  message?: React.ReactNode;
45
+ /** Color modifier for the help message. */
44
46
  messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
47
+ /** Additional CSS classes for the Field wrapper. */
45
48
  fieldClassName?: string;
49
+ /** Additional CSS classes for the Control wrapper. */
46
50
  controlClassName?: string;
47
51
  }
48
52
  /**
49
- * TimeInput is a form input that opens a popover spinner for time-of-day
50
- * selection. Supports 12h/24h, optional seconds, custom step increments,
51
- * min/max bounds, an unselectable-times predicate, and a native
52
- * `<input type="time">` fallback for touch devices.
53
+ * The `TimeInput` component is a form input that opens a popover spinner for time-of-day selection.
53
54
  *
54
55
  * @function
55
56
  * @param {TimeInputProps} props