@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 CHANGED
@@ -246,6 +246,22 @@ const validColorShades = [
246
246
  'bold',
247
247
  'on-scheme',
248
248
  ];
249
+ /**
250
+ * Valid Bulma scheme color names for scheme-aware backgrounds.
251
+ *
252
+ * Bulma ships no `has-background-scheme-*` helper classes, so these values
253
+ * never emit a class — components render them as a dark-mode-safe inline
254
+ * `background-color: var(--bulma-<value>)` style instead.
255
+ * @example 'scheme-main', 'scheme-main-bis', 'scheme-invert'
256
+ */
257
+ const validSchemeColors = [
258
+ 'scheme-main',
259
+ 'scheme-main-bis',
260
+ 'scheme-main-ter',
261
+ 'scheme-invert',
262
+ 'scheme-invert-bis',
263
+ 'scheme-invert-ter',
264
+ ];
249
265
  /**
250
266
  * Valid Bulma size classes for margins and paddings.
251
267
  * @example '0', '1', 'auto'
@@ -437,6 +453,10 @@ const createBulmaClassHelpers = (classPrefix, viewport) => {
437
453
  /**
438
454
  * A hook that generates Bulma text and background color helper classes.
439
455
  *
456
+ * Scheme background values (`scheme-main`, `scheme-main-bis`, …) are dropped
457
+ * from class emission — Bulma ships no `has-background-scheme-*` classes; use
458
+ * {@link useColorStyles} to render them as an inline style.
459
+ *
440
460
  * @function useColorClasses
441
461
  * @param props - Color-related Bulma helper props.
442
462
  * @returns A space-separated string of color helper classes.
@@ -473,6 +493,38 @@ const useColorClasses = (props) => {
473
493
  return classNames(classes);
474
494
  }, [classPrefix, color, colorShade, backgroundColor, backgroundColorShade]);
475
495
  };
496
+ /**
497
+ * A hook that generates inline styles for scheme-aware color props.
498
+ *
499
+ * When `backgroundColor` is one of the scheme color names in
500
+ * `validSchemeColors`, returns `{ backgroundColor: 'var(--bulma-<value>)' }` —
501
+ * an inline style that tracks Bulma's scheme CSS variables, so it adapts to
502
+ * light/dark mode with no bestax-shipped CSS. For every other input it
503
+ * returns `undefined` (never `{}`), so components that don't use scheme
504
+ * values produce identical DOM to before.
505
+ *
506
+ * `backgroundColorShade` is ignored for scheme values — Bulma defines no
507
+ * shaded scheme variables. Only the background is set: the `scheme-invert*`
508
+ * values do not change text color, so pair them with a contrasting
509
+ * foreground.
510
+ *
511
+ * @function useColorStyles
512
+ * @param props - Color-related Bulma helper props (scheme-aware).
513
+ * @returns An inline style object for scheme backgrounds, or `undefined`.
514
+ * @example
515
+ * const colorStyles = useColorStyles({ backgroundColor: 'scheme-main-bis' });
516
+ * // colorStyles: { backgroundColor: 'var(--bulma-scheme-main-bis)' }
517
+ */
518
+ const useColorStyles = (props) => {
519
+ const { backgroundColor } = props;
520
+ return React.useMemo(() => {
521
+ if (backgroundColor &&
522
+ validSchemeColors.includes(backgroundColor)) {
523
+ return { backgroundColor: `var(--bulma-${backgroundColor})` };
524
+ }
525
+ return undefined;
526
+ }, [backgroundColor]);
527
+ };
476
528
 
477
529
  /**
478
530
  * A hook that generates Bulma margin and padding helper classes.
@@ -843,16 +895,23 @@ const useOtherClasses = (props) => {
843
895
  * useTypographyClasses, useVisibilityClasses, useFlexboxClasses, and
844
896
  * useOtherClasses), which can also be used individually.
845
897
  *
898
+ * Scheme background values (`backgroundColor: 'scheme-main-bis'`, …) emit no
899
+ * class; they are returned as `bulmaHelperStyles` — a dark-mode-safe inline
900
+ * `background-color: var(--bulma-scheme-*)` style (`undefined` for all other
901
+ * inputs). Merge it with a user `style` prop via `mergeBulmaStyles`.
902
+ *
846
903
  * @function useBulmaClasses
847
- * @param props - Combination of BulmaClassesProps and additional props.
848
- * @returns An object containing the Bulma helper classes and unhandled props.
904
+ * @param props - Combination of BulmaClassesPropsWithScheme and additional props.
905
+ * @returns An object containing the Bulma helper classes, optional helper
906
+ * styles, and unhandled props.
849
907
  * @example
850
- * const { bulmaHelperClasses, rest } = useBulmaClasses({
908
+ * const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
851
909
  * color: 'primary',
852
- * textSize: '3',
910
+ * backgroundColor: 'scheme-main-bis',
853
911
  * className: 'custom-class'
854
912
  * });
855
- * // bulmaHelperClasses: 'has-text-primary is-size-3'
913
+ * // bulmaHelperClasses: 'has-text-primary'
914
+ * // bulmaHelperStyles: { backgroundColor: 'var(--bulma-scheme-main-bis)' }
856
915
  * // rest: { className: 'custom-class' }
857
916
  */
858
917
  const useBulmaClasses = (props) => {
@@ -863,6 +922,7 @@ const useBulmaClasses = (props) => {
863
922
  backgroundColor,
864
923
  backgroundColorShade,
865
924
  });
925
+ const bulmaHelperStyles = useColorStyles({ backgroundColor });
866
926
  const spacingClasses = useSpacingClasses({
867
927
  m,
868
928
  mt,
@@ -950,7 +1010,7 @@ const useBulmaClasses = (props) => {
950
1010
  flexboxClasses,
951
1011
  otherClasses,
952
1012
  ]);
953
- return { bulmaHelperClasses, rest };
1013
+ return { bulmaHelperClasses, bulmaHelperStyles, rest };
954
1014
  };
955
1015
 
956
1016
  /**
@@ -1413,6 +1473,23 @@ const Breadcrumb = ({ className, alignment, separator, size, children, ...props
1413
1473
  return (jsxRuntime.jsx("nav", { className: breadcrumbClasses, "aria-label": "breadcrumbs", ...rest, children: jsxRuntime.jsx("ul", { children: children }) }));
1414
1474
  };
1415
1475
 
1476
+ /**
1477
+ * Merges helper-emitted inline styles (e.g., `bulmaHelperStyles` from
1478
+ * `useBulmaClasses`) with a user-supplied `style` prop.
1479
+ *
1480
+ * The user's `style` wins on conflicting properties, and when both inputs are
1481
+ * absent the result is `undefined` — so components that receive neither
1482
+ * render with no `style` attribute at all, exactly as before.
1483
+ *
1484
+ * @function mergeBulmaStyles
1485
+ * @param helperStyles - Inline styles emitted by the Bulma helper hooks.
1486
+ * @param style - The component consumer's `style` prop.
1487
+ * @returns The merged style object, or `undefined` when both are absent.
1488
+ * @example
1489
+ * <section style={mergeBulmaStyles(bulmaHelperStyles, style)} />
1490
+ */
1491
+ const mergeBulmaStyles = (helperStyles, style) => helperStyles || style ? { ...helperStyles, ...style } : undefined;
1492
+
1416
1493
  /**
1417
1494
  * Wrap each footer item in a `.card-footer-item` span.
1418
1495
  * @param {CardProps['footer']} footer - Footer content (single node or array).
@@ -1451,9 +1528,9 @@ const hasCompoundComponents = (children) => {
1451
1528
  * @returns {JSX.Element} The rendered card element.
1452
1529
  * @see {@link https://bulma.io/documentation/components/card/ | Bulma Card documentation}
1453
1530
  */
1454
- const CardComponent = ({ className, children, textColor, color, bgColor, hasShadow = true, header, headerCentered, headerIcon, footer, image, imageAlt, ...props }) => {
1531
+ const CardComponent = ({ className, children, textColor, color, bgColor, hasShadow = true, header, headerCentered, headerIcon, footer, image, imageAlt, style, ...props }) => {
1455
1532
  const { classPrefix } = useConfig();
1456
- const { bulmaHelperClasses, rest } = useBulmaClasses({
1533
+ const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
1457
1534
  color: textColor ?? color,
1458
1535
  backgroundColor: bgColor,
1459
1536
  ...props,
@@ -1472,7 +1549,7 @@ const CardComponent = ({ className, children, textColor, color, bgColor, hasShad
1472
1549
  'is-centered': headerCentered,
1473
1550
  }), children: header })), headerIcon] }));
1474
1551
  };
1475
- return (jsxRuntime.jsxs("div", { className: cardClasses, ...rest, children: [renderHeader(header, headerIcon, headerCentered, classPrefix), image && (jsxRuntime.jsx("div", { className: prefixedClassNames(classPrefix, 'card-image'), children: typeof image === 'string' ? (jsxRuntime.jsx("figure", { className: prefixedClassNames(classPrefix, 'image'), children: jsxRuntime.jsx("img", { src: image, alt: imageAlt ?? 'Card image' }) })) : (image) })), typeof children !== 'undefined' &&
1552
+ return (jsxRuntime.jsxs("div", { className: cardClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: [renderHeader(header, headerIcon, headerCentered, classPrefix), image && (jsxRuntime.jsx("div", { className: prefixedClassNames(classPrefix, 'card-image'), children: typeof image === 'string' ? (jsxRuntime.jsx("figure", { className: prefixedClassNames(classPrefix, 'image'), children: jsxRuntime.jsx("img", { src: image, alt: imageAlt ?? 'Card image' }) })) : (image) })), typeof children !== 'undefined' &&
1476
1553
  children !== null &&
1477
1554
  children !== '' &&
1478
1555
  !hasCompoundComponents(children) && (jsxRuntime.jsx("div", { className: prefixedClassNames(classPrefix, 'card-content'), children: children })), typeof children !== 'undefined' &&
@@ -1490,14 +1567,19 @@ const CardComponent = ({ className, children, textColor, color, bgColor, hasShad
1490
1567
  * @param {CardHeaderProps} props - Props for the CardHeader component.
1491
1568
  * @returns {JSX.Element} The rendered card header.
1492
1569
  */
1493
- const CardHeader = ({ className, children, centered, ...props }) => {
1570
+ const CardHeader = ({ className, children, centered, color, bgColor, textColor, ...props }) => {
1494
1571
  const { classPrefix } = useConfig();
1572
+ const { bulmaHelperClasses, rest } = useBulmaClasses({
1573
+ color: textColor ?? color,
1574
+ backgroundColor: bgColor,
1575
+ ...props,
1576
+ });
1495
1577
  // Check if children contains a CardHeaderTitle component
1496
1578
  const hasHeaderTitle = React.Children.toArray(children).some(child => React.isValidElement(child) &&
1497
1579
  typeof child.type === 'function' &&
1498
1580
  child.type === CardHeaderTitle);
1499
1581
  const headerClasses = usePrefixedClassNames('card-header');
1500
- return (jsxRuntime.jsx("header", { className: classNames(headerClasses, className), ...props, children: hasHeaderTitle ? (children) : (jsxRuntime.jsx("div", { className: classNames(prefixedClassNames(classPrefix, 'card-header-title', {
1582
+ return (jsxRuntime.jsx("header", { className: classNames(headerClasses, bulmaHelperClasses, className), ...rest, children: hasHeaderTitle ? (children) : (jsxRuntime.jsx("div", { className: classNames(prefixedClassNames(classPrefix, 'card-header-title', {
1501
1583
  'is-centered': centered,
1502
1584
  }), className), children: children })) }));
1503
1585
  };
@@ -1508,9 +1590,16 @@ const CardHeader = ({ className, children, centered, ...props }) => {
1508
1590
  * @param {CardHeaderTitleProps} props - Props for the CardHeaderTitle component.
1509
1591
  * @returns {JSX.Element} The rendered card header title.
1510
1592
  */
1511
- const CardHeaderTitle = ({ className, children, centered, ...props }) => (jsxRuntime.jsx("div", { className: classNames(usePrefixedClassNames('card-header-title', {
1512
- 'is-centered': centered,
1513
- }), className), ...props, children: children }));
1593
+ const CardHeaderTitle = ({ className, children, centered, color, bgColor, textColor, ...props }) => {
1594
+ const { bulmaHelperClasses, rest } = useBulmaClasses({
1595
+ color: textColor ?? color,
1596
+ backgroundColor: bgColor,
1597
+ ...props,
1598
+ });
1599
+ return (jsxRuntime.jsx("div", { className: classNames(usePrefixedClassNames('card-header-title', {
1600
+ 'is-centered': centered,
1601
+ }), bulmaHelperClasses, className), ...rest, children: children }));
1602
+ };
1514
1603
  /**
1515
1604
  * Card header icon compound component. Renders a `.card-header-icon` button.
1516
1605
  *
@@ -1518,7 +1607,14 @@ const CardHeaderTitle = ({ className, children, centered, ...props }) => (jsxRun
1518
1607
  * @param {CardHeaderIconProps} props - Props for the CardHeaderIcon component.
1519
1608
  * @returns {JSX.Element} The rendered card header icon button.
1520
1609
  */
1521
- const CardHeaderIcon = ({ className, children, ...props }) => (jsxRuntime.jsx("button", { className: classNames(usePrefixedClassNames('card-header-icon'), className), "aria-label": props['aria-label'] || 'more options', ...props, children: children }));
1610
+ const CardHeaderIcon = ({ className, children, color, bgColor, textColor, ...props }) => {
1611
+ const { bulmaHelperClasses, rest } = useBulmaClasses({
1612
+ color: textColor ?? color,
1613
+ backgroundColor: bgColor,
1614
+ ...props,
1615
+ });
1616
+ return (jsxRuntime.jsx("button", { className: classNames(usePrefixedClassNames('card-header-icon'), bulmaHelperClasses, className), "aria-label": props['aria-label'] || 'more options', ...rest, children: children }));
1617
+ };
1522
1618
  /**
1523
1619
  * Card image compound component. Wraps children in a `.card-image` element.
1524
1620
  *
@@ -1526,7 +1622,14 @@ const CardHeaderIcon = ({ className, children, ...props }) => (jsxRuntime.jsx("b
1526
1622
  * @param {CardImageProps} props - Props for the CardImage component.
1527
1623
  * @returns {JSX.Element} The rendered card image container.
1528
1624
  */
1529
- const CardImage = ({ className, children, ...props }) => (jsxRuntime.jsx("div", { className: classNames(usePrefixedClassNames('card-image'), className), ...props, children: children }));
1625
+ const CardImage = ({ className, children, color, bgColor, textColor, ...props }) => {
1626
+ const { bulmaHelperClasses, rest } = useBulmaClasses({
1627
+ color: textColor ?? color,
1628
+ backgroundColor: bgColor,
1629
+ ...props,
1630
+ });
1631
+ return (jsxRuntime.jsx("div", { className: classNames(usePrefixedClassNames('card-image'), bulmaHelperClasses, className), ...rest, children: children }));
1632
+ };
1530
1633
  /**
1531
1634
  * Card content compound component. Wraps children in a `.card-content` element.
1532
1635
  *
@@ -1534,7 +1637,14 @@ const CardImage = ({ className, children, ...props }) => (jsxRuntime.jsx("div",
1534
1637
  * @param {CardContentProps} props - Props for the CardContent component.
1535
1638
  * @returns {JSX.Element} The rendered card content container.
1536
1639
  */
1537
- const CardContent = ({ className, children, ...props }) => (jsxRuntime.jsx("div", { className: classNames(usePrefixedClassNames('card-content'), className), ...props, children: children }));
1640
+ const CardContent = ({ className, children, color, bgColor, textColor, ...props }) => {
1641
+ const { bulmaHelperClasses, rest } = useBulmaClasses({
1642
+ color: textColor ?? color,
1643
+ backgroundColor: bgColor,
1644
+ ...props,
1645
+ });
1646
+ return (jsxRuntime.jsx("div", { className: classNames(usePrefixedClassNames('card-content'), bulmaHelperClasses, className), ...rest, children: children }));
1647
+ };
1538
1648
  /**
1539
1649
  * Card footer compound component. Wraps children in a `.card-footer` element.
1540
1650
  *
@@ -1542,7 +1652,14 @@ const CardContent = ({ className, children, ...props }) => (jsxRuntime.jsx("div"
1542
1652
  * @param {CardFooterProps} props - Props for the CardFooter component.
1543
1653
  * @returns {JSX.Element} The rendered card footer.
1544
1654
  */
1545
- const CardFooter = ({ className, children, ...props }) => (jsxRuntime.jsx("footer", { className: classNames(usePrefixedClassNames('card-footer'), className), ...props, children: children }));
1655
+ const CardFooter = ({ className, children, color, bgColor, textColor, ...props }) => {
1656
+ const { bulmaHelperClasses, rest } = useBulmaClasses({
1657
+ color: textColor ?? color,
1658
+ backgroundColor: bgColor,
1659
+ ...props,
1660
+ });
1661
+ return (jsxRuntime.jsx("footer", { className: classNames(usePrefixedClassNames('card-footer'), bulmaHelperClasses, className), ...rest, children: children }));
1662
+ };
1546
1663
  /**
1547
1664
  * Card footer item compound component. Wraps children in a `.card-footer-item` span.
1548
1665
  *
@@ -1550,7 +1667,14 @@ const CardFooter = ({ className, children, ...props }) => (jsxRuntime.jsx("foote
1550
1667
  * @param {CardFooterItemProps} props - Props for the CardFooterItem component.
1551
1668
  * @returns {JSX.Element} The rendered card footer item.
1552
1669
  */
1553
- const CardFooterItem = ({ className, children, ...props }) => (jsxRuntime.jsx("span", { className: classNames(usePrefixedClassNames('card-footer-item'), className), ...props, children: children }));
1670
+ const CardFooterItem = ({ className, children, color, bgColor, textColor, ...props }) => {
1671
+ const { bulmaHelperClasses, rest } = useBulmaClasses({
1672
+ color: textColor ?? color,
1673
+ backgroundColor: bgColor,
1674
+ ...props,
1675
+ });
1676
+ return (jsxRuntime.jsx("span", { className: classNames(usePrefixedClassNames('card-footer-item'), bulmaHelperClasses, className), ...rest, children: children }));
1677
+ };
1554
1678
  // Attach nested Title and Icon components to CardHeader
1555
1679
  const CardHeaderCompound = withSubComponents(CardHeader, {
1556
1680
  Title: CardHeaderTitle,
@@ -2643,7 +2767,7 @@ function useTabsContext() {
2643
2767
  * </Tabs.Content>
2644
2768
  * </Tabs>
2645
2769
  */
2646
- const TabsComponent = ({ align, size, fullwidth, boxed, toggle, rounded, color, value, onChange, defaultValue = 0, vertical, side, expanded, className, children, ...props }) => {
2770
+ const TabsComponent = ({ align, size, isFullwidth, isFullWidth, fullwidth, boxed, toggle, rounded, color, value, onChange, defaultValue = 0, vertical, side, expanded, className, children, ...props }) => {
2647
2771
  warnDeprecatedColorProp('Tabs', color, 'Remove the prop; no replacement exists.');
2648
2772
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
2649
2773
  // Controlled vs uncontrolled state
@@ -2662,7 +2786,7 @@ const TabsComponent = ({ align, size, fullwidth, boxed, toggle, rounded, color,
2662
2786
  [`is-${align}`]: align,
2663
2787
  [`is-${size}`]: size,
2664
2788
  [`is-${color}`]: color,
2665
- 'is-fullwidth': fullwidth,
2789
+ 'is-fullwidth': isFullwidth ?? isFullWidth ?? fullwidth,
2666
2790
  'is-boxed': boxed,
2667
2791
  'is-toggle': toggle,
2668
2792
  'is-toggle-rounded': rounded,
@@ -3352,9 +3476,10 @@ const Steps = withSubComponents(StepsComponent, { Step }, 'Steps');
3352
3476
  * <div>Panel content</div>
3353
3477
  * </Sidebar>
3354
3478
  */
3355
- const SidebarComponent = React.forwardRef(({ isOpen, onClose, position = 'left', width = '260px', fullWidth = false, overlay = true, overlayClose = true, escapeClose = true, canCancel = true, children, inline = false, className, style, ...props }, ref) => {
3479
+ const SidebarComponent = React.forwardRef(({ isOpen, onClose, position = 'left', width = '260px', isFullwidth, fullWidth, overlay = true, overlayClose = true, escapeClose = true, canCancel = true, children, inline = false, className, style, ...props }, ref) => {
3356
3480
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
3357
3481
  const sidebarRef = React.useRef(null);
3482
+ const resolvedFullwidth = isFullwidth ?? fullWidth ?? false;
3358
3483
  // Close handler
3359
3484
  const handleClose = React.useCallback(() => {
3360
3485
  if (canCancel && onClose) {
@@ -3421,7 +3546,7 @@ const SidebarComponent = React.forwardRef(({ isOpen, onClose, position = 'left',
3421
3546
  const sidebarClasses = usePrefixedClassNames('sidebar', {
3422
3547
  'is-active': isOpen,
3423
3548
  [`is-${position}`]: position,
3424
- 'is-fullwidth': fullWidth,
3549
+ 'is-fullwidth': resolvedFullwidth,
3425
3550
  });
3426
3551
  const backgroundClass = usePrefixedClassNames('sidebar-background', {
3427
3552
  'is-active': isOpen,
@@ -3431,7 +3556,7 @@ const SidebarComponent = React.forwardRef(({ isOpen, onClose, position = 'left',
3431
3556
  // Custom style for width
3432
3557
  const sidebarStyle = {
3433
3558
  ...style,
3434
- '--bulma-sidebar-width': fullWidth ? '100%' : width,
3559
+ '--bulma-sidebar-width': resolvedFullwidth ? '100%' : width,
3435
3560
  };
3436
3561
  const sidebarContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [overlay && (jsxRuntime.jsx("div", { className: backgroundClass, onClick: handleOverlayClick, "aria-hidden": "true" })), jsxRuntime.jsx("aside", { ref: combinedRef, className: combinedClasses, style: sidebarStyle, role: "dialog", "aria-modal": overlay ? 'true' : undefined, "aria-hidden": !isOpen, tabIndex: -1, ...rest, children: jsxRuntime.jsx("div", { className: contentClass, children: children }) })] }));
3437
3562
  if (inline) {
@@ -3999,7 +4124,7 @@ const validButtonColors = [...validColors, 'text', 'ghost'];
3999
4124
  * @returns {JSX.Element} The rendered button or anchor element.
4000
4125
  * @see {@link https://bulma.io/documentation/elements/button/ | Bulma Button documentation}
4001
4126
  */
4002
- 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 }) => {
4127
+ 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 }) => {
4003
4128
  const { bulmaHelperClasses, rest } = useBulmaClasses({
4004
4129
  color: textColor,
4005
4130
  backgroundColor: bgColor,
@@ -4020,7 +4145,7 @@ const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWi
4020
4145
  'is-focused': isFocused,
4021
4146
  'is-active': isActive,
4022
4147
  'is-inverted': isInverted,
4023
- 'is-fullwidth': isFullWidth,
4148
+ 'is-fullwidth': isFullwidth ?? isFullWidth,
4024
4149
  });
4025
4150
  // Combine prefixed Bulma classes with unprefixed user className and prefixed helper classes
4026
4151
  const buttonClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
@@ -4522,11 +4647,11 @@ const Block = ({ className, textColor, color, bgColor, children, ...props }) =>
4522
4647
  * @returns {JSX.Element} The rendered box element.
4523
4648
  * @see {@link https://bulma.io/documentation/elements/box/ | Bulma Box documentation}
4524
4649
  */
4525
- const Box = ({ className, textColor, color, bgColor, hasShadow = true, children, ...props }) => {
4650
+ const Box = ({ className, textColor, color, bgColor, hasShadow = true, children, style, ...props }) => {
4526
4651
  /**
4527
4652
  * Generates Bulma helper classes and separates out remaining props.
4528
4653
  */
4529
- const { bulmaHelperClasses, rest } = useBulmaClasses({
4654
+ const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
4530
4655
  color: textColor ?? color,
4531
4656
  backgroundColor: bgColor,
4532
4657
  ...props,
@@ -4535,7 +4660,7 @@ const Box = ({ className, textColor, color, bgColor, hasShadow = true, children,
4535
4660
  'is-shadowless': !hasShadow,
4536
4661
  });
4537
4662
  const boxClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
4538
- return (jsxRuntime.jsx("div", { className: boxClasses, ...rest, children: children }));
4663
+ return (jsxRuntime.jsx("div", { className: boxClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
4539
4664
  };
4540
4665
 
4541
4666
  /**
@@ -5236,8 +5361,11 @@ const SubTitle = ({ className, size, as = 'h1', hasSkeleton, textColor, bgColor,
5236
5361
  });
5237
5362
  // Validate 'as' prop at runtime
5238
5363
  const element = validSubTitleElements.includes(as) ? as : 'h1';
5239
- // Validate 'size' prop at runtime
5240
- const validSize = size && validSubTitleSizes.includes(size) ? size : undefined;
5364
+ // Validate 'size' prop at runtime (numeric sizes normalize to strings)
5365
+ const normalized = size == null ? undefined : String(size);
5366
+ const validSize = normalized && validSubTitleSizes.includes(normalized)
5367
+ ? normalized
5368
+ : undefined;
5241
5369
  const bulmaClasses = usePrefixedClassNames('subtitle', {
5242
5370
  [`is-${validSize}`]: validSize,
5243
5371
  'has-skeleton': hasSkeleton,
@@ -5397,7 +5525,7 @@ const Th = ({ className, isAligned, width, color, children, ...props }) => {
5397
5525
  * @returns {JSX.Element} The rendered table element.
5398
5526
  * @see {@link https://bulma.io/documentation/elements/table/ | Bulma Table documentation}
5399
5527
  */
5400
- const TableComponent = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isResponsive, children, ...props }) => {
5528
+ const TableComponent = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isFullWidth, isResponsive, children, ...props }) => {
5401
5529
  /**
5402
5530
  * Generates Bulma helper classes and separates out remaining props.
5403
5531
  */
@@ -5407,7 +5535,7 @@ const TableComponent = ({ className, isBordered, isStriped, isNarrow, isHoverabl
5407
5535
  'is-striped': isStriped,
5408
5536
  'is-narrow': isNarrow,
5409
5537
  'is-hoverable': isHoverable,
5410
- 'is-fullwidth': isFullwidth,
5538
+ 'is-fullwidth': isFullwidth ?? isFullWidth,
5411
5539
  });
5412
5540
  const containerClass = usePrefixedClassNames('table-container');
5413
5541
  const tableClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
@@ -5447,7 +5575,7 @@ const validTagSizes = ['normal', 'medium', 'large'];
5447
5575
  * @returns {JSX.Element} The rendered tag element.
5448
5576
  * @see {@link https://bulma.io/documentation/elements/tag/ | Bulma Tag documentation}
5449
5577
  */
5450
- const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelete, children, ...props }) => {
5578
+ const Tag = ({ className, color, size, isLight, isRounded, isDelete, isHoverable, onDelete, children, ...props }) => {
5451
5579
  /**
5452
5580
  * Generates Bulma helper classes and separates out remaining props.
5453
5581
  */
@@ -5455,6 +5583,7 @@ const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelet
5455
5583
  const bulmaClasses = usePrefixedClassNames('tag', {
5456
5584
  [`is-${color}`]: color && validTagColors.includes(color),
5457
5585
  [`is-${size}`]: size && size !== 'normal' && validTagSizes.includes(size),
5586
+ 'is-light': isLight,
5458
5587
  'is-rounded': isRounded,
5459
5588
  'is-delete': isDelete,
5460
5589
  'is-hoverable': isHoverable,
@@ -5509,8 +5638,11 @@ const Title = ({ className, size, isSpaced, as = 'h1', hasSkeleton, textColor, b
5509
5638
  });
5510
5639
  // Validate 'as' prop at runtime
5511
5640
  const element = validTitleElements.includes(as) ? as : 'h1';
5512
- // Validate 'size' prop at runtime
5513
- const validSize = size && validTitleSizes.includes(size) ? size : undefined;
5641
+ // Validate 'size' prop at runtime (numeric sizes normalize to strings)
5642
+ const normalized = size == null ? undefined : String(size);
5643
+ const validSize = normalized && validTitleSizes.includes(normalized)
5644
+ ? normalized
5645
+ : undefined;
5514
5646
  const bulmaClasses = usePrefixedClassNames('title', {
5515
5647
  [`is-${validSize}`]: validSize,
5516
5648
  'is-spaced': isSpaced,
@@ -5993,7 +6125,7 @@ const Checkboxes = withSubComponents(CheckboxesComponent, { Checkbox }, 'Checkbo
5993
6125
  */
5994
6126
  const File = React.forwardRef(({
5995
6127
  // Field props
5996
- label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, color, size, isBoxed, isFullwidth, isRight, isCentered, hasName, buttonLabel, iconLeft, iconRight, className, inputClassName, fileName, ...props }, ref) => {
6128
+ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, color, size, isBoxed, isFullwidth, isFullWidth, isRight, isCentered, hasName, buttonLabel, iconLeft, iconRight, className, inputClassName, fileName, ...props }, ref) => {
5997
6129
  const insideField = useInsideField();
5998
6130
  const { controlId, fieldLabelProps } = useAutoLabelId({
5999
6131
  label,
@@ -6022,7 +6154,7 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
6022
6154
  [`is-${color}`]: !!color,
6023
6155
  [`is-${size}`]: !!size,
6024
6156
  'is-boxed': isBoxed,
6025
- 'is-fullwidth': isFullwidth,
6157
+ 'is-fullwidth': isFullwidth ?? isFullWidth,
6026
6158
  'has-name': hasName,
6027
6159
  });
6028
6160
  const fileClass = classNames(mainClass, bulmaHelperClasses, alignmentClass, className);
@@ -6863,6 +6995,8 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
6863
6995
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [numberinputElement, messageEl] }));
6864
6996
  });
6865
6997
  Numberinput.displayName = 'Numberinput';
6998
+ /** @deprecated Use `Numberinput` — same component. */
6999
+ const NumberInput = Numberinput;
6866
7000
 
6867
7001
  /**
6868
7002
  * Default star icon component.
@@ -7690,6 +7824,8 @@ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName,
7690
7824
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [taginputElement, messageEl] }));
7691
7825
  });
7692
7826
  Taginput.displayName = 'Taginput';
7827
+ /** @deprecated Use `Taginput` — same component. */
7828
+ const TagInput = Taginput;
7693
7829
 
7694
7830
  /**
7695
7831
  * Bulma Input component with full Bulma helper class support.
@@ -7730,7 +7866,7 @@ InputBase.displayName = 'InputBase';
7730
7866
  * @returns {JSX.Element} The rendered select element.
7731
7867
  * @see {@link https://bulma.io/documentation/form/select/ | Bulma Select documentation}
7732
7868
  */
7733
- const SelectBase = React.forwardRef(({ color, size, isRounded, isLoading, isActive, isHovered, isFocused, isFullwidth, className, disabled, children, multiple, multipleSize, ...props }, ref) => {
7869
+ const SelectBase = React.forwardRef(({ color, size, isRounded, isLoading, isActive, isHovered, isFocused, isFullwidth, isFullWidth, className, disabled, children, multiple, multipleSize, ...props }, ref) => {
7734
7870
  const { bulmaHelperClasses, rest } = useBulmaClasses({
7735
7871
  color,
7736
7872
  ...props,
@@ -7743,7 +7879,7 @@ const SelectBase = React.forwardRef(({ color, size, isRounded, isLoading, isActi
7743
7879
  'is-loading': isLoading,
7744
7880
  'is-active': isActive,
7745
7881
  'is-multiple': !!multiple,
7746
- 'is-fullwidth': isFullwidth,
7882
+ 'is-fullwidth': isFullwidth ?? isFullWidth,
7747
7883
  });
7748
7884
  const selectClass = classNames(mainClass, bulmaHelperClasses, className);
7749
7885
  // is-hovered / is-focused belong on the inner <select> element, not the wrapper.
@@ -11116,6 +11252,12 @@ const bulmaCssVars = [
11116
11252
  // scheme
11117
11253
  '--bulma-scheme-h',
11118
11254
  '--bulma-scheme-s',
11255
+ '--bulma-scheme-main',
11256
+ '--bulma-scheme-main-bis',
11257
+ '--bulma-scheme-main-ter',
11258
+ '--bulma-scheme-invert',
11259
+ '--bulma-scheme-invert-bis',
11260
+ '--bulma-scheme-invert-ter',
11119
11261
  '--bulma-light-l',
11120
11262
  '--bulma-light-invert-l',
11121
11263
  '--bulma-dark-l',
@@ -11799,8 +11941,8 @@ const Theme = ({ bulmaVars = {}, children, className, isRoot = false, colorMode,
11799
11941
  * @returns {JSX.Element} The rendered container.
11800
11942
  * @see {@link https://bulma.io/documentation/layout/container/ | Bulma Container documentation}
11801
11943
  */
11802
- const Container = ({ className, textColor, color, bgColor, fluid, widescreen, fullhd, breakpoint, isMax, children, ...props }) => {
11803
- const { bulmaHelperClasses, rest } = useBulmaClasses({
11944
+ const Container = ({ className, textColor, color, bgColor, fluid, widescreen, fullhd, breakpoint, isMax, children, style, ...props }) => {
11945
+ const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
11804
11946
  color: textColor ?? color,
11805
11947
  backgroundColor: bgColor,
11806
11948
  ...props,
@@ -11828,7 +11970,7 @@ const Container = ({ className, textColor, color, bgColor, fluid, widescreen, fu
11828
11970
  });
11829
11971
  const prefixedBreakpointClass = usePrefixedClassNames(breakpointClass || '');
11830
11972
  const containerClasses = classNames(mainClass, containerModifiers, prefixedBreakpointClass, className, bulmaHelperClasses);
11831
- return (jsxRuntime.jsx("div", { className: containerClasses, ...rest, children: children }));
11973
+ return (jsxRuntime.jsx("div", { className: containerClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
11832
11974
  };
11833
11975
 
11834
11976
  /**
@@ -11844,8 +11986,8 @@ const Container = ({ className, textColor, color, bgColor, fluid, widescreen, fu
11844
11986
  * <div className="content has-text-centered">...</div>
11845
11987
  * </Footer>
11846
11988
  */
11847
- const Footer = ({ as = 'footer', className, children, color, bgColor, textColor, ...props }) => {
11848
- const { bulmaHelperClasses, rest } = useBulmaClasses({
11989
+ const Footer = ({ as = 'footer', className, children, color, bgColor, textColor, style, ...props }) => {
11990
+ const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
11849
11991
  color: textColor ?? color,
11850
11992
  backgroundColor: bgColor,
11851
11993
  ...props,
@@ -11853,7 +11995,7 @@ const Footer = ({ as = 'footer', className, children, color, bgColor, textColor,
11853
11995
  const Tag = as;
11854
11996
  const mainClass = usePrefixedClassNames('footer');
11855
11997
  const footerClasses = classNames(mainClass, bulmaHelperClasses, className);
11856
- return (jsxRuntime.jsx(Tag, { className: footerClasses, ...rest, children: children }));
11998
+ return (jsxRuntime.jsx(Tag, { className: footerClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
11857
11999
  };
11858
12000
 
11859
12001
  /**
@@ -11864,9 +12006,9 @@ const Footer = ({ as = 'footer', className, children, color, bgColor, textColor,
11864
12006
  * @returns {JSX.Element} The rendered hero.
11865
12007
  * @see {@link https://bulma.io/documentation/layout/hero/ | Bulma Hero documentation}
11866
12008
  */
11867
- const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
12009
+ const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar, children, style, ...props }) => {
11868
12010
  warnUnstyledColor('Hero', color, ['inherit', 'current']);
11869
- const { bulmaHelperClasses, rest } = useBulmaClasses({
12011
+ const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
11870
12012
  backgroundColor: bgColor,
11871
12013
  ...props,
11872
12014
  });
@@ -11876,7 +12018,7 @@ const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar,
11876
12018
  'is-fullheight-with-navbar': fullheightWithNavbar || size === 'fullheight-with-navbar',
11877
12019
  });
11878
12020
  const heroClasses = classNames(mainClass, bulmaHelperClasses, className);
11879
- return (jsxRuntime.jsx("section", { className: heroClasses, ...rest, children: children }));
12021
+ return (jsxRuntime.jsx("section", { className: heroClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
11880
12022
  };
11881
12023
  /**
11882
12024
  * Top bar for navigation or branding.
@@ -11885,15 +12027,15 @@ const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar,
11885
12027
  * @param {HeroHeadProps} props - Props for the HeroHead component.
11886
12028
  * @returns {JSX.Element} The rendered hero head.
11887
12029
  */
11888
- const HeroHead = ({ className, children, color, bgColor, textColor, ...props }) => {
11889
- const { bulmaHelperClasses, rest } = useBulmaClasses({
12030
+ const HeroHead = ({ className, children, color, bgColor, textColor, style, ...props }) => {
12031
+ const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
11890
12032
  color: textColor ?? color,
11891
12033
  backgroundColor: bgColor,
11892
12034
  ...props,
11893
12035
  });
11894
12036
  const mainClass = usePrefixedClassNames('hero-head');
11895
12037
  const heroHeadClasses = classNames(mainClass, bulmaHelperClasses, className);
11896
- return (jsxRuntime.jsx("div", { className: heroHeadClasses, ...rest, children: children }));
12038
+ return (jsxRuntime.jsx("div", { className: heroHeadClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
11897
12039
  };
11898
12040
  /**
11899
12041
  * Main content area, vertically centered by default.
@@ -11902,15 +12044,15 @@ const HeroHead = ({ className, children, color, bgColor, textColor, ...props })
11902
12044
  * @param {HeroBodyProps} props - Props for the HeroBody component.
11903
12045
  * @returns {JSX.Element} The rendered hero body.
11904
12046
  */
11905
- const HeroBody = ({ className, children, color, bgColor, textColor, ...props }) => {
11906
- const { bulmaHelperClasses, rest } = useBulmaClasses({
12047
+ const HeroBody = ({ className, children, color, bgColor, textColor, style, ...props }) => {
12048
+ const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
11907
12049
  color: textColor ?? color,
11908
12050
  backgroundColor: bgColor,
11909
12051
  ...props,
11910
12052
  });
11911
12053
  const mainClass = usePrefixedClassNames('hero-body');
11912
12054
  const heroBodyClasses = classNames(mainClass, bulmaHelperClasses, className);
11913
- return (jsxRuntime.jsx("div", { className: heroBodyClasses, ...rest, children: children }));
12055
+ return (jsxRuntime.jsx("div", { className: heroBodyClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
11914
12056
  };
11915
12057
  /**
11916
12058
  * Bottom bar for tabs or actions.
@@ -11919,15 +12061,15 @@ const HeroBody = ({ className, children, color, bgColor, textColor, ...props })
11919
12061
  * @param {HeroFootProps} props - Props for the HeroFoot component.
11920
12062
  * @returns {JSX.Element} The rendered hero foot.
11921
12063
  */
11922
- const HeroFoot = ({ className, children, color, bgColor, textColor, ...props }) => {
11923
- const { bulmaHelperClasses, rest } = useBulmaClasses({
12064
+ const HeroFoot = ({ className, children, color, bgColor, textColor, style, ...props }) => {
12065
+ const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
11924
12066
  color: textColor ?? color,
11925
12067
  backgroundColor: bgColor,
11926
12068
  ...props,
11927
12069
  });
11928
12070
  const mainClass = usePrefixedClassNames('hero-foot');
11929
12071
  const heroFootClasses = classNames(mainClass, bulmaHelperClasses, className);
11930
- return (jsxRuntime.jsx("div", { className: heroFootClasses, ...rest, children: children }));
12072
+ return (jsxRuntime.jsx("div", { className: heroFootClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
11931
12073
  };
11932
12074
  // Attach subcomponents
11933
12075
  const Hero = withSubComponents(HeroComponent, {
@@ -12106,8 +12248,8 @@ const Media = withSubComponents(MediaComponent, {
12106
12248
  * @returns {JSX.Element} The rendered section.
12107
12249
  * @see {@link https://bulma.io/documentation/layout/section/ | Bulma Section documentation}
12108
12250
  */
12109
- const Section = ({ size, className, children, color, bgColor, textColor, ...props }) => {
12110
- const { bulmaHelperClasses, rest } = useBulmaClasses({
12251
+ const Section = ({ size, className, children, color, bgColor, textColor, style, ...props }) => {
12252
+ const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({
12111
12253
  color: textColor ?? color,
12112
12254
  backgroundColor: bgColor,
12113
12255
  ...props,
@@ -12117,7 +12259,7 @@ const Section = ({ size, className, children, color, bgColor, textColor, ...prop
12117
12259
  [`is-${size}`]: size,
12118
12260
  });
12119
12261
  const sectionClasses = classNames(mainClass, sectionModifiers, className, bulmaHelperClasses);
12120
- return (jsxRuntime.jsx("section", { className: sectionClasses, ...rest, children: children }));
12262
+ return (jsxRuntime.jsx("section", { className: sectionClasses, style: mergeBulmaStyles(bulmaHelperStyles, style), ...rest, children: children }));
12121
12263
  };
12122
12264
 
12123
12265
  exports.Autocomplete = Autocomplete;
@@ -12202,6 +12344,7 @@ exports.NavbarMenu = NavbarMenu;
12202
12344
  exports.NavbarStart = NavbarStart;
12203
12345
  exports.Notification = Notification;
12204
12346
  exports.NotificationContainer = NotificationContainer;
12347
+ exports.NumberInput = NumberInput;
12205
12348
  exports.Numberinput = Numberinput;
12206
12349
  exports.OrderedList = OrderedList;
12207
12350
  exports.Pagination = Pagination;
@@ -12245,6 +12388,7 @@ exports.Table = Table;
12245
12388
  exports.Tabs = Tabs;
12246
12389
  exports.TabsContent = TabsContent;
12247
12390
  exports.Tag = Tag;
12391
+ exports.TagInput = TagInput;
12248
12392
  exports.Taginput = Taginput;
12249
12393
  exports.Tags = Tags;
12250
12394
  exports.Tbody = Tbody;
@@ -12270,6 +12414,7 @@ exports.classNames = classNames;
12270
12414
  exports.createPrefixedClassNames = createPrefixedClassNames;
12271
12415
  exports.dialog = dialog;
12272
12416
  exports.isBrowser = isBrowser$1;
12417
+ exports.mergeBulmaStyles = mergeBulmaStyles;
12273
12418
  exports.notification = notification;
12274
12419
  exports.prefixedClassNames = prefixedClassNames;
12275
12420
  exports.radioColors = radioColors;
@@ -12280,6 +12425,7 @@ exports.toast = toast;
12280
12425
  exports.useBulmaClasses = useBulmaClasses;
12281
12426
  exports.useClassPrefix = useClassPrefix;
12282
12427
  exports.useColorClasses = useColorClasses;
12428
+ exports.useColorStyles = useColorStyles;
12283
12429
  exports.useConfig = useConfig;
12284
12430
  exports.useFlexboxClasses = useFlexboxClasses;
12285
12431
  exports.useIconLibrary = useIconLibrary;
@@ -12303,6 +12449,7 @@ exports.validFlexGrowShrink = validFlexGrowShrink;
12303
12449
  exports.validFlexWraps = validFlexWraps;
12304
12450
  exports.validFontFamilies = validFontFamilies;
12305
12451
  exports.validJustifyContents = validJustifyContents;
12452
+ exports.validSchemeColors = validSchemeColors;
12306
12453
  exports.validSizes = validSizes$1;
12307
12454
  exports.validTableColors = validTableColors;
12308
12455
  exports.validTextSizes = validTextSizes;