@allxsmith/bestax-bulma 5.9.1 → 5.11.0
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/dist/index.cjs.js +208 -61
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +204 -62
- package/dist/index.esm.js.map +1 -1
- package/dist/types/columns/Column.d.ts +2 -2
- package/dist/types/components/Card.d.ts +57 -10
- package/dist/types/components/Sidebar.d.ts +2 -0
- package/dist/types/components/Tabs.d.ts +4 -0
- package/dist/types/elements/Box.d.ts +8 -3
- package/dist/types/elements/Button.d.ts +2 -0
- package/dist/types/elements/SubTitle.d.ts +3 -4
- package/dist/types/elements/Table.d.ts +2 -0
- package/dist/types/elements/Tag.d.ts +2 -0
- package/dist/types/elements/Title.d.ts +3 -4
- package/dist/types/form/File.d.ts +2 -0
- package/dist/types/form/Numberinput.d.ts +4 -0
- package/dist/types/form/SelectBase.d.ts +2 -0
- package/dist/types/form/Taginput.d.ts +4 -0
- package/dist/types/helpers/Theme.d.ts +1 -1
- package/dist/types/helpers/bulmaClassHelpers.d.ts +9 -0
- package/dist/types/helpers/mergeBulmaStyles.d.ts +17 -0
- package/dist/types/helpers/useBulmaClasses.d.ts +25 -8
- package/dist/types/helpers/useColorClasses.d.ts +43 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/layout/Container.d.ts +8 -3
- package/dist/types/layout/Footer.d.ts +8 -3
- package/dist/types/layout/Hero.d.ts +29 -9
- package/dist/types/layout/Section.d.ts +8 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -244,6 +244,22 @@ const validColorShades = [
|
|
|
244
244
|
'bold',
|
|
245
245
|
'on-scheme',
|
|
246
246
|
];
|
|
247
|
+
/**
|
|
248
|
+
* Valid Bulma scheme color names for scheme-aware backgrounds.
|
|
249
|
+
*
|
|
250
|
+
* Bulma ships no `has-background-scheme-*` helper classes, so these values
|
|
251
|
+
* never emit a class — components render them as a dark-mode-safe inline
|
|
252
|
+
* `background-color: var(--bulma-<value>)` style instead.
|
|
253
|
+
* @example 'scheme-main', 'scheme-main-bis', 'scheme-invert'
|
|
254
|
+
*/
|
|
255
|
+
const validSchemeColors = [
|
|
256
|
+
'scheme-main',
|
|
257
|
+
'scheme-main-bis',
|
|
258
|
+
'scheme-main-ter',
|
|
259
|
+
'scheme-invert',
|
|
260
|
+
'scheme-invert-bis',
|
|
261
|
+
'scheme-invert-ter',
|
|
262
|
+
];
|
|
247
263
|
/**
|
|
248
264
|
* Valid Bulma size classes for margins and paddings.
|
|
249
265
|
* @example '0', '1', 'auto'
|
|
@@ -435,6 +451,10 @@ const createBulmaClassHelpers = (classPrefix, viewport) => {
|
|
|
435
451
|
/**
|
|
436
452
|
* A hook that generates Bulma text and background color helper classes.
|
|
437
453
|
*
|
|
454
|
+
* Scheme background values (`scheme-main`, `scheme-main-bis`, …) are dropped
|
|
455
|
+
* from class emission — Bulma ships no `has-background-scheme-*` classes; use
|
|
456
|
+
* {@link useColorStyles} to render them as an inline style.
|
|
457
|
+
*
|
|
438
458
|
* @function useColorClasses
|
|
439
459
|
* @param props - Color-related Bulma helper props.
|
|
440
460
|
* @returns A space-separated string of color helper classes.
|
|
@@ -471,6 +491,38 @@ const useColorClasses = (props) => {
|
|
|
471
491
|
return classNames(classes);
|
|
472
492
|
}, [classPrefix, color, colorShade, backgroundColor, backgroundColorShade]);
|
|
473
493
|
};
|
|
494
|
+
/**
|
|
495
|
+
* A hook that generates inline styles for scheme-aware color props.
|
|
496
|
+
*
|
|
497
|
+
* When `backgroundColor` is one of the scheme color names in
|
|
498
|
+
* `validSchemeColors`, returns `{ backgroundColor: 'var(--bulma-<value>)' }` —
|
|
499
|
+
* an inline style that tracks Bulma's scheme CSS variables, so it adapts to
|
|
500
|
+
* light/dark mode with no bestax-shipped CSS. For every other input it
|
|
501
|
+
* returns `undefined` (never `{}`), so components that don't use scheme
|
|
502
|
+
* values produce identical DOM to before.
|
|
503
|
+
*
|
|
504
|
+
* `backgroundColorShade` is ignored for scheme values — Bulma defines no
|
|
505
|
+
* shaded scheme variables. Only the background is set: the `scheme-invert*`
|
|
506
|
+
* values do not change text color, so pair them with a contrasting
|
|
507
|
+
* foreground.
|
|
508
|
+
*
|
|
509
|
+
* @function useColorStyles
|
|
510
|
+
* @param props - Color-related Bulma helper props (scheme-aware).
|
|
511
|
+
* @returns An inline style object for scheme backgrounds, or `undefined`.
|
|
512
|
+
* @example
|
|
513
|
+
* const colorStyles = useColorStyles({ backgroundColor: 'scheme-main-bis' });
|
|
514
|
+
* // colorStyles: { backgroundColor: 'var(--bulma-scheme-main-bis)' }
|
|
515
|
+
*/
|
|
516
|
+
const useColorStyles = (props) => {
|
|
517
|
+
const { backgroundColor } = props;
|
|
518
|
+
return useMemo(() => {
|
|
519
|
+
if (backgroundColor &&
|
|
520
|
+
validSchemeColors.includes(backgroundColor)) {
|
|
521
|
+
return { backgroundColor: `var(--bulma-${backgroundColor})` };
|
|
522
|
+
}
|
|
523
|
+
return undefined;
|
|
524
|
+
}, [backgroundColor]);
|
|
525
|
+
};
|
|
474
526
|
|
|
475
527
|
/**
|
|
476
528
|
* A hook that generates Bulma margin and padding helper classes.
|
|
@@ -841,16 +893,23 @@ const useOtherClasses = (props) => {
|
|
|
841
893
|
* useTypographyClasses, useVisibilityClasses, useFlexboxClasses, and
|
|
842
894
|
* useOtherClasses), which can also be used individually.
|
|
843
895
|
*
|
|
896
|
+
* Scheme background values (`backgroundColor: 'scheme-main-bis'`, …) emit no
|
|
897
|
+
* class; they are returned as `bulmaHelperStyles` — a dark-mode-safe inline
|
|
898
|
+
* `background-color: var(--bulma-scheme-*)` style (`undefined` for all other
|
|
899
|
+
* inputs). Merge it with a user `style` prop via `mergeBulmaStyles`.
|
|
900
|
+
*
|
|
844
901
|
* @function useBulmaClasses
|
|
845
|
-
* @param props - Combination of
|
|
846
|
-
* @returns An object containing the Bulma helper classes
|
|
902
|
+
* @param props - Combination of BulmaClassesPropsWithScheme and additional props.
|
|
903
|
+
* @returns An object containing the Bulma helper classes, optional helper
|
|
904
|
+
* styles, and unhandled props.
|
|
847
905
|
* @example
|
|
848
|
-
* const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
906
|
+
* const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
849
907
|
* color: 'primary',
|
|
850
|
-
*
|
|
908
|
+
* backgroundColor: 'scheme-main-bis',
|
|
851
909
|
* className: 'custom-class'
|
|
852
910
|
* });
|
|
853
|
-
* // bulmaHelperClasses: 'has-text-primary
|
|
911
|
+
* // bulmaHelperClasses: 'has-text-primary'
|
|
912
|
+
* // bulmaHelperStyles: { backgroundColor: 'var(--bulma-scheme-main-bis)' }
|
|
854
913
|
* // rest: { className: 'custom-class' }
|
|
855
914
|
*/
|
|
856
915
|
const useBulmaClasses = (props) => {
|
|
@@ -861,6 +920,7 @@ const useBulmaClasses = (props) => {
|
|
|
861
920
|
backgroundColor,
|
|
862
921
|
backgroundColorShade,
|
|
863
922
|
});
|
|
923
|
+
const bulmaHelperStyles = useColorStyles({ backgroundColor });
|
|
864
924
|
const spacingClasses = useSpacingClasses({
|
|
865
925
|
m,
|
|
866
926
|
mt,
|
|
@@ -948,7 +1008,7 @@ const useBulmaClasses = (props) => {
|
|
|
948
1008
|
flexboxClasses,
|
|
949
1009
|
otherClasses,
|
|
950
1010
|
]);
|
|
951
|
-
return { bulmaHelperClasses, rest };
|
|
1011
|
+
return { bulmaHelperClasses, bulmaHelperStyles, rest };
|
|
952
1012
|
};
|
|
953
1013
|
|
|
954
1014
|
/**
|
|
@@ -1411,6 +1471,23 @@ const Breadcrumb = ({ className, alignment, separator, size, children, ...props
|
|
|
1411
1471
|
return (jsx("nav", { className: breadcrumbClasses, "aria-label": "breadcrumbs", ...rest, children: jsx("ul", { children: children }) }));
|
|
1412
1472
|
};
|
|
1413
1473
|
|
|
1474
|
+
/**
|
|
1475
|
+
* Merges helper-emitted inline styles (e.g., `bulmaHelperStyles` from
|
|
1476
|
+
* `useBulmaClasses`) with a user-supplied `style` prop.
|
|
1477
|
+
*
|
|
1478
|
+
* The user's `style` wins on conflicting properties, and when both inputs are
|
|
1479
|
+
* absent the result is `undefined` — so components that receive neither
|
|
1480
|
+
* render with no `style` attribute at all, exactly as before.
|
|
1481
|
+
*
|
|
1482
|
+
* @function mergeBulmaStyles
|
|
1483
|
+
* @param helperStyles - Inline styles emitted by the Bulma helper hooks.
|
|
1484
|
+
* @param style - The component consumer's `style` prop.
|
|
1485
|
+
* @returns The merged style object, or `undefined` when both are absent.
|
|
1486
|
+
* @example
|
|
1487
|
+
* <section style={mergeBulmaStyles(bulmaHelperStyles, style)} />
|
|
1488
|
+
*/
|
|
1489
|
+
const mergeBulmaStyles = (helperStyles, style) => helperStyles || style ? { ...helperStyles, ...style } : undefined;
|
|
1490
|
+
|
|
1414
1491
|
/**
|
|
1415
1492
|
* Wrap each footer item in a `.card-footer-item` span.
|
|
1416
1493
|
* @param {CardProps['footer']} footer - Footer content (single node or array).
|
|
@@ -1449,9 +1526,9 @@ const hasCompoundComponents = (children) => {
|
|
|
1449
1526
|
* @returns {JSX.Element} The rendered card element.
|
|
1450
1527
|
* @see {@link https://bulma.io/documentation/components/card/ | Bulma Card documentation}
|
|
1451
1528
|
*/
|
|
1452
|
-
const CardComponent = ({ className, children, textColor, color, bgColor, hasShadow = true, header, headerCentered, headerIcon, footer, image, imageAlt, ...props }) => {
|
|
1529
|
+
const CardComponent = ({ className, children, textColor, color, bgColor, hasShadow = true, header, headerCentered, headerIcon, footer, image, imageAlt, style, ...props }) => {
|
|
1453
1530
|
const { classPrefix } = useConfig();
|
|
1454
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1531
|
+
const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
1455
1532
|
color: textColor ?? color,
|
|
1456
1533
|
backgroundColor: bgColor,
|
|
1457
1534
|
...props,
|
|
@@ -1470,7 +1547,7 @@ const CardComponent = ({ className, children, textColor, color, bgColor, hasShad
|
|
|
1470
1547
|
'is-centered': headerCentered,
|
|
1471
1548
|
}), children: header })), headerIcon] }));
|
|
1472
1549
|
};
|
|
1473
|
-
return (jsxs("div", { className: cardClasses, ...rest, children: [renderHeader(header, headerIcon, headerCentered, classPrefix), image && (jsx("div", { className: prefixedClassNames(classPrefix, 'card-image'), children: typeof image === 'string' ? (jsx("figure", { className: prefixedClassNames(classPrefix, 'image'), children: jsx("img", { src: image, alt: imageAlt ?? 'Card image' }) })) : (image) })), typeof children !== 'undefined' &&
|
|
1550
|
+
return (jsxs("div", { className: cardClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: [renderHeader(header, headerIcon, headerCentered, classPrefix), image && (jsx("div", { className: prefixedClassNames(classPrefix, 'card-image'), children: typeof image === 'string' ? (jsx("figure", { className: prefixedClassNames(classPrefix, 'image'), children: jsx("img", { src: image, alt: imageAlt ?? 'Card image' }) })) : (image) })), typeof children !== 'undefined' &&
|
|
1474
1551
|
children !== null &&
|
|
1475
1552
|
children !== '' &&
|
|
1476
1553
|
!hasCompoundComponents(children) && (jsx("div", { className: prefixedClassNames(classPrefix, 'card-content'), children: children })), typeof children !== 'undefined' &&
|
|
@@ -1488,14 +1565,19 @@ const CardComponent = ({ className, children, textColor, color, bgColor, hasShad
|
|
|
1488
1565
|
* @param {CardHeaderProps} props - Props for the CardHeader component.
|
|
1489
1566
|
* @returns {JSX.Element} The rendered card header.
|
|
1490
1567
|
*/
|
|
1491
|
-
const CardHeader = ({ className, children, centered, ...props }) => {
|
|
1568
|
+
const CardHeader = ({ className, children, centered, color, bgColor, textColor, ...props }) => {
|
|
1492
1569
|
const { classPrefix } = useConfig();
|
|
1570
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1571
|
+
color: textColor ?? color,
|
|
1572
|
+
backgroundColor: bgColor,
|
|
1573
|
+
...props,
|
|
1574
|
+
});
|
|
1493
1575
|
// Check if children contains a CardHeaderTitle component
|
|
1494
1576
|
const hasHeaderTitle = React.Children.toArray(children).some(child => React.isValidElement(child) &&
|
|
1495
1577
|
typeof child.type === 'function' &&
|
|
1496
1578
|
child.type === CardHeaderTitle);
|
|
1497
1579
|
const headerClasses = usePrefixedClassNames('card-header');
|
|
1498
|
-
return (jsx("header", { className: classNames(headerClasses, className), ...
|
|
1580
|
+
return (jsx("header", { className: classNames(headerClasses, bulmaHelperClasses, className), ...rest, children: hasHeaderTitle ? (children) : (jsx("div", { className: classNames(prefixedClassNames(classPrefix, 'card-header-title', {
|
|
1499
1581
|
'is-centered': centered,
|
|
1500
1582
|
}), className), children: children })) }));
|
|
1501
1583
|
};
|
|
@@ -1506,9 +1588,16 @@ const CardHeader = ({ className, children, centered, ...props }) => {
|
|
|
1506
1588
|
* @param {CardHeaderTitleProps} props - Props for the CardHeaderTitle component.
|
|
1507
1589
|
* @returns {JSX.Element} The rendered card header title.
|
|
1508
1590
|
*/
|
|
1509
|
-
const CardHeaderTitle = ({ className, children, centered, ...props }) =>
|
|
1510
|
-
|
|
1511
|
-
|
|
1591
|
+
const CardHeaderTitle = ({ className, children, centered, color, bgColor, textColor, ...props }) => {
|
|
1592
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1593
|
+
color: textColor ?? color,
|
|
1594
|
+
backgroundColor: bgColor,
|
|
1595
|
+
...props,
|
|
1596
|
+
});
|
|
1597
|
+
return (jsx("div", { className: classNames(usePrefixedClassNames('card-header-title', {
|
|
1598
|
+
'is-centered': centered,
|
|
1599
|
+
}), bulmaHelperClasses, className), ...rest, children: children }));
|
|
1600
|
+
};
|
|
1512
1601
|
/**
|
|
1513
1602
|
* Card header icon compound component. Renders a `.card-header-icon` button.
|
|
1514
1603
|
*
|
|
@@ -1516,7 +1605,14 @@ const CardHeaderTitle = ({ className, children, centered, ...props }) => (jsx("d
|
|
|
1516
1605
|
* @param {CardHeaderIconProps} props - Props for the CardHeaderIcon component.
|
|
1517
1606
|
* @returns {JSX.Element} The rendered card header icon button.
|
|
1518
1607
|
*/
|
|
1519
|
-
const CardHeaderIcon = ({ className, children,
|
|
1608
|
+
const CardHeaderIcon = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
1609
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1610
|
+
color: textColor ?? color,
|
|
1611
|
+
backgroundColor: bgColor,
|
|
1612
|
+
...props,
|
|
1613
|
+
});
|
|
1614
|
+
return (jsx("button", { className: classNames(usePrefixedClassNames('card-header-icon'), bulmaHelperClasses, className), "aria-label": props['aria-label'] || 'more options', ...rest, children: children }));
|
|
1615
|
+
};
|
|
1520
1616
|
/**
|
|
1521
1617
|
* Card image compound component. Wraps children in a `.card-image` element.
|
|
1522
1618
|
*
|
|
@@ -1524,7 +1620,14 @@ const CardHeaderIcon = ({ className, children, ...props }) => (jsx("button", { c
|
|
|
1524
1620
|
* @param {CardImageProps} props - Props for the CardImage component.
|
|
1525
1621
|
* @returns {JSX.Element} The rendered card image container.
|
|
1526
1622
|
*/
|
|
1527
|
-
const CardImage = ({ className, children,
|
|
1623
|
+
const CardImage = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
1624
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1625
|
+
color: textColor ?? color,
|
|
1626
|
+
backgroundColor: bgColor,
|
|
1627
|
+
...props,
|
|
1628
|
+
});
|
|
1629
|
+
return (jsx("div", { className: classNames(usePrefixedClassNames('card-image'), bulmaHelperClasses, className), ...rest, children: children }));
|
|
1630
|
+
};
|
|
1528
1631
|
/**
|
|
1529
1632
|
* Card content compound component. Wraps children in a `.card-content` element.
|
|
1530
1633
|
*
|
|
@@ -1532,7 +1635,14 @@ const CardImage = ({ className, children, ...props }) => (jsx("div", { className
|
|
|
1532
1635
|
* @param {CardContentProps} props - Props for the CardContent component.
|
|
1533
1636
|
* @returns {JSX.Element} The rendered card content container.
|
|
1534
1637
|
*/
|
|
1535
|
-
const CardContent = ({ className, children,
|
|
1638
|
+
const CardContent = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
1639
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1640
|
+
color: textColor ?? color,
|
|
1641
|
+
backgroundColor: bgColor,
|
|
1642
|
+
...props,
|
|
1643
|
+
});
|
|
1644
|
+
return (jsx("div", { className: classNames(usePrefixedClassNames('card-content'), bulmaHelperClasses, className), ...rest, children: children }));
|
|
1645
|
+
};
|
|
1536
1646
|
/**
|
|
1537
1647
|
* Card footer compound component. Wraps children in a `.card-footer` element.
|
|
1538
1648
|
*
|
|
@@ -1540,7 +1650,14 @@ const CardContent = ({ className, children, ...props }) => (jsx("div", { classNa
|
|
|
1540
1650
|
* @param {CardFooterProps} props - Props for the CardFooter component.
|
|
1541
1651
|
* @returns {JSX.Element} The rendered card footer.
|
|
1542
1652
|
*/
|
|
1543
|
-
const CardFooter = ({ className, children,
|
|
1653
|
+
const CardFooter = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
1654
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1655
|
+
color: textColor ?? color,
|
|
1656
|
+
backgroundColor: bgColor,
|
|
1657
|
+
...props,
|
|
1658
|
+
});
|
|
1659
|
+
return (jsx("footer", { className: classNames(usePrefixedClassNames('card-footer'), bulmaHelperClasses, className), ...rest, children: children }));
|
|
1660
|
+
};
|
|
1544
1661
|
/**
|
|
1545
1662
|
* Card footer item compound component. Wraps children in a `.card-footer-item` span.
|
|
1546
1663
|
*
|
|
@@ -1548,7 +1665,14 @@ const CardFooter = ({ className, children, ...props }) => (jsx("footer", { class
|
|
|
1548
1665
|
* @param {CardFooterItemProps} props - Props for the CardFooterItem component.
|
|
1549
1666
|
* @returns {JSX.Element} The rendered card footer item.
|
|
1550
1667
|
*/
|
|
1551
|
-
const CardFooterItem = ({ className, children,
|
|
1668
|
+
const CardFooterItem = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
1669
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1670
|
+
color: textColor ?? color,
|
|
1671
|
+
backgroundColor: bgColor,
|
|
1672
|
+
...props,
|
|
1673
|
+
});
|
|
1674
|
+
return (jsx("span", { className: classNames(usePrefixedClassNames('card-footer-item'), bulmaHelperClasses, className), ...rest, children: children }));
|
|
1675
|
+
};
|
|
1552
1676
|
// Attach nested Title and Icon components to CardHeader
|
|
1553
1677
|
const CardHeaderCompound = withSubComponents(CardHeader, {
|
|
1554
1678
|
Title: CardHeaderTitle,
|
|
@@ -2641,7 +2765,7 @@ function useTabsContext() {
|
|
|
2641
2765
|
* </Tabs.Content>
|
|
2642
2766
|
* </Tabs>
|
|
2643
2767
|
*/
|
|
2644
|
-
const TabsComponent = ({ align, size, fullwidth, boxed, toggle, rounded, color, value, onChange, defaultValue = 0, vertical, side, expanded, className, children, ...props }) => {
|
|
2768
|
+
const TabsComponent = ({ align, size, isFullwidth, isFullWidth, fullwidth, boxed, toggle, rounded, color, value, onChange, defaultValue = 0, vertical, side, expanded, className, children, ...props }) => {
|
|
2645
2769
|
warnDeprecatedColorProp('Tabs', color, 'Remove the prop; no replacement exists.');
|
|
2646
2770
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
2647
2771
|
// Controlled vs uncontrolled state
|
|
@@ -2660,7 +2784,7 @@ const TabsComponent = ({ align, size, fullwidth, boxed, toggle, rounded, color,
|
|
|
2660
2784
|
[`is-${align}`]: align,
|
|
2661
2785
|
[`is-${size}`]: size,
|
|
2662
2786
|
[`is-${color}`]: color,
|
|
2663
|
-
'is-fullwidth': fullwidth,
|
|
2787
|
+
'is-fullwidth': isFullwidth ?? isFullWidth ?? fullwidth,
|
|
2664
2788
|
'is-boxed': boxed,
|
|
2665
2789
|
'is-toggle': toggle,
|
|
2666
2790
|
'is-toggle-rounded': rounded,
|
|
@@ -3350,9 +3474,10 @@ const Steps = withSubComponents(StepsComponent, { Step }, 'Steps');
|
|
|
3350
3474
|
* <div>Panel content</div>
|
|
3351
3475
|
* </Sidebar>
|
|
3352
3476
|
*/
|
|
3353
|
-
const SidebarComponent = forwardRef(({ isOpen, onClose, position = 'left', width = '260px', fullWidth
|
|
3477
|
+
const SidebarComponent = forwardRef(({ isOpen, onClose, position = 'left', width = '260px', isFullwidth, fullWidth, overlay = true, overlayClose = true, escapeClose = true, canCancel = true, children, inline = false, className, style, ...props }, ref) => {
|
|
3354
3478
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
3355
3479
|
const sidebarRef = useRef(null);
|
|
3480
|
+
const resolvedFullwidth = isFullwidth ?? fullWidth ?? false;
|
|
3356
3481
|
// Close handler
|
|
3357
3482
|
const handleClose = useCallback(() => {
|
|
3358
3483
|
if (canCancel && onClose) {
|
|
@@ -3419,7 +3544,7 @@ const SidebarComponent = forwardRef(({ isOpen, onClose, position = 'left', width
|
|
|
3419
3544
|
const sidebarClasses = usePrefixedClassNames('sidebar', {
|
|
3420
3545
|
'is-active': isOpen,
|
|
3421
3546
|
[`is-${position}`]: position,
|
|
3422
|
-
'is-fullwidth':
|
|
3547
|
+
'is-fullwidth': resolvedFullwidth,
|
|
3423
3548
|
});
|
|
3424
3549
|
const backgroundClass = usePrefixedClassNames('sidebar-background', {
|
|
3425
3550
|
'is-active': isOpen,
|
|
@@ -3429,7 +3554,7 @@ const SidebarComponent = forwardRef(({ isOpen, onClose, position = 'left', width
|
|
|
3429
3554
|
// Custom style for width
|
|
3430
3555
|
const sidebarStyle = {
|
|
3431
3556
|
...style,
|
|
3432
|
-
'--bulma-sidebar-width':
|
|
3557
|
+
'--bulma-sidebar-width': resolvedFullwidth ? '100%' : width,
|
|
3433
3558
|
};
|
|
3434
3559
|
const sidebarContent = (jsxs(Fragment, { children: [overlay && (jsx("div", { className: backgroundClass, onClick: handleOverlayClick, "aria-hidden": "true" })), jsx("aside", { ref: combinedRef, className: combinedClasses, style: sidebarStyle, role: "dialog", "aria-modal": overlay ? 'true' : undefined, "aria-hidden": !isOpen, tabIndex: -1, ...rest, children: jsx("div", { className: contentClass, children: children }) })] }));
|
|
3435
3560
|
if (inline) {
|
|
@@ -3997,7 +4122,7 @@ const validButtonColors = [...validColors, 'text', 'ghost'];
|
|
|
3997
4122
|
* @returns {JSX.Element} The rendered button or anchor element.
|
|
3998
4123
|
* @see {@link https://bulma.io/documentation/elements/button/ | Bulma Button documentation}
|
|
3999
4124
|
*/
|
|
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 }) => {
|
|
4125
|
+
const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullwidth, isFullWidth, isOutlined, isInverted, isFocused, isActive, isHovered, isDisabled, className, children, textColor, bgColor, as: Component = 'button', href, onClick, target, rel, ...props }) => {
|
|
4001
4126
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
4002
4127
|
color: textColor,
|
|
4003
4128
|
backgroundColor: bgColor,
|
|
@@ -4018,7 +4143,7 @@ const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWi
|
|
|
4018
4143
|
'is-focused': isFocused,
|
|
4019
4144
|
'is-active': isActive,
|
|
4020
4145
|
'is-inverted': isInverted,
|
|
4021
|
-
'is-fullwidth': isFullWidth,
|
|
4146
|
+
'is-fullwidth': isFullwidth ?? isFullWidth,
|
|
4022
4147
|
});
|
|
4023
4148
|
// Combine prefixed Bulma classes with unprefixed user className and prefixed helper classes
|
|
4024
4149
|
const buttonClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
@@ -4520,11 +4645,11 @@ const Block = ({ className, textColor, color, bgColor, children, ...props }) =>
|
|
|
4520
4645
|
* @returns {JSX.Element} The rendered box element.
|
|
4521
4646
|
* @see {@link https://bulma.io/documentation/elements/box/ | Bulma Box documentation}
|
|
4522
4647
|
*/
|
|
4523
|
-
const Box = ({ className, textColor, color, bgColor, hasShadow = true, children, ...props }) => {
|
|
4648
|
+
const Box = ({ className, textColor, color, bgColor, hasShadow = true, children, style, ...props }) => {
|
|
4524
4649
|
/**
|
|
4525
4650
|
* Generates Bulma helper classes and separates out remaining props.
|
|
4526
4651
|
*/
|
|
4527
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
4652
|
+
const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
4528
4653
|
color: textColor ?? color,
|
|
4529
4654
|
backgroundColor: bgColor,
|
|
4530
4655
|
...props,
|
|
@@ -4533,7 +4658,7 @@ const Box = ({ className, textColor, color, bgColor, hasShadow = true, children,
|
|
|
4533
4658
|
'is-shadowless': !hasShadow,
|
|
4534
4659
|
});
|
|
4535
4660
|
const boxClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
4536
|
-
return (jsx("div", { className: boxClasses, ...rest, children: children }));
|
|
4661
|
+
return (jsx("div", { className: boxClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
|
|
4537
4662
|
};
|
|
4538
4663
|
|
|
4539
4664
|
/**
|
|
@@ -5234,8 +5359,11 @@ const SubTitle = ({ className, size, as = 'h1', hasSkeleton, textColor, bgColor,
|
|
|
5234
5359
|
});
|
|
5235
5360
|
// Validate 'as' prop at runtime
|
|
5236
5361
|
const element = validSubTitleElements.includes(as) ? as : 'h1';
|
|
5237
|
-
// Validate 'size' prop at runtime
|
|
5238
|
-
const
|
|
5362
|
+
// Validate 'size' prop at runtime (numeric sizes normalize to strings)
|
|
5363
|
+
const normalized = size == null ? undefined : String(size);
|
|
5364
|
+
const validSize = normalized && validSubTitleSizes.includes(normalized)
|
|
5365
|
+
? normalized
|
|
5366
|
+
: undefined;
|
|
5239
5367
|
const bulmaClasses = usePrefixedClassNames('subtitle', {
|
|
5240
5368
|
[`is-${validSize}`]: validSize,
|
|
5241
5369
|
'has-skeleton': hasSkeleton,
|
|
@@ -5395,7 +5523,7 @@ const Th = ({ className, isAligned, width, color, children, ...props }) => {
|
|
|
5395
5523
|
* @returns {JSX.Element} The rendered table element.
|
|
5396
5524
|
* @see {@link https://bulma.io/documentation/elements/table/ | Bulma Table documentation}
|
|
5397
5525
|
*/
|
|
5398
|
-
const TableComponent = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isResponsive, children, ...props }) => {
|
|
5526
|
+
const TableComponent = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isFullWidth, isResponsive, children, ...props }) => {
|
|
5399
5527
|
/**
|
|
5400
5528
|
* Generates Bulma helper classes and separates out remaining props.
|
|
5401
5529
|
*/
|
|
@@ -5405,7 +5533,7 @@ const TableComponent = ({ className, isBordered, isStriped, isNarrow, isHoverabl
|
|
|
5405
5533
|
'is-striped': isStriped,
|
|
5406
5534
|
'is-narrow': isNarrow,
|
|
5407
5535
|
'is-hoverable': isHoverable,
|
|
5408
|
-
'is-fullwidth': isFullwidth,
|
|
5536
|
+
'is-fullwidth': isFullwidth ?? isFullWidth,
|
|
5409
5537
|
});
|
|
5410
5538
|
const containerClass = usePrefixedClassNames('table-container');
|
|
5411
5539
|
const tableClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
@@ -5445,7 +5573,7 @@ const validTagSizes = ['normal', 'medium', 'large'];
|
|
|
5445
5573
|
* @returns {JSX.Element} The rendered tag element.
|
|
5446
5574
|
* @see {@link https://bulma.io/documentation/elements/tag/ | Bulma Tag documentation}
|
|
5447
5575
|
*/
|
|
5448
|
-
const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelete, children, ...props }) => {
|
|
5576
|
+
const Tag = ({ className, color, size, isLight, isRounded, isDelete, isHoverable, onDelete, children, ...props }) => {
|
|
5449
5577
|
/**
|
|
5450
5578
|
* Generates Bulma helper classes and separates out remaining props.
|
|
5451
5579
|
*/
|
|
@@ -5453,6 +5581,7 @@ const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelet
|
|
|
5453
5581
|
const bulmaClasses = usePrefixedClassNames('tag', {
|
|
5454
5582
|
[`is-${color}`]: color && validTagColors.includes(color),
|
|
5455
5583
|
[`is-${size}`]: size && size !== 'normal' && validTagSizes.includes(size),
|
|
5584
|
+
'is-light': isLight,
|
|
5456
5585
|
'is-rounded': isRounded,
|
|
5457
5586
|
'is-delete': isDelete,
|
|
5458
5587
|
'is-hoverable': isHoverable,
|
|
@@ -5507,8 +5636,11 @@ const Title = ({ className, size, isSpaced, as = 'h1', hasSkeleton, textColor, b
|
|
|
5507
5636
|
});
|
|
5508
5637
|
// Validate 'as' prop at runtime
|
|
5509
5638
|
const element = validTitleElements.includes(as) ? as : 'h1';
|
|
5510
|
-
// Validate 'size' prop at runtime
|
|
5511
|
-
const
|
|
5639
|
+
// Validate 'size' prop at runtime (numeric sizes normalize to strings)
|
|
5640
|
+
const normalized = size == null ? undefined : String(size);
|
|
5641
|
+
const validSize = normalized && validTitleSizes.includes(normalized)
|
|
5642
|
+
? normalized
|
|
5643
|
+
: undefined;
|
|
5512
5644
|
const bulmaClasses = usePrefixedClassNames('title', {
|
|
5513
5645
|
[`is-${validSize}`]: validSize,
|
|
5514
5646
|
'is-spaced': isSpaced,
|
|
@@ -5991,7 +6123,7 @@ const Checkboxes = withSubComponents(CheckboxesComponent, { Checkbox }, 'Checkbo
|
|
|
5991
6123
|
*/
|
|
5992
6124
|
const File = forwardRef(({
|
|
5993
6125
|
// Field props
|
|
5994
|
-
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, color, size, isBoxed, isFullwidth, isRight, isCentered, hasName, buttonLabel, iconLeft, iconRight, className, inputClassName, fileName, ...props }, ref) => {
|
|
6126
|
+
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, color, size, isBoxed, isFullwidth, isFullWidth, isRight, isCentered, hasName, buttonLabel, iconLeft, iconRight, className, inputClassName, fileName, ...props }, ref) => {
|
|
5995
6127
|
const insideField = useInsideField();
|
|
5996
6128
|
const { controlId, fieldLabelProps } = useAutoLabelId({
|
|
5997
6129
|
label,
|
|
@@ -6020,7 +6152,7 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
|
|
|
6020
6152
|
[`is-${color}`]: !!color,
|
|
6021
6153
|
[`is-${size}`]: !!size,
|
|
6022
6154
|
'is-boxed': isBoxed,
|
|
6023
|
-
'is-fullwidth': isFullwidth,
|
|
6155
|
+
'is-fullwidth': isFullwidth ?? isFullWidth,
|
|
6024
6156
|
'has-name': hasName,
|
|
6025
6157
|
});
|
|
6026
6158
|
const fileClass = classNames(mainClass, bulmaHelperClasses, alignmentClass, className);
|
|
@@ -6861,6 +6993,8 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
|
|
|
6861
6993
|
return (jsxs(Fragment, { children: [numberinputElement, messageEl] }));
|
|
6862
6994
|
});
|
|
6863
6995
|
Numberinput.displayName = 'Numberinput';
|
|
6996
|
+
/** @deprecated Use `Numberinput` — same component. */
|
|
6997
|
+
const NumberInput = Numberinput;
|
|
6864
6998
|
|
|
6865
6999
|
/**
|
|
6866
7000
|
* Default star icon component.
|
|
@@ -7688,6 +7822,8 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
|
|
|
7688
7822
|
return (jsxs(Fragment, { children: [taginputElement, messageEl] }));
|
|
7689
7823
|
});
|
|
7690
7824
|
Taginput.displayName = 'Taginput';
|
|
7825
|
+
/** @deprecated Use `Taginput` — same component. */
|
|
7826
|
+
const TagInput = Taginput;
|
|
7691
7827
|
|
|
7692
7828
|
/**
|
|
7693
7829
|
* Bulma Input component with full Bulma helper class support.
|
|
@@ -7728,7 +7864,7 @@ InputBase.displayName = 'InputBase';
|
|
|
7728
7864
|
* @returns {JSX.Element} The rendered select element.
|
|
7729
7865
|
* @see {@link https://bulma.io/documentation/form/select/ | Bulma Select documentation}
|
|
7730
7866
|
*/
|
|
7731
|
-
const SelectBase = forwardRef(({ color, size, isRounded, isLoading, isActive, isHovered, isFocused, isFullwidth, className, disabled, children, multiple, multipleSize, ...props }, ref) => {
|
|
7867
|
+
const SelectBase = forwardRef(({ color, size, isRounded, isLoading, isActive, isHovered, isFocused, isFullwidth, isFullWidth, className, disabled, children, multiple, multipleSize, ...props }, ref) => {
|
|
7732
7868
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
7733
7869
|
color,
|
|
7734
7870
|
...props,
|
|
@@ -7741,7 +7877,7 @@ const SelectBase = forwardRef(({ color, size, isRounded, isLoading, isActive, is
|
|
|
7741
7877
|
'is-loading': isLoading,
|
|
7742
7878
|
'is-active': isActive,
|
|
7743
7879
|
'is-multiple': !!multiple,
|
|
7744
|
-
'is-fullwidth': isFullwidth,
|
|
7880
|
+
'is-fullwidth': isFullwidth ?? isFullWidth,
|
|
7745
7881
|
});
|
|
7746
7882
|
const selectClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
7747
7883
|
// is-hovered / is-focused belong on the inner <select> element, not the wrapper.
|
|
@@ -11114,6 +11250,12 @@ const bulmaCssVars = [
|
|
|
11114
11250
|
// scheme
|
|
11115
11251
|
'--bulma-scheme-h',
|
|
11116
11252
|
'--bulma-scheme-s',
|
|
11253
|
+
'--bulma-scheme-main',
|
|
11254
|
+
'--bulma-scheme-main-bis',
|
|
11255
|
+
'--bulma-scheme-main-ter',
|
|
11256
|
+
'--bulma-scheme-invert',
|
|
11257
|
+
'--bulma-scheme-invert-bis',
|
|
11258
|
+
'--bulma-scheme-invert-ter',
|
|
11117
11259
|
'--bulma-light-l',
|
|
11118
11260
|
'--bulma-light-invert-l',
|
|
11119
11261
|
'--bulma-dark-l',
|
|
@@ -11797,8 +11939,8 @@ const Theme = ({ bulmaVars = {}, children, className, isRoot = false, colorMode,
|
|
|
11797
11939
|
* @returns {JSX.Element} The rendered container.
|
|
11798
11940
|
* @see {@link https://bulma.io/documentation/layout/container/ | Bulma Container documentation}
|
|
11799
11941
|
*/
|
|
11800
|
-
const Container = ({ className, textColor, color, bgColor, fluid, widescreen, fullhd, breakpoint, isMax, children, ...props }) => {
|
|
11801
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
11942
|
+
const Container = ({ className, textColor, color, bgColor, fluid, widescreen, fullhd, breakpoint, isMax, children, style, ...props }) => {
|
|
11943
|
+
const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
11802
11944
|
color: textColor ?? color,
|
|
11803
11945
|
backgroundColor: bgColor,
|
|
11804
11946
|
...props,
|
|
@@ -11826,7 +11968,7 @@ const Container = ({ className, textColor, color, bgColor, fluid, widescreen, fu
|
|
|
11826
11968
|
});
|
|
11827
11969
|
const prefixedBreakpointClass = usePrefixedClassNames(breakpointClass || '');
|
|
11828
11970
|
const containerClasses = classNames(mainClass, containerModifiers, prefixedBreakpointClass, className, bulmaHelperClasses);
|
|
11829
|
-
return (jsx("div", { className: containerClasses, ...rest, children: children }));
|
|
11971
|
+
return (jsx("div", { className: containerClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
|
|
11830
11972
|
};
|
|
11831
11973
|
|
|
11832
11974
|
/**
|
|
@@ -11842,8 +11984,8 @@ const Container = ({ className, textColor, color, bgColor, fluid, widescreen, fu
|
|
|
11842
11984
|
* <div className="content has-text-centered">...</div>
|
|
11843
11985
|
* </Footer>
|
|
11844
11986
|
*/
|
|
11845
|
-
const Footer = ({ as = 'footer', className, children, color, bgColor, textColor, ...props }) => {
|
|
11846
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
11987
|
+
const Footer = ({ as = 'footer', className, children, color, bgColor, textColor, style, ...props }) => {
|
|
11988
|
+
const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
11847
11989
|
color: textColor ?? color,
|
|
11848
11990
|
backgroundColor: bgColor,
|
|
11849
11991
|
...props,
|
|
@@ -11851,7 +11993,7 @@ const Footer = ({ as = 'footer', className, children, color, bgColor, textColor,
|
|
|
11851
11993
|
const Tag = as;
|
|
11852
11994
|
const mainClass = usePrefixedClassNames('footer');
|
|
11853
11995
|
const footerClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
11854
|
-
return (jsx(Tag, { className: footerClasses, ...rest, children: children }));
|
|
11996
|
+
return (jsx(Tag, { className: footerClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
|
|
11855
11997
|
};
|
|
11856
11998
|
|
|
11857
11999
|
/**
|
|
@@ -11862,9 +12004,9 @@ const Footer = ({ as = 'footer', className, children, color, bgColor, textColor,
|
|
|
11862
12004
|
* @returns {JSX.Element} The rendered hero.
|
|
11863
12005
|
* @see {@link https://bulma.io/documentation/layout/hero/ | Bulma Hero documentation}
|
|
11864
12006
|
*/
|
|
11865
|
-
const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
|
|
12007
|
+
const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar, children, style, ...props }) => {
|
|
11866
12008
|
warnUnstyledColor('Hero', color, ['inherit', 'current']);
|
|
11867
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
12009
|
+
const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
11868
12010
|
backgroundColor: bgColor,
|
|
11869
12011
|
...props,
|
|
11870
12012
|
});
|
|
@@ -11874,7 +12016,7 @@ const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar,
|
|
|
11874
12016
|
'is-fullheight-with-navbar': fullheightWithNavbar || size === 'fullheight-with-navbar',
|
|
11875
12017
|
});
|
|
11876
12018
|
const heroClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
11877
|
-
return (jsx("section", { className: heroClasses, ...rest, children: children }));
|
|
12019
|
+
return (jsx("section", { className: heroClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
|
|
11878
12020
|
};
|
|
11879
12021
|
/**
|
|
11880
12022
|
* Top bar for navigation or branding.
|
|
@@ -11883,15 +12025,15 @@ const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar,
|
|
|
11883
12025
|
* @param {HeroHeadProps} props - Props for the HeroHead component.
|
|
11884
12026
|
* @returns {JSX.Element} The rendered hero head.
|
|
11885
12027
|
*/
|
|
11886
|
-
const HeroHead = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
11887
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
12028
|
+
const HeroHead = ({ className, children, color, bgColor, textColor, style, ...props }) => {
|
|
12029
|
+
const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
11888
12030
|
color: textColor ?? color,
|
|
11889
12031
|
backgroundColor: bgColor,
|
|
11890
12032
|
...props,
|
|
11891
12033
|
});
|
|
11892
12034
|
const mainClass = usePrefixedClassNames('hero-head');
|
|
11893
12035
|
const heroHeadClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
11894
|
-
return (jsx("div", { className: heroHeadClasses, ...rest, children: children }));
|
|
12036
|
+
return (jsx("div", { className: heroHeadClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
|
|
11895
12037
|
};
|
|
11896
12038
|
/**
|
|
11897
12039
|
* Main content area, vertically centered by default.
|
|
@@ -11900,15 +12042,15 @@ const HeroHead = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
11900
12042
|
* @param {HeroBodyProps} props - Props for the HeroBody component.
|
|
11901
12043
|
* @returns {JSX.Element} The rendered hero body.
|
|
11902
12044
|
*/
|
|
11903
|
-
const HeroBody = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
11904
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
12045
|
+
const HeroBody = ({ className, children, color, bgColor, textColor, style, ...props }) => {
|
|
12046
|
+
const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
11905
12047
|
color: textColor ?? color,
|
|
11906
12048
|
backgroundColor: bgColor,
|
|
11907
12049
|
...props,
|
|
11908
12050
|
});
|
|
11909
12051
|
const mainClass = usePrefixedClassNames('hero-body');
|
|
11910
12052
|
const heroBodyClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
11911
|
-
return (jsx("div", { className: heroBodyClasses, ...rest, children: children }));
|
|
12053
|
+
return (jsx("div", { className: heroBodyClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
|
|
11912
12054
|
};
|
|
11913
12055
|
/**
|
|
11914
12056
|
* Bottom bar for tabs or actions.
|
|
@@ -11917,15 +12059,15 @@ const HeroBody = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
11917
12059
|
* @param {HeroFootProps} props - Props for the HeroFoot component.
|
|
11918
12060
|
* @returns {JSX.Element} The rendered hero foot.
|
|
11919
12061
|
*/
|
|
11920
|
-
const HeroFoot = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
11921
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
12062
|
+
const HeroFoot = ({ className, children, color, bgColor, textColor, style, ...props }) => {
|
|
12063
|
+
const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
11922
12064
|
color: textColor ?? color,
|
|
11923
12065
|
backgroundColor: bgColor,
|
|
11924
12066
|
...props,
|
|
11925
12067
|
});
|
|
11926
12068
|
const mainClass = usePrefixedClassNames('hero-foot');
|
|
11927
12069
|
const heroFootClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
11928
|
-
return (jsx("div", { className: heroFootClasses, ...rest, children: children }));
|
|
12070
|
+
return (jsx("div", { className: heroFootClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
|
|
11929
12071
|
};
|
|
11930
12072
|
// Attach subcomponents
|
|
11931
12073
|
const Hero = withSubComponents(HeroComponent, {
|
|
@@ -12104,8 +12246,8 @@ const Media = withSubComponents(MediaComponent, {
|
|
|
12104
12246
|
* @returns {JSX.Element} The rendered section.
|
|
12105
12247
|
* @see {@link https://bulma.io/documentation/layout/section/ | Bulma Section documentation}
|
|
12106
12248
|
*/
|
|
12107
|
-
const Section = ({ size, className, children, color, bgColor, textColor, ...props }) => {
|
|
12108
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
12249
|
+
const Section = ({ size, className, children, color, bgColor, textColor, style, ...props }) => {
|
|
12250
|
+
const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
|
|
12109
12251
|
color: textColor ?? color,
|
|
12110
12252
|
backgroundColor: bgColor,
|
|
12111
12253
|
...props,
|
|
@@ -12115,8 +12257,8 @@ const Section = ({ size, className, children, color, bgColor, textColor, ...prop
|
|
|
12115
12257
|
[`is-${size}`]: size,
|
|
12116
12258
|
});
|
|
12117
12259
|
const sectionClasses = classNames(mainClass, sectionModifiers, className, bulmaHelperClasses);
|
|
12118
|
-
return (jsx("section", { className: sectionClasses, ...rest, children: children }));
|
|
12260
|
+
return (jsx("section", { className: sectionClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
|
|
12119
12261
|
};
|
|
12120
12262
|
|
|
12121
|
-
export { Autocomplete, Avatar, Avatars, Badge, Block, Box, Breadcrumb, Button, Buttons, Card, Carousel, CarouselItem, Cell, Checkbox, Checkboxes, Code, Collapse, Column, Columns, ConfigProvider, Container, Content, Control, DateInput, DateInputBase, DateTimeInput, DateTimeInputBase, Delete, Dialog, DialogContainer, Divider, Dropdown, DropdownDivider, DropdownItem, Emphasis, Field, FieldBody, FieldLabel, Figure, File, Footer, Grid, Hero, HeroBody, HeroFoot, HeroHead, Icon, IconText, Image, Input, InputBase, Level, LevelItem, LevelLeft, LevelRight, Link, LinkButton, ListItem, Loading, Media, MediaContent, MediaLeft, MediaRight, Menu, MenuItem, MenuLabel, MenuList, Message, Modal, Navbar, NavbarBrand, NavbarBurger, NavbarDivider, NavbarDropdown, NavbarDropdownMenu, NavbarEnd, NavbarItem, NavbarLink, NavbarMenu, NavbarStart, Notification, NotificationContainer, Numberinput, OrderedList, Pagination, PaginationEllipsis, PaginationLink, PaginationList, PaginationNext, PaginationPrevious, Panel, PanelBlock, PanelButtonBlock, PanelCheckboxBlock, PanelHeading, PanelIcon, PanelInputBlock, PanelTabs, Paragraph, Pre, Progress, Radio, Radios, Rate, Reveal, Section, Select, SelectBase, Sidebar, Skeleton, Slider, Span, Step, Steps, Strong, SubTitle, Switch, Tab, TabContentItem, TabItem, TabList, Table, Tabs, TabsContent, Tag, Taginput, Tags, Tbody, Td, TextArea, TextAreaBase, Tfoot, Th, Thead, Theme, TimeInput, TimeInputBase, Title, Toast, ToastContainer, Tooltip, Tr, UnorderedList, __test_exports__, checkboxColors, checkboxSizes, classNames, createPrefixedClassNames, dialog, isBrowser$1 as isBrowser, notification, prefixedClassNames, radioColors, radioSizes, switchColors, switchSizes, toast, useBulmaClasses, useClassPrefix, useColorClasses, useConfig, useFlexboxClasses, useIconLibrary, useInsideControl, useInsideField, useOtherClasses, usePrefixedClass, usePrefixedClassNames, useSpacingClasses, useTypographyClasses, useVisibilityClasses, validAlignContents, validAlignItems, validAlignSelfs, validAlignments$1 as validAlignments, validColorShades, validColors, validDisplays, validFlexDirections, validFlexGrowShrink, validFlexWraps, validFontFamilies, validJustifyContents, validSizes$1 as validSizes, validTableColors, validTextSizes, validTextTransforms, validTextWeights, validViewports, validVisibilities };
|
|
12263
|
+
export { Autocomplete, Avatar, Avatars, Badge, Block, Box, Breadcrumb, Button, Buttons, Card, Carousel, CarouselItem, Cell, Checkbox, Checkboxes, Code, Collapse, Column, Columns, ConfigProvider, Container, Content, Control, DateInput, DateInputBase, DateTimeInput, DateTimeInputBase, Delete, Dialog, DialogContainer, Divider, Dropdown, DropdownDivider, DropdownItem, Emphasis, Field, FieldBody, FieldLabel, Figure, File, Footer, Grid, Hero, HeroBody, HeroFoot, HeroHead, Icon, IconText, Image, Input, InputBase, Level, LevelItem, LevelLeft, LevelRight, Link, LinkButton, ListItem, Loading, Media, MediaContent, MediaLeft, MediaRight, Menu, MenuItem, MenuLabel, MenuList, Message, Modal, Navbar, NavbarBrand, NavbarBurger, NavbarDivider, NavbarDropdown, NavbarDropdownMenu, NavbarEnd, NavbarItem, NavbarLink, NavbarMenu, NavbarStart, Notification, NotificationContainer, NumberInput, Numberinput, OrderedList, Pagination, PaginationEllipsis, PaginationLink, PaginationList, PaginationNext, PaginationPrevious, Panel, PanelBlock, PanelButtonBlock, PanelCheckboxBlock, PanelHeading, PanelIcon, PanelInputBlock, PanelTabs, Paragraph, Pre, Progress, Radio, Radios, Rate, Reveal, Section, Select, SelectBase, Sidebar, Skeleton, Slider, Span, Step, Steps, Strong, SubTitle, Switch, Tab, TabContentItem, TabItem, TabList, Table, Tabs, TabsContent, Tag, TagInput, Taginput, Tags, Tbody, Td, TextArea, TextAreaBase, Tfoot, Th, Thead, Theme, TimeInput, TimeInputBase, Title, Toast, ToastContainer, Tooltip, Tr, UnorderedList, __test_exports__, checkboxColors, checkboxSizes, classNames, createPrefixedClassNames, dialog, isBrowser$1 as isBrowser, mergeBulmaStyles, notification, prefixedClassNames, radioColors, radioSizes, switchColors, switchSizes, toast, useBulmaClasses, useClassPrefix, useColorClasses, useColorStyles, useConfig, useFlexboxClasses, useIconLibrary, useInsideControl, useInsideField, useOtherClasses, usePrefixedClass, usePrefixedClassNames, useSpacingClasses, useTypographyClasses, useVisibilityClasses, validAlignContents, validAlignItems, validAlignSelfs, validAlignments$1 as validAlignments, validColorShades, validColors, validDisplays, validFlexDirections, validFlexGrowShrink, validFlexWraps, validFontFamilies, validJustifyContents, validSchemeColors, validSizes$1 as validSizes, validTableColors, validTextSizes, validTextTransforms, validTextWeights, validViewports, validVisibilities };
|
|
12122
12264
|
//# sourceMappingURL=index.esm.js.map
|