@allxsmith/bestax-bulma 5.7.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 (129) hide show
  1. package/AGENTS.md +28 -0
  2. package/CLAUDE.md +28 -0
  3. package/README.md +24 -0
  4. package/dist/index.cjs.js +3485 -55
  5. package/dist/index.cjs.js.map +1 -1
  6. package/dist/index.esm.js +3485 -55
  7. package/dist/index.esm.js.map +1 -1
  8. package/dist/types/columns/Column.d.ts +38 -0
  9. package/dist/types/columns/Columns.d.ts +31 -0
  10. package/dist/types/components/Avatar.d.ts +32 -0
  11. package/dist/types/components/Avatars.d.ts +12 -0
  12. package/dist/types/components/Badge.d.ts +34 -0
  13. package/dist/types/components/Breadcrumb.d.ts +25 -0
  14. package/dist/types/components/Card.d.ts +60 -0
  15. package/dist/types/components/Carousel.d.ts +70 -0
  16. package/dist/types/components/Collapse.d.ts +52 -0
  17. package/dist/types/components/Dialog.d.ts +89 -0
  18. package/dist/types/components/Dropdown.d.ts +42 -0
  19. package/dist/types/components/Loading.d.ts +50 -0
  20. package/dist/types/components/Menu.d.ts +44 -0
  21. package/dist/types/components/Message.d.ts +20 -0
  22. package/dist/types/components/Modal.d.ts +50 -0
  23. package/dist/types/components/Navbar.d.ts +147 -0
  24. package/dist/types/components/Pagination.d.ts +81 -0
  25. package/dist/types/components/Panel.d.ts +93 -0
  26. package/dist/types/components/Reveal.d.ts +37 -0
  27. package/dist/types/components/Sidebar.d.ts +37 -0
  28. package/dist/types/components/Steps.d.ts +56 -0
  29. package/dist/types/components/Tabs.d.ts +90 -0
  30. package/dist/types/components/Toast.d.ts +104 -0
  31. package/dist/types/components/Tooltip.d.ts +46 -0
  32. package/dist/types/elements/Block.d.ts +21 -0
  33. package/dist/types/elements/Box.d.ts +25 -1
  34. package/dist/types/elements/Button.d.ts +33 -0
  35. package/dist/types/elements/Buttons.d.ts +16 -0
  36. package/dist/types/elements/Code.d.ts +14 -0
  37. package/dist/types/elements/Content.d.ts +22 -0
  38. package/dist/types/elements/Delete.d.ts +24 -0
  39. package/dist/types/elements/Divider.d.ts +12 -0
  40. package/dist/types/elements/Emphasis.d.ts +14 -0
  41. package/dist/types/elements/Figure.d.ts +23 -0
  42. package/dist/types/elements/Icon.d.ts +28 -0
  43. package/dist/types/elements/IconText.d.ts +20 -0
  44. package/dist/types/elements/Image.d.ts +27 -0
  45. package/dist/types/elements/Link.d.ts +20 -0
  46. package/dist/types/elements/LinkButton.d.ts +20 -0
  47. package/dist/types/elements/ListItem.d.ts +15 -0
  48. package/dist/types/elements/Notification.d.ts +110 -0
  49. package/dist/types/elements/OrderedList.d.ts +10 -0
  50. package/dist/types/elements/Paragraph.d.ts +14 -0
  51. package/dist/types/elements/Pre.d.ts +14 -0
  52. package/dist/types/elements/Progress.d.ts +26 -0
  53. package/dist/types/elements/Skeleton.d.ts +22 -0
  54. package/dist/types/elements/Span.d.ts +14 -0
  55. package/dist/types/elements/Strong.d.ts +14 -0
  56. package/dist/types/elements/SubTitle.d.ts +25 -0
  57. package/dist/types/elements/Table.d.ts +14 -0
  58. package/dist/types/elements/Tag.d.ts +25 -0
  59. package/dist/types/elements/Tags.d.ts +7 -0
  60. package/dist/types/elements/Tbody.d.ts +18 -0
  61. package/dist/types/elements/Td.d.ts +23 -0
  62. package/dist/types/elements/Tfoot.d.ts +18 -0
  63. package/dist/types/elements/Th.d.ts +24 -0
  64. package/dist/types/elements/Thead.d.ts +18 -0
  65. package/dist/types/elements/Title.d.ts +26 -0
  66. package/dist/types/elements/Tr.d.ts +20 -0
  67. package/dist/types/elements/UnorderedList.d.ts +7 -0
  68. package/dist/types/form/Autocomplete.d.ts +64 -0
  69. package/dist/types/form/Checkbox.d.ts +33 -0
  70. package/dist/types/form/Checkboxes.d.ts +9 -0
  71. package/dist/types/form/Control.d.ts +37 -0
  72. package/dist/types/form/DateInput.d.ts +44 -0
  73. package/dist/types/form/DateInputBase.d.ts +49 -0
  74. package/dist/types/form/DateTimeInput.d.ts +42 -0
  75. package/dist/types/form/DateTimeInputBase.d.ts +58 -0
  76. package/dist/types/form/Field.d.ts +52 -0
  77. package/dist/types/form/File.d.ts +24 -0
  78. package/dist/types/form/FormContext.d.ts +46 -0
  79. package/dist/types/form/Input.d.ts +45 -0
  80. package/dist/types/form/InputBase.d.ts +21 -0
  81. package/dist/types/form/Numberinput.d.ts +43 -0
  82. package/dist/types/form/Radio.d.ts +33 -0
  83. package/dist/types/form/Radios.d.ts +9 -0
  84. package/dist/types/form/Rate.d.ts +55 -0
  85. package/dist/types/form/Select.d.ts +35 -0
  86. package/dist/types/form/SelectBase.d.ts +24 -0
  87. package/dist/types/form/Slider.d.ts +86 -0
  88. package/dist/types/form/Switch.d.ts +50 -0
  89. package/dist/types/form/Taginput.d.ts +74 -0
  90. package/dist/types/form/TextArea.d.ts +34 -0
  91. package/dist/types/form/TextAreaBase.d.ts +24 -0
  92. package/dist/types/form/TimeInput.d.ts +40 -0
  93. package/dist/types/form/TimeInputBase.d.ts +51 -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 +25 -0
  106. package/dist/types/grid/Grid.d.ts +32 -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/colorDeprecations.d.ts +17 -0
  112. package/dist/types/helpers/useBulmaClasses.d.ts +22 -0
  113. package/dist/types/helpers/useColorClasses.d.ts +20 -0
  114. package/dist/types/helpers/useFlexboxClasses.d.ts +34 -0
  115. package/dist/types/helpers/useOtherClasses.d.ts +27 -0
  116. package/dist/types/helpers/useSpacingClasses.d.ts +27 -0
  117. package/dist/types/helpers/useTypographyClasses.d.ts +32 -0
  118. package/dist/types/helpers/useVisibilityClasses.d.ts +25 -0
  119. package/dist/types/helpers/withSubComponents.d.ts +13 -0
  120. package/dist/types/layout/Container.d.ts +29 -0
  121. package/dist/types/layout/Footer.d.ts +22 -0
  122. package/dist/types/layout/Hero.d.ts +67 -0
  123. package/dist/types/layout/Level.d.ts +60 -0
  124. package/dist/types/layout/Media.d.ts +56 -0
  125. package/dist/types/layout/Section.d.ts +20 -0
  126. package/dist/types/skill-examples/ExampleMeta.d.ts +5 -0
  127. package/dist/types/skill-examples/ProfileCard.d.ts +13 -0
  128. package/llms.txt +9 -0
  129. package/package.json +30 -28
@@ -2,26 +2,71 @@ import React from 'react';
2
2
  import { FieldProps } from './Field';
3
3
  import { ControlBaseProps } from './Control';
4
4
  import { InputBaseProps } from './InputBase';
5
+ /**
6
+ * Props for the Input component.
7
+ *
8
+ * Composes Field, Control, and Input into a single convenience component.
9
+ * Supports all Input props, plus Field-level (label, horizontal) and
10
+ * Control-level (icons, loading) props.
11
+ */
5
12
  export interface InputProps extends InputBaseProps {
13
+ /** Field label. */
6
14
  label?: React.ReactNode;
15
+ /** Size for the label. */
7
16
  labelSize?: FieldProps['labelSize'];
17
+ /** Props for the label element. */
8
18
  labelProps?: FieldProps['labelProps'];
19
+ /** Horizontal field layout. */
9
20
  horizontal?: boolean;
21
+ /** Icon props for left icon. */
10
22
  iconLeft?: ControlBaseProps['iconLeft'];
23
+ /** Icon props for right icon. */
11
24
  iconRight?: ControlBaseProps['iconRight'];
25
+ /** Shortcut for left icon name. */
12
26
  iconLeftName?: string;
27
+ /** Shortcut for right icon name. */
13
28
  iconRightName?: string;
29
+ /** Shortcut for left icon size. */
14
30
  iconLeftSize?: ControlBaseProps['iconLeftSize'];
31
+ /** Shortcut for right icon size. */
15
32
  iconRightSize?: ControlBaseProps['iconRightSize'];
33
+ /** Force left icon container. */
16
34
  hasIconsLeft?: boolean;
35
+ /** Force right icon container. */
17
36
  hasIconsRight?: boolean;
37
+ /** Shows loading indicator. */
18
38
  isLoading?: boolean;
39
+ /** Expand the control. */
19
40
  isExpanded?: boolean;
41
+ /** Control size. */
20
42
  controlSize?: ControlBaseProps['size'];
43
+ /** Help/validation message below the input. */
21
44
  message?: React.ReactNode;
45
+ /** Bulma color for the message. */
22
46
  messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
47
+ /** Additional CSS classes for the Field. */
23
48
  fieldClassName?: string;
49
+ /** Additional CSS classes for the Control. */
24
50
  controlClassName?: string;
25
51
  }
52
+ /**
53
+ * The `Input` component provides a Bulma-styled text input, supporting colors, sizes, rounded corners, static/read-only state, hover/focus/loading states, and all Bulma helper props.
54
+ *
55
+ * @function
56
+ * @param {InputProps} props - Props for Input.
57
+ * @returns {JSX.Element} The composed field element.
58
+ *
59
+ * @example
60
+ * <Input label="Username" placeholder="Enter username" iconLeftName="user" />
61
+ *
62
+ * @example
63
+ * <Input
64
+ * label="Email"
65
+ * type="email"
66
+ * message="Please enter a valid email"
67
+ * messageColor="danger"
68
+ * color="danger"
69
+ * />
70
+ */
26
71
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
27
72
  export default Input;
@@ -1,16 +1,37 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
+ /**
4
+ * Props for the Input component.
5
+ */
3
6
  export interface InputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
7
+ /** Bulma color modifier for the input. */
4
8
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
9
+ /** Size modifier for the input. */
5
10
  size?: 'small' | 'medium' | 'large';
11
+ /** Rounded input corners. */
6
12
  isRounded?: boolean;
13
+ /** Renders input as static (read only, styled). */
7
14
  isStatic?: boolean;
15
+ /** Applies hovered state. */
8
16
  isHovered?: boolean;
17
+ /** Applies focused state. */
9
18
  isFocused?: boolean;
19
+ /** Shows loading indicator. */
10
20
  isLoading?: boolean;
21
+ /** Additional CSS classes to apply. */
11
22
  className?: string;
23
+ /** Disabled input. */
12
24
  disabled?: boolean;
25
+ /** Read-only input. */
13
26
  readOnly?: boolean;
14
27
  }
28
+ /**
29
+ * Bulma Input component with full Bulma helper class support.
30
+ *
31
+ * @function
32
+ * @param {InputBaseProps} props - Props for the Input component.
33
+ * @returns {JSX.Element} The rendered input element.
34
+ * @see {@link https://bulma.io/documentation/form/input/ | Bulma Input documentation}
35
+ */
15
36
  export declare const InputBase: React.ForwardRefExoticComponent<InputBaseProps & React.RefAttributes<HTMLInputElement>>;
16
37
  export default InputBase;
@@ -1,30 +1,73 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
3
  import { FormFieldProps } from './fieldProps';
4
+ /** Valid sizes for the Numberinput component. */
4
5
  export type NumberinputSize = 'small' | 'medium' | 'large';
6
+ /** Valid colors for the Numberinput wrapper and control buttons. */
5
7
  export type NumberinputColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'light' | 'dark';
8
+ /** Valid colors for the Numberinput inner input element. */
6
9
  export type NumberinputInputColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
10
+ /** Position of the increment/decrement control buttons. */
7
11
  export type NumberinputControlsPosition = 'left' | 'right' | 'both';
12
+ /** Visual variant for the Numberinput controls. */
8
13
  export type NumberinputVariant = 'plusminus' | 'stepper';
14
+ /**
15
+ * Props for the Numberinput component.
16
+ * @extraProp {string} [className] - Additional CSS classes.
17
+ * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the input element.
18
+ */
9
19
  export interface NumberinputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'size' | 'onChange' | 'value' | 'defaultValue' | 'type'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>, FormFieldProps {
20
+ /** Controlled value. */
10
21
  value?: number;
22
+ /** Default value for uncontrolled usage. */
11
23
  defaultValue?: number;
24
+ /** Minimum allowed value. */
12
25
  min?: number;
26
+ /** Maximum allowed value. */
13
27
  max?: number;
28
+ /** Step increment (default: 1). */
14
29
  step?: number;
30
+ /** Size variant. */
15
31
  size?: NumberinputSize;
32
+ /** Color variant for buttons. */
16
33
  color?: NumberinputColor;
34
+ /** Color of the input field itself. */
17
35
  inputColor?: NumberinputInputColor;
36
+ /** Position of +/- buttons. */
18
37
  controlsPosition?: NumberinputControlsPosition;
38
+ /** Use rounded buttons. */
19
39
  controlsRounded?: boolean;
40
+ /** Uses compact button spacing. */
20
41
  compact?: boolean;
42
+ /** Removes button borders and background. */
21
43
  bare?: boolean;
44
+ /** Style variant for the control buttons. */
22
45
  variant?: NumberinputVariant;
46
+ /** Whether the input is disabled. */
23
47
  disabled?: boolean;
48
+ /** Whether the input can be typed in. */
24
49
  editable?: boolean;
50
+ /** Shows a loading state. */
25
51
  isLoading?: boolean;
52
+ /** Enables exponential step increments when holding buttons. */
26
53
  exponential?: boolean;
54
+ /** Callback when value changes. */
27
55
  onChange?: (value: number) => void;
28
56
  }
57
+ /**
58
+ * The `Numberinput` component provides a number input with increment/decrement buttons.
59
+ *
60
+ * @function
61
+ * @param {NumberinputProps} props - Props for the Numberinput component.
62
+ * @returns {JSX.Element} The rendered numeric input element.
63
+ *
64
+ * @example
65
+ * // Basic number input
66
+ * <Numberinput defaultValue={5} min={0} max={100} />
67
+ *
68
+ * @example
69
+ * // Stepper variant with color
70
+ * <Numberinput variant="stepper" color="primary" step={10} />
71
+ */
29
72
  export declare const Numberinput: React.ForwardRefExoticComponent<NumberinputProps & React.RefAttributes<HTMLInputElement>>;
30
73
  export default Numberinput;
@@ -1,14 +1,47 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
3
+ /**
4
+ * Valid colors for the Radio component.
5
+ */
3
6
  export declare const radioColors: readonly ["primary", "link", "info", "success", "warning", "danger"];
7
+ /**
8
+ * Valid sizes for the Radio component.
9
+ */
4
10
  export declare const radioSizes: readonly ["small", "normal", "medium", "large"];
11
+ /**
12
+ * Props for the Radio component.
13
+ */
5
14
  export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
15
+ /** Color of the radio button. */
6
16
  color?: (typeof radioColors)[number];
17
+ /** Size of the radio button. */
7
18
  size?: (typeof radioSizes)[number];
19
+ /** Text color helper. */
8
20
  textColor?: (typeof validColors)[number] | 'inherit' | 'current';
21
+ /** Whether the radio is disabled. */
9
22
  disabled?: boolean;
23
+ /** Additional CSS classes to apply. */
10
24
  className?: string;
25
+ /** The label/content for the radio. */
11
26
  children?: React.ReactNode;
12
27
  }
28
+ /**
29
+ * The `Radio` component provides a Bulma-styled radio button input with flexible labels and helper classes.
30
+ *
31
+ * @function
32
+ * @param {RadioProps} props - Props for the Radio component.
33
+ * @returns {JSX.Element} The rendered radio element.
34
+ *
35
+ * @example
36
+ * // Basic radio
37
+ * <Radio name="option">Option A</Radio>
38
+ *
39
+ * @example
40
+ * // Inside a group
41
+ * <Radios name="color" defaultValue="red">
42
+ * <Radio value="red">Red</Radio>
43
+ * <Radio value="blue">Blue</Radio>
44
+ * </Radios>
45
+ */
13
46
  export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
14
47
  export default Radio;
@@ -1,12 +1,21 @@
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
+ */
4
7
  export interface RadiosProps extends Omit<BulmaClassesProps, 'color'>, FormFieldProps {
8
+ /** Additional CSS classes to apply. */
5
9
  className?: string;
10
+ /** Form field name shared by every Radio in the group (via context). */
6
11
  name?: string;
12
+ /** Currently-selected value (controlled mode). */
7
13
  value?: string;
14
+ /** Initial selected value (uncontrolled mode). */
8
15
  defaultValue?: string;
16
+ /** Fires when the selection changes. */
9
17
  onChange?: (value: string) => void;
18
+ /** Radio elements to render in the group. */
10
19
  children: React.ReactNode;
11
20
  }
12
21
  export declare const Radios: React.FC<RadiosProps> & {
@@ -1,38 +1,93 @@
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
+ */
7
11
  export interface RateIconProps {
12
+ /** The index of this icon (0-based) */
8
13
  index: number;
14
+ /** Whether this icon is currently active (filled) */
9
15
  isActive: boolean;
16
+ /** Whether this icon is currently hovered */
10
17
  isHovered: boolean;
18
+ /** The current value */
11
19
  value: number;
20
+ /** Fill percentage for partial icons (0-100). Used with precision < 1. */
12
21
  fillPercent: number;
13
22
  }
23
+ /**
24
+ * Props for the Rate component.
25
+ * @extraProp {string} [className] - Additional CSS classes.
26
+ * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the container element.
27
+ */
14
28
  export interface RateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'>, Omit<BulmaClassesProps, 'size'>, FormFieldProps {
29
+ /** Form field name. When set, a hidden input is rendered. */
15
30
  name?: string;
31
+ /** Optional id of the form this hidden input belongs to (use when the input lives outside the form element). */
16
32
  form?: string;
33
+ /** Controlled value (0 to max). */
17
34
  value?: number;
35
+ /** Default value for uncontrolled usage. */
18
36
  defaultValue?: number;
37
+ /** Maximum rating value. */
19
38
  max?: number;
39
+ /** Size variant. */
20
40
  size?: RateSize;
41
+ /** Whether the rating is disabled. */
21
42
  disabled?: boolean;
43
+ /** Show the numeric score next to stars. */
22
44
  showScore?: boolean;
45
+ /** Show custom text based on value. */
23
46
  showText?: boolean;
47
+ /** Array of text labels for each rating value. */
24
48
  texts?: string[];
49
+ /** Callback when rating changes. */
25
50
  onChange?: (value: number) => void;
51
+ /** Custom icon renderer. */
26
52
  customIcon?: (props: RateIconProps) => React.ReactNode;
53
+ /** Add spacing between icons. */
27
54
  spaced?: boolean;
55
+ /** Right-to-left direction. */
28
56
  rtl?: boolean;
57
+ /** Custom icon name for the rating stars. */
29
58
  iconName?: string;
59
+ /** Icon library to use (defaults to ConfigProvider value or 'fa'). */
30
60
  iconLibrary?: IconLibrary;
61
+ /** Icon style variant (e.g., 'solid', 'outlined'). */
31
62
  iconVariant?: string;
63
+ /** Additional icon modifiers. */
32
64
  iconFeatures?: string | string[];
65
+ /** Color of the active rating icons. */
33
66
  color?: BulmaColor;
67
+ /** Rating precision (e.g., `0.5` for half stars). */
34
68
  precision?: number;
69
+ /** Custom text displayed next to the rating. */
35
70
  customText?: string;
36
71
  }
72
+ /**
73
+ * The `Rate` component provides a star/icon-based rating system.
74
+ *
75
+ * @function
76
+ * @param {RateProps} props - Props for the Rate component.
77
+ * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the container element.
78
+ * @returns {JSX.Element} The rendered rating component.
79
+ *
80
+ * @example
81
+ * // Basic 5-star rating
82
+ * <Rate defaultValue={3} />
83
+ *
84
+ * @example
85
+ * // With color and precision
86
+ * <Rate defaultValue={3.5} color="warning" precision={0.5} showScore />
87
+ *
88
+ * @example
89
+ * // With Font Awesome icons
90
+ * <Rate iconName="star" iconLibrary="fa" iconVariant="solid" />
91
+ */
37
92
  export declare const Rate: React.ForwardRefExoticComponent<RateProps & React.RefAttributes<HTMLDivElement>>;
38
93
  export default Rate;
@@ -2,22 +2,57 @@ 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
+ */
5
12
  export interface SelectProps extends SelectBaseProps {
13
+ /** Field label. */
6
14
  label?: React.ReactNode;
15
+ /** Size for the label. */
7
16
  labelSize?: FieldProps['labelSize'];
17
+ /** Props for the label element. */
8
18
  labelProps?: FieldProps['labelProps'];
19
+ /** Horizontal field layout. */
9
20
  horizontal?: boolean;
21
+ /** Icon props for left icon. */
10
22
  iconLeft?: ControlBaseProps['iconLeft'];
23
+ /** Shortcut for left icon name. */
11
24
  iconLeftName?: string;
25
+ /** Shortcut for left icon size. */
12
26
  iconLeftSize?: ControlBaseProps['iconLeftSize'];
27
+ /** Force left icon container. */
13
28
  hasIconsLeft?: boolean;
29
+ /** Shows loading indicator. */
14
30
  isLoading?: boolean;
31
+ /** Expand the control. */
15
32
  isExpanded?: boolean;
33
+ /** Control size. */
16
34
  controlSize?: ControlBaseProps['size'];
35
+ /** Help/validation message below the select. */
17
36
  message?: React.ReactNode;
37
+ /** Bulma color for the message. */
18
38
  messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
39
+ /** Additional CSS classes for the Field. */
19
40
  fieldClassName?: string;
41
+ /** Additional CSS classes for the Control. */
20
42
  controlClassName?: string;
21
43
  }
44
+ /**
45
+ * The `Select` component provides a Bulma-styled dropdown for selecting one or more options.
46
+ *
47
+ * @function
48
+ * @param {SelectProps} props - Props for Select.
49
+ * @returns {JSX.Element} The composed field element.
50
+ *
51
+ * @example
52
+ * <Select label="Country" iconLeftName="globe">
53
+ * <option>United States</option>
54
+ * <option>Canada</option>
55
+ * </Select>
56
+ */
22
57
  export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
23
58
  export default Select;
@@ -1,19 +1,43 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps } from '../helpers/useBulmaClasses';
3
+ /**
4
+ * Props for the Select component.
5
+ */
3
6
  export interface SelectBaseProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
7
+ /** Bulma color modifier for the select. */
4
8
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
9
+ /** Size modifier for the select. */
5
10
  size?: 'small' | 'medium' | 'large';
11
+ /** Rounded select corners. */
6
12
  isRounded?: boolean;
13
+ /** Shows loading indicator. */
7
14
  isLoading?: boolean;
15
+ /** Applies Bulma's is-active modifier. */
8
16
  isActive?: boolean;
17
+ /** Forces hovered state on the inner select. */
9
18
  isHovered?: boolean;
19
+ /** Forces focused state on the inner select. */
10
20
  isFocused?: boolean;
21
+ /** Makes the select span the full width of parent. */
11
22
  isFullwidth?: boolean;
23
+ /** Additional CSS classes to apply. */
12
24
  className?: string;
25
+ /** Disables the select. */
13
26
  disabled?: boolean;
27
+ /** Allows multiple selections. */
14
28
  multiple?: boolean;
29
+ /** Number of visible options in multiselect. */
15
30
  multipleSize?: number;
31
+ /** `<option>` elements. */
16
32
  children?: React.ReactNode;
17
33
  }
34
+ /**
35
+ * Bulma Select component with full Bulma helper class support.
36
+ *
37
+ * @function
38
+ * @param {SelectBaseProps} props - Props for the SelectBase component.
39
+ * @returns {JSX.Element} The rendered select element.
40
+ * @see {@link https://bulma.io/documentation/form/select/ | Bulma Select documentation}
41
+ */
18
42
  export declare const SelectBase: React.ForwardRefExoticComponent<SelectBaseProps & React.RefAttributes<HTMLSelectElement>>;
19
43
  export default SelectBase;
@@ -1,49 +1,135 @@
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
+ */
8
15
  export interface SliderMark {
16
+ /** Controlled value. */
9
17
  value: number;
18
+ /** Optional label rendered below the tick mark. */
10
19
  label?: React.ReactNode;
11
20
  }
21
+ /**
22
+ * Shared base props for single and range Slider modes.
23
+ */
12
24
  interface SliderBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'size' | 'onChange' | 'value' | 'defaultValue'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>, FormFieldProps {
25
+ /** Minimum value. */
13
26
  min?: number;
27
+ /** Maximum value. */
14
28
  max?: number;
29
+ /** Step increment (default: 1). */
15
30
  step?: number;
31
+ /** Size variant. */
16
32
  size?: SliderSize;
33
+ /** Color variant. */
17
34
  color?: SliderColor;
35
+ /** Use rounded track ends. */
18
36
  isRounded?: boolean;
37
+ /** Use circular thumb. */
19
38
  isCircle?: boolean;
39
+ /** Show current value tooltip. */
20
40
  showOutput?: boolean;
41
+ /** Controls tooltip visibility on the thumb. */
21
42
  tooltip?: SliderTooltip;
43
+ /** Shows tick marks along the track. */
22
44
  ticks?: boolean;
45
+ /** Custom labeled marks along the track. Each mark has `{ value: number; label?: ReactNode }`. */
23
46
  marks?: SliderMark[];
47
+ /** Orientation of the slider. */
24
48
  orientation?: SliderOrientation;
49
+ /** Function to scale the displayed value. */
25
50
  scale?: (value: number) => number;
51
+ /** Function to generate the `aria-valuetext` attribute. */
26
52
  getAriaValueText?: (value: number) => string;
53
+ /** Format function for output display. */
27
54
  formatOutput?: (value: number) => string;
28
55
  }
56
+ /**
57
+ * Props for the Slider in single-value mode.
58
+ */
29
59
  export interface SliderSingleProps extends SliderBaseProps {
60
+ /**
61
+ * Enables range mode with two thumbs.
62
+ * @defaultValue false
63
+ */
30
64
  range?: false;
65
+ /** Controlled value. */
31
66
  value?: number;
67
+ /**
68
+ * Default value for uncontrolled usage.
69
+ * @defaultValue 0
70
+ */
32
71
  defaultValue?: number;
72
+ /** Callback when value changes. */
33
73
  onChange?: (value: number) => void;
74
+ /**
75
+ * Minimum distance between thumbs in range mode.
76
+ * @defaultValue 0
77
+ */
34
78
  minDistance?: never;
79
+ /** ARIA label(s) for the slider thumb(s). */
35
80
  ariaLabel?: string;
36
81
  }
82
+ /**
83
+ * Props for the Slider in range (dual-thumb) mode.
84
+ */
37
85
  export interface SliderRangeProps extends SliderBaseProps {
86
+ /**
87
+ * Enables range mode with two thumbs.
88
+ * @defaultValue false
89
+ */
38
90
  range: true;
91
+ /** Controlled value. */
39
92
  value?: [number, number];
93
+ /**
94
+ * Default value for uncontrolled usage.
95
+ * @defaultValue 0
96
+ */
40
97
  defaultValue?: [number, number];
98
+ /** Callback when value changes. */
41
99
  onChange?: (value: [number, number]) => void;
100
+ /**
101
+ * Minimum distance between thumbs in range mode.
102
+ * @defaultValue 0
103
+ */
42
104
  minDistance?: number;
105
+ /** ARIA label(s) for the slider thumb(s). */
43
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. */
44
108
  nameLow?: string;
109
+ /** Form field name for the high thumb. */
45
110
  nameHigh?: string;
46
111
  }
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
+ */
47
118
  export type SliderProps = SliderSingleProps | SliderRangeProps;
119
+ /**
120
+ * The `Slider` component provides a range slider input for selecting values within a range.
121
+ *
122
+ * @function
123
+ * @param {SliderProps} props - Props for the Slider component.
124
+ * @returns {JSX.Element} The rendered slider element.
125
+ *
126
+ * @example
127
+ * // Basic slider
128
+ * <Slider defaultValue={50} />
129
+ *
130
+ * @example
131
+ * // Range slider
132
+ * <Slider range defaultValue={[20, 80]} onChange={([low, high]) => {}} />
133
+ */
48
134
  export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
49
135
  export default Slider;
@@ -1,17 +1,67 @@
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
+ * @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.
19
+ */
5
20
  export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
21
+ /** Color variant for the switch. */
6
22
  color?: (typeof switchColors)[number];
23
+ /** Size of the switch. */
7
24
  size?: (typeof switchSizes)[number];
25
+ /** Use rounded switch style. */
8
26
  isRounded?: boolean;
27
+ /** Use thin switch style. */
9
28
  isThin?: boolean;
29
+ /** Use outlined switch style. */
10
30
  isOutlined?: boolean;
31
+ /** Right-to-left layout (label on left). */
11
32
  isRtl?: boolean;
33
+ /** Color when the switch is in the off/passive state. */
12
34
  passiveType?: (typeof switchColors)[number];
35
+ /** Text color helper. */
13
36
  textColor?: (typeof validColors)[number] | 'inherit' | 'current';
37
+ /** Label content for the switch. */
14
38
  children?: React.ReactNode;
15
39
  }
40
+ /**
41
+ * The `Switch` component provides a toggle switch for boolean on/off states.
42
+ *
43
+ * @function
44
+ * @param {SwitchProps} props - Props for the Switch component.
45
+ * @returns {JSX.Element} The rendered switch element.
46
+ *
47
+ * @example
48
+ * // Basic switch
49
+ * <Switch>Enable notifications</Switch>
50
+ *
51
+ * @example
52
+ * // Colored and rounded switch
53
+ * <Switch color="success" isRounded checked>
54
+ * Active
55
+ * </Switch>
56
+ *
57
+ * @example
58
+ * // Controlled switch
59
+ * <Switch
60
+ * checked={isEnabled}
61
+ * onChange={(e) => setIsEnabled(e.target.checked)}
62
+ * >
63
+ * Feature enabled
64
+ * </Switch>
65
+ */
16
66
  export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
17
67
  export default Switch;