@allxsmith/bestax-bulma 5.6.2 → 5.7.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
@@ -682,7 +682,15 @@ const Column = ({ className, textColor, color: _fieldColor, bgColor, size, sizeM
682
682
  return (jsxRuntime.jsx("div", { className: columnClasses, ...rest, children: children }));
683
683
  };
684
684
 
685
- const Columns = ({ className, textColor, color: _fieldColor, bgColor, isCentered, isGapless, isMultiline, isVCentered, isMobile, isDesktop, gap, gapMobile, gapTablet, gapDesktop, gapWidescreen, gapFullhd, gapSize, gapSizeMobile, gapSizeTablet, gapSizeDesktop, gapSizeWidescreen, gapSizeFullhd, children, ...props }) => {
685
+ function withSubComponents(base, subs, displayName) {
686
+ const compound = Object.assign(base, subs);
687
+ if (displayName !== undefined) {
688
+ compound.displayName = displayName;
689
+ }
690
+ return compound;
691
+ }
692
+
693
+ const ColumnsComponent = ({ className, textColor, color: _fieldColor, bgColor, isCentered, isGapless, isMultiline, isVCentered, isMobile, isDesktop, gap, gapMobile, gapTablet, gapDesktop, gapWidescreen, gapFullhd, gapSize, gapSizeMobile, gapSizeTablet, gapSizeDesktop, gapSizeWidescreen, gapSizeFullhd, children, ...props }) => {
686
694
  const resolvedGap = gap ?? gapSize;
687
695
  const resolvedGapMobile = gapMobile ?? gapSizeMobile;
688
696
  const resolvedGapTablet = gapTablet ?? gapSizeTablet;
@@ -712,6 +720,7 @@ const Columns = ({ className, textColor, color: _fieldColor, bgColor, isCentered
712
720
  const columnsClasses = classNames(mainClass, gapClasses, className, bulmaHelperClasses);
713
721
  return (jsxRuntime.jsx("div", { className: columnsClasses, ...rest, children: children }));
714
722
  };
723
+ const Columns = withSubComponents(ColumnsComponent, { Column }, 'Columns');
715
724
 
716
725
  const avatarColors = [
717
726
  'primary',
@@ -841,7 +850,7 @@ function flattenChildren(children, keyPrefix = '') {
841
850
  ];
842
851
  });
843
852
  }
844
- const Avatars = ({ className, max, size, shape, spacing = 'md', spaced = false, surplusLabel, style, children, ...props }) => {
853
+ const AvatarsComponent = ({ className, max, size, shape, spacing = 'md', spaced = false, surplusLabel, style, children, ...props }) => {
845
854
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
846
855
  const isPresetSpacing = typeof spacing === 'string';
847
856
  const avatarsClasses = usePrefixedClassNames('avatars', {
@@ -866,8 +875,7 @@ const Avatars = ({ className, max, size, shape, spacing = 'md', spaced = false,
866
875
  ...(shape !== undefined ? { shape } : {}),
867
876
  })), overflowCount > 0 && (jsxRuntime.jsx(Avatar, { initials: `+${overflowCount}`, alt: surplusLabel?.(overflowCount) || `${overflowCount} more`, size: size, shape: shape, className: surplusClass }))] }));
868
877
  };
869
- Avatars.displayName = 'Avatars';
870
- Avatars.Avatar = Avatar;
878
+ const Avatars = withSubComponents(AvatarsComponent, { Avatar }, 'Avatars');
871
879
 
872
880
  const badgeColors = [
873
881
  'primary',
@@ -1016,15 +1024,17 @@ const CardImage = ({ className, children, ...props }) => (jsxRuntime.jsx("div",
1016
1024
  const CardContent = ({ className, children, ...props }) => (jsxRuntime.jsx("div", { className: classNames(usePrefixedClassNames('card-content'), className), ...props, children: children }));
1017
1025
  const CardFooter = ({ className, children, ...props }) => (jsxRuntime.jsx("footer", { className: classNames(usePrefixedClassNames('card-footer'), className), ...props, children: children }));
1018
1026
  const CardFooterItem = ({ className, children, ...props }) => (jsxRuntime.jsx("span", { className: classNames(usePrefixedClassNames('card-footer-item'), className), ...props, children: children }));
1019
- const CardWithSubComponents = CardComponent;
1020
- const CardHeaderWithTitle = CardHeader;
1021
- CardHeaderWithTitle.Title = CardHeaderTitle;
1022
- CardHeaderWithTitle.Icon = CardHeaderIcon;
1023
- CardWithSubComponents.Header = CardHeaderWithTitle;
1024
- CardWithSubComponents.Image = CardImage;
1025
- CardWithSubComponents.Content = CardContent;
1026
- CardWithSubComponents.Footer = CardFooter;
1027
- CardWithSubComponents.FooterItem = CardFooterItem;
1027
+ const CardHeaderCompound = withSubComponents(CardHeader, {
1028
+ Title: CardHeaderTitle,
1029
+ Icon: CardHeaderIcon,
1030
+ });
1031
+ const Card = withSubComponents(CardComponent, {
1032
+ Header: CardHeaderCompound,
1033
+ Image: CardImage,
1034
+ Content: CardContent,
1035
+ Footer: CardFooter,
1036
+ FooterItem: CardFooterItem,
1037
+ }, 'Card');
1028
1038
  const __test_exports__ = { renderFooter };
1029
1039
 
1030
1040
  const isBrowser$1 = (win, doc) => typeof win !== 'undefined' && typeof doc !== 'undefined';
@@ -1081,10 +1091,10 @@ const DropdownItem = ({ children, active, className, as: Component = 'a', ...pro
1081
1091
  }), bulmaHelperClasses, className), tabIndex: 0, role: "menuitem", "data-testid": "dropdown-item", ...rest, children: children }));
1082
1092
  };
1083
1093
  const DropdownDivider = () => (jsxRuntime.jsx("hr", { className: usePrefixedClassNames('dropdown-divider') }));
1084
- const Dropdown = Object.assign(DropdownComponent, {
1094
+ const Dropdown = withSubComponents(DropdownComponent, {
1085
1095
  Item: DropdownItem,
1086
1096
  Divider: DropdownDivider,
1087
- });
1097
+ }, 'Dropdown');
1088
1098
 
1089
1099
  const MenuListLevelContext = React.createContext(0);
1090
1100
  const MenuComponent = ({ className, children, ...props }) => {
@@ -1126,11 +1136,11 @@ const MenuItem = ({ className, children, active, href, as: Component = 'a', 'dat
1126
1136
  }
1127
1137
  return (jsxRuntime.jsxs("li", { className: className, "data-testid": testId, style: style, id: id, title: title, role: role, tabIndex: tabIndex, children: [jsxRuntime.jsx(Component, { className: itemClass, ...linkProps, children: labelChildren }), nestedMenuLists] }));
1128
1138
  };
1129
- const Menu = Object.assign(MenuComponent, {
1139
+ const Menu = withSubComponents(MenuComponent, {
1130
1140
  Label: MenuLabel,
1131
1141
  List: MenuList,
1132
1142
  Item: MenuItem,
1133
- });
1143
+ }, 'Menu');
1134
1144
 
1135
1145
  const MessageComponent = ({ className, title, textColor, color, bgColor, onClose, children, ...props }) => {
1136
1146
  const { classPrefix } = useConfig();
@@ -1148,9 +1158,10 @@ const MessageComponent = ({ className, title, textColor, color, bgColor, onClose
1148
1158
  };
1149
1159
  const MessageHeader = ({ className, children, ...props }) => (jsxRuntime.jsx("div", { className: classNames(usePrefixedClassNames('message-header'), className), ...props, children: children }));
1150
1160
  const MessageBody = ({ className, children, ...props }) => (jsxRuntime.jsx("div", { className: classNames(usePrefixedClassNames('message-body'), className), ...props, children: children }));
1151
- const MessageWithSubComponents = MessageComponent;
1152
- MessageWithSubComponents.Header = MessageHeader;
1153
- MessageWithSubComponents.Body = MessageBody;
1161
+ const Message = withSubComponents(MessageComponent, {
1162
+ Header: MessageHeader,
1163
+ Body: MessageBody,
1164
+ }, 'Message');
1154
1165
 
1155
1166
  const ModalBackground = ({ className, ...props }) => {
1156
1167
  const classes = classNames(usePrefixedClassNames('modal-background'), className);
@@ -1176,14 +1187,16 @@ const ModalCardFoot = ({ className, ...props }) => {
1176
1187
  const classes = classNames(usePrefixedClassNames('modal-card-foot'), className);
1177
1188
  return jsxRuntime.jsx("footer", { className: classes, ...props });
1178
1189
  };
1179
- const ModalCard = ({ className, ...props }) => {
1190
+ const ModalCardComponent = ({ className, ...props }) => {
1180
1191
  const classes = classNames(usePrefixedClassNames('modal-card'), className);
1181
1192
  return jsxRuntime.jsx("div", { className: classes, ...props });
1182
1193
  };
1183
- ModalCard.Head = ModalCardHead;
1184
- ModalCard.Title = ModalCardTitle;
1185
- ModalCard.Body = ModalCardBody;
1186
- ModalCard.Foot = ModalCardFoot;
1194
+ const ModalCard = withSubComponents(ModalCardComponent, {
1195
+ Head: ModalCardHead,
1196
+ Title: ModalCardTitle,
1197
+ Body: ModalCardBody,
1198
+ Foot: ModalCardFoot,
1199
+ });
1187
1200
  const ModalClose = ({ className, size = 'large', variant = 'delete', ...props }) => {
1188
1201
  const classes = classNames(usePrefixedClassNames(variant === 'delete' ? 'delete' : 'modal-close', variant === 'floating' && size && { [`is-${size}`]: true }), className);
1189
1202
  return (jsxRuntime.jsx("button", { className: classes, "aria-label": "close", type: "button", ...props }));
@@ -1218,13 +1231,14 @@ const ModalRoot = ({ active, isActive, onClose, className, textColor, bgColor, m
1218
1231
  isModalCard = !!modalCardTitle || !!modalCardFoot;
1219
1232
  return (jsxRuntime.jsxs("div", { className: modalClasses, ...rest, "data-testid": "modal", children: [jsxRuntime.jsx("div", { className: prefixedClassNames(classPrefix, 'modal-background'), onClick: onClose, "data-testid": "modal-background" }), isModalCard ? (jsxRuntime.jsxs("div", { className: prefixedClassNames(classPrefix, 'modal-card'), children: [modalCardTitle && (jsxRuntime.jsxs("header", { className: prefixedClassNames(classPrefix, 'modal-card-head'), children: [jsxRuntime.jsx("p", { className: prefixedClassNames(classPrefix, 'modal-card-title'), children: modalCardTitle }), onClose && (jsxRuntime.jsx("button", { className: deleteClass, "aria-label": "close", onClick: onClose, type: "button", "data-testid": "modal-close" }))] })), jsxRuntime.jsx("section", { className: prefixedClassNames(classPrefix, 'modal-card-body'), "data-testid": "modal-body", children: children }), modalCardFoot && (jsxRuntime.jsx("footer", { className: prefixedClassNames(classPrefix, 'modal-card-foot'), children: modalCardFoot }))] })) : (jsxRuntime.jsx("div", { className: prefixedClassNames(classPrefix, 'modal-content'), "data-testid": "modal-content", children: children })), (!isModalCard || (!modalCardTitle && onClose)) && onClose && (jsxRuntime.jsx("button", { className: prefixedClassNames(classPrefix, 'modal-close', 'is-large'), "aria-label": "close", onClick: onClose, type: "button", "data-testid": "modal-close-float" }))] }));
1220
1233
  };
1221
- ModalRoot.Background = ModalBackground;
1222
- ModalRoot.Content = ModalContent;
1223
- ModalRoot.Card = ModalCard;
1224
- ModalRoot.Close = ModalClose;
1225
- const Modal = ModalRoot;
1234
+ const Modal = withSubComponents(ModalRoot, {
1235
+ Background: ModalBackground,
1236
+ Content: ModalContent,
1237
+ Card: ModalCard,
1238
+ Close: ModalClose,
1239
+ }, 'Modal');
1226
1240
 
1227
- const Navbar = ({ className, textColor, bgColor, color, transparent, fixed, children, ...props }) => {
1241
+ const NavbarComponent = ({ className, textColor, bgColor, color, transparent, fixed, children, ...props }) => {
1228
1242
  const { bulmaHelperClasses, rest } = useBulmaClasses({
1229
1243
  color: textColor,
1230
1244
  backgroundColor: bgColor,
@@ -1304,16 +1318,18 @@ const NavbarDropdownMenu = ({ className, right, up, children, ...props }) => (js
1304
1318
  'is-up': up,
1305
1319
  }), className), ...props, children: children }));
1306
1320
  const NavbarDivider = props => (jsxRuntime.jsx("hr", { className: usePrefixedClassNames('navbar-divider'), ...props }));
1307
- Navbar.Brand = NavbarBrand;
1308
- Navbar.Item = NavbarItem;
1309
- Navbar.Link = NavbarLink;
1310
- Navbar.Burger = NavbarBurger;
1311
- Navbar.Menu = NavbarMenu;
1312
- Navbar.Start = NavbarStart;
1313
- Navbar.End = NavbarEnd;
1314
- Navbar.Dropdown = NavbarDropdown;
1315
- Navbar.DropdownMenu = NavbarDropdownMenu;
1316
- Navbar.Divider = NavbarDivider;
1321
+ const Navbar = withSubComponents(NavbarComponent, {
1322
+ Brand: NavbarBrand,
1323
+ Item: NavbarItem,
1324
+ Link: NavbarLink,
1325
+ Burger: NavbarBurger,
1326
+ Menu: NavbarMenu,
1327
+ Start: NavbarStart,
1328
+ End: NavbarEnd,
1329
+ Dropdown: NavbarDropdown,
1330
+ DropdownMenu: NavbarDropdownMenu,
1331
+ Divider: NavbarDivider,
1332
+ }, 'Navbar');
1317
1333
 
1318
1334
  const PaginationPrevious = ({ className, disabled, children, ...props }) => (jsxRuntime.jsx("a", { className: classNames(usePrefixedClassNames('pagination-previous'), className, {
1319
1335
  'is-disabled': disabled,
@@ -1331,7 +1347,7 @@ const PaginationNext = ({ className, disabled, children, ...props }) => (jsxRunt
1331
1347
  e.stopPropagation();
1332
1348
  }
1333
1349
  : props.onClick, children: children }));
1334
- const Pagination = ({ color, textColor, bgColor, size, align, rounded, className, children, ...props }) => {
1350
+ const PaginationComponent = ({ color, textColor, bgColor, size, align, rounded, className, children, ...props }) => {
1335
1351
  const { bulmaHelperClasses, rest } = useBulmaClasses({
1336
1352
  color: textColor,
1337
1353
  backgroundColor: bgColor,
@@ -1376,11 +1392,13 @@ const PaginationLink = ({ className, textColor, bgColor, active, disabled, onCli
1376
1392
  }), "aria-current": active ? 'page' : undefined, "aria-disabled": disabled, tabIndex: disabled ? -1 : 0, onClick: handleClick, ...rest, children: children }) }));
1377
1393
  };
1378
1394
  const PaginationEllipsis = props => (jsxRuntime.jsx("li", { children: jsxRuntime.jsx("span", { className: usePrefixedClassNames('pagination-ellipsis'), ...props, children: "\u2026" }) }));
1379
- Pagination.Link = PaginationLink;
1380
- Pagination.List = PaginationList;
1381
- Pagination.Ellipsis = PaginationEllipsis;
1382
- Pagination.Previous = PaginationPrevious;
1383
- Pagination.Next = PaginationNext;
1395
+ const Pagination = withSubComponents(PaginationComponent, {
1396
+ Link: PaginationLink,
1397
+ List: PaginationList,
1398
+ Ellipsis: PaginationEllipsis,
1399
+ Previous: PaginationPrevious,
1400
+ Next: PaginationNext,
1401
+ }, 'Pagination');
1384
1402
 
1385
1403
  function stripRedundantLibraryPrefix(name, library) {
1386
1404
  if (!name) {
@@ -1546,7 +1564,7 @@ const Icon = ({ className, textColor, bgColor, name, library, variant, features,
1546
1564
  return (jsxRuntime.jsx("span", { className: iconContainerClasses, "aria-label": ariaLabel, style: style, ...rest, children: jsxRuntime.jsx("i", { className: iClasses }) }));
1547
1565
  };
1548
1566
 
1549
- const Panel = ({ color, className, children, ...props }) => {
1567
+ const PanelComponent = ({ color, className, children, ...props }) => {
1550
1568
  const { bulmaHelperClasses, rest } = useBulmaClasses({
1551
1569
  color,
1552
1570
  ...props,
@@ -1567,19 +1585,21 @@ const PanelInputBlock = ({ value, onChange, placeholder, iconClassName = 'fas fa
1567
1585
  };
1568
1586
  const PanelCheckboxBlock = ({ checked, onChange, children, ...props }) => (jsxRuntime.jsxs("label", { className: usePrefixedClassNames('panel-block'), ...props, children: [jsxRuntime.jsx("input", { type: "checkbox", checked: checked, onChange: onChange }), children] }));
1569
1587
  const PanelButtonBlock = ({ children, className, ...props }) => (jsxRuntime.jsx("div", { className: usePrefixedClassNames('panel-block'), children: jsxRuntime.jsx("button", { className: classNames(usePrefixedClassNames('button', 'is-link', 'is-outlined', 'is-fullwidth'), className), ...props, children: children }) }));
1570
- Panel.Heading = PanelHeading;
1571
- Panel.Tabs = PanelTabs;
1572
- Panel.Block = PanelBlock;
1573
- Panel.Icon = PanelIcon;
1574
- Panel.InputBlock = PanelInputBlock;
1575
- Panel.CheckboxBlock = PanelCheckboxBlock;
1576
- Panel.ButtonBlock = PanelButtonBlock;
1588
+ const Panel = withSubComponents(PanelComponent, {
1589
+ Heading: PanelHeading,
1590
+ Tabs: PanelTabs,
1591
+ Block: PanelBlock,
1592
+ Icon: PanelIcon,
1593
+ InputBlock: PanelInputBlock,
1594
+ CheckboxBlock: PanelCheckboxBlock,
1595
+ ButtonBlock: PanelButtonBlock,
1596
+ }, 'Panel');
1577
1597
 
1578
1598
  const TabsContext = React.createContext(null);
1579
1599
  function useTabsContext() {
1580
1600
  return React.useContext(TabsContext);
1581
1601
  }
1582
- const Tabs = ({ align, size, fullwidth, boxed, toggle, rounded, color, value, onChange, defaultValue = 0, vertical, side, expanded, className, children, ...props }) => {
1602
+ const TabsComponent = ({ align, size, fullwidth, boxed, toggle, rounded, color, value, onChange, defaultValue = 0, vertical, side, expanded, className, children, ...props }) => {
1583
1603
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
1584
1604
  const isControlled = value !== undefined;
1585
1605
  const [internalTab, setInternalTab] = React.useState(defaultValue);
@@ -1652,7 +1672,7 @@ const Tab = ({ index, disabled, icon, iconLibrary, iconVariant, iconSize = 'smal
1652
1672
  return (jsxRuntime.jsx("li", { className: classNames(activeClass, className), role: "tab", "aria-selected": isActive, tabIndex: disabled ? -1 : 0, ...props, children: jsxRuntime.jsxs("a", { onClick: handleClick, "aria-disabled": disabled || undefined, children: [icon && (jsxRuntime.jsx(Icon, { name: icon, library: iconLibrary, variant: iconVariant, size: iconSize, features: iconFeatures })), children && jsxRuntime.jsx("span", { children: children })] }) }));
1653
1673
  };
1654
1674
  const TabItem = ({ active, className, children, onClick, ...props }) => (jsxRuntime.jsx("li", { className: classNames({ [usePrefixedClassNames('is-active')]: active }, className), onClick: onClick, ...props, children: children }));
1655
- const TabsContent = ({ className, children, ...props }) => {
1675
+ const TabsContentComponent = ({ className, children, ...props }) => {
1656
1676
  const contentClass = usePrefixedClassNames('tabs-content');
1657
1677
  return (jsxRuntime.jsx("div", { className: classNames(contentClass, className), ...props, children: children }));
1658
1678
  };
@@ -1664,11 +1684,15 @@ const TabContentItem = ({ index, className, children, ...props }) => {
1664
1684
  });
1665
1685
  return (jsxRuntime.jsx("div", { className: classNames(itemClass, className), role: "tabpanel", "aria-hidden": !isActive, ...props, children: children }));
1666
1686
  };
1667
- TabsContent.Item = TabContentItem;
1668
- Tabs.List = TabList;
1669
- Tabs.Tab = Tab;
1670
- Tabs.Item = TabItem;
1671
- Tabs.Content = Object.assign(TabsContent, { Item: TabContentItem });
1687
+ const TabsContent = withSubComponents(TabsContentComponent, {
1688
+ Item: TabContentItem,
1689
+ });
1690
+ const Tabs = withSubComponents(TabsComponent, {
1691
+ List: TabList,
1692
+ Tab,
1693
+ Item: TabItem,
1694
+ Content: TabsContent,
1695
+ }, 'Tabs');
1672
1696
 
1673
1697
  const Loading = ({ active = false, isFullPage = false, size, color, canCancel = false, onCancel, children, className, overlayClassName, iconClassName, indicator, overlay, ...props }) => {
1674
1698
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
@@ -1991,7 +2015,7 @@ const Step = ({ isActive = false, isCompleted = false, label, icon, clickable =
1991
2015
  : (stepNumber ?? null));
1992
2016
  return (jsxRuntime.jsx("li", { className: stepClasses, onClick: handleClick, onKeyDown: handleKeyDown, tabIndex: clickable ? 0 : undefined, role: clickable ? 'button' : undefined, "aria-current": isActive ? 'step' : undefined, ...rest, children: jsxRuntime.jsxs("div", { className: stepsLinkClass, children: [jsxRuntime.jsx("span", { className: stepsMarkerClass, children: markerContent }), (label || children) && (jsxRuntime.jsx("div", { className: stepsContentClass, children: jsxRuntime.jsx("p", { className: stepsTitleClass, children: label || children }) }))] }) }));
1993
2017
  };
1994
- const Steps = ({ value = 0, items, size, color, hasMarker = true, animated = true, rounded = true, vertical = false, labelPosition = 'bottom', mobileMode, showStepNumbers = true, hasNavigation = false, prevLabel, nextLabel, onPrev, onNext, onStepClick, className, children, ...props }) => {
2018
+ const StepsComponent = ({ value = 0, items, size, color, hasMarker = true, animated = true, rounded = true, vertical = false, labelPosition = 'bottom', mobileMode, showStepNumbers = true, hasNavigation = false, prevLabel, nextLabel, onPrev, onNext, onStepClick, className, children, ...props }) => {
1995
2019
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
1996
2020
  const stepsClasses = usePrefixedClassNames('steps', {
1997
2021
  [`is-${size}`]: size,
@@ -2036,7 +2060,7 @@ const Steps = ({ value = 0, items, size, color, hasMarker = true, animated = tru
2036
2060
  };
2037
2061
  return (jsxRuntime.jsxs("div", { className: combinedClasses, ...rest, children: [jsxRuntime.jsx("ul", { className: listClasses, children: renderSteps() }), hasNavigation && (jsxRuntime.jsxs("div", { className: stepsNavigationClass, children: [jsxRuntime.jsx("button", { className: prevButtonClass, disabled: value === 0, onClick: onPrev ?? (() => onStepClick?.(value - 1)), children: prevLabel ?? 'Previous' }), jsxRuntime.jsx("button", { className: nextButtonClass, disabled: value === totalSteps - 1, onClick: onNext ?? (() => onStepClick?.(value + 1)), children: nextLabel ?? 'Next' })] }))] }));
2038
2062
  };
2039
- Steps.Step = Step;
2063
+ const Steps = withSubComponents(StepsComponent, { Step }, 'Steps');
2040
2064
 
2041
2065
  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) => {
2042
2066
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
@@ -2119,7 +2143,6 @@ const SidebarComponent = React.forwardRef(({ isOpen, onClose, position = 'left',
2119
2143
  }
2120
2144
  return null;
2121
2145
  });
2122
- SidebarComponent.displayName = 'Sidebar';
2123
2146
  const SidebarHeader = ({ className, children, ...props }) => {
2124
2147
  const headerClass = usePrefixedClassNames('sidebar-header');
2125
2148
  return (jsxRuntime.jsx("div", { className: classNames(headerClass, className), ...props, children: children }));
@@ -2140,13 +2163,13 @@ const SidebarFooter = ({ className, children, ...props }) => {
2140
2163
  const footerClass = usePrefixedClassNames('sidebar-footer');
2141
2164
  return (jsxRuntime.jsx("div", { className: classNames(footerClass, className), ...props, children: children }));
2142
2165
  };
2143
- const Sidebar = Object.assign(SidebarComponent, {
2166
+ const Sidebar = withSubComponents(SidebarComponent, {
2144
2167
  Header: SidebarHeader,
2145
2168
  Title: SidebarTitle,
2146
2169
  Close: SidebarClose,
2147
2170
  Body: SidebarBody,
2148
2171
  Footer: SidebarFooter,
2149
- });
2172
+ }, 'Sidebar');
2150
2173
 
2151
2174
  const Toast = React.forwardRef(({ message, type = 'default', actionType, position = 'top-right', duration = 2000, indefinite = false, dismissible = true, closable = false, rounded = false, pauseOnHover = false, cancelable = true, actionText, cancelText, onAction, onClose, container, inline = false, className, ...props }, ref) => {
2152
2175
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
@@ -2885,7 +2908,13 @@ const Box = ({ className, textColor, bgColor, hasShadow = true, children, ...pro
2885
2908
  return (jsxRuntime.jsx("div", { className: boxClasses, ...rest, children: children }));
2886
2909
  };
2887
2910
 
2888
- const Buttons = ({ className, textColor, bgColor, isCentered, isRight, hasAddons, children, ...props }) => {
2911
+ const LinkButton = ({ variant = 'text', color, className, ...props }) => {
2912
+ const buttonColor = variant === 'underline' ? 'text' : variant;
2913
+ const prefixedClasses = usePrefixedClassNames('link-button', color && `link-button-${color}`, variant === 'underline' && 'link-button-underline');
2914
+ return (jsxRuntime.jsx(Button, { color: buttonColor, className: classNames(prefixedClasses, className), ...props }));
2915
+ };
2916
+
2917
+ const ButtonsComponent = ({ className, textColor, bgColor, isCentered, isRight, hasAddons, children, ...props }) => {
2889
2918
  const buttonsClasses = usePrefixedClassNames('buttons', {
2890
2919
  'is-centered': isCentered,
2891
2920
  'is-right': isRight,
@@ -2899,12 +2928,10 @@ const Buttons = ({ className, textColor, bgColor, isCentered, isRight, hasAddons
2899
2928
  const combinedClasses = classNames(buttonsClasses, className, bulmaHelperClasses);
2900
2929
  return (jsxRuntime.jsx("div", { className: combinedClasses, ...rest, children: children }));
2901
2930
  };
2902
-
2903
- const LinkButton = ({ variant = 'text', color, className, ...props }) => {
2904
- const buttonColor = variant === 'underline' ? 'text' : variant;
2905
- const prefixedClasses = usePrefixedClassNames('link-button', color && `link-button-${color}`, variant === 'underline' && 'link-button-underline');
2906
- return (jsxRuntime.jsx(Button, { color: buttonColor, className: classNames(prefixedClasses, className), ...props }));
2907
- };
2931
+ const Buttons = withSubComponents(ButtonsComponent, {
2932
+ Button,
2933
+ LinkButton,
2934
+ }, 'Buttons');
2908
2935
 
2909
2936
  const Code = ({ className, textColor, bgColor, children, ...props }) => {
2910
2937
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -2986,11 +3013,11 @@ const FigureComponent = ({ className, textColor, bgColor, children, ...props })
2986
3013
  const figureClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
2987
3014
  return (jsxRuntime.jsx("figure", { className: figureClasses || undefined, ...rest, children: children }));
2988
3015
  };
2989
- const Figure = Object.assign(FigureComponent, {
3016
+ const Figure = withSubComponents(FigureComponent, {
2990
3017
  Caption: FigureCaption,
2991
- });
3018
+ }, 'Figure');
2992
3019
 
2993
- const IconText = ({ className, textColor, bgColor, iconProps, children, items, ...props }) => {
3020
+ const IconTextComponent = ({ className, textColor, bgColor, iconProps, children, items, ...props }) => {
2994
3021
  const { bulmaHelperClasses, rest } = useBulmaClasses({
2995
3022
  color: textColor,
2996
3023
  backgroundColor: bgColor,
@@ -3000,6 +3027,7 @@ const IconText = ({ className, textColor, bgColor, iconProps, children, items, .
3000
3027
  const iconTextClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
3001
3028
  return (jsxRuntime.jsx("span", { className: iconTextClasses, ...rest, children: items ? (items.map((item, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(Icon, { ...item.iconProps }), item.text && jsxRuntime.jsx("span", { children: item.text })] }, index)))) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [iconProps && jsxRuntime.jsx(Icon, { ...iconProps }), children && jsxRuntime.jsx("span", { children: children })] })) }));
3002
3029
  };
3030
+ const IconText = withSubComponents(IconTextComponent, { Icon }, 'IconText');
3003
3031
 
3004
3032
  const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, src, alt, children, ...props }) => {
3005
3033
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -3182,7 +3210,7 @@ const NotificationContainer = ({ position = 'top-right' }) => {
3182
3210
  return reactDom.createPortal(jsxRuntime.jsx("div", { style: containerStyle, children: items.map(item => (jsxRuntime.jsx(NotificationItem, { instance: item, onClose: notification.close }, item.id))) }), document.body);
3183
3211
  };
3184
3212
 
3185
- const OrderedList = ({ className, textColor, bgColor, children, ...props }) => {
3213
+ const OrderedListComponent = ({ className, textColor, bgColor, children, ...props }) => {
3186
3214
  const { bulmaHelperClasses, rest } = useBulmaClasses({
3187
3215
  color: textColor,
3188
3216
  backgroundColor: bgColor,
@@ -3192,6 +3220,7 @@ const OrderedList = ({ className, textColor, bgColor, children, ...props }) => {
3192
3220
  const listClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
3193
3221
  return (jsxRuntime.jsx("ol", { className: listClasses || undefined, ...rest, children: children }));
3194
3222
  };
3223
+ const OrderedList = withSubComponents(OrderedListComponent, { Item: ListItem }, 'OrderedList');
3195
3224
 
3196
3225
  const Paragraph = ({ className, textColor, bgColor, children, ...props }) => {
3197
3226
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -3285,7 +3314,69 @@ const SubTitle = ({ className, size, as = 'h1', hasSkeleton, textColor, bgColor,
3285
3314
  return (jsxRuntime.jsx(Tag, { className: subTitleClasses, ...rest, children: children }));
3286
3315
  };
3287
3316
 
3288
- const Table = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isResponsive, children, ...props }) => {
3317
+ const Thead = ({ className, children, ...props }) => {
3318
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3319
+ const theadClasses = classNames(className, bulmaHelperClasses);
3320
+ return (jsxRuntime.jsx("thead", { className: theadClasses, ...rest, children: children }));
3321
+ };
3322
+
3323
+ const Tbody = ({ className, children, ...props }) => {
3324
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3325
+ const tbodyClasses = classNames(className, bulmaHelperClasses);
3326
+ return (jsxRuntime.jsx("tbody", { className: tbodyClasses, ...rest, children: children }));
3327
+ };
3328
+
3329
+ const Tfoot = ({ className, children, ...props }) => {
3330
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3331
+ const tfootClasses = classNames(className, bulmaHelperClasses);
3332
+ return (jsxRuntime.jsx("tfoot", { className: tfootClasses, ...rest, children: children }));
3333
+ };
3334
+
3335
+ const validTableColors = [
3336
+ 'primary',
3337
+ 'link',
3338
+ 'info',
3339
+ 'success',
3340
+ 'warning',
3341
+ 'danger',
3342
+ 'black',
3343
+ 'dark',
3344
+ 'light',
3345
+ 'white',
3346
+ ];
3347
+ const Td = ({ className, color, children, ...props }) => {
3348
+ const colorClass = usePrefixedClassNames('', {
3349
+ [`is-${color}`]: color && validTableColors.includes(color),
3350
+ });
3351
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3352
+ const tdClasses = classNames(colorClass, className, bulmaHelperClasses);
3353
+ return (jsxRuntime.jsx("td", { className: tdClasses, ...rest, children: children }));
3354
+ };
3355
+
3356
+ const Tr = ({ className, isSelected, color, children, ...props }) => {
3357
+ const bulmaClasses = usePrefixedClassNames('', {
3358
+ 'is-selected': isSelected,
3359
+ [`is-${color}`]: color && validTableColors.includes(color),
3360
+ });
3361
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3362
+ const trClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
3363
+ return (jsxRuntime.jsx("tr", { className: trClasses, ...rest, children: children }));
3364
+ };
3365
+
3366
+ const validAlignments = ['left', 'right', 'centered'];
3367
+ const Th = ({ className, isAligned, width, color, children, ...props }) => {
3368
+ const bulmaClasses = usePrefixedClassNames('', {
3369
+ [`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),
3370
+ [`is-${color}`]: color && validTableColors.includes(color),
3371
+ });
3372
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3373
+ const thClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
3374
+ return (jsxRuntime.jsx("th", { className: thClasses, style: width
3375
+ ? { width: typeof width === 'number' ? `${width}px` : width }
3376
+ : undefined, ...rest, children: children }));
3377
+ };
3378
+
3379
+ const TableComponent = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isResponsive, children, ...props }) => {
3289
3380
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3290
3381
  const bulmaClasses = usePrefixedClassNames('table', {
3291
3382
  'is-bordered': isBordered,
@@ -3302,6 +3393,14 @@ const Table = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFull
3302
3393
  }
3303
3394
  return tableElement;
3304
3395
  };
3396
+ const Table = withSubComponents(TableComponent, {
3397
+ Thead,
3398
+ Tbody,
3399
+ Tfoot,
3400
+ Tr,
3401
+ Th,
3402
+ Td,
3403
+ }, 'Table');
3305
3404
 
3306
3405
  const validTagColors = [
3307
3406
  'primary',
@@ -3332,7 +3431,7 @@ const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelet
3332
3431
  return (jsxRuntime.jsx("span", { className: tagClasses, ...rest, children: children }));
3333
3432
  };
3334
3433
 
3335
- const Tags = ({ className, hasAddons, isMultiline, children, ...props }) => {
3434
+ const TagsComponent = ({ className, hasAddons, isMultiline, children, ...props }) => {
3336
3435
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3337
3436
  const bulmaClasses = usePrefixedClassNames('tags', {
3338
3437
  'has-addons': hasAddons,
@@ -3341,58 +3440,7 @@ const Tags = ({ className, hasAddons, isMultiline, children, ...props }) => {
3341
3440
  const tagsClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
3342
3441
  return (jsxRuntime.jsx("div", { className: tagsClasses, ...rest, children: children }));
3343
3442
  };
3344
-
3345
- const Tbody = ({ className, children, ...props }) => {
3346
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3347
- const tbodyClasses = classNames(className, bulmaHelperClasses);
3348
- return (jsxRuntime.jsx("tbody", { className: tbodyClasses, ...rest, children: children }));
3349
- };
3350
-
3351
- const validTableColors = [
3352
- 'primary',
3353
- 'link',
3354
- 'info',
3355
- 'success',
3356
- 'warning',
3357
- 'danger',
3358
- 'black',
3359
- 'dark',
3360
- 'light',
3361
- 'white',
3362
- ];
3363
- const Td = ({ className, color, children, ...props }) => {
3364
- const colorClass = usePrefixedClassNames('', {
3365
- [`is-${color}`]: color && validTableColors.includes(color),
3366
- });
3367
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3368
- const tdClasses = classNames(colorClass, className, bulmaHelperClasses);
3369
- return (jsxRuntime.jsx("td", { className: tdClasses, ...rest, children: children }));
3370
- };
3371
-
3372
- const Tfoot = ({ className, children, ...props }) => {
3373
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3374
- const tfootClasses = classNames(className, bulmaHelperClasses);
3375
- return (jsxRuntime.jsx("tfoot", { className: tfootClasses, ...rest, children: children }));
3376
- };
3377
-
3378
- const validAlignments = ['left', 'right', 'centered'];
3379
- const Th = ({ className, isAligned, width, color, children, ...props }) => {
3380
- const bulmaClasses = usePrefixedClassNames('', {
3381
- [`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),
3382
- [`is-${color}`]: color && validTableColors.includes(color),
3383
- });
3384
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3385
- const thClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
3386
- return (jsxRuntime.jsx("th", { className: thClasses, style: width
3387
- ? { width: typeof width === 'number' ? `${width}px` : width }
3388
- : undefined, ...rest, children: children }));
3389
- };
3390
-
3391
- const Thead = ({ className, children, ...props }) => {
3392
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3393
- const theadClasses = classNames(className, bulmaHelperClasses);
3394
- return (jsxRuntime.jsx("thead", { className: theadClasses, ...rest, children: children }));
3395
- };
3443
+ const Tags = withSubComponents(TagsComponent, { Tag }, 'Tags');
3396
3444
 
3397
3445
  const validTitleSizes = ['1', '2', '3', '4', '5', '6'];
3398
3446
  const validTitleElements = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
@@ -3414,17 +3462,7 @@ const Title = ({ className, size, isSpaced, as = 'h1', hasSkeleton, textColor, b
3414
3462
  return (jsxRuntime.jsx(Tag, { className: titleClasses, ...rest, children: children }));
3415
3463
  };
3416
3464
 
3417
- const Tr = ({ className, isSelected, color, children, ...props }) => {
3418
- const bulmaClasses = usePrefixedClassNames('', {
3419
- 'is-selected': isSelected,
3420
- [`is-${color}`]: color && validTableColors.includes(color),
3421
- });
3422
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3423
- const trClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
3424
- return (jsxRuntime.jsx("tr", { className: trClasses, ...rest, children: children }));
3425
- };
3426
-
3427
- const UnorderedList = ({ className, textColor, bgColor, children, ...props }) => {
3465
+ const UnorderedListComponent = ({ className, textColor, bgColor, children, ...props }) => {
3428
3466
  const { bulmaHelperClasses, rest } = useBulmaClasses({
3429
3467
  color: textColor,
3430
3468
  backgroundColor: bgColor,
@@ -3434,6 +3472,7 @@ const UnorderedList = ({ className, textColor, bgColor, children, ...props }) =>
3434
3472
  const listClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
3435
3473
  return (jsxRuntime.jsx("ul", { className: listClasses || undefined, ...rest, children: children }));
3436
3474
  };
3475
+ const UnorderedList = withSubComponents(UnorderedListComponent, { Item: ListItem }, 'UnorderedList');
3437
3476
 
3438
3477
  const FieldContext = React.createContext(false);
3439
3478
  const ControlContext = React.createContext(false);
@@ -3492,6 +3531,48 @@ const Checkbox = React.forwardRef(({ color, size, className, children, textColor
3492
3531
  });
3493
3532
  Checkbox.displayName = 'Checkbox';
3494
3533
 
3534
+ const allowedColors = [...validColors, 'inherit', 'current'];
3535
+ const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isLoading, isExpanded, size, textColor, bgColor, iconLeft, iconRight, iconLeftName, iconLeftSize, iconRightName, iconRightSize, className, children, ...props }, ref) => {
3536
+ const Component = (as === 'p' ? 'p' : 'div');
3537
+ const { classPrefix } = useConfig();
3538
+ const { textColor: _ignoredTextColor, bgColor: _ignoredBgColor, ...restProps } = props;
3539
+ const safeTextColor = allowedColors.includes(textColor)
3540
+ ? textColor
3541
+ : undefined;
3542
+ const safeBgColor = allowedColors.includes(bgColor)
3543
+ ? bgColor
3544
+ : undefined;
3545
+ const { bulmaHelperClasses, rest } = useBulmaClasses({
3546
+ color: safeTextColor,
3547
+ backgroundColor: safeBgColor,
3548
+ ...restProps,
3549
+ });
3550
+ const leftIconProps = iconLeft ||
3551
+ (iconLeftName
3552
+ ? {
3553
+ name: iconLeftName,
3554
+ size: iconLeftSize,
3555
+ }
3556
+ : undefined);
3557
+ const rightIconProps = iconRight ||
3558
+ (iconRightName
3559
+ ? {
3560
+ name: iconRightName,
3561
+ size: iconRightSize,
3562
+ }
3563
+ : undefined);
3564
+ const mainClass = usePrefixedClassNames('control', {
3565
+ 'has-icons-left': hasIconsLeft || !!leftIconProps,
3566
+ 'has-icons-right': hasIconsRight || !!rightIconProps,
3567
+ 'is-loading': isLoading,
3568
+ 'is-expanded': isExpanded,
3569
+ [`is-${size}`]: !!size,
3570
+ });
3571
+ const controlClass = classNames(mainClass, bulmaHelperClasses, className);
3572
+ return (jsxRuntime.jsx(ControlProvider, { value: true, children: jsxRuntime.jsxs(Component, { className: controlClass, ref: ref, ...restProps, ...rest, children: [children, leftIconProps && leftIconProps.name && (jsxRuntime.jsx(Icon, { ...leftIconProps, className: prefixedClassNames(classPrefix, 'is-left') })), rightIconProps && rightIconProps.name && (jsxRuntime.jsx(Icon, { ...rightIconProps, className: prefixedClassNames(classPrefix, 'is-right') }))] }) }));
3573
+ });
3574
+ Control.displayName = 'Control';
3575
+
3495
3576
  const FieldLabel = ({ size, textColor, bgColor, className, children, ...props }) => {
3496
3577
  const { bulmaHelperClasses, rest } = useBulmaClasses({
3497
3578
  color: textColor,
@@ -3514,7 +3595,7 @@ const FieldBody = ({ textColor, bgColor, className, children, ...props }) => {
3514
3595
  const fieldBodyClass = classNames(mainClass, bulmaHelperClasses, className);
3515
3596
  return (jsxRuntime.jsx("div", { className: fieldBodyClass, ...props, ...rest, children: children }));
3516
3597
  };
3517
- const Field = ({ horizontal, grouped, hasAddons, narrow, label, labelSize, labelProps, textColor, color: _fieldColor, bgColor, className, children, ...props }) => {
3598
+ const FieldComponent = ({ horizontal, grouped, hasAddons, narrow, label, labelSize, labelProps, textColor, color: _fieldColor, bgColor, className, children, ...props }) => {
3518
3599
  const { bulmaHelperClasses, rest } = useBulmaClasses({
3519
3600
  color: textColor,
3520
3601
  backgroundColor: bgColor,
@@ -3565,52 +3646,13 @@ const Field = ({ horizontal, grouped, hasAddons, narrow, label, labelSize, label
3565
3646
  };
3566
3647
  FieldLabel.displayName = 'FieldLabel';
3567
3648
  FieldBody.displayName = 'FieldBody';
3568
- Field.Label = FieldLabel;
3569
- Field.Body = FieldBody;
3570
-
3571
- const allowedColors = [...validColors, 'inherit', 'current'];
3572
- const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isLoading, isExpanded, size, textColor, bgColor, iconLeft, iconRight, iconLeftName, iconLeftSize, iconRightName, iconRightSize, className, children, ...props }, ref) => {
3573
- const Component = (as === 'p' ? 'p' : 'div');
3574
- const { classPrefix } = useConfig();
3575
- const { textColor: _ignoredTextColor, bgColor: _ignoredBgColor, ...restProps } = props;
3576
- const safeTextColor = allowedColors.includes(textColor)
3577
- ? textColor
3578
- : undefined;
3579
- const safeBgColor = allowedColors.includes(bgColor)
3580
- ? bgColor
3581
- : undefined;
3582
- const { bulmaHelperClasses, rest } = useBulmaClasses({
3583
- color: safeTextColor,
3584
- backgroundColor: safeBgColor,
3585
- ...restProps,
3586
- });
3587
- const leftIconProps = iconLeft ||
3588
- (iconLeftName
3589
- ? {
3590
- name: iconLeftName,
3591
- size: iconLeftSize,
3592
- }
3593
- : undefined);
3594
- const rightIconProps = iconRight ||
3595
- (iconRightName
3596
- ? {
3597
- name: iconRightName,
3598
- size: iconRightSize,
3599
- }
3600
- : undefined);
3601
- const mainClass = usePrefixedClassNames('control', {
3602
- 'has-icons-left': hasIconsLeft || !!leftIconProps,
3603
- 'has-icons-right': hasIconsRight || !!rightIconProps,
3604
- 'is-loading': isLoading,
3605
- 'is-expanded': isExpanded,
3606
- [`is-${size}`]: !!size,
3607
- });
3608
- const controlClass = classNames(mainClass, bulmaHelperClasses, className);
3609
- return (jsxRuntime.jsx(ControlProvider, { value: true, children: jsxRuntime.jsxs(Component, { className: controlClass, ref: ref, ...restProps, ...rest, children: [children, leftIconProps && leftIconProps.name && (jsxRuntime.jsx(Icon, { ...leftIconProps, className: prefixedClassNames(classPrefix, 'is-left') })), rightIconProps && rightIconProps.name && (jsxRuntime.jsx(Icon, { ...rightIconProps, className: prefixedClassNames(classPrefix, 'is-right') }))] }) }));
3610
- });
3611
- Control.displayName = 'Control';
3649
+ const Field = withSubComponents(FieldComponent, {
3650
+ Label: FieldLabel,
3651
+ Body: FieldBody,
3652
+ Control,
3653
+ }, 'Field');
3612
3654
 
3613
- const Checkboxes = ({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, name, value, defaultValue, onChange, children, className, ...props }) => {
3655
+ const CheckboxesComponent = ({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, name, value, defaultValue, onChange, children, className, ...props }) => {
3614
3656
  const insideField = useInsideField();
3615
3657
  const insideControl = useInsideControl();
3616
3658
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -3645,6 +3687,7 @@ const Checkboxes = ({ label, labelSize, labelProps, horizontal, message, message
3645
3687
  }
3646
3688
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [content, messageEl] }));
3647
3689
  };
3690
+ const Checkboxes = withSubComponents(CheckboxesComponent, { Checkbox }, 'Checkboxes');
3648
3691
 
3649
3692
  const File = React.forwardRef(({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, color, size, isBoxed, isFullwidth, isRight, isCentered, hasName, buttonLabel, iconLeft, iconRight, className, inputClassName, fileName, ...props }, ref) => {
3650
3693
  const insideField = useInsideField();
@@ -3723,7 +3766,7 @@ const Radio = React.forwardRef(({ color, size, className, children, textColor, d
3723
3766
  });
3724
3767
  Radio.displayName = 'Radio';
3725
3768
 
3726
- const Radios = ({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, name, value, defaultValue, onChange, children, className, ...props }) => {
3769
+ const RadiosComponent = ({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, name, value, defaultValue, onChange, children, className, ...props }) => {
3727
3770
  const insideField = useInsideField();
3728
3771
  const insideControl = useInsideControl();
3729
3772
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -3758,6 +3801,7 @@ const Radios = ({ label, labelSize, labelProps, horizontal, message, messageColo
3758
3801
  }
3759
3802
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [content, messageEl] }));
3760
3803
  };
3804
+ const Radios = withSubComponents(RadiosComponent, { Radio }, 'Radios');
3761
3805
 
3762
3806
  const switchColors = [
3763
3807
  'primary',
@@ -7619,7 +7663,7 @@ const Cell = ({ colStart, colFromEnd, colSpan, rowStart, rowFromEnd, rowSpan, cl
7619
7663
  return (jsxRuntime.jsx("div", { className: cellClasses, ...rest, children: children }));
7620
7664
  };
7621
7665
 
7622
- const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixedColsMobile, fixedColsTablet, fixedColsDesktop, fixedColsWidescreen, fixedColsFullhd, className, textColor, color: _fieldColor, bgColor, children, ...props }) => {
7666
+ const GridComponent = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixedColsMobile, fixedColsTablet, fixedColsDesktop, fixedColsWidescreen, fixedColsFullhd, className, textColor, color: _fieldColor, bgColor, children, ...props }) => {
7623
7667
  const { bulmaHelperClasses, rest } = useBulmaClasses({
7624
7668
  color: textColor,
7625
7669
  backgroundColor: bgColor,
@@ -7647,6 +7691,7 @@ const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixe
7647
7691
  }
7648
7692
  return (jsxRuntime.jsx("div", { className: gridClasses, ...rest, children: children }));
7649
7693
  };
7694
+ const Grid = withSubComponents(GridComponent, { Cell }, 'Grid');
7650
7695
 
7651
7696
  const bulmaCssVars = [
7652
7697
  '--bulma-scheme-h',
@@ -8302,7 +8347,7 @@ const Footer = ({ as = 'footer', className, children, color, bgColor, textColor,
8302
8347
  return (jsxRuntime.jsx(Tag, { className: footerClasses, ...rest, children: children }));
8303
8348
  };
8304
8349
 
8305
- const Hero = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
8350
+ const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
8306
8351
  const { bulmaHelperClasses, rest } = useBulmaClasses({
8307
8352
  backgroundColor: bgColor,
8308
8353
  ...props,
@@ -8345,11 +8390,13 @@ const HeroFoot = ({ className, children, color, bgColor, textColor, ...props })
8345
8390
  const heroFootClasses = classNames(mainClass, bulmaHelperClasses, className);
8346
8391
  return (jsxRuntime.jsx("div", { className: heroFootClasses, ...rest, children: children }));
8347
8392
  };
8348
- Hero.Head = HeroHead;
8349
- Hero.Body = HeroBody;
8350
- Hero.Foot = HeroFoot;
8393
+ const Hero = withSubComponents(HeroComponent, {
8394
+ Head: HeroHead,
8395
+ Body: HeroBody,
8396
+ Foot: HeroFoot,
8397
+ }, 'Hero');
8351
8398
 
8352
- const Level = ({ isMobile, className, children, color, bgColor, textColor, ...props }) => {
8399
+ const LevelComponent = ({ isMobile, className, children, color, bgColor, textColor, ...props }) => {
8353
8400
  const { bulmaHelperClasses, rest } = useBulmaClasses({
8354
8401
  color: textColor ?? color,
8355
8402
  backgroundColor: bgColor,
@@ -8397,11 +8444,13 @@ const LevelItem = ({ as = 'div', hasTextCentered, className, children, href, tar
8397
8444
  }
8398
8445
  return (jsxRuntime.jsx(Tag, { className: levelItemClasses, ...rest, children: children }));
8399
8446
  };
8400
- Level.Left = LevelLeft;
8401
- Level.Right = LevelRight;
8402
- Level.Item = LevelItem;
8447
+ const Level = withSubComponents(LevelComponent, {
8448
+ Left: LevelLeft,
8449
+ Right: LevelRight,
8450
+ Item: LevelItem,
8451
+ }, 'Level');
8403
8452
 
8404
- const Media = ({ as = 'article', className, children, color, bgColor, textColor, ...props }) => {
8453
+ const MediaComponent = ({ as = 'article', className, children, color, bgColor, textColor, ...props }) => {
8405
8454
  const { bulmaHelperClasses, rest } = useBulmaClasses({
8406
8455
  color: textColor ?? color,
8407
8456
  backgroundColor: bgColor,
@@ -8443,10 +8492,11 @@ const MediaRight = ({ className, children, color, bgColor, textColor, ...props }
8443
8492
  const mediaRightClasses = classNames(mainClass, bulmaHelperClasses, className);
8444
8493
  return (jsxRuntime.jsx("div", { className: mediaRightClasses, ...rest, children: children }));
8445
8494
  };
8446
- const MediaWithSubcomponents = Media;
8447
- MediaWithSubcomponents.Left = MediaLeft;
8448
- MediaWithSubcomponents.Content = MediaContent;
8449
- MediaWithSubcomponents.Right = MediaRight;
8495
+ const Media = withSubComponents(MediaComponent, {
8496
+ Left: MediaLeft,
8497
+ Content: MediaContent,
8498
+ Right: MediaRight,
8499
+ }, 'Media');
8450
8500
 
8451
8501
  const Section = ({ size, className, children, color, bgColor, textColor, ...props }) => {
8452
8502
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -8471,7 +8521,7 @@ exports.Box = Box;
8471
8521
  exports.Breadcrumb = Breadcrumb;
8472
8522
  exports.Button = Button;
8473
8523
  exports.Buttons = Buttons;
8474
- exports.Card = CardWithSubComponents;
8524
+ exports.Card = Card;
8475
8525
  exports.Carousel = Carousel;
8476
8526
  exports.CarouselItem = CarouselItem;
8477
8527
  exports.Cell = Cell;
@@ -8529,7 +8579,7 @@ exports.Menu = Menu;
8529
8579
  exports.MenuItem = MenuItem;
8530
8580
  exports.MenuLabel = MenuLabel;
8531
8581
  exports.MenuList = MenuList;
8532
- exports.Message = MessageWithSubComponents;
8582
+ exports.Message = Message;
8533
8583
  exports.Modal = Modal;
8534
8584
  exports.Navbar = Navbar;
8535
8585
  exports.NavbarBrand = NavbarBrand;