@allxsmith/bestax-bulma 5.8.0 → 5.8.2
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/README.md +20 -0
- package/dist/index.cjs.js +304 -387
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +304 -387
- package/dist/index.esm.js.map +1 -1
- package/dist/types/columns/Column.d.ts +25 -30
- package/dist/types/columns/Columns.d.ts +23 -30
- package/dist/types/components/Avatar.d.ts +15 -20
- package/dist/types/components/Avatars.d.ts +8 -9
- package/dist/types/components/Badge.d.ts +13 -21
- package/dist/types/components/Breadcrumb.d.ts +6 -9
- package/dist/types/components/Card.d.ts +34 -36
- package/dist/types/components/Carousel.d.ts +29 -29
- package/dist/types/components/Collapse.d.ts +17 -18
- package/dist/types/components/Dialog.d.ts +24 -29
- package/dist/types/components/Dropdown.d.ts +16 -18
- package/dist/types/components/Loading.d.ts +13 -18
- package/dist/types/components/Menu.d.ts +11 -15
- package/dist/types/components/Message.d.ts +11 -14
- package/dist/types/components/Modal.d.ts +23 -29
- package/dist/types/components/Navbar.d.ts +60 -72
- package/dist/types/components/Pagination.d.ts +39 -35
- package/dist/types/components/Panel.d.ts +26 -33
- package/dist/types/components/Reveal.d.ts +11 -17
- package/dist/types/components/Sidebar.d.ts +17 -20
- package/dist/types/components/Steps.d.ts +28 -37
- package/dist/types/components/Tabs.d.ts +44 -43
- package/dist/types/components/Toast.d.ts +23 -28
- package/dist/types/components/Tooltip.d.ts +16 -20
- package/dist/types/elements/Block.d.ts +11 -10
- package/dist/types/elements/Box.d.ts +12 -10
- package/dist/types/elements/Button.d.ts +30 -23
- package/dist/types/elements/Buttons.d.ts +13 -9
- package/dist/types/elements/Code.d.ts +5 -10
- package/dist/types/elements/Content.d.ts +12 -11
- package/dist/types/elements/Delete.d.ts +14 -12
- package/dist/types/elements/Divider.d.ts +3 -7
- package/dist/types/elements/Emphasis.d.ts +5 -10
- package/dist/types/elements/Figure.d.ts +8 -10
- package/dist/types/elements/Icon.d.ts +18 -18
- package/dist/types/elements/IconText.d.ts +14 -11
- package/dist/types/elements/Image.d.ts +17 -17
- package/dist/types/elements/Link.d.ts +10 -14
- package/dist/types/elements/LinkButton.d.ts +3 -9
- package/dist/types/elements/ListItem.d.ts +6 -11
- package/dist/types/elements/Notification.d.ts +33 -24
- package/dist/types/elements/OrderedList.d.ts +7 -8
- package/dist/types/elements/Paragraph.d.ts +5 -10
- package/dist/types/elements/Pre.d.ts +5 -10
- package/dist/types/elements/Progress.d.ts +16 -10
- package/dist/types/elements/Skeleton.d.ts +4 -13
- package/dist/types/elements/Span.d.ts +5 -9
- package/dist/types/elements/Strong.d.ts +5 -10
- package/dist/types/elements/SubTitle.d.ts +9 -11
- package/dist/types/elements/Table.d.ts +8 -9
- package/dist/types/elements/Tag.d.ts +9 -12
- package/dist/types/elements/Tags.d.ts +4 -5
- package/dist/types/elements/Tbody.d.ts +2 -3
- package/dist/types/elements/Td.d.ts +3 -4
- package/dist/types/elements/Tfoot.d.ts +2 -3
- package/dist/types/elements/Th.d.ts +5 -6
- package/dist/types/elements/Thead.d.ts +2 -3
- package/dist/types/elements/Title.d.ts +10 -12
- package/dist/types/elements/Tr.d.ts +4 -5
- package/dist/types/elements/UnorderedList.d.ts +4 -5
- package/dist/types/form/Autocomplete.d.ts +35 -38
- package/dist/types/form/Checkbox.d.ts +7 -18
- package/dist/types/form/Checkboxes.d.ts +6 -7
- package/dist/types/form/Control.d.ts +21 -20
- package/dist/types/form/DateInput.d.ts +24 -24
- package/dist/types/form/DateInputBase.d.ts +36 -34
- package/dist/types/form/DateTimeInput.d.ts +22 -22
- package/dist/types/form/DateTimeInputBase.d.ts +44 -42
- package/dist/types/form/Field.d.ts +23 -26
- package/dist/types/form/File.d.ts +20 -16
- package/dist/types/form/Input.d.ts +20 -24
- package/dist/types/form/InputBase.d.ts +10 -11
- package/dist/types/form/Numberinput.d.ts +27 -24
- package/dist/types/form/Radio.d.ts +7 -18
- package/dist/types/form/Radios.d.ts +6 -7
- package/dist/types/form/Rate.d.ts +21 -37
- package/dist/types/form/Select.d.ts +16 -20
- package/dist/types/form/SelectBase.d.ts +13 -14
- package/dist/types/form/Slider.d.ts +62 -41
- package/dist/types/form/Switch.d.ts +16 -19
- package/dist/types/form/Taginput.d.ts +45 -48
- package/dist/types/form/TextArea.d.ts +11 -15
- package/dist/types/form/TextAreaBase.d.ts +13 -14
- package/dist/types/form/TimeInput.d.ts +24 -23
- package/dist/types/form/TimeInputBase.d.ts +38 -59
- package/dist/types/form/fieldProps.d.ts +1 -1
- package/dist/types/form/useAutoLabelId.d.ts +28 -0
- package/dist/types/grid/Cell.d.ts +12 -13
- package/dist/types/grid/Grid.d.ts +16 -17
- package/dist/types/helpers/colorDeprecations.d.ts +17 -0
- package/dist/types/layout/Container.d.ts +16 -13
- package/dist/types/layout/Footer.d.ts +7 -8
- package/dist/types/layout/Hero.d.ts +34 -28
- package/dist/types/layout/Level.d.ts +30 -33
- package/dist/types/layout/Media.d.ts +25 -29
- package/dist/types/layout/Section.d.ts +7 -8
- package/package.json +18 -18
|
@@ -2,39 +2,38 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Collapse component.
|
|
5
|
-
*
|
|
6
|
-
* @
|
|
7
|
-
* @property {boolean} [defaultOpen] - Initial open state for uncontrolled usage.
|
|
8
|
-
* @property {() => void} [onOpen] - Callback when collapse opens.
|
|
9
|
-
* @property {() => void} [onClose] - Callback when collapse closes.
|
|
10
|
-
* @property {React.ReactNode} [trigger] - The clickable trigger element (usually a header/button).
|
|
11
|
-
* @property {'fade'|'slide'|false} [animation] - Animation type. 'fade' for opacity transition, 'slide' for height transition, false to disable. Default: 'fade'.
|
|
12
|
-
* @property {'top'|'bottom'} [position] - Position of trigger relative to content. Default: 'top'.
|
|
13
|
-
* @property {string} [ariaId] - Custom aria id for accessibility.
|
|
14
|
-
* @property {boolean} [bordered] - Whether to show a border around the collapse.
|
|
15
|
-
* @property {React.ReactNode} [children] - The collapsible content.
|
|
16
|
-
* @property {string} [className] - Additional CSS classes.
|
|
17
|
-
* @property {string} [triggerClassName] - Additional classes for the trigger wrapper.
|
|
18
|
-
* @property {string} [contentClassName] - Additional classes for the content wrapper.
|
|
5
|
+
* @extraProp {React.ReactNode} [children] - The collapsible content.
|
|
6
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
19
7
|
*/
|
|
20
8
|
export interface CollapseProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
9
|
+
/** Controlled open state. If provided, component is controlled. */
|
|
21
10
|
open?: boolean;
|
|
11
|
+
/** Initial open state for uncontrolled usage. */
|
|
22
12
|
defaultOpen?: boolean;
|
|
13
|
+
/** Callback when collapse opens. */
|
|
23
14
|
onOpen?: () => void;
|
|
15
|
+
/** Callback when collapse closes. */
|
|
24
16
|
onClose?: () => void;
|
|
17
|
+
/** The clickable trigger element (header/button). */
|
|
25
18
|
trigger?: React.ReactNode;
|
|
19
|
+
/** Animation style, or `false` to disable. */
|
|
26
20
|
animation?: 'fade' | 'slide' | false;
|
|
21
|
+
/** Position of the trigger relative to content. */
|
|
27
22
|
position?: 'top' | 'bottom';
|
|
23
|
+
/**
|
|
24
|
+
* Custom aria id for accessibility.
|
|
25
|
+
* @defaultValue auto
|
|
26
|
+
*/
|
|
28
27
|
ariaId?: string;
|
|
28
|
+
/** Adds a border around the collapse. */
|
|
29
29
|
bordered?: boolean;
|
|
30
|
+
/** Additional classes for the trigger wrapper. */
|
|
30
31
|
triggerClassName?: string;
|
|
32
|
+
/** Additional classes for the content wrapper. */
|
|
31
33
|
contentClassName?: string;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
|
-
* Collapse component
|
|
35
|
-
*
|
|
36
|
-
* Can be used in controlled or uncontrolled mode. Supports animation
|
|
37
|
-
* and accessibility features for screen readers.
|
|
36
|
+
* The `Collapse` component provides an expandable/collapsible content panel.
|
|
38
37
|
*
|
|
39
38
|
* @function
|
|
40
39
|
* @param {CollapseProps} props - Props for the Collapse component.
|
|
@@ -4,39 +4,37 @@ import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
|
4
4
|
export type DialogType = 'default' | 'success' | 'danger' | 'warning' | 'info';
|
|
5
5
|
/**
|
|
6
6
|
* Props for the Dialog component.
|
|
7
|
-
*
|
|
8
|
-
* @
|
|
9
|
-
* @property {string} [title] - Dialog title.
|
|
10
|
-
* @property {string | React.ReactNode} message - Dialog message/content.
|
|
11
|
-
* @property {DialogType} [type] - The type/color of the dialog. Default: 'default'.
|
|
12
|
-
* @property {string} [confirmText] - Text for confirm button. Default: 'OK'.
|
|
13
|
-
* @property {string} [cancelText] - Text for cancel button. Default: 'Cancel'.
|
|
14
|
-
* @property {() => void} [onConfirm] - Callback when confirm button is clicked.
|
|
15
|
-
* @property {() => void} [onCancel] - Callback when cancel button is clicked or dialog is dismissed.
|
|
16
|
-
* @property {boolean} [showCancel] - Whether to show cancel button. Default: true for confirm dialogs.
|
|
17
|
-
* @property {boolean} [canCancel] - Whether the dialog can be dismissed. Default: true.
|
|
18
|
-
* @property {boolean} [focusCancel] - Focus cancel button instead of confirm. Default: false.
|
|
19
|
-
* @property {React.ReactNode} [icon] - Custom icon to display.
|
|
7
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
8
|
+
* @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the dialog element.
|
|
20
9
|
*/
|
|
21
10
|
export interface DialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, Omit<BulmaClassesProps, 'color'> {
|
|
11
|
+
/** Whether the dialog is open (required). */
|
|
22
12
|
isOpen: boolean;
|
|
13
|
+
/** Dialog title. */
|
|
23
14
|
title?: string;
|
|
15
|
+
/** Dialog message/content (required). */
|
|
24
16
|
message: string | React.ReactNode;
|
|
17
|
+
/** The type/color of the dialog. Default: 'default'. */
|
|
25
18
|
type?: DialogType;
|
|
19
|
+
/** Text for confirm button. Default: 'OK'. */
|
|
26
20
|
confirmText?: string;
|
|
21
|
+
/** Text for cancel button. Default: 'Cancel'. */
|
|
27
22
|
cancelText?: string;
|
|
23
|
+
/** Callback when confirm button is clicked. */
|
|
28
24
|
onConfirm?: () => void;
|
|
25
|
+
/** Callback when cancel button is clicked or dismissed. */
|
|
29
26
|
onCancel?: () => void;
|
|
27
|
+
/** Whether to show cancel button. Default: true for confirm dialogs. */
|
|
30
28
|
showCancel?: boolean;
|
|
29
|
+
/** Whether the dialog can be dismissed. Default: true. */
|
|
31
30
|
canCancel?: boolean;
|
|
31
|
+
/** Focus cancel button instead of confirm. Default: false. */
|
|
32
32
|
focusCancel?: boolean;
|
|
33
|
+
/** Custom icon to display. */
|
|
33
34
|
icon?: React.ReactNode;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
|
-
* Dialog component
|
|
37
|
-
*
|
|
38
|
-
* Provides a modal dialog with confirm/cancel actions, customizable
|
|
39
|
-
* appearance, and keyboard support.
|
|
37
|
+
* The `Dialog` component provides confirmation and alert dialogs with customizable actions.
|
|
40
38
|
*
|
|
41
39
|
* @function
|
|
42
40
|
* @param {DialogProps} props - Props for the Dialog component.
|
|
@@ -69,38 +67,35 @@ export interface DialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
69
67
|
export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
70
68
|
/**
|
|
71
69
|
* Options for showing a programmatic alert dialog.
|
|
72
|
-
*
|
|
73
|
-
* @property {string} [title] - Dialog title.
|
|
74
|
-
* @property {string | React.ReactNode} message - Dialog message/content.
|
|
75
|
-
* @property {DialogType} [type] - Dialog type/color.
|
|
76
|
-
* @property {string} [confirmText] - Text for the confirm button.
|
|
77
|
-
* @property {React.ReactNode} [icon] - Custom icon to display.
|
|
78
70
|
*/
|
|
79
71
|
export interface AlertOptions {
|
|
72
|
+
/** Dialog title. */
|
|
80
73
|
title?: string;
|
|
74
|
+
/** Dialog message/content. */
|
|
81
75
|
message: string | React.ReactNode;
|
|
76
|
+
/** Dialog type/color. */
|
|
82
77
|
type?: DialogType;
|
|
78
|
+
/** Text for the confirm button. */
|
|
83
79
|
confirmText?: string;
|
|
80
|
+
/** Custom icon to display. */
|
|
84
81
|
icon?: React.ReactNode;
|
|
85
82
|
}
|
|
86
83
|
/**
|
|
87
84
|
* Options for showing a programmatic confirm dialog.
|
|
88
|
-
*
|
|
89
|
-
* @property {string} [cancelText] - Text for the cancel button.
|
|
90
|
-
* @property {boolean} [focusCancel] - Focus cancel button instead of confirm.
|
|
91
85
|
*/
|
|
92
86
|
export interface ConfirmOptions extends AlertOptions {
|
|
87
|
+
/** Text for the cancel button. */
|
|
93
88
|
cancelText?: string;
|
|
89
|
+
/** Focus cancel button instead of confirm. */
|
|
94
90
|
focusCancel?: boolean;
|
|
95
91
|
}
|
|
96
92
|
/**
|
|
97
93
|
* Options for showing a programmatic prompt dialog.
|
|
98
|
-
*
|
|
99
|
-
* @property {string} [placeholder] - Input placeholder text.
|
|
100
|
-
* @property {string} [defaultValue] - Default input value.
|
|
101
94
|
*/
|
|
102
95
|
export interface PromptOptions extends ConfirmOptions {
|
|
96
|
+
/** Input placeholder text. */
|
|
103
97
|
placeholder?: string;
|
|
98
|
+
/** Default input value. */
|
|
104
99
|
defaultValue?: string;
|
|
105
100
|
}
|
|
106
101
|
type DialogResolve = (value?: void | boolean | string) => void;
|
|
@@ -9,46 +9,44 @@ import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
|
9
9
|
export declare const isBrowser: (win?: typeof window, doc?: typeof document) => boolean;
|
|
10
10
|
/**
|
|
11
11
|
* Props for the Dropdown component.
|
|
12
|
-
*
|
|
13
|
-
* @property {React.ReactNode} label - The dropdown button content.
|
|
14
|
-
* @property {React.ReactNode} children - The menu items.
|
|
15
|
-
* @property {string} [className] - Additional CSS classes to apply.
|
|
16
|
-
* @property {string} [menuClassName] - Additional CSS classes for the dropdown menu.
|
|
17
|
-
* @property {boolean} [active] - Whether the dropdown is open (controlled).
|
|
18
|
-
* @property {boolean} [up] - Dropdown direction up.
|
|
19
|
-
* @property {boolean} [right] - Dropdown aligned to the right.
|
|
20
|
-
* @property {boolean} [hoverable] - Dropdown opens on hover.
|
|
21
|
-
* @property {boolean} [disabled] - Disables the dropdown trigger.
|
|
22
|
-
* @property {(active: boolean) => void} [onActiveChange] - Called when active state changes.
|
|
23
|
-
* @property {boolean} [closeOnClick=true] - Close dropdown when clicking a menu item.
|
|
24
|
-
* @property {string} [id] - ID for the root element.
|
|
25
12
|
*/
|
|
26
13
|
export interface DropdownProps extends Omit<React.HTMLAttributes<HTMLDivElement>, keyof BulmaClassesProps>, BulmaClassesProps {
|
|
14
|
+
/** The dropdown button/trigger content. */
|
|
27
15
|
label: React.ReactNode;
|
|
16
|
+
/** Dropdown menu items and dividers. */
|
|
28
17
|
children: React.ReactNode;
|
|
18
|
+
/** Additional CSS classes for root. */
|
|
29
19
|
className?: string;
|
|
20
|
+
/** Additional CSS classes for the dropdown menu. */
|
|
30
21
|
menuClassName?: string;
|
|
22
|
+
/** Whether the dropdown is open (controlled). */
|
|
31
23
|
active?: boolean;
|
|
24
|
+
/** Dropdown menu opens upward. */
|
|
32
25
|
up?: boolean;
|
|
26
|
+
/** Menu is right-aligned. */
|
|
33
27
|
right?: boolean;
|
|
28
|
+
/** Open on hover instead of click. */
|
|
34
29
|
hoverable?: boolean;
|
|
30
|
+
/** Disables the dropdown trigger. */
|
|
35
31
|
disabled?: boolean;
|
|
32
|
+
/** Callback when dropdown active state changes. */
|
|
36
33
|
onActiveChange?: (active: boolean) => void;
|
|
34
|
+
/** Close dropdown when a menu item is clicked. */
|
|
37
35
|
closeOnClick?: boolean;
|
|
36
|
+
/** Root element ID (for aria-controls, etc). */
|
|
38
37
|
id?: string;
|
|
39
38
|
}
|
|
40
39
|
/**
|
|
41
40
|
* Props for the DropdownItem component.
|
|
42
|
-
*
|
|
43
|
-
* @property {boolean} [active] - Whether the item is active.
|
|
44
|
-
* @property {string} [className] - Additional CSS classes.
|
|
45
|
-
* @property {'a'|'div'|'button'} [as] - The element type to render.
|
|
46
|
-
* @property {React.ReactNode} [children] - Item content.
|
|
47
41
|
*/
|
|
48
42
|
export interface DropdownItemProps extends Omit<React.HTMLAttributes<HTMLElement>, keyof BulmaClassesProps>, BulmaClassesProps {
|
|
43
|
+
/** Whether the item is active. */
|
|
49
44
|
active?: boolean;
|
|
45
|
+
/** Additional CSS classes. */
|
|
50
46
|
className?: string;
|
|
47
|
+
/** The element type to render. */
|
|
51
48
|
as?: 'a' | 'div' | 'button';
|
|
49
|
+
/** Item content. */
|
|
52
50
|
children?: React.ReactNode;
|
|
53
51
|
}
|
|
54
52
|
/**
|
|
@@ -10,38 +10,33 @@ export type LoadingOverlay = 'light' | 'dark' | 'opaque';
|
|
|
10
10
|
export type LoadingColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
11
11
|
/**
|
|
12
12
|
* Props for the Loading component.
|
|
13
|
-
*
|
|
14
|
-
* @
|
|
15
|
-
* @property {boolean} [isFullPage] - Cover the entire viewport.
|
|
16
|
-
* @property {'small' | 'medium' | 'large'} [size] - Size of the loading spinner.
|
|
17
|
-
* @property {LoadingColor} [color] - Color variant for the spinner. Default is light grey.
|
|
18
|
-
* @property {boolean} [canCancel] - Show a cancel button/allow closing.
|
|
19
|
-
* @property {() => void} [onCancel] - Callback when cancel is triggered.
|
|
20
|
-
* @property {React.ReactNode} [children] - Content to display below the spinner.
|
|
21
|
-
* @property {string} [className] - Additional CSS classes.
|
|
22
|
-
* @property {string} [overlayClassName] - Additional classes for the overlay.
|
|
23
|
-
* @property {string} [iconClassName] - Additional classes for the spinner icon.
|
|
24
|
-
* @property {React.ReactNode} [indicator] - Custom content to replace the default CSS spinner. The Loading component wraps it in a spinning container.
|
|
25
|
-
* @property {LoadingOverlay} [overlay] - Overlay opacity level: 'light', 'dark', or 'opaque'. Defaults to a medium opacity.
|
|
13
|
+
* @extraProp {React.ReactNode} [children] - Content to display below the spinner.
|
|
14
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
26
15
|
*/
|
|
27
16
|
export interface LoadingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size' | 'overlay'> {
|
|
17
|
+
/** Whether the loading overlay is visible. */
|
|
28
18
|
active?: boolean;
|
|
19
|
+
/** Cover the entire viewport. */
|
|
29
20
|
isFullPage?: boolean;
|
|
21
|
+
/** Size of the loading spinner. */
|
|
30
22
|
size?: 'small' | 'medium' | 'large';
|
|
23
|
+
/** Color variant for the spinner. Default is light grey. */
|
|
31
24
|
color?: LoadingColor;
|
|
25
|
+
/** Show a cancel button and allow closing. */
|
|
32
26
|
canCancel?: boolean;
|
|
27
|
+
/** Callback when cancel is triggered. */
|
|
33
28
|
onCancel?: () => void;
|
|
29
|
+
/** Additional classes for the overlay. */
|
|
34
30
|
overlayClassName?: string;
|
|
31
|
+
/** Additional classes for the spinner icon. */
|
|
35
32
|
iconClassName?: string;
|
|
33
|
+
/** Custom loading indicator element. */
|
|
36
34
|
indicator?: React.ReactNode;
|
|
35
|
+
/** Style of the loading overlay. */
|
|
37
36
|
overlay?: LoadingOverlay;
|
|
38
37
|
}
|
|
39
38
|
/**
|
|
40
|
-
* Loading component
|
|
41
|
-
*
|
|
42
|
-
* Can be used as a full-page overlay or a container overlay to indicate
|
|
43
|
-
* loading states. Supports different sizes, color variants, and optional
|
|
44
|
-
* cancel functionality.
|
|
39
|
+
* The `Loading` component provides a loading overlay with a spinner animation.
|
|
45
40
|
*
|
|
46
41
|
* @function
|
|
47
42
|
* @param {LoadingProps} props - Props for the Loading component.
|
|
@@ -2,22 +2,20 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Menu component.
|
|
5
|
-
*
|
|
6
|
-
* @property {string} [className] - Additional CSS classes.
|
|
7
|
-
* @property {React.ReactNode} children - Menu content.
|
|
8
5
|
*/
|
|
9
6
|
export interface MenuProps extends Omit<React.HTMLAttributes<HTMLElement>, keyof BulmaClassesProps>, BulmaClassesProps {
|
|
7
|
+
/** Additional CSS classes. */
|
|
10
8
|
className?: string;
|
|
9
|
+
/** Menu content (labels, lists, items, etc). */
|
|
11
10
|
children: React.ReactNode;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
13
|
* Props for the MenuLabel component.
|
|
15
|
-
*
|
|
16
|
-
* @property {string} [className] - Additional CSS classes.
|
|
17
|
-
* @property {React.ReactNode} children - Label content.
|
|
18
14
|
*/
|
|
19
15
|
export interface MenuLabelProps extends Omit<React.HTMLAttributes<HTMLParagraphElement>, keyof BulmaClassesProps>, BulmaClassesProps {
|
|
16
|
+
/** Additional CSS classes. */
|
|
20
17
|
className?: string;
|
|
18
|
+
/** Label content. */
|
|
21
19
|
children: React.ReactNode;
|
|
22
20
|
}
|
|
23
21
|
/**
|
|
@@ -30,12 +28,11 @@ export interface MenuLabelProps extends Omit<React.HTMLAttributes<HTMLParagraphE
|
|
|
30
28
|
export declare const MenuLabel: React.FC<MenuLabelProps>;
|
|
31
29
|
/**
|
|
32
30
|
* Props for the MenuList component.
|
|
33
|
-
*
|
|
34
|
-
* @property {string} [className] - Additional CSS classes.
|
|
35
|
-
* @property {React.ReactNode} children - List items.
|
|
36
31
|
*/
|
|
37
32
|
export interface MenuListProps extends Omit<React.HTMLAttributes<HTMLUListElement>, keyof BulmaClassesProps>, BulmaClassesProps {
|
|
33
|
+
/** Additional CSS classes. */
|
|
38
34
|
className?: string;
|
|
35
|
+
/** List items. */
|
|
39
36
|
children: React.ReactNode;
|
|
40
37
|
}
|
|
41
38
|
/**
|
|
@@ -48,18 +45,17 @@ export interface MenuListProps extends Omit<React.HTMLAttributes<HTMLUListElemen
|
|
|
48
45
|
export declare const MenuList: React.FC<MenuListProps>;
|
|
49
46
|
/**
|
|
50
47
|
* Props for the MenuItem component.
|
|
51
|
-
*
|
|
52
|
-
* @property {string} [className] - Additional CSS classes.
|
|
53
|
-
* @property {boolean} [active] - Whether the item is active.
|
|
54
|
-
* @property {string} [href] - Href for link items.
|
|
55
|
-
* @property {React.ElementType} [as] - Render as a custom component.
|
|
56
|
-
* @property {React.ReactNode} children - Item content and optional nested MenuList.
|
|
57
48
|
*/
|
|
58
49
|
export interface MenuItemProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, keyof BulmaClassesProps>, BulmaClassesProps {
|
|
50
|
+
/** Additional CSS classes. */
|
|
59
51
|
className?: string;
|
|
52
|
+
/** Item content and optional nested MenuList. */
|
|
60
53
|
children: React.ReactNode;
|
|
54
|
+
/** Highlight item as active. */
|
|
61
55
|
active?: boolean;
|
|
56
|
+
/** Href for link items (if rendered as `<a>`). */
|
|
62
57
|
href?: string;
|
|
58
|
+
/** Custom link component (e.g. `Link` from router). */
|
|
63
59
|
as?: React.ElementType;
|
|
64
60
|
[key: string]: unknown;
|
|
65
61
|
}
|
|
@@ -2,42 +2,39 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Message component.
|
|
5
|
-
*
|
|
6
|
-
* @property {string} [className] - Additional CSS classes.
|
|
7
|
-
* @property {React.ReactNode} [title] - Title displayed in the message header.
|
|
8
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color (Bulma or 'inherit'/'current').
|
|
9
|
-
* @property {'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'} [color] - Bulma color modifier for the message.
|
|
10
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma or 'inherit'/'current').
|
|
11
|
-
* @property {() => void} [onClose] - Called when the close button is clicked.
|
|
12
|
-
* @property {React.ReactNode} [children] - Message body content.
|
|
13
5
|
*/
|
|
14
6
|
export interface MessageProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes. */
|
|
15
8
|
className?: string;
|
|
9
|
+
/** Title string/node (renders header section). */
|
|
16
10
|
title?: React.ReactNode;
|
|
11
|
+
/** Text color for the message (Bulma helper). */
|
|
17
12
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
13
|
+
/** Bulma color modifier for the message. */
|
|
18
14
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
15
|
+
/** Background color for the message (Bulma helper). */
|
|
19
16
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
17
|
+
/** Callback for the close ("X") button. */
|
|
20
18
|
onClose?: () => void;
|
|
19
|
+
/** Body content for the message. */
|
|
21
20
|
children?: React.ReactNode;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
23
|
* Props for the Message.Header compound component.
|
|
25
|
-
*
|
|
26
|
-
* @property {string} [className] - Additional CSS classes.
|
|
27
|
-
* @property {React.ReactNode} [children] - Header content (title, close button, etc.).
|
|
28
24
|
*/
|
|
29
25
|
export interface MessageHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
26
|
+
/** Additional CSS classes. */
|
|
30
27
|
className?: string;
|
|
28
|
+
/** Header content (title, close button, etc.). */
|
|
31
29
|
children?: React.ReactNode;
|
|
32
30
|
}
|
|
33
31
|
/**
|
|
34
32
|
* Props for the Message.Body compound component.
|
|
35
|
-
*
|
|
36
|
-
* @property {string} [className] - Additional CSS classes.
|
|
37
|
-
* @property {React.ReactNode} [children] - Message body content.
|
|
38
33
|
*/
|
|
39
34
|
export interface MessageBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
35
|
+
/** Additional CSS classes. */
|
|
40
36
|
className?: string;
|
|
37
|
+
/** Message body content. */
|
|
41
38
|
children?: React.ReactNode;
|
|
42
39
|
}
|
|
43
40
|
export declare const Message: React.FC<MessageProps> & {
|
|
@@ -2,96 +2,90 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Modal component.
|
|
5
|
-
*
|
|
6
|
-
* @property {boolean} [active] - Whether the modal is open/visible.
|
|
7
|
-
* @property {boolean} [isActive] - Alias for `active`. Whether the modal is open/visible.
|
|
8
|
-
* @property {() => void} [onClose] - Callback invoked when modal close is requested (background click or close button).
|
|
9
|
-
* @property {string} [className] - Additional CSS classes for the modal.
|
|
10
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color for modal content.
|
|
11
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color for modal content.
|
|
12
|
-
* @property {React.ReactNode} [modalCardTitle] - Title for modal card variant (legacy API).
|
|
13
|
-
* @property {React.ReactNode} [modalCardFoot] - Footer for modal card variant (legacy API).
|
|
14
|
-
* @property {'card'|'content'} [type] - Modal type ('card' for modal-card, 'content' for modal-content). Legacy API only.
|
|
15
|
-
* @property {React.ReactNode} [children] - Modal body/content or compound components.
|
|
16
5
|
*/
|
|
17
6
|
export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'title'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Whether the modal is open/visible. */
|
|
18
8
|
active?: boolean;
|
|
9
|
+
/** Alias for `active`. Whether the modal is open/visible. */
|
|
19
10
|
isActive?: boolean;
|
|
11
|
+
/** Callback invoked to request modal close (background or close button). */
|
|
20
12
|
onClose?: () => void;
|
|
13
|
+
/** Additional CSS classes for the modal. */
|
|
21
14
|
className?: string;
|
|
15
|
+
/** Text color for modal content. */
|
|
22
16
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
17
|
+
/** Background color for modal content. */
|
|
23
18
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
19
|
+
/** Title/header for modal-card variant. (Legacy API only) */
|
|
24
20
|
modalCardTitle?: React.ReactNode;
|
|
21
|
+
/** Footer for modal-card variant. (Legacy API only) */
|
|
25
22
|
modalCardFoot?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Modal style: `'card'` for modal-card, `'content'` for modal-content. (Legacy API only)
|
|
25
|
+
* @defaultValue auto
|
|
26
|
+
*/
|
|
26
27
|
type?: 'card' | 'content';
|
|
28
|
+
/** Modal body/content or compound components. */
|
|
27
29
|
children?: React.ReactNode;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
32
|
* Props for Modal.Background component.
|
|
31
|
-
*
|
|
32
|
-
* @property {string} [className] - Additional CSS classes.
|
|
33
33
|
*/
|
|
34
34
|
export interface ModalBackgroundProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
35
|
+
/** Additional CSS classes. */
|
|
35
36
|
className?: string;
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
39
|
* Props for Modal.Content component.
|
|
39
|
-
*
|
|
40
|
-
* @property {string} [className] - Additional CSS classes.
|
|
41
40
|
*/
|
|
42
41
|
export interface ModalContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
42
|
+
/** Additional CSS classes. */
|
|
43
43
|
className?: string;
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Props for Modal.Card component.
|
|
47
|
-
*
|
|
48
|
-
* @property {string} [className] - Additional CSS classes.
|
|
49
47
|
*/
|
|
50
48
|
export interface ModalCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
49
|
+
/** Additional CSS classes. */
|
|
51
50
|
className?: string;
|
|
52
51
|
}
|
|
53
52
|
/**
|
|
54
53
|
* Props for Modal.Card.Head component.
|
|
55
|
-
*
|
|
56
|
-
* @property {string} [className] - Additional CSS classes.
|
|
57
54
|
*/
|
|
58
55
|
export interface ModalCardHeadProps extends React.HTMLAttributes<HTMLElement> {
|
|
56
|
+
/** Additional CSS classes. */
|
|
59
57
|
className?: string;
|
|
60
58
|
}
|
|
61
59
|
/**
|
|
62
60
|
* Props for Modal.Card.Title component.
|
|
63
|
-
*
|
|
64
|
-
* @property {string} [className] - Additional CSS classes.
|
|
65
61
|
*/
|
|
66
62
|
export interface ModalCardTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
63
|
+
/** Additional CSS classes. */
|
|
67
64
|
className?: string;
|
|
68
65
|
}
|
|
69
66
|
/**
|
|
70
67
|
* Props for Modal.Card.Body component.
|
|
71
|
-
*
|
|
72
|
-
* @property {string} [className] - Additional CSS classes.
|
|
73
68
|
*/
|
|
74
69
|
export interface ModalCardBodyProps extends React.HTMLAttributes<HTMLElement> {
|
|
70
|
+
/** Additional CSS classes. */
|
|
75
71
|
className?: string;
|
|
76
72
|
}
|
|
77
73
|
/**
|
|
78
74
|
* Props for Modal.Card.Foot component.
|
|
79
|
-
*
|
|
80
|
-
* @property {string} [className] - Additional CSS classes.
|
|
81
75
|
*/
|
|
82
76
|
export interface ModalCardFootProps extends React.HTMLAttributes<HTMLElement> {
|
|
77
|
+
/** Additional CSS classes. */
|
|
83
78
|
className?: string;
|
|
84
79
|
}
|
|
85
80
|
/**
|
|
86
81
|
* Props for Modal.Close component.
|
|
87
|
-
*
|
|
88
|
-
* @property {string} [className] - Additional CSS classes.
|
|
89
|
-
* @property {'small' | 'medium' | 'large'} [size] - Size of the close button (only applies to 'floating' variant).
|
|
90
|
-
* @property {'delete' | 'floating'} [variant] - Button variant. 'delete' (default) for modal card headers, 'floating' for overlay close button.
|
|
91
82
|
*/
|
|
92
83
|
export interface ModalCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
84
|
+
/** Additional CSS classes. */
|
|
93
85
|
className?: string;
|
|
86
|
+
/** Size of the close button (only applies to 'floating' variant). */
|
|
94
87
|
size?: 'small' | 'medium' | 'large';
|
|
88
|
+
/** Button variant. 'delete' (default) for modal card headers, 'floating' for overlay close button. */
|
|
95
89
|
variant?: 'delete' | 'floating';
|
|
96
90
|
}
|
|
97
91
|
export declare const Modal: React.FC<ModalProps> & {
|