@allxsmith/bestax-bulma 5.16.4 → 5.16.6

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 (133) hide show
  1. package/dist/types-cjs/columns/Column.d.ts +68 -0
  2. package/dist/types-cjs/columns/Columns.d.ts +63 -0
  3. package/dist/types-cjs/components/Avatar.d.ts +91 -0
  4. package/dist/types-cjs/components/Avatars.d.ts +30 -0
  5. package/dist/types-cjs/components/Badge.d.ts +56 -0
  6. package/dist/types-cjs/components/Breadcrumb.d.ts +42 -0
  7. package/dist/types-cjs/components/Card.d.ts +166 -0
  8. package/dist/types-cjs/components/Carousel.d.ts +104 -0
  9. package/dist/types-cjs/components/Collapse.d.ts +69 -0
  10. package/dist/types-cjs/components/Dialog.d.ts +142 -0
  11. package/dist/types-cjs/components/Dropdown.d.ts +104 -0
  12. package/dist/types-cjs/components/Loading.d.ts +68 -0
  13. package/dist/types-cjs/components/Menu.d.ts +100 -0
  14. package/dist/types-cjs/components/Message.d.ts +51 -0
  15. package/dist/types-cjs/components/Modal.d.ts +126 -0
  16. package/dist/types-cjs/components/Navbar.d.ts +302 -0
  17. package/dist/types-cjs/components/Pagination.d.ts +130 -0
  18. package/dist/types-cjs/components/Panel.d.ts +147 -0
  19. package/dist/types-cjs/components/Reveal.d.ts +47 -0
  20. package/dist/types-cjs/components/Sidebar.d.ts +76 -0
  21. package/dist/types-cjs/components/Steps.d.ts +101 -0
  22. package/dist/types-cjs/components/Tabs.d.ts +160 -0
  23. package/dist/types-cjs/components/Toast.d.ts +150 -0
  24. package/dist/types-cjs/components/Tooltip.d.ts +68 -0
  25. package/dist/types-cjs/elements/Block.d.ts +31 -0
  26. package/dist/types-cjs/elements/Box.d.ts +41 -0
  27. package/dist/types-cjs/elements/Button.d.ts +74 -0
  28. package/dist/types-cjs/elements/Buttons.d.ts +40 -0
  29. package/dist/types-cjs/elements/Code.d.ts +23 -0
  30. package/dist/types-cjs/elements/Content.d.ts +34 -0
  31. package/dist/types-cjs/elements/Delete.d.ts +38 -0
  32. package/dist/types-cjs/elements/Divider.d.ts +19 -0
  33. package/dist/types-cjs/elements/Emphasis.d.ts +23 -0
  34. package/dist/types-cjs/elements/Figure.d.ts +40 -0
  35. package/dist/types-cjs/elements/Icon.d.ts +138 -0
  36. package/dist/types-cjs/elements/IconText.d.ts +40 -0
  37. package/dist/types-cjs/elements/Image.d.ts +44 -0
  38. package/dist/types-cjs/elements/Link.d.ts +55 -0
  39. package/dist/types-cjs/elements/LinkButton.d.ts +57 -0
  40. package/dist/types-cjs/elements/ListItem.d.ts +24 -0
  41. package/dist/types-cjs/elements/Notification.d.ts +148 -0
  42. package/dist/types-cjs/elements/OrderedList.d.ts +21 -0
  43. package/dist/types-cjs/elements/Paragraph.d.ts +23 -0
  44. package/dist/types-cjs/elements/Pre.d.ts +23 -0
  45. package/dist/types-cjs/elements/Progress.d.ts +36 -0
  46. package/dist/types-cjs/elements/Skeleton.d.ts +30 -0
  47. package/dist/types-cjs/elements/Span.d.ts +23 -0
  48. package/dist/types-cjs/elements/Strong.d.ts +23 -0
  49. package/dist/types-cjs/elements/SubTitle.d.ts +41 -0
  50. package/dist/types-cjs/elements/Table.d.ts +36 -0
  51. package/dist/types-cjs/elements/Tag.d.ts +45 -0
  52. package/dist/types-cjs/elements/Tags.d.ts +32 -0
  53. package/dist/types-cjs/elements/Tbody.d.ts +25 -0
  54. package/dist/types-cjs/elements/Td.d.ts +33 -0
  55. package/dist/types-cjs/elements/Tfoot.d.ts +25 -0
  56. package/dist/types-cjs/elements/Th.d.ts +38 -0
  57. package/dist/types-cjs/elements/Thead.d.ts +25 -0
  58. package/dist/types-cjs/elements/Title.d.ts +43 -0
  59. package/dist/types-cjs/elements/Tr.d.ts +30 -0
  60. package/dist/types-cjs/elements/UnorderedList.d.ts +18 -0
  61. package/dist/types-cjs/elements/iconProps.d.ts +30 -0
  62. package/dist/types-cjs/form/Autocomplete.d.ts +114 -0
  63. package/dist/types-cjs/form/Checkbox.d.ts +47 -0
  64. package/dist/types-cjs/form/Checkboxes.d.ts +30 -0
  65. package/dist/types-cjs/form/Control.d.ts +68 -0
  66. package/dist/types-cjs/form/DateInput.d.ts +70 -0
  67. package/dist/types-cjs/form/DateInputBase.d.ts +91 -0
  68. package/dist/types-cjs/form/DateTimeInput.d.ts +68 -0
  69. package/dist/types-cjs/form/DateTimeInputBase.d.ts +108 -0
  70. package/dist/types-cjs/form/Field.d.ts +101 -0
  71. package/dist/types-cjs/form/File.d.ts +52 -0
  72. package/dist/types-cjs/form/FormContext.d.ts +78 -0
  73. package/dist/types-cjs/form/Input.d.ts +72 -0
  74. package/dist/types-cjs/form/InputBase.d.ts +37 -0
  75. package/dist/types-cjs/form/Numberinput.d.ts +83 -0
  76. package/dist/types-cjs/form/Radio.d.ts +47 -0
  77. package/dist/types-cjs/form/Radios.d.ts +30 -0
  78. package/dist/types-cjs/form/Rate.d.ts +99 -0
  79. package/dist/types-cjs/form/Select.d.ts +58 -0
  80. package/dist/types-cjs/form/SelectBase.d.ts +45 -0
  81. package/dist/types-cjs/form/Slider.d.ts +141 -0
  82. package/dist/types-cjs/form/Switch.d.ts +67 -0
  83. package/dist/types-cjs/form/Taginput.d.ts +140 -0
  84. package/dist/types-cjs/form/TextArea.d.ts +52 -0
  85. package/dist/types-cjs/form/TextAreaBase.d.ts +43 -0
  86. package/dist/types-cjs/form/TimeInput.d.ts +66 -0
  87. package/dist/types-cjs/form/TimeInputBase.d.ts +95 -0
  88. package/dist/types-cjs/form/_pickerInternals/Calendar.d.ts +32 -0
  89. package/dist/types-cjs/form/_pickerInternals/PickerPopover.d.ts +20 -0
  90. package/dist/types-cjs/form/_pickerInternals/TimeWheels.d.ts +42 -0
  91. package/dist/types-cjs/form/_pickerInternals/audioTick.d.ts +50 -0
  92. package/dist/types-cjs/form/_pickerInternals/dateUtils.d.ts +52 -0
  93. package/dist/types-cjs/form/_pickerInternals/formatters.d.ts +32 -0
  94. package/dist/types-cjs/form/_pickerInternals/haptics.d.ts +24 -0
  95. package/dist/types-cjs/form/_pickerInternals/pickerTypes.d.ts +39 -0
  96. package/dist/types-cjs/form/_pickerInternals/segmentMap.d.ts +68 -0
  97. package/dist/types-cjs/form/_pickerInternals/useFocusTrap.d.ts +7 -0
  98. package/dist/types-cjs/form/_pickerInternals/useNativeMobilePicker.d.ts +11 -0
  99. package/dist/types-cjs/form/_pickerInternals/useSegmentedEntry.d.ts +75 -0
  100. package/dist/types-cjs/form/fieldProps.d.ts +24 -0
  101. package/dist/types-cjs/form/useAutoLabelId.d.ts +51 -0
  102. package/dist/types-cjs/grid/Cell.d.ts +42 -0
  103. package/dist/types-cjs/grid/Grid.d.ts +59 -0
  104. package/dist/types-cjs/helpers/Config.d.ts +67 -0
  105. package/dist/types-cjs/helpers/Theme.d.ts +116 -0
  106. package/dist/types-cjs/helpers/anchorAttrs.d.ts +37 -0
  107. package/dist/types-cjs/helpers/bulmaClassHelpers.d.ts +197 -0
  108. package/dist/types-cjs/helpers/classNames.d.ts +55 -0
  109. package/dist/types-cjs/helpers/colorDeprecations.d.ts +17 -0
  110. package/dist/types-cjs/helpers/mergeBulmaStyles.d.ts +17 -0
  111. package/dist/types-cjs/helpers/polymorphic.d.ts +138 -0
  112. package/dist/types-cjs/helpers/portal.d.ts +15 -0
  113. package/dist/types-cjs/helpers/scrollLock.d.ts +9 -0
  114. package/dist/types-cjs/helpers/useBulmaClasses.d.ts +60 -0
  115. package/dist/types-cjs/helpers/useColorClasses.d.ts +69 -0
  116. package/dist/types-cjs/helpers/useFlexboxClasses.d.ts +46 -0
  117. package/dist/types-cjs/helpers/useIsHydrated.d.ts +12 -0
  118. package/dist/types-cjs/helpers/useOtherClasses.d.ts +43 -0
  119. package/dist/types-cjs/helpers/useSpacingClasses.d.ts +45 -0
  120. package/dist/types-cjs/helpers/useTypographyClasses.d.ts +51 -0
  121. package/dist/types-cjs/helpers/useVisibilityClasses.d.ts +43 -0
  122. package/dist/types-cjs/helpers/withSubComponents.d.ts +16 -0
  123. package/dist/types-cjs/index.d.ts +113 -0
  124. package/dist/types-cjs/layout/Container.d.ts +51 -0
  125. package/dist/types-cjs/layout/Footer.d.ts +39 -0
  126. package/dist/types-cjs/layout/Hero.d.ts +126 -0
  127. package/dist/types-cjs/layout/Level.d.ts +112 -0
  128. package/dist/types-cjs/layout/Media.d.ts +97 -0
  129. package/dist/types-cjs/layout/Section.d.ts +38 -0
  130. package/dist/types-cjs/package.json +3 -0
  131. package/dist/types-cjs/skill-examples/ExampleMeta.d.ts +15 -0
  132. package/dist/types-cjs/skill-examples/ProfileCard.d.ts +23 -0
  133. package/package.json +9 -4
@@ -0,0 +1,99 @@
1
+ import React from 'react';
2
+ import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
3
+ import { FormFieldProps } from './fieldProps.js';
4
+ /** Available size modifiers for the Rate component. */
5
+ export type RateSize = 'small' | 'medium' | 'large';
6
+ type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
7
+ type BulmaColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
8
+ /**
9
+ * Props for individual rate icons.
10
+ */
11
+ export interface RateIconProps {
12
+ /** The index of this icon (0-based) */
13
+ index: number;
14
+ /** Whether this icon is currently active (filled) */
15
+ isActive: boolean;
16
+ /** Whether this icon is currently hovered */
17
+ isHovered: boolean;
18
+ /** The current value */
19
+ value: number;
20
+ /** Fill percentage for partial icons (0-100). Used with precision < 1. */
21
+ fillPercent: number;
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
+ */
28
+ export interface RateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'>, Omit<BulmaClassesProps, 'size'>, FormFieldProps {
29
+ /** Field label naming the rating group. Automatically associated via `aria-labelledby` on the `role="radiogroup"` container — uses your `labelProps.id` when provided, otherwise a generated one; it also replaces the default `aria-label="Rating"`. Dropped inside an outer `Field` (label that `Field` yourself). */
30
+ label?: React.ReactNode;
31
+ /** Props for the label element. An explicit `id` here is used as the `aria-labelledby` target instead of a generated one; any `htmlFor` is ignored (a group label names the group, never a single control). */
32
+ labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
33
+ [key: string]: unknown;
34
+ };
35
+ /** Form field name. When set, a hidden input is rendered. */
36
+ name?: string;
37
+ /** Optional id of the form this hidden input belongs to (use when the input lives outside the form element). */
38
+ form?: string;
39
+ /** Controlled value (0 to max). */
40
+ value?: number;
41
+ /** Default value for uncontrolled usage. */
42
+ defaultValue?: number;
43
+ /** Maximum rating value. */
44
+ max?: number;
45
+ /** Size variant. */
46
+ size?: RateSize;
47
+ /** Whether the rating is disabled. */
48
+ disabled?: boolean;
49
+ /** Show the numeric score next to stars. */
50
+ showScore?: boolean;
51
+ /** Show custom text based on value. */
52
+ showText?: boolean;
53
+ /** Array of text labels for each rating value. */
54
+ texts?: string[];
55
+ /** Callback when rating changes. */
56
+ onChange?: (value: number) => void;
57
+ /** Custom icon renderer. */
58
+ customIcon?: (props: RateIconProps) => React.ReactNode;
59
+ /** Add spacing between icons. */
60
+ spaced?: boolean;
61
+ /** Right-to-left direction. */
62
+ rtl?: boolean;
63
+ /** Custom icon name for the rating stars. */
64
+ iconName?: string;
65
+ /** Icon library to use (defaults to ConfigProvider value or 'fa'). */
66
+ iconLibrary?: IconLibrary;
67
+ /** Icon style variant (e.g., 'solid', 'outlined'). */
68
+ iconVariant?: string;
69
+ /** Additional icon modifiers. */
70
+ iconFeatures?: string | string[];
71
+ /** Color of the active rating icons. */
72
+ color?: BulmaColor;
73
+ /** Rating precision (e.g., `0.5` for half stars). */
74
+ precision?: number;
75
+ /** Custom text displayed next to the rating. */
76
+ customText?: string;
77
+ }
78
+ /**
79
+ * The `Rate` component provides a star/icon-based rating system.
80
+ *
81
+ * @function
82
+ * @param {RateProps} props - Props for the Rate component.
83
+ * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the container element.
84
+ * @returns {JSX.Element} The rendered rating component.
85
+ *
86
+ * @example
87
+ * // Basic 5-star rating
88
+ * <Rate defaultValue={3} />
89
+ *
90
+ * @example
91
+ * // With color and precision
92
+ * <Rate defaultValue={3.5} color="warning" precision={0.5} showScore />
93
+ *
94
+ * @example
95
+ * // With Font Awesome icons
96
+ * <Rate iconName="star" iconLibrary="fa" iconVariant="solid" />
97
+ */
98
+ export declare const Rate: React.ForwardRefExoticComponent<RateProps & React.RefAttributes<HTMLDivElement>>;
99
+ export default Rate;
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import { FieldProps } from './Field.js';
3
+ import { ControlBaseProps } from './Control.js';
4
+ import { SelectBaseProps } from './SelectBase.js';
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
+ export interface SelectProps extends SelectBaseProps {
13
+ /** Field label. Automatically associated with the select via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field`, whose own label associates instead when that `Field` generates a target id (not `grouped`/`hasAddons`, no explicit `labelProps.htmlFor`). */
14
+ label?: React.ReactNode;
15
+ /** Size for the label. */
16
+ labelSize?: FieldProps['labelSize'];
17
+ /** Props for the label element when the component renders its own `Field`; dropped inside an outer `Field` (use that `Field`'s `labelProps` instead). An explicit `htmlFor` key — even `undefined` — overrides the automatic association and no id is generated. */
18
+ labelProps?: FieldProps['labelProps'];
19
+ /** Horizontal field layout. */
20
+ horizontal?: boolean;
21
+ /** Icon props for left icon. */
22
+ iconLeft?: ControlBaseProps['iconLeft'];
23
+ /** Shortcut for left icon name. */
24
+ iconLeftName?: string;
25
+ /** Shortcut for left icon size. */
26
+ iconLeftSize?: ControlBaseProps['iconLeftSize'];
27
+ /** Force left icon container. */
28
+ hasIconsLeft?: boolean;
29
+ /** Shows loading indicator. */
30
+ isLoading?: boolean;
31
+ /** Expand the control. */
32
+ isExpanded?: boolean;
33
+ /** Control size. */
34
+ controlSize?: ControlBaseProps['size'];
35
+ /** Help/validation message below the select. */
36
+ message?: React.ReactNode;
37
+ /** Bulma color for the message. */
38
+ messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
39
+ /** Additional CSS classes for the Field. */
40
+ fieldClassName?: string;
41
+ /** Additional CSS classes for the Control. */
42
+ controlClassName?: string;
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
+ */
57
+ export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
58
+ export default Select;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
3
+ /**
4
+ * Props for the Select component.
5
+ */
6
+ export interface SelectBaseProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
7
+ /** Bulma color modifier for the select. */
8
+ color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
9
+ /** Size modifier for the select. */
10
+ size?: 'small' | 'medium' | 'large';
11
+ /** Rounded select corners. */
12
+ isRounded?: boolean;
13
+ /** Shows loading indicator. */
14
+ isLoading?: boolean;
15
+ /** Applies Bulma's is-active modifier. */
16
+ isActive?: boolean;
17
+ /** Forces hovered state on the inner select. */
18
+ isHovered?: boolean;
19
+ /** Forces focused state on the inner select. */
20
+ isFocused?: boolean;
21
+ /** Makes the select span the full width of parent. */
22
+ isFullwidth?: boolean;
23
+ /** Makes the select span the full width of parent. @deprecated Use `isFullwidth` instead — `isFullwidth` wins if both are set. */
24
+ isFullWidth?: boolean;
25
+ /** Additional CSS classes to apply. */
26
+ className?: string;
27
+ /** Disables the select. */
28
+ disabled?: boolean;
29
+ /** Allows multiple selections. */
30
+ multiple?: boolean;
31
+ /** Number of visible options in multiselect. */
32
+ multipleSize?: number;
33
+ /** `<option>` elements. */
34
+ children?: React.ReactNode;
35
+ }
36
+ /**
37
+ * Bulma Select component with full Bulma helper class support.
38
+ *
39
+ * @function
40
+ * @param {SelectBaseProps} props - Props for the SelectBase component.
41
+ * @returns {JSX.Element} The rendered select element.
42
+ * @see {@link https://bulma.io/documentation/form/select/ | Bulma Select documentation}
43
+ */
44
+ export declare const SelectBase: React.ForwardRefExoticComponent<SelectBaseProps & React.RefAttributes<HTMLSelectElement>>;
45
+ export default SelectBase;
@@ -0,0 +1,141 @@
1
+ import React from 'react';
2
+ import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
3
+ import { FormFieldProps } from './fieldProps.js';
4
+ /** Valid sizes for the Slider component. */
5
+ export type SliderSize = 'small' | 'medium' | 'large';
6
+ /** Valid colors for the Slider component. */
7
+ export type SliderColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
8
+ /** Tooltip display mode for the Slider component. */
9
+ export type SliderTooltip = 'auto' | 'always' | 'hidden';
10
+ /** Orientation of the Slider component. */
11
+ export type SliderOrientation = 'horizontal' | 'vertical';
12
+ /**
13
+ * A tick mark displayed along the Slider track.
14
+ */
15
+ export interface SliderMark {
16
+ /** Controlled value. */
17
+ value: number;
18
+ /** Optional label rendered below the tick mark. */
19
+ label?: React.ReactNode;
20
+ }
21
+ /**
22
+ * Shared base props for single and range Slider modes.
23
+ */
24
+ interface SliderBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'size' | 'onChange' | 'value' | 'defaultValue'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>, FormFieldProps {
25
+ /** Field label. Automatically associated with the slider input via `htmlFor` — uses your `id` when provided, otherwise a generated one. In range mode the label targets the low (minimum) thumb. Dropped inside an outer `Field` (label that `Field` yourself). */
26
+ label?: React.ReactNode;
27
+ /** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
28
+ labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
29
+ [key: string]: unknown;
30
+ };
31
+ /** Minimum value. */
32
+ min?: number;
33
+ /** Maximum value. */
34
+ max?: number;
35
+ /** Step increment (default: 1). */
36
+ step?: number;
37
+ /** Size variant. */
38
+ size?: SliderSize;
39
+ /** Color variant. */
40
+ color?: SliderColor;
41
+ /** Use rounded track ends. */
42
+ isRounded?: boolean;
43
+ /** Use circular thumb. */
44
+ isCircle?: boolean;
45
+ /** Show current value tooltip. */
46
+ showOutput?: boolean;
47
+ /** Controls tooltip visibility on the thumb. */
48
+ tooltip?: SliderTooltip;
49
+ /** Shows tick marks along the track. */
50
+ ticks?: boolean;
51
+ /** Custom labeled marks along the track. Each mark has `{ value: number; label?: ReactNode }`. */
52
+ marks?: SliderMark[];
53
+ /** Orientation of the slider. */
54
+ orientation?: SliderOrientation;
55
+ /** Function to scale the displayed value. */
56
+ scale?: (value: number) => number;
57
+ /** Function to generate the `aria-valuetext` attribute. */
58
+ getAriaValueText?: (value: number) => string;
59
+ /** Format function for output display. */
60
+ formatOutput?: (value: number) => string;
61
+ }
62
+ /**
63
+ * Props for the Slider in single-value mode.
64
+ */
65
+ export interface SliderSingleProps extends SliderBaseProps {
66
+ /**
67
+ * Enables range mode with two thumbs.
68
+ * @defaultValue false
69
+ */
70
+ range?: false;
71
+ /** Controlled value. */
72
+ value?: number;
73
+ /**
74
+ * Default value for uncontrolled usage.
75
+ * @defaultValue 0
76
+ */
77
+ defaultValue?: number;
78
+ /** Callback when value changes. */
79
+ onChange?: (value: number) => void;
80
+ /**
81
+ * Minimum distance between thumbs in range mode.
82
+ * @defaultValue 0
83
+ */
84
+ minDistance?: never;
85
+ /** ARIA label(s) for the slider thumb(s). */
86
+ ariaLabel?: string;
87
+ }
88
+ /**
89
+ * Props for the Slider in range (dual-thumb) mode.
90
+ */
91
+ export interface SliderRangeProps extends SliderBaseProps {
92
+ /**
93
+ * Enables range mode with two thumbs.
94
+ * @defaultValue false
95
+ */
96
+ range: true;
97
+ /** Controlled value. */
98
+ value?: [number, number];
99
+ /**
100
+ * Default value for uncontrolled usage.
101
+ * @defaultValue 0
102
+ */
103
+ defaultValue?: [number, number];
104
+ /** Callback when value changes. */
105
+ onChange?: (value: [number, number]) => void;
106
+ /**
107
+ * Minimum distance between thumbs in range mode.
108
+ * @defaultValue 0
109
+ */
110
+ minDistance?: number;
111
+ /** ARIA label(s) for the slider thumb(s). */
112
+ ariaLabel?: [string, string];
113
+ /** Form field name for the low thumb. Use this in range mode so each thumb submits with its own name. */
114
+ nameLow?: string;
115
+ /** Form field name for the high thumb. */
116
+ nameHigh?: string;
117
+ }
118
+ /**
119
+ * Props for the Slider component — a discriminated union of single and range modes.
120
+ * @extraProp {boolean} [disabled=false] - Whether the slider is disabled.
121
+ * @extraProp {string} [className] - Additional CSS classes.
122
+ * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the input element.
123
+ */
124
+ export type SliderProps = SliderSingleProps | SliderRangeProps;
125
+ /**
126
+ * The `Slider` component provides a range slider input for selecting values within a range.
127
+ *
128
+ * @function
129
+ * @param {SliderProps} props - Props for the Slider component.
130
+ * @returns {JSX.Element} The rendered slider element.
131
+ *
132
+ * @example
133
+ * // Basic slider
134
+ * <Slider defaultValue={50} />
135
+ *
136
+ * @example
137
+ * // Range slider
138
+ * <Slider range defaultValue={[20, 80]} onChange={([low, high]) => {}} />
139
+ */
140
+ export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
141
+ export default Slider;
@@ -0,0 +1,67 @@
1
+ import React from 'react';
2
+ import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
3
+ /**
4
+ * Valid colors for the Switch component.
5
+ */
6
+ export declare const switchColors: readonly ["primary", "link", "info", "success", "warning", "danger"];
7
+ /**
8
+ * Valid sizes for the Switch component.
9
+ */
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
+ */
20
+ export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
21
+ /** Color variant for the switch. */
22
+ color?: (typeof switchColors)[number];
23
+ /** Size of the switch. */
24
+ size?: (typeof switchSizes)[number];
25
+ /** Use rounded switch style. */
26
+ isRounded?: boolean;
27
+ /** Use thin switch style. */
28
+ isThin?: boolean;
29
+ /** Use outlined switch style. */
30
+ isOutlined?: boolean;
31
+ /** Right-to-left layout (label on left). */
32
+ isRtl?: boolean;
33
+ /** Color when the switch is in the off/passive state. */
34
+ passiveType?: (typeof switchColors)[number];
35
+ /** Text color helper. */
36
+ textColor?: (typeof validColors)[number] | 'inherit' | 'current';
37
+ /** Label content for the switch. */
38
+ children?: React.ReactNode;
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
+ */
66
+ export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
67
+ export default Switch;
@@ -0,0 +1,140 @@
1
+ import React from 'react';
2
+ import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
3
+ import { FormFieldProps } from './fieldProps.js';
4
+ /**
5
+ * Represents a tag item object with a value and optional label.
6
+ */
7
+ export interface TaginputItem {
8
+ /** The tag value. */
9
+ value: string;
10
+ /** Display label (optional). */
11
+ label?: string;
12
+ [key: string]: unknown;
13
+ }
14
+ /** A tag can be either a TaginputItem object or a plain string. */
15
+ export type TaginputTag = TaginputItem | string;
16
+ type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
17
+ /**
18
+ * Props for the Taginput component.
19
+ * @extraProp {string} [className] - Additional CSS classes.
20
+ * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the input element.
21
+ */
22
+ export interface TaginputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'>, Omit<BulmaClassesProps, 'color'>, FormFieldProps {
23
+ /** Field label. Automatically associated with the text input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired when the tag limit is reached (the input is not rendered) and dropped inside an outer `Field`. */
24
+ label?: React.ReactNode;
25
+ /** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
26
+ labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
27
+ [key: string]: unknown;
28
+ };
29
+ /** Applied to the inner text input (the labellable control), not the wrapper div. */
30
+ id?: string;
31
+ /** The current tags (controlled). */
32
+ value?: TaginputTag[];
33
+ /** Default tags (uncontrolled). */
34
+ defaultValue?: TaginputTag[];
35
+ /** Autocomplete suggestions. */
36
+ data?: string[];
37
+ /** Placeholder text when no tags. */
38
+ placeholder?: string;
39
+ /** Object property to use as display field. */
40
+ field?: string;
41
+ /** Allow creating new tags not in suggestions. */
42
+ allowNew?: boolean;
43
+ /** Allow duplicate tags. */
44
+ allowDuplicates?: boolean;
45
+ /** Open autocomplete dropdown on focus. */
46
+ openOnFocus?: boolean;
47
+ /** Remove tag on backspace. Default: true. */
48
+ removeOnKeys?: boolean;
49
+ /** Keys to confirm tag creation. Default: ['Enter', ',']. */
50
+ confirmKeys?: string[];
51
+ /** Show close button on tags. Default: true. */
52
+ closable?: boolean;
53
+ /** Attach tags visually. */
54
+ attached?: boolean;
55
+ /** Maximum number of tags allowed. */
56
+ maxTags?: number;
57
+ /** Maximum length of input. */
58
+ maxlength?: number;
59
+ /** Whether the input is disabled. */
60
+ disabled?: boolean;
61
+ /** Whether the input is read-only. */
62
+ readonly?: boolean;
63
+ /** Applies rounded corners to the tags. */
64
+ rounded?: boolean;
65
+ /** Truncates long tag text with ellipsis. */
66
+ ellipsis?: boolean;
67
+ /** Shows a counter of the number of tags. */
68
+ hasCounter?: boolean;
69
+ /** Characters that split pasted text into tags. */
70
+ onPasteSeparators?: string[];
71
+ /** Validation function called before adding a tag. */
72
+ beforeAdding?: (tag: string) => boolean;
73
+ /** Custom function for creating tag objects from input. */
74
+ createTag?: (input: string) => TaginputTag;
75
+ /** Keeps the first autocomplete suggestion highlighted. */
76
+ keepFirst?: boolean;
77
+ /** Keeps the autocomplete dropdown open after selection. */
78
+ keepOpen?: boolean;
79
+ /** Shows a loading indicator. */
80
+ loading?: boolean;
81
+ /** ARIA label for tag close buttons. */
82
+ ariaCloseLabel?: string;
83
+ /** Icon name for the input field. */
84
+ icon?: string;
85
+ /** Icon library to use. */
86
+ iconLibrary?: IconLibrary;
87
+ /** Icon style variant (e.g., 'solid', 'outlined'). */
88
+ iconVariant?: string;
89
+ /** Additional icon modifiers. */
90
+ iconFeatures?: string | string[];
91
+ /** Input color variant. */
92
+ color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
93
+ /** Tag color variant. */
94
+ tagColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'dark' | 'light';
95
+ /** Size variant. */
96
+ size?: 'small' | 'medium' | 'large';
97
+ /** Form field name. When set, one hidden input per tag is rendered. */
98
+ name?: string;
99
+ /** Optional id of the form the hidden inputs belong to. */
100
+ form?: string;
101
+ /** Callback when tags change. */
102
+ onChange?: (tags: TaginputTag[]) => void;
103
+ /** Callback when tag is added. */
104
+ onAdd?: (tag: TaginputTag) => void;
105
+ /** Callback when tag is removed. */
106
+ onRemove?: (tag: TaginputTag, index: number) => void;
107
+ /** Callback when typing in input. */
108
+ onTyping?: (value: string) => void;
109
+ /** Custom render for tags. */
110
+ tagTemplate?: (tag: TaginputTag) => React.ReactNode;
111
+ }
112
+ /**
113
+ * The `Taginput` component provides a tag/chip input field for managing multiple tags.
114
+ *
115
+ * @function
116
+ * @param {TaginputProps} props - Props for the Taginput component.
117
+ * @param {React.Ref<HTMLInputElement>} ref - Forwarded ref to the input element.
118
+ * @returns {JSX.Element} The rendered taginput component.
119
+ *
120
+ * @example
121
+ * // Basic usage
122
+ * <Taginput
123
+ * placeholder="Add a tag..."
124
+ * onChange={(tags) => console.log(tags)}
125
+ * />
126
+ *
127
+ * @example
128
+ * // With autocomplete
129
+ * <Taginput
130
+ * data={['React', 'Vue', 'Angular', 'Svelte']}
131
+ * allowNew={false}
132
+ * placeholder="Select frameworks..."
133
+ * />
134
+ */
135
+ export declare const Taginput: React.ForwardRefExoticComponent<TaginputProps & React.RefAttributes<HTMLInputElement>>;
136
+ /** @deprecated Use `Taginput` — same component. */
137
+ export declare const TagInput: React.ForwardRefExoticComponent<TaginputProps & React.RefAttributes<HTMLInputElement>>;
138
+ /** @deprecated Use `TaginputProps`. */
139
+ export type TagInputProps = TaginputProps;
140
+ export default Taginput;
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import { FieldProps } from './Field.js';
3
+ import { ControlBaseProps } from './Control.js';
4
+ import { TextAreaBaseProps } from './TextAreaBase.js';
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
+ export interface TextAreaProps extends TextAreaBaseProps {
13
+ /** Field label. Automatically associated with the textarea via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field`, whose own label associates instead when that `Field` generates a target id (not `grouped`/`hasAddons`, no explicit `labelProps.htmlFor`). */
14
+ label?: React.ReactNode;
15
+ /** Size for the label. */
16
+ labelSize?: FieldProps['labelSize'];
17
+ /** Props for the label element when the component renders its own `Field`; dropped inside an outer `Field` (use that `Field`'s `labelProps` instead). An explicit `htmlFor` key — even `undefined` — overrides the automatic association and no id is generated. */
18
+ labelProps?: FieldProps['labelProps'];
19
+ /** Horizontal field layout. */
20
+ horizontal?: boolean;
21
+ /** Shows loading indicator on the wrapping Control. */
22
+ isLoading?: boolean;
23
+ /** Control size. */
24
+ controlSize?: ControlBaseProps['size'];
25
+ /** Help/validation message below the textarea. */
26
+ message?: React.ReactNode;
27
+ /** Bulma color for the message. */
28
+ messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
29
+ /** Additional CSS classes for the Field. */
30
+ fieldClassName?: string;
31
+ /** Additional CSS classes for the Control. */
32
+ controlClassName?: string;
33
+ }
34
+ /**
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.
36
+ *
37
+ * @function
38
+ * @param {TextAreaProps} props - Props for TextArea.
39
+ * @returns {JSX.Element} The composed field element.
40
+ *
41
+ * @example
42
+ * <TextArea label="Bio" placeholder="Tell us about yourself" rows={4} />
43
+ *
44
+ * @example
45
+ * <TextArea
46
+ * label="Comments"
47
+ * message="Max 500 characters"
48
+ * messageColor="info"
49
+ * />
50
+ */
51
+ export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
52
+ export default TextArea;
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
3
+ /**
4
+ * Props for the TextArea component.
5
+ */
6
+ export interface TextAreaBaseProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
7
+ /** Bulma color modifier for the textarea. */
8
+ color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
9
+ /** Size modifier for the textarea. */
10
+ size?: 'small' | 'medium' | 'large';
11
+ /** Rounded textarea corners. */
12
+ isRounded?: boolean;
13
+ /** Renders textarea as static (styled readonly). */
14
+ isStatic?: boolean;
15
+ /** Applies hovered state. */
16
+ isHovered?: boolean;
17
+ /** Applies focused state. */
18
+ isFocused?: boolean;
19
+ /** Shows loading indicator on the wrapping Control. */
20
+ isLoading?: boolean;
21
+ /** Applies Bulma's is-active modifier. */
22
+ isActive?: boolean;
23
+ /** Fixed textarea size (no resize). */
24
+ hasFixedSize?: boolean;
25
+ /** Additional CSS classes to apply. */
26
+ className?: string;
27
+ /** Disables the textarea. */
28
+ disabled?: boolean;
29
+ /** Read-only textarea. */
30
+ readOnly?: boolean;
31
+ /** Number of visible text lines. */
32
+ rows?: number;
33
+ }
34
+ /**
35
+ * Bulma TextArea component with full Bulma helper class support.
36
+ *
37
+ * @function
38
+ * @param {TextAreaBaseProps} props - Props for the TextAreaBase component.
39
+ * @returns {JSX.Element} The rendered textarea element.
40
+ * @see {@link https://bulma.io/documentation/form/textarea/ | Bulma Textarea documentation}
41
+ */
42
+ export declare const TextAreaBase: React.ForwardRefExoticComponent<TextAreaBaseProps & React.RefAttributes<HTMLTextAreaElement>>;
43
+ export default TextAreaBase;