@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,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @group Table
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
6
|
+
/**
|
|
7
|
+
* Props for the Thead component.
|
|
8
|
+
*/
|
|
9
|
+
export interface TheadProps extends Omit<React.HTMLAttributes<HTMLTableSectionElement>, 'color'>, Omit<BulmaClassesProps, 'backgroundColor'> {
|
|
10
|
+
/** Additional CSS classes to apply. */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Table header content (rows). */
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Thead component for rendering a styled Bulma table header.
|
|
17
|
+
*
|
|
18
|
+
* Supports Bulma helper classes for additional styling.
|
|
19
|
+
*
|
|
20
|
+
* @function
|
|
21
|
+
* @param {TheadProps} props - Props for the Thead component.
|
|
22
|
+
* @returns {JSX.Element} The rendered table header element.
|
|
23
|
+
* @see {@link https://bulma.io/documentation/elements/table/#table-head | Bulma Table documentation}
|
|
24
|
+
*/
|
|
25
|
+
export declare const Thead: React.FC<TheadProps>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
/**
|
|
4
|
+
* Valid size values for the Title component (Bulma title sizes): `'1'`–`'6'` as a string or number (`3` and `'3'` are equivalent).
|
|
5
|
+
*/
|
|
6
|
+
export type TitleSize = '1' | '2' | '3' | '4' | '5' | '6' | 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
+
declare const validTitleElements: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "p"];
|
|
8
|
+
/**
|
|
9
|
+
* Valid HTML elements for the Title component.
|
|
10
|
+
*/
|
|
11
|
+
export type TitleElement = (typeof validTitleElements)[number];
|
|
12
|
+
/**
|
|
13
|
+
* Props for the Title component.
|
|
14
|
+
* @extraProp {boolean} [skeleton] - Applies the `is-skeleton` class to the entire component.
|
|
15
|
+
*/
|
|
16
|
+
export interface TitleProps extends Omit<React.HTMLAttributes<HTMLHeadingElement | HTMLParagraphElement>, 'color'>, Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {
|
|
17
|
+
/** Additional CSS classes to apply. */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Size of the title (Bulma sizes `1`-`6`, as a string or number). */
|
|
20
|
+
size?: TitleSize;
|
|
21
|
+
/** Adds margin below the title. */
|
|
22
|
+
isSpaced?: boolean;
|
|
23
|
+
/** HTML element to render as (h1-h6 or p). */
|
|
24
|
+
as?: TitleElement;
|
|
25
|
+
/** Applies the `has-skeleton` class to part of the content. */
|
|
26
|
+
hasSkeleton?: boolean;
|
|
27
|
+
/** Title content. */
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
/** Text color helper. */
|
|
30
|
+
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
31
|
+
/** Background color helper. */
|
|
32
|
+
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The `Title` component renders a Bulma-styled title (heading), supporting sizes `1`-`6`, spacing, and rendering as any heading or paragraph element (`h1`-`h6`, `p`).
|
|
36
|
+
*
|
|
37
|
+
* @function
|
|
38
|
+
* @param {TitleProps} props - Props for the Title component.
|
|
39
|
+
* @returns {JSX.Element} The rendered title element.
|
|
40
|
+
* @see {@link https://bulma.io/documentation/elements/title/ | Bulma Title documentation}
|
|
41
|
+
*/
|
|
42
|
+
export declare const Title: React.FC<TitleProps>;
|
|
43
|
+
export default Title;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @group Table
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
6
|
+
import { TableColor } from './Td.js';
|
|
7
|
+
/**
|
|
8
|
+
* Props for the Tr component.
|
|
9
|
+
*/
|
|
10
|
+
export interface TrProps extends Omit<React.HTMLAttributes<HTMLTableRowElement>, 'color'>, Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {
|
|
11
|
+
/** Additional CSS classes to apply. */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Whether the row is selected (adds Bulma's is-selected class). */
|
|
14
|
+
isSelected?: boolean;
|
|
15
|
+
/** Bulma color modifier for the table row. */
|
|
16
|
+
color?: TableColor;
|
|
17
|
+
/** Table row content (cells). */
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Tr component for rendering a styled Bulma table row.
|
|
22
|
+
*
|
|
23
|
+
* Supports the is-selected modifier and color modifiers.
|
|
24
|
+
*
|
|
25
|
+
* @function
|
|
26
|
+
* @param {TrProps} props - Props for the Tr component.
|
|
27
|
+
* @returns {JSX.Element} The rendered table row element.
|
|
28
|
+
* @see {@link https://bulma.io/documentation/elements/table/#table-row | Bulma Table documentation}
|
|
29
|
+
*/
|
|
30
|
+
export declare const Tr: React.FC<TrProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the UnorderedList component.
|
|
5
|
+
*/
|
|
6
|
+
export interface UnorderedListProps extends React.HTMLAttributes<HTMLUListElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Text color helper. */
|
|
10
|
+
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
11
|
+
/** Background color helper. */
|
|
12
|
+
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
13
|
+
/** List items to render inside the list. */
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare const UnorderedList: React.FC<UnorderedListProps> & {
|
|
17
|
+
Item: React.FC<import("./ListItem.js").ListItemProps>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from './Icon.js';
|
|
3
|
+
/**
|
|
4
|
+
* Distinguishes an `IconProps` object from a plain custom node (an inline SVG, a
|
|
5
|
+
* `react-icons` component, …) in a slot that accepts either — `Control`'s
|
|
6
|
+
* `iconLeft`/`iconRight`, `IconText`'s `iconProps`.
|
|
7
|
+
*
|
|
8
|
+
* One copy, imported by both consumers: two hand-maintained copies, one per
|
|
9
|
+
* consumer, is how the deprecated `icon` path came to crash both (#663).
|
|
10
|
+
*
|
|
11
|
+
* Its own module rather than `Icon.tsx` because `src/index.ts` wildcard-exports
|
|
12
|
+
* that file, and everything published there is public forever. `polymorphic.ts`
|
|
13
|
+
* makes the same call for `isCustomElement`: an internal discriminator is not
|
|
14
|
+
* something to support for the life of the package.
|
|
15
|
+
*
|
|
16
|
+
* It tests each member's VALUE, not merely its key, and only after everything
|
|
17
|
+
* React owns is out of the way. `'icon' in value` was enough
|
|
18
|
+
* to claim a Font Awesome `IconDefinition` — `{ prefix, iconName, icon: [w, h, …,
|
|
19
|
+
* path] }` — whose `icon` is a path array rather than a class string. That object
|
|
20
|
+
* is not a renderable node either, so the honest outcome is the one this slot has
|
|
21
|
+
* always had for it: the node branch, and React's own "Objects are not valid as a
|
|
22
|
+
* React child". Claiming it here instead rendered a blank container that still
|
|
23
|
+
* reserved layout.
|
|
24
|
+
*
|
|
25
|
+
* A member added to `IconProps` needs a line here, and a missed one is a crash
|
|
26
|
+
* rather than a fallthrough. That is the cost of a slot taking either a props
|
|
27
|
+
* object or a node; keeping the guard in one place is what keeps the cost to a
|
|
28
|
+
* single line.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isIconProps(value: IconProps | React.ReactNode): value is IconProps;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import { FormFieldProps } from './fieldProps.js';
|
|
4
|
+
/**
|
|
5
|
+
* An item in the Autocomplete dropdown list.
|
|
6
|
+
*/
|
|
7
|
+
export interface AutocompleteItem {
|
|
8
|
+
/** The value used for filtering and selection. */
|
|
9
|
+
value: string;
|
|
10
|
+
/** Display label (optional). */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Whether the item is disabled and unselectable. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Props for the Autocomplete component.
|
|
18
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
19
|
+
* @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the input element.
|
|
20
|
+
*/
|
|
21
|
+
export interface AutocompleteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'onInput'>, Omit<BulmaClassesProps, 'color'>, FormFieldProps {
|
|
22
|
+
/** Field label. Automatically associated with the text input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field` (label that `Field` yourself). */
|
|
23
|
+
label?: React.ReactNode;
|
|
24
|
+
/** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
|
|
25
|
+
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
/** Applied to the inner text input (the labellable control), not the wrapper div. */
|
|
29
|
+
id?: string;
|
|
30
|
+
/** The options data to display (required). */
|
|
31
|
+
data: AutocompleteItem[] | string[];
|
|
32
|
+
/** The current input value (controlled). */
|
|
33
|
+
value?: string;
|
|
34
|
+
/** The selected item (controlled). */
|
|
35
|
+
selected?: AutocompleteItem | string | null;
|
|
36
|
+
/** Placeholder text for the input. */
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
/** Object property to use as the display field. */
|
|
39
|
+
field?: string;
|
|
40
|
+
/** Whether to show a clear button. */
|
|
41
|
+
clearable?: boolean;
|
|
42
|
+
/** Open dropdown when input is focused. */
|
|
43
|
+
openOnFocus?: boolean;
|
|
44
|
+
/** Keep first option highlighted. */
|
|
45
|
+
keepFirst?: boolean;
|
|
46
|
+
/** Keep dropdown open after selection. */
|
|
47
|
+
keepOpen?: boolean;
|
|
48
|
+
/** Select highlighted item on click outside. */
|
|
49
|
+
selectOnClickOutside?: boolean;
|
|
50
|
+
/** Maximum dropdown height in pixels. */
|
|
51
|
+
maxHeight?: number;
|
|
52
|
+
/** Render as dropdown style. */
|
|
53
|
+
dropdown?: boolean;
|
|
54
|
+
/** Show loading state. */
|
|
55
|
+
loading?: boolean;
|
|
56
|
+
/** Whether the input is disabled. */
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/** Enables infinite scroll detection in the dropdown. */
|
|
59
|
+
checkInfiniteScroll?: boolean;
|
|
60
|
+
/** Distance in pixels from the bottom to trigger `onInfiniteScroll`. */
|
|
61
|
+
infiniteScrollDistance?: number;
|
|
62
|
+
/** Input color variant. */
|
|
63
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
64
|
+
/** Size variant. */
|
|
65
|
+
size?: 'small' | 'medium' | 'large';
|
|
66
|
+
/** Form field name. Forwarded to the inner `<input>`. */
|
|
67
|
+
name?: string;
|
|
68
|
+
/** Optional id of the form the input belongs to. */
|
|
69
|
+
form?: string;
|
|
70
|
+
/** Marks the field as required for native HTML form validation. */
|
|
71
|
+
required?: boolean;
|
|
72
|
+
/** Callback when input value changes. */
|
|
73
|
+
onInput?: (value: string) => void;
|
|
74
|
+
/** Callback when item is selected. */
|
|
75
|
+
onSelect?: (item: AutocompleteItem | string | null) => void;
|
|
76
|
+
/** Callback when dropdown active state changes. */
|
|
77
|
+
onActiveChange?: (active: boolean) => void;
|
|
78
|
+
/** Callback when scrolled to bottom (infinite scroll). */
|
|
79
|
+
onInfiniteScroll?: () => void;
|
|
80
|
+
/** Custom render for items. */
|
|
81
|
+
itemTemplate?: (item: AutocompleteItem | string) => React.ReactNode;
|
|
82
|
+
/** Custom header in dropdown. */
|
|
83
|
+
header?: React.ReactNode;
|
|
84
|
+
/** Custom footer in dropdown. */
|
|
85
|
+
footer?: React.ReactNode;
|
|
86
|
+
/** Content to show when no results. */
|
|
87
|
+
empty?: React.ReactNode;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The `Autocomplete` component provides an input field with dropdown suggestions that filter based on user input.
|
|
91
|
+
*
|
|
92
|
+
* @function
|
|
93
|
+
* @param {AutocompleteProps} props - Props for the Autocomplete component.
|
|
94
|
+
* @param {React.Ref<HTMLInputElement>} ref - Forwarded ref to the input element.
|
|
95
|
+
* @returns {JSX.Element} The rendered autocomplete component.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* // Basic usage with string array
|
|
99
|
+
* <Autocomplete
|
|
100
|
+
* data={['Apple', 'Banana', 'Cherry']}
|
|
101
|
+
* placeholder="Search fruit..."
|
|
102
|
+
* onSelect={(item) => console.log(item)}
|
|
103
|
+
* />
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* // With object data
|
|
107
|
+
* <Autocomplete
|
|
108
|
+
* data={[{ value: '1', label: 'Option 1' }, { value: '2', label: 'Option 2' }]}
|
|
109
|
+
* field="label"
|
|
110
|
+
* onSelect={(item) => console.log(item)}
|
|
111
|
+
* />
|
|
112
|
+
*/
|
|
113
|
+
export declare const Autocomplete: React.ForwardRefExoticComponent<AutocompleteProps & React.RefAttributes<HTMLInputElement>>;
|
|
114
|
+
export default Autocomplete;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
/**
|
|
4
|
+
* Valid colors for the Checkbox component.
|
|
5
|
+
*/
|
|
6
|
+
export declare const checkboxColors: readonly ["primary", "link", "info", "success", "warning", "danger"];
|
|
7
|
+
/**
|
|
8
|
+
* Valid sizes for the Checkbox component.
|
|
9
|
+
*/
|
|
10
|
+
export declare const checkboxSizes: readonly ["small", "normal", "medium", "large"];
|
|
11
|
+
/**
|
|
12
|
+
* Props for the Checkbox component.
|
|
13
|
+
*/
|
|
14
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
|
|
15
|
+
/** Color of the checkbox. */
|
|
16
|
+
color?: (typeof checkboxColors)[number];
|
|
17
|
+
/** Size of the checkbox. */
|
|
18
|
+
size?: (typeof checkboxSizes)[number];
|
|
19
|
+
/** Text color helper. */
|
|
20
|
+
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
21
|
+
/** Whether the checkbox is disabled. */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Additional CSS classes to apply. */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** The label/content for the checkbox. */
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The `Checkbox` component provides a Bulma-styled checkbox input.
|
|
30
|
+
*
|
|
31
|
+
* @function
|
|
32
|
+
* @param {CheckboxProps} props - Props for the Checkbox component.
|
|
33
|
+
* @returns {JSX.Element} The rendered checkbox element.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // Basic checkbox
|
|
37
|
+
* <Checkbox>Accept terms</Checkbox>
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // Inside a group
|
|
41
|
+
* <Checkboxes name="tags" defaultValue={['react']}>
|
|
42
|
+
* <Checkbox value="react">React</Checkbox>
|
|
43
|
+
* <Checkbox value="vue">Vue</Checkbox>
|
|
44
|
+
* </Checkboxes>
|
|
45
|
+
*/
|
|
46
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
47
|
+
export default Checkbox;
|
|
@@ -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 Checkboxes component.
|
|
6
|
+
*/
|
|
7
|
+
export interface CheckboxesProps extends Omit<BulmaClassesProps, 'color'>, FormFieldProps {
|
|
8
|
+
/** Field label naming the whole group. Automatically associated via `aria-labelledby` on the `role="group"` 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 Checkbox in the group (via context). */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Currently-selected values (controlled mode). */
|
|
19
|
+
value?: string[];
|
|
20
|
+
/** Initial selected values (uncontrolled mode). */
|
|
21
|
+
defaultValue?: string[];
|
|
22
|
+
/** Fires when the selection changes; receives the new array. */
|
|
23
|
+
onChange?: (values: string[]) => void;
|
|
24
|
+
/** Checkbox elements to render in the group. */
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export declare const Checkboxes: React.FC<CheckboxesProps> & {
|
|
28
|
+
Checkbox: React.ForwardRefExoticComponent<import("./Checkbox.js").CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
};
|
|
30
|
+
export default Checkboxes;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import { IconProps } from '../elements/Icon.js';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Control component.
|
|
6
|
+
*/
|
|
7
|
+
export interface ControlBaseProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
8
|
+
/** Adds left icon container. */
|
|
9
|
+
hasIconsLeft?: boolean;
|
|
10
|
+
/** Adds right icon container. */
|
|
11
|
+
hasIconsRight?: boolean;
|
|
12
|
+
/** Shows loading indicator. */
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
/** Makes the control expand to fill available space. */
|
|
15
|
+
isExpanded?: boolean;
|
|
16
|
+
/** Sets the control size. */
|
|
17
|
+
size?: 'small' | 'medium' | 'large';
|
|
18
|
+
/** Sets text color. */
|
|
19
|
+
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
20
|
+
/** Bulma color for the control. */
|
|
21
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
22
|
+
/** Background color. */
|
|
23
|
+
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
24
|
+
/** Icon props for left icon, or a custom node (an inline SVG, a `react-icons` component, …) rendered in place of a class-based glyph. */
|
|
25
|
+
iconLeft?: IconProps | React.ReactNode;
|
|
26
|
+
/** Icon props for right icon, or a custom node (an inline SVG, a `react-icons` component, …) rendered in place of a class-based glyph. */
|
|
27
|
+
iconRight?: IconProps | React.ReactNode;
|
|
28
|
+
/** Shortcut for left icon name. */
|
|
29
|
+
iconLeftName?: string;
|
|
30
|
+
/** Shortcut for left icon size. */
|
|
31
|
+
iconLeftSize?: 'small' | 'medium' | 'large';
|
|
32
|
+
/** Shortcut for right icon name. */
|
|
33
|
+
iconRightName?: string;
|
|
34
|
+
/** Shortcut for right icon size. */
|
|
35
|
+
iconRightSize?: 'small' | 'medium' | 'large';
|
|
36
|
+
/** Additional CSS classes to apply. */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Content inside the control. */
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The `Control` component is a Bulma-styled wrapper for form controls (`Input`, `Select`, `TextArea`, etc.), supporting icons (left/right), loading state, expansion, size, and Bulma helper props for layout and color.
|
|
43
|
+
*
|
|
44
|
+
* @function
|
|
45
|
+
* @param {ControlProps} props - Props for the Control component.
|
|
46
|
+
* @returns {JSX.Element} The rendered control container.
|
|
47
|
+
* @see {@link https://bulma.io/documentation/form/general/#control | Bulma Control documentation}
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Control with left icon
|
|
51
|
+
* <Control iconLeftName="envelope" iconLeftSize="small">
|
|
52
|
+
* <input className="input" type="email" placeholder="Email" />
|
|
53
|
+
* </Control>
|
|
54
|
+
*/
|
|
55
|
+
export declare const Control: React.ForwardRefExoticComponent<(Omit<{
|
|
56
|
+
/** Element type for the control (`div` by default). */
|
|
57
|
+
as?: "div";
|
|
58
|
+
} & ControlBaseProps & {
|
|
59
|
+
/** Ref for the control element. */
|
|
60
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
61
|
+
}, "ref"> | Omit<{
|
|
62
|
+
/** Element type for the control (`div` by default). */
|
|
63
|
+
as: "p";
|
|
64
|
+
} & Omit<ControlBaseProps, keyof React.HTMLAttributes<HTMLDivElement>> & React.HTMLAttributes<HTMLParagraphElement> & {
|
|
65
|
+
/** Ref for the control element. */
|
|
66
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
67
|
+
}, "ref">) & React.RefAttributes<HTMLDivElement | HTMLParagraphElement>>;
|
|
68
|
+
export default Control;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldProps } from './Field.js';
|
|
3
|
+
import { ControlBaseProps } from './Control.js';
|
|
4
|
+
import { DateInputBaseProps } from './DateInputBase.js';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the DateInput convenience wrapper. Extends `DateInputBaseProps`
|
|
7
|
+
* with Field-level (label, horizontal) and Control-level (icons, loading) props.
|
|
8
|
+
* @extraProp {string} [name] - Form field name. Forwarded to a hidden ISO-formatted input.
|
|
9
|
+
* @extraProp {string} [form] - Form id the input belongs to.
|
|
10
|
+
* @extraProp {boolean} [required=false] - Marks the input as required.
|
|
11
|
+
* @extraProp {string} [className] - Additional CSS classes for the input.
|
|
12
|
+
* @extraProp {React.Ref<HTMLInputElement>} [ref] - Forwarded to the underlying `<input>`.
|
|
13
|
+
*/
|
|
14
|
+
export interface DateInputProps extends DateInputBaseProps {
|
|
15
|
+
/** Field label (component auto-wraps in a `Field` if not already inside). Automatically associated with the input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired in `inline` mode (no visible input to label) and dropped inside an outer `Field`. */
|
|
16
|
+
label?: React.ReactNode;
|
|
17
|
+
/** Size for the label. */
|
|
18
|
+
labelSize?: FieldProps['labelSize'];
|
|
19
|
+
/** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
|
|
20
|
+
labelProps?: FieldProps['labelProps'];
|
|
21
|
+
/** Render the field with horizontal layout. */
|
|
22
|
+
horizontal?: boolean;
|
|
23
|
+
/** Icon props for the left icon. */
|
|
24
|
+
iconLeft?: ControlBaseProps['iconLeft'];
|
|
25
|
+
/** Icon props for the right icon. */
|
|
26
|
+
iconRight?: ControlBaseProps['iconRight'];
|
|
27
|
+
/** Shortcut for the 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 the left icon container. */
|
|
34
|
+
hasIconsLeft?: boolean;
|
|
35
|
+
/** Force the right icon container. */
|
|
36
|
+
hasIconsRight?: boolean;
|
|
37
|
+
/** Show a loading indicator on the control. */
|
|
38
|
+
isLoading?: boolean;
|
|
39
|
+
/** Expand the control to fill its container. */
|
|
40
|
+
isExpanded?: boolean;
|
|
41
|
+
/** Size of the wrapping Control. */
|
|
42
|
+
controlSize?: ControlBaseProps['size'];
|
|
43
|
+
/** Help/validation text below the input. */
|
|
44
|
+
message?: React.ReactNode;
|
|
45
|
+
/** Color modifier for the help message. */
|
|
46
|
+
messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
47
|
+
/** Additional CSS classes for the Field wrapper. */
|
|
48
|
+
fieldClassName?: string;
|
|
49
|
+
/** Additional CSS classes for the Control wrapper. */
|
|
50
|
+
controlClassName?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The `DateInput` component is a form input that opens a popover calendar for date selection.
|
|
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
|
+
*/
|
|
69
|
+
export declare const DateInput: React.ForwardRefExoticComponent<DateInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
70
|
+
export default DateInput;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import { PickerPosition, DayOfWeek, PickerLabels } from './_pickerInternals/pickerTypes.js';
|
|
4
|
+
import { DateFormatOption } from './_pickerInternals/formatters.js';
|
|
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
|
+
export interface DateInputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'color' | 'min' | 'max' | 'type' | 'popover'>, Omit<BulmaClassesProps, 'color'> {
|
|
10
|
+
/** Controlled selected date. */
|
|
11
|
+
value?: Date | null;
|
|
12
|
+
/** Initial date for uncontrolled usage. */
|
|
13
|
+
defaultValue?: Date | null;
|
|
14
|
+
/** Fired when the value changes. */
|
|
15
|
+
onChange?: (d: Date | null) => void;
|
|
16
|
+
/** Fired when the popover opens. */
|
|
17
|
+
onOpen?: () => void;
|
|
18
|
+
/** Fired when the popover closes. */
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
/** Earliest selectable date. */
|
|
21
|
+
min?: Date;
|
|
22
|
+
/** Latest selectable date. */
|
|
23
|
+
max?: Date;
|
|
24
|
+
/** Disable the input. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Make the input read-only. */
|
|
27
|
+
readOnly?: boolean;
|
|
28
|
+
/** Placeholder text for the input. */
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Token format string or `Intl.DateTimeFormat` options. Default `'YYYY-MM-DD'`.
|
|
32
|
+
* @defaultValue 'YYYY-MM-DD'
|
|
33
|
+
*/
|
|
34
|
+
format?: DateFormatOption;
|
|
35
|
+
/** Custom parser (use when `format` is `Intl.DateTimeFormatOptions`). */
|
|
36
|
+
parse?: (s: string) => Date | null;
|
|
37
|
+
/** BCP-47 locale tag for day/month names and Intl formatting. */
|
|
38
|
+
locale?: string;
|
|
39
|
+
/** Render the calendar inline (no popover). */
|
|
40
|
+
inline?: boolean;
|
|
41
|
+
/** Use `<input type="date">` on coarse-pointer + small-viewport devices. */
|
|
42
|
+
mobileNative?: boolean | 'auto';
|
|
43
|
+
/** Allow segmented keyboard typing in the input (type the date directly, auto-advancing across segments). `false` makes the field picker-only. */
|
|
44
|
+
editable?: boolean;
|
|
45
|
+
/** Whether the calendar popover exists. `false` makes the field input-only (segmented typing, no popover). */
|
|
46
|
+
popover?: boolean;
|
|
47
|
+
/** Open the popover when the input is focused. */
|
|
48
|
+
openOnFocus?: boolean;
|
|
49
|
+
/** Close the popover after a date is selected. */
|
|
50
|
+
closeOnSelect?: boolean;
|
|
51
|
+
/** Popover anchor position relative to the input. */
|
|
52
|
+
position?: PickerPosition;
|
|
53
|
+
/** Render the popover into `document.body` via portal. */
|
|
54
|
+
appendToBody?: boolean;
|
|
55
|
+
/** Bulma color modifier. */
|
|
56
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
57
|
+
/** Size variant. */
|
|
58
|
+
size?: 'small' | 'medium' | 'large';
|
|
59
|
+
/** Render the input with rounded corners. */
|
|
60
|
+
isRounded?: boolean;
|
|
61
|
+
/** Predicate to disable specific dates (e.g. weekends). Blocked dates are also rejected during manual typing. */
|
|
62
|
+
shouldDisableDate?: (d: Date) => boolean;
|
|
63
|
+
/** Convenience array of disabled dates; merged with `shouldDisableDate`. Matched by calendar day and also rejected during manual typing. */
|
|
64
|
+
unselectableDates?: Date[];
|
|
65
|
+
/** Day the week starts on (0 = Sunday). */
|
|
66
|
+
firstDayOfWeek?: DayOfWeek;
|
|
67
|
+
/** Override the 7 day-name labels (in calendar order, post-rotation). */
|
|
68
|
+
dayNames?: string[];
|
|
69
|
+
/** Override the 12 month-name labels. */
|
|
70
|
+
monthNames?: string[];
|
|
71
|
+
/** Show dimmed dates from adjacent months in the grid. */
|
|
72
|
+
nearbyMonthDays?: boolean;
|
|
73
|
+
/** Decorative left icon glyph for the wrapping `Control` (shown by default). Set `''` to hide. */
|
|
74
|
+
iconLeftName?: string;
|
|
75
|
+
/** Show a clickable launcher button on the right that toggles the popover. Default `true`. */
|
|
76
|
+
triggerIcon?: boolean;
|
|
77
|
+
/** Glyph for the right launcher button. */
|
|
78
|
+
triggerIconName?: string;
|
|
79
|
+
/** Optional translatable string overrides (ARIA labels, button text). */
|
|
80
|
+
labels?: PickerLabels;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Raw DateInput — input + popover calendar without Field/Control wrapping.
|
|
84
|
+
* Use `DateInput` for the convenience wrapper.
|
|
85
|
+
*
|
|
86
|
+
* @function
|
|
87
|
+
* @param {DateInputBaseProps} props
|
|
88
|
+
* @returns {JSX.Element}
|
|
89
|
+
*/
|
|
90
|
+
export declare const DateInputBase: React.ForwardRefExoticComponent<DateInputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
91
|
+
export default DateInputBase;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldProps } from './Field.js';
|
|
3
|
+
import { ControlBaseProps } from './Control.js';
|
|
4
|
+
import { DateTimeInputBaseProps } from './DateTimeInputBase.js';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the DateTimeInput convenience wrapper. Extends
|
|
7
|
+
* `DateTimeInputBaseProps` with Field-level and Control-level props.
|
|
8
|
+
* @extraProp {string} [name] - Form field name.
|
|
9
|
+
* @extraProp {string} [form] - Optional id of the form the input belongs to.
|
|
10
|
+
* @extraProp {boolean} [required=false] - Marks the field as required for native HTML form validation.
|
|
11
|
+
*/
|
|
12
|
+
export interface DateTimeInputProps extends DateTimeInputBaseProps {
|
|
13
|
+
/** Field label. Automatically associated with the input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired in `inline` mode (no visible input to label) and dropped inside an outer `Field`. */
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
/** Size for the label. */
|
|
16
|
+
labelSize?: FieldProps['labelSize'];
|
|
17
|
+
/** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
|
|
18
|
+
labelProps?: FieldProps['labelProps'];
|
|
19
|
+
/** Render the field with horizontal layout. */
|
|
20
|
+
horizontal?: boolean;
|
|
21
|
+
/** Icon props for the left icon. */
|
|
22
|
+
iconLeft?: ControlBaseProps['iconLeft'];
|
|
23
|
+
/** Icon props for the right icon. */
|
|
24
|
+
iconRight?: ControlBaseProps['iconRight'];
|
|
25
|
+
/** Shortcut for the right icon name. */
|
|
26
|
+
iconRightName?: string;
|
|
27
|
+
/** Shortcut for left icon size. */
|
|
28
|
+
iconLeftSize?: ControlBaseProps['iconLeftSize'];
|
|
29
|
+
/** Shortcut for right icon size. */
|
|
30
|
+
iconRightSize?: ControlBaseProps['iconRightSize'];
|
|
31
|
+
/** Force the left icon container. */
|
|
32
|
+
hasIconsLeft?: boolean;
|
|
33
|
+
/** Force the right icon container. */
|
|
34
|
+
hasIconsRight?: boolean;
|
|
35
|
+
/** Show a loading indicator on the control. */
|
|
36
|
+
isLoading?: boolean;
|
|
37
|
+
/** Expand the control to fill its container. */
|
|
38
|
+
isExpanded?: boolean;
|
|
39
|
+
/** Size of the wrapping Control. */
|
|
40
|
+
controlSize?: ControlBaseProps['size'];
|
|
41
|
+
/** Help/validation text below the input. */
|
|
42
|
+
message?: React.ReactNode;
|
|
43
|
+
/** Message color. */
|
|
44
|
+
messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
45
|
+
/** Additional CSS classes for the Field wrapper. */
|
|
46
|
+
fieldClassName?: string;
|
|
47
|
+
/** Additional CSS classes for the Control wrapper. */
|
|
48
|
+
controlClassName?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The `DateTimeInput` combines a calendar and a time **wheel spinner** in a single popover — an iOS-style layout.
|
|
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
|
+
*/
|
|
67
|
+
export declare const DateTimeInput: React.ForwardRefExoticComponent<DateTimeInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
68
|
+
export default DateTimeInput;
|