@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.
- package/dist/types-cjs/columns/Column.d.ts +68 -0
- package/dist/types-cjs/columns/Columns.d.ts +63 -0
- package/dist/types-cjs/components/Avatar.d.ts +91 -0
- package/dist/types-cjs/components/Avatars.d.ts +30 -0
- package/dist/types-cjs/components/Badge.d.ts +56 -0
- package/dist/types-cjs/components/Breadcrumb.d.ts +42 -0
- package/dist/types-cjs/components/Card.d.ts +166 -0
- package/dist/types-cjs/components/Carousel.d.ts +104 -0
- package/dist/types-cjs/components/Collapse.d.ts +69 -0
- package/dist/types-cjs/components/Dialog.d.ts +142 -0
- package/dist/types-cjs/components/Dropdown.d.ts +104 -0
- package/dist/types-cjs/components/Loading.d.ts +68 -0
- package/dist/types-cjs/components/Menu.d.ts +100 -0
- package/dist/types-cjs/components/Message.d.ts +51 -0
- package/dist/types-cjs/components/Modal.d.ts +126 -0
- package/dist/types-cjs/components/Navbar.d.ts +302 -0
- package/dist/types-cjs/components/Pagination.d.ts +130 -0
- package/dist/types-cjs/components/Panel.d.ts +147 -0
- package/dist/types-cjs/components/Reveal.d.ts +47 -0
- package/dist/types-cjs/components/Sidebar.d.ts +76 -0
- package/dist/types-cjs/components/Steps.d.ts +101 -0
- package/dist/types-cjs/components/Tabs.d.ts +160 -0
- package/dist/types-cjs/components/Toast.d.ts +150 -0
- package/dist/types-cjs/components/Tooltip.d.ts +68 -0
- package/dist/types-cjs/elements/Block.d.ts +31 -0
- package/dist/types-cjs/elements/Box.d.ts +41 -0
- package/dist/types-cjs/elements/Button.d.ts +74 -0
- package/dist/types-cjs/elements/Buttons.d.ts +40 -0
- package/dist/types-cjs/elements/Code.d.ts +23 -0
- package/dist/types-cjs/elements/Content.d.ts +34 -0
- package/dist/types-cjs/elements/Delete.d.ts +38 -0
- package/dist/types-cjs/elements/Divider.d.ts +19 -0
- package/dist/types-cjs/elements/Emphasis.d.ts +23 -0
- package/dist/types-cjs/elements/Figure.d.ts +40 -0
- package/dist/types-cjs/elements/Icon.d.ts +138 -0
- package/dist/types-cjs/elements/IconText.d.ts +40 -0
- package/dist/types-cjs/elements/Image.d.ts +44 -0
- package/dist/types-cjs/elements/Link.d.ts +55 -0
- package/dist/types-cjs/elements/LinkButton.d.ts +57 -0
- package/dist/types-cjs/elements/ListItem.d.ts +24 -0
- package/dist/types-cjs/elements/Notification.d.ts +148 -0
- package/dist/types-cjs/elements/OrderedList.d.ts +21 -0
- package/dist/types-cjs/elements/Paragraph.d.ts +23 -0
- package/dist/types-cjs/elements/Pre.d.ts +23 -0
- package/dist/types-cjs/elements/Progress.d.ts +36 -0
- package/dist/types-cjs/elements/Skeleton.d.ts +30 -0
- package/dist/types-cjs/elements/Span.d.ts +23 -0
- package/dist/types-cjs/elements/Strong.d.ts +23 -0
- package/dist/types-cjs/elements/SubTitle.d.ts +41 -0
- package/dist/types-cjs/elements/Table.d.ts +36 -0
- package/dist/types-cjs/elements/Tag.d.ts +45 -0
- package/dist/types-cjs/elements/Tags.d.ts +32 -0
- package/dist/types-cjs/elements/Tbody.d.ts +25 -0
- package/dist/types-cjs/elements/Td.d.ts +33 -0
- package/dist/types-cjs/elements/Tfoot.d.ts +25 -0
- package/dist/types-cjs/elements/Th.d.ts +38 -0
- package/dist/types-cjs/elements/Thead.d.ts +25 -0
- package/dist/types-cjs/elements/Title.d.ts +43 -0
- package/dist/types-cjs/elements/Tr.d.ts +30 -0
- package/dist/types-cjs/elements/UnorderedList.d.ts +18 -0
- package/dist/types-cjs/elements/iconProps.d.ts +30 -0
- package/dist/types-cjs/form/Autocomplete.d.ts +114 -0
- package/dist/types-cjs/form/Checkbox.d.ts +47 -0
- package/dist/types-cjs/form/Checkboxes.d.ts +30 -0
- package/dist/types-cjs/form/Control.d.ts +68 -0
- package/dist/types-cjs/form/DateInput.d.ts +70 -0
- package/dist/types-cjs/form/DateInputBase.d.ts +91 -0
- package/dist/types-cjs/form/DateTimeInput.d.ts +68 -0
- package/dist/types-cjs/form/DateTimeInputBase.d.ts +108 -0
- package/dist/types-cjs/form/Field.d.ts +101 -0
- package/dist/types-cjs/form/File.d.ts +52 -0
- package/dist/types-cjs/form/FormContext.d.ts +78 -0
- package/dist/types-cjs/form/Input.d.ts +72 -0
- package/dist/types-cjs/form/InputBase.d.ts +37 -0
- package/dist/types-cjs/form/Numberinput.d.ts +83 -0
- package/dist/types-cjs/form/Radio.d.ts +47 -0
- package/dist/types-cjs/form/Radios.d.ts +30 -0
- package/dist/types-cjs/form/Rate.d.ts +99 -0
- package/dist/types-cjs/form/Select.d.ts +58 -0
- package/dist/types-cjs/form/SelectBase.d.ts +45 -0
- package/dist/types-cjs/form/Slider.d.ts +141 -0
- package/dist/types-cjs/form/Switch.d.ts +67 -0
- package/dist/types-cjs/form/Taginput.d.ts +140 -0
- package/dist/types-cjs/form/TextArea.d.ts +52 -0
- package/dist/types-cjs/form/TextAreaBase.d.ts +43 -0
- package/dist/types-cjs/form/TimeInput.d.ts +66 -0
- package/dist/types-cjs/form/TimeInputBase.d.ts +95 -0
- package/dist/types-cjs/form/_pickerInternals/Calendar.d.ts +32 -0
- package/dist/types-cjs/form/_pickerInternals/PickerPopover.d.ts +20 -0
- package/dist/types-cjs/form/_pickerInternals/TimeWheels.d.ts +42 -0
- package/dist/types-cjs/form/_pickerInternals/audioTick.d.ts +50 -0
- package/dist/types-cjs/form/_pickerInternals/dateUtils.d.ts +52 -0
- package/dist/types-cjs/form/_pickerInternals/formatters.d.ts +32 -0
- package/dist/types-cjs/form/_pickerInternals/haptics.d.ts +24 -0
- package/dist/types-cjs/form/_pickerInternals/pickerTypes.d.ts +39 -0
- package/dist/types-cjs/form/_pickerInternals/segmentMap.d.ts +68 -0
- package/dist/types-cjs/form/_pickerInternals/useFocusTrap.d.ts +7 -0
- package/dist/types-cjs/form/_pickerInternals/useNativeMobilePicker.d.ts +11 -0
- package/dist/types-cjs/form/_pickerInternals/useSegmentedEntry.d.ts +75 -0
- package/dist/types-cjs/form/fieldProps.d.ts +24 -0
- package/dist/types-cjs/form/useAutoLabelId.d.ts +51 -0
- package/dist/types-cjs/grid/Cell.d.ts +42 -0
- package/dist/types-cjs/grid/Grid.d.ts +59 -0
- package/dist/types-cjs/helpers/Config.d.ts +67 -0
- package/dist/types-cjs/helpers/Theme.d.ts +116 -0
- package/dist/types-cjs/helpers/anchorAttrs.d.ts +37 -0
- package/dist/types-cjs/helpers/bulmaClassHelpers.d.ts +197 -0
- package/dist/types-cjs/helpers/classNames.d.ts +55 -0
- package/dist/types-cjs/helpers/colorDeprecations.d.ts +17 -0
- package/dist/types-cjs/helpers/mergeBulmaStyles.d.ts +17 -0
- package/dist/types-cjs/helpers/polymorphic.d.ts +138 -0
- package/dist/types-cjs/helpers/portal.d.ts +15 -0
- package/dist/types-cjs/helpers/scrollLock.d.ts +9 -0
- package/dist/types-cjs/helpers/useBulmaClasses.d.ts +60 -0
- package/dist/types-cjs/helpers/useColorClasses.d.ts +69 -0
- package/dist/types-cjs/helpers/useFlexboxClasses.d.ts +46 -0
- package/dist/types-cjs/helpers/useIsHydrated.d.ts +12 -0
- package/dist/types-cjs/helpers/useOtherClasses.d.ts +43 -0
- package/dist/types-cjs/helpers/useSpacingClasses.d.ts +45 -0
- package/dist/types-cjs/helpers/useTypographyClasses.d.ts +51 -0
- package/dist/types-cjs/helpers/useVisibilityClasses.d.ts +43 -0
- package/dist/types-cjs/helpers/withSubComponents.d.ts +16 -0
- package/dist/types-cjs/index.d.ts +113 -0
- package/dist/types-cjs/layout/Container.d.ts +51 -0
- package/dist/types-cjs/layout/Footer.d.ts +39 -0
- package/dist/types-cjs/layout/Hero.d.ts +126 -0
- package/dist/types-cjs/layout/Level.d.ts +112 -0
- package/dist/types-cjs/layout/Media.d.ts +97 -0
- package/dist/types-cjs/layout/Section.d.ts +38 -0
- package/dist/types-cjs/package.json +3 -0
- package/dist/types-cjs/skill-examples/ExampleMeta.d.ts +15 -0
- package/dist/types-cjs/skill-examples/ProfileCard.d.ts +23 -0
- package/package.json +9 -4
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import { PickerPosition, HourFormat, DayOfWeek, PickerLabels } from './_pickerInternals/pickerTypes.js';
|
|
4
|
+
import { DateFormatOption } from './_pickerInternals/formatters.js';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the raw DateTimeInput base. Use the higher-level `DateTimeInput`
|
|
7
|
+
* for Field/Control composition. Combines the prop set of `DateInputBaseProps`
|
|
8
|
+
* and `TimeInputBaseProps`.
|
|
9
|
+
*/
|
|
10
|
+
export interface DateTimeInputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'color' | 'min' | 'max' | 'type' | 'popover'>, Omit<BulmaClassesProps, 'color'> {
|
|
11
|
+
/** Controlled selected date-time. */
|
|
12
|
+
value?: Date | null;
|
|
13
|
+
/** Initial value for uncontrolled usage. */
|
|
14
|
+
defaultValue?: Date | null;
|
|
15
|
+
/** Fired when either the date or time portion changes. */
|
|
16
|
+
onChange?: (d: Date | null) => void;
|
|
17
|
+
/** Fired when the popover opens. */
|
|
18
|
+
onOpen?: () => void;
|
|
19
|
+
/** Fired when the popover closes. */
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
/** Lower bound for the combined date-time. */
|
|
22
|
+
min?: Date;
|
|
23
|
+
/** Upper bound for the combined date-time. */
|
|
24
|
+
max?: Date;
|
|
25
|
+
/** Disable the input. */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Read-only input. */
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
/** Placeholder text. */
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Token format string or `Intl.DateTimeFormat` options. Default `'YYYY-MM-DD HH:mm'`.
|
|
33
|
+
* @defaultValue 'YYYY-MM-DD HH:mm'
|
|
34
|
+
*/
|
|
35
|
+
format?: DateFormatOption;
|
|
36
|
+
/** Custom parser. */
|
|
37
|
+
parse?: (s: string) => Date | null;
|
|
38
|
+
/** BCP-47 locale tag. */
|
|
39
|
+
locale?: string;
|
|
40
|
+
/** Render the panel inline (no popover). */
|
|
41
|
+
inline?: boolean;
|
|
42
|
+
/** Use `<input type="datetime-local">` on coarse-pointer devices. */
|
|
43
|
+
mobileNative?: boolean | 'auto';
|
|
44
|
+
/** Allow segmented keyboard typing (type the date-time directly across all segments). `false` makes the field picker-only. */
|
|
45
|
+
editable?: boolean;
|
|
46
|
+
/** Whether the calendar + time popover exists. `false` makes the field input-only (segmented typing with no popover). Default `true`. */
|
|
47
|
+
popover?: boolean;
|
|
48
|
+
/** Open the popover on focus. Default `true`. */
|
|
49
|
+
openOnFocus?: boolean;
|
|
50
|
+
/** Off by default — users typically tweak both halves before committing. */
|
|
51
|
+
closeOnSelect?: boolean;
|
|
52
|
+
/** Popover anchor position. */
|
|
53
|
+
position?: PickerPosition;
|
|
54
|
+
/** Render the popover into `document.body` via portal. */
|
|
55
|
+
appendToBody?: boolean;
|
|
56
|
+
/** Bulma color modifier. */
|
|
57
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
58
|
+
/** Size variant. */
|
|
59
|
+
size?: 'small' | 'medium' | 'large';
|
|
60
|
+
/** Rounded input corners. */
|
|
61
|
+
isRounded?: boolean;
|
|
62
|
+
/** Disable specific dates. Blocked dates are also rejected during manual typing (the predicate receives the full candidate date-time — prefer day-based checks). */
|
|
63
|
+
shouldDisableDate?: (d: Date) => boolean;
|
|
64
|
+
/** Convenience array of disabled dates, matched by calendar day; also rejected by manual typing. */
|
|
65
|
+
unselectableDates?: Date[];
|
|
66
|
+
/** Day the calendar week starts on. */
|
|
67
|
+
firstDayOfWeek?: DayOfWeek;
|
|
68
|
+
/** Override the 7 day-name labels. */
|
|
69
|
+
dayNames?: string[];
|
|
70
|
+
/** Override the 12 month-name labels. */
|
|
71
|
+
monthNames?: string[];
|
|
72
|
+
/** Show dimmed dates from adjacent months. */
|
|
73
|
+
nearbyMonthDays?: boolean;
|
|
74
|
+
/** Time format. */
|
|
75
|
+
hourFormat?: HourFormat;
|
|
76
|
+
/** Show seconds column. Note: iOS Safari's native datetime-local picker UI does not include a seconds wheel; pass `mobileNative={false}` if you need one on iOS. */
|
|
77
|
+
enableSeconds?: boolean;
|
|
78
|
+
/** Hour step. */
|
|
79
|
+
incrementHours?: number;
|
|
80
|
+
/** Step between minute-wheel values (`1` = every minute, iOS-style). */
|
|
81
|
+
incrementMinutes?: number;
|
|
82
|
+
/** Step between second-wheel values (only with `enableSeconds`). */
|
|
83
|
+
incrementSeconds?: number;
|
|
84
|
+
/** Block specific times. Blocked times are also rejected during manual typing. */
|
|
85
|
+
unselectableTimes?: (d: Date) => boolean;
|
|
86
|
+
/** Decorative left icon glyph for the wrapping `Control` (shown by default). Set `''` to hide. */
|
|
87
|
+
iconLeftName?: string;
|
|
88
|
+
/** Show a clickable launcher button on the right that toggles the popover. Default `true`. */
|
|
89
|
+
triggerIcon?: boolean;
|
|
90
|
+
/** Glyph for the right launcher button. */
|
|
91
|
+
triggerIconName?: string;
|
|
92
|
+
/** Play a short audible tick on each time-wheel crossing. Default `false`. */
|
|
93
|
+
audioTick?: boolean;
|
|
94
|
+
/** Auto-route tactile feedback per wheel tick (vibrate on Android, audio thunk on iOS). Default `false`. */
|
|
95
|
+
haptics?: boolean;
|
|
96
|
+
/** Optional translatable string overrides. */
|
|
97
|
+
labels?: PickerLabels;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Raw DateTimeInput — combined input + calendar + time spinner without
|
|
101
|
+
* Field/Control wrapping. Use `DateTimeInput` for the convenience wrapper.
|
|
102
|
+
*
|
|
103
|
+
* @function
|
|
104
|
+
* @param {DateTimeInputBaseProps} props
|
|
105
|
+
* @returns {JSX.Element}
|
|
106
|
+
*/
|
|
107
|
+
export declare const DateTimeInputBase: React.ForwardRefExoticComponent<DateTimeInputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
108
|
+
export default DateTimeInputBase;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Field component.
|
|
5
|
+
*/
|
|
6
|
+
export interface FieldProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Renders the field as horizontal (label and control side by side). */
|
|
8
|
+
horizontal?: boolean;
|
|
9
|
+
/** Group controls in a row (optionally centered, right, or multiline). */
|
|
10
|
+
grouped?: boolean | 'centered' | 'right' | 'multiline';
|
|
11
|
+
/** Group controls as addons (optionally centered or right-aligned). */
|
|
12
|
+
hasAddons?: boolean | 'centered' | 'right';
|
|
13
|
+
/** Constrains the field to its content's width (used inside horizontal field bodies). */
|
|
14
|
+
narrow?: boolean;
|
|
15
|
+
/** Field label, rendered above the widget. Automatically associated with a single composed `InputBase`, `SelectBase`, or `TextAreaBase` via a generated id and `htmlFor`. Pass `labelProps={{ htmlFor }}` to wire your own `id`, or `labelProps={{ htmlFor: undefined }}` to opt out. Skipped for `grouped`/`hasAddons` fields (multiple controls). */
|
|
16
|
+
label?: React.ReactNode;
|
|
17
|
+
/** Size for the label. */
|
|
18
|
+
labelSize?: 'small' | 'normal' | 'medium' | 'large';
|
|
19
|
+
/** Props for the label element. An explicit `htmlFor` key — even set to `undefined` — takes over the association. */
|
|
20
|
+
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
/** Text color for the field. */
|
|
24
|
+
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
25
|
+
/** Bulma color for the field. */
|
|
26
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
27
|
+
/** Background color for the field. */
|
|
28
|
+
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
29
|
+
/** Additional CSS classes. */
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Field content. */
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Props for the FieldLabel component.
|
|
36
|
+
*/
|
|
37
|
+
export interface FieldLabelProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
38
|
+
/** Size for the field label. */
|
|
39
|
+
size?: 'small' | 'normal' | 'medium' | 'large';
|
|
40
|
+
/** Text color for the label. */
|
|
41
|
+
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
42
|
+
/** Bulma color for the label. */
|
|
43
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
44
|
+
/** Background color for the label. */
|
|
45
|
+
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
46
|
+
/** Additional CSS classes. */
|
|
47
|
+
className?: string;
|
|
48
|
+
/** Field label content. */
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Props for the FieldBody component.
|
|
53
|
+
*/
|
|
54
|
+
export interface FieldBodyProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
55
|
+
/** Text color for the field body. */
|
|
56
|
+
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
57
|
+
/** Bulma color for the field body. */
|
|
58
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
59
|
+
/** Background color for the field body. */
|
|
60
|
+
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
61
|
+
/** Additional CSS classes. */
|
|
62
|
+
className?: string;
|
|
63
|
+
/** Field body content. */
|
|
64
|
+
children?: React.ReactNode;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* FieldLabel component for rendering a Bulma field label.
|
|
68
|
+
*
|
|
69
|
+
* @function
|
|
70
|
+
* @param {FieldLabelProps} props - Props for the FieldLabel component.
|
|
71
|
+
* @returns {JSX.Element} The rendered field label.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* <FieldLabel size="normal">Name</FieldLabel>
|
|
75
|
+
*/
|
|
76
|
+
export declare const FieldLabel: React.FC<FieldLabelProps>;
|
|
77
|
+
/**
|
|
78
|
+
* FieldBody component for rendering Bulma field body.
|
|
79
|
+
*
|
|
80
|
+
* @function
|
|
81
|
+
* @param {FieldBodyProps} props - Props for the FieldBody component.
|
|
82
|
+
* @returns {JSX.Element} The rendered field body.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* <FieldBody><input className="input" /></FieldBody>
|
|
86
|
+
*/
|
|
87
|
+
export declare const FieldBody: React.FC<FieldBodyProps>;
|
|
88
|
+
export declare const Field: React.FC<FieldProps> & {
|
|
89
|
+
Label: React.FC<FieldLabelProps>;
|
|
90
|
+
Body: React.FC<FieldBodyProps>;
|
|
91
|
+
Control: React.ForwardRefExoticComponent<(Omit<{
|
|
92
|
+
as?: "div";
|
|
93
|
+
} & import("./Control.js").ControlBaseProps & {
|
|
94
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
95
|
+
}, "ref"> | Omit<{
|
|
96
|
+
as: "p";
|
|
97
|
+
} & Omit<import("./Control.js").ControlBaseProps, keyof React.HTMLAttributes<HTMLDivElement>> & React.HTMLAttributes<HTMLParagraphElement> & {
|
|
98
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
99
|
+
}, "ref">) & React.RefAttributes<HTMLDivElement | HTMLParagraphElement>>;
|
|
100
|
+
};
|
|
101
|
+
export default Field;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import { FormFieldProps } from './fieldProps.js';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the File component.
|
|
6
|
+
*/
|
|
7
|
+
export interface FileProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'color' | 'type'>, Omit<BulmaClassesProps, 'color'>, FormFieldProps {
|
|
8
|
+
/** Field label. Automatically associated with the file input via `htmlFor` — uses your `id` when provided, otherwise a generated one. The input then has two labels (this one plus the wrapping `file-label`); assistive tech reads both. Dropped inside an outer `Field` (label that `Field` yourself). */
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
/** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
|
|
11
|
+
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
/** Bulma color modifier for the file input. */
|
|
15
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
|
|
16
|
+
/** Size modifier for the file input. */
|
|
17
|
+
size?: 'small' | 'medium' | 'large';
|
|
18
|
+
/** Boxed file input. */
|
|
19
|
+
isBoxed?: boolean;
|
|
20
|
+
/** Whether the file input expands to full width. */
|
|
21
|
+
isFullwidth?: boolean;
|
|
22
|
+
/** Whether the file input expands to full width. @deprecated Use `isFullwidth` instead — `isFullwidth` wins if both are set. */
|
|
23
|
+
isFullWidth?: boolean;
|
|
24
|
+
/** Position the CTA on the right (with `hasName`). */
|
|
25
|
+
isRight?: boolean;
|
|
26
|
+
/** Center the file input within its container. */
|
|
27
|
+
isCentered?: boolean;
|
|
28
|
+
/** Show a file name indicator. */
|
|
29
|
+
hasName?: boolean;
|
|
30
|
+
/** Text on the file CTA button (defaults to "Choose a file…"). */
|
|
31
|
+
buttonLabel?: React.ReactNode;
|
|
32
|
+
/** Left icon element. */
|
|
33
|
+
iconLeft?: React.ReactNode;
|
|
34
|
+
/** Right icon element. */
|
|
35
|
+
iconRight?: React.ReactNode;
|
|
36
|
+
/** Additional CSS classes to apply. */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Additional CSS classes for the `<input>`. */
|
|
39
|
+
inputClassName?: string;
|
|
40
|
+
/** File name to display. */
|
|
41
|
+
fileName?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The `File` component provides a Bulma-styled file input, supporting color, size, boxed/fullwidth/align styles, icons, "has name", and filename display.
|
|
45
|
+
*
|
|
46
|
+
* @function
|
|
47
|
+
* @param {FileProps} props - Props for the File component.
|
|
48
|
+
* @returns {JSX.Element} The rendered file upload field.
|
|
49
|
+
* @see {@link https://bulma.io/documentation/form/file/ | Bulma File documentation}
|
|
50
|
+
*/
|
|
51
|
+
export declare const File: React.ForwardRefExoticComponent<FileProps & React.RefAttributes<HTMLInputElement>>;
|
|
52
|
+
export default File;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to detect if the component is inside a Field wrapper.
|
|
3
|
+
* Form components use this to skip rendering their own Field.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useInsideField: () => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Hook to detect if the component is inside a Control wrapper.
|
|
8
|
+
* Form components use this to skip rendering their own Control.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useInsideControl: () => boolean;
|
|
11
|
+
/** Provider for Field context — used internally by Field component. */
|
|
12
|
+
export declare const FieldProvider: import("react").Provider<boolean>;
|
|
13
|
+
/** Provider for Control context — used internally by Control component. */
|
|
14
|
+
export declare const ControlProvider: import("react").Provider<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* The id a labeled Field wants its single composed control to adopt (#495).
|
|
17
|
+
* `undefined` outside a Field, in unlabeled/grouped/addons Fields, or when the
|
|
18
|
+
* user took over the association with an explicit `labelProps.htmlFor`.
|
|
19
|
+
* Consumed only by the single-control bases (InputBase, SelectBase,
|
|
20
|
+
* TextAreaBase). Internal; not part of the public API.
|
|
21
|
+
*/
|
|
22
|
+
export declare const useFieldLabelId: () => string | undefined;
|
|
23
|
+
/** Provider for the Field label-target id — used internally by Field. */
|
|
24
|
+
export declare const FieldLabelIdProvider: import("react").Provider<string | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* Shape of the Radios group context. The group provides:
|
|
27
|
+
* - `name`: shared form field name (Stage 1)
|
|
28
|
+
* - `value`: currently-selected radio value (Stage 2 — group-managed selection)
|
|
29
|
+
* - `onChange`: dispatched by child Radios when clicked (Stage 2)
|
|
30
|
+
*
|
|
31
|
+
* Group sets `value`/`onChange` only when actively managing selection
|
|
32
|
+
* (i.e., the user passed `value`, `defaultValue`, or `onChange` to `<Radios>`).
|
|
33
|
+
* When only `name` is provided, the group is in "name-only" mode and child
|
|
34
|
+
* Radios manage their own checked state independently.
|
|
35
|
+
*/
|
|
36
|
+
export interface RadiosGroupContextValue {
|
|
37
|
+
name?: string;
|
|
38
|
+
value?: string;
|
|
39
|
+
onChange?: (value: string) => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Shape of the Checkboxes group context. Like Radios but with array semantics
|
|
43
|
+
* for multi-select.
|
|
44
|
+
*/
|
|
45
|
+
export interface CheckboxesGroupContextValue {
|
|
46
|
+
name?: string;
|
|
47
|
+
value?: string[];
|
|
48
|
+
onChange?: (values: string[]) => void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Hook to read the full surrounding `<Radios>` group context (name + selection).
|
|
52
|
+
* Returns `undefined` when not inside a `<Radios>` group.
|
|
53
|
+
*/
|
|
54
|
+
export declare const useRadiosGroup: () => RadiosGroupContextValue | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Hook to read the full surrounding `<Checkboxes>` group context.
|
|
57
|
+
* Returns `undefined` when not inside a `<Checkboxes>` group.
|
|
58
|
+
*/
|
|
59
|
+
export declare const useCheckboxesGroup: () => CheckboxesGroupContextValue | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Hook to read just the shared `name` from a surrounding `<Radios>` group.
|
|
62
|
+
* Child `<Radio>` components fall back to this when no local `name` prop is set.
|
|
63
|
+
* Returns `undefined` outside of a `<Radios>` group.
|
|
64
|
+
*/
|
|
65
|
+
export declare const useRadiosName: () => string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Hook to read just the shared `name` from a surrounding `<Checkboxes>` group.
|
|
68
|
+
* Returns `undefined` outside of a `<Checkboxes>` group.
|
|
69
|
+
*/
|
|
70
|
+
export declare const useCheckboxesName: () => string | undefined;
|
|
71
|
+
/** Provider for the Radios group context — used internally by Radios. */
|
|
72
|
+
export declare const RadiosProvider: import("react").Provider<RadiosGroupContextValue | undefined>;
|
|
73
|
+
/** Provider for the Checkboxes group context — used internally by Checkboxes. */
|
|
74
|
+
export declare const CheckboxesProvider: import("react").Provider<CheckboxesGroupContextValue | undefined>;
|
|
75
|
+
/** @deprecated Use `RadiosProvider` (provides {name, value, onChange}). */
|
|
76
|
+
export declare const RadiosNameProvider: import("react").Provider<RadiosGroupContextValue | undefined>;
|
|
77
|
+
/** @deprecated Use `CheckboxesProvider` (provides {name, value, onChange}). */
|
|
78
|
+
export declare const CheckboxesNameProvider: import("react").Provider<CheckboxesGroupContextValue | undefined>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldProps } from './Field.js';
|
|
3
|
+
import { ControlBaseProps } from './Control.js';
|
|
4
|
+
import { InputBaseProps } from './InputBase.js';
|
|
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
|
+
*/
|
|
12
|
+
export interface InputProps extends InputBaseProps {
|
|
13
|
+
/** Field label. Automatically associated with the input 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
|
+
/** Icon props for right icon. */
|
|
24
|
+
iconRight?: ControlBaseProps['iconRight'];
|
|
25
|
+
/** Shortcut for left icon name. */
|
|
26
|
+
iconLeftName?: string;
|
|
27
|
+
/** Shortcut for right icon name. */
|
|
28
|
+
iconRightName?: string;
|
|
29
|
+
/** Shortcut for left icon size. */
|
|
30
|
+
iconLeftSize?: ControlBaseProps['iconLeftSize'];
|
|
31
|
+
/** Shortcut for right icon size. */
|
|
32
|
+
iconRightSize?: ControlBaseProps['iconRightSize'];
|
|
33
|
+
/** Force left icon container. */
|
|
34
|
+
hasIconsLeft?: boolean;
|
|
35
|
+
/** Force right icon container. */
|
|
36
|
+
hasIconsRight?: boolean;
|
|
37
|
+
/** Shows loading indicator. */
|
|
38
|
+
isLoading?: boolean;
|
|
39
|
+
/** Expand the control. */
|
|
40
|
+
isExpanded?: boolean;
|
|
41
|
+
/** Control size. */
|
|
42
|
+
controlSize?: ControlBaseProps['size'];
|
|
43
|
+
/** Help/validation message below the input. */
|
|
44
|
+
message?: React.ReactNode;
|
|
45
|
+
/** Bulma color for the message. */
|
|
46
|
+
messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
47
|
+
/** Additional CSS classes for the Field. */
|
|
48
|
+
fieldClassName?: string;
|
|
49
|
+
/** Additional CSS classes for the Control. */
|
|
50
|
+
controlClassName?: string;
|
|
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
|
+
*/
|
|
71
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
72
|
+
export default Input;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Input component.
|
|
5
|
+
*/
|
|
6
|
+
export interface InputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
|
|
7
|
+
/** Bulma color modifier for the input. */
|
|
8
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
|
|
9
|
+
/** Size modifier for the input. */
|
|
10
|
+
size?: 'small' | 'medium' | 'large';
|
|
11
|
+
/** Rounded input corners. */
|
|
12
|
+
isRounded?: boolean;
|
|
13
|
+
/** Renders input as static (read only, styled). */
|
|
14
|
+
isStatic?: boolean;
|
|
15
|
+
/** Applies hovered state. */
|
|
16
|
+
isHovered?: boolean;
|
|
17
|
+
/** Applies focused state. */
|
|
18
|
+
isFocused?: boolean;
|
|
19
|
+
/** Shows loading indicator. */
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
/** Additional CSS classes to apply. */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Disabled input. */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** Read-only input. */
|
|
26
|
+
readOnly?: boolean;
|
|
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
|
+
*/
|
|
36
|
+
export declare const InputBase: React.ForwardRefExoticComponent<InputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
37
|
+
export default InputBase;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import { FormFieldProps } from './fieldProps.js';
|
|
4
|
+
/** Valid sizes for the Numberinput component. */
|
|
5
|
+
export type NumberinputSize = 'small' | 'medium' | 'large';
|
|
6
|
+
/** Valid colors for the Numberinput wrapper and control buttons. */
|
|
7
|
+
export type NumberinputColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'light' | 'dark';
|
|
8
|
+
/** Valid colors for the Numberinput inner input element. */
|
|
9
|
+
export type NumberinputInputColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
10
|
+
/** Position of the increment/decrement control buttons. */
|
|
11
|
+
export type NumberinputControlsPosition = 'left' | 'right' | 'both';
|
|
12
|
+
/** Visual variant for the Numberinput controls. */
|
|
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
|
+
*/
|
|
19
|
+
export interface NumberinputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'size' | 'onChange' | 'value' | 'defaultValue' | 'type'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>, FormFieldProps {
|
|
20
|
+
/** Field label. Automatically associated with the number input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired when no Field wrapper is rendered (inside a `Field`, or plusminus `bare`). */
|
|
21
|
+
label?: React.ReactNode;
|
|
22
|
+
/** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
|
|
23
|
+
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
/** Controlled value. */
|
|
27
|
+
value?: number;
|
|
28
|
+
/** Default value for uncontrolled usage. */
|
|
29
|
+
defaultValue?: number;
|
|
30
|
+
/** Minimum allowed value. */
|
|
31
|
+
min?: number;
|
|
32
|
+
/** Maximum allowed value. */
|
|
33
|
+
max?: number;
|
|
34
|
+
/** Step increment (default: 1). */
|
|
35
|
+
step?: number;
|
|
36
|
+
/** Size variant. */
|
|
37
|
+
size?: NumberinputSize;
|
|
38
|
+
/** Color variant for buttons. */
|
|
39
|
+
color?: NumberinputColor;
|
|
40
|
+
/** Color of the input field itself. */
|
|
41
|
+
inputColor?: NumberinputInputColor;
|
|
42
|
+
/** Position of +/- buttons. */
|
|
43
|
+
controlsPosition?: NumberinputControlsPosition;
|
|
44
|
+
/** Use rounded buttons. */
|
|
45
|
+
controlsRounded?: boolean;
|
|
46
|
+
/** Uses compact button spacing. */
|
|
47
|
+
compact?: boolean;
|
|
48
|
+
/** Removes button borders and background. */
|
|
49
|
+
bare?: boolean;
|
|
50
|
+
/** Style variant for the control buttons. */
|
|
51
|
+
variant?: NumberinputVariant;
|
|
52
|
+
/** Whether the input is disabled. */
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
/** Whether the input can be typed in. */
|
|
55
|
+
editable?: boolean;
|
|
56
|
+
/** Shows a loading state. */
|
|
57
|
+
isLoading?: boolean;
|
|
58
|
+
/** Enables exponential step increments when holding buttons. */
|
|
59
|
+
exponential?: boolean;
|
|
60
|
+
/** Callback when value changes. */
|
|
61
|
+
onChange?: (value: number) => void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The `Numberinput` component provides a number input with increment/decrement buttons.
|
|
65
|
+
*
|
|
66
|
+
* @function
|
|
67
|
+
* @param {NumberinputProps} props - Props for the Numberinput component.
|
|
68
|
+
* @returns {JSX.Element} The rendered numeric input element.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* // Basic number input
|
|
72
|
+
* <Numberinput defaultValue={5} min={0} max={100} />
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* // Stepper variant with color
|
|
76
|
+
* <Numberinput variant="stepper" color="primary" step={10} />
|
|
77
|
+
*/
|
|
78
|
+
export declare const Numberinput: React.ForwardRefExoticComponent<NumberinputProps & React.RefAttributes<HTMLInputElement>>;
|
|
79
|
+
/** @deprecated Use `Numberinput` — same component. */
|
|
80
|
+
export declare const NumberInput: React.ForwardRefExoticComponent<NumberinputProps & React.RefAttributes<HTMLInputElement>>;
|
|
81
|
+
/** @deprecated Use `NumberinputProps`. */
|
|
82
|
+
export type NumberInputProps = NumberinputProps;
|
|
83
|
+
export default Numberinput;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
/**
|
|
4
|
+
* Valid colors for the Radio component.
|
|
5
|
+
*/
|
|
6
|
+
export declare const radioColors: readonly ["primary", "link", "info", "success", "warning", "danger"];
|
|
7
|
+
/**
|
|
8
|
+
* Valid sizes for the Radio component.
|
|
9
|
+
*/
|
|
10
|
+
export declare const radioSizes: readonly ["small", "normal", "medium", "large"];
|
|
11
|
+
/**
|
|
12
|
+
* Props for the Radio component.
|
|
13
|
+
*/
|
|
14
|
+
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
|
|
15
|
+
/** Color of the radio button. */
|
|
16
|
+
color?: (typeof radioColors)[number];
|
|
17
|
+
/** Size of the radio button. */
|
|
18
|
+
size?: (typeof radioSizes)[number];
|
|
19
|
+
/** Text color helper. */
|
|
20
|
+
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
21
|
+
/** Whether the radio is disabled. */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Additional CSS classes to apply. */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** The label/content for the radio. */
|
|
26
|
+
children?: React.ReactNode;
|
|
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
|
+
*/
|
|
46
|
+
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
47
|
+
export default Radio;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import { FormFieldProps } from './fieldProps.js';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Radios component.
|
|
6
|
+
*/
|
|
7
|
+
export interface RadiosProps extends Omit<BulmaClassesProps, 'color'>, FormFieldProps {
|
|
8
|
+
/** Field label naming the whole group. Automatically associated via `aria-labelledby` on the `role="radiogroup"` wrapper — uses your `labelProps.id` when provided, otherwise a generated one. Dropped inside an outer `Field` (label that `Field` yourself). */
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
/** 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). */
|
|
11
|
+
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
/** Additional CSS classes to apply. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Form field name shared by every Radio in the group (via context). */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Currently-selected value (controlled mode). */
|
|
19
|
+
value?: string;
|
|
20
|
+
/** Initial selected value (uncontrolled mode). */
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
/** Fires when the selection changes. */
|
|
23
|
+
onChange?: (value: string) => void;
|
|
24
|
+
/** Radio elements to render in the group. */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export declare const Radios: React.FC<RadiosProps> & {
|
|
28
|
+
Radio: React.ForwardRefExoticComponent<import("./Radio.js").RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
};
|
|
30
|
+
export default Radios;
|