@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
|
@@ -4,46 +4,45 @@ import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
|
4
4
|
export type SidebarPosition = 'left' | 'right';
|
|
5
5
|
/**
|
|
6
6
|
* Props for the Sidebar component.
|
|
7
|
-
*
|
|
8
|
-
* @
|
|
9
|
-
* @property {() => void} [onClose] - Callback when sidebar should close.
|
|
10
|
-
* @property {SidebarPosition} [position] - Which side the sidebar appears from. Default: 'left'.
|
|
11
|
-
* @property {string} [width] - Custom width. Default: '260px'.
|
|
12
|
-
* @property {boolean} [fullWidth] - Sidebar takes full width (mobile-style).
|
|
13
|
-
* @property {boolean} [overlay] - Show overlay behind sidebar. Default: true.
|
|
14
|
-
* @property {boolean} [overlayClose] - Close sidebar when overlay is clicked. Default: true.
|
|
15
|
-
* @property {boolean} [escapeClose] - Close sidebar on Escape key. Default: true.
|
|
16
|
-
* @property {boolean} [canCancel] - Allow closing the sidebar. Default: true.
|
|
17
|
-
* @property {React.ReactNode} [children] - Content to display in the sidebar.
|
|
7
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
8
|
+
* @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the sidebar element.
|
|
18
9
|
*/
|
|
19
10
|
export interface SidebarProps extends Omit<React.HTMLAttributes<HTMLElement>, 'children' | 'color'>, BulmaClassesProps {
|
|
11
|
+
/** Whether the sidebar is open (required). */
|
|
20
12
|
isOpen: boolean;
|
|
13
|
+
/** Callback when sidebar should close. */
|
|
21
14
|
onClose?: () => void;
|
|
15
|
+
/** Which side the sidebar appears from. Default: 'left'. */
|
|
22
16
|
position?: SidebarPosition;
|
|
17
|
+
/** Custom width of the sidebar. */
|
|
23
18
|
width?: string;
|
|
19
|
+
/** Sidebar takes full width (mobile-style). */
|
|
24
20
|
fullWidth?: boolean;
|
|
21
|
+
/** Show overlay behind sidebar. Default: true. */
|
|
25
22
|
overlay?: boolean;
|
|
23
|
+
/** Close sidebar when overlay is clicked. Default: true. */
|
|
26
24
|
overlayClose?: boolean;
|
|
25
|
+
/** Close sidebar on Escape key. Default: true. */
|
|
27
26
|
escapeClose?: boolean;
|
|
27
|
+
/** Allow closing the sidebar. Default: true. */
|
|
28
28
|
canCancel?: boolean;
|
|
29
|
+
/** Content to display in the sidebar. */
|
|
29
30
|
children?: React.ReactNode;
|
|
30
|
-
/**
|
|
31
|
+
/** Renders inline instead of using a portal. */
|
|
31
32
|
inline?: boolean;
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
35
|
* Props for the SidebarHeader component.
|
|
35
|
-
*
|
|
36
|
-
* @property {React.ReactNode} [children] - Header content.
|
|
37
36
|
*/
|
|
38
37
|
interface SidebarHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
38
|
+
/** Header content. */
|
|
39
39
|
children?: React.ReactNode;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Props for the SidebarTitle component.
|
|
43
|
-
*
|
|
44
|
-
* @property {React.ReactNode} [children] - Title content.
|
|
45
43
|
*/
|
|
46
44
|
interface SidebarTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
45
|
+
/** Title content. */
|
|
47
46
|
children?: React.ReactNode;
|
|
48
47
|
}
|
|
49
48
|
/**
|
|
@@ -53,18 +52,16 @@ interface SidebarTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
|
53
52
|
type SidebarCloseProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
54
53
|
/**
|
|
55
54
|
* Props for the SidebarBody component.
|
|
56
|
-
*
|
|
57
|
-
* @property {React.ReactNode} [children] - Body content.
|
|
58
55
|
*/
|
|
59
56
|
interface SidebarBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
57
|
+
/** Body content. */
|
|
60
58
|
children?: React.ReactNode;
|
|
61
59
|
}
|
|
62
60
|
/**
|
|
63
61
|
* Props for the SidebarFooter component.
|
|
64
|
-
*
|
|
65
|
-
* @property {React.ReactNode} [children] - Footer content.
|
|
66
62
|
*/
|
|
67
63
|
interface SidebarFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
64
|
+
/** Footer content. */
|
|
68
65
|
children?: React.ReactNode;
|
|
69
66
|
}
|
|
70
67
|
export declare const Sidebar: React.ForwardRefExoticComponent<SidebarProps & React.RefAttributes<HTMLElement>> & {
|
|
@@ -6,77 +6,65 @@ export type StepsSize = 'small' | 'medium' | 'large';
|
|
|
6
6
|
export type StepsColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
7
7
|
/**
|
|
8
8
|
* Props for individual Step items.
|
|
9
|
-
*
|
|
10
|
-
* @property {React.ReactNode} [label] - Step label/title.
|
|
11
|
-
* @property {React.ReactNode} [icon] - Icon for the step marker.
|
|
12
|
-
* @property {React.ReactNode} [completedIcon] - Custom icon for completed state. Set to null to show step number instead of checkmark.
|
|
13
|
-
* @property {boolean} [clickable] - Whether this step is clickable.
|
|
14
|
-
* @property {string} [className] - Additional class for this step.
|
|
15
9
|
*/
|
|
16
10
|
export interface StepItemProps {
|
|
17
11
|
/** Step label/title */
|
|
18
12
|
label?: React.ReactNode;
|
|
19
13
|
/** Icon for the step marker */
|
|
20
14
|
icon?: React.ReactNode;
|
|
21
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Icon shown when the step is completed.
|
|
17
|
+
* @defaultValue '✓'
|
|
18
|
+
*/
|
|
22
19
|
completedIcon?: React.ReactNode;
|
|
23
20
|
/** Whether this step is clickable */
|
|
24
21
|
clickable?: boolean;
|
|
25
|
-
/** Additional
|
|
22
|
+
/** Additional CSS classes. */
|
|
26
23
|
className?: string;
|
|
27
24
|
}
|
|
28
25
|
/**
|
|
29
26
|
* Props for the Steps component.
|
|
30
|
-
*
|
|
31
|
-
* @
|
|
32
|
-
* @property {StepItemProps[]} [items] - Array of step items.
|
|
33
|
-
* @property {StepsSize} [size] - Size of the steps.
|
|
34
|
-
* @property {StepsColor} [color] - Color variant.
|
|
35
|
-
* @property {boolean} [hasMarker] - Show step markers. Default: true.
|
|
36
|
-
* @property {boolean} [animated] - Enable animations. Default: true.
|
|
37
|
-
* @property {boolean} [rounded] - Use rounded markers. Default: true.
|
|
38
|
-
* @property {boolean} [vertical] - Vertical layout.
|
|
39
|
-
* @property {'bottom' | 'right' | 'left'} [labelPosition] - Position of labels.
|
|
40
|
-
* @property {boolean} [showStepNumbers] - Show step numbers in markers. Default: true.
|
|
41
|
-
* @property {boolean} [hasNavigation] - Render built-in prev/next buttons.
|
|
42
|
-
* @property {string} [prevLabel] - Custom prev button text (default 'Previous').
|
|
43
|
-
* @property {string} [nextLabel] - Custom next button text (default 'Next').
|
|
44
|
-
* @property {() => void} [onPrev] - Custom prev button callback.
|
|
45
|
-
* @property {() => void} [onNext] - Custom next button callback.
|
|
46
|
-
* @property {(step: number) => void} [onStepClick] - Callback when a step is clicked.
|
|
47
|
-
* @property {'minimal' | 'compact' | 'right'} [mobileMode] - Mobile display mode.
|
|
48
|
-
* @property {React.ReactNode} [children] - Step children (alternative to items).
|
|
27
|
+
* @extraProp {React.ReactNode} [children] - Step children (alternative to items).
|
|
28
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
49
29
|
*/
|
|
50
30
|
export interface StepsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
|
|
31
|
+
/** Current active step (0-indexed). */
|
|
51
32
|
value?: number;
|
|
33
|
+
/** Array of step items. */
|
|
52
34
|
items?: StepItemProps[];
|
|
35
|
+
/** Size of the steps. */
|
|
53
36
|
size?: StepsSize;
|
|
37
|
+
/** Color variant. */
|
|
54
38
|
color?: StepsColor;
|
|
39
|
+
/** Show step markers. Default: true. */
|
|
55
40
|
hasMarker?: boolean;
|
|
41
|
+
/** Enable animations. Default: true. */
|
|
56
42
|
animated?: boolean;
|
|
43
|
+
/** Use rounded markers. Default: true. */
|
|
57
44
|
rounded?: boolean;
|
|
45
|
+
/** Vertical layout. */
|
|
58
46
|
vertical?: boolean;
|
|
47
|
+
/** Position of labels. */
|
|
59
48
|
labelPosition?: 'bottom' | 'right' | 'left';
|
|
49
|
+
/** Mobile display mode. */
|
|
60
50
|
mobileMode?: 'minimal' | 'compact' | 'right';
|
|
51
|
+
/** Displays step numbers in the markers. */
|
|
61
52
|
showStepNumbers?: boolean;
|
|
53
|
+
/** Shows previous/next navigation buttons. */
|
|
62
54
|
hasNavigation?: boolean;
|
|
55
|
+
/** Label for the previous button. */
|
|
63
56
|
prevLabel?: string;
|
|
57
|
+
/** Label for the next button. */
|
|
64
58
|
nextLabel?: string;
|
|
59
|
+
/** Callback when previous button is clicked. */
|
|
65
60
|
onPrev?: () => void;
|
|
61
|
+
/** Callback when next button is clicked. */
|
|
66
62
|
onNext?: () => void;
|
|
63
|
+
/** Callback when a step is clicked. */
|
|
67
64
|
onStepClick?: (step: number) => void;
|
|
68
65
|
}
|
|
69
66
|
/**
|
|
70
67
|
* Props for the Step subcomponent.
|
|
71
|
-
*
|
|
72
|
-
* @property {boolean} [isActive] - Whether this step is active.
|
|
73
|
-
* @property {boolean} [isCompleted] - Whether this step is completed.
|
|
74
|
-
* @property {React.ReactNode} [label] - Step label/title.
|
|
75
|
-
* @property {React.ReactNode} [icon] - Icon for the step marker.
|
|
76
|
-
* @property {boolean} [clickable] - Whether this step is clickable.
|
|
77
|
-
* @property {() => void} [onClick] - Click handler.
|
|
78
|
-
* @property {number} [stepNumber] - Step number to display in marker (1-indexed).
|
|
79
|
-
* @property {React.ReactNode} [completedIcon] - Custom icon for completed state.
|
|
80
68
|
*/
|
|
81
69
|
export interface StepProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
82
70
|
/** Whether this step is active */
|
|
@@ -93,7 +81,10 @@ export interface StepProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, '
|
|
|
93
81
|
onClick?: () => void;
|
|
94
82
|
/** Step number to display in marker (1-indexed) */
|
|
95
83
|
stepNumber?: number;
|
|
96
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Icon shown when the step is completed.
|
|
86
|
+
* @defaultValue '✓'
|
|
87
|
+
*/
|
|
97
88
|
completedIcon?: React.ReactNode;
|
|
98
89
|
}
|
|
99
90
|
/**
|
|
@@ -2,52 +2,57 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Tabs component.
|
|
5
|
-
*
|
|
6
|
-
* @property {'centered'|'right'|'left'} [align] - Tab alignment.
|
|
7
|
-
* @property {'small'|'medium'|'large'} [size] - Tab size.
|
|
8
|
-
* @property {boolean} [fullwidth] - Tabs are fullwidth.
|
|
9
|
-
* @property {boolean} [boxed] - Tabs are boxed style.
|
|
10
|
-
* @property {boolean} [toggle] - Tabs are toggle style.
|
|
11
|
-
* @property {boolean} [rounded] - Tabs are rounded (if toggle).
|
|
12
|
-
* @property {'primary'|'link'|'info'|'success'|'warning'|'danger'|'black'|'dark'|'light'|'white'} [color] - Bulma color.
|
|
13
|
-
* @property {number} [value] - Controlled active tab index.
|
|
14
|
-
* @property {(index: number) => void} [onChange] - Callback when active tab changes.
|
|
15
|
-
* @property {number} [defaultValue] - Initial active tab index for uncontrolled mode.
|
|
16
|
-
* @property {boolean} [vertical] - Render tabs vertically.
|
|
17
|
-
* @property {'left'|'right'} [side] - Which side vertical tabs appear on.
|
|
18
|
-
* @property {boolean} [expanded] - Vertical tabs fill full height.
|
|
19
|
-
* @property {string} [className] - Additional CSS classes.
|
|
20
|
-
* @property {React.ReactNode} [children] - Tab content.
|
|
21
5
|
*/
|
|
22
6
|
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Tab alignment. */
|
|
23
8
|
align?: 'centered' | 'right' | 'left';
|
|
9
|
+
/** Tab size. */
|
|
24
10
|
size?: 'small' | 'medium' | 'large';
|
|
11
|
+
/** Tabs expand to fill the horizontal space. */
|
|
25
12
|
fullwidth?: boolean;
|
|
13
|
+
/** Tabs use the boxed style. */
|
|
26
14
|
boxed?: boolean;
|
|
15
|
+
/** Tabs use the toggle style. */
|
|
27
16
|
toggle?: boolean;
|
|
17
|
+
/** Tabs use the rounded toggle style (only with `toggle`). */
|
|
28
18
|
rounded?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Bulma color for tab underlines and active state (renders `is-<color>`).
|
|
21
|
+
*
|
|
22
|
+
* Bulma ships no tabs color CSS, so this prop has never had a visual effect
|
|
23
|
+
* for any value. Passing it logs a console warning in development.
|
|
24
|
+
* @deprecated No `.tabs.is-<color>` CSS exists; the prop renders unstyled
|
|
25
|
+
* and will be removed in the next major version.
|
|
26
|
+
*/
|
|
29
27
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
|
|
28
|
+
/** Controlled active tab index. */
|
|
30
29
|
value?: number;
|
|
30
|
+
/** Callback when active tab changes. */
|
|
31
31
|
onChange?: (index: number) => void;
|
|
32
|
+
/** Initial active tab index (uncontrolled). */
|
|
32
33
|
defaultValue?: number;
|
|
34
|
+
/** Renders tabs vertically. */
|
|
33
35
|
vertical?: boolean;
|
|
36
|
+
/** Side placement when `vertical` is true. */
|
|
34
37
|
side?: 'left' | 'right';
|
|
38
|
+
/** Makes tabs take up the full width equally. */
|
|
35
39
|
expanded?: boolean;
|
|
40
|
+
/** Additional CSS classes. */
|
|
36
41
|
className?: string;
|
|
42
|
+
/** Tab list and tab items. */
|
|
37
43
|
children?: React.ReactNode;
|
|
38
44
|
}
|
|
39
45
|
/**
|
|
40
46
|
* Props for the TabList component.
|
|
41
|
-
*
|
|
42
|
-
* @property {string} [className] - Additional CSS classes.
|
|
43
|
-
* @property {React.ReactNode} [children] - Tab elements.
|
|
44
47
|
*/
|
|
45
48
|
export interface TabListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
49
|
+
/** Additional CSS classes. */
|
|
46
50
|
className?: string;
|
|
51
|
+
/** Tab elements. */
|
|
47
52
|
children?: React.ReactNode;
|
|
48
53
|
}
|
|
49
54
|
/**
|
|
50
|
-
*
|
|
55
|
+
* The `<ul>` container for tab items.
|
|
51
56
|
*
|
|
52
57
|
* @function
|
|
53
58
|
* @param {TabListProps} props - Props for the TabList component.
|
|
@@ -57,26 +62,25 @@ export declare const TabList: React.FC<TabListProps>;
|
|
|
57
62
|
type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
|
|
58
63
|
/**
|
|
59
64
|
* Props for the Tab component.
|
|
60
|
-
*
|
|
61
|
-
* @property {number} index - The tab index for state management.
|
|
62
|
-
* @property {boolean} [disabled] - Whether the tab is disabled.
|
|
63
|
-
* @property {string} [icon] - Icon name to render before the label.
|
|
64
|
-
* @property {IconLibrary} [iconLibrary] - Icon library override (defaults to ConfigProvider value or 'fa').
|
|
65
|
-
* @property {string} [iconVariant] - Icon style variant (e.g., 'solid', 'outlined', 'rounded').
|
|
66
|
-
* @property {'small'|'medium'|'large'} [iconSize] - Icon size modifier. Default: 'small'.
|
|
67
|
-
* @property {string|string[]} [iconFeatures] - Additional icon library-specific modifiers.
|
|
68
|
-
* @property {string} [className] - Additional CSS classes.
|
|
69
|
-
* @property {React.ReactNode} [children] - Tab label content.
|
|
70
65
|
*/
|
|
71
66
|
export interface TabProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> {
|
|
67
|
+
/** **Required.** Tab index for matching with content. */
|
|
72
68
|
index: number;
|
|
69
|
+
/** Disables the tab. */
|
|
73
70
|
disabled?: boolean;
|
|
71
|
+
/** Icon name for the tab. */
|
|
74
72
|
icon?: string;
|
|
73
|
+
/** Icon library to use. */
|
|
75
74
|
iconLibrary?: IconLibrary;
|
|
75
|
+
/** Icon style variant (e.g., 'solid', 'outlined', 'rounded'). */
|
|
76
76
|
iconVariant?: string;
|
|
77
|
+
/** Size of the tab icon. */
|
|
77
78
|
iconSize?: 'small' | 'medium' | 'large';
|
|
79
|
+
/** Additional icon modifiers. */
|
|
78
80
|
iconFeatures?: string | string[];
|
|
81
|
+
/** Additional CSS classes. */
|
|
79
82
|
className?: string;
|
|
83
|
+
/** Tab label content. */
|
|
80
84
|
children?: React.ReactNode;
|
|
81
85
|
}
|
|
82
86
|
/**
|
|
@@ -90,20 +94,19 @@ export interface TabProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'o
|
|
|
90
94
|
export declare const Tab: React.FC<TabProps>;
|
|
91
95
|
/**
|
|
92
96
|
* Props for the TabItem component (backward-compatible).
|
|
93
|
-
*
|
|
94
|
-
* @property {boolean} [active] - Whether the tab is active.
|
|
95
|
-
* @property {string} [className] - Additional CSS classes.
|
|
96
|
-
* @property {React.ReactNode} [children] - Tab content.
|
|
97
|
-
* @property {React.MouseEventHandler<HTMLLIElement>} [onClick] - Click handler.
|
|
98
97
|
*/
|
|
99
98
|
export interface TabItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
|
|
99
|
+
/** Whether the tab is active. */
|
|
100
100
|
active?: boolean;
|
|
101
|
+
/** Additional CSS classes. */
|
|
101
102
|
className?: string;
|
|
103
|
+
/** Tab content. */
|
|
102
104
|
children?: React.ReactNode;
|
|
105
|
+
/** Click handler. */
|
|
103
106
|
onClick?: React.MouseEventHandler<HTMLLIElement>;
|
|
104
107
|
}
|
|
105
108
|
/**
|
|
106
|
-
*
|
|
109
|
+
* Each tab; accepts `active`, `onClick`, etc.
|
|
107
110
|
*
|
|
108
111
|
* @function
|
|
109
112
|
* @param {TabItemProps} props - Props for the TabItem component.
|
|
@@ -113,24 +116,22 @@ export interface TabItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
|
|
|
113
116
|
export declare const TabItem: React.FC<TabItemProps>;
|
|
114
117
|
/**
|
|
115
118
|
* Props for the TabsContent component.
|
|
116
|
-
*
|
|
117
|
-
* @property {string} [className] - Additional CSS classes.
|
|
118
|
-
* @property {React.ReactNode} [children] - TabContentItem elements.
|
|
119
119
|
*/
|
|
120
120
|
export interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
121
|
+
/** Additional CSS classes. */
|
|
121
122
|
className?: string;
|
|
123
|
+
/** TabContentItem elements. */
|
|
122
124
|
children?: React.ReactNode;
|
|
123
125
|
}
|
|
124
126
|
/**
|
|
125
127
|
* Props for the TabContentItem component.
|
|
126
|
-
*
|
|
127
|
-
* @property {number} index - The tab index this content panel corresponds to.
|
|
128
|
-
* @property {string} [className] - Additional CSS classes.
|
|
129
|
-
* @property {React.ReactNode} [children] - Panel content.
|
|
130
128
|
*/
|
|
131
129
|
export interface TabContentItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
130
|
+
/** **Required.** Tab index for matching with content. */
|
|
132
131
|
index: number;
|
|
132
|
+
/** Additional CSS classes. */
|
|
133
133
|
className?: string;
|
|
134
|
+
/** Panel content. */
|
|
134
135
|
children?: React.ReactNode;
|
|
135
136
|
}
|
|
136
137
|
/**
|
|
@@ -6,49 +6,47 @@ export type ToastType = 'default' | 'primary' | 'link' | 'info' | 'success' | 'w
|
|
|
6
6
|
export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
7
7
|
/**
|
|
8
8
|
* Props for the Toast component.
|
|
9
|
-
*
|
|
10
|
-
* @
|
|
11
|
-
* @property {ToastType} [type] - Colors the toast background. Default: 'default'.
|
|
12
|
-
* @property {ToastType} [actionType] - Colors the action button text.
|
|
13
|
-
* @property {ToastPosition} [position] - Position on the screen. Default: 'top-right'.
|
|
14
|
-
* @property {number} [duration] - Duration in ms before auto-close (0 disables). Default: 2000.
|
|
15
|
-
* @property {boolean} [indefinite] - Stay open until dismissed. Default: false.
|
|
16
|
-
* @property {boolean} [dismissible] - Click toast (or outside) to dismiss. Default: true.
|
|
17
|
-
* @property {boolean} [closable] - Show an explicit close (X) button. Default: false.
|
|
18
|
-
* @property {boolean} [rounded] - Pill-shaped toast. Default: false.
|
|
19
|
-
* @property {boolean} [pauseOnHover] - Pause auto-close timer on hover. Default: false.
|
|
20
|
-
* @property {boolean} [cancelable] - Whether the toast can be dismissed with Escape. Default: true.
|
|
21
|
-
* @property {string} [actionText] - Text for action button.
|
|
22
|
-
* @property {string} [cancelText] - Text for cancel button.
|
|
23
|
-
* @property {() => void} [onAction] - Callback when action button is clicked.
|
|
24
|
-
* @property {() => void} [onClose] - Callback when toast closes.
|
|
25
|
-
* @property {string | HTMLElement} [container] - Custom mount target (CSS selector string or HTMLElement).
|
|
26
|
-
* @property {boolean} [inline] - Render only the .toast element without portal/container wrapper. Default: false.
|
|
9
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
10
|
+
* @extraProp {React.Ref<HTMLDivElement>} [ref] - Ref forwarded to the toast element.
|
|
27
11
|
*/
|
|
28
12
|
export interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, Omit<BulmaClassesProps, 'color'> {
|
|
13
|
+
/** The message to display (required). */
|
|
29
14
|
message: string;
|
|
15
|
+
/** Color variant — colors the toast **background**. */
|
|
30
16
|
type?: ToastType;
|
|
17
|
+
/** Color variant — colors the **action button** text. */
|
|
31
18
|
actionType?: ToastType;
|
|
19
|
+
/** Position on the screen. Default: 'top-right'. */
|
|
32
20
|
position?: ToastPosition;
|
|
21
|
+
/** Duration in ms before auto-close. `0` disables auto-close. */
|
|
33
22
|
duration?: number;
|
|
23
|
+
/** Keeps the toast visible until dismissed. */
|
|
34
24
|
indefinite?: boolean;
|
|
25
|
+
/** Whether clicking the toast (or outside it) dismisses it. */
|
|
35
26
|
dismissible?: boolean;
|
|
27
|
+
/** Show an explicit close (X) button. Default: false. */
|
|
36
28
|
closable?: boolean;
|
|
29
|
+
/** Pill-shaped (rounded corners). */
|
|
37
30
|
rounded?: boolean;
|
|
31
|
+
/** Pause auto-close timer on hover. Default: false. */
|
|
38
32
|
pauseOnHover?: boolean;
|
|
33
|
+
/** Whether the toast can be dismissed with Escape. Default: true. */
|
|
39
34
|
cancelable?: boolean;
|
|
35
|
+
/** Text for an action button (e.g. "Undo"). */
|
|
40
36
|
actionText?: string;
|
|
37
|
+
/** Text for a cancel button. */
|
|
41
38
|
cancelText?: string;
|
|
39
|
+
/** Callback when the action button is clicked. */
|
|
42
40
|
onAction?: () => void;
|
|
41
|
+
/** Callback when toast closes. */
|
|
43
42
|
onClose?: () => void;
|
|
43
|
+
/** CSS selector or DOM node to mount the toast into. */
|
|
44
44
|
container?: string | HTMLElement;
|
|
45
|
+
/** Renders inline instead of using a portal. */
|
|
45
46
|
inline?: boolean;
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
|
-
* Toast component
|
|
49
|
-
*
|
|
50
|
-
* Appears at a configurable screen position with auto-close, pause-on-hover,
|
|
51
|
-
* keyboard dismiss, action/cancel buttons, and an optional explicit close button.
|
|
49
|
+
* The `Toast` component provides brief notification messages with optional action and cancel buttons.
|
|
52
50
|
*
|
|
53
51
|
* @function
|
|
54
52
|
* @param {ToastProps} props - Props for the Toast component.
|
|
@@ -66,23 +64,20 @@ export interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
66
64
|
export declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
65
|
/**
|
|
68
66
|
* Options for showing a programmatic toast. Extends ToastProps with a required message.
|
|
69
|
-
*
|
|
70
|
-
* @property {string} message - The message to display.
|
|
71
|
-
* @property {boolean} [queue] - When true, toasts enter a FIFO queue and display one at a time. Default: false.
|
|
72
67
|
*/
|
|
73
68
|
export interface ToastOptions extends Omit<ToastProps, 'message'> {
|
|
69
|
+
/** The message to display. */
|
|
74
70
|
message: string;
|
|
75
71
|
/** When true, toasts enter a FIFO queue and display one at a time. Default false. */
|
|
76
72
|
queue?: boolean;
|
|
77
73
|
}
|
|
78
74
|
/**
|
|
79
75
|
* Internal representation of a toast instance.
|
|
80
|
-
*
|
|
81
|
-
* @property {string} id - Unique identifier for this toast.
|
|
82
|
-
* @property {ToastOptions} props - Configuration options for the toast.
|
|
83
76
|
*/
|
|
84
77
|
export interface ToastInstance {
|
|
78
|
+
/** Unique identifier for this toast. */
|
|
85
79
|
id: string;
|
|
80
|
+
/** Configuration options for the toast. */
|
|
86
81
|
props: ToastOptions;
|
|
87
82
|
}
|
|
88
83
|
/**
|
|
@@ -8,43 +8,39 @@ export type TooltipColor = 'primary' | 'link' | 'info' | 'success' | 'warning' |
|
|
|
8
8
|
export type TooltipSize = 'small' | 'medium' | 'large';
|
|
9
9
|
/**
|
|
10
10
|
* Props for the Tooltip component.
|
|
11
|
-
*
|
|
12
|
-
* @
|
|
13
|
-
* @property {React.ReactNode} [content] - Custom rich content for the tooltip (takes precedence over label).
|
|
14
|
-
* @property {TooltipPosition} [position] - Position of the tooltip. Default: 'top'.
|
|
15
|
-
* @property {TooltipColor} [color] - Color variant for the tooltip.
|
|
16
|
-
* @property {TooltipSize} [size] - Size variant for the tooltip ('small', 'medium', 'large').
|
|
17
|
-
* @property {boolean} [active] - Force tooltip to be always visible.
|
|
18
|
-
* @property {boolean} [multiline] - Allow tooltip to wrap to multiple lines.
|
|
19
|
-
* @property {boolean} [animated] - Enable fade animation. Default: true.
|
|
20
|
-
* @property {boolean} [square] - Use square corners instead of rounded.
|
|
21
|
-
* @property {boolean} [dashed] - Show dashed underline on trigger.
|
|
22
|
-
* @property {number} [delay] - Delay before showing tooltip (ms).
|
|
23
|
-
* @property {number} [closeDelay] - Delay before hiding tooltip after mouse leave (ms).
|
|
24
|
-
* @property {React.ReactNode} [children] - The element that triggers the tooltip.
|
|
25
|
-
* @property {string} [className] - Additional CSS classes.
|
|
26
|
-
* @property {string} [tooltipClassName] - Additional classes for the tooltip element.
|
|
11
|
+
* @extraProp {React.ReactNode} [children] - The element that triggers the tooltip.
|
|
12
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
27
13
|
*/
|
|
28
14
|
export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color' | 'content'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
15
|
+
/** The tooltip text content. */
|
|
29
16
|
label?: string;
|
|
17
|
+
/** Rich tooltip content (alternative to `label`). */
|
|
30
18
|
content?: React.ReactNode;
|
|
19
|
+
/** Position of the tooltip. Default: 'top'. */
|
|
31
20
|
position?: TooltipPosition;
|
|
21
|
+
/** Color variant for the tooltip. */
|
|
32
22
|
color?: TooltipColor;
|
|
23
|
+
/** Size of the tooltip. */
|
|
33
24
|
size?: TooltipSize;
|
|
25
|
+
/** Force tooltip to be always visible. */
|
|
34
26
|
active?: boolean;
|
|
27
|
+
/** Allow tooltip to wrap to multiple lines. */
|
|
35
28
|
multiline?: boolean;
|
|
29
|
+
/** Enable fade animation. Default: true. */
|
|
36
30
|
animated?: boolean;
|
|
31
|
+
/** Use square corners instead of rounded. */
|
|
37
32
|
square?: boolean;
|
|
33
|
+
/** Show dashed underline on trigger. */
|
|
38
34
|
dashed?: boolean;
|
|
35
|
+
/** Delay before showing tooltip (ms). */
|
|
39
36
|
delay?: number;
|
|
37
|
+
/** Delay in ms before hiding the tooltip. */
|
|
40
38
|
closeDelay?: number;
|
|
39
|
+
/** Additional classes for the tooltip element. */
|
|
41
40
|
tooltipClassName?: string;
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
|
-
* Tooltip component
|
|
45
|
-
*
|
|
46
|
-
* Shows a small popup with text when the user hovers over or focuses
|
|
47
|
-
* on the wrapped element. Supports multiple positions and color variants.
|
|
43
|
+
* The `Tooltip` component displays helpful information when users hover over or focus on an element.
|
|
48
44
|
*
|
|
49
45
|
* @function
|
|
50
46
|
* @param {TooltipProps} props - Props for the Tooltip component.
|
|
@@ -2,25 +2,26 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Block component.
|
|
5
|
-
*
|
|
6
|
-
* @property {string} [className] - Additional CSS classes to apply.
|
|
7
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color (Bulma color, 'inherit', or 'current').
|
|
8
|
-
* @property {'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'} [color] - Bulma color modifier for the block.
|
|
9
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
10
|
-
* @property {React.ReactNode} [children] - Content to be rendered inside the block.
|
|
11
5
|
*/
|
|
12
6
|
export interface BlockProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
13
8
|
className?: string;
|
|
9
|
+
/** Text color helper. */
|
|
14
10
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
11
|
+
/**
|
|
12
|
+
* Text color alias: renders `has-text-<color>`, exactly like `textColor`.
|
|
13
|
+
* Not a filled variant (no `.block.is-<color>` CSS exists). Prefer
|
|
14
|
+
* `textColor`, which takes precedence when both are set; use `bgColor` for
|
|
15
|
+
* a colored surface.
|
|
16
|
+
*/
|
|
15
17
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
18
|
+
/** Background color helper. */
|
|
16
19
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
20
|
+
/** Content to render inside the block. */
|
|
17
21
|
children?: React.ReactNode;
|
|
18
22
|
}
|
|
19
23
|
/**
|
|
20
|
-
* Block component
|
|
21
|
-
*
|
|
22
|
-
* A block is a simple utility element that adds spacing (margin-bottom) between elements.
|
|
23
|
-
* Supports Bulma helper classes for additional styling like text color, background color, and layout.
|
|
24
|
+
* The `Block` component renders a simple container with Bulma's `.block` class, adding vertical margin between sections of content.
|
|
24
25
|
*
|
|
25
26
|
* @function
|
|
26
27
|
* @param {BlockProps} props - Props for the Block component.
|
|
@@ -2,28 +2,30 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Box component.
|
|
5
|
-
*
|
|
6
|
-
* @property {string} [className] - Additional CSS classes to apply.
|
|
7
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color (Bulma color, 'inherit', or 'current').
|
|
8
|
-
* @property {'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'} [color] - Bulma color modifier for the box.
|
|
9
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
10
|
-
* @property {boolean} [hasShadow=true] - Whether the box has a shadow (default: true).
|
|
11
|
-
* @property {React.ReactNode} [children] - Content to be rendered inside the box.
|
|
12
5
|
*/
|
|
13
6
|
export interface BoxProps
|
|
14
7
|
/** @ignore */
|
|
15
8
|
extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
9
|
+
/** Additional CSS classes to apply. */
|
|
16
10
|
className?: string;
|
|
11
|
+
/** Text color helper. */
|
|
17
12
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
13
|
+
/**
|
|
14
|
+
* Text color alias: renders `has-text-<color>`, exactly like `textColor`.
|
|
15
|
+
* Not a filled box variant (no `.box.is-<color>` CSS exists). Prefer
|
|
16
|
+
* `textColor`, which takes precedence when both are set; use `bgColor` for
|
|
17
|
+
* a colored surface.
|
|
18
|
+
*/
|
|
18
19
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
20
|
+
/** Background color helper. */
|
|
19
21
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
22
|
+
/** Whether the box has a shadow (default: true). */
|
|
20
23
|
hasShadow?: boolean;
|
|
24
|
+
/** Content to render inside the box. */
|
|
21
25
|
children?: React.ReactNode;
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
|
-
* Box component
|
|
25
|
-
*
|
|
26
|
-
* Supports Bulma helper classes for styling and layout, with optional shadow control.
|
|
28
|
+
* The `Box` component renders a bordered, padded container with an optional shadow using Bulma's `.box` class.
|
|
27
29
|
*
|
|
28
30
|
* @function
|
|
29
31
|
* @param {BoxProps} props - Props for the Box component.
|