@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,53 +2,60 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Button component.
|
|
5
|
-
*
|
|
6
|
-
* @property {'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'white' | 'light' | 'dark' | 'black' | 'text' | 'ghost'} [color] - Bulma color modifier for the button.
|
|
7
|
-
* @property {'small' | 'normal' | 'medium' | 'large'} [size] - Button size.
|
|
8
|
-
* @property {boolean} [isLight] - Use the light version of the color.
|
|
9
|
-
* @property {boolean} [isRounded] - Button is fully rounded.
|
|
10
|
-
* @property {boolean} [isLoading] - Button shows a loading spinner.
|
|
11
|
-
* @property {boolean} [isStatic] - Button is static and non-interactive.
|
|
12
|
-
* @property {boolean} [isFullWidth] - Button takes the full width of parent.
|
|
13
|
-
* @property {boolean} [isOutlined] - Use outlined button style.
|
|
14
|
-
* @property {boolean} [isInverted] - Use inverted color style.
|
|
15
|
-
* @property {boolean} [isFocused] - Button is styled as focused.
|
|
16
|
-
* @property {boolean} [isActive] - Button is styled as active.
|
|
17
|
-
* @property {boolean} [isHovered] - Button is styled as hovered.
|
|
18
|
-
* @property {boolean} [isDisabled] - Button is disabled.
|
|
19
|
-
* @property {string} [className] - Additional CSS classes to apply.
|
|
20
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color (Bulma color, 'inherit', or 'current').
|
|
21
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
22
|
-
* @property {React.ElementType} [as] - 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.
|
|
23
|
-
* @property {string} [href] - Specifies the URL for anchor buttons.
|
|
24
|
-
* @property {React.MouseEventHandler<HTMLButtonElement> | React.MouseEventHandler<HTMLAnchorElement>} [onClick] - Click handler for the button or anchor.
|
|
25
|
-
* @property {string} [target] - Target for anchor element.
|
|
26
|
-
* @property {string} [rel] - Rel attribute for anchor element.
|
|
27
|
-
* @property {React.ReactNode} [children] - Content to be rendered inside the button.
|
|
28
5
|
*/
|
|
29
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. */
|
|
30
8
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'white' | 'light' | 'dark' | 'black' | 'text' | 'ghost';
|
|
9
|
+
/** Size of the button. */
|
|
31
10
|
size?: 'small' | 'normal' | 'medium' | 'large';
|
|
11
|
+
/** Applies a lighter color variant. */
|
|
32
12
|
isLight?: boolean;
|
|
13
|
+
/** Makes the button rounded. */
|
|
33
14
|
isRounded?: boolean;
|
|
15
|
+
/** Displays a loading spinner. */
|
|
34
16
|
isLoading?: boolean;
|
|
17
|
+
/** Makes the button non-interactive. */
|
|
35
18
|
isStatic?: boolean;
|
|
19
|
+
/** Makes the button full-width. */
|
|
36
20
|
isFullWidth?: boolean;
|
|
21
|
+
/** Applies outlined styling (requires color). */
|
|
37
22
|
isOutlined?: boolean;
|
|
23
|
+
/** Applies inverted styling (requires color). */
|
|
38
24
|
isInverted?: boolean;
|
|
25
|
+
/** Applies focused styling (visual only). */
|
|
39
26
|
isFocused?: boolean;
|
|
27
|
+
/** Applies active styling (visual only). */
|
|
40
28
|
isActive?: boolean;
|
|
29
|
+
/** Applies hovered styling (visual only). */
|
|
41
30
|
isHovered?: boolean;
|
|
31
|
+
/** Applies disabled styling. */
|
|
42
32
|
isDisabled?: boolean;
|
|
33
|
+
/** Custom class name. */
|
|
43
34
|
className?: string;
|
|
35
|
+
/** Text color helper. */
|
|
44
36
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
37
|
+
/** Background color helper. */
|
|
45
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. */
|
|
46
40
|
as?: React.ElementType;
|
|
41
|
+
/** Href value (if rendering as `<a>`). */
|
|
47
42
|
href?: string;
|
|
43
|
+
/** Click event handler. */
|
|
48
44
|
onClick?: React.MouseEventHandler<HTMLButtonElement> | React.MouseEventHandler<HTMLAnchorElement>;
|
|
45
|
+
/** Anchor tag target. */
|
|
49
46
|
target?: string;
|
|
47
|
+
/** Anchor tag rel. */
|
|
50
48
|
rel?: string;
|
|
49
|
+
/** Button content. */
|
|
51
50
|
children?: React.ReactNode;
|
|
52
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
|
+
*/
|
|
53
60
|
export declare const Button: React.FC<ButtonProps>;
|
|
54
61
|
export default Button;
|
|
@@ -2,24 +2,28 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Buttons 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 buttons group.
|
|
9
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
10
|
-
* @property {boolean} [isCentered] - Center the group of buttons.
|
|
11
|
-
* @property {boolean} [isRight] - Align the group of buttons to the right.
|
|
12
|
-
* @property {boolean} [hasAddons] - Group buttons together as addons.
|
|
13
|
-
* @property {React.ReactNode} children - The button elements to render inside the group.
|
|
14
5
|
*/
|
|
15
6
|
interface ButtonsProps extends React.HTMLAttributes<HTMLDivElement>, BulmaClassesProps {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
16
8
|
className?: string;
|
|
9
|
+
/** Text color helper for the button group. */
|
|
17
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
|
+
*/
|
|
18
17
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
18
|
+
/** Background color helper for the button group. */
|
|
19
19
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
20
|
+
/** Center the group of buttons. */
|
|
20
21
|
isCentered?: boolean;
|
|
22
|
+
/** Align the group of buttons to the right. */
|
|
21
23
|
isRight?: boolean;
|
|
24
|
+
/** Group buttons together as addons (removes spacing between them). */
|
|
22
25
|
hasAddons?: boolean;
|
|
26
|
+
/** The button elements to render inside the group. */
|
|
23
27
|
children: React.ReactNode;
|
|
24
28
|
}
|
|
25
29
|
export declare const Buttons: React.FC<ButtonsProps> & {
|
|
@@ -2,24 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Code 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 {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
9
|
-
* @property {React.ReactNode} [children] - Code content to be rendered inside the element.
|
|
10
5
|
*/
|
|
11
6
|
export interface CodeProps extends React.HTMLAttributes<HTMLElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
12
8
|
className?: string;
|
|
9
|
+
/** Text color helper. */
|
|
13
10
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
11
|
+
/** Background color helper. */
|
|
14
12
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
13
|
+
/** Code content to render inside the element. */
|
|
15
14
|
children?: React.ReactNode;
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
|
-
* Code component
|
|
19
|
-
*
|
|
20
|
-
* A Code wraps the HTML `<code>` element with Bulma helper class integration.
|
|
21
|
-
* Use it for short inline code snippets, variable names, or technical terms.
|
|
22
|
-
* For multi-line code blocks, use the Pre component.
|
|
17
|
+
* The `Code` component renders a styled `<code>` element with Bulma helper class integration.
|
|
23
18
|
*
|
|
24
19
|
* @function
|
|
25
20
|
* @param {CodeProps} props - Props for the Code component.
|
|
@@ -2,27 +2,28 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Content 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 content.
|
|
9
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
10
|
-
* @property {'small' | 'normal' | 'medium' | 'large'} [size] - Size modifier for the content.
|
|
11
|
-
* @property {React.ReactNode} [children] - Content to be rendered inside the block.
|
|
12
5
|
*/
|
|
13
6
|
interface ContentProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
14
8
|
className?: string;
|
|
9
|
+
/** Text color helper (e.g., `'danger'` for `has-text-danger`). */
|
|
15
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 `.content.is-<color>` CSS exists). Prefer
|
|
14
|
+
* `textColor`, which takes precedence when both are set; use `bgColor` for
|
|
15
|
+
* a colored surface.
|
|
16
|
+
*/
|
|
16
17
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
18
|
+
/** Background color helper (e.g., `'info'` for `has-background-info`). */
|
|
17
19
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
20
|
+
/** Size modifier for the content. */
|
|
18
21
|
size?: 'small' | 'normal' | 'medium' | 'large';
|
|
22
|
+
/** Content to be rendered inside the block. */
|
|
19
23
|
children?: React.ReactNode;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
|
-
* Content component
|
|
23
|
-
*
|
|
24
|
-
* Applies typographic styles to HTML content (e.g., paragraphs, headings, lists) with Bulma's content class.
|
|
25
|
-
* Supports size modifiers and Bulma helper classes for additional styling.
|
|
26
|
+
* The `Content` component applies Bulma’s typographic styles to its children, enhancing the appearance of HTML elements like paragraphs, headings, lists, and tables.
|
|
26
27
|
*
|
|
27
28
|
* @function
|
|
28
29
|
* @param {ContentProps} props - Props for the Content component.
|
|
@@ -2,30 +2,32 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Delete 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 delete button.
|
|
9
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
10
|
-
* @property {(event: React.MouseEvent<HTMLButtonElement>) => void} [onClick] - Click handler for the button.
|
|
11
|
-
* @property {'small' | 'medium' | 'large'} [size] - Size modifier for the delete button.
|
|
12
|
-
* @property {string} [ariaLabel='Close'] - ARIA label for accessibility (default: 'Close').
|
|
13
|
-
* @property {boolean} [disabled=false] - Whether the button is disabled (default: false).
|
|
14
5
|
*/
|
|
15
6
|
interface DeleteProps extends React.HTMLAttributes<HTMLButtonElement>, BulmaClassesProps {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
16
8
|
className?: string;
|
|
9
|
+
/** Text color helper. */
|
|
17
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 `.delete.is-<color>` CSS exists). Prefer
|
|
14
|
+
* `textColor`, which takes precedence when both are set; use `bgColor` for
|
|
15
|
+
* a colored surface.
|
|
16
|
+
*/
|
|
18
17
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
18
|
+
/** Background color helper. */
|
|
19
19
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
20
|
+
/** Click handler for the button. */
|
|
20
21
|
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
22
|
+
/** Size modifier for the delete button. */
|
|
21
23
|
size?: 'small' | 'medium' | 'large';
|
|
24
|
+
/** ARIA label for accessibility (default: 'Close'). */
|
|
22
25
|
ariaLabel?: string;
|
|
26
|
+
/** Whether the button is disabled (default: false). */
|
|
23
27
|
disabled?: boolean;
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
|
-
* Delete component
|
|
27
|
-
*
|
|
28
|
-
* Supports Bulma helper classes for styling, color, and size, and includes accessibility and disabled state.
|
|
30
|
+
* The `Delete` component provides a Bulma-styled close/delete button for dismissing modals, notifications, tags, messages, and more.
|
|
29
31
|
*
|
|
30
32
|
* @function
|
|
31
33
|
* @param {DeleteProps} props - Props for the Delete component.
|
|
@@ -2,19 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Divider component.
|
|
5
|
-
*
|
|
6
|
-
* @property {string} [className] - Additional CSS classes to apply.
|
|
7
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
8
5
|
*/
|
|
9
6
|
export interface DividerProps extends React.HTMLAttributes<HTMLHRElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
10
8
|
className?: string;
|
|
9
|
+
/** Background color helper. */
|
|
11
10
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
* Divider component
|
|
15
|
-
*
|
|
16
|
-
* A Divider wraps the HTML `<hr>` element with Bulma helper class integration.
|
|
17
|
-
* Use it to visually separate content sections with a horizontal line.
|
|
13
|
+
* The `Divider` component renders a styled horizontal rule (`<hr>`) element with Bulma helper class integration.
|
|
18
14
|
*
|
|
19
15
|
* @function
|
|
20
16
|
* @param {DividerProps} props - Props for the Divider component.
|
|
@@ -2,24 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Emphasis 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 {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
9
|
-
* @property {React.ReactNode} [children] - Content to be rendered inside the em element.
|
|
10
5
|
*/
|
|
11
6
|
export interface EmphasisProps extends React.HTMLAttributes<HTMLElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
12
8
|
className?: string;
|
|
9
|
+
/** Text color helper. */
|
|
13
10
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
11
|
+
/** Background color helper. */
|
|
14
12
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
13
|
+
/** Content to render inside the em element. */
|
|
15
14
|
children?: React.ReactNode;
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
|
-
* Emphasis component
|
|
19
|
-
*
|
|
20
|
-
* An Emphasis wraps the HTML `<em>` element with Bulma helper class integration.
|
|
21
|
-
* Use it for text that has stress emphasis, affecting the meaning of the sentence.
|
|
22
|
-
* For visual-only italic styling without semantic meaning, use CSS font-style: italic.
|
|
17
|
+
* The `Emphasis` component renders a styled `<em>` element with Bulma helper class integration.
|
|
23
18
|
*
|
|
24
19
|
* @function
|
|
25
20
|
* @param {EmphasisProps} props - Props for the Emphasis component.
|
|
@@ -2,30 +2,28 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the FigureCaption 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 {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
9
|
-
* @property {React.ReactNode} [children] - Content to be rendered inside the figcaption.
|
|
10
5
|
*/
|
|
11
6
|
export interface FigureCaptionProps extends React.HTMLAttributes<HTMLElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
12
8
|
className?: string;
|
|
9
|
+
/** Text color (Bulma color, 'inherit', or 'current'). */
|
|
13
10
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
11
|
+
/** Background color (Bulma color, 'inherit', or 'current'). */
|
|
14
12
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
13
|
+
/** Content to be rendered inside the figcaption. */
|
|
15
14
|
children?: React.ReactNode;
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
17
|
* Props for the Figure component.
|
|
19
|
-
*
|
|
20
|
-
* @property {string} [className] - Additional CSS classes to apply.
|
|
21
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color (Bulma color, 'inherit', or 'current').
|
|
22
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
23
|
-
* @property {React.ReactNode} [children] - Content to be rendered inside the figure.
|
|
24
18
|
*/
|
|
25
19
|
export interface FigureProps extends React.HTMLAttributes<HTMLElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
20
|
+
/** Additional CSS classes to apply. */
|
|
26
21
|
className?: string;
|
|
22
|
+
/** Text color helper. */
|
|
27
23
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
24
|
+
/** Background color helper. */
|
|
28
25
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
26
|
+
/** Content to render inside the figure. */
|
|
29
27
|
children?: React.ReactNode;
|
|
30
28
|
}
|
|
31
29
|
/**
|
|
@@ -22,42 +22,42 @@ declare module 'react' {
|
|
|
22
22
|
type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
|
|
23
23
|
/**
|
|
24
24
|
* Props for the Icon component.
|
|
25
|
-
*
|
|
26
|
-
* @property {string} [className] - Additional CSS classes to apply.
|
|
27
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color (Bulma color, 'inherit', or 'current').
|
|
28
|
-
* @property {'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'} [color] - Bulma color modifier for the icon.
|
|
29
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
30
|
-
* @property {string} name - The icon name (without library prefix).
|
|
31
|
-
* @property {IconLibrary} [library] - The icon library to use ('fa' = Font Awesome, 'mdi' = Material Design Icons, 'ion' = Ionicons Web Components, 'material-icons' = Google Material Icons, 'material-symbols' = Google Material Symbols). Defaults to the value set in ConfigProvider or 'fa' if not configured.
|
|
32
|
-
* @property {string} [variant] - Icon style variant. For Font Awesome: 'solid', 'regular', 'brands', etc. For Material Icons: 'filled', 'outlined', 'round', 'sharp'. For Material Symbols: 'outlined', 'rounded', 'sharp'. For Ionicons: 'outline', 'sharp'.
|
|
33
|
-
* @property {string | string[]} [features] - Additional library-specific modifiers. For Font Awesome: 'fa-lg', 'fa-spin', etc. For others: size classes like 'is-size-1', etc.
|
|
34
|
-
* @property {string | string[]} [libraryFeatures] - DEPRECATED: Use 'variant' and 'features' instead. Additional library-specific classes.
|
|
35
|
-
* @property {'small' | 'medium' | 'large'} [size] - Size modifier for the icon.
|
|
36
|
-
* @property {string} [ariaLabel='icon'] - ARIA label for accessibility (default: 'icon').
|
|
37
|
-
* @property {object} [style] - Inline style object.
|
|
38
|
-
* @property {string} [icon] - DEPRECATED: Legacy prop, use `name` instead.
|
|
39
|
-
* @property {string} [containerClassName] - Override the default 'icon' container class (e.g., 'panel-icon').
|
|
40
25
|
*/
|
|
41
26
|
export interface IconProps extends React.HTMLAttributes<HTMLSpanElement>, BulmaClassesProps {
|
|
27
|
+
/** Additional CSS classes to apply. */
|
|
42
28
|
className?: string;
|
|
29
|
+
/** Text color helper. */
|
|
43
30
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
31
|
+
/** Bulma color modifier for the icon. */
|
|
44
32
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
33
|
+
/** Background color helper. */
|
|
45
34
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
35
|
+
/** The icon name, with or without its library prefix (e.g. `'star'` or `'fa-star'`). */
|
|
46
36
|
name: string;
|
|
37
|
+
/** DEPRECATED: Legacy prop, use `name` instead. */
|
|
47
38
|
icon?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The icon library to use ('fa' = Font Awesome, 'mdi' = Material Design Icons, 'ion' = Ionicons Web Components, 'material-icons' = Google Material Icons, 'material-symbols' = Google Material Symbols). Defaults to the value set in ConfigProvider or 'fa' if not configured.
|
|
41
|
+
* @defaultValue 'fa'
|
|
42
|
+
*/
|
|
48
43
|
library?: IconLibrary;
|
|
44
|
+
/** Icon style variant (e.g. `'solid'`, `'outlined'`, `'rounded'`). */
|
|
49
45
|
variant?: string;
|
|
46
|
+
/** Additional modifiers (e.g. `'fa-lg'`, `'fa-spin'`, `'is-size-1'`). */
|
|
50
47
|
features?: string | string[];
|
|
48
|
+
/** **DEPRECATED:** Use `variant` and `features` instead. */
|
|
51
49
|
libraryFeatures?: string | string[];
|
|
50
|
+
/** Size modifier for the icon container. */
|
|
52
51
|
size?: 'small' | 'medium' | 'large';
|
|
52
|
+
/** ARIA label for accessibility (default: 'icon'). */
|
|
53
53
|
ariaLabel?: string;
|
|
54
|
+
/** Inline style object. */
|
|
54
55
|
style?: React.CSSProperties;
|
|
56
|
+
/** Override the default `'icon'` container class (e.g., `'panel-icon'`). */
|
|
55
57
|
containerClassName?: string;
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
|
-
* Icon component
|
|
59
|
-
*
|
|
60
|
-
* Supports Bulma helper classes for styling, color, and size, and renders an <i></i> element for the icon itself.
|
|
60
|
+
* The `Icon` component is a Bulma-styled wrapper for displaying icons from various libraries (Font Awesome, Material Design Icons, Ionicons, Google Material Icons, Material Symbols, etc.).
|
|
61
61
|
*
|
|
62
62
|
* @function
|
|
63
63
|
* @param {IconProps} props - Props for the Icon component.
|
|
@@ -3,32 +3,35 @@ import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
|
3
3
|
import { IconProps } from './Icon';
|
|
4
4
|
/**
|
|
5
5
|
* Represents an item for the IconText component, containing icon props and optional text.
|
|
6
|
-
*
|
|
7
|
-
* @property {IconProps} iconProps - Props for the Icon component.
|
|
8
|
-
* @property {string} [text] - Optional text to display next to the icon.
|
|
9
6
|
*/
|
|
10
7
|
interface IconTextItem {
|
|
8
|
+
/** Props for the Icon component. */
|
|
11
9
|
iconProps: IconProps;
|
|
10
|
+
/** Optional text to display next to the icon. */
|
|
12
11
|
text?: string;
|
|
13
12
|
}
|
|
14
13
|
/**
|
|
15
14
|
* Props for the IconText component.
|
|
16
|
-
*
|
|
17
|
-
* @property {string} [className] - Additional CSS classes to apply.
|
|
18
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [textColor] - Text color (Bulma color, 'inherit', or 'current').
|
|
19
|
-
* @property {'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'} [color] - Bulma color modifier for the icon text.
|
|
20
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
21
|
-
* @property {IconProps} [iconProps] - Props for a single Icon component.
|
|
22
|
-
* @property {React.ReactNode} [children] - Text for a single icon.
|
|
23
|
-
* @property {IconTextItem[]} [items] - Array of icon/text pairs for multiple icons.
|
|
24
15
|
*/
|
|
25
16
|
interface IconTextProps extends React.HTMLAttributes<HTMLSpanElement>, BulmaClassesProps {
|
|
17
|
+
/** Additional CSS classes to apply. */
|
|
26
18
|
className?: string;
|
|
19
|
+
/** Text color helper. */
|
|
27
20
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
21
|
+
/**
|
|
22
|
+
* Text color alias: renders `has-text-<color>`, exactly like `textColor`.
|
|
23
|
+
* Not a filled variant (no `.icon-text.is-<color>` CSS exists). Prefer
|
|
24
|
+
* `textColor`, which takes precedence when both are set; use `bgColor` for
|
|
25
|
+
* a colored surface.
|
|
26
|
+
*/
|
|
28
27
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
28
|
+
/** Background color helper. */
|
|
29
29
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
30
|
+
/** Props for a single Icon component (for single icon mode). */
|
|
30
31
|
iconProps?: IconProps;
|
|
32
|
+
/** Text for a single icon (for single icon mode). */
|
|
31
33
|
children?: React.ReactNode;
|
|
34
|
+
/** Array of icon/text pairs (for multiple icons mode). */
|
|
32
35
|
items?: IconTextItem[];
|
|
33
36
|
}
|
|
34
37
|
export declare const IconText: React.FC<IconTextProps> & {
|
|
@@ -2,38 +2,38 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Image 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 image container.
|
|
9
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
10
|
-
* @property {string} [size] - Size or aspect ratio modifier (e.g., '128x128', '16by9', etc.).
|
|
11
|
-
* @property {boolean} [isRounded] - Whether the image should have rounded corners.
|
|
12
|
-
* @property {boolean} [isRetina] - Whether to use retina (2x) image source.
|
|
13
|
-
* @property {string} [src] - Image source URL.
|
|
14
|
-
* @property {string} [alt] - Alternate text for the image.
|
|
15
|
-
* @property {React.ReactNode} [children] - Arbitrary children (e.g., iframe or custom content).
|
|
16
|
-
* @property {'figure' | 'div' | 'p'} [as] - The tag to render. Defaults to 'figure', but can be 'p', 'div', etc.
|
|
17
5
|
*/
|
|
18
6
|
export interface ImageProps extends React.HTMLAttributes<HTMLElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
|
+
/** Additional CSS classes to apply. */
|
|
19
8
|
className?: string;
|
|
9
|
+
/** Text color helper for the container. */
|
|
20
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 `.image.is-<color>` CSS exists). Prefer
|
|
14
|
+
* `textColor`, which takes precedence when both are set; use `bgColor` for
|
|
15
|
+
* a colored surface.
|
|
16
|
+
*/
|
|
21
17
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
18
|
+
/** Background color helper for the container. */
|
|
22
19
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
20
|
+
/** Fixed size or aspect ratio modifier for the image container. */
|
|
23
21
|
size?: '16x16' | '24x24' | '32x32' | '48x48' | '64x64' | '96x96' | '128x128' | 'square' | '1by1' | '5by4' | '4by3' | '3by2' | '5by3' | '16by9' | '2by1' | '3by1' | '4by5' | '3by4' | '2by3' | '3by5' | '9by16' | '1by2' | '1by3';
|
|
22
|
+
/** Renders the image with rounded corners. */
|
|
24
23
|
isRounded?: boolean;
|
|
24
|
+
/** Uses retina (2x) image source. */
|
|
25
25
|
isRetina?: boolean;
|
|
26
|
+
/** Image source URL. */
|
|
26
27
|
src?: string;
|
|
28
|
+
/** Alternate text for the image. */
|
|
27
29
|
alt?: string;
|
|
30
|
+
/** Arbitrary content (e.g., iframe, custom HTML) inside the image container. */
|
|
28
31
|
children?: React.ReactNode;
|
|
32
|
+
/** Container element tag. Defaults to `'figure'` when using aspect-ratio sizes, `'div'` otherwise. */
|
|
29
33
|
as?: 'figure' | 'div' | 'p';
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
32
|
-
* Image component
|
|
33
|
-
*
|
|
34
|
-
* Supports fixed-size containers, aspect ratios, rounded images, retina images, and arbitrary children (e.g., iframe).
|
|
35
|
-
*
|
|
36
|
-
* The "as" prop allows rendering as "figure", "p", or "div" tags etc.
|
|
36
|
+
* The `Image` component wraps images, iframes, or custom content in a Bulma-styled container, supporting fixed sizes, aspect ratios, rounded corners, retina images, and all Bulma helper props for color and spacing.
|
|
37
37
|
*
|
|
38
38
|
* @function
|
|
39
39
|
* @param {ImageProps} props - Props for the Image component.
|
|
@@ -2,30 +2,26 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Link component.
|
|
5
|
-
*
|
|
6
|
-
* @
|
|
7
|
-
* @
|
|
8
|
-
* @property {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
9
|
-
* @property {string} [href] - The URL the link points to.
|
|
10
|
-
* @property {string} [target] - Where to open the linked document.
|
|
11
|
-
* @property {string} [rel] - Relationship between the current and linked document.
|
|
12
|
-
* @property {boolean} [isActive] - Whether the link appears active.
|
|
13
|
-
* @property {React.ElementType} [as] - Render as a custom component (e.g. a router `Link`) instead of `<a>`. Defaults to `'a'`.
|
|
14
|
-
* @property {React.ReactNode} [children] - Content to be rendered inside the link.
|
|
5
|
+
* @extraProp {string} [href] - The URL the link points to.
|
|
6
|
+
* @extraProp {'_self' | '_blank' | '_parent' | '_top'} [target] - Where to open the linked document.
|
|
7
|
+
* @extraProp {string} [rel] - Relationship between current and linked document.
|
|
15
8
|
*/
|
|
16
9
|
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
10
|
+
/** Additional CSS classes to apply. */
|
|
17
11
|
className?: string;
|
|
12
|
+
/** Text color helper. */
|
|
18
13
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
14
|
+
/** Background color helper. */
|
|
19
15
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
16
|
+
/** Whether the link appears active. */
|
|
20
17
|
isActive?: boolean;
|
|
18
|
+
/** Render as a custom component (e.g. a router `Link`) instead of `<a>`. Defaults to `'a'`. */
|
|
21
19
|
as?: React.ElementType;
|
|
20
|
+
/** Content to render inside the link. */
|
|
22
21
|
children?: React.ReactNode;
|
|
23
22
|
}
|
|
24
23
|
/**
|
|
25
|
-
* Link component
|
|
26
|
-
*
|
|
27
|
-
* A Link wraps the HTML `<a>` element with Bulma styling support and helper class integration.
|
|
28
|
-
* Supports Bulma helper classes for additional styling like text color, background color, and layout.
|
|
24
|
+
* The `Link` component renders a styled anchor (`<a>`) element with Bulma helper class integration.
|
|
29
25
|
*
|
|
30
26
|
* @function
|
|
31
27
|
* @param {LinkProps} props - Props for the Link component.
|
|
@@ -2,21 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import { ButtonProps } from './Button';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the LinkButton component.
|
|
5
|
-
*
|
|
6
|
-
* @property {'text' | 'ghost' | 'underline'} [variant] - Display mode. 'text' renders a minimal button without underline; 'ghost' renders a link-like button with default text color; 'underline' renders a text button that underlines on hover/focus. Defaults to 'text'.
|
|
7
|
-
* @property {'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'white' | 'light' | 'dark' | 'black'} [color] - Text color override.
|
|
8
5
|
*/
|
|
9
6
|
export interface LinkButtonProps extends Omit<ButtonProps, 'color' | 'isOutlined' | 'isInverted' | 'isLight'> {
|
|
7
|
+
/** Display mode. `text` has no underline; `ghost` uses default text color. */
|
|
10
8
|
variant?: 'text' | 'ghost' | 'underline';
|
|
9
|
+
/** Text color override for the button. */
|
|
11
10
|
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'white' | 'light' | 'dark' | 'black';
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
*
|
|
15
|
-
* of `<div onClick>` anti-patterns.
|
|
16
|
-
*
|
|
17
|
-
* Wraps the Button component with `is-text` or `is-ghost` styling, plus CSS overrides
|
|
18
|
-
* to remove the underline (text variant) or link color (ghost variant).
|
|
19
|
-
* The 'underline' variant uses `is-text` styling with an underline that appears on hover/focus.
|
|
13
|
+
* The `LinkButton` component renders a `<button>` that visually looks like text or a link.
|
|
20
14
|
*
|
|
21
15
|
* @function
|
|
22
16
|
* @param {LinkButtonProps} props - Props for the LinkButton component.
|
|
@@ -2,25 +2,20 @@ import React from 'react';
|
|
|
2
2
|
import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the ListItem 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 {(typeof validColors)[number] | 'inherit' | 'current'} [bgColor] - Background color (Bulma color, 'inherit', or 'current').
|
|
9
|
-
* @property {React.ReactNode} [children] - Content to be rendered inside the list item.
|
|
5
|
+
* @extraProp {number} [value] - Custom value for ordered list items.
|
|
10
6
|
*/
|
|
11
7
|
export interface ListItemProps extends React.LiHTMLAttributes<HTMLLIElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
8
|
+
/** Additional CSS classes to apply. */
|
|
12
9
|
className?: string;
|
|
10
|
+
/** Text color helper. */
|
|
13
11
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
12
|
+
/** Background color helper. */
|
|
14
13
|
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
14
|
+
/** Content to render inside the list item. */
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* ListItem component
|
|
19
|
-
*
|
|
20
|
-
* A ListItem wraps the HTML `<li>` element with Bulma helper class integration.
|
|
21
|
-
* Use it inside UnorderedList or OrderedList components.
|
|
22
|
-
* Supports Bulma helper classes for additional styling like text color, background color,
|
|
23
|
-
* and spacing utilities.
|
|
18
|
+
* The `ListItem` component renders a styled list item (`<li>`) element with Bulma helper class integration.
|
|
24
19
|
*
|
|
25
20
|
* @function
|
|
26
21
|
* @param {ListItemProps} props - Props for the ListItem component.
|