@allxsmith/bestax-bulma 5.7.0 → 5.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +28 -0
- package/CLAUDE.md +28 -0
- package/README.md +24 -0
- package/dist/index.cjs.js +3485 -55
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3485 -55
- package/dist/index.esm.js.map +1 -1
- package/dist/types/columns/Column.d.ts +38 -0
- package/dist/types/columns/Columns.d.ts +31 -0
- package/dist/types/components/Avatar.d.ts +32 -0
- package/dist/types/components/Avatars.d.ts +12 -0
- package/dist/types/components/Badge.d.ts +34 -0
- package/dist/types/components/Breadcrumb.d.ts +25 -0
- package/dist/types/components/Card.d.ts +60 -0
- package/dist/types/components/Carousel.d.ts +70 -0
- package/dist/types/components/Collapse.d.ts +52 -0
- package/dist/types/components/Dialog.d.ts +89 -0
- package/dist/types/components/Dropdown.d.ts +42 -0
- package/dist/types/components/Loading.d.ts +50 -0
- package/dist/types/components/Menu.d.ts +44 -0
- package/dist/types/components/Message.d.ts +20 -0
- package/dist/types/components/Modal.d.ts +50 -0
- package/dist/types/components/Navbar.d.ts +147 -0
- package/dist/types/components/Pagination.d.ts +81 -0
- package/dist/types/components/Panel.d.ts +93 -0
- package/dist/types/components/Reveal.d.ts +37 -0
- package/dist/types/components/Sidebar.d.ts +37 -0
- package/dist/types/components/Steps.d.ts +56 -0
- package/dist/types/components/Tabs.d.ts +90 -0
- package/dist/types/components/Toast.d.ts +104 -0
- package/dist/types/components/Tooltip.d.ts +46 -0
- package/dist/types/elements/Block.d.ts +21 -0
- package/dist/types/elements/Box.d.ts +25 -1
- package/dist/types/elements/Button.d.ts +33 -0
- package/dist/types/elements/Buttons.d.ts +16 -0
- package/dist/types/elements/Code.d.ts +14 -0
- package/dist/types/elements/Content.d.ts +22 -0
- package/dist/types/elements/Delete.d.ts +24 -0
- package/dist/types/elements/Divider.d.ts +12 -0
- package/dist/types/elements/Emphasis.d.ts +14 -0
- package/dist/types/elements/Figure.d.ts +23 -0
- package/dist/types/elements/Icon.d.ts +28 -0
- package/dist/types/elements/IconText.d.ts +20 -0
- package/dist/types/elements/Image.d.ts +27 -0
- package/dist/types/elements/Link.d.ts +20 -0
- package/dist/types/elements/LinkButton.d.ts +20 -0
- package/dist/types/elements/ListItem.d.ts +15 -0
- package/dist/types/elements/Notification.d.ts +110 -0
- package/dist/types/elements/OrderedList.d.ts +10 -0
- package/dist/types/elements/Paragraph.d.ts +14 -0
- package/dist/types/elements/Pre.d.ts +14 -0
- package/dist/types/elements/Progress.d.ts +26 -0
- package/dist/types/elements/Skeleton.d.ts +22 -0
- package/dist/types/elements/Span.d.ts +14 -0
- package/dist/types/elements/Strong.d.ts +14 -0
- package/dist/types/elements/SubTitle.d.ts +25 -0
- package/dist/types/elements/Table.d.ts +14 -0
- package/dist/types/elements/Tag.d.ts +25 -0
- package/dist/types/elements/Tags.d.ts +7 -0
- package/dist/types/elements/Tbody.d.ts +18 -0
- package/dist/types/elements/Td.d.ts +23 -0
- package/dist/types/elements/Tfoot.d.ts +18 -0
- package/dist/types/elements/Th.d.ts +24 -0
- package/dist/types/elements/Thead.d.ts +18 -0
- package/dist/types/elements/Title.d.ts +26 -0
- package/dist/types/elements/Tr.d.ts +20 -0
- package/dist/types/elements/UnorderedList.d.ts +7 -0
- package/dist/types/form/Autocomplete.d.ts +64 -0
- package/dist/types/form/Checkbox.d.ts +33 -0
- package/dist/types/form/Checkboxes.d.ts +9 -0
- package/dist/types/form/Control.d.ts +37 -0
- package/dist/types/form/DateInput.d.ts +44 -0
- package/dist/types/form/DateInputBase.d.ts +49 -0
- package/dist/types/form/DateTimeInput.d.ts +42 -0
- package/dist/types/form/DateTimeInputBase.d.ts +58 -0
- package/dist/types/form/Field.d.ts +52 -0
- package/dist/types/form/File.d.ts +24 -0
- package/dist/types/form/FormContext.d.ts +46 -0
- package/dist/types/form/Input.d.ts +45 -0
- package/dist/types/form/InputBase.d.ts +21 -0
- package/dist/types/form/Numberinput.d.ts +43 -0
- package/dist/types/form/Radio.d.ts +33 -0
- package/dist/types/form/Radios.d.ts +9 -0
- package/dist/types/form/Rate.d.ts +55 -0
- package/dist/types/form/Select.d.ts +35 -0
- package/dist/types/form/SelectBase.d.ts +24 -0
- package/dist/types/form/Slider.d.ts +86 -0
- package/dist/types/form/Switch.d.ts +50 -0
- package/dist/types/form/Taginput.d.ts +74 -0
- package/dist/types/form/TextArea.d.ts +34 -0
- package/dist/types/form/TextAreaBase.d.ts +24 -0
- package/dist/types/form/TimeInput.d.ts +40 -0
- package/dist/types/form/TimeInputBase.d.ts +51 -0
- package/dist/types/form/_pickerInternals/Calendar.d.ts +6 -0
- package/dist/types/form/_pickerInternals/TimeWheels.d.ts +13 -0
- package/dist/types/form/_pickerInternals/audioTick.d.ts +47 -0
- package/dist/types/form/_pickerInternals/dateUtils.d.ts +13 -0
- package/dist/types/form/_pickerInternals/formatters.d.ts +19 -0
- package/dist/types/form/_pickerInternals/haptics.d.ts +23 -0
- package/dist/types/form/_pickerInternals/pickerTypes.d.ts +8 -0
- package/dist/types/form/_pickerInternals/segmentMap.d.ts +48 -0
- package/dist/types/form/_pickerInternals/useNativeMobilePicker.d.ts +1 -0
- package/dist/types/form/_pickerInternals/useSegmentedEntry.d.ts +30 -0
- package/dist/types/form/fieldProps.d.ts +12 -0
- package/dist/types/grid/Cell.d.ts +25 -0
- package/dist/types/grid/Grid.d.ts +32 -0
- package/dist/types/helpers/Config.d.ts +50 -0
- package/dist/types/helpers/Theme.d.ts +66 -0
- package/dist/types/helpers/bulmaClassHelpers.d.ts +97 -0
- package/dist/types/helpers/classNames.d.ts +50 -0
- package/dist/types/helpers/colorDeprecations.d.ts +17 -0
- package/dist/types/helpers/useBulmaClasses.d.ts +22 -0
- package/dist/types/helpers/useColorClasses.d.ts +20 -0
- package/dist/types/helpers/useFlexboxClasses.d.ts +34 -0
- package/dist/types/helpers/useOtherClasses.d.ts +27 -0
- package/dist/types/helpers/useSpacingClasses.d.ts +27 -0
- package/dist/types/helpers/useTypographyClasses.d.ts +32 -0
- package/dist/types/helpers/useVisibilityClasses.d.ts +25 -0
- package/dist/types/helpers/withSubComponents.d.ts +13 -0
- package/dist/types/layout/Container.d.ts +29 -0
- package/dist/types/layout/Footer.d.ts +22 -0
- package/dist/types/layout/Hero.d.ts +67 -0
- package/dist/types/layout/Level.d.ts +60 -0
- package/dist/types/layout/Media.d.ts +56 -0
- package/dist/types/layout/Section.d.ts +20 -0
- package/dist/types/skill-examples/ExampleMeta.d.ts +5 -0
- package/dist/types/skill-examples/ProfileCard.d.ts +13 -0
- package/llms.txt +9 -0
- package/package.json +30 -28
|
@@ -1,43 +1,99 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
|
+
/** Available size modifiers for the Steps component. */
|
|
3
4
|
export type StepsSize = 'small' | 'medium' | 'large';
|
|
5
|
+
/** Available color variants for the Steps component. */
|
|
4
6
|
export type StepsColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
7
|
+
/**
|
|
8
|
+
* Props for individual Step items.
|
|
9
|
+
*/
|
|
5
10
|
export interface StepItemProps {
|
|
11
|
+
/** Step label/title */
|
|
6
12
|
label?: React.ReactNode;
|
|
13
|
+
/** Icon for the step marker */
|
|
7
14
|
icon?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Icon shown when the step is completed.
|
|
17
|
+
* @defaultValue '✓'
|
|
18
|
+
*/
|
|
8
19
|
completedIcon?: React.ReactNode;
|
|
20
|
+
/** Whether this step is clickable */
|
|
9
21
|
clickable?: boolean;
|
|
22
|
+
/** Additional CSS classes. */
|
|
10
23
|
className?: string;
|
|
11
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Props for the Steps component.
|
|
27
|
+
* @extraProp {React.ReactNode} [children] - Step children (alternative to items).
|
|
28
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
29
|
+
*/
|
|
12
30
|
export interface StepsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
|
|
31
|
+
/** Current active step (0-indexed). */
|
|
13
32
|
value?: number;
|
|
33
|
+
/** Array of step items. */
|
|
14
34
|
items?: StepItemProps[];
|
|
35
|
+
/** Size of the steps. */
|
|
15
36
|
size?: StepsSize;
|
|
37
|
+
/** Color variant. */
|
|
16
38
|
color?: StepsColor;
|
|
39
|
+
/** Show step markers. Default: true. */
|
|
17
40
|
hasMarker?: boolean;
|
|
41
|
+
/** Enable animations. Default: true. */
|
|
18
42
|
animated?: boolean;
|
|
43
|
+
/** Use rounded markers. Default: true. */
|
|
19
44
|
rounded?: boolean;
|
|
45
|
+
/** Vertical layout. */
|
|
20
46
|
vertical?: boolean;
|
|
47
|
+
/** Position of labels. */
|
|
21
48
|
labelPosition?: 'bottom' | 'right' | 'left';
|
|
49
|
+
/** Mobile display mode. */
|
|
22
50
|
mobileMode?: 'minimal' | 'compact' | 'right';
|
|
51
|
+
/** Displays step numbers in the markers. */
|
|
23
52
|
showStepNumbers?: boolean;
|
|
53
|
+
/** Shows previous/next navigation buttons. */
|
|
24
54
|
hasNavigation?: boolean;
|
|
55
|
+
/** Label for the previous button. */
|
|
25
56
|
prevLabel?: string;
|
|
57
|
+
/** Label for the next button. */
|
|
26
58
|
nextLabel?: string;
|
|
59
|
+
/** Callback when previous button is clicked. */
|
|
27
60
|
onPrev?: () => void;
|
|
61
|
+
/** Callback when next button is clicked. */
|
|
28
62
|
onNext?: () => void;
|
|
63
|
+
/** Callback when a step is clicked. */
|
|
29
64
|
onStepClick?: (step: number) => void;
|
|
30
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Props for the Step subcomponent.
|
|
68
|
+
*/
|
|
31
69
|
export interface StepProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
70
|
+
/** Whether this step is active */
|
|
32
71
|
isActive?: boolean;
|
|
72
|
+
/** Whether this step is completed */
|
|
33
73
|
isCompleted?: boolean;
|
|
74
|
+
/** Step label/title */
|
|
34
75
|
label?: React.ReactNode;
|
|
76
|
+
/** Icon for the step marker */
|
|
35
77
|
icon?: React.ReactNode;
|
|
78
|
+
/** Whether this step is clickable */
|
|
36
79
|
clickable?: boolean;
|
|
80
|
+
/** Click handler */
|
|
37
81
|
onClick?: () => void;
|
|
82
|
+
/** Step number to display in marker (1-indexed) */
|
|
38
83
|
stepNumber?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Icon shown when the step is completed.
|
|
86
|
+
* @defaultValue '✓'
|
|
87
|
+
*/
|
|
39
88
|
completedIcon?: React.ReactNode;
|
|
40
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Individual Step component for use inside Steps.
|
|
92
|
+
*
|
|
93
|
+
* @function
|
|
94
|
+
* @param {StepProps} props - Props for the Step component.
|
|
95
|
+
* @returns {JSX.Element} The rendered step segment.
|
|
96
|
+
*/
|
|
41
97
|
export declare const Step: React.FC<StepProps>;
|
|
42
98
|
export declare const Steps: React.FC<StepsProps> & {
|
|
43
99
|
Step: React.FC<StepProps>;
|
|
@@ -1,56 +1,146 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Tabs component.
|
|
5
|
+
*/
|
|
3
6
|
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Tab alignment. */
|
|
4
8
|
align?: 'centered' | 'right' | 'left';
|
|
9
|
+
/** Tab size. */
|
|
5
10
|
size?: 'small' | 'medium' | 'large';
|
|
11
|
+
/** Tabs expand to fill the horizontal space. */
|
|
6
12
|
fullwidth?: boolean;
|
|
13
|
+
/** Tabs use the boxed style. */
|
|
7
14
|
boxed?: boolean;
|
|
15
|
+
/** Tabs use the toggle style. */
|
|
8
16
|
toggle?: boolean;
|
|
17
|
+
/** Tabs use the rounded toggle style (only with `toggle`). */
|
|
9
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
|
+
*/
|
|
10
27
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white';
|
|
28
|
+
/** Controlled active tab index. */
|
|
11
29
|
value?: number;
|
|
30
|
+
/** Callback when active tab changes. */
|
|
12
31
|
onChange?: (index: number) => void;
|
|
32
|
+
/** Initial active tab index (uncontrolled). */
|
|
13
33
|
defaultValue?: number;
|
|
34
|
+
/** Renders tabs vertically. */
|
|
14
35
|
vertical?: boolean;
|
|
36
|
+
/** Side placement when `vertical` is true. */
|
|
15
37
|
side?: 'left' | 'right';
|
|
38
|
+
/** Makes tabs take up the full width equally. */
|
|
16
39
|
expanded?: boolean;
|
|
40
|
+
/** Additional CSS classes. */
|
|
17
41
|
className?: string;
|
|
42
|
+
/** Tab list and tab items. */
|
|
18
43
|
children?: React.ReactNode;
|
|
19
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Props for the TabList component.
|
|
47
|
+
*/
|
|
20
48
|
export interface TabListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
49
|
+
/** Additional CSS classes. */
|
|
21
50
|
className?: string;
|
|
51
|
+
/** Tab elements. */
|
|
22
52
|
children?: React.ReactNode;
|
|
23
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* The `<ul>` container for tab items.
|
|
56
|
+
*
|
|
57
|
+
* @function
|
|
58
|
+
* @param {TabListProps} props - Props for the TabList component.
|
|
59
|
+
* @returns {JSX.Element} The rendered tab list.
|
|
60
|
+
*/
|
|
24
61
|
export declare const TabList: React.FC<TabListProps>;
|
|
25
62
|
type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
|
|
63
|
+
/**
|
|
64
|
+
* Props for the Tab component.
|
|
65
|
+
*/
|
|
26
66
|
export interface TabProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> {
|
|
67
|
+
/** **Required.** Tab index for matching with content. */
|
|
27
68
|
index: number;
|
|
69
|
+
/** Disables the tab. */
|
|
28
70
|
disabled?: boolean;
|
|
71
|
+
/** Icon name for the tab. */
|
|
29
72
|
icon?: string;
|
|
73
|
+
/** Icon library to use. */
|
|
30
74
|
iconLibrary?: IconLibrary;
|
|
75
|
+
/** Icon style variant (e.g., 'solid', 'outlined', 'rounded'). */
|
|
31
76
|
iconVariant?: string;
|
|
77
|
+
/** Size of the tab icon. */
|
|
32
78
|
iconSize?: 'small' | 'medium' | 'large';
|
|
79
|
+
/** Additional icon modifiers. */
|
|
33
80
|
iconFeatures?: string | string[];
|
|
81
|
+
/** Additional CSS classes. */
|
|
34
82
|
className?: string;
|
|
83
|
+
/** Tab label content. */
|
|
35
84
|
children?: React.ReactNode;
|
|
36
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Individual tab button. Consumes Tabs context for active state management.
|
|
88
|
+
* Renders `<a>` internally — consumers provide only the label text/children.
|
|
89
|
+
*
|
|
90
|
+
* @function
|
|
91
|
+
* @param {TabProps} props - Props for the Tab component.
|
|
92
|
+
* @returns {JSX.Element} The rendered tab.
|
|
93
|
+
*/
|
|
37
94
|
export declare const Tab: React.FC<TabProps>;
|
|
95
|
+
/**
|
|
96
|
+
* Props for the TabItem component (backward-compatible).
|
|
97
|
+
*/
|
|
38
98
|
export interface TabItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
|
|
99
|
+
/** Whether the tab is active. */
|
|
39
100
|
active?: boolean;
|
|
101
|
+
/** Additional CSS classes. */
|
|
40
102
|
className?: string;
|
|
103
|
+
/** Tab content. */
|
|
41
104
|
children?: React.ReactNode;
|
|
105
|
+
/** Click handler. */
|
|
42
106
|
onClick?: React.MouseEventHandler<HTMLLIElement>;
|
|
43
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Each tab; accepts `active`, `onClick`, etc.
|
|
110
|
+
*
|
|
111
|
+
* @function
|
|
112
|
+
* @param {TabItemProps} props - Props for the TabItem component.
|
|
113
|
+
* @returns {JSX.Element} The rendered tab item.
|
|
114
|
+
* @deprecated Use `Tabs.Tab` with an `index` prop instead.
|
|
115
|
+
*/
|
|
44
116
|
export declare const TabItem: React.FC<TabItemProps>;
|
|
117
|
+
/**
|
|
118
|
+
* Props for the TabsContent component.
|
|
119
|
+
*/
|
|
45
120
|
export interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
121
|
+
/** Additional CSS classes. */
|
|
46
122
|
className?: string;
|
|
123
|
+
/** TabContentItem elements. */
|
|
47
124
|
children?: React.ReactNode;
|
|
48
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Props for the TabContentItem component.
|
|
128
|
+
*/
|
|
49
129
|
export interface TabContentItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
130
|
+
/** **Required.** Tab index for matching with content. */
|
|
50
131
|
index: number;
|
|
132
|
+
/** Additional CSS classes. */
|
|
51
133
|
className?: string;
|
|
134
|
+
/** Panel content. */
|
|
52
135
|
children?: React.ReactNode;
|
|
53
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Individual content panel. Shows/hides based on active tab from context.
|
|
139
|
+
*
|
|
140
|
+
* @function
|
|
141
|
+
* @param {TabContentItemProps} props - Props for the TabContentItem component.
|
|
142
|
+
* @returns {JSX.Element} The rendered tab content panel.
|
|
143
|
+
*/
|
|
54
144
|
export declare const TabContentItem: React.FC<TabContentItemProps>;
|
|
55
145
|
export declare const TabsContent: React.FC<TabsContentProps> & {
|
|
56
146
|
Item: React.FC<TabContentItemProps>;
|
|
@@ -1,45 +1,149 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
|
+
/** Color/style type presets for toast messages. */
|
|
3
4
|
export type ToastType = 'default' | 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
5
|
+
/** Screen positions where toasts can be displayed. */
|
|
4
6
|
export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
7
|
+
/**
|
|
8
|
+
* Props for the Toast component.
|
|
9
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
10
|
+
* @extraProp {React.Ref<HTMLDivElement>} [ref] - Ref forwarded to the toast element.
|
|
11
|
+
*/
|
|
5
12
|
export interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, Omit<BulmaClassesProps, 'color'> {
|
|
13
|
+
/** The message to display (required). */
|
|
6
14
|
message: string;
|
|
15
|
+
/** Color variant — colors the toast **background**. */
|
|
7
16
|
type?: ToastType;
|
|
17
|
+
/** Color variant — colors the **action button** text. */
|
|
8
18
|
actionType?: ToastType;
|
|
19
|
+
/** Position on the screen. Default: 'top-right'. */
|
|
9
20
|
position?: ToastPosition;
|
|
21
|
+
/** Duration in ms before auto-close. `0` disables auto-close. */
|
|
10
22
|
duration?: number;
|
|
23
|
+
/** Keeps the toast visible until dismissed. */
|
|
11
24
|
indefinite?: boolean;
|
|
25
|
+
/** Whether clicking the toast (or outside it) dismisses it. */
|
|
12
26
|
dismissible?: boolean;
|
|
27
|
+
/** Show an explicit close (X) button. Default: false. */
|
|
13
28
|
closable?: boolean;
|
|
29
|
+
/** Pill-shaped (rounded corners). */
|
|
14
30
|
rounded?: boolean;
|
|
31
|
+
/** Pause auto-close timer on hover. Default: false. */
|
|
15
32
|
pauseOnHover?: boolean;
|
|
33
|
+
/** Whether the toast can be dismissed with Escape. Default: true. */
|
|
16
34
|
cancelable?: boolean;
|
|
35
|
+
/** Text for an action button (e.g. "Undo"). */
|
|
17
36
|
actionText?: string;
|
|
37
|
+
/** Text for a cancel button. */
|
|
18
38
|
cancelText?: string;
|
|
39
|
+
/** Callback when the action button is clicked. */
|
|
19
40
|
onAction?: () => void;
|
|
41
|
+
/** Callback when toast closes. */
|
|
20
42
|
onClose?: () => void;
|
|
43
|
+
/** CSS selector or DOM node to mount the toast into. */
|
|
21
44
|
container?: string | HTMLElement;
|
|
45
|
+
/** Renders inline instead of using a portal. */
|
|
22
46
|
inline?: boolean;
|
|
23
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* The `Toast` component provides brief notification messages with optional action and cancel buttons.
|
|
50
|
+
*
|
|
51
|
+
* @function
|
|
52
|
+
* @param {ToastProps} props - Props for the Toast component.
|
|
53
|
+
* @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the toast element.
|
|
54
|
+
* @returns {JSX.Element | null} The rendered toast component.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* // Basic toast
|
|
58
|
+
* <Toast message="Operation successful!" type="success" />
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* // Toast with action button
|
|
62
|
+
* <Toast message="Item deleted" actionText="Undo" onAction={handleUndo} />
|
|
63
|
+
*/
|
|
24
64
|
export declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
/**
|
|
66
|
+
* Options for showing a programmatic toast. Extends ToastProps with a required message.
|
|
67
|
+
*/
|
|
25
68
|
export interface ToastOptions extends Omit<ToastProps, 'message'> {
|
|
69
|
+
/** The message to display. */
|
|
26
70
|
message: string;
|
|
71
|
+
/** When true, toasts enter a FIFO queue and display one at a time. Default false. */
|
|
27
72
|
queue?: boolean;
|
|
28
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Internal representation of a toast instance.
|
|
76
|
+
*/
|
|
29
77
|
export interface ToastInstance {
|
|
78
|
+
/** Unique identifier for this toast. */
|
|
30
79
|
id: string;
|
|
80
|
+
/** Configuration options for the toast. */
|
|
31
81
|
props: ToastOptions;
|
|
32
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Programmatic toast API for showing, closing, and managing toasts.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* toast.success('Saved!');
|
|
88
|
+
* toast.show({ message: 'Item deleted', actionText: 'Undo', onAction: handleUndo });
|
|
89
|
+
*/
|
|
33
90
|
export declare const toast: {
|
|
91
|
+
/**
|
|
92
|
+
* Show a toast with the given options.
|
|
93
|
+
* @param {ToastOptions} options - Toast configuration.
|
|
94
|
+
* @returns {string} The unique ID of the created toast.
|
|
95
|
+
*/
|
|
34
96
|
show: (options: ToastOptions) => string;
|
|
97
|
+
/**
|
|
98
|
+
* Show a success toast.
|
|
99
|
+
* @param {string} message - The message to display.
|
|
100
|
+
* @param {Partial<ToastOptions>} [options] - Additional options.
|
|
101
|
+
* @returns {string} The toast ID.
|
|
102
|
+
*/
|
|
35
103
|
success: (message: string, options?: Partial<ToastOptions>) => string;
|
|
104
|
+
/**
|
|
105
|
+
* Show a danger toast.
|
|
106
|
+
* @param {string} message - The message to display.
|
|
107
|
+
* @param {Partial<ToastOptions>} [options] - Additional options.
|
|
108
|
+
* @returns {string} The toast ID.
|
|
109
|
+
*/
|
|
36
110
|
danger: (message: string, options?: Partial<ToastOptions>) => string;
|
|
111
|
+
/**
|
|
112
|
+
* Show a warning toast.
|
|
113
|
+
* @param {string} message - The message to display.
|
|
114
|
+
* @param {Partial<ToastOptions>} [options] - Additional options.
|
|
115
|
+
* @returns {string} The toast ID.
|
|
116
|
+
*/
|
|
37
117
|
warning: (message: string, options?: Partial<ToastOptions>) => string;
|
|
118
|
+
/**
|
|
119
|
+
* Show an info toast.
|
|
120
|
+
* @param {string} message - The message to display.
|
|
121
|
+
* @param {Partial<ToastOptions>} [options] - Additional options.
|
|
122
|
+
* @returns {string} The toast ID.
|
|
123
|
+
*/
|
|
38
124
|
info: (message: string, options?: Partial<ToastOptions>) => string;
|
|
125
|
+
/**
|
|
126
|
+
* Close a specific toast by ID.
|
|
127
|
+
* @param {string} id - The toast ID to close.
|
|
128
|
+
*/
|
|
39
129
|
close: (id: string) => void;
|
|
130
|
+
/** Close all toasts and clear the queue. */
|
|
40
131
|
closeAll: () => void;
|
|
132
|
+
/**
|
|
133
|
+
* Subscribe to toast state changes.
|
|
134
|
+
* @param {(toasts: ToastInstance[]) => void} listener - Callback invoked on changes.
|
|
135
|
+
* @returns {() => void} Unsubscribe function.
|
|
136
|
+
*/
|
|
41
137
|
subscribe: (listener: (toasts: ToastInstance[]) => void) => (() => void);
|
|
42
138
|
};
|
|
139
|
+
/**
|
|
140
|
+
* Container component for rendering programmatic toasts.
|
|
141
|
+
* Place once at your app root to enable the toast API.
|
|
142
|
+
*
|
|
143
|
+
* @function
|
|
144
|
+
* @param {{ position?: ToastPosition }} props - Container props.
|
|
145
|
+
* @returns {JSX.Element | null} The rendered toast container, or null if empty.
|
|
146
|
+
*/
|
|
43
147
|
export declare const ToastContainer: React.FC<{
|
|
44
148
|
position?: ToastPosition;
|
|
45
149
|
}>;
|
|
@@ -1,22 +1,68 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps } from '../helpers/useBulmaClasses';
|
|
3
|
+
/** Screen positions for the tooltip. */
|
|
3
4
|
export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
|
5
|
+
/** Color variants for the tooltip. */
|
|
4
6
|
export type TooltipColor = 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'dark' | 'light';
|
|
7
|
+
/** Size variants for the tooltip. */
|
|
5
8
|
export type TooltipSize = 'small' | 'medium' | 'large';
|
|
9
|
+
/**
|
|
10
|
+
* Props for the Tooltip component.
|
|
11
|
+
* @extraProp {React.ReactNode} [children] - The element that triggers the tooltip.
|
|
12
|
+
* @extraProp {string} [className] - Additional CSS classes.
|
|
13
|
+
*/
|
|
6
14
|
export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color' | 'content'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
15
|
+
/** The tooltip text content. */
|
|
7
16
|
label?: string;
|
|
17
|
+
/** Rich tooltip content (alternative to `label`). */
|
|
8
18
|
content?: React.ReactNode;
|
|
19
|
+
/** Position of the tooltip. Default: 'top'. */
|
|
9
20
|
position?: TooltipPosition;
|
|
21
|
+
/** Color variant for the tooltip. */
|
|
10
22
|
color?: TooltipColor;
|
|
23
|
+
/** Size of the tooltip. */
|
|
11
24
|
size?: TooltipSize;
|
|
25
|
+
/** Force tooltip to be always visible. */
|
|
12
26
|
active?: boolean;
|
|
27
|
+
/** Allow tooltip to wrap to multiple lines. */
|
|
13
28
|
multiline?: boolean;
|
|
29
|
+
/** Enable fade animation. Default: true. */
|
|
14
30
|
animated?: boolean;
|
|
31
|
+
/** Use square corners instead of rounded. */
|
|
15
32
|
square?: boolean;
|
|
33
|
+
/** Show dashed underline on trigger. */
|
|
16
34
|
dashed?: boolean;
|
|
35
|
+
/** Delay before showing tooltip (ms). */
|
|
17
36
|
delay?: number;
|
|
37
|
+
/** Delay in ms before hiding the tooltip. */
|
|
18
38
|
closeDelay?: number;
|
|
39
|
+
/** Additional classes for the tooltip element. */
|
|
19
40
|
tooltipClassName?: string;
|
|
20
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* The `Tooltip` component displays helpful information when users hover over or focus on an element.
|
|
44
|
+
*
|
|
45
|
+
* @function
|
|
46
|
+
* @param {TooltipProps} props - Props for the Tooltip component.
|
|
47
|
+
* @returns {JSX.Element} The rendered tooltip wrapper.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Basic tooltip
|
|
51
|
+
* <Tooltip label="This is helpful info">
|
|
52
|
+
* <button>Hover me</button>
|
|
53
|
+
* </Tooltip>
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* // Positioned tooltip with color
|
|
57
|
+
* <Tooltip label="Delete item" position="right" color="danger">
|
|
58
|
+
* <Icon icon="fas fa-trash" />
|
|
59
|
+
* </Tooltip>
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* // Multiline tooltip
|
|
63
|
+
* <Tooltip label="This is a longer tooltip that wraps to multiple lines" multiline>
|
|
64
|
+
* <span>?</span>
|
|
65
|
+
* </Tooltip>
|
|
66
|
+
*/
|
|
21
67
|
export declare const Tooltip: React.FC<TooltipProps>;
|
|
22
68
|
export default Tooltip;
|
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Block component.
|
|
5
|
+
*/
|
|
3
6
|
export interface BlockProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
4
8
|
className?: string;
|
|
9
|
+
/** Text color helper. */
|
|
5
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
|
+
*/
|
|
6
17
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
18
|
+
/** Background color helper. */
|
|
7
19
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
20
|
+
/** Content to render inside the block. */
|
|
8
21
|
children?: React.ReactNode;
|
|
9
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* The `Block` component renders a simple container with Bulma's `.block` class, adding vertical margin between sections of content.
|
|
25
|
+
*
|
|
26
|
+
* @function
|
|
27
|
+
* @param {BlockProps} props - Props for the Block component.
|
|
28
|
+
* @returns {JSX.Element} The rendered block element.
|
|
29
|
+
* @see {@link https://bulma.io/documentation/elements/block/ | Bulma Block documentation}
|
|
30
|
+
*/
|
|
10
31
|
export declare const Block: React.FC<BlockProps>;
|
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Box component.
|
|
5
|
+
*/
|
|
6
|
+
export interface BoxProps
|
|
7
|
+
/** @ignore */
|
|
8
|
+
extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
9
|
+
/** Additional CSS classes to apply. */
|
|
4
10
|
className?: string;
|
|
11
|
+
/** Text color helper. */
|
|
5
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
|
+
*/
|
|
6
19
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
20
|
+
/** Background color helper. */
|
|
7
21
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
22
|
+
/** Whether the box has a shadow (default: true). */
|
|
8
23
|
hasShadow?: boolean;
|
|
24
|
+
/** Content to render inside the box. */
|
|
9
25
|
children?: React.ReactNode;
|
|
10
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The `Box` component renders a bordered, padded container with an optional shadow using Bulma's `.box` class.
|
|
29
|
+
*
|
|
30
|
+
* @function
|
|
31
|
+
* @param {BoxProps} props - Props for the Box component.
|
|
32
|
+
* @returns {JSX.Element} The rendered box element.
|
|
33
|
+
* @see {@link https://bulma.io/documentation/elements/box/ | Bulma Box documentation}
|
|
34
|
+
*/
|
|
11
35
|
export declare const Box: React.FC<BoxProps>;
|
|
12
36
|
export default Box;
|
|
@@ -1,28 +1,61 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Button component.
|
|
5
|
+
*/
|
|
3
6
|
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'onClick'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {
|
|
7
|
+
/** Bulma color variant for the button. `ghost` renders a link-like button; `text` renders a minimal text-only button. */
|
|
4
8
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'white' | 'light' | 'dark' | 'black' | 'text' | 'ghost';
|
|
9
|
+
/** Size of the button. */
|
|
5
10
|
size?: 'small' | 'normal' | 'medium' | 'large';
|
|
11
|
+
/** Applies a lighter color variant. */
|
|
6
12
|
isLight?: boolean;
|
|
13
|
+
/** Makes the button rounded. */
|
|
7
14
|
isRounded?: boolean;
|
|
15
|
+
/** Displays a loading spinner. */
|
|
8
16
|
isLoading?: boolean;
|
|
17
|
+
/** Makes the button non-interactive. */
|
|
9
18
|
isStatic?: boolean;
|
|
19
|
+
/** Makes the button full-width. */
|
|
10
20
|
isFullWidth?: boolean;
|
|
21
|
+
/** Applies outlined styling (requires color). */
|
|
11
22
|
isOutlined?: boolean;
|
|
23
|
+
/** Applies inverted styling (requires color). */
|
|
12
24
|
isInverted?: boolean;
|
|
25
|
+
/** Applies focused styling (visual only). */
|
|
13
26
|
isFocused?: boolean;
|
|
27
|
+
/** Applies active styling (visual only). */
|
|
14
28
|
isActive?: boolean;
|
|
29
|
+
/** Applies hovered styling (visual only). */
|
|
15
30
|
isHovered?: boolean;
|
|
31
|
+
/** Applies disabled styling. */
|
|
16
32
|
isDisabled?: boolean;
|
|
33
|
+
/** Custom class name. */
|
|
17
34
|
className?: string;
|
|
35
|
+
/** Text color helper. */
|
|
18
36
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
37
|
+
/** Background color helper. */
|
|
19
38
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
39
|
+
/** Render as a `<button>`, `<a>`, or a custom component (e.g. a router `Link`). Defaults to `'button'`; anything else (including `'a'`) uses anchor-style prop handling. */
|
|
20
40
|
as?: React.ElementType;
|
|
41
|
+
/** Href value (if rendering as `<a>`). */
|
|
21
42
|
href?: string;
|
|
43
|
+
/** Click event handler. */
|
|
22
44
|
onClick?: React.MouseEventHandler<HTMLButtonElement> | React.MouseEventHandler<HTMLAnchorElement>;
|
|
45
|
+
/** Anchor tag target. */
|
|
23
46
|
target?: string;
|
|
47
|
+
/** Anchor tag rel. */
|
|
24
48
|
rel?: string;
|
|
49
|
+
/** Button content. */
|
|
25
50
|
children?: React.ReactNode;
|
|
26
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* The `Button` component provides a flexible and highly customizable button for your Bulma React UI.
|
|
54
|
+
*
|
|
55
|
+
* @function
|
|
56
|
+
* @param {ButtonProps} props - Props for the Button component.
|
|
57
|
+
* @returns {JSX.Element} The rendered button or anchor element.
|
|
58
|
+
* @see {@link https://bulma.io/documentation/elements/button/ | Bulma Button documentation}
|
|
59
|
+
*/
|
|
27
60
|
export declare const Button: React.FC<ButtonProps>;
|
|
28
61
|
export default Button;
|
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Buttons component.
|
|
5
|
+
*/
|
|
3
6
|
interface ButtonsProps extends React.HTMLAttributes<HTMLDivElement>, BulmaClassesProps {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
4
8
|
className?: string;
|
|
9
|
+
/** Text color helper for the button group. */
|
|
5
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 `.buttons.is-<color>` CSS exists; color the
|
|
14
|
+
* individual `Button`s instead). Prefer `textColor`, which takes precedence
|
|
15
|
+
* when both are set; use `bgColor` for a colored surface.
|
|
16
|
+
*/
|
|
6
17
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
18
|
+
/** Background color helper for the button group. */
|
|
7
19
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
20
|
+
/** Center the group of buttons. */
|
|
8
21
|
isCentered?: boolean;
|
|
22
|
+
/** Align the group of buttons to the right. */
|
|
9
23
|
isRight?: boolean;
|
|
24
|
+
/** Group buttons together as addons (removes spacing between them). */
|
|
10
25
|
hasAddons?: boolean;
|
|
26
|
+
/** The button elements to render inside the group. */
|
|
11
27
|
children: React.ReactNode;
|
|
12
28
|
}
|
|
13
29
|
export declare const Buttons: React.FC<ButtonsProps> & {
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Code component.
|
|
5
|
+
*/
|
|
3
6
|
export interface CodeProps extends React.HTMLAttributes<HTMLElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
4
8
|
className?: string;
|
|
9
|
+
/** Text color helper. */
|
|
5
10
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
11
|
+
/** Background color helper. */
|
|
6
12
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
13
|
+
/** Code content to render inside the element. */
|
|
7
14
|
children?: React.ReactNode;
|
|
8
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* The `Code` component renders a styled `<code>` element with Bulma helper class integration.
|
|
18
|
+
*
|
|
19
|
+
* @function
|
|
20
|
+
* @param {CodeProps} props - Props for the Code component.
|
|
21
|
+
* @returns {JSX.Element} The rendered code element.
|
|
22
|
+
*/
|
|
9
23
|
export declare const Code: React.FC<CodeProps>;
|