@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
package/dist/index.esm.js
CHANGED
|
@@ -952,7 +952,7 @@ const useBulmaClasses = (props) => {
|
|
|
952
952
|
};
|
|
953
953
|
|
|
954
954
|
/**
|
|
955
|
-
*
|
|
955
|
+
* The `Column` component provides a single responsive layout column using Bulma's flexbox-based column system.
|
|
956
956
|
*
|
|
957
957
|
* @function
|
|
958
958
|
* @param {ColumnProps} props - Props for the Column component.
|
|
@@ -1014,7 +1014,7 @@ function withSubComponents(base, subs, displayName) {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
|
|
1016
1016
|
/**
|
|
1017
|
-
*
|
|
1017
|
+
* The `Columns` component provides Bulma's flexible, responsive grid container for aligning and distributing [`Column`](./column.md) components.
|
|
1018
1018
|
*
|
|
1019
1019
|
* @function
|
|
1020
1020
|
* @param {ColumnsProps} props - Props for the Columns component.
|
|
@@ -1118,11 +1118,7 @@ function DefaultAvatarIcon() {
|
|
|
1118
1118
|
return (jsx("svg", { viewBox: "0 0 24 24", width: "60%", height: "60%", "aria-hidden": "true", children: jsx("path", { fill: "currentColor", d: "M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.42 0-9 2.24-9 5v2a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-2c0-2.76-4.58-5-9-5Z" }) }));
|
|
1119
1119
|
}
|
|
1120
1120
|
/**
|
|
1121
|
-
* Avatar component
|
|
1122
|
-
*
|
|
1123
|
-
* Falls back automatically: `src` (image) -> initials (from `initials`/`name`) -> `icon` ->
|
|
1124
|
-
* a generic default icon. Initials avatars get a stable auto background color derived from
|
|
1125
|
-
* `name` unless `color` is set.
|
|
1121
|
+
* The `Avatar` component represents a person or entity as a compact image.
|
|
1126
1122
|
*
|
|
1127
1123
|
* @function
|
|
1128
1124
|
* @param {AvatarProps} props - Props for the Avatar component.
|
|
@@ -1239,10 +1235,7 @@ function flattenChildren(children, keyPrefix = '') {
|
|
|
1239
1235
|
});
|
|
1240
1236
|
}
|
|
1241
1237
|
/**
|
|
1242
|
-
* Avatars component
|
|
1243
|
-
*
|
|
1244
|
-
* Clamps to `max`, rendering the overflow as a single "+N" surplus avatar. Mirrors the
|
|
1245
|
-
* `Tags`/`Buttons` sibling-plural-container convention.
|
|
1238
|
+
* The `Avatars` component renders an overlapping/stacked group of `Avatar`s, the "members" list pattern.
|
|
1246
1239
|
*
|
|
1247
1240
|
* @function
|
|
1248
1241
|
* @param {AvatarsProps} props - Props for the Avatars component.
|
|
@@ -1305,13 +1298,7 @@ const badgeColors = [
|
|
|
1305
1298
|
'white',
|
|
1306
1299
|
];
|
|
1307
1300
|
/**
|
|
1308
|
-
* Badge component
|
|
1309
|
-
* element (or rendered standalone).
|
|
1310
|
-
*
|
|
1311
|
-
* Renders `{max}+` when a numeric `content` exceeds `max` and no-ops its `pulse` animation
|
|
1312
|
-
* under `prefers-reduced-motion: reduce`. At `0` without `showZero` the pill is visually
|
|
1313
|
-
* hidden but stays mounted, so its `role="status"` live region announces a later `0 -> 1`
|
|
1314
|
-
* change.
|
|
1301
|
+
* The `Badge` component is a small status/count indicator overlaid on the corner of another element, or rendered standalone.
|
|
1315
1302
|
*
|
|
1316
1303
|
* @function
|
|
1317
1304
|
* @param {BadgeProps} props - Props for the Badge component.
|
|
@@ -1404,9 +1391,7 @@ const validBreadcrumbSeparators = [
|
|
|
1404
1391
|
];
|
|
1405
1392
|
const validBreadcrumbSizes = ['small', 'medium', 'large'];
|
|
1406
1393
|
/**
|
|
1407
|
-
* Breadcrumb component
|
|
1408
|
-
*
|
|
1409
|
-
* Supports alignment, separator styles, and sizes.
|
|
1394
|
+
* The `Breadcrumb` component renders a Bulma-styled breadcrumb navigation.
|
|
1410
1395
|
*
|
|
1411
1396
|
* @function
|
|
1412
1397
|
* @param {BreadcrumbProps} props - Props for the Breadcrumb component.
|
|
@@ -1457,17 +1442,17 @@ const hasCompoundComponents = (children) => {
|
|
|
1457
1442
|
});
|
|
1458
1443
|
};
|
|
1459
1444
|
/**
|
|
1460
|
-
* Card component
|
|
1445
|
+
* The `Card` component renders a Bulma-styled card with optional header, image, content, and footer.
|
|
1461
1446
|
*
|
|
1462
1447
|
* @function
|
|
1463
1448
|
* @param {CardProps} props - Props for the Card component.
|
|
1464
1449
|
* @returns {JSX.Element} The rendered card element.
|
|
1465
1450
|
* @see {@link https://bulma.io/documentation/components/card/ | Bulma Card documentation}
|
|
1466
1451
|
*/
|
|
1467
|
-
const CardComponent = ({ className, children, textColor, bgColor, hasShadow = true, header, headerCentered, headerIcon, footer, image, imageAlt, ...props }) => {
|
|
1452
|
+
const CardComponent = ({ className, children, textColor, color, bgColor, hasShadow = true, header, headerCentered, headerIcon, footer, image, imageAlt, ...props }) => {
|
|
1468
1453
|
const { classPrefix } = useConfig();
|
|
1469
1454
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1470
|
-
color: textColor,
|
|
1455
|
+
color: textColor ?? color,
|
|
1471
1456
|
backgroundColor: bgColor,
|
|
1472
1457
|
...props,
|
|
1473
1458
|
});
|
|
@@ -1588,7 +1573,7 @@ const __test_exports__ = { renderFooter };
|
|
|
1588
1573
|
*/
|
|
1589
1574
|
const isBrowser$1 = (win, doc) => typeof win !== 'undefined' && typeof doc !== 'undefined';
|
|
1590
1575
|
/**
|
|
1591
|
-
*
|
|
1576
|
+
* The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI.
|
|
1592
1577
|
*
|
|
1593
1578
|
* @function
|
|
1594
1579
|
* @param {DropdownProps} props - Props for the Dropdown component.
|
|
@@ -1678,7 +1663,7 @@ const Dropdown = withSubComponents(DropdownComponent, {
|
|
|
1678
1663
|
// Context to track MenuList nesting level
|
|
1679
1664
|
const MenuListLevelContext = createContext(0);
|
|
1680
1665
|
/**
|
|
1681
|
-
*
|
|
1666
|
+
* The `Menu` component provides Bulma's vertical navigation menu: a simple, accessible sidebar or section menu for your Bulma React UI.
|
|
1682
1667
|
*
|
|
1683
1668
|
* @function
|
|
1684
1669
|
* @param {MenuProps} props - Props for the Menu component.
|
|
@@ -1758,9 +1743,7 @@ const Menu = withSubComponents(MenuComponent, {
|
|
|
1758
1743
|
}, 'Menu');
|
|
1759
1744
|
|
|
1760
1745
|
/**
|
|
1761
|
-
*
|
|
1762
|
-
*
|
|
1763
|
-
* Supports Bulma helper classes, color, and an optional close button.
|
|
1746
|
+
* The `Message` component provides Bulma's flexible notice/message box for your Bulma React UI.
|
|
1764
1747
|
*
|
|
1765
1748
|
* @function
|
|
1766
1749
|
* @param {MessageProps} props - Props for the Message component.
|
|
@@ -1907,8 +1890,7 @@ const ModalClose = ({ className, size = 'large', variant = 'delete', ...props })
|
|
|
1907
1890
|
return (jsx("button", { className: classes, "aria-label": "close", type: "button", ...props }));
|
|
1908
1891
|
};
|
|
1909
1892
|
/**
|
|
1910
|
-
*
|
|
1911
|
-
* Supports both legacy props-based API and compound component API.
|
|
1893
|
+
* The `Modal` component provides a flexible, accessible modal dialog for your Bulma React UI.
|
|
1912
1894
|
*
|
|
1913
1895
|
* @function
|
|
1914
1896
|
* @param {ModalProps} props - Props for the Modal component.
|
|
@@ -1978,7 +1960,7 @@ const Modal = withSubComponents(ModalRoot, {
|
|
|
1978
1960
|
}, 'Modal');
|
|
1979
1961
|
|
|
1980
1962
|
/**
|
|
1981
|
-
*
|
|
1963
|
+
* The `Navbar` component implements Bulma's powerful, responsive navigation bar for your Bulma React UI.
|
|
1982
1964
|
*
|
|
1983
1965
|
* @function
|
|
1984
1966
|
* @param {NavbarProps} props - Props for the Navbar component.
|
|
@@ -2001,7 +1983,7 @@ const NavbarComponent = ({ className, textColor, bgColor, color, transparent, fi
|
|
|
2001
1983
|
return (jsx("nav", { className: navbarClasses, role: "navigation", "aria-label": "main navigation", ...rest, children: children }));
|
|
2002
1984
|
};
|
|
2003
1985
|
/**
|
|
2004
|
-
*
|
|
1986
|
+
* For logo and branding (left side)
|
|
2005
1987
|
*
|
|
2006
1988
|
* @function
|
|
2007
1989
|
* @param {NavbarBrandProps} props - Props for the NavbarBrand component.
|
|
@@ -2015,7 +1997,7 @@ const NavbarBrand = ({ className, children, textColor, ...props }) => {
|
|
|
2015
1997
|
return (jsx("div", { className: classNames(usePrefixedClassNames('navbar-brand'), bulmaHelperClasses, className), ...rest, children: children }));
|
|
2016
1998
|
};
|
|
2017
1999
|
/**
|
|
2018
|
-
*
|
|
2000
|
+
* Navigation links, buttons, or custom content
|
|
2019
2001
|
*
|
|
2020
2002
|
* @function
|
|
2021
2003
|
* @param {NavbarItemProps} props - Props for the NavbarItem component.
|
|
@@ -2032,7 +2014,7 @@ const NavbarItem = ({ className, as: Component = 'a', active, textColor, bgColor
|
|
|
2032
2014
|
}), bulmaHelperClasses, className), ...rest, children: children }));
|
|
2033
2015
|
};
|
|
2034
2016
|
/**
|
|
2035
|
-
*
|
|
2017
|
+
* Responsive menu toggle (mobile)
|
|
2036
2018
|
*
|
|
2037
2019
|
* @function
|
|
2038
2020
|
* @param {NavbarBurgerProps} props - Props for the NavbarBurger component.
|
|
@@ -2047,7 +2029,7 @@ const NavbarBurger = ({ className, active, children, ...props }) => {
|
|
|
2047
2029
|
}), bulmaHelperClasses, className), "aria-label": props['aria-label'] || 'menu', "aria-expanded": props['aria-expanded'] ?? !!active, ...rest, children: [jsx("span", { "aria-hidden": "true" }), jsx("span", { "aria-hidden": "true" }), jsx("span", { "aria-hidden": "true" }), children] }));
|
|
2048
2030
|
};
|
|
2049
2031
|
/**
|
|
2050
|
-
*
|
|
2032
|
+
* Collapsible content (contains `Navbar.Start` and `Navbar.End`)
|
|
2051
2033
|
*
|
|
2052
2034
|
* @function
|
|
2053
2035
|
* @param {NavbarMenuProps} props - Props for the NavbarMenu component.
|
|
@@ -2062,7 +2044,7 @@ const NavbarMenu = ({ className, active, children, ...props }) => {
|
|
|
2062
2044
|
}), bulmaHelperClasses, className), ...rest, children: children }));
|
|
2063
2045
|
};
|
|
2064
2046
|
/**
|
|
2065
|
-
*
|
|
2047
|
+
* Left-aligned menu area
|
|
2066
2048
|
*
|
|
2067
2049
|
* @function
|
|
2068
2050
|
* @param {NavbarStartEndProps} props - Props for the NavbarStart component.
|
|
@@ -2075,7 +2057,7 @@ const NavbarStart = ({ className, children, ...props }) => {
|
|
|
2075
2057
|
return (jsx("div", { className: classNames(usePrefixedClassNames('navbar-start'), bulmaHelperClasses, className), ...rest, children: children }));
|
|
2076
2058
|
};
|
|
2077
2059
|
/**
|
|
2078
|
-
*
|
|
2060
|
+
* Right-aligned menu area
|
|
2079
2061
|
*
|
|
2080
2062
|
* @function
|
|
2081
2063
|
* @param {NavbarStartEndProps} props - Props for the NavbarEnd component.
|
|
@@ -2088,10 +2070,7 @@ const NavbarEnd = ({ className, children, ...props }) => {
|
|
|
2088
2070
|
return (jsx("div", { className: classNames(usePrefixedClassNames('navbar-end'), bulmaHelperClasses, className), ...rest, children: children }));
|
|
2089
2071
|
};
|
|
2090
2072
|
/**
|
|
2091
|
-
*
|
|
2092
|
-
*
|
|
2093
|
-
* Renders with the `navbar-link` class, which adds a dropdown arrow indicator
|
|
2094
|
-
* automatically. Use `arrowless` to remove the arrow.
|
|
2073
|
+
* Dropdown trigger with arrow indicator (use as first child of `Navbar.Dropdown`)
|
|
2095
2074
|
*
|
|
2096
2075
|
* @function
|
|
2097
2076
|
* @param {NavbarLinkProps} props - Props for the NavbarLink component.
|
|
@@ -2108,7 +2087,7 @@ const NavbarLink = ({ className, as: Component = 'a', arrowless, textColor, bgCo
|
|
|
2108
2087
|
}), bulmaHelperClasses, className), ...rest, children: children }));
|
|
2109
2088
|
};
|
|
2110
2089
|
/**
|
|
2111
|
-
*
|
|
2090
|
+
* Dropdown parent (with options for hover, up, right, active)
|
|
2112
2091
|
*
|
|
2113
2092
|
* @function
|
|
2114
2093
|
* @param {NavbarDropdownProps} props - Props for the NavbarDropdown component.
|
|
@@ -2121,7 +2100,7 @@ const NavbarDropdown = ({ className, right, up, hoverable, active, children, ...
|
|
|
2121
2100
|
'is-active': active,
|
|
2122
2101
|
}), className), ...props, children: children }));
|
|
2123
2102
|
/**
|
|
2124
|
-
*
|
|
2103
|
+
* Dropdown menu container
|
|
2125
2104
|
*
|
|
2126
2105
|
* @function
|
|
2127
2106
|
* @param {NavbarDropdownMenuProps} props - Props for the NavbarDropdownMenu component.
|
|
@@ -2132,7 +2111,7 @@ const NavbarDropdownMenu = ({ className, right, up, children, ...props }) => (js
|
|
|
2132
2111
|
'is-up': up,
|
|
2133
2112
|
}), className), ...props, children: children }));
|
|
2134
2113
|
/**
|
|
2135
|
-
*
|
|
2114
|
+
* Divider in dropdown menus.
|
|
2136
2115
|
*
|
|
2137
2116
|
* @function
|
|
2138
2117
|
* @param {React.HTMLAttributes<HTMLHRElement>} props - Standard hr props.
|
|
@@ -2153,8 +2132,68 @@ const Navbar = withSubComponents(NavbarComponent, {
|
|
|
2153
2132
|
Divider: NavbarDivider,
|
|
2154
2133
|
}, 'Navbar');
|
|
2155
2134
|
|
|
2135
|
+
// INTERNAL — deliberately not exported from src/index.ts.
|
|
2136
|
+
/**
|
|
2137
|
+
* Color values that emit an `is-<color>` modifier no shipped Bulma 1.0.4 rule
|
|
2138
|
+
* matches on `.progress`/`.notification`/`.hero`. The `has-text-*` and
|
|
2139
|
+
* `has-background-*` helpers DO cover these values — only the
|
|
2140
|
+
* component-modifier form is dead.
|
|
2141
|
+
*/
|
|
2142
|
+
const UNSTYLED_MODIFIER_COLORS = [
|
|
2143
|
+
'black-bis',
|
|
2144
|
+
'black-ter',
|
|
2145
|
+
'grey-darker',
|
|
2146
|
+
'grey-dark',
|
|
2147
|
+
'grey',
|
|
2148
|
+
'grey-light',
|
|
2149
|
+
'grey-lighter',
|
|
2150
|
+
];
|
|
2151
|
+
const CSS_BACKED = 'primary, link, info, success, warning, danger, black, white, light, dark';
|
|
2152
|
+
const warnedKeys = new Set();
|
|
2153
|
+
// Fail closed: with no bundler and no Node (raw CDN ESM), reading `process`
|
|
2154
|
+
// throws and warnings stay off, so production can never warn by accident.
|
|
2155
|
+
const isDev = () => {
|
|
2156
|
+
try {
|
|
2157
|
+
return process.env.NODE_ENV !== 'production';
|
|
2158
|
+
}
|
|
2159
|
+
catch {
|
|
2160
|
+
return false;
|
|
2161
|
+
}
|
|
2162
|
+
};
|
|
2163
|
+
const warnOnce = (key, message) => {
|
|
2164
|
+
if (!isDev() || warnedKeys.has(key))
|
|
2165
|
+
return;
|
|
2166
|
+
warnedKeys.add(key);
|
|
2167
|
+
console.warn(message);
|
|
2168
|
+
};
|
|
2169
|
+
/**
|
|
2170
|
+
* Dev warning for a `color` value whose `is-<color>` modifier has no shipped
|
|
2171
|
+
* CSS. `extraUnstyled` covers per-component dead values beyond the shared
|
|
2172
|
+
* list (e.g. Hero's `inherit`/`current`).
|
|
2173
|
+
*/
|
|
2174
|
+
const warnUnstyledColor = (component, value, extraUnstyled = []) => {
|
|
2175
|
+
if (!value)
|
|
2176
|
+
return;
|
|
2177
|
+
if (!UNSTYLED_MODIFIER_COLORS.includes(value) &&
|
|
2178
|
+
!extraUnstyled.includes(value)) {
|
|
2179
|
+
return;
|
|
2180
|
+
}
|
|
2181
|
+
warnOnce(`${component}:${value}`, `[bestax-bulma] <${component} color="${value}">: Bulma ships no ` +
|
|
2182
|
+
`"is-${value}" CSS for ${component}, so it renders unstyled. This ` +
|
|
2183
|
+
`value is deprecated and will be removed from the ${component} color ` +
|
|
2184
|
+
`union in the next major version. CSS-backed values: ${CSS_BACKED}.`);
|
|
2185
|
+
};
|
|
2186
|
+
/** Dev warning for a `color` prop that has no shipped CSS for any value. */
|
|
2187
|
+
const warnDeprecatedColorProp = (component, value, hint) => {
|
|
2188
|
+
if (value === undefined)
|
|
2189
|
+
return;
|
|
2190
|
+
warnOnce(`${component}:color-prop`, `[bestax-bulma] The ${component} "color" prop is deprecated: Bulma ` +
|
|
2191
|
+
`ships no ${component.toLowerCase()} color CSS, so it has never had ` +
|
|
2192
|
+
`a visual effect. It will be removed in the next major version. ${hint}`);
|
|
2193
|
+
};
|
|
2194
|
+
|
|
2156
2195
|
/**
|
|
2157
|
-
*
|
|
2196
|
+
* "Previous" navigation button.
|
|
2158
2197
|
*
|
|
2159
2198
|
* @function
|
|
2160
2199
|
* @param {PaginationPreviousNextProps} props - Props for the PaginationPrevious component.
|
|
@@ -2169,7 +2208,7 @@ const PaginationPrevious = ({ className, disabled, children, ...props }) => (jsx
|
|
|
2169
2208
|
}
|
|
2170
2209
|
: props.onClick, children: children }));
|
|
2171
2210
|
/**
|
|
2172
|
-
*
|
|
2211
|
+
* "Next" navigation button.
|
|
2173
2212
|
*
|
|
2174
2213
|
* @function
|
|
2175
2214
|
* @param {PaginationPreviousNextProps} props - Props for the PaginationNext component.
|
|
@@ -2184,7 +2223,7 @@ const PaginationNext = ({ className, disabled, children, ...props }) => (jsx("a"
|
|
|
2184
2223
|
}
|
|
2185
2224
|
: props.onClick, children: children }));
|
|
2186
2225
|
/**
|
|
2187
|
-
*
|
|
2226
|
+
* The `Pagination` component provides a flexible, composable Bulma pagination navigation for your Bulma React UI.
|
|
2188
2227
|
*
|
|
2189
2228
|
* @function
|
|
2190
2229
|
* @param {PaginationProps} props - Props for the Pagination component.
|
|
@@ -2192,6 +2231,7 @@ const PaginationNext = ({ className, disabled, children, ...props }) => (jsx("a"
|
|
|
2192
2231
|
* @see {@link https://bulma.io/documentation/components/pagination/ | Bulma Pagination documentation}
|
|
2193
2232
|
*/
|
|
2194
2233
|
const PaginationComponent = ({ color, textColor, bgColor, size, align, rounded, className, children, ...props }) => {
|
|
2234
|
+
warnDeprecatedColorProp('Pagination', color, 'Use the textColor / bgColor helper props instead.');
|
|
2195
2235
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2196
2236
|
color: textColor,
|
|
2197
2237
|
backgroundColor: bgColor,
|
|
@@ -2208,7 +2248,7 @@ const PaginationComponent = ({ color, textColor, bgColor, size, align, rounded,
|
|
|
2208
2248
|
return (jsx("nav", { className: paginationClasses, role: "navigation", "aria-label": "pagination", ...rest, children: children }));
|
|
2209
2249
|
};
|
|
2210
2250
|
/**
|
|
2211
|
-
*
|
|
2251
|
+
* Container for page links and ellipsis.
|
|
2212
2252
|
*
|
|
2213
2253
|
* @function
|
|
2214
2254
|
* @param {PaginationListProps} props - Props for the PaginationList component.
|
|
@@ -2223,7 +2263,7 @@ const PaginationList = ({ className, textColor, bgColor, children, ...props }) =
|
|
|
2223
2263
|
return (jsx("ul", { className: classNames(usePrefixedClassNames('pagination-list'), bulmaHelperClasses, className), ...rest, children: children }));
|
|
2224
2264
|
};
|
|
2225
2265
|
/**
|
|
2226
|
-
*
|
|
2266
|
+
* Page number or navigation link.
|
|
2227
2267
|
*
|
|
2228
2268
|
* @function
|
|
2229
2269
|
* @param {PaginationLinkProps} props - Props for the PaginationLink component.
|
|
@@ -2251,7 +2291,7 @@ const PaginationLink = ({ className, textColor, bgColor, active, disabled, onCli
|
|
|
2251
2291
|
}), "aria-current": active ? 'page' : undefined, "aria-disabled": disabled, tabIndex: disabled ? -1 : 0, onClick: handleClick, ...rest, children: children }) }));
|
|
2252
2292
|
};
|
|
2253
2293
|
/**
|
|
2254
|
-
*
|
|
2294
|
+
* Ellipsis separator.
|
|
2255
2295
|
*
|
|
2256
2296
|
* @function
|
|
2257
2297
|
* @param {React.LiHTMLAttributes<HTMLLIElement>} props - Standard li props.
|
|
@@ -2358,9 +2398,7 @@ function getIconClasses(library, name, variant, features) {
|
|
|
2358
2398
|
}
|
|
2359
2399
|
}
|
|
2360
2400
|
/**
|
|
2361
|
-
* Icon component
|
|
2362
|
-
*
|
|
2363
|
-
* Supports Bulma helper classes for styling, color, and size, and renders an <i></i> element for the icon itself.
|
|
2401
|
+
* 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.).
|
|
2364
2402
|
*
|
|
2365
2403
|
* @function
|
|
2366
2404
|
* @param {IconProps} props - Props for the Icon component.
|
|
@@ -2489,7 +2527,7 @@ containerClassName, ...restProps }) => {
|
|
|
2489
2527
|
};
|
|
2490
2528
|
|
|
2491
2529
|
/**
|
|
2492
|
-
*
|
|
2530
|
+
* The `Panel` component implements Bulma's versatile panel block for React.
|
|
2493
2531
|
*
|
|
2494
2532
|
* @function
|
|
2495
2533
|
* @param {PanelProps} props - Props for the Panel component.
|
|
@@ -2509,7 +2547,7 @@ const PanelComponent = ({ color, className, children, ...props }) => {
|
|
|
2509
2547
|
return (jsx("nav", { className: panelClasses, ...rest, children: children }));
|
|
2510
2548
|
};
|
|
2511
2549
|
/**
|
|
2512
|
-
*
|
|
2550
|
+
* Main heading (renders as `<p class="panel-heading">`)
|
|
2513
2551
|
*
|
|
2514
2552
|
* @function
|
|
2515
2553
|
* @param {PanelHeadingProps} props - Props for the PanelHeading component.
|
|
@@ -2517,7 +2555,7 @@ const PanelComponent = ({ color, className, children, ...props }) => {
|
|
|
2517
2555
|
*/
|
|
2518
2556
|
const PanelHeading = ({ className, children, ...props }) => (jsx("p", { className: classNames(usePrefixedClassNames('panel-heading'), className), ...props, children: children }));
|
|
2519
2557
|
/**
|
|
2520
|
-
*
|
|
2558
|
+
* Panel tabs (renders as `<p class="panel-tabs">`)
|
|
2521
2559
|
*
|
|
2522
2560
|
* @function
|
|
2523
2561
|
* @param {PanelTabsProps} props - Props for the PanelTabs component.
|
|
@@ -2525,7 +2563,7 @@ const PanelHeading = ({ className, children, ...props }) => (jsx("p", { classNam
|
|
|
2525
2563
|
*/
|
|
2526
2564
|
const PanelTabs = ({ className, children, ...props }) => (jsx("p", { className: classNames(usePrefixedClassNames('panel-tabs'), className), ...props, children: children }));
|
|
2527
2565
|
/**
|
|
2528
|
-
*
|
|
2566
|
+
* Individual panel block (renders as `<a class="panel-block">`)
|
|
2529
2567
|
*
|
|
2530
2568
|
* @function
|
|
2531
2569
|
* @param {PanelBlockProps} props - Props for the PanelBlock component.
|
|
@@ -2533,8 +2571,8 @@ const PanelTabs = ({ className, children, ...props }) => (jsx("p", { className:
|
|
|
2533
2571
|
*/
|
|
2534
2572
|
const PanelBlock = ({ className, active, children, ...props }) => (jsx("a", { className: classNames(usePrefixedClassNames('panel-block', { 'is-active': active }), className), ...props, children: children }));
|
|
2535
2573
|
/**
|
|
2536
|
-
*
|
|
2537
|
-
*
|
|
2574
|
+
* Icon wrapper with panel styling (renders as `<span class="panel-icon"><i/></span>`).
|
|
2575
|
+
* Accepts all Icon props (`name`, `variant`, `features`, etc.)
|
|
2538
2576
|
*
|
|
2539
2577
|
* @function
|
|
2540
2578
|
* @param {PanelIconProps} props - Props for the PanelIcon component.
|
|
@@ -2542,7 +2580,7 @@ const PanelBlock = ({ className, active, children, ...props }) => (jsx("a", { cl
|
|
|
2542
2580
|
*/
|
|
2543
2581
|
const PanelIcon = ({ className, ...props }) => (jsx(Icon, { containerClassName: classNames(usePrefixedClassNames('panel-icon'), className), ...props }));
|
|
2544
2582
|
/**
|
|
2545
|
-
*
|
|
2583
|
+
* Search input with icon (renders as `<div class="panel-block">`)
|
|
2546
2584
|
*
|
|
2547
2585
|
* @function
|
|
2548
2586
|
* @param {PanelInputBlockProps} props - Props for the PanelInputBlock component.
|
|
@@ -2553,7 +2591,7 @@ const PanelInputBlock = ({ value, onChange, placeholder, iconClassName = 'fas fa
|
|
|
2553
2591
|
return (jsx("div", { className: usePrefixedClassNames('panel-block'), ...props, children: jsxs("p", { className: usePrefixedClassNames('control', 'has-icons-left'), children: [jsx("input", { className: inputClass, type: "text", placeholder: placeholder, value: value, onChange: onChange }), jsx("span", { className: usePrefixedClassNames('icon', 'is-left'), children: jsx("i", { className: iconClassName, "aria-hidden": "true" }) })] }) }));
|
|
2554
2592
|
};
|
|
2555
2593
|
/**
|
|
2556
|
-
*
|
|
2594
|
+
* Checkbox block (renders as `<label class="panel-block">`)
|
|
2557
2595
|
*
|
|
2558
2596
|
* @function
|
|
2559
2597
|
* @param {PanelCheckboxBlockProps} props - Props for the PanelCheckboxBlock component.
|
|
@@ -2561,7 +2599,7 @@ const PanelInputBlock = ({ value, onChange, placeholder, iconClassName = 'fas fa
|
|
|
2561
2599
|
*/
|
|
2562
2600
|
const PanelCheckboxBlock = ({ checked, onChange, children, ...props }) => (jsxs("label", { className: usePrefixedClassNames('panel-block'), ...props, children: [jsx("input", { type: "checkbox", checked: checked, onChange: onChange }), children] }));
|
|
2563
2601
|
/**
|
|
2564
|
-
*
|
|
2602
|
+
* Call-to-action button (renders as `<div class="panel-block"><button /></div>`)
|
|
2565
2603
|
*
|
|
2566
2604
|
* @function
|
|
2567
2605
|
* @param {PanelButtonBlockProps} props - Props for the PanelButtonBlock component.
|
|
@@ -2583,7 +2621,7 @@ function useTabsContext() {
|
|
|
2583
2621
|
return useContext(TabsContext);
|
|
2584
2622
|
}
|
|
2585
2623
|
/**
|
|
2586
|
-
*
|
|
2624
|
+
* The `Tabs` component provides flexible and fully-featured Bulma tab navigation for your Bulma React UI.
|
|
2587
2625
|
*
|
|
2588
2626
|
* @function
|
|
2589
2627
|
* @param {TabsProps} props - Props for the Tabs component.
|
|
@@ -2604,6 +2642,7 @@ function useTabsContext() {
|
|
|
2604
2642
|
* </Tabs>
|
|
2605
2643
|
*/
|
|
2606
2644
|
const TabsComponent = ({ align, size, fullwidth, boxed, toggle, rounded, color, value, onChange, defaultValue = 0, vertical, side, expanded, className, children, ...props }) => {
|
|
2645
|
+
warnDeprecatedColorProp('Tabs', color, 'Remove the prop; no replacement exists.');
|
|
2607
2646
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
2608
2647
|
// Controlled vs uncontrolled state
|
|
2609
2648
|
const isControlled = value !== undefined;
|
|
@@ -2671,7 +2710,7 @@ const TabsComponent = ({ align, size, fullwidth, boxed, toggle, rounded, color,
|
|
|
2671
2710
|
return (jsx(TabsContext.Provider, { value: contextValue, children: jsx("div", { className: combinedClasses, ...rest, children: children }) }));
|
|
2672
2711
|
};
|
|
2673
2712
|
/**
|
|
2674
|
-
*
|
|
2713
|
+
* The `<ul>` container for tab items.
|
|
2675
2714
|
*
|
|
2676
2715
|
* @function
|
|
2677
2716
|
* @param {TabListProps} props - Props for the TabList component.
|
|
@@ -2699,7 +2738,7 @@ const Tab = ({ index, disabled, icon, iconLibrary, iconVariant, iconSize = 'smal
|
|
|
2699
2738
|
return (jsx("li", { className: classNames(activeClass, className), role: "tab", "aria-selected": isActive, tabIndex: disabled ? -1 : 0, ...props, children: jsxs("a", { onClick: handleClick, "aria-disabled": disabled || undefined, children: [icon && (jsx(Icon, { name: icon, library: iconLibrary, variant: iconVariant, size: iconSize, features: iconFeatures })), children && jsx("span", { children: children })] }) }));
|
|
2700
2739
|
};
|
|
2701
2740
|
/**
|
|
2702
|
-
*
|
|
2741
|
+
* Each tab; accepts `active`, `onClick`, etc.
|
|
2703
2742
|
*
|
|
2704
2743
|
* @function
|
|
2705
2744
|
* @param {TabItemProps} props - Props for the TabItem component.
|
|
@@ -2708,7 +2747,7 @@ const Tab = ({ index, disabled, icon, iconLibrary, iconVariant, iconSize = 'smal
|
|
|
2708
2747
|
*/
|
|
2709
2748
|
const TabItem = ({ active, className, children, onClick, ...props }) => (jsx("li", { className: classNames({ [usePrefixedClassNames('is-active')]: active }, className), onClick: onClick, ...props, children: children }));
|
|
2710
2749
|
/**
|
|
2711
|
-
*
|
|
2750
|
+
* Container for tab content panels. No custom props beyond `children` and standard `<div>` HTML attributes. Applies the `.tabs-content` class.
|
|
2712
2751
|
*
|
|
2713
2752
|
* @function
|
|
2714
2753
|
* @param {TabsContentProps} props - Props for the TabsContent component.
|
|
@@ -2747,11 +2786,7 @@ const Tabs = withSubComponents(TabsComponent, {
|
|
|
2747
2786
|
}, 'Tabs');
|
|
2748
2787
|
|
|
2749
2788
|
/**
|
|
2750
|
-
* Loading component
|
|
2751
|
-
*
|
|
2752
|
-
* Can be used as a full-page overlay or a container overlay to indicate
|
|
2753
|
-
* loading states. Supports different sizes, color variants, and optional
|
|
2754
|
-
* cancel functionality.
|
|
2789
|
+
* The `Loading` component provides a loading overlay with a spinner animation.
|
|
2755
2790
|
*
|
|
2756
2791
|
* @function
|
|
2757
2792
|
* @param {LoadingProps} props - Props for the Loading component.
|
|
@@ -2835,10 +2870,7 @@ const Loading = ({ active = false, isFullPage = false, size, color, canCancel =
|
|
|
2835
2870
|
};
|
|
2836
2871
|
|
|
2837
2872
|
/**
|
|
2838
|
-
* Collapse component
|
|
2839
|
-
*
|
|
2840
|
-
* Can be used in controlled or uncontrolled mode. Supports animation
|
|
2841
|
-
* and accessibility features for screen readers.
|
|
2873
|
+
* The `Collapse` component provides an expandable/collapsible content panel.
|
|
2842
2874
|
*
|
|
2843
2875
|
* @function
|
|
2844
2876
|
* @param {CollapseProps} props - Props for the Collapse component.
|
|
@@ -2980,10 +3012,7 @@ const Collapse = ({ open: controlledOpen, defaultOpen = false, onOpen, onClose,
|
|
|
2980
3012
|
};
|
|
2981
3013
|
|
|
2982
3014
|
/**
|
|
2983
|
-
* Tooltip component
|
|
2984
|
-
*
|
|
2985
|
-
* Shows a small popup with text when the user hovers over or focuses
|
|
2986
|
-
* on the wrapped element. Supports multiple positions and color variants.
|
|
3015
|
+
* The `Tooltip` component displays helpful information when users hover over or focus on an element.
|
|
2987
3016
|
*
|
|
2988
3017
|
* @function
|
|
2989
3018
|
* @param {TooltipProps} props - Props for the Tooltip component.
|
|
@@ -3212,10 +3241,7 @@ const Step = ({ isActive = false, isCompleted = false, label, icon, clickable =
|
|
|
3212
3241
|
return (jsx("li", { className: stepClasses, onClick: handleClick, onKeyDown: handleKeyDown, tabIndex: clickable ? 0 : undefined, role: clickable ? 'button' : undefined, "aria-current": isActive ? 'step' : undefined, ...rest, children: jsxs("div", { className: stepsLinkClass, children: [jsx("span", { className: stepsMarkerClass, children: markerContent }), (label || children) && (jsx("div", { className: stepsContentClass, children: jsx("p", { className: stepsTitleClass, children: label || children }) }))] }) }));
|
|
3213
3242
|
};
|
|
3214
3243
|
/**
|
|
3215
|
-
* Steps component
|
|
3216
|
-
*
|
|
3217
|
-
* Use for wizard flows, checkout processes, or any multi-step workflow.
|
|
3218
|
-
* Supports horizontal and vertical layouts with customizable markers.
|
|
3244
|
+
* The `Steps` component provides a multi-step progress indicator for wizard flows, checkout processes, or any multi-step workflow.
|
|
3219
3245
|
*
|
|
3220
3246
|
* @function
|
|
3221
3247
|
* @param {StepsProps} props - Props for the Steps component.
|
|
@@ -3299,10 +3325,7 @@ const StepsComponent = ({ value = 0, items, size, color, hasMarker = true, anima
|
|
|
3299
3325
|
const Steps = withSubComponents(StepsComponent, { Step }, 'Steps');
|
|
3300
3326
|
|
|
3301
3327
|
/**
|
|
3302
|
-
* Sidebar component
|
|
3303
|
-
*
|
|
3304
|
-
* Provides a side panel that slides in from the left or right,
|
|
3305
|
-
* with optional overlay, keyboard support, and customizable width.
|
|
3328
|
+
* The `Sidebar` component provides a slide-out navigation panel that appears from the left or right side of the screen.
|
|
3306
3329
|
*
|
|
3307
3330
|
* @function
|
|
3308
3331
|
* @param {SidebarProps} props - Props for the Sidebar component.
|
|
@@ -3419,7 +3442,7 @@ const SidebarComponent = forwardRef(({ isOpen, onClose, position = 'left', width
|
|
|
3419
3442
|
return null;
|
|
3420
3443
|
});
|
|
3421
3444
|
/**
|
|
3422
|
-
*
|
|
3445
|
+
* Container for the sidebar header.
|
|
3423
3446
|
*
|
|
3424
3447
|
* @function
|
|
3425
3448
|
* @param {SidebarHeaderProps} props - Props for the SidebarHeader component.
|
|
@@ -3430,7 +3453,7 @@ const SidebarHeader = ({ className, children, ...props }) => {
|
|
|
3430
3453
|
return (jsx("div", { className: classNames(headerClass, className), ...props, children: children }));
|
|
3431
3454
|
};
|
|
3432
3455
|
/**
|
|
3433
|
-
*
|
|
3456
|
+
* Title text inside the header.
|
|
3434
3457
|
*
|
|
3435
3458
|
* @function
|
|
3436
3459
|
* @param {SidebarTitleProps} props - Props for the SidebarTitle component.
|
|
@@ -3441,7 +3464,7 @@ const SidebarTitle = ({ className, children, ...props }) => {
|
|
|
3441
3464
|
return (jsx("p", { className: classNames(titleClass, className), ...props, children: children }));
|
|
3442
3465
|
};
|
|
3443
3466
|
/**
|
|
3444
|
-
*
|
|
3467
|
+
* Close button for the sidebar.
|
|
3445
3468
|
*
|
|
3446
3469
|
* @function
|
|
3447
3470
|
* @param {SidebarCloseProps} props - Props for the SidebarClose component.
|
|
@@ -3452,7 +3475,7 @@ const SidebarClose = ({ className, children, ...props }) => {
|
|
|
3452
3475
|
return (jsx("button", { type: "button", className: classNames(closeClass, className), "aria-label": "Close", ...props, children: children }));
|
|
3453
3476
|
};
|
|
3454
3477
|
/**
|
|
3455
|
-
*
|
|
3478
|
+
* Main content area of the sidebar.
|
|
3456
3479
|
*
|
|
3457
3480
|
* @function
|
|
3458
3481
|
* @param {SidebarBodyProps} props - Props for the SidebarBody component.
|
|
@@ -3463,7 +3486,7 @@ const SidebarBody = ({ className, children, ...props }) => {
|
|
|
3463
3486
|
return (jsx("div", { className: classNames(bodyClass, className), ...props, children: children }));
|
|
3464
3487
|
};
|
|
3465
3488
|
/**
|
|
3466
|
-
*
|
|
3489
|
+
* Footer area of the sidebar.
|
|
3467
3490
|
*
|
|
3468
3491
|
* @function
|
|
3469
3492
|
* @param {SidebarFooterProps} props - Props for the SidebarFooter component.
|
|
@@ -3483,10 +3506,7 @@ const Sidebar = withSubComponents(SidebarComponent, {
|
|
|
3483
3506
|
}, 'Sidebar');
|
|
3484
3507
|
|
|
3485
3508
|
/**
|
|
3486
|
-
* Toast component
|
|
3487
|
-
*
|
|
3488
|
-
* Appears at a configurable screen position with auto-close, pause-on-hover,
|
|
3489
|
-
* keyboard dismiss, action/cancel buttons, and an optional explicit close button.
|
|
3509
|
+
* The `Toast` component provides brief notification messages with optional action and cancel buttons.
|
|
3490
3510
|
*
|
|
3491
3511
|
* @function
|
|
3492
3512
|
* @param {ToastProps} props - Props for the Toast component.
|
|
@@ -3756,10 +3776,7 @@ const ToastContainer = ({ position = 'top-right', }) => {
|
|
|
3756
3776
|
let _scrollLockCount = 0;
|
|
3757
3777
|
let _originalOverflow = '';
|
|
3758
3778
|
/**
|
|
3759
|
-
* Dialog component
|
|
3760
|
-
*
|
|
3761
|
-
* Provides a modal dialog with confirm/cancel actions, customizable
|
|
3762
|
-
* appearance, and keyboard support.
|
|
3779
|
+
* The `Dialog` component provides confirmation and alert dialogs with customizable actions.
|
|
3763
3780
|
*
|
|
3764
3781
|
* @function
|
|
3765
3782
|
* @param {DialogProps} props - Props for the Dialog component.
|
|
@@ -3971,17 +3988,15 @@ const DialogContainer = () => {
|
|
|
3971
3988
|
return (jsx(Dialog, { isOpen: true, title: options.title, message: options.message, type: options.type, confirmText: options.confirmText, cancelText: options.cancelText, icon: options.icon, showCancel: type === 'confirm', focusCancel: options.focusCancel, onConfirm: () => dialog.close(type === 'confirm' ? true : undefined), onCancel: () => dialog.close(type === 'confirm' ? false : undefined) }));
|
|
3972
3989
|
};
|
|
3973
3990
|
|
|
3991
|
+
const validButtonColors = [...validColors, 'text', 'ghost'];
|
|
3974
3992
|
/**
|
|
3975
|
-
* Button component
|
|
3976
|
-
*
|
|
3977
|
-
* Supports Bulma helper classes for colors, sizes, and various button states and modifiers.
|
|
3993
|
+
* The `Button` component provides a flexible and highly customizable button for your Bulma React UI.
|
|
3978
3994
|
*
|
|
3979
3995
|
* @function
|
|
3980
3996
|
* @param {ButtonProps} props - Props for the Button component.
|
|
3981
3997
|
* @returns {JSX.Element} The rendered button or anchor element.
|
|
3982
3998
|
* @see {@link https://bulma.io/documentation/elements/button/ | Bulma Button documentation}
|
|
3983
3999
|
*/
|
|
3984
|
-
const validButtonColors = [...validColors, 'text', 'ghost'];
|
|
3985
4000
|
const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWidth, isOutlined, isInverted, isFocused, isActive, isHovered, isDisabled, className, children, textColor, bgColor, as: Component = 'button', href, onClick, target, rel, ...props }) => {
|
|
3986
4001
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3987
4002
|
color: textColor,
|
|
@@ -4047,9 +4062,7 @@ const DefaultPrevIcon = () => (jsx("svg", { xmlns: "http://www.w3.org/2000/svg",
|
|
|
4047
4062
|
*/
|
|
4048
4063
|
const DefaultNextIcon = () => (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsx("polyline", { points: "9 18 15 12 9 6" }) }));
|
|
4049
4064
|
/**
|
|
4050
|
-
* Carousel component
|
|
4051
|
-
*
|
|
4052
|
-
* Supports auto-play, drag navigation, indicators, and customizable arrows.
|
|
4065
|
+
* The `Carousel` component provides an image/content slider with navigation arrows and indicators.
|
|
4053
4066
|
*
|
|
4054
4067
|
* @function
|
|
4055
4068
|
* @param {CarouselProps} props - Props for the Carousel component.
|
|
@@ -4361,13 +4374,7 @@ function usePrefersReducedMotion() {
|
|
|
4361
4374
|
return prefersReducedMotion;
|
|
4362
4375
|
}
|
|
4363
4376
|
/**
|
|
4364
|
-
* Reveal component
|
|
4365
|
-
* the viewport, backed by `IntersectionObserver`.
|
|
4366
|
-
*
|
|
4367
|
-
* Renders in its final, visible state during SSR and on the first client
|
|
4368
|
-
* render, so content is never hidden if JavaScript never runs (crawlers,
|
|
4369
|
-
* disabled JS). Automatically skips the animation (renders the final state
|
|
4370
|
-
* immediately) when the user prefers reduced motion.
|
|
4377
|
+
* The `Reveal` component animates its content into view as it scrolls into the viewport, backed by `IntersectionObserver`.
|
|
4371
4378
|
*
|
|
4372
4379
|
* @function
|
|
4373
4380
|
* @param {RevealProps} props - Props for the Reveal component.
|
|
@@ -4484,22 +4491,19 @@ const Reveal = ({ animation = 'fade-up', delay = 0, duration = 600, threshold =
|
|
|
4484
4491
|
};
|
|
4485
4492
|
|
|
4486
4493
|
/**
|
|
4487
|
-
* Block component
|
|
4488
|
-
*
|
|
4489
|
-
* A block is a simple utility element that adds spacing (margin-bottom) between elements.
|
|
4490
|
-
* Supports Bulma helper classes for additional styling like text color, background color, and layout.
|
|
4494
|
+
* The `Block` component renders a simple container with Bulma's `.block` class, adding vertical margin between sections of content.
|
|
4491
4495
|
*
|
|
4492
4496
|
* @function
|
|
4493
4497
|
* @param {BlockProps} props - Props for the Block component.
|
|
4494
4498
|
* @returns {JSX.Element} The rendered block element.
|
|
4495
4499
|
* @see {@link https://bulma.io/documentation/elements/block/ | Bulma Block documentation}
|
|
4496
4500
|
*/
|
|
4497
|
-
const Block = ({ className, textColor, bgColor, children, ...props }) => {
|
|
4501
|
+
const Block = ({ className, textColor, color, bgColor, children, ...props }) => {
|
|
4498
4502
|
/**
|
|
4499
4503
|
* Generates Bulma helper classes and separates out remaining props.
|
|
4500
4504
|
*/
|
|
4501
4505
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
4502
|
-
color: textColor,
|
|
4506
|
+
color: textColor ?? color,
|
|
4503
4507
|
backgroundColor: bgColor,
|
|
4504
4508
|
...props,
|
|
4505
4509
|
});
|
|
@@ -4509,21 +4513,19 @@ const Block = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
4509
4513
|
};
|
|
4510
4514
|
|
|
4511
4515
|
/**
|
|
4512
|
-
* Box component
|
|
4513
|
-
*
|
|
4514
|
-
* Supports Bulma helper classes for styling and layout, with optional shadow control.
|
|
4516
|
+
* The `Box` component renders a bordered, padded container with an optional shadow using Bulma's `.box` class.
|
|
4515
4517
|
*
|
|
4516
4518
|
* @function
|
|
4517
4519
|
* @param {BoxProps} props - Props for the Box component.
|
|
4518
4520
|
* @returns {JSX.Element} The rendered box element.
|
|
4519
4521
|
* @see {@link https://bulma.io/documentation/elements/box/ | Bulma Box documentation}
|
|
4520
4522
|
*/
|
|
4521
|
-
const Box = ({ className, textColor, bgColor, hasShadow = true, children, ...props }) => {
|
|
4523
|
+
const Box = ({ className, textColor, color, bgColor, hasShadow = true, children, ...props }) => {
|
|
4522
4524
|
/**
|
|
4523
4525
|
* Generates Bulma helper classes and separates out remaining props.
|
|
4524
4526
|
*/
|
|
4525
4527
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
4526
|
-
color: textColor,
|
|
4528
|
+
color: textColor ?? color,
|
|
4527
4529
|
backgroundColor: bgColor,
|
|
4528
4530
|
...props,
|
|
4529
4531
|
});
|
|
@@ -4535,12 +4537,7 @@ const Box = ({ className, textColor, bgColor, hasShadow = true, children, ...pro
|
|
|
4535
4537
|
};
|
|
4536
4538
|
|
|
4537
4539
|
/**
|
|
4538
|
-
*
|
|
4539
|
-
* of `<div onClick>` anti-patterns.
|
|
4540
|
-
*
|
|
4541
|
-
* Wraps the Button component with `is-text` or `is-ghost` styling, plus CSS overrides
|
|
4542
|
-
* to remove the underline (text variant) or link color (ghost variant).
|
|
4543
|
-
* The 'underline' variant uses `is-text` styling with an underline that appears on hover/focus.
|
|
4540
|
+
* The `LinkButton` component renders a `<button>` that visually looks like text or a link.
|
|
4544
4541
|
*
|
|
4545
4542
|
* @function
|
|
4546
4543
|
* @param {LinkButtonProps} props - Props for the LinkButton component.
|
|
@@ -4561,16 +4558,14 @@ const LinkButton = ({ variant = 'text', color, className, ...props }) => {
|
|
|
4561
4558
|
};
|
|
4562
4559
|
|
|
4563
4560
|
/**
|
|
4564
|
-
* Buttons component
|
|
4565
|
-
*
|
|
4566
|
-
* Supports Bulma helper classes for styling, color, and layout, including centering, right alignment, and grouping as addons.
|
|
4561
|
+
* The `Buttons` component lets you group multiple `Button` elements together with Bulma's spacing, alignment, and add-on features.
|
|
4567
4562
|
*
|
|
4568
4563
|
* @function
|
|
4569
4564
|
* @param {ButtonsProps} props - Props for the Buttons component.
|
|
4570
4565
|
* @returns {JSX.Element} The rendered group of buttons.
|
|
4571
4566
|
* @see {@link https://bulma.io/documentation/elements/button/#group | Bulma Button Group documentation}
|
|
4572
4567
|
*/
|
|
4573
|
-
const ButtonsComponent = ({ className, textColor, bgColor, isCentered, isRight, hasAddons, children, ...props }) => {
|
|
4568
|
+
const ButtonsComponent = ({ className, textColor, color, bgColor, isCentered, isRight, hasAddons, children, ...props }) => {
|
|
4574
4569
|
const buttonsClasses = usePrefixedClassNames('buttons', {
|
|
4575
4570
|
'is-centered': isCentered,
|
|
4576
4571
|
'is-right': isRight,
|
|
@@ -4580,7 +4575,7 @@ const ButtonsComponent = ({ className, textColor, bgColor, isCentered, isRight,
|
|
|
4580
4575
|
* Generates Bulma helper classes and separates out remaining props.
|
|
4581
4576
|
*/
|
|
4582
4577
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
4583
|
-
color: textColor,
|
|
4578
|
+
color: textColor ?? color,
|
|
4584
4579
|
backgroundColor: bgColor,
|
|
4585
4580
|
...props,
|
|
4586
4581
|
});
|
|
@@ -4593,11 +4588,7 @@ const Buttons = withSubComponents(ButtonsComponent, {
|
|
|
4593
4588
|
}, 'Buttons');
|
|
4594
4589
|
|
|
4595
4590
|
/**
|
|
4596
|
-
* Code component
|
|
4597
|
-
*
|
|
4598
|
-
* A Code wraps the HTML `<code>` element with Bulma helper class integration.
|
|
4599
|
-
* Use it for short inline code snippets, variable names, or technical terms.
|
|
4600
|
-
* For multi-line code blocks, use the Pre component.
|
|
4591
|
+
* The `Code` component renders a styled `<code>` element with Bulma helper class integration.
|
|
4601
4592
|
*
|
|
4602
4593
|
* @function
|
|
4603
4594
|
* @param {CodeProps} props - Props for the Code component.
|
|
@@ -4617,22 +4608,19 @@ const Code = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
4617
4608
|
// Valid size modifiers for the content class
|
|
4618
4609
|
const validSizes = ['small', 'medium', 'large'];
|
|
4619
4610
|
/**
|
|
4620
|
-
* Content component
|
|
4621
|
-
*
|
|
4622
|
-
* Applies typographic styles to HTML content (e.g., paragraphs, headings, lists) with Bulma's content class.
|
|
4623
|
-
* Supports size modifiers and Bulma helper classes for additional styling.
|
|
4611
|
+
* The `Content` component applies Bulma’s typographic styles to its children, enhancing the appearance of HTML elements like paragraphs, headings, lists, and tables.
|
|
4624
4612
|
*
|
|
4625
4613
|
* @function
|
|
4626
4614
|
* @param {ContentProps} props - Props for the Content component.
|
|
4627
4615
|
* @returns {JSX.Element} The rendered content block.
|
|
4628
4616
|
* @see {@link https://bulma.io/documentation/elements/content/ | Bulma Content documentation}
|
|
4629
4617
|
*/
|
|
4630
|
-
const Content = ({ className, textColor, bgColor, size, children, ...props }) => {
|
|
4618
|
+
const Content = ({ className, textColor, color, bgColor, size, children, ...props }) => {
|
|
4631
4619
|
/**
|
|
4632
4620
|
* Generates Bulma helper classes and separates out remaining props.
|
|
4633
4621
|
*/
|
|
4634
4622
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
4635
|
-
color: textColor,
|
|
4623
|
+
color: textColor ?? color,
|
|
4636
4624
|
backgroundColor: bgColor,
|
|
4637
4625
|
...props,
|
|
4638
4626
|
});
|
|
@@ -4644,21 +4632,19 @@ const Content = ({ className, textColor, bgColor, size, children, ...props }) =>
|
|
|
4644
4632
|
};
|
|
4645
4633
|
|
|
4646
4634
|
/**
|
|
4647
|
-
* Delete component
|
|
4648
|
-
*
|
|
4649
|
-
* Supports Bulma helper classes for styling, color, and size, and includes accessibility and disabled state.
|
|
4635
|
+
* The `Delete` component provides a Bulma-styled close/delete button for dismissing modals, notifications, tags, messages, and more.
|
|
4650
4636
|
*
|
|
4651
4637
|
* @function
|
|
4652
4638
|
* @param {DeleteProps} props - Props for the Delete component.
|
|
4653
4639
|
* @returns {JSX.Element} The rendered delete button.
|
|
4654
4640
|
* @see {@link https://bulma.io/documentation/elements/delete/ | Bulma Delete documentation}
|
|
4655
4641
|
*/
|
|
4656
|
-
const Delete = ({ className, textColor, bgColor, onClick, size, ariaLabel = 'Close', disabled = false, ...props }) => {
|
|
4642
|
+
const Delete = ({ className, textColor, color, bgColor, onClick, size, ariaLabel = 'Close', disabled = false, ...props }) => {
|
|
4657
4643
|
/**
|
|
4658
4644
|
* Generates Bulma helper classes and separates out remaining props.
|
|
4659
4645
|
*/
|
|
4660
4646
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
4661
|
-
color: textColor,
|
|
4647
|
+
color: textColor ?? color,
|
|
4662
4648
|
backgroundColor: bgColor,
|
|
4663
4649
|
...props,
|
|
4664
4650
|
});
|
|
@@ -4671,10 +4657,7 @@ const Delete = ({ className, textColor, bgColor, onClick, size, ariaLabel = 'Clo
|
|
|
4671
4657
|
};
|
|
4672
4658
|
|
|
4673
4659
|
/**
|
|
4674
|
-
* Divider component
|
|
4675
|
-
*
|
|
4676
|
-
* A Divider wraps the HTML `<hr>` element with Bulma helper class integration.
|
|
4677
|
-
* Use it to visually separate content sections with a horizontal line.
|
|
4660
|
+
* The `Divider` component renders a styled horizontal rule (`<hr>`) element with Bulma helper class integration.
|
|
4678
4661
|
*
|
|
4679
4662
|
* @function
|
|
4680
4663
|
* @param {DividerProps} props - Props for the Divider component.
|
|
@@ -4694,11 +4677,7 @@ const Divider = ({ className, bgColor, ...props }) => {
|
|
|
4694
4677
|
};
|
|
4695
4678
|
|
|
4696
4679
|
/**
|
|
4697
|
-
* Emphasis component
|
|
4698
|
-
*
|
|
4699
|
-
* An Emphasis wraps the HTML `<em>` element with Bulma helper class integration.
|
|
4700
|
-
* Use it for text that has stress emphasis, affecting the meaning of the sentence.
|
|
4701
|
-
* For visual-only italic styling without semantic meaning, use CSS font-style: italic.
|
|
4680
|
+
* The `Emphasis` component renders a styled `<em>` element with Bulma helper class integration.
|
|
4702
4681
|
*
|
|
4703
4682
|
* @function
|
|
4704
4683
|
* @param {EmphasisProps} props - Props for the Emphasis component.
|
|
@@ -4736,11 +4715,7 @@ const FigureCaption = ({ className, textColor, bgColor, children, ...props }) =>
|
|
|
4736
4715
|
return (jsx("figcaption", { className: captionClasses || undefined, ...rest, children: children }));
|
|
4737
4716
|
};
|
|
4738
4717
|
/**
|
|
4739
|
-
* Figure component
|
|
4740
|
-
*
|
|
4741
|
-
* A Figure wraps the HTML `<figure>` element with Bulma helper class integration.
|
|
4742
|
-
* Use it to group self-contained content like images, illustrations, diagrams, or code snippets
|
|
4743
|
-
* with an optional caption via Figure.Caption.
|
|
4718
|
+
* The `Figure` component renders a styled `<figure>` element with Bulma helper class integration.
|
|
4744
4719
|
*
|
|
4745
4720
|
* @function
|
|
4746
4721
|
* @param {FigureProps} props - Props for the Figure component.
|
|
@@ -4770,21 +4745,19 @@ const Figure = withSubComponents(FigureComponent, {
|
|
|
4770
4745
|
}, 'Figure');
|
|
4771
4746
|
|
|
4772
4747
|
/**
|
|
4773
|
-
* IconText component
|
|
4774
|
-
*
|
|
4775
|
-
* Supports Bulma helper classes for styling, color, and layout. Can render a single icon with text or multiple icon/text pairs.
|
|
4748
|
+
* The `IconText` component provides a Bulma-styled horizontal arrangement of one or more `Icon` components and optional text.
|
|
4776
4749
|
*
|
|
4777
4750
|
* @function
|
|
4778
4751
|
* @param {IconTextProps} props - Props for the IconText component.
|
|
4779
4752
|
* @returns {JSX.Element} The rendered icon text element.
|
|
4780
4753
|
* @see {@link https://bulma.io/documentation/elements/icon/#icon-text | Bulma IconText documentation}
|
|
4781
4754
|
*/
|
|
4782
|
-
const IconTextComponent = ({ className, textColor, bgColor, iconProps, children, items, ...props }) => {
|
|
4755
|
+
const IconTextComponent = ({ className, textColor, color, bgColor, iconProps, children, items, ...props }) => {
|
|
4783
4756
|
/**
|
|
4784
4757
|
* Generates Bulma helper classes and separates out remaining props.
|
|
4785
4758
|
*/
|
|
4786
4759
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
4787
|
-
color: textColor,
|
|
4760
|
+
color: textColor ?? color,
|
|
4788
4761
|
backgroundColor: bgColor,
|
|
4789
4762
|
...props,
|
|
4790
4763
|
});
|
|
@@ -4795,23 +4768,19 @@ const IconTextComponent = ({ className, textColor, bgColor, iconProps, children,
|
|
|
4795
4768
|
const IconText = withSubComponents(IconTextComponent, { Icon }, 'IconText');
|
|
4796
4769
|
|
|
4797
4770
|
/**
|
|
4798
|
-
* Image component
|
|
4799
|
-
*
|
|
4800
|
-
* Supports fixed-size containers, aspect ratios, rounded images, retina images, and arbitrary children (e.g., iframe).
|
|
4801
|
-
*
|
|
4802
|
-
* The "as" prop allows rendering as "figure", "p", or "div" tags etc.
|
|
4771
|
+
* 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.
|
|
4803
4772
|
*
|
|
4804
4773
|
* @function
|
|
4805
4774
|
* @param {ImageProps} props - Props for the Image component.
|
|
4806
4775
|
* @returns {JSX.Element} The rendered image element.
|
|
4807
4776
|
* @see {@link https://bulma.io/documentation/elements/image/ | Bulma Image documentation}
|
|
4808
4777
|
*/
|
|
4809
|
-
const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, src, alt, children, ...props }) => {
|
|
4778
|
+
const Image = ({ as, className, textColor, color, bgColor, size, isRounded, isRetina, src, alt, children, ...props }) => {
|
|
4810
4779
|
/**
|
|
4811
4780
|
* Generates Bulma helper classes and separates out remaining props.
|
|
4812
4781
|
*/
|
|
4813
4782
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
4814
|
-
color: textColor,
|
|
4783
|
+
color: textColor ?? color,
|
|
4815
4784
|
backgroundColor: bgColor,
|
|
4816
4785
|
...props,
|
|
4817
4786
|
});
|
|
@@ -4838,10 +4807,7 @@ const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, s
|
|
|
4838
4807
|
};
|
|
4839
4808
|
|
|
4840
4809
|
/**
|
|
4841
|
-
* Link component
|
|
4842
|
-
*
|
|
4843
|
-
* A Link wraps the HTML `<a>` element with Bulma styling support and helper class integration.
|
|
4844
|
-
* Supports Bulma helper classes for additional styling like text color, background color, and layout.
|
|
4810
|
+
* The `Link` component renders a styled anchor (`<a>`) element with Bulma helper class integration.
|
|
4845
4811
|
*
|
|
4846
4812
|
* @function
|
|
4847
4813
|
* @param {LinkProps} props - Props for the Link component.
|
|
@@ -4865,12 +4831,7 @@ const Link = ({ className, textColor, bgColor, isActive, as: Component = 'a', ch
|
|
|
4865
4831
|
};
|
|
4866
4832
|
|
|
4867
4833
|
/**
|
|
4868
|
-
* ListItem component
|
|
4869
|
-
*
|
|
4870
|
-
* A ListItem wraps the HTML `<li>` element with Bulma helper class integration.
|
|
4871
|
-
* Use it inside UnorderedList or OrderedList components.
|
|
4872
|
-
* Supports Bulma helper classes for additional styling like text color, background color,
|
|
4873
|
-
* and spacing utilities.
|
|
4834
|
+
* The `ListItem` component renders a styled list item (`<li>`) element with Bulma helper class integration.
|
|
4874
4835
|
*
|
|
4875
4836
|
* @function
|
|
4876
4837
|
* @param {ListItemProps} props - Props for the ListItem component.
|
|
@@ -4891,9 +4852,7 @@ const ListItem = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
4891
4852
|
};
|
|
4892
4853
|
|
|
4893
4854
|
/**
|
|
4894
|
-
* Notification component
|
|
4895
|
-
*
|
|
4896
|
-
* Supports colors, light variants, a delete button, and arbitrary content.
|
|
4855
|
+
* The `Notification` component is a Bulma-styled alert/message area for providing feedback, warnings, or information to users.
|
|
4897
4856
|
*
|
|
4898
4857
|
* @function
|
|
4899
4858
|
* @param {NotificationProps} props - Props for the Notification component.
|
|
@@ -4901,6 +4860,7 @@ const ListItem = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
4901
4860
|
* @see {@link https://bulma.io/documentation/elements/notification/ | Bulma Notification documentation}
|
|
4902
4861
|
*/
|
|
4903
4862
|
const Notification = ({ className, color, textColor, isLight, hasDelete, onDelete, children, ...props }) => {
|
|
4863
|
+
warnUnstyledColor('Notification', color);
|
|
4904
4864
|
/**
|
|
4905
4865
|
* Generates Bulma helper classes and separates out remaining props.
|
|
4906
4866
|
*/
|
|
@@ -5098,11 +5058,7 @@ const NotificationContainer = ({ position = 'top-right' }) => {
|
|
|
5098
5058
|
};
|
|
5099
5059
|
|
|
5100
5060
|
/**
|
|
5101
|
-
* OrderedList component
|
|
5102
|
-
*
|
|
5103
|
-
* An OrderedList wraps the HTML `<ol>` element with Bulma helper class integration.
|
|
5104
|
-
* Supports Bulma helper classes for additional styling like text color, background color,
|
|
5105
|
-
* and spacing utilities. Also supports standard `<ol>` attributes like `type`, `start`, and `reversed`.
|
|
5061
|
+
* The `OrderedList` component renders a styled ordered list (`<ol>`) element with Bulma helper class integration.
|
|
5106
5062
|
*
|
|
5107
5063
|
* @function
|
|
5108
5064
|
* @param {OrderedListProps} props - Props for the OrderedList component.
|
|
@@ -5124,11 +5080,7 @@ const OrderedListComponent = ({ className, textColor, bgColor, children, ...prop
|
|
|
5124
5080
|
const OrderedList = withSubComponents(OrderedListComponent, { Item: ListItem }, 'OrderedList');
|
|
5125
5081
|
|
|
5126
5082
|
/**
|
|
5127
|
-
* Paragraph component
|
|
5128
|
-
*
|
|
5129
|
-
* A Paragraph wraps the HTML `<p>` element with Bulma helper class integration.
|
|
5130
|
-
* Supports Bulma helper classes for additional styling like text color, background color,
|
|
5131
|
-
* typography, and spacing utilities.
|
|
5083
|
+
* The `Paragraph` component renders a styled `<p>` element with Bulma helper class integration.
|
|
5132
5084
|
*
|
|
5133
5085
|
* @function
|
|
5134
5086
|
* @param {ParagraphProps} props - Props for the Paragraph component.
|
|
@@ -5149,11 +5101,7 @@ const Paragraph = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
5149
5101
|
};
|
|
5150
5102
|
|
|
5151
5103
|
/**
|
|
5152
|
-
* Pre component
|
|
5153
|
-
*
|
|
5154
|
-
* A Pre wraps the HTML `<pre>` element with Bulma helper class integration.
|
|
5155
|
-
* Use it for multi-line code blocks, ASCII art, or any content where whitespace
|
|
5156
|
-
* formatting must be preserved. Often used together with the Code component.
|
|
5104
|
+
* The `Pre` component renders a styled `<pre>` element with Bulma helper class integration.
|
|
5157
5105
|
*
|
|
5158
5106
|
* @function
|
|
5159
5107
|
* @param {PreProps} props - Props for the Pre component.
|
|
@@ -5171,9 +5119,7 @@ const Pre = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
5171
5119
|
};
|
|
5172
5120
|
|
|
5173
5121
|
/**
|
|
5174
|
-
* Progress component
|
|
5175
|
-
*
|
|
5176
|
-
* Supports Bulma color and size modifiers, value/max attributes, and optional custom content.
|
|
5122
|
+
* The `Progress` component displays a Bulma-styled progress bar.
|
|
5177
5123
|
*
|
|
5178
5124
|
* @function
|
|
5179
5125
|
* @param {ProgressProps} props - Props for the Progress component.
|
|
@@ -5181,6 +5127,7 @@ const Pre = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
5181
5127
|
* @see {@link https://bulma.io/documentation/elements/progress/ | Bulma Progress documentation}
|
|
5182
5128
|
*/
|
|
5183
5129
|
const Progress = ({ className, color, size, value, max, children, ...props }) => {
|
|
5130
|
+
warnUnstyledColor('Progress', color);
|
|
5184
5131
|
/**
|
|
5185
5132
|
* Generates Bulma helper classes and separates out remaining props.
|
|
5186
5133
|
*/
|
|
@@ -5196,10 +5143,7 @@ const Progress = ({ className, color, size, value, max, children, ...props }) =>
|
|
|
5196
5143
|
};
|
|
5197
5144
|
|
|
5198
5145
|
/**
|
|
5199
|
-
* Skeleton component
|
|
5200
|
-
*
|
|
5201
|
-
* Renders an animated placeholder that indicates content is loading.
|
|
5202
|
-
* Supports block and multi-line variants.
|
|
5146
|
+
* The `Skeleton` component provides a Bulma-styled skeleton loader for React applications, useful for indicating that content is loading.
|
|
5203
5147
|
*
|
|
5204
5148
|
* @function
|
|
5205
5149
|
* @param {SkeletonProps} props - Props for the Skeleton component.
|
|
@@ -5223,10 +5167,7 @@ const Skeleton = ({ className, variant = 'block', lines = 3, children, ...props
|
|
|
5223
5167
|
};
|
|
5224
5168
|
|
|
5225
5169
|
/**
|
|
5226
|
-
* Span component
|
|
5227
|
-
*
|
|
5228
|
-
* A Span wraps the HTML `<span>` element with Bulma helper class integration.
|
|
5229
|
-
* Useful for styling inline text with Bulma's color, typography, and spacing utilities.
|
|
5170
|
+
* The `Span` component renders a styled inline `<span>` element with Bulma helper class integration.
|
|
5230
5171
|
*
|
|
5231
5172
|
* @function
|
|
5232
5173
|
* @param {SpanProps} props - Props for the Span component.
|
|
@@ -5247,11 +5188,7 @@ const Span = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
5247
5188
|
};
|
|
5248
5189
|
|
|
5249
5190
|
/**
|
|
5250
|
-
* Strong component
|
|
5251
|
-
*
|
|
5252
|
-
* A Strong wraps the HTML `<strong>` element with Bulma helper class integration.
|
|
5253
|
-
* Use it for text that has strong importance, seriousness, or urgency.
|
|
5254
|
-
* For visual-only bold styling without semantic meaning, use Span with textWeight="bold".
|
|
5191
|
+
* The `Strong` component renders a styled `<strong>` element with Bulma helper class integration.
|
|
5255
5192
|
*
|
|
5256
5193
|
* @function
|
|
5257
5194
|
* @param {StrongProps} props - Props for the Strong component.
|
|
@@ -5279,9 +5216,7 @@ const validSubTitleElements = [
|
|
|
5279
5216
|
'p',
|
|
5280
5217
|
];
|
|
5281
5218
|
/**
|
|
5282
|
-
* SubTitle component
|
|
5283
|
-
*
|
|
5284
|
-
* Supports Bulma subtitle sizes and rendering as different HTML elements (h1-h6, p).
|
|
5219
|
+
* The `SubTitle` component renders a Bulma-styled subtitle (secondary heading), supporting sizes `1-6` and rendering as any heading or paragraph element (`h1-h6`, `p`).
|
|
5285
5220
|
*
|
|
5286
5221
|
* @function
|
|
5287
5222
|
* @param {SubTitleProps} props - Props for the SubTitle component.
|
|
@@ -5453,9 +5388,7 @@ const Th = ({ className, isAligned, width, color, children, ...props }) => {
|
|
|
5453
5388
|
};
|
|
5454
5389
|
|
|
5455
5390
|
/**
|
|
5456
|
-
* Table component
|
|
5457
|
-
*
|
|
5458
|
-
* Supports responsive, bordered, striped, narrow, hoverable, and fullwidth variants.
|
|
5391
|
+
* The `Table` component and its subcomponents provide a highly composable, Bulma-styled table system for React.
|
|
5459
5392
|
*
|
|
5460
5393
|
* @function
|
|
5461
5394
|
* @param {TableProps} props - Props for the Table component.
|
|
@@ -5505,9 +5438,7 @@ const validTagColors = [
|
|
|
5505
5438
|
];
|
|
5506
5439
|
const validTagSizes = ['normal', 'medium', 'large'];
|
|
5507
5440
|
/**
|
|
5508
|
-
* Tag component
|
|
5509
|
-
*
|
|
5510
|
-
* Supports colors, sizes, rounded, delete, and hoverable variants.
|
|
5441
|
+
* The `Tag` component renders a Bulma-styled label or badge.
|
|
5511
5442
|
*
|
|
5512
5443
|
* @function
|
|
5513
5444
|
* @param {TagProps} props - Props for the Tag component.
|
|
@@ -5534,9 +5465,7 @@ const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelet
|
|
|
5534
5465
|
};
|
|
5535
5466
|
|
|
5536
5467
|
/**
|
|
5537
|
-
* Tags component
|
|
5538
|
-
*
|
|
5539
|
-
* Supports addons and multiline variants.
|
|
5468
|
+
* The `Tags` component groups multiple `Tag` components together in a horizontal (or multiline) Bulma-styled container.
|
|
5540
5469
|
*
|
|
5541
5470
|
* @function
|
|
5542
5471
|
* @param {TagsProps} props - Props for the Tags component.
|
|
@@ -5560,9 +5489,7 @@ const Tags = withSubComponents(TagsComponent, { Tag }, 'Tags');
|
|
|
5560
5489
|
const validTitleSizes = ['1', '2', '3', '4', '5', '6'];
|
|
5561
5490
|
const validTitleElements = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
|
|
5562
5491
|
/**
|
|
5563
|
-
* Title component
|
|
5564
|
-
*
|
|
5565
|
-
* Supports sizes, spacing, and rendering as different HTML elements.
|
|
5492
|
+
* The `Title` component renders a Bulma-styled title (heading), supporting sizes `1`-`6`, spacing, and rendering as any heading or paragraph element (`h1`-`h6`, `p`).
|
|
5566
5493
|
*
|
|
5567
5494
|
* @function
|
|
5568
5495
|
* @param {TitleProps} props - Props for the Title component.
|
|
@@ -5594,11 +5521,7 @@ const Title = ({ className, size, isSpaced, as = 'h1', hasSkeleton, textColor, b
|
|
|
5594
5521
|
};
|
|
5595
5522
|
|
|
5596
5523
|
/**
|
|
5597
|
-
* UnorderedList component
|
|
5598
|
-
*
|
|
5599
|
-
* An UnorderedList wraps the HTML `<ul>` element with Bulma helper class integration.
|
|
5600
|
-
* Supports Bulma helper classes for additional styling like text color, background color,
|
|
5601
|
-
* and spacing utilities.
|
|
5524
|
+
* The `UnorderedList` component renders a styled unordered list (`<ul>`) element with Bulma helper class integration.
|
|
5602
5525
|
*
|
|
5603
5526
|
* @function
|
|
5604
5527
|
* @param {UnorderedListProps} props - Props for the UnorderedList component.
|
|
@@ -5668,16 +5591,7 @@ const checkboxColors = [
|
|
|
5668
5591
|
*/
|
|
5669
5592
|
const checkboxSizes = ['small', 'normal', 'medium', 'large'];
|
|
5670
5593
|
/**
|
|
5671
|
-
*
|
|
5672
|
-
*
|
|
5673
|
-
* Renders a custom-styled checkbox with a visual check indicator,
|
|
5674
|
-
* supporting colors, sizes, and various states. Inside a `<Checkboxes>`
|
|
5675
|
-
* group, Checkbox inherits `name` and (when the group is in controlled or
|
|
5676
|
-
* uncontrolled mode) derives its `checked` state from membership in the
|
|
5677
|
-
* group's `value` array. On click, dispatches the new array via the group's
|
|
5678
|
-
* `onChange`.
|
|
5679
|
-
*
|
|
5680
|
-
* Local props always win over group context.
|
|
5594
|
+
* The `Checkbox` component provides a Bulma-styled checkbox input.
|
|
5681
5595
|
*
|
|
5682
5596
|
* @function
|
|
5683
5597
|
* @param {CheckboxProps} props - Props for the Checkbox component.
|
|
@@ -5741,7 +5655,7 @@ Checkbox.displayName = 'Checkbox';
|
|
|
5741
5655
|
|
|
5742
5656
|
const allowedColors = [...validColors, 'inherit', 'current'];
|
|
5743
5657
|
/**
|
|
5744
|
-
*
|
|
5658
|
+
* The `Control` component is a Bulma-styled wrapper for form controls (`Input`, `Select`, `TextArea`, etc.), supporting icons (left/right), loading state, expansion, size, and Bulma helper props for layout and color.
|
|
5745
5659
|
*
|
|
5746
5660
|
* @function
|
|
5747
5661
|
* @param {ControlProps} props - Props for the Control component.
|
|
@@ -5843,8 +5757,7 @@ const FieldBody = ({ textColor, bgColor, className, children, ...props }) => {
|
|
|
5843
5757
|
return (jsx("div", { className: fieldBodyClass, ...props, ...rest, children: children }));
|
|
5844
5758
|
};
|
|
5845
5759
|
/**
|
|
5846
|
-
* Field component
|
|
5847
|
-
* Supports horizontal, grouped, and labelled fields.
|
|
5760
|
+
* The `Field` component is a Bulma-styled form field container.
|
|
5848
5761
|
*
|
|
5849
5762
|
* @function
|
|
5850
5763
|
* @param {FieldProps} props - Props for the Field component.
|
|
@@ -5927,20 +5840,7 @@ const Field = withSubComponents(FieldComponent, {
|
|
|
5927
5840
|
}, 'Field');
|
|
5928
5841
|
|
|
5929
5842
|
/**
|
|
5930
|
-
*
|
|
5931
|
-
* selected-values array for the entire group when given
|
|
5932
|
-
* `value`/`defaultValue`/`onChange`.
|
|
5933
|
-
*
|
|
5934
|
-
* Three usage modes:
|
|
5935
|
-
*
|
|
5936
|
-
* 1. **Name-only** — pass `name`. Each child Checkbox manages its own checked
|
|
5937
|
-
* state via `defaultChecked` or `checked`. Backwards compatible.
|
|
5938
|
-
*
|
|
5939
|
-
* 2. **Controlled** — pass `value` (array) and `onChange`. The group owns
|
|
5940
|
-
* selection; each child derives `checked` from `value.includes(my.value)`.
|
|
5941
|
-
*
|
|
5942
|
-
* 3. **Uncontrolled** — pass `defaultValue` (array) and optionally `onChange`.
|
|
5943
|
-
* The group manages internal state; `onChange` fires with the new array.
|
|
5843
|
+
* The `Checkboxes` component wraps multiple `Checkbox` components in a Bulma-styled group.
|
|
5944
5844
|
*
|
|
5945
5845
|
* @function
|
|
5946
5846
|
* @param {CheckboxesProps} props - Props for the Checkboxes component.
|
|
@@ -6002,8 +5902,26 @@ const CheckboxesComponent = ({ label, labelSize, labelProps, horizontal, message
|
|
|
6002
5902
|
const Checkboxes = withSubComponents(CheckboxesComponent, { Checkbox }, 'Checkboxes');
|
|
6003
5903
|
|
|
6004
5904
|
/**
|
|
6005
|
-
*
|
|
6006
|
-
*
|
|
5905
|
+
* Associates the convenience `label` prop with its control (#368): generates
|
|
5906
|
+
* an id for the control and returns labelProps carrying a matching `htmlFor`.
|
|
5907
|
+
* A user-supplied `id` is used as the target instead of the generated one, and
|
|
5908
|
+
* an explicit `labelProps.htmlFor` disables generation entirely — the user has
|
|
5909
|
+
* taken over the association. Internal; not part of the public API.
|
|
5910
|
+
*/
|
|
5911
|
+
function useAutoLabelId({ label, id, labelProps, rendersLabel, }) {
|
|
5912
|
+
// Called unconditionally per the rules of hooks; SSR-safe on React 18 and 19.
|
|
5913
|
+
const generatedId = useId();
|
|
5914
|
+
// Truthiness mirrors Field's own `if (label)` render gate.
|
|
5915
|
+
const active = !!label && rendersLabel;
|
|
5916
|
+
const controlId = id ?? (active && !labelProps?.htmlFor ? generatedId : undefined);
|
|
5917
|
+
const fieldLabelProps = active
|
|
5918
|
+
? { htmlFor: controlId, ...labelProps }
|
|
5919
|
+
: labelProps;
|
|
5920
|
+
return { controlId, fieldLabelProps };
|
|
5921
|
+
}
|
|
5922
|
+
|
|
5923
|
+
/**
|
|
5924
|
+
* The `File` component provides a Bulma-styled file input, supporting color, size, boxed/fullwidth/align styles, icons, "has name", and filename display.
|
|
6007
5925
|
*
|
|
6008
5926
|
* @function
|
|
6009
5927
|
* @param {FileProps} props - Props for the File component.
|
|
@@ -6014,6 +5932,12 @@ const File = forwardRef(({
|
|
|
6014
5932
|
// Field props
|
|
6015
5933
|
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, color, size, isBoxed, isFullwidth, isRight, isCentered, hasName, buttonLabel, iconLeft, iconRight, className, inputClassName, fileName, ...props }, ref) => {
|
|
6016
5934
|
const insideField = useInsideField();
|
|
5935
|
+
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
5936
|
+
label,
|
|
5937
|
+
id: props.id,
|
|
5938
|
+
labelProps,
|
|
5939
|
+
rendersLabel: !insideField,
|
|
5940
|
+
});
|
|
6017
5941
|
const { classPrefix } = useConfig();
|
|
6018
5942
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
6019
5943
|
color,
|
|
@@ -6043,9 +5967,9 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
|
|
|
6043
5967
|
[`is-${messageColor}`]: !!messageColor,
|
|
6044
5968
|
});
|
|
6045
5969
|
const messageEl = message ? jsx("p", { className: helpClass, children: message }) : null;
|
|
6046
|
-
const fileElement = (jsx("div", { className: fileClass, children: jsxs("label", { className: usePrefixedClassNames('file-label'), children: [jsx("input", { ref: ref, className: classNames(usePrefixedClassNames('file-input'), inputClassName), type: "file", ...rest }), jsxs("span", { className: usePrefixedClassNames('file-cta'), children: [iconLeft && (jsx("span", { className: prefixedClassNames(classPrefix, 'file-icon'), children: iconLeft })), jsx("span", { className: usePrefixedClassNames('file-label'), children: buttonLabel || 'Choose a file\u2026' }), iconRight && (jsx("span", { className: prefixedClassNames(classPrefix, 'file-icon'), children: iconRight }))] }), hasName && fileName && (jsx("span", { className: prefixedClassNames(classPrefix, 'file-name'), children: fileName }))] }) }));
|
|
5970
|
+
const fileElement = (jsx("div", { className: fileClass, children: jsxs("label", { className: usePrefixedClassNames('file-label'), children: [jsx("input", { ref: ref, className: classNames(usePrefixedClassNames('file-input'), inputClassName), type: "file", id: controlId, ...rest }), jsxs("span", { className: usePrefixedClassNames('file-cta'), children: [iconLeft && (jsx("span", { className: prefixedClassNames(classPrefix, 'file-icon'), children: iconLeft })), jsx("span", { className: usePrefixedClassNames('file-label'), children: buttonLabel || 'Choose a file\u2026' }), iconRight && (jsx("span", { className: prefixedClassNames(classPrefix, 'file-icon'), children: iconRight }))] }), hasName && fileName && (jsx("span", { className: prefixedClassNames(classPrefix, 'file-name'), children: fileName }))] }) }));
|
|
6047
5971
|
if (!insideField) {
|
|
6048
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
5972
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [fileElement, messageEl] }));
|
|
6049
5973
|
}
|
|
6050
5974
|
return (jsxs(Fragment, { children: [fileElement, messageEl] }));
|
|
6051
5975
|
});
|
|
@@ -6067,16 +5991,7 @@ const radioColors = [
|
|
|
6067
5991
|
*/
|
|
6068
5992
|
const radioSizes = ['small', 'normal', 'medium', 'large'];
|
|
6069
5993
|
/**
|
|
6070
|
-
*
|
|
6071
|
-
*
|
|
6072
|
-
* Renders a custom-styled radio button with a visual indicator,
|
|
6073
|
-
* supporting colors, sizes, and various states. Inside a `<Radios>` group,
|
|
6074
|
-
* Radio inherits `name` and (when the group is in controlled or uncontrolled
|
|
6075
|
-
* mode) derives its `checked` state from the group's `value` and dispatches
|
|
6076
|
-
* the group's `onChange` when clicked.
|
|
6077
|
-
*
|
|
6078
|
-
* Local props always win over group context (`name`, `checked`, `onChange`
|
|
6079
|
-
* on Radio override the group). Required for opt-out scenarios.
|
|
5994
|
+
* The `Radio` component provides a Bulma-styled radio button input with flexible labels and helper classes.
|
|
6080
5995
|
*
|
|
6081
5996
|
* @function
|
|
6082
5997
|
* @param {RadioProps} props - Props for the Radio component.
|
|
@@ -6134,21 +6049,7 @@ const Radio = forwardRef(({ color, size, className, children, textColor, disable
|
|
|
6134
6049
|
Radio.displayName = 'Radio';
|
|
6135
6050
|
|
|
6136
6051
|
/**
|
|
6137
|
-
*
|
|
6138
|
-
* state for the entire group when given `value`/`defaultValue`/`onChange`,
|
|
6139
|
-
* matching the pattern used by MUI's RadioGroup, Radix's RadioGroup, and React
|
|
6140
|
-
* Aria's RadioGroup.
|
|
6141
|
-
*
|
|
6142
|
-
* Three usage modes:
|
|
6143
|
-
*
|
|
6144
|
-
* 1. **Name-only** — pass `name`. Each child Radio manages its own checked
|
|
6145
|
-
* state via `defaultChecked` or `checked`. Backwards compatible.
|
|
6146
|
-
*
|
|
6147
|
-
* 2. **Controlled** — pass `value` and `onChange`. The group owns selection;
|
|
6148
|
-
* each child derives `checked` from `value === my.value`.
|
|
6149
|
-
*
|
|
6150
|
-
* 3. **Uncontrolled** — pass `defaultValue` (and optionally `onChange`). The
|
|
6151
|
-
* group manages internal state; `onChange` fires on selection change.
|
|
6052
|
+
* The `Radios` component wraps multiple `Radio` components in a Bulma-styled group.
|
|
6152
6053
|
*
|
|
6153
6054
|
* @function
|
|
6154
6055
|
* @param {RadiosProps} props - Props for the Radios component.
|
|
@@ -6227,10 +6128,7 @@ const switchColors = [
|
|
|
6227
6128
|
*/
|
|
6228
6129
|
const switchSizes = ['small', 'normal', 'medium', 'large'];
|
|
6229
6130
|
/**
|
|
6230
|
-
* Switch component for
|
|
6231
|
-
*
|
|
6232
|
-
* A styled checkbox that appears as a toggle switch, commonly used for
|
|
6233
|
-
* settings and preferences. Supports various colors, sizes, and styles.
|
|
6131
|
+
* The `Switch` component provides a toggle switch for boolean on/off states.
|
|
6234
6132
|
*
|
|
6235
6133
|
* @function
|
|
6236
6134
|
* @param {SwitchProps} props - Props for the Switch component.
|
|
@@ -6307,11 +6205,7 @@ function getTickPositions(min, max, step, ticks, marks) {
|
|
|
6307
6205
|
return positions;
|
|
6308
6206
|
}
|
|
6309
6207
|
/**
|
|
6310
|
-
* Slider component
|
|
6311
|
-
*
|
|
6312
|
-
* A styled range input that supports different sizes, colors,
|
|
6313
|
-
* optional value display, ticks/marks, range mode (dual thumb),
|
|
6314
|
-
* vertical orientation, and non-linear scale.
|
|
6208
|
+
* The `Slider` component provides a range slider input for selecting values within a range.
|
|
6315
6209
|
*
|
|
6316
6210
|
* @function
|
|
6317
6211
|
* @param {SliderProps} props - Props for the Slider component.
|
|
@@ -6368,6 +6262,14 @@ const Slider = forwardRef((props, ref) => {
|
|
|
6368
6262
|
const insideField = useInsideField();
|
|
6369
6263
|
const insideControl = useInsideControl();
|
|
6370
6264
|
const { bulmaHelperClasses, rest } = useBulmaClasses(restProps);
|
|
6265
|
+
// In range mode the low thumb carries `rest` (and any user id), so the
|
|
6266
|
+
// label targets it; each thumb keeps its own aria-label for AT.
|
|
6267
|
+
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
6268
|
+
label,
|
|
6269
|
+
id: restProps.id,
|
|
6270
|
+
labelProps,
|
|
6271
|
+
rendersLabel: !insideField,
|
|
6272
|
+
});
|
|
6371
6273
|
// Resolve tooltip mode: explicit tooltip prop takes precedence, else showOutput maps to 'auto'
|
|
6372
6274
|
const tooltipMode = tooltip ?? (showOutput ? 'auto' : 'hidden');
|
|
6373
6275
|
// --- Range mode state ---
|
|
@@ -6632,7 +6534,7 @@ const Slider = forwardRef((props, ref) => {
|
|
|
6632
6534
|
// --- Single slider ---
|
|
6633
6535
|
const sliderElement = !range ? (jsxs("div", { ref: wrapperRef, className: combinedClasses, style: wrapperStyle, children: [jsx("input", { ref: combinedRef, type: "range", min: min, max: max, step: step, value: currentSingle, disabled: disabled, onChange: handleSingleChange, onKeyDown: handleKeyDown, onMouseEnter: () => setShowTooltip(true), onMouseLeave: () => setShowTooltip(false), onFocus: () => setShowTooltip(true), onBlur: () => setShowTooltip(false), className: prefixedClassNames(classPrefix, 'slider-input'), style: {
|
|
6634
6536
|
'--slider-progress': `${progressSingle}%`,
|
|
6635
|
-
}, "aria-valuenow": currentSingle, "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel, ...getAriaProps(currentSingle), ...rest }), tooltipMode !== 'hidden' && (jsx("output", { ref: outputRef, className: prefixedClassNames(classPrefix, 'slider-output', {
|
|
6537
|
+
}, "aria-valuenow": currentSingle, "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel, ...getAriaProps(currentSingle), id: controlId, ...rest }), tooltipMode !== 'hidden' && (jsx("output", { ref: outputRef, className: prefixedClassNames(classPrefix, 'slider-output', {
|
|
6636
6538
|
'is-visible': showTipLow,
|
|
6637
6539
|
'is-flipped': flipped,
|
|
6638
6540
|
'is-flipped-left': isVertical && verticalFlippedLeft,
|
|
@@ -6660,7 +6562,7 @@ const Slider = forwardRef((props, ref) => {
|
|
|
6660
6562
|
: {
|
|
6661
6563
|
'--slider-progress-low': `${progressLow}%`,
|
|
6662
6564
|
'--slider-progress-high': `${progressHigh}%`,
|
|
6663
|
-
} }), jsx("input", { ref: combinedRef, type: "range", min: min, max: max, step: step, value: currentRange[0], disabled: disabled, onChange: handleRangeLowChange, onKeyDown: handleKeyDown, onMouseEnter: () => setShowTooltip(true), onMouseLeave: () => setShowTooltip(false), onFocus: () => setShowTooltip(true), onBlur: () => setShowTooltip(false), className: prefixedClassNames(classPrefix, 'slider-input', 'slider-input-low'), "aria-valuenow": currentRange[0], "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel?.[0] ?? 'Minimum value', ...getAriaProps(currentRange[0]), ...rest, ...(nameLow !== undefined ? { name: nameLow } : {}) }), jsx("input", { ref: inputHighRef, type: "range", min: min, max: max, step: step, value: currentRange[1], disabled: disabled, onChange: handleRangeHighChange, onMouseEnter: () => setShowTooltipHigh(true), onMouseLeave: () => setShowTooltipHigh(false), onFocus: () => setShowTooltipHigh(true), onBlur: () => setShowTooltipHigh(false), className: prefixedClassNames(classPrefix, 'slider-input', 'slider-input-high'), "aria-valuenow": currentRange[1], "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel?.[1] ?? 'Maximum value', ...getAriaProps(currentRange[1]), name: nameHigh }), tooltipMode !== 'hidden' && (jsx("output", { ref: outputRef, className: prefixedClassNames(classPrefix, 'slider-output', 'slider-output-low', {
|
|
6565
|
+
} }), jsx("input", { ref: combinedRef, type: "range", min: min, max: max, step: step, value: currentRange[0], disabled: disabled, onChange: handleRangeLowChange, onKeyDown: handleKeyDown, onMouseEnter: () => setShowTooltip(true), onMouseLeave: () => setShowTooltip(false), onFocus: () => setShowTooltip(true), onBlur: () => setShowTooltip(false), className: prefixedClassNames(classPrefix, 'slider-input', 'slider-input-low'), "aria-valuenow": currentRange[0], "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel?.[0] ?? 'Minimum value', ...getAriaProps(currentRange[0]), id: controlId, ...rest, ...(nameLow !== undefined ? { name: nameLow } : {}) }), jsx("input", { ref: inputHighRef, type: "range", min: min, max: max, step: step, value: currentRange[1], disabled: disabled, onChange: handleRangeHighChange, onMouseEnter: () => setShowTooltipHigh(true), onMouseLeave: () => setShowTooltipHigh(false), onFocus: () => setShowTooltipHigh(true), onBlur: () => setShowTooltipHigh(false), className: prefixedClassNames(classPrefix, 'slider-input', 'slider-input-high'), "aria-valuenow": currentRange[1], "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel?.[1] ?? 'Maximum value', ...getAriaProps(currentRange[1]), name: nameHigh }), tooltipMode !== 'hidden' && (jsx("output", { ref: outputRef, className: prefixedClassNames(classPrefix, 'slider-output', 'slider-output-low', {
|
|
6664
6566
|
'is-visible': showTipLow,
|
|
6665
6567
|
'is-flipped': flipped,
|
|
6666
6568
|
'is-flipped-left': isVertical && verticalFlippedLeft,
|
|
@@ -6706,7 +6608,7 @@ const Slider = forwardRef((props, ref) => {
|
|
|
6706
6608
|
content = jsx(Control, { children: content });
|
|
6707
6609
|
}
|
|
6708
6610
|
if (!insideField) {
|
|
6709
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
6611
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [content, messageEl] }));
|
|
6710
6612
|
}
|
|
6711
6613
|
return (jsxs(Fragment, { children: [content, messageEl] }));
|
|
6712
6614
|
});
|
|
@@ -6715,10 +6617,7 @@ Slider.displayName = 'Slider';
|
|
|
6715
6617
|
const ArrowDropUp = () => (jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: jsx("path", { d: "M7 14.5l5-5 5 5" }) }));
|
|
6716
6618
|
const ArrowDropDown = () => (jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: jsx("path", { d: "M7 9.5l5 5 5-5" }) }));
|
|
6717
6619
|
/**
|
|
6718
|
-
*
|
|
6719
|
-
*
|
|
6720
|
-
* Supports plus/minus buttons or a compact stepper variant,
|
|
6721
|
-
* with configurable min/max, step, and exponential stepping.
|
|
6620
|
+
* The `Numberinput` component provides a number input with increment/decrement buttons.
|
|
6722
6621
|
*
|
|
6723
6622
|
* @function
|
|
6724
6623
|
* @param {NumberinputProps} props - Props for the Numberinput component.
|
|
@@ -6747,6 +6646,13 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
|
|
|
6747
6646
|
const isStepper = variant === 'stepper';
|
|
6748
6647
|
const isAddons = compact || isStepper;
|
|
6749
6648
|
const effectiveControlsPosition = isStepper ? 'right' : controlsPosition;
|
|
6649
|
+
// The plusminus bare branch renders no Field and no label at all.
|
|
6650
|
+
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
6651
|
+
label,
|
|
6652
|
+
id: props.id,
|
|
6653
|
+
labelProps,
|
|
6654
|
+
rendersLabel: !insideField && (isStepper || !effectiveBare),
|
|
6655
|
+
});
|
|
6750
6656
|
// Clamp value to min/max
|
|
6751
6657
|
const clampValue = useCallback((val) => {
|
|
6752
6658
|
let clamped = val;
|
|
@@ -6845,12 +6751,12 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
|
|
|
6845
6751
|
}
|
|
6846
6752
|
};
|
|
6847
6753
|
// Shared input element
|
|
6848
|
-
const inputControl = (jsx("div", { className: expandedControlClasses, children: jsx("input", { ref: combinedRef, type: "number", className: inputClasses, value: currentValue ?? '', min: min, max: max, step: step, disabled: disabled, readOnly: !editable, onChange: handleInputChange, onKeyDown: handleKeyDown, "aria-valuenow": currentValue ?? undefined, "aria-valuemin": min, "aria-valuemax": max, ...rest }) }));
|
|
6754
|
+
const inputControl = (jsx("div", { className: expandedControlClasses, children: jsx("input", { ref: combinedRef, type: "number", className: inputClasses, value: currentValue ?? '', min: min, max: max, step: step, disabled: disabled, readOnly: !editable, onChange: handleInputChange, onKeyDown: handleKeyDown, "aria-valuenow": currentValue ?? undefined, "aria-valuemin": min, "aria-valuemax": max, id: controlId, ...rest }) }));
|
|
6849
6755
|
// Stepper variant
|
|
6850
6756
|
if (isStepper) {
|
|
6851
6757
|
const stepperElement = (jsxs("div", { className: combinedClasses, children: [inputControl, jsx("div", { className: controlClasses, children: jsxs("div", { className: stepperClasses, children: [jsx("button", { type: "button", className: stepperButtonClasses, onClick: handleIncrement, disabled: disabled || isAtMax, tabIndex: -1, "aria-label": "Increase value", children: jsx(ArrowDropUp, {}) }), jsx("button", { type: "button", className: stepperButtonClasses, onClick: handleDecrement, disabled: disabled || isAtMin, tabIndex: -1, "aria-label": "Decrease value", children: jsx(ArrowDropDown, {}) })] }) })] }));
|
|
6852
6758
|
if (!insideField) {
|
|
6853
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
6759
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [stepperElement, messageEl] }));
|
|
6854
6760
|
}
|
|
6855
6761
|
return (jsxs(Fragment, { children: [stepperElement, messageEl] }));
|
|
6856
6762
|
}
|
|
@@ -6884,7 +6790,7 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
|
|
|
6884
6790
|
numberinputElement = (jsxs("div", { className: combinedClasses, children: [decrementControl, inputControl, incrementControl] }));
|
|
6885
6791
|
}
|
|
6886
6792
|
if (!insideField) {
|
|
6887
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
6793
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [numberinputElement, messageEl] }));
|
|
6888
6794
|
}
|
|
6889
6795
|
return (jsxs(Fragment, { children: [numberinputElement, messageEl] }));
|
|
6890
6796
|
});
|
|
@@ -6907,11 +6813,7 @@ function getFillPercent(iconIndex, value) {
|
|
|
6907
6813
|
return Math.round((value - iconIndex) * 100);
|
|
6908
6814
|
}
|
|
6909
6815
|
/**
|
|
6910
|
-
* Rate component
|
|
6911
|
-
*
|
|
6912
|
-
* Provides an interactive rating system with customizable icons,
|
|
6913
|
-
* sizes, and display options. Works in controlled or uncontrolled modes.
|
|
6914
|
-
* Supports icon libraries, Bulma color variants, and fractional precision.
|
|
6816
|
+
* The `Rate` component provides a star/icon-based rating system.
|
|
6915
6817
|
*
|
|
6916
6818
|
* @function
|
|
6917
6819
|
* @param {RateProps} props - Props for the Rate component.
|
|
@@ -7142,10 +7044,7 @@ const Rate = forwardRef(({ label, labelSize, labelProps, horizontal, message, me
|
|
|
7142
7044
|
Rate.displayName = 'Rate';
|
|
7143
7045
|
|
|
7144
7046
|
/**
|
|
7145
|
-
* Autocomplete component with dropdown suggestions.
|
|
7146
|
-
*
|
|
7147
|
-
* Provides an input field with a dropdown of suggestions that filter
|
|
7148
|
-
* based on user input.
|
|
7047
|
+
* The `Autocomplete` component provides an input field with dropdown suggestions that filter based on user input.
|
|
7149
7048
|
*
|
|
7150
7049
|
* @function
|
|
7151
7050
|
* @param {AutocompleteProps} props - Props for the Autocomplete component.
|
|
@@ -7386,10 +7285,7 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
|
|
|
7386
7285
|
Autocomplete.displayName = 'Autocomplete';
|
|
7387
7286
|
|
|
7388
7287
|
/**
|
|
7389
|
-
* Taginput component for managing multiple tags.
|
|
7390
|
-
*
|
|
7391
|
-
* Allows users to create, edit, and remove tags with optional
|
|
7392
|
-
* autocomplete suggestions.
|
|
7288
|
+
* The `Taginput` component provides a tag/chip input field for managing multiple tags.
|
|
7393
7289
|
*
|
|
7394
7290
|
* @function
|
|
7395
7291
|
* @param {TaginputProps} props - Props for the Taginput component.
|
|
@@ -7807,10 +7703,7 @@ const TextAreaBase = forwardRef(({ color, size, isRounded, isStatic, isHovered,
|
|
|
7807
7703
|
TextAreaBase.displayName = 'TextAreaBase';
|
|
7808
7704
|
|
|
7809
7705
|
/**
|
|
7810
|
-
* Input
|
|
7811
|
-
*
|
|
7812
|
-
* Use this for typical form fields. For complex layouts (grouped fields,
|
|
7813
|
-
* addons, etc.), compose Field, Control, and Input directly.
|
|
7706
|
+
* The `Input` component provides a Bulma-styled text input, supporting colors, sizes, rounded corners, static/read-only state, hover/focus/loading states, and all Bulma helper props.
|
|
7814
7707
|
*
|
|
7815
7708
|
* @function
|
|
7816
7709
|
* @param {InputProps} props - Props for Input.
|
|
@@ -7841,26 +7734,29 @@ fieldClassName, controlClassName,
|
|
|
7841
7734
|
...inputProps }, ref) => {
|
|
7842
7735
|
const insideField = useInsideField();
|
|
7843
7736
|
const insideControl = useInsideControl();
|
|
7737
|
+
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
7738
|
+
label,
|
|
7739
|
+
id: inputProps.id,
|
|
7740
|
+
labelProps,
|
|
7741
|
+
rendersLabel: !insideField,
|
|
7742
|
+
});
|
|
7844
7743
|
const helpClass = usePrefixedClassNames('help', {
|
|
7845
7744
|
[`is-${messageColor}`]: !!messageColor,
|
|
7846
7745
|
});
|
|
7847
|
-
let content = jsx(InputBase, { ref: ref, ...inputProps });
|
|
7746
|
+
let content = jsx(InputBase, { ref: ref, id: controlId, ...inputProps });
|
|
7848
7747
|
if (!insideControl) {
|
|
7849
7748
|
content = (jsx(Control, { iconLeft: iconLeft, iconRight: iconRight, iconLeftName: iconLeftName, iconRightName: iconRightName, iconLeftSize: iconLeftSize, iconRightSize: iconRightSize, hasIconsLeft: hasIconsLeft, hasIconsRight: hasIconsRight, isLoading: isLoading, isExpanded: isExpanded, size: controlSize, className: controlClassName, children: content }));
|
|
7850
7749
|
}
|
|
7851
7750
|
const messageEl = message ? jsx("p", { className: helpClass, children: message }) : null;
|
|
7852
7751
|
if (!insideField) {
|
|
7853
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
7752
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [content, messageEl] }));
|
|
7854
7753
|
}
|
|
7855
7754
|
return (jsxs(Fragment, { children: [content, messageEl] }));
|
|
7856
7755
|
});
|
|
7857
7756
|
Input.displayName = 'Input';
|
|
7858
7757
|
|
|
7859
7758
|
/**
|
|
7860
|
-
* Select
|
|
7861
|
-
*
|
|
7862
|
-
* Use this for typical form fields. For complex layouts (grouped fields,
|
|
7863
|
-
* addons, etc.), compose Field, Control, and SelectBase directly.
|
|
7759
|
+
* The `Select` component provides a Bulma-styled dropdown for selecting one or more options.
|
|
7864
7760
|
*
|
|
7865
7761
|
* @function
|
|
7866
7762
|
* @param {SelectProps} props - Props for Select.
|
|
@@ -7888,26 +7784,29 @@ fieldClassName, controlClassName,
|
|
|
7888
7784
|
...selectProps }, ref) => {
|
|
7889
7785
|
const insideField = useInsideField();
|
|
7890
7786
|
const insideControl = useInsideControl();
|
|
7787
|
+
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
7788
|
+
label,
|
|
7789
|
+
id: selectProps.id,
|
|
7790
|
+
labelProps,
|
|
7791
|
+
rendersLabel: !insideField,
|
|
7792
|
+
});
|
|
7891
7793
|
const helpClass = usePrefixedClassNames('help', {
|
|
7892
7794
|
[`is-${messageColor}`]: !!messageColor,
|
|
7893
7795
|
});
|
|
7894
|
-
let content = jsx(SelectBase, { ref: ref, ...selectProps });
|
|
7796
|
+
let content = jsx(SelectBase, { ref: ref, id: controlId, ...selectProps });
|
|
7895
7797
|
if (!insideControl) {
|
|
7896
7798
|
content = (jsx(Control, { iconLeft: iconLeft, iconLeftName: iconLeftName, iconLeftSize: iconLeftSize, hasIconsLeft: hasIconsLeft, isExpanded: isExpanded, size: controlSize, className: controlClassName, children: content }));
|
|
7897
7799
|
}
|
|
7898
7800
|
const messageEl = message ? jsx("p", { className: helpClass, children: message }) : null;
|
|
7899
7801
|
if (!insideField) {
|
|
7900
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
7802
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [content, messageEl] }));
|
|
7901
7803
|
}
|
|
7902
7804
|
return (jsxs(Fragment, { children: [content, messageEl] }));
|
|
7903
7805
|
});
|
|
7904
7806
|
Select.displayName = 'Select';
|
|
7905
7807
|
|
|
7906
7808
|
/**
|
|
7907
|
-
* TextArea
|
|
7908
|
-
*
|
|
7909
|
-
* Use this for typical form fields. For complex layouts (grouped fields,
|
|
7910
|
-
* addons, etc.), compose Field, Control, and TextAreaBase directly.
|
|
7809
|
+
* The `TextArea` component provides a Bulma-styled multi-line text input, supporting color, size, rounded corners, static/read-only state, hover/focus/loading states, fixed size, and all Bulma helper props.
|
|
7911
7810
|
*
|
|
7912
7811
|
* @function
|
|
7913
7812
|
* @param {TextAreaProps} props - Props for TextArea.
|
|
@@ -7936,16 +7835,22 @@ fieldClassName, controlClassName,
|
|
|
7936
7835
|
...textAreaProps }, ref) => {
|
|
7937
7836
|
const insideField = useInsideField();
|
|
7938
7837
|
const insideControl = useInsideControl();
|
|
7838
|
+
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
7839
|
+
label,
|
|
7840
|
+
id: textAreaProps.id,
|
|
7841
|
+
labelProps,
|
|
7842
|
+
rendersLabel: !insideField,
|
|
7843
|
+
});
|
|
7939
7844
|
const helpClass = usePrefixedClassNames('help', {
|
|
7940
7845
|
[`is-${messageColor}`]: !!messageColor,
|
|
7941
7846
|
});
|
|
7942
|
-
let content = jsx(TextAreaBase, { ref: ref, ...textAreaProps });
|
|
7847
|
+
let content = jsx(TextAreaBase, { ref: ref, id: controlId, ...textAreaProps });
|
|
7943
7848
|
if (!insideControl) {
|
|
7944
7849
|
content = (jsx(Control, { isLoading: controlIsLoading, size: controlSize, className: controlClassName, children: content }));
|
|
7945
7850
|
}
|
|
7946
7851
|
const messageEl = message ? jsx("p", { className: helpClass, children: message }) : null;
|
|
7947
7852
|
if (!insideField) {
|
|
7948
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
7853
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [content, messageEl] }));
|
|
7949
7854
|
}
|
|
7950
7855
|
return (jsxs(Fragment, { children: [content, messageEl] }));
|
|
7951
7856
|
});
|
|
@@ -9603,11 +9508,7 @@ const DateInputBase = forwardRef((props, ref) => {
|
|
|
9603
9508
|
DateInputBase.displayName = 'DateInputBase';
|
|
9604
9509
|
|
|
9605
9510
|
/**
|
|
9606
|
-
* DateInput is a form input that opens a popover calendar for date selection.
|
|
9607
|
-
* Uses native `Date` and `Intl` only (no extra dependencies). Supports min/max
|
|
9608
|
-
* bounds, disabled-date predicates, custom formats, locale-aware day/month
|
|
9609
|
-
* names, an inline mode, and a native `<input type="date">` fallback for touch
|
|
9610
|
-
* devices.
|
|
9511
|
+
* The `DateInput` component is a form input that opens a popover calendar for date selection.
|
|
9611
9512
|
*
|
|
9612
9513
|
* @function
|
|
9613
9514
|
* @param {DateInputProps} props - Props for the DateInput.
|
|
@@ -9626,12 +9527,19 @@ DateInputBase.displayName = 'DateInputBase';
|
|
|
9626
9527
|
const DateInput = forwardRef(({ label, labelSize, labelProps, horizontal, iconLeft, iconRight, iconLeftName = 'calendar', iconRightName, iconLeftSize, iconRightSize, hasIconsLeft, hasIconsRight, isLoading, isExpanded, controlSize, message, messageColor, fieldClassName, controlClassName, ...baseProps }, ref) => {
|
|
9627
9528
|
const insideField = useInsideField();
|
|
9628
9529
|
const insideControl = useInsideControl();
|
|
9530
|
+
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
9531
|
+
label,
|
|
9532
|
+
id: baseProps.id,
|
|
9533
|
+
labelProps,
|
|
9534
|
+
// Inline mode renders a bare calendar with no input to label.
|
|
9535
|
+
rendersLabel: !insideField && !baseProps.inline,
|
|
9536
|
+
});
|
|
9629
9537
|
const helpClass = usePrefixedClassNames('help', {
|
|
9630
9538
|
[`is-${messageColor}`]: !!messageColor,
|
|
9631
9539
|
});
|
|
9632
9540
|
// The right-side launcher is on by default; suppress it while the Control
|
|
9633
9541
|
// shows its loading spinner (also on the right) unless explicitly set.
|
|
9634
|
-
let content = (jsx(DateInputBase, { ref: ref, ...baseProps, triggerIcon: baseProps.triggerIcon ?? !isLoading }));
|
|
9542
|
+
let content = (jsx(DateInputBase, { ref: ref, id: controlId, ...baseProps, triggerIcon: baseProps.triggerIcon ?? !isLoading }));
|
|
9635
9543
|
// Inline mode renders a bare calendar with no input, so the Control's
|
|
9636
9544
|
// icon-left container has nothing to anchor to. Skip the Control wrap.
|
|
9637
9545
|
if (!insideControl && !baseProps.inline) {
|
|
@@ -9639,7 +9547,7 @@ const DateInput = forwardRef(({ label, labelSize, labelProps, horizontal, iconLe
|
|
|
9639
9547
|
}
|
|
9640
9548
|
const messageEl = message ? jsx("p", { className: helpClass, children: message }) : null;
|
|
9641
9549
|
if (!insideField) {
|
|
9642
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
9550
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [content, messageEl] }));
|
|
9643
9551
|
}
|
|
9644
9552
|
return (jsxs(Fragment, { children: [content, messageEl] }));
|
|
9645
9553
|
});
|
|
@@ -10695,10 +10603,7 @@ const TimeInputBase = forwardRef((props, ref) => {
|
|
|
10695
10603
|
TimeInputBase.displayName = 'TimeInputBase';
|
|
10696
10604
|
|
|
10697
10605
|
/**
|
|
10698
|
-
* TimeInput is a form input that opens a popover spinner for time-of-day
|
|
10699
|
-
* selection. Supports 12h/24h, optional seconds, custom step increments,
|
|
10700
|
-
* min/max bounds, an unselectable-times predicate, and a native
|
|
10701
|
-
* `<input type="time">` fallback for touch devices.
|
|
10606
|
+
* The `TimeInput` component is a form input that opens a popover spinner for time-of-day selection.
|
|
10702
10607
|
*
|
|
10703
10608
|
* @function
|
|
10704
10609
|
* @param {TimeInputProps} props
|
|
@@ -10713,12 +10618,19 @@ TimeInputBase.displayName = 'TimeInputBase';
|
|
|
10713
10618
|
const TimeInput = forwardRef(({ label, labelSize, labelProps, horizontal, iconLeft, iconRight, iconLeftName = 'clock', iconRightName, iconLeftSize, iconRightSize, hasIconsLeft, hasIconsRight, isLoading, isExpanded, controlSize, message, messageColor, fieldClassName, controlClassName, ...baseProps }, ref) => {
|
|
10714
10619
|
const insideField = useInsideField();
|
|
10715
10620
|
const insideControl = useInsideControl();
|
|
10621
|
+
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
10622
|
+
label,
|
|
10623
|
+
id: baseProps.id,
|
|
10624
|
+
labelProps,
|
|
10625
|
+
// Inline mode renders a bare panel with no input to label.
|
|
10626
|
+
rendersLabel: !insideField && !baseProps.inline,
|
|
10627
|
+
});
|
|
10716
10628
|
const helpClass = usePrefixedClassNames('help', {
|
|
10717
10629
|
[`is-${messageColor}`]: !!messageColor,
|
|
10718
10630
|
});
|
|
10719
10631
|
// The right-side launcher is on by default; suppress it while the Control
|
|
10720
10632
|
// shows its loading spinner (also on the right) unless explicitly set.
|
|
10721
|
-
let content = (jsx(TimeInputBase, { ref: ref, ...baseProps, triggerIcon: baseProps.triggerIcon ?? !isLoading }));
|
|
10633
|
+
let content = (jsx(TimeInputBase, { ref: ref, id: controlId, ...baseProps, triggerIcon: baseProps.triggerIcon ?? !isLoading }));
|
|
10722
10634
|
// Inline mode renders a bare panel with no input, so the Control's
|
|
10723
10635
|
// icon-left container has nothing to anchor to. Skip the Control wrap.
|
|
10724
10636
|
if (!insideControl && !baseProps.inline) {
|
|
@@ -10726,7 +10638,7 @@ const TimeInput = forwardRef(({ label, labelSize, labelProps, horizontal, iconLe
|
|
|
10726
10638
|
}
|
|
10727
10639
|
const messageEl = message ? jsx("p", { className: helpClass, children: message }) : null;
|
|
10728
10640
|
if (!insideField) {
|
|
10729
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
10641
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [content, messageEl] }));
|
|
10730
10642
|
}
|
|
10731
10643
|
return (jsxs(Fragment, { children: [content, messageEl] }));
|
|
10732
10644
|
});
|
|
@@ -10983,9 +10895,7 @@ const DateTimeInputBase = forwardRef((props, ref) => {
|
|
|
10983
10895
|
DateTimeInputBase.displayName = 'DateTimeInputBase';
|
|
10984
10896
|
|
|
10985
10897
|
/**
|
|
10986
|
-
* DateTimeInput
|
|
10987
|
-
* (above) and a time spinner (below). Footer offers Today / Now / Clear / OK.
|
|
10988
|
-
* Includes a native `<input type="datetime-local">` fallback for touch devices.
|
|
10898
|
+
* The `DateTimeInput` combines a calendar and a time **wheel spinner** in a single popover — an iOS-style layout.
|
|
10989
10899
|
*
|
|
10990
10900
|
* @function
|
|
10991
10901
|
* @param {DateTimeInputProps} props
|
|
@@ -11004,12 +10914,19 @@ DateTimeInputBase.displayName = 'DateTimeInputBase';
|
|
|
11004
10914
|
const DateTimeInput = forwardRef(({ label, labelSize, labelProps, horizontal, iconLeft, iconRight, iconLeftName = 'calendar-alt', iconRightName, iconLeftSize, iconRightSize, hasIconsLeft, hasIconsRight, isLoading, isExpanded, controlSize, message, messageColor, fieldClassName, controlClassName, ...baseProps }, ref) => {
|
|
11005
10915
|
const insideField = useInsideField();
|
|
11006
10916
|
const insideControl = useInsideControl();
|
|
10917
|
+
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
10918
|
+
label,
|
|
10919
|
+
id: baseProps.id,
|
|
10920
|
+
labelProps,
|
|
10921
|
+
// Inline mode renders a bare picker with no input to label.
|
|
10922
|
+
rendersLabel: !insideField && !baseProps.inline,
|
|
10923
|
+
});
|
|
11007
10924
|
const helpClass = usePrefixedClassNames('help', {
|
|
11008
10925
|
[`is-${messageColor}`]: !!messageColor,
|
|
11009
10926
|
});
|
|
11010
10927
|
// The right-side launcher is on by default; suppress it while the Control
|
|
11011
10928
|
// shows its loading spinner (also on the right) unless explicitly set.
|
|
11012
|
-
let content = (jsx(DateTimeInputBase, { ref: ref, ...baseProps, triggerIcon: baseProps.triggerIcon ?? !isLoading }));
|
|
10929
|
+
let content = (jsx(DateTimeInputBase, { ref: ref, id: controlId, ...baseProps, triggerIcon: baseProps.triggerIcon ?? !isLoading }));
|
|
11013
10930
|
// Inline mode renders a bare picker with no input, so the Control's
|
|
11014
10931
|
// icon-left container has nothing to anchor to. Skip the Control wrap.
|
|
11015
10932
|
if (!insideControl && !baseProps.inline) {
|
|
@@ -11017,14 +10934,14 @@ const DateTimeInput = forwardRef(({ label, labelSize, labelProps, horizontal, ic
|
|
|
11017
10934
|
}
|
|
11018
10935
|
const messageEl = message ? jsx("p", { className: helpClass, children: message }) : null;
|
|
11019
10936
|
if (!insideField) {
|
|
11020
|
-
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps:
|
|
10937
|
+
return (jsxs(Field, { label: label, labelSize: labelSize, labelProps: fieldLabelProps, horizontal: horizontal, className: fieldClassName, children: [content, messageEl] }));
|
|
11021
10938
|
}
|
|
11022
10939
|
return (jsxs(Fragment, { children: [content, messageEl] }));
|
|
11023
10940
|
});
|
|
11024
10941
|
DateTimeInput.displayName = 'DateTimeInput';
|
|
11025
10942
|
|
|
11026
10943
|
/**
|
|
11027
|
-
*
|
|
10944
|
+
* The `Cell` component provides a single Bulma grid cell for use inside the [`Grid`](./grid.md) component.
|
|
11028
10945
|
*
|
|
11029
10946
|
* @function
|
|
11030
10947
|
* @param {CellProps} props - Props for the Cell component.
|
|
@@ -11052,7 +10969,7 @@ const Cell = ({ colStart, colFromEnd, colSpan, rowStart, rowFromEnd, rowSpan, cl
|
|
|
11052
10969
|
};
|
|
11053
10970
|
|
|
11054
10971
|
/**
|
|
11055
|
-
*
|
|
10972
|
+
* The `Grid` component provides Bulma's advanced CSS Grid layout for complex, modern layouts.
|
|
11056
10973
|
*
|
|
11057
10974
|
* @function
|
|
11058
10975
|
* @param {GridProps} props - Props for the Grid component.
|
|
@@ -11774,17 +11691,16 @@ const Theme = ({ bulmaVars = {}, children, className, isRoot = false, colorMode,
|
|
|
11774
11691
|
};
|
|
11775
11692
|
|
|
11776
11693
|
/**
|
|
11777
|
-
* Container component for Bulma.
|
|
11778
|
-
* Adds optional responsive, fluid, and color support, including is-max-* and breakpoint classes.
|
|
11694
|
+
* The `Container` component provides a responsive and flexible layout wrapper for your Bulma React UI.
|
|
11779
11695
|
*
|
|
11780
11696
|
* @function
|
|
11781
11697
|
* @param {ContainerProps} props - Props for the Container component.
|
|
11782
11698
|
* @returns {JSX.Element} The rendered container.
|
|
11783
11699
|
* @see {@link https://bulma.io/documentation/layout/container/ | Bulma Container documentation}
|
|
11784
11700
|
*/
|
|
11785
|
-
const Container = ({ className, textColor, bgColor, fluid, widescreen, fullhd, breakpoint, isMax, children, ...props }) => {
|
|
11701
|
+
const Container = ({ className, textColor, color, bgColor, fluid, widescreen, fullhd, breakpoint, isMax, children, ...props }) => {
|
|
11786
11702
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
11787
|
-
color: textColor,
|
|
11703
|
+
color: textColor ?? color,
|
|
11788
11704
|
backgroundColor: bgColor,
|
|
11789
11705
|
...props,
|
|
11790
11706
|
});
|
|
@@ -11815,7 +11731,7 @@ const Container = ({ className, textColor, bgColor, fluid, widescreen, fullhd, b
|
|
|
11815
11731
|
};
|
|
11816
11732
|
|
|
11817
11733
|
/**
|
|
11818
|
-
*
|
|
11734
|
+
* The `Footer` component provides a semantic and accessible site footer for your Bulma React UI.
|
|
11819
11735
|
*
|
|
11820
11736
|
* @function
|
|
11821
11737
|
* @param {FooterProps} props - Props for the Footer component.
|
|
@@ -11840,7 +11756,7 @@ const Footer = ({ as = 'footer', className, children, color, bgColor, textColor,
|
|
|
11840
11756
|
};
|
|
11841
11757
|
|
|
11842
11758
|
/**
|
|
11843
|
-
*
|
|
11759
|
+
* The `Hero` component provides a responsive, flexible, and visually striking section for your Bulma React UI.
|
|
11844
11760
|
*
|
|
11845
11761
|
* @function
|
|
11846
11762
|
* @param {HeroProps} props - Props for the Hero component.
|
|
@@ -11848,6 +11764,7 @@ const Footer = ({ as = 'footer', className, children, color, bgColor, textColor,
|
|
|
11848
11764
|
* @see {@link https://bulma.io/documentation/layout/hero/ | Bulma Hero documentation}
|
|
11849
11765
|
*/
|
|
11850
11766
|
const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
|
|
11767
|
+
warnUnstyledColor('Hero', color, ['inherit', 'current']);
|
|
11851
11768
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
11852
11769
|
backgroundColor: bgColor,
|
|
11853
11770
|
...props,
|
|
@@ -11861,7 +11778,7 @@ const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar,
|
|
|
11861
11778
|
return (jsx("section", { className: heroClasses, ...rest, children: children }));
|
|
11862
11779
|
};
|
|
11863
11780
|
/**
|
|
11864
|
-
*
|
|
11781
|
+
* Top bar for navigation or branding.
|
|
11865
11782
|
*
|
|
11866
11783
|
* @function
|
|
11867
11784
|
* @param {HeroHeadProps} props - Props for the HeroHead component.
|
|
@@ -11878,7 +11795,7 @@ const HeroHead = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
11878
11795
|
return (jsx("div", { className: heroHeadClasses, ...rest, children: children }));
|
|
11879
11796
|
};
|
|
11880
11797
|
/**
|
|
11881
|
-
*
|
|
11798
|
+
* Main content area, vertically centered by default.
|
|
11882
11799
|
*
|
|
11883
11800
|
* @function
|
|
11884
11801
|
* @param {HeroBodyProps} props - Props for the HeroBody component.
|
|
@@ -11895,7 +11812,7 @@ const HeroBody = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
11895
11812
|
return (jsx("div", { className: heroBodyClasses, ...rest, children: children }));
|
|
11896
11813
|
};
|
|
11897
11814
|
/**
|
|
11898
|
-
*
|
|
11815
|
+
* Bottom bar for tabs or actions.
|
|
11899
11816
|
*
|
|
11900
11817
|
* @function
|
|
11901
11818
|
* @param {HeroFootProps} props - Props for the HeroFoot component.
|
|
@@ -11919,7 +11836,7 @@ const Hero = withSubComponents(HeroComponent, {
|
|
|
11919
11836
|
}, 'Hero');
|
|
11920
11837
|
|
|
11921
11838
|
/**
|
|
11922
|
-
*
|
|
11839
|
+
* The `Level` component provides a flexible horizontal layout for your Bulma React UI, perfect for aligning items on the left and right, distributing items evenly, or centering statistics and controls.
|
|
11923
11840
|
*
|
|
11924
11841
|
* @function
|
|
11925
11842
|
* @param {LevelProps} props - Props for the Level component.
|
|
@@ -11939,7 +11856,7 @@ const LevelComponent = ({ isMobile, className, children, color, bgColor, textCol
|
|
|
11939
11856
|
return (jsx("nav", { className: levelClasses, ...rest, children: children }));
|
|
11940
11857
|
};
|
|
11941
11858
|
/**
|
|
11942
|
-
*
|
|
11859
|
+
* Left-aligned content.
|
|
11943
11860
|
*
|
|
11944
11861
|
* @function
|
|
11945
11862
|
* @param {LevelLeftProps} props - Props for the LevelLeft component.
|
|
@@ -11956,7 +11873,7 @@ const LevelLeft = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
11956
11873
|
return (jsx("div", { className: levelLeftClasses, ...rest, children: children }));
|
|
11957
11874
|
};
|
|
11958
11875
|
/**
|
|
11959
|
-
*
|
|
11876
|
+
* Right-aligned content.
|
|
11960
11877
|
*
|
|
11961
11878
|
* @function
|
|
11962
11879
|
* @param {LevelRightProps} props - Props for the LevelRight component.
|
|
@@ -11973,7 +11890,7 @@ const LevelRight = ({ className, children, color, bgColor, textColor, ...props }
|
|
|
11973
11890
|
return (jsx("div", { className: levelRightClasses, ...rest, children: children }));
|
|
11974
11891
|
};
|
|
11975
11892
|
/**
|
|
11976
|
-
*
|
|
11893
|
+
* Individual item, can be rendered as `div`, `p`, or `a`.
|
|
11977
11894
|
*
|
|
11978
11895
|
* @function
|
|
11979
11896
|
* @param {LevelItemProps} props - Props for the LevelItem component.
|
|
@@ -12003,7 +11920,7 @@ const Level = withSubComponents(LevelComponent, {
|
|
|
12003
11920
|
}, 'Level');
|
|
12004
11921
|
|
|
12005
11922
|
/**
|
|
12006
|
-
*
|
|
11923
|
+
* The `Media` component implements Bulma’s powerful media object layout for React.
|
|
12007
11924
|
*
|
|
12008
11925
|
* @function
|
|
12009
11926
|
* @param {MediaProps} props - Props for the Media component.
|
|
@@ -12022,7 +11939,7 @@ const MediaComponent = ({ as = 'article', className, children, color, bgColor, t
|
|
|
12022
11939
|
return (jsx(Tag, { className: mediaClasses, ...rest, children: children }));
|
|
12023
11940
|
};
|
|
12024
11941
|
/**
|
|
12025
|
-
*
|
|
11942
|
+
* For avatars, thumbnails, icons (renders as `figure` or `div`)
|
|
12026
11943
|
*
|
|
12027
11944
|
* @function
|
|
12028
11945
|
* @param {MediaLeftProps} props - Props for the MediaLeft component.
|
|
@@ -12040,7 +11957,7 @@ const MediaLeft = ({ as = 'figure', className, children, color, bgColor, textCol
|
|
|
12040
11957
|
return (jsx(Tag, { className: mediaLeftClasses, ...rest, children: children }));
|
|
12041
11958
|
};
|
|
12042
11959
|
/**
|
|
12043
|
-
*
|
|
11960
|
+
* Main content (renders as `div`)
|
|
12044
11961
|
*
|
|
12045
11962
|
* @function
|
|
12046
11963
|
* @param {MediaContentProps} props - Props for the MediaContent component.
|
|
@@ -12057,7 +11974,7 @@ const MediaContent = ({ className, children, color, bgColor, textColor, ...props
|
|
|
12057
11974
|
return (jsx("div", { className: mediaContentClasses, ...rest, children: children }));
|
|
12058
11975
|
};
|
|
12059
11976
|
/**
|
|
12060
|
-
*
|
|
11977
|
+
* Actions or controls (renders as `div`)
|
|
12061
11978
|
*
|
|
12062
11979
|
* @function
|
|
12063
11980
|
* @param {MediaRightProps} props - Props for the MediaRight component.
|
|
@@ -12081,7 +11998,7 @@ const Media = withSubComponents(MediaComponent, {
|
|
|
12081
11998
|
}, 'Media');
|
|
12082
11999
|
|
|
12083
12000
|
/**
|
|
12084
|
-
*
|
|
12001
|
+
* The `Section` component provides vertical spacing and visual separation for your Bulma React UI.
|
|
12085
12002
|
*
|
|
12086
12003
|
* @function
|
|
12087
12004
|
* @param {SectionProps} props - Props for the Section component.
|