@allxsmith/bestax-bulma 5.7.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +28 -0
- package/CLAUDE.md +28 -0
- package/README.md +4 -0
- package/dist/index.cjs.js +3629 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3629 -37
- package/dist/index.esm.js.map +1 -1
- package/dist/types/columns/Column.d.ts +43 -0
- package/dist/types/columns/Columns.d.ts +38 -0
- package/dist/types/components/Avatar.d.ts +37 -0
- package/dist/types/components/Avatars.d.ts +13 -0
- package/dist/types/components/Badge.d.ts +42 -0
- package/dist/types/components/Breadcrumb.d.ts +28 -0
- package/dist/types/components/Card.d.ts +62 -0
- package/dist/types/components/Carousel.d.ts +70 -0
- package/dist/types/components/Collapse.d.ts +53 -0
- package/dist/types/components/Dialog.d.ts +94 -0
- package/dist/types/components/Dropdown.d.ts +44 -0
- package/dist/types/components/Loading.d.ts +55 -0
- package/dist/types/components/Menu.d.ts +48 -0
- package/dist/types/components/Message.d.ts +23 -0
- package/dist/types/components/Modal.d.ts +56 -0
- package/dist/types/components/Navbar.d.ts +159 -0
- package/dist/types/components/Pagination.d.ts +77 -0
- package/dist/types/components/Panel.d.ts +100 -0
- package/dist/types/components/Reveal.d.ts +43 -0
- package/dist/types/components/Sidebar.d.ts +40 -0
- package/dist/types/components/Steps.d.ts +65 -0
- package/dist/types/components/Tabs.d.ts +89 -0
- package/dist/types/components/Toast.d.ts +109 -0
- package/dist/types/components/Tooltip.d.ts +50 -0
- package/dist/types/elements/Block.d.ts +20 -0
- package/dist/types/elements/Box.d.ts +23 -1
- package/dist/types/elements/Button.d.ts +26 -0
- package/dist/types/elements/Buttons.d.ts +12 -0
- package/dist/types/elements/Code.d.ts +19 -0
- package/dist/types/elements/Content.d.ts +21 -0
- package/dist/types/elements/Delete.d.ts +22 -0
- package/dist/types/elements/Divider.d.ts +16 -0
- package/dist/types/elements/Emphasis.d.ts +19 -0
- package/dist/types/elements/Figure.d.ts +25 -0
- package/dist/types/elements/Icon.d.ts +28 -0
- package/dist/types/elements/IconText.d.ts +17 -0
- package/dist/types/elements/Image.d.ts +27 -0
- package/dist/types/elements/Link.d.ts +24 -0
- package/dist/types/elements/LinkButton.d.ts +26 -0
- package/dist/types/elements/ListItem.d.ts +20 -0
- package/dist/types/elements/Notification.d.ts +101 -0
- package/dist/types/elements/OrderedList.d.ts +11 -0
- package/dist/types/elements/Paragraph.d.ts +19 -0
- package/dist/types/elements/Pre.d.ts +19 -0
- package/dist/types/elements/Progress.d.ts +20 -0
- package/dist/types/elements/Skeleton.d.ts +31 -0
- package/dist/types/elements/Span.d.ts +18 -0
- package/dist/types/elements/Strong.d.ts +19 -0
- package/dist/types/elements/SubTitle.d.ts +27 -0
- package/dist/types/elements/Table.d.ts +15 -0
- package/dist/types/elements/Tag.d.ts +28 -0
- package/dist/types/elements/Tags.d.ts +8 -0
- package/dist/types/elements/Tbody.d.ts +19 -0
- package/dist/types/elements/Td.d.ts +24 -0
- package/dist/types/elements/Tfoot.d.ts +19 -0
- package/dist/types/elements/Th.d.ts +25 -0
- package/dist/types/elements/Thead.d.ts +19 -0
- package/dist/types/elements/Title.d.ts +28 -0
- package/dist/types/elements/Tr.d.ts +21 -0
- package/dist/types/elements/UnorderedList.d.ts +8 -0
- package/dist/types/form/Autocomplete.d.ts +67 -0
- package/dist/types/form/Checkbox.d.ts +44 -0
- package/dist/types/form/Checkboxes.d.ts +10 -0
- package/dist/types/form/Control.d.ts +36 -0
- package/dist/types/form/DateInput.d.ts +44 -0
- package/dist/types/form/DateInputBase.d.ts +47 -0
- package/dist/types/form/DateTimeInput.d.ts +42 -0
- package/dist/types/form/DateTimeInputBase.d.ts +56 -0
- package/dist/types/form/Field.d.ts +55 -0
- package/dist/types/form/File.d.ts +26 -0
- package/dist/types/form/FormContext.d.ts +46 -0
- package/dist/types/form/Input.d.ts +49 -0
- package/dist/types/form/InputBase.d.ts +22 -0
- package/dist/types/form/Numberinput.d.ts +46 -0
- package/dist/types/form/Radio.d.ts +44 -0
- package/dist/types/form/Radios.d.ts +10 -0
- package/dist/types/form/Rate.d.ts +71 -0
- package/dist/types/form/Select.d.ts +39 -0
- package/dist/types/form/SelectBase.d.ts +25 -0
- package/dist/types/form/Slider.d.ts +71 -0
- package/dist/types/form/Switch.d.ts +53 -0
- package/dist/types/form/Taginput.d.ts +77 -0
- package/dist/types/form/TextArea.d.ts +38 -0
- package/dist/types/form/TextAreaBase.d.ts +25 -0
- package/dist/types/form/TimeInput.d.ts +39 -0
- package/dist/types/form/TimeInputBase.d.ts +72 -0
- package/dist/types/form/_pickerInternals/Calendar.d.ts +6 -0
- package/dist/types/form/_pickerInternals/TimeWheels.d.ts +13 -0
- package/dist/types/form/_pickerInternals/audioTick.d.ts +47 -0
- package/dist/types/form/_pickerInternals/dateUtils.d.ts +13 -0
- package/dist/types/form/_pickerInternals/formatters.d.ts +19 -0
- package/dist/types/form/_pickerInternals/haptics.d.ts +23 -0
- package/dist/types/form/_pickerInternals/pickerTypes.d.ts +8 -0
- package/dist/types/form/_pickerInternals/segmentMap.d.ts +48 -0
- package/dist/types/form/_pickerInternals/useNativeMobilePicker.d.ts +1 -0
- package/dist/types/form/_pickerInternals/useSegmentedEntry.d.ts +30 -0
- package/dist/types/form/fieldProps.d.ts +12 -0
- package/dist/types/grid/Cell.d.ts +26 -0
- package/dist/types/grid/Grid.d.ts +33 -0
- package/dist/types/helpers/Config.d.ts +50 -0
- package/dist/types/helpers/Theme.d.ts +66 -0
- package/dist/types/helpers/bulmaClassHelpers.d.ts +97 -0
- package/dist/types/helpers/classNames.d.ts +50 -0
- package/dist/types/helpers/useBulmaClasses.d.ts +22 -0
- package/dist/types/helpers/useColorClasses.d.ts +20 -0
- package/dist/types/helpers/useFlexboxClasses.d.ts +34 -0
- package/dist/types/helpers/useOtherClasses.d.ts +27 -0
- package/dist/types/helpers/useSpacingClasses.d.ts +27 -0
- package/dist/types/helpers/useTypographyClasses.d.ts +32 -0
- package/dist/types/helpers/useVisibilityClasses.d.ts +25 -0
- package/dist/types/helpers/withSubComponents.d.ts +13 -0
- package/dist/types/layout/Container.d.ts +26 -0
- package/dist/types/layout/Footer.d.ts +23 -0
- package/dist/types/layout/Hero.d.ts +61 -0
- package/dist/types/layout/Level.d.ts +63 -0
- package/dist/types/layout/Media.d.ts +60 -0
- package/dist/types/layout/Section.d.ts +21 -0
- package/dist/types/skill-examples/ExampleMeta.d.ts +5 -0
- package/dist/types/skill-examples/ProfileCard.d.ts +13 -0
- package/llms.txt +9 -0
- package/package.json +13 -11
|
@@ -2,6 +2,29 @@ import React from 'react';
|
|
|
2
2
|
import { FieldProps } from './Field';
|
|
3
3
|
import { ControlBaseProps } from './Control';
|
|
4
4
|
import { DateInputBaseProps } from './DateInputBase';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the DateInput convenience wrapper. Extends `DateInputBaseProps`
|
|
7
|
+
* with Field-level (label, horizontal) and Control-level (icons, loading) props.
|
|
8
|
+
*
|
|
9
|
+
* @property {React.ReactNode} [label] - Field label.
|
|
10
|
+
* @property {FieldProps['labelSize']} [labelSize] - Size for the label.
|
|
11
|
+
* @property {FieldProps['labelProps']} [labelProps] - Props for the label element.
|
|
12
|
+
* @property {boolean} [horizontal] - Render the field with horizontal layout.
|
|
13
|
+
* @property {ControlBaseProps['iconLeft']} [iconLeft] - Icon props for the left icon.
|
|
14
|
+
* @property {ControlBaseProps['iconRight']} [iconRight] - Icon props for the right icon.
|
|
15
|
+
* @property {string} [iconRightName] - Shortcut for the right icon name.
|
|
16
|
+
* @property {ControlBaseProps['iconLeftSize']} [iconLeftSize] - Shortcut for left icon size.
|
|
17
|
+
* @property {ControlBaseProps['iconRightSize']} [iconRightSize] - Shortcut for right icon size.
|
|
18
|
+
* @property {boolean} [hasIconsLeft] - Force the left icon container.
|
|
19
|
+
* @property {boolean} [hasIconsRight] - Force the right icon container.
|
|
20
|
+
* @property {boolean} [isLoading] - Show a loading indicator on the control.
|
|
21
|
+
* @property {boolean} [isExpanded] - Expand the control to fill its container.
|
|
22
|
+
* @property {ControlBaseProps['size']} [controlSize] - Size of the wrapping Control.
|
|
23
|
+
* @property {React.ReactNode} [message] - Help/validation text below the input.
|
|
24
|
+
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'} [messageColor] - Message color.
|
|
25
|
+
* @property {string} [fieldClassName] - Additional CSS classes for the Field wrapper.
|
|
26
|
+
* @property {string} [controlClassName] - Additional CSS classes for the Control wrapper.
|
|
27
|
+
*/
|
|
5
28
|
export interface DateInputProps extends DateInputBaseProps {
|
|
6
29
|
label?: React.ReactNode;
|
|
7
30
|
labelSize?: FieldProps['labelSize'];
|
|
@@ -22,5 +45,26 @@ export interface DateInputProps extends DateInputBaseProps {
|
|
|
22
45
|
fieldClassName?: string;
|
|
23
46
|
controlClassName?: string;
|
|
24
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* DateInput is a form input that opens a popover calendar for date selection.
|
|
50
|
+
* Uses native `Date` and `Intl` only (no extra dependencies). Supports min/max
|
|
51
|
+
* bounds, disabled-date predicates, custom formats, locale-aware day/month
|
|
52
|
+
* names, an inline mode, and a native `<input type="date">` fallback for touch
|
|
53
|
+
* devices.
|
|
54
|
+
*
|
|
55
|
+
* @function
|
|
56
|
+
* @param {DateInputProps} props - Props for the DateInput.
|
|
57
|
+
* @returns {JSX.Element}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* <DateInput label="Date of birth" defaultValue={new Date(1990, 0, 1)} />
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* <DateInput
|
|
64
|
+
* label="Booking"
|
|
65
|
+
* min={new Date()}
|
|
66
|
+
* shouldDisableDate={d => d.getDay() === 0 || d.getDay() === 6}
|
|
67
|
+
* />
|
|
68
|
+
*/
|
|
25
69
|
export declare const DateInput: React.ForwardRefExoticComponent<DateInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
26
70
|
export default DateInput;
|
|
@@ -2,6 +2,44 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
3
|
import { PickerPosition, DayOfWeek, PickerLabels } from './_pickerInternals/pickerTypes';
|
|
4
4
|
import { DateFormatOption } from './_pickerInternals/formatters';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the raw DateInput base. Use the higher-level `DateInput` for
|
|
7
|
+
* Field/Control composition; `DateInputBase` is the input + popover only.
|
|
8
|
+
*
|
|
9
|
+
* @property {Date | null} [value] - Controlled selected date.
|
|
10
|
+
* @property {Date | null} [defaultValue] - Initial date for uncontrolled usage.
|
|
11
|
+
* @property {(d: Date | null) => void} [onChange] - Fired when the value changes.
|
|
12
|
+
* @property {() => void} [onOpen] - Fired when the popover opens.
|
|
13
|
+
* @property {() => void} [onClose] - Fired when the popover closes.
|
|
14
|
+
* @property {Date} [min] - Earliest selectable date.
|
|
15
|
+
* @property {Date} [max] - Latest selectable date.
|
|
16
|
+
* @property {boolean} [disabled] - Disable the input.
|
|
17
|
+
* @property {boolean} [readOnly] - Make the input read-only.
|
|
18
|
+
* @property {string} [placeholder] - Placeholder text.
|
|
19
|
+
* @property {DateFormatOption} [format] - Token format string or `Intl.DateTimeFormat` options. Default `'YYYY-MM-DD'`.
|
|
20
|
+
* @property {(s: string) => Date | null} [parse] - Custom parser (use when `format` is `Intl.DateTimeFormatOptions`).
|
|
21
|
+
* @property {string} [locale] - BCP-47 locale tag for day/month names.
|
|
22
|
+
* @property {boolean} [inline] - Render the calendar inline (no popover).
|
|
23
|
+
* @property {boolean | 'auto'} [mobileNative] - Use native `<input type="date">` on coarse-pointer + small-viewport devices.
|
|
24
|
+
* @property {boolean} [editable] - Allow segmented keyboard typing in the input (type the date directly, auto-advancing across segments). Default `true`.
|
|
25
|
+
* @property {boolean} [popover] - Whether the calendar popover exists. `false` makes the field input-only (segmented typing with no popover). Default `true`.
|
|
26
|
+
* @property {boolean} [openOnFocus] - Open the popover on focus. Default `true`.
|
|
27
|
+
* @property {boolean} [closeOnSelect] - Close the popover after selection. Default `true`.
|
|
28
|
+
* @property {PickerPosition} [position] - Popover anchor position.
|
|
29
|
+
* @property {boolean} [appendToBody] - Render the popover into `document.body` via portal.
|
|
30
|
+
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'} [color] - Bulma color modifier.
|
|
31
|
+
* @property {'small'|'medium'|'large'} [size] - Size variant.
|
|
32
|
+
* @property {boolean} [isRounded] - Render the input with rounded corners.
|
|
33
|
+
* @property {(d: Date) => boolean} [shouldDisableDate] - Predicate to disable specific dates. Blocked dates can't be selected in the calendar and are rejected by manual typing (segmented and free-form).
|
|
34
|
+
* @property {Date[]} [unselectableDates] - Convenience array of disabled dates, matched by calendar day; also rejected by manual typing.
|
|
35
|
+
* @property {DayOfWeek} [firstDayOfWeek] - Day the week starts on (0 = Sunday).
|
|
36
|
+
* @property {string[]} [dayNames] - Override the 7 day-name labels.
|
|
37
|
+
* @property {string[]} [monthNames] - Override the 12 month-name labels.
|
|
38
|
+
* @property {boolean} [nearbyMonthDays] - Show dimmed dates from adjacent months. Default `true`.
|
|
39
|
+
* @property {string} [iconLeftName] - Decorative left icon glyph for the wrapping Control (shown by default; set to '' to hide).
|
|
40
|
+
* @property {boolean} [triggerIcon] - Show a clickable launcher button on the right that toggles the popover. Default `true`.
|
|
41
|
+
* @property {string} [triggerIconName] - Glyph name for the right launcher button. Default `'chevron-down'`.
|
|
42
|
+
*/
|
|
5
43
|
export interface DateInputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'color' | 'min' | 'max' | 'type' | 'popover'>, Omit<BulmaClassesProps, 'color'> {
|
|
6
44
|
value?: Date | null;
|
|
7
45
|
defaultValue?: Date | null;
|
|
@@ -36,7 +74,16 @@ export interface DateInputBaseProps extends Omit<React.InputHTMLAttributes<HTMLI
|
|
|
36
74
|
iconLeftName?: string;
|
|
37
75
|
triggerIcon?: boolean;
|
|
38
76
|
triggerIconName?: string;
|
|
77
|
+
/** Optional translatable string overrides (ARIA labels, button text). */
|
|
39
78
|
labels?: PickerLabels;
|
|
40
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Raw DateInput — input + popover calendar without Field/Control wrapping.
|
|
82
|
+
* Use `DateInput` for the convenience wrapper.
|
|
83
|
+
*
|
|
84
|
+
* @function
|
|
85
|
+
* @param {DateInputBaseProps} props
|
|
86
|
+
* @returns {JSX.Element}
|
|
87
|
+
*/
|
|
41
88
|
export declare const DateInputBase: React.ForwardRefExoticComponent<DateInputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
42
89
|
export default DateInputBase;
|
|
@@ -2,6 +2,29 @@ import React from 'react';
|
|
|
2
2
|
import { FieldProps } from './Field';
|
|
3
3
|
import { ControlBaseProps } from './Control';
|
|
4
4
|
import { DateTimeInputBaseProps } from './DateTimeInputBase';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the DateTimeInput convenience wrapper. Extends
|
|
7
|
+
* `DateTimeInputBaseProps` with Field-level and Control-level props.
|
|
8
|
+
*
|
|
9
|
+
* @property {React.ReactNode} [label] - Field label.
|
|
10
|
+
* @property {FieldProps['labelSize']} [labelSize] - Size for the label.
|
|
11
|
+
* @property {FieldProps['labelProps']} [labelProps] - Props for the label element.
|
|
12
|
+
* @property {boolean} [horizontal] - Render the field with horizontal layout.
|
|
13
|
+
* @property {ControlBaseProps['iconLeft']} [iconLeft] - Icon props for the left icon.
|
|
14
|
+
* @property {ControlBaseProps['iconRight']} [iconRight] - Icon props for the right icon.
|
|
15
|
+
* @property {string} [iconRightName] - Shortcut for the right icon name.
|
|
16
|
+
* @property {ControlBaseProps['iconLeftSize']} [iconLeftSize] - Shortcut for left icon size.
|
|
17
|
+
* @property {ControlBaseProps['iconRightSize']} [iconRightSize] - Shortcut for right icon size.
|
|
18
|
+
* @property {boolean} [hasIconsLeft] - Force the left icon container.
|
|
19
|
+
* @property {boolean} [hasIconsRight] - Force the right icon container.
|
|
20
|
+
* @property {boolean} [isLoading] - Show a loading indicator on the control.
|
|
21
|
+
* @property {boolean} [isExpanded] - Expand the control to fill its container.
|
|
22
|
+
* @property {ControlBaseProps['size']} [controlSize] - Size of the wrapping Control.
|
|
23
|
+
* @property {React.ReactNode} [message] - Help/validation text below the input.
|
|
24
|
+
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'} [messageColor] - Message color.
|
|
25
|
+
* @property {string} [fieldClassName] - Additional CSS classes for the Field wrapper.
|
|
26
|
+
* @property {string} [controlClassName] - Additional CSS classes for the Control wrapper.
|
|
27
|
+
*/
|
|
5
28
|
export interface DateTimeInputProps extends DateTimeInputBaseProps {
|
|
6
29
|
label?: React.ReactNode;
|
|
7
30
|
labelSize?: FieldProps['labelSize'];
|
|
@@ -22,5 +45,24 @@ export interface DateTimeInputProps extends DateTimeInputBaseProps {
|
|
|
22
45
|
fieldClassName?: string;
|
|
23
46
|
controlClassName?: string;
|
|
24
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* DateTimeInput is a form input that opens a popover combining a calendar
|
|
50
|
+
* (above) and a time spinner (below). Footer offers Today / Now / Clear / OK.
|
|
51
|
+
* Includes a native `<input type="datetime-local">` fallback for touch devices.
|
|
52
|
+
*
|
|
53
|
+
* @function
|
|
54
|
+
* @param {DateTimeInputProps} props
|
|
55
|
+
* @returns {JSX.Element}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* <DateTimeInput label="Appointment" defaultValue={new Date()} />
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* <DateTimeInput
|
|
62
|
+
* label="When"
|
|
63
|
+
* hourFormat="12"
|
|
64
|
+
* shouldDisableDate={d => d.getDay() === 0 || d.getDay() === 6}
|
|
65
|
+
* />
|
|
66
|
+
*/
|
|
25
67
|
export declare const DateTimeInput: React.ForwardRefExoticComponent<DateTimeInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
26
68
|
export default DateTimeInput;
|
|
@@ -2,6 +2,53 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
3
|
import { PickerPosition, HourFormat, DayOfWeek, PickerLabels } from './_pickerInternals/pickerTypes';
|
|
4
4
|
import { DateFormatOption } from './_pickerInternals/formatters';
|
|
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
|
+
* @property {Date | null} [value] - Controlled selected date-time.
|
|
11
|
+
* @property {Date | null} [defaultValue] - Initial value for uncontrolled usage.
|
|
12
|
+
* @property {(d: Date | null) => void} [onChange] - Fired when either half changes.
|
|
13
|
+
* @property {() => void} [onOpen] - Fired when the popover opens.
|
|
14
|
+
* @property {() => void} [onClose] - Fired when the popover closes.
|
|
15
|
+
* @property {Date} [min] - Lower bound for the combined date-time.
|
|
16
|
+
* @property {Date} [max] - Upper bound for the combined date-time.
|
|
17
|
+
* @property {boolean} [disabled] - Disable the input.
|
|
18
|
+
* @property {boolean} [readOnly] - Read-only input.
|
|
19
|
+
* @property {string} [placeholder] - Placeholder text.
|
|
20
|
+
* @property {DateFormatOption} [format] - Token format string or `Intl.DateTimeFormat` options. Default `'YYYY-MM-DD HH:mm'`.
|
|
21
|
+
* @property {(s: string) => Date | null} [parse] - Custom parser.
|
|
22
|
+
* @property {string} [locale] - BCP-47 locale tag.
|
|
23
|
+
* @property {boolean} [inline] - Render the panel inline (no popover).
|
|
24
|
+
* @property {boolean | 'auto'} [mobileNative] - Use native `<input type="datetime-local">` on coarse-pointer devices.
|
|
25
|
+
* @property {boolean} [editable] - Allow segmented keyboard typing in the input (type the date-time directly, auto-advancing across segments). Default `true`.
|
|
26
|
+
* @property {boolean} [popover] - Whether the calendar + time popover exists. `false` makes the field input-only (segmented typing with no popover). Default `true`.
|
|
27
|
+
* @property {boolean} [openOnFocus] - Open the popover on focus. Default `true`.
|
|
28
|
+
* @property {boolean} [closeOnSelect] - Close after selection. Default `false`.
|
|
29
|
+
* @property {PickerPosition} [position] - Popover anchor position.
|
|
30
|
+
* @property {boolean} [appendToBody] - Render the popover into `document.body` via portal.
|
|
31
|
+
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'} [color] - Bulma color modifier.
|
|
32
|
+
* @property {'small'|'medium'|'large'} [size] - Size variant.
|
|
33
|
+
* @property {boolean} [isRounded] - Rounded input corners.
|
|
34
|
+
* @property {(d: Date) => boolean} [shouldDisableDate] - Predicate for disabled dates. Blocked dates can't be picked in the calendar and are rejected by manual typing; during entry the predicate receives the full candidate date-time, so prefer day-based checks.
|
|
35
|
+
* @property {Date[]} [unselectableDates] - Convenience array of disabled dates, matched by calendar day; also rejected by manual typing.
|
|
36
|
+
* @property {DayOfWeek} [firstDayOfWeek] - Day the calendar week starts on.
|
|
37
|
+
* @property {string[]} [dayNames] - Override the 7 day-name labels.
|
|
38
|
+
* @property {string[]} [monthNames] - Override the 12 month-name labels.
|
|
39
|
+
* @property {boolean} [nearbyMonthDays] - Show dimmed dates from adjacent months.
|
|
40
|
+
* @property {HourFormat} [hourFormat] - `'12'` or `'24'`. Default `'24'`.
|
|
41
|
+
* @property {boolean} [enableSeconds] - Show a seconds column. Note: iOS Safari's native datetime-local picker has no seconds wheel; combine with `mobileNative={false}` if a seconds wheel is required on iOS.
|
|
42
|
+
* @property {number} [incrementHours] - Hour step.
|
|
43
|
+
* @property {number} [incrementMinutes] - Minute step.
|
|
44
|
+
* @property {number} [incrementSeconds] - Second step.
|
|
45
|
+
* @property {(d: Date) => boolean} [unselectableTimes] - Predicate for blocked times (the wheels skip ahead; manual typing rejects them).
|
|
46
|
+
* @property {string} [iconLeftName] - Decorative left icon glyph for the wrapping Control (shown by default; set to '' to hide).
|
|
47
|
+
* @property {boolean} [triggerIcon] - Show a clickable launcher button on the right that toggles the popover. Default `true`.
|
|
48
|
+
* @property {string} [triggerIconName] - Glyph name for the right launcher button. Default `'chevron-down'`.
|
|
49
|
+
* @property {boolean} [audioTick] - Play a short audible tick on each time-wheel crossing. Default `false`.
|
|
50
|
+
* @property {boolean} [haptics] - Auto-route tactile feedback per wheel tick (vibrate on Android, audio thunk on iOS). Default `false`.
|
|
51
|
+
*/
|
|
5
52
|
export interface DateTimeInputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'color' | 'min' | 'max' | 'type' | 'popover'>, Omit<BulmaClassesProps, 'color'> {
|
|
6
53
|
value?: Date | null;
|
|
7
54
|
defaultValue?: Date | null;
|
|
@@ -44,7 +91,16 @@ export interface DateTimeInputBaseProps extends Omit<React.InputHTMLAttributes<H
|
|
|
44
91
|
triggerIconName?: string;
|
|
45
92
|
audioTick?: boolean;
|
|
46
93
|
haptics?: boolean;
|
|
94
|
+
/** Optional translatable string overrides. */
|
|
47
95
|
labels?: PickerLabels;
|
|
48
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Raw DateTimeInput — combined input + calendar + time spinner without
|
|
99
|
+
* Field/Control wrapping. Use `DateTimeInput` for the convenience wrapper.
|
|
100
|
+
*
|
|
101
|
+
* @function
|
|
102
|
+
* @param {DateTimeInputBaseProps} props
|
|
103
|
+
* @returns {JSX.Element}
|
|
104
|
+
*/
|
|
49
105
|
export declare const DateTimeInputBase: React.ForwardRefExoticComponent<DateTimeInputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
50
106
|
export default DateTimeInputBase;
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Field component.
|
|
5
|
+
*
|
|
6
|
+
* @property {boolean} [horizontal] - Renders the field as horizontal (label and control side by side).
|
|
7
|
+
* @property {boolean|'centered'|'right'|'multiline'} [grouped] - Group controls in a row (optionally centered, right, or multiline).
|
|
8
|
+
* @property {boolean|'centered'|'right'} [hasAddons] - Group controls as addons (optionally centered or right-aligned).
|
|
9
|
+
* @property {boolean} [narrow] - Constrains the field to its content's width (used inside horizontal field bodies).
|
|
10
|
+
* @property {React.ReactNode} [label] - Field label.
|
|
11
|
+
* @property {'small'|'normal'|'medium'|'large'} [labelSize] - Size for the label.
|
|
12
|
+
* @property {object} [labelProps] - Props for the label element.
|
|
13
|
+
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color for the field.
|
|
14
|
+
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'} [color] - Bulma color for the field.
|
|
15
|
+
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color for the field.
|
|
16
|
+
* @property {string} [className] - Additional CSS classes.
|
|
17
|
+
* @property {React.ReactNode} [children] - Field content.
|
|
18
|
+
*/
|
|
3
19
|
export interface FieldProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
4
20
|
horizontal?: boolean;
|
|
5
21
|
grouped?: boolean | 'centered' | 'right' | 'multiline';
|
|
@@ -16,6 +32,16 @@ export interface FieldProps extends React.HTMLAttributes<HTMLDivElement>, Omit<B
|
|
|
16
32
|
className?: string;
|
|
17
33
|
children?: React.ReactNode;
|
|
18
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Props for the FieldLabel component.
|
|
37
|
+
*
|
|
38
|
+
* @property {'small'|'normal'|'medium'|'large'} [size] - Size for the field label.
|
|
39
|
+
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color for the label.
|
|
40
|
+
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'} [color] - Bulma color for the label.
|
|
41
|
+
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color for the label.
|
|
42
|
+
* @property {string} [className] - Additional CSS classes.
|
|
43
|
+
* @property {React.ReactNode} [children] - Field label content.
|
|
44
|
+
*/
|
|
19
45
|
export interface FieldLabelProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
20
46
|
size?: 'small' | 'normal' | 'medium' | 'large';
|
|
21
47
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
@@ -24,6 +50,15 @@ export interface FieldLabelProps extends React.HTMLAttributes<HTMLDivElement>, O
|
|
|
24
50
|
className?: string;
|
|
25
51
|
children?: React.ReactNode;
|
|
26
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Props for the FieldBody component.
|
|
55
|
+
*
|
|
56
|
+
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color for the field body.
|
|
57
|
+
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'} [color] - Bulma color for the field body.
|
|
58
|
+
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color for the field body.
|
|
59
|
+
* @property {string} [className] - Additional CSS classes.
|
|
60
|
+
* @property {React.ReactNode} [children] - Field body content.
|
|
61
|
+
*/
|
|
27
62
|
export interface FieldBodyProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
28
63
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
29
64
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
@@ -31,7 +66,27 @@ export interface FieldBodyProps extends React.HTMLAttributes<HTMLDivElement>, Om
|
|
|
31
66
|
className?: string;
|
|
32
67
|
children?: React.ReactNode;
|
|
33
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* FieldLabel component for rendering a Bulma field label.
|
|
71
|
+
*
|
|
72
|
+
* @function
|
|
73
|
+
* @param {FieldLabelProps} props - Props for the FieldLabel component.
|
|
74
|
+
* @returns {JSX.Element} The rendered field label.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* <FieldLabel size="normal">Name</FieldLabel>
|
|
78
|
+
*/
|
|
34
79
|
export declare const FieldLabel: React.FC<FieldLabelProps>;
|
|
80
|
+
/**
|
|
81
|
+
* FieldBody component for rendering Bulma field body.
|
|
82
|
+
*
|
|
83
|
+
* @function
|
|
84
|
+
* @param {FieldBodyProps} props - Props for the FieldBody component.
|
|
85
|
+
* @returns {JSX.Element} The rendered field body.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* <FieldBody><input className="input" /></FieldBody>
|
|
89
|
+
*/
|
|
35
90
|
export declare const FieldBody: React.FC<FieldBodyProps>;
|
|
36
91
|
export declare const Field: React.FC<FieldProps> & {
|
|
37
92
|
Label: React.FC<FieldLabelProps>;
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
3
|
import { FormFieldProps } from './fieldProps';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the File component.
|
|
6
|
+
*
|
|
7
|
+
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'|'black'|'dark'|'light'|'white'} [color] - Bulma color modifier for the file input.
|
|
8
|
+
* @property {'small'|'medium'|'large'} [size] - Size modifier for the file input.
|
|
9
|
+
* @property {boolean} [isBoxed] - Whether the file input is boxed.
|
|
10
|
+
* @property {boolean} [isFullwidth] - Whether the file input expands to full width.
|
|
11
|
+
* @property {boolean} [isRight] - Align file input to the right.
|
|
12
|
+
* @property {boolean} [isCentered] - Center the file input.
|
|
13
|
+
* @property {boolean} [hasName] - Show a file name indicator.
|
|
14
|
+
* @property {React.ReactNode} [buttonLabel] - Custom button label text or node.
|
|
15
|
+
* @property {React.ReactNode} [iconLeft] - Left icon element.
|
|
16
|
+
* @property {React.ReactNode} [iconRight] - Right icon element.
|
|
17
|
+
* @property {string} [className] - Additional CSS classes to apply.
|
|
18
|
+
* @property {string} [inputClassName] - Additional CSS classes for the input.
|
|
19
|
+
* @property {string} [fileName] - File name to display.
|
|
20
|
+
*/
|
|
4
21
|
export interface FileProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'color' | 'type'>, Omit<BulmaClassesProps, 'color'>, FormFieldProps {
|
|
5
22
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
|
|
6
23
|
size?: 'small' | 'medium' | 'large';
|
|
@@ -16,5 +33,14 @@ export interface FileProps extends Omit<React.InputHTMLAttributes<HTMLInputEleme
|
|
|
16
33
|
inputClassName?: string;
|
|
17
34
|
fileName?: string;
|
|
18
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Bulma File upload component with full Bulma helper class support.
|
|
38
|
+
* isRight and isCentered are mutually exclusive (Bulma spec).
|
|
39
|
+
*
|
|
40
|
+
* @function
|
|
41
|
+
* @param {FileProps} props - Props for the File component.
|
|
42
|
+
* @returns {JSX.Element} The rendered file upload field.
|
|
43
|
+
* @see {@link https://bulma.io/documentation/form/file/ | Bulma File documentation}
|
|
44
|
+
*/
|
|
19
45
|
export declare const File: React.ForwardRefExoticComponent<FileProps & React.RefAttributes<HTMLInputElement>>;
|
|
20
46
|
export default File;
|
|
@@ -1,22 +1,68 @@
|
|
|
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
|
+
*/
|
|
1
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
|
+
*/
|
|
2
10
|
export declare const useInsideControl: () => boolean;
|
|
11
|
+
/** Provider for Field context — used internally by Field component. */
|
|
3
12
|
export declare const FieldProvider: import("react").Provider<boolean>;
|
|
13
|
+
/** Provider for Control context — used internally by Control component. */
|
|
4
14
|
export declare const ControlProvider: import("react").Provider<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Shape of the Radios group context. The group provides:
|
|
17
|
+
* - `name`: shared form field name (Stage 1)
|
|
18
|
+
* - `value`: currently-selected radio value (Stage 2 — group-managed selection)
|
|
19
|
+
* - `onChange`: dispatched by child Radios when clicked (Stage 2)
|
|
20
|
+
*
|
|
21
|
+
* Group sets `value`/`onChange` only when actively managing selection
|
|
22
|
+
* (i.e., the user passed `value`, `defaultValue`, or `onChange` to `<Radios>`).
|
|
23
|
+
* When only `name` is provided, the group is in "name-only" mode and child
|
|
24
|
+
* Radios manage their own checked state independently.
|
|
25
|
+
*/
|
|
5
26
|
export interface RadiosGroupContextValue {
|
|
6
27
|
name?: string;
|
|
7
28
|
value?: string;
|
|
8
29
|
onChange?: (value: string) => void;
|
|
9
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Shape of the Checkboxes group context. Like Radios but with array semantics
|
|
33
|
+
* for multi-select.
|
|
34
|
+
*/
|
|
10
35
|
export interface CheckboxesGroupContextValue {
|
|
11
36
|
name?: string;
|
|
12
37
|
value?: string[];
|
|
13
38
|
onChange?: (values: string[]) => void;
|
|
14
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Hook to read the full surrounding `<Radios>` group context (name + selection).
|
|
42
|
+
* Returns `undefined` when not inside a `<Radios>` group.
|
|
43
|
+
*/
|
|
15
44
|
export declare const useRadiosGroup: () => RadiosGroupContextValue | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Hook to read the full surrounding `<Checkboxes>` group context.
|
|
47
|
+
* Returns `undefined` when not inside a `<Checkboxes>` group.
|
|
48
|
+
*/
|
|
16
49
|
export declare const useCheckboxesGroup: () => CheckboxesGroupContextValue | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Hook to read just the shared `name` from a surrounding `<Radios>` group.
|
|
52
|
+
* Child `<Radio>` components fall back to this when no local `name` prop is set.
|
|
53
|
+
* Returns `undefined` outside of a `<Radios>` group.
|
|
54
|
+
*/
|
|
17
55
|
export declare const useRadiosName: () => string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Hook to read just the shared `name` from a surrounding `<Checkboxes>` group.
|
|
58
|
+
* Returns `undefined` outside of a `<Checkboxes>` group.
|
|
59
|
+
*/
|
|
18
60
|
export declare const useCheckboxesName: () => string | undefined;
|
|
61
|
+
/** Provider for the Radios group context — used internally by Radios. */
|
|
19
62
|
export declare const RadiosProvider: import("react").Provider<RadiosGroupContextValue | undefined>;
|
|
63
|
+
/** Provider for the Checkboxes group context — used internally by Checkboxes. */
|
|
20
64
|
export declare const CheckboxesProvider: import("react").Provider<CheckboxesGroupContextValue | undefined>;
|
|
65
|
+
/** @deprecated Use `RadiosProvider` (provides {name, value, onChange}). */
|
|
21
66
|
export declare const RadiosNameProvider: import("react").Provider<RadiosGroupContextValue | undefined>;
|
|
67
|
+
/** @deprecated Use `CheckboxesProvider` (provides {name, value, onChange}). */
|
|
22
68
|
export declare const CheckboxesNameProvider: import("react").Provider<CheckboxesGroupContextValue | undefined>;
|
|
@@ -2,6 +2,33 @@ 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
|
+
*
|
|
12
|
+
* @property {React.ReactNode} [label] - Field label.
|
|
13
|
+
* @property {FieldProps['labelSize']} [labelSize] - Size for the label.
|
|
14
|
+
* @property {FieldProps['labelProps']} [labelProps] - Props for the label element.
|
|
15
|
+
* @property {boolean} [horizontal] - Horizontal field layout.
|
|
16
|
+
* @property {ControlBaseProps['iconLeft']} [iconLeft] - Icon props for left icon.
|
|
17
|
+
* @property {ControlBaseProps['iconRight']} [iconRight] - Icon props for right icon.
|
|
18
|
+
* @property {string} [iconLeftName] - Shortcut for left icon name.
|
|
19
|
+
* @property {string} [iconRightName] - Shortcut for right icon name.
|
|
20
|
+
* @property {ControlBaseProps['iconLeftSize']} [iconLeftSize] - Shortcut for left icon size.
|
|
21
|
+
* @property {ControlBaseProps['iconRightSize']} [iconRightSize] - Shortcut for right icon size.
|
|
22
|
+
* @property {boolean} [hasIconsLeft] - Force left icon container.
|
|
23
|
+
* @property {boolean} [hasIconsRight] - Force right icon container.
|
|
24
|
+
* @property {boolean} [isLoading] - Show loading indicator on the control.
|
|
25
|
+
* @property {boolean} [isExpanded] - Expand the control.
|
|
26
|
+
* @property {'small'|'medium'|'large'} [controlSize] - Control size.
|
|
27
|
+
* @property {React.ReactNode} [message] - Help/validation message below the input.
|
|
28
|
+
* @property {string} [messageColor] - Bulma color for the message.
|
|
29
|
+
* @property {string} [fieldClassName] - Additional CSS classes for the Field.
|
|
30
|
+
* @property {string} [controlClassName] - Additional CSS classes for the Control.
|
|
31
|
+
*/
|
|
5
32
|
export interface InputProps extends InputBaseProps {
|
|
6
33
|
label?: React.ReactNode;
|
|
7
34
|
labelSize?: FieldProps['labelSize'];
|
|
@@ -23,5 +50,27 @@ export interface InputProps extends InputBaseProps {
|
|
|
23
50
|
fieldClassName?: string;
|
|
24
51
|
controlClassName?: string;
|
|
25
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Input is a convenience component that composes Field, Control, and Input.
|
|
55
|
+
*
|
|
56
|
+
* Use this for typical form fields. For complex layouts (grouped fields,
|
|
57
|
+
* addons, etc.), compose Field, Control, and Input directly.
|
|
58
|
+
*
|
|
59
|
+
* @function
|
|
60
|
+
* @param {InputProps} props - Props for Input.
|
|
61
|
+
* @returns {JSX.Element} The composed field element.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* <Input label="Username" placeholder="Enter username" iconLeftName="user" />
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* <Input
|
|
68
|
+
* label="Email"
|
|
69
|
+
* type="email"
|
|
70
|
+
* message="Please enter a valid email"
|
|
71
|
+
* messageColor="danger"
|
|
72
|
+
* color="danger"
|
|
73
|
+
* />
|
|
74
|
+
*/
|
|
26
75
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
27
76
|
export default Input;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Input component.
|
|
5
|
+
*
|
|
6
|
+
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'|'black'|'dark'|'light'|'white'} [color] - Bulma color modifier for the input.
|
|
7
|
+
* @property {'small'|'medium'|'large'} [size] - Size modifier for the input.
|
|
8
|
+
* @property {boolean} [isRounded] - Renders the input with rounded corners.
|
|
9
|
+
* @property {boolean} [isStatic] - Renders the input as static text.
|
|
10
|
+
* @property {boolean} [isHovered] - Applies the hovered state.
|
|
11
|
+
* @property {boolean} [isFocused] - Applies the focused state.
|
|
12
|
+
* @property {boolean} [isLoading] - Shows loading indicator.
|
|
13
|
+
* @property {string} [className] - Additional CSS classes to apply.
|
|
14
|
+
* @property {boolean} [disabled] - Whether the input is disabled.
|
|
15
|
+
* @property {boolean} [readOnly] - Whether the input is read-only.
|
|
16
|
+
*/
|
|
3
17
|
export interface InputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, Omit<BulmaClassesProps, 'color'> {
|
|
4
18
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
|
|
5
19
|
size?: 'small' | 'medium' | 'large';
|
|
@@ -12,5 +26,13 @@ export interface InputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInput
|
|
|
12
26
|
disabled?: boolean;
|
|
13
27
|
readOnly?: boolean;
|
|
14
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Bulma Input component with full Bulma helper class support.
|
|
31
|
+
*
|
|
32
|
+
* @function
|
|
33
|
+
* @param {InputBaseProps} props - Props for the Input component.
|
|
34
|
+
* @returns {JSX.Element} The rendered input element.
|
|
35
|
+
* @see {@link https://bulma.io/documentation/form/input/ | Bulma Input documentation}
|
|
36
|
+
*/
|
|
15
37
|
export declare const InputBase: React.ForwardRefExoticComponent<InputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
16
38
|
export default InputBase;
|
|
@@ -1,11 +1,39 @@
|
|
|
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
|
+
*
|
|
17
|
+
* @property {number} [value] - Controlled numeric value.
|
|
18
|
+
* @property {number} [defaultValue] - Initial value for uncontrolled mode.
|
|
19
|
+
* @property {number} [min] - Minimum allowed value.
|
|
20
|
+
* @property {number} [max] - Maximum allowed value.
|
|
21
|
+
* @property {number} [step] - Step increment (default: 1).
|
|
22
|
+
* @property {NumberinputSize} [size] - Size of the input and buttons.
|
|
23
|
+
* @property {NumberinputColor} [color] - Color for the control buttons.
|
|
24
|
+
* @property {NumberinputInputColor} [inputColor] - Color for the inner input element.
|
|
25
|
+
* @property {NumberinputControlsPosition} [controlsPosition] - Position of increment/decrement buttons (default: 'both').
|
|
26
|
+
* @property {boolean} [controlsRounded] - Whether the control buttons are rounded.
|
|
27
|
+
* @property {boolean} [compact] - Whether to use compact (addons) layout.
|
|
28
|
+
* @property {boolean} [bare] - Bare mode: no outer .field wrapper, for composing inside a parent Field.
|
|
29
|
+
* @property {NumberinputVariant} [variant] - Control variant: 'plusminus' (default) or 'stepper'.
|
|
30
|
+
* @property {boolean} [disabled] - Whether the input is disabled.
|
|
31
|
+
* @property {boolean} [editable] - Whether the user can type directly into the input (default: true).
|
|
32
|
+
* @property {boolean} [isLoading] - Whether to show a loading spinner on the input.
|
|
33
|
+
* @property {boolean} [exponential] - Whether the step grows with the value magnitude.
|
|
34
|
+
* @property {(value: number) => void} [onChange] - Callback when the value changes.
|
|
35
|
+
* @see {@link https://buefy.org/documentation/numberinput | Buefy Numberinput documentation}
|
|
36
|
+
*/
|
|
9
37
|
export interface NumberinputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'size' | 'onChange' | 'value' | 'defaultValue' | 'type'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>, FormFieldProps {
|
|
10
38
|
value?: number;
|
|
11
39
|
defaultValue?: number;
|
|
@@ -26,5 +54,23 @@ export interface NumberinputProps extends Omit<React.InputHTMLAttributes<HTMLInp
|
|
|
26
54
|
exponential?: boolean;
|
|
27
55
|
onChange?: (value: number) => void;
|
|
28
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Bulma-styled numeric input with increment/decrement controls.
|
|
59
|
+
*
|
|
60
|
+
* Supports plus/minus buttons or a compact stepper variant,
|
|
61
|
+
* with configurable min/max, step, and exponential stepping.
|
|
62
|
+
*
|
|
63
|
+
* @function
|
|
64
|
+
* @param {NumberinputProps} props - Props for the Numberinput component.
|
|
65
|
+
* @returns {JSX.Element} The rendered numeric input element.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* // Basic number input
|
|
69
|
+
* <Numberinput defaultValue={5} min={0} max={100} />
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* // Stepper variant with color
|
|
73
|
+
* <Numberinput variant="stepper" color="primary" step={10} />
|
|
74
|
+
*/
|
|
29
75
|
export declare const Numberinput: React.ForwardRefExoticComponent<NumberinputProps & React.RefAttributes<HTMLInputElement>>;
|
|
30
76
|
export default Numberinput;
|
|
@@ -1,7 +1,24 @@
|
|
|
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
|
+
*
|
|
14
|
+
* @property {(typeof radioColors)[number]} [color] - Color variant for the radio.
|
|
15
|
+
* @property {(typeof radioSizes)[number]} [size] - Size of the radio.
|
|
16
|
+
* @property {boolean} [disabled] - Whether the radio is disabled.
|
|
17
|
+
* @property {string} [className] - Additional CSS classes to apply.
|
|
18
|
+
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color.
|
|
19
|
+
* @property {React.ReactNode} [children] - The label/content for the radio.
|
|
20
|
+
* @see Bulma Radio documentation: https://bulma.io/documentation/form/radio/
|
|
21
|
+
*/
|
|
5
22
|
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
|
|
6
23
|
color?: (typeof radioColors)[number];
|
|
7
24
|
size?: (typeof radioSizes)[number];
|
|
@@ -10,5 +27,32 @@ export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
10
27
|
className?: string;
|
|
11
28
|
children?: React.ReactNode;
|
|
12
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Bulma Radio component with themed styling support.
|
|
32
|
+
*
|
|
33
|
+
* Renders a custom-styled radio button with a visual indicator,
|
|
34
|
+
* supporting colors, sizes, and various states. Inside a `<Radios>` group,
|
|
35
|
+
* Radio inherits `name` and (when the group is in controlled or uncontrolled
|
|
36
|
+
* mode) derives its `checked` state from the group's `value` and dispatches
|
|
37
|
+
* the group's `onChange` when clicked.
|
|
38
|
+
*
|
|
39
|
+
* Local props always win over group context (`name`, `checked`, `onChange`
|
|
40
|
+
* on Radio override the group). Required for opt-out scenarios.
|
|
41
|
+
*
|
|
42
|
+
* @function
|
|
43
|
+
* @param {RadioProps} props - Props for the Radio component.
|
|
44
|
+
* @returns {JSX.Element} The rendered radio element.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* // Basic radio
|
|
48
|
+
* <Radio name="option">Option A</Radio>
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // Inside a group
|
|
52
|
+
* <Radios name="color" defaultValue="red">
|
|
53
|
+
* <Radio value="red">Red</Radio>
|
|
54
|
+
* <Radio value="blue">Blue</Radio>
|
|
55
|
+
* </Radios>
|
|
56
|
+
*/
|
|
13
57
|
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
58
|
export default Radio;
|