@allxsmith/bestax-bulma 5.7.0 → 5.8.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.
Files changed (128) hide show
  1. package/AGENTS.md +28 -0
  2. package/CLAUDE.md +28 -0
  3. package/README.md +4 -0
  4. package/dist/index.cjs.js +3629 -37
  5. package/dist/index.cjs.js.map +1 -1
  6. package/dist/index.esm.js +3629 -37
  7. package/dist/index.esm.js.map +1 -1
  8. package/dist/types/columns/Column.d.ts +43 -0
  9. package/dist/types/columns/Columns.d.ts +38 -0
  10. package/dist/types/components/Avatar.d.ts +37 -0
  11. package/dist/types/components/Avatars.d.ts +13 -0
  12. package/dist/types/components/Badge.d.ts +42 -0
  13. package/dist/types/components/Breadcrumb.d.ts +28 -0
  14. package/dist/types/components/Card.d.ts +62 -0
  15. package/dist/types/components/Carousel.d.ts +70 -0
  16. package/dist/types/components/Collapse.d.ts +53 -0
  17. package/dist/types/components/Dialog.d.ts +94 -0
  18. package/dist/types/components/Dropdown.d.ts +44 -0
  19. package/dist/types/components/Loading.d.ts +55 -0
  20. package/dist/types/components/Menu.d.ts +48 -0
  21. package/dist/types/components/Message.d.ts +23 -0
  22. package/dist/types/components/Modal.d.ts +56 -0
  23. package/dist/types/components/Navbar.d.ts +159 -0
  24. package/dist/types/components/Pagination.d.ts +77 -0
  25. package/dist/types/components/Panel.d.ts +100 -0
  26. package/dist/types/components/Reveal.d.ts +43 -0
  27. package/dist/types/components/Sidebar.d.ts +40 -0
  28. package/dist/types/components/Steps.d.ts +65 -0
  29. package/dist/types/components/Tabs.d.ts +89 -0
  30. package/dist/types/components/Toast.d.ts +109 -0
  31. package/dist/types/components/Tooltip.d.ts +50 -0
  32. package/dist/types/elements/Block.d.ts +20 -0
  33. package/dist/types/elements/Box.d.ts +23 -1
  34. package/dist/types/elements/Button.d.ts +26 -0
  35. package/dist/types/elements/Buttons.d.ts +12 -0
  36. package/dist/types/elements/Code.d.ts +19 -0
  37. package/dist/types/elements/Content.d.ts +21 -0
  38. package/dist/types/elements/Delete.d.ts +22 -0
  39. package/dist/types/elements/Divider.d.ts +16 -0
  40. package/dist/types/elements/Emphasis.d.ts +19 -0
  41. package/dist/types/elements/Figure.d.ts +25 -0
  42. package/dist/types/elements/Icon.d.ts +28 -0
  43. package/dist/types/elements/IconText.d.ts +17 -0
  44. package/dist/types/elements/Image.d.ts +27 -0
  45. package/dist/types/elements/Link.d.ts +24 -0
  46. package/dist/types/elements/LinkButton.d.ts +26 -0
  47. package/dist/types/elements/ListItem.d.ts +20 -0
  48. package/dist/types/elements/Notification.d.ts +101 -0
  49. package/dist/types/elements/OrderedList.d.ts +11 -0
  50. package/dist/types/elements/Paragraph.d.ts +19 -0
  51. package/dist/types/elements/Pre.d.ts +19 -0
  52. package/dist/types/elements/Progress.d.ts +20 -0
  53. package/dist/types/elements/Skeleton.d.ts +31 -0
  54. package/dist/types/elements/Span.d.ts +18 -0
  55. package/dist/types/elements/Strong.d.ts +19 -0
  56. package/dist/types/elements/SubTitle.d.ts +27 -0
  57. package/dist/types/elements/Table.d.ts +15 -0
  58. package/dist/types/elements/Tag.d.ts +28 -0
  59. package/dist/types/elements/Tags.d.ts +8 -0
  60. package/dist/types/elements/Tbody.d.ts +19 -0
  61. package/dist/types/elements/Td.d.ts +24 -0
  62. package/dist/types/elements/Tfoot.d.ts +19 -0
  63. package/dist/types/elements/Th.d.ts +25 -0
  64. package/dist/types/elements/Thead.d.ts +19 -0
  65. package/dist/types/elements/Title.d.ts +28 -0
  66. package/dist/types/elements/Tr.d.ts +21 -0
  67. package/dist/types/elements/UnorderedList.d.ts +8 -0
  68. package/dist/types/form/Autocomplete.d.ts +67 -0
  69. package/dist/types/form/Checkbox.d.ts +44 -0
  70. package/dist/types/form/Checkboxes.d.ts +10 -0
  71. package/dist/types/form/Control.d.ts +36 -0
  72. package/dist/types/form/DateInput.d.ts +44 -0
  73. package/dist/types/form/DateInputBase.d.ts +47 -0
  74. package/dist/types/form/DateTimeInput.d.ts +42 -0
  75. package/dist/types/form/DateTimeInputBase.d.ts +56 -0
  76. package/dist/types/form/Field.d.ts +55 -0
  77. package/dist/types/form/File.d.ts +26 -0
  78. package/dist/types/form/FormContext.d.ts +46 -0
  79. package/dist/types/form/Input.d.ts +49 -0
  80. package/dist/types/form/InputBase.d.ts +22 -0
  81. package/dist/types/form/Numberinput.d.ts +46 -0
  82. package/dist/types/form/Radio.d.ts +44 -0
  83. package/dist/types/form/Radios.d.ts +10 -0
  84. package/dist/types/form/Rate.d.ts +71 -0
  85. package/dist/types/form/Select.d.ts +39 -0
  86. package/dist/types/form/SelectBase.d.ts +25 -0
  87. package/dist/types/form/Slider.d.ts +71 -0
  88. package/dist/types/form/Switch.d.ts +53 -0
  89. package/dist/types/form/Taginput.d.ts +77 -0
  90. package/dist/types/form/TextArea.d.ts +38 -0
  91. package/dist/types/form/TextAreaBase.d.ts +25 -0
  92. package/dist/types/form/TimeInput.d.ts +39 -0
  93. package/dist/types/form/TimeInputBase.d.ts +72 -0
  94. package/dist/types/form/_pickerInternals/Calendar.d.ts +6 -0
  95. package/dist/types/form/_pickerInternals/TimeWheels.d.ts +13 -0
  96. package/dist/types/form/_pickerInternals/audioTick.d.ts +47 -0
  97. package/dist/types/form/_pickerInternals/dateUtils.d.ts +13 -0
  98. package/dist/types/form/_pickerInternals/formatters.d.ts +19 -0
  99. package/dist/types/form/_pickerInternals/haptics.d.ts +23 -0
  100. package/dist/types/form/_pickerInternals/pickerTypes.d.ts +8 -0
  101. package/dist/types/form/_pickerInternals/segmentMap.d.ts +48 -0
  102. package/dist/types/form/_pickerInternals/useNativeMobilePicker.d.ts +1 -0
  103. package/dist/types/form/_pickerInternals/useSegmentedEntry.d.ts +30 -0
  104. package/dist/types/form/fieldProps.d.ts +12 -0
  105. package/dist/types/grid/Cell.d.ts +26 -0
  106. package/dist/types/grid/Grid.d.ts +33 -0
  107. package/dist/types/helpers/Config.d.ts +50 -0
  108. package/dist/types/helpers/Theme.d.ts +66 -0
  109. package/dist/types/helpers/bulmaClassHelpers.d.ts +97 -0
  110. package/dist/types/helpers/classNames.d.ts +50 -0
  111. package/dist/types/helpers/useBulmaClasses.d.ts +22 -0
  112. package/dist/types/helpers/useColorClasses.d.ts +20 -0
  113. package/dist/types/helpers/useFlexboxClasses.d.ts +34 -0
  114. package/dist/types/helpers/useOtherClasses.d.ts +27 -0
  115. package/dist/types/helpers/useSpacingClasses.d.ts +27 -0
  116. package/dist/types/helpers/useTypographyClasses.d.ts +32 -0
  117. package/dist/types/helpers/useVisibilityClasses.d.ts +25 -0
  118. package/dist/types/helpers/withSubComponents.d.ts +13 -0
  119. package/dist/types/layout/Container.d.ts +26 -0
  120. package/dist/types/layout/Footer.d.ts +23 -0
  121. package/dist/types/layout/Hero.d.ts +61 -0
  122. package/dist/types/layout/Level.d.ts +63 -0
  123. package/dist/types/layout/Media.d.ts +60 -0
  124. package/dist/types/layout/Section.d.ts +21 -0
  125. package/dist/types/skill-examples/ExampleMeta.d.ts +5 -0
  126. package/dist/types/skill-examples/ProfileCard.d.ts +13 -0
  127. package/llms.txt +9 -0
  128. package/package.json +13 -11
@@ -1,6 +1,16 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
3
  import { FormFieldProps } from './fieldProps';
4
+ /**
5
+ * Props for the Radios component.
6
+ *
7
+ * @property {string} [className] - Additional CSS classes to apply.
8
+ * @property {string} [name] - Form field name shared by every Radio in the group.
9
+ * @property {string} [value] - Currently-selected value (controlled mode).
10
+ * @property {string} [defaultValue] - Initial selected value (uncontrolled mode).
11
+ * @property {(value: string) => void} [onChange] - Fired when the selection changes. Receives the new value.
12
+ * @property {React.ReactNode} children - Radio elements to render in the group.
13
+ */
4
14
  export interface RadiosProps extends Omit<BulmaClassesProps, 'color'>, FormFieldProps {
5
15
  className?: string;
6
16
  name?: string;
@@ -1,16 +1,56 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
3
  import { FormFieldProps } from './fieldProps';
4
+ /** Available size modifiers for the Rate component. */
4
5
  export type RateSize = 'small' | 'medium' | 'large';
5
6
  type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
6
7
  type BulmaColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
8
+ /**
9
+ * Props for individual rate icons.
10
+ *
11
+ * @property {number} index - The index of this icon (0-based).
12
+ * @property {boolean} isActive - Whether this icon is currently active (filled).
13
+ * @property {boolean} isHovered - Whether this icon is currently hovered.
14
+ * @property {number} value - The current value.
15
+ * @property {number} fillPercent - Fill percentage for partial icons (0-100). Used with precision < 1.
16
+ */
7
17
  export interface RateIconProps {
18
+ /** The index of this icon (0-based) */
8
19
  index: number;
20
+ /** Whether this icon is currently active (filled) */
9
21
  isActive: boolean;
22
+ /** Whether this icon is currently hovered */
10
23
  isHovered: boolean;
24
+ /** The current value */
11
25
  value: number;
26
+ /** Fill percentage for partial icons (0-100). Used with precision < 1. */
12
27
  fillPercent: number;
13
28
  }
29
+ /**
30
+ * Props for the Rate component.
31
+ *
32
+ * @property {number} [value] - Controlled rating value.
33
+ * @property {number} [defaultValue] - Initial value for uncontrolled mode. Default: 0.
34
+ * @property {number} [max] - Maximum number of icons. Default: 5.
35
+ * @property {RateSize} [size] - Size modifier for the component.
36
+ * @property {boolean} [disabled] - Whether the rating is disabled.
37
+ * @property {boolean} [showScore] - Display the numeric score next to icons.
38
+ * @property {boolean} [showText] - Display text label for the current value.
39
+ * @property {string[]} [texts] - Text labels per rating level (used with showText).
40
+ * @property {(value: number) => void} [onChange] - Callback when the rating changes.
41
+ * @property {(props: RateIconProps) => React.ReactNode} [customIcon] - Custom icon render function.
42
+ * @property {boolean} [spaced] - Add spacing between icons.
43
+ * @property {boolean} [rtl] - Render icons in right-to-left order.
44
+ * @property {string} [iconName] - Font icon name (e.g., 'star'). When set, renders Icon instead of default SVG.
45
+ * @property {IconLibrary} [iconLibrary] - Icon library to use (defaults to ConfigProvider value or 'fa').
46
+ * @property {string} [iconVariant] - Icon style variant (e.g., 'solid', 'outlined').
47
+ * @property {string|string[]} [iconFeatures] - Additional icon modifiers.
48
+ * @property {BulmaColor} [color] - Bulma color for active icons.
49
+ * @property {number} [precision] - Granularity: 1 for whole stars, 0.5 for half, 0.25 for quarter. Default: 1.
50
+ * @property {string} [customText] - Text displayed after score (e.g., "(128 reviews)").
51
+ * @property {string} [name] - Form field name. When provided, a hidden input is rendered so the rating value is submitted with the surrounding form.
52
+ * @property {string} [form] - The id of the form this hidden input belongs to (for use outside the form element).
53
+ */
14
54
  export interface RateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'>, Omit<BulmaClassesProps, 'size'>, FormFieldProps {
15
55
  name?: string;
16
56
  form?: string;
@@ -26,13 +66,44 @@ export interface RateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
26
66
  customIcon?: (props: RateIconProps) => React.ReactNode;
27
67
  spaced?: boolean;
28
68
  rtl?: boolean;
69
+ /** Font icon name (e.g., 'star'). When set, renders <Icon> instead of default SVG. */
29
70
  iconName?: string;
71
+ /** Icon library to use (defaults to ConfigProvider value or 'fa'). */
30
72
  iconLibrary?: IconLibrary;
73
+ /** Icon style variant (e.g., 'solid', 'outlined'). */
31
74
  iconVariant?: string;
75
+ /** Additional icon modifiers. */
32
76
  iconFeatures?: string | string[];
77
+ /** Bulma color for active icons. */
33
78
  color?: BulmaColor;
79
+ /** Granularity: 1 for whole stars, 0.5 for half, 0.25 for quarter. */
34
80
  precision?: number;
81
+ /** Text displayed after score (e.g., "(128 reviews)"). */
35
82
  customText?: string;
36
83
  }
84
+ /**
85
+ * Rate component for star/icon-based ratings.
86
+ *
87
+ * Provides an interactive rating system with customizable icons,
88
+ * sizes, and display options. Works in controlled or uncontrolled modes.
89
+ * Supports icon libraries, Bulma color variants, and fractional precision.
90
+ *
91
+ * @function
92
+ * @param {RateProps} props - Props for the Rate component.
93
+ * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the container element.
94
+ * @returns {JSX.Element} The rendered rating component.
95
+ *
96
+ * @example
97
+ * // Basic 5-star rating
98
+ * <Rate defaultValue={3} />
99
+ *
100
+ * @example
101
+ * // With color and precision
102
+ * <Rate defaultValue={3.5} color="warning" precision={0.5} showScore />
103
+ *
104
+ * @example
105
+ * // With Font Awesome icons
106
+ * <Rate iconName="star" iconLibrary="fa" iconVariant="solid" />
107
+ */
37
108
  export declare const Rate: React.ForwardRefExoticComponent<RateProps & React.RefAttributes<HTMLDivElement>>;
38
109
  export default Rate;
@@ -2,6 +2,29 @@ import React from 'react';
2
2
  import { FieldProps } from './Field';
3
3
  import { ControlBaseProps } from './Control';
4
4
  import { SelectBaseProps } from './SelectBase';
5
+ /**
6
+ * Props for the Select component.
7
+ *
8
+ * Composes Field, Control, and SelectBase into a single convenience component.
9
+ * Supports all SelectBase props, plus Field-level (label, horizontal) and
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
+ */
5
28
  export interface SelectProps extends SelectBaseProps {
6
29
  label?: React.ReactNode;
7
30
  labelSize?: FieldProps['labelSize'];
@@ -19,5 +42,21 @@ export interface SelectProps extends SelectBaseProps {
19
42
  fieldClassName?: string;
20
43
  controlClassName?: string;
21
44
  }
45
+ /**
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.
50
+ *
51
+ * @function
52
+ * @param {SelectProps} props - Props for Select.
53
+ * @returns {JSX.Element} The composed field element.
54
+ *
55
+ * @example
56
+ * <Select label="Country" iconLeftName="globe">
57
+ * <option>United States</option>
58
+ * <option>Canada</option>
59
+ * </Select>
60
+ */
22
61
  export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
23
62
  export default Select;
@@ -1,5 +1,22 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
+ /**
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
+ */
3
20
  export interface SelectBaseProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
4
21
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
5
22
  size?: 'small' | 'medium' | 'large';
@@ -15,5 +32,13 @@ export interface SelectBaseProps extends Omit<React.SelectHTMLAttributes<HTMLSel
15
32
  multipleSize?: number;
16
33
  children?: React.ReactNode;
17
34
  }
35
+ /**
36
+ * Bulma Select component with full Bulma helper class support.
37
+ *
38
+ * @function
39
+ * @param {SelectBaseProps} props - Props for the SelectBase component.
40
+ * @returns {JSX.Element} The rendered select element.
41
+ * @see {@link https://bulma.io/documentation/form/select/ | Bulma Select documentation}
42
+ */
18
43
  export declare const SelectBase: React.ForwardRefExoticComponent<SelectBaseProps & React.RefAttributes<HTMLSelectElement>>;
19
44
  export default SelectBase;
@@ -1,14 +1,43 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
3
  import { FormFieldProps } from './fieldProps';
4
+ /** Valid sizes for the Slider component. */
4
5
  export type SliderSize = 'small' | 'medium' | 'large';
6
+ /** Valid colors for the Slider component. */
5
7
  export type SliderColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
8
+ /** Tooltip display mode for the Slider component. */
6
9
  export type SliderTooltip = 'auto' | 'always' | 'hidden';
10
+ /** Orientation of the Slider component. */
7
11
  export type SliderOrientation = 'horizontal' | 'vertical';
12
+ /**
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
+ */
8
18
  export interface SliderMark {
9
19
  value: number;
10
20
  label?: React.ReactNode;
11
21
  }
22
+ /**
23
+ * 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
+ */
12
41
  interface SliderBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'size' | 'onChange' | 'value' | 'defaultValue'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>, FormFieldProps {
13
42
  min?: number;
14
43
  max?: number;
@@ -26,6 +55,16 @@ interface SliderBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElemen
26
55
  getAriaValueText?: (value: number) => string;
27
56
  formatOutput?: (value: number) => string;
28
57
  }
58
+ /**
59
+ * 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
+ */
29
68
  export interface SliderSingleProps extends SliderBaseProps {
30
69
  range?: false;
31
70
  value?: number;
@@ -34,6 +73,18 @@ export interface SliderSingleProps extends SliderBaseProps {
34
73
  minDistance?: never;
35
74
  ariaLabel?: string;
36
75
  }
76
+ /**
77
+ * 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
+ */
37
88
  export interface SliderRangeProps extends SliderBaseProps {
38
89
  range: true;
39
90
  value?: [number, number];
@@ -44,6 +95,26 @@ export interface SliderRangeProps extends SliderBaseProps {
44
95
  nameLow?: string;
45
96
  nameHigh?: string;
46
97
  }
98
+ /** Props for the Slider component — a discriminated union of single and range modes. */
47
99
  export type SliderProps = SliderSingleProps | SliderRangeProps;
100
+ /**
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.
106
+ *
107
+ * @function
108
+ * @param {SliderProps} props - Props for the Slider component.
109
+ * @returns {JSX.Element} The rendered slider element.
110
+ *
111
+ * @example
112
+ * // Basic slider
113
+ * <Slider defaultValue={50} />
114
+ *
115
+ * @example
116
+ * // Range slider
117
+ * <Slider range defaultValue={[20, 80]} onChange={([low, high]) => {}} />
118
+ */
48
119
  export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
49
120
  export default Slider;
@@ -1,7 +1,31 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
3
+ /**
4
+ * Valid colors for the Switch component.
5
+ */
3
6
  export declare const switchColors: readonly ["primary", "link", "info", "success", "warning", "danger"];
7
+ /**
8
+ * Valid sizes for the Switch component.
9
+ */
4
10
  export declare const switchSizes: readonly ["small", "normal", "medium", "large"];
11
+ /**
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.
28
+ */
5
29
  export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
6
30
  color?: (typeof switchColors)[number];
7
31
  size?: (typeof switchSizes)[number];
@@ -13,5 +37,34 @@ export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
13
37
  textColor?: (typeof validColors)[number] | 'inherit' | 'current';
14
38
  children?: React.ReactNode;
15
39
  }
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.
45
+ *
46
+ * @function
47
+ * @param {SwitchProps} props - Props for the Switch component.
48
+ * @returns {JSX.Element} The rendered switch element.
49
+ *
50
+ * @example
51
+ * // Basic switch
52
+ * <Switch>Enable notifications</Switch>
53
+ *
54
+ * @example
55
+ * // Colored and rounded switch
56
+ * <Switch color="success" isRounded checked>
57
+ * Active
58
+ * </Switch>
59
+ *
60
+ * @example
61
+ * // Controlled switch
62
+ * <Switch
63
+ * checked={isEnabled}
64
+ * onChange={(e) => setIsEnabled(e.target.checked)}
65
+ * >
66
+ * Feature enabled
67
+ * </Switch>
68
+ */
16
69
  export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
17
70
  export default Switch;
@@ -1,13 +1,64 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
3
  import { FormFieldProps } from './fieldProps';
4
+ /**
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
+ */
4
10
  export interface TaginputItem {
5
11
  value: string;
6
12
  label?: string;
7
13
  [key: string]: unknown;
8
14
  }
15
+ /** A tag can be either a TaginputItem object or a plain string. */
9
16
  export type TaginputTag = TaginputItem | string;
10
17
  type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
18
+ /**
19
+ * 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.
61
+ */
11
62
  export interface TaginputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'>, Omit<BulmaClassesProps, 'color'>, FormFieldProps {
12
63
  value?: TaginputTag[];
13
64
  defaultValue?: TaginputTag[];
@@ -50,5 +101,31 @@ export interface TaginputProps extends Omit<React.HTMLAttributes<HTMLDivElement>
50
101
  onTyping?: (value: string) => void;
51
102
  tagTemplate?: (tag: TaginputTag) => React.ReactNode;
52
103
  }
104
+ /**
105
+ * Taginput component for managing multiple tags.
106
+ *
107
+ * Allows users to create, edit, and remove tags with optional
108
+ * autocomplete suggestions.
109
+ *
110
+ * @function
111
+ * @param {TaginputProps} props - Props for the Taginput component.
112
+ * @param {React.Ref<HTMLInputElement>} ref - Forwarded ref to the input element.
113
+ * @returns {JSX.Element} The rendered taginput component.
114
+ *
115
+ * @example
116
+ * // Basic usage
117
+ * <Taginput
118
+ * placeholder="Add a tag..."
119
+ * onChange={(tags) => console.log(tags)}
120
+ * />
121
+ *
122
+ * @example
123
+ * // With autocomplete
124
+ * <Taginput
125
+ * data={['React', 'Vue', 'Angular', 'Svelte']}
126
+ * allowNew={false}
127
+ * placeholder="Select frameworks..."
128
+ * />
129
+ */
53
130
  export declare const Taginput: React.ForwardRefExoticComponent<TaginputProps & React.RefAttributes<HTMLInputElement>>;
54
131
  export default Taginput;
@@ -2,6 +2,24 @@ import React from 'react';
2
2
  import { FieldProps } from './Field';
3
3
  import { ControlBaseProps } from './Control';
4
4
  import { TextAreaBaseProps } from './TextAreaBase';
5
+ /**
6
+ * Props for the TextArea component.
7
+ *
8
+ * Composes Field, Control, and TextAreaBase into a single convenience component.
9
+ * Supports all TextAreaBase props, plus Field-level (label, horizontal) and
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
+ */
5
23
  export interface TextAreaProps extends TextAreaBaseProps {
6
24
  label?: React.ReactNode;
7
25
  labelSize?: FieldProps['labelSize'];
@@ -14,5 +32,25 @@ export interface TextAreaProps extends TextAreaBaseProps {
14
32
  fieldClassName?: string;
15
33
  controlClassName?: string;
16
34
  }
35
+ /**
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.
40
+ *
41
+ * @function
42
+ * @param {TextAreaProps} props - Props for TextArea.
43
+ * @returns {JSX.Element} The composed field element.
44
+ *
45
+ * @example
46
+ * <TextArea label="Bio" placeholder="Tell us about yourself" rows={4} />
47
+ *
48
+ * @example
49
+ * <TextArea
50
+ * label="Comments"
51
+ * message="Max 500 characters"
52
+ * messageColor="info"
53
+ * />
54
+ */
17
55
  export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
18
56
  export default TextArea;
@@ -1,5 +1,22 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
+ /**
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
+ */
3
20
  export interface TextAreaBaseProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
4
21
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
5
22
  size?: 'small' | 'medium' | 'large';
@@ -15,5 +32,13 @@ export interface TextAreaBaseProps extends Omit<React.TextareaHTMLAttributes<HTM
15
32
  readOnly?: boolean;
16
33
  rows?: number;
17
34
  }
35
+ /**
36
+ * Bulma TextArea component with full Bulma helper class support.
37
+ *
38
+ * @function
39
+ * @param {TextAreaBaseProps} props - Props for the TextAreaBase component.
40
+ * @returns {JSX.Element} The rendered textarea element.
41
+ * @see {@link https://bulma.io/documentation/form/textarea/ | Bulma Textarea documentation}
42
+ */
18
43
  export declare const TextAreaBase: React.ForwardRefExoticComponent<TextAreaBaseProps & React.RefAttributes<HTMLTextAreaElement>>;
19
44
  export default TextAreaBase;
@@ -2,6 +2,29 @@ import React from 'react';
2
2
  import { FieldProps } from './Field';
3
3
  import { ControlBaseProps } from './Control';
4
4
  import { TimeInputBaseProps } from './TimeInputBase';
5
+ /**
6
+ * Props for the TimeInput convenience wrapper. Extends `TimeInputBaseProps`
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.
27
+ */
5
28
  export interface TimeInputProps extends TimeInputBaseProps {
6
29
  label?: React.ReactNode;
7
30
  labelSize?: FieldProps['labelSize'];
@@ -22,5 +45,21 @@ export interface TimeInputProps extends TimeInputBaseProps {
22
45
  fieldClassName?: string;
23
46
  controlClassName?: string;
24
47
  }
48
+ /**
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
+ *
54
+ * @function
55
+ * @param {TimeInputProps} props
56
+ * @returns {JSX.Element}
57
+ *
58
+ * @example
59
+ * <TimeInput label="Departure" defaultValue={new Date()} />
60
+ *
61
+ * @example
62
+ * <TimeInput label="Slot" hourFormat="12" incrementMinutes={15} />
63
+ */
25
64
  export declare const TimeInput: React.ForwardRefExoticComponent<TimeInputProps & React.RefAttributes<HTMLInputElement>>;
26
65
  export default TimeInput;