@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.esm.js CHANGED
@@ -680,7 +680,15 @@ const Column = ({ className, textColor, color: _fieldColor, bgColor, size, sizeM
680
680
  return (jsx("div", { className: columnClasses, ...rest, children: children }));
681
681
  };
682
682
 
683
- 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 }) => {
683
+ function withSubComponents(base, subs, displayName) {
684
+ const compound = Object.assign(base, subs);
685
+ if (displayName !== undefined) {
686
+ compound.displayName = displayName;
687
+ }
688
+ return compound;
689
+ }
690
+
691
+ 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 }) => {
684
692
  const resolvedGap = gap ?? gapSize;
685
693
  const resolvedGapMobile = gapMobile ?? gapSizeMobile;
686
694
  const resolvedGapTablet = gapTablet ?? gapSizeTablet;
@@ -710,6 +718,7 @@ const Columns = ({ className, textColor, color: _fieldColor, bgColor, isCentered
710
718
  const columnsClasses = classNames(mainClass, gapClasses, className, bulmaHelperClasses);
711
719
  return (jsx("div", { className: columnsClasses, ...rest, children: children }));
712
720
  };
721
+ const Columns = withSubComponents(ColumnsComponent, { Column }, 'Columns');
713
722
 
714
723
  const avatarColors = [
715
724
  'primary',
@@ -839,7 +848,7 @@ function flattenChildren(children, keyPrefix = '') {
839
848
  ];
840
849
  });
841
850
  }
842
- const Avatars = ({ className, max, size, shape, spacing = 'md', spaced = false, surplusLabel, style, children, ...props }) => {
851
+ const AvatarsComponent = ({ className, max, size, shape, spacing = 'md', spaced = false, surplusLabel, style, children, ...props }) => {
843
852
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
844
853
  const isPresetSpacing = typeof spacing === 'string';
845
854
  const avatarsClasses = usePrefixedClassNames('avatars', {
@@ -864,8 +873,7 @@ const Avatars = ({ className, max, size, shape, spacing = 'md', spaced = false,
864
873
  ...(shape !== undefined ? { shape } : {}),
865
874
  })), overflowCount > 0 && (jsx(Avatar, { initials: `+${overflowCount}`, alt: surplusLabel?.(overflowCount) || `${overflowCount} more`, size: size, shape: shape, className: surplusClass }))] }));
866
875
  };
867
- Avatars.displayName = 'Avatars';
868
- Avatars.Avatar = Avatar;
876
+ const Avatars = withSubComponents(AvatarsComponent, { Avatar }, 'Avatars');
869
877
 
870
878
  const badgeColors = [
871
879
  'primary',
@@ -1014,15 +1022,17 @@ const CardImage = ({ className, children, ...props }) => (jsx("div", { className
1014
1022
  const CardContent = ({ className, children, ...props }) => (jsx("div", { className: classNames(usePrefixedClassNames('card-content'), className), ...props, children: children }));
1015
1023
  const CardFooter = ({ className, children, ...props }) => (jsx("footer", { className: classNames(usePrefixedClassNames('card-footer'), className), ...props, children: children }));
1016
1024
  const CardFooterItem = ({ className, children, ...props }) => (jsx("span", { className: classNames(usePrefixedClassNames('card-footer-item'), className), ...props, children: children }));
1017
- const CardWithSubComponents = CardComponent;
1018
- const CardHeaderWithTitle = CardHeader;
1019
- CardHeaderWithTitle.Title = CardHeaderTitle;
1020
- CardHeaderWithTitle.Icon = CardHeaderIcon;
1021
- CardWithSubComponents.Header = CardHeaderWithTitle;
1022
- CardWithSubComponents.Image = CardImage;
1023
- CardWithSubComponents.Content = CardContent;
1024
- CardWithSubComponents.Footer = CardFooter;
1025
- CardWithSubComponents.FooterItem = CardFooterItem;
1025
+ const CardHeaderCompound = withSubComponents(CardHeader, {
1026
+ Title: CardHeaderTitle,
1027
+ Icon: CardHeaderIcon,
1028
+ });
1029
+ const Card = withSubComponents(CardComponent, {
1030
+ Header: CardHeaderCompound,
1031
+ Image: CardImage,
1032
+ Content: CardContent,
1033
+ Footer: CardFooter,
1034
+ FooterItem: CardFooterItem,
1035
+ }, 'Card');
1026
1036
  const __test_exports__ = { renderFooter };
1027
1037
 
1028
1038
  const isBrowser$1 = (win, doc) => typeof win !== 'undefined' && typeof doc !== 'undefined';
@@ -1079,10 +1089,10 @@ const DropdownItem = ({ children, active, className, as: Component = 'a', ...pro
1079
1089
  }), bulmaHelperClasses, className), tabIndex: 0, role: "menuitem", "data-testid": "dropdown-item", ...rest, children: children }));
1080
1090
  };
1081
1091
  const DropdownDivider = () => (jsx("hr", { className: usePrefixedClassNames('dropdown-divider') }));
1082
- const Dropdown = Object.assign(DropdownComponent, {
1092
+ const Dropdown = withSubComponents(DropdownComponent, {
1083
1093
  Item: DropdownItem,
1084
1094
  Divider: DropdownDivider,
1085
- });
1095
+ }, 'Dropdown');
1086
1096
 
1087
1097
  const MenuListLevelContext = createContext(0);
1088
1098
  const MenuComponent = ({ className, children, ...props }) => {
@@ -1124,11 +1134,11 @@ const MenuItem = ({ className, children, active, href, as: Component = 'a', 'dat
1124
1134
  }
1125
1135
  return (jsxs("li", { className: className, "data-testid": testId, style: style, id: id, title: title, role: role, tabIndex: tabIndex, children: [jsx(Component, { className: itemClass, ...linkProps, children: labelChildren }), nestedMenuLists] }));
1126
1136
  };
1127
- const Menu = Object.assign(MenuComponent, {
1137
+ const Menu = withSubComponents(MenuComponent, {
1128
1138
  Label: MenuLabel,
1129
1139
  List: MenuList,
1130
1140
  Item: MenuItem,
1131
- });
1141
+ }, 'Menu');
1132
1142
 
1133
1143
  const MessageComponent = ({ className, title, textColor, color, bgColor, onClose, children, ...props }) => {
1134
1144
  const { classPrefix } = useConfig();
@@ -1146,9 +1156,10 @@ const MessageComponent = ({ className, title, textColor, color, bgColor, onClose
1146
1156
  };
1147
1157
  const MessageHeader = ({ className, children, ...props }) => (jsx("div", { className: classNames(usePrefixedClassNames('message-header'), className), ...props, children: children }));
1148
1158
  const MessageBody = ({ className, children, ...props }) => (jsx("div", { className: classNames(usePrefixedClassNames('message-body'), className), ...props, children: children }));
1149
- const MessageWithSubComponents = MessageComponent;
1150
- MessageWithSubComponents.Header = MessageHeader;
1151
- MessageWithSubComponents.Body = MessageBody;
1159
+ const Message = withSubComponents(MessageComponent, {
1160
+ Header: MessageHeader,
1161
+ Body: MessageBody,
1162
+ }, 'Message');
1152
1163
 
1153
1164
  const ModalBackground = ({ className, ...props }) => {
1154
1165
  const classes = classNames(usePrefixedClassNames('modal-background'), className);
@@ -1174,14 +1185,16 @@ const ModalCardFoot = ({ className, ...props }) => {
1174
1185
  const classes = classNames(usePrefixedClassNames('modal-card-foot'), className);
1175
1186
  return jsx("footer", { className: classes, ...props });
1176
1187
  };
1177
- const ModalCard = ({ className, ...props }) => {
1188
+ const ModalCardComponent = ({ className, ...props }) => {
1178
1189
  const classes = classNames(usePrefixedClassNames('modal-card'), className);
1179
1190
  return jsx("div", { className: classes, ...props });
1180
1191
  };
1181
- ModalCard.Head = ModalCardHead;
1182
- ModalCard.Title = ModalCardTitle;
1183
- ModalCard.Body = ModalCardBody;
1184
- ModalCard.Foot = ModalCardFoot;
1192
+ const ModalCard = withSubComponents(ModalCardComponent, {
1193
+ Head: ModalCardHead,
1194
+ Title: ModalCardTitle,
1195
+ Body: ModalCardBody,
1196
+ Foot: ModalCardFoot,
1197
+ });
1185
1198
  const ModalClose = ({ className, size = 'large', variant = 'delete', ...props }) => {
1186
1199
  const classes = classNames(usePrefixedClassNames(variant === 'delete' ? 'delete' : 'modal-close', variant === 'floating' && size && { [`is-${size}`]: true }), className);
1187
1200
  return (jsx("button", { className: classes, "aria-label": "close", type: "button", ...props }));
@@ -1216,13 +1229,14 @@ const ModalRoot = ({ active, isActive, onClose, className, textColor, bgColor, m
1216
1229
  isModalCard = !!modalCardTitle || !!modalCardFoot;
1217
1230
  return (jsxs("div", { className: modalClasses, ...rest, "data-testid": "modal", children: [jsx("div", { className: prefixedClassNames(classPrefix, 'modal-background'), onClick: onClose, "data-testid": "modal-background" }), isModalCard ? (jsxs("div", { className: prefixedClassNames(classPrefix, 'modal-card'), children: [modalCardTitle && (jsxs("header", { className: prefixedClassNames(classPrefix, 'modal-card-head'), children: [jsx("p", { className: prefixedClassNames(classPrefix, 'modal-card-title'), children: modalCardTitle }), onClose && (jsx("button", { className: deleteClass, "aria-label": "close", onClick: onClose, type: "button", "data-testid": "modal-close" }))] })), jsx("section", { className: prefixedClassNames(classPrefix, 'modal-card-body'), "data-testid": "modal-body", children: children }), modalCardFoot && (jsx("footer", { className: prefixedClassNames(classPrefix, 'modal-card-foot'), children: modalCardFoot }))] })) : (jsx("div", { className: prefixedClassNames(classPrefix, 'modal-content'), "data-testid": "modal-content", children: children })), (!isModalCard || (!modalCardTitle && onClose)) && onClose && (jsx("button", { className: prefixedClassNames(classPrefix, 'modal-close', 'is-large'), "aria-label": "close", onClick: onClose, type: "button", "data-testid": "modal-close-float" }))] }));
1218
1231
  };
1219
- ModalRoot.Background = ModalBackground;
1220
- ModalRoot.Content = ModalContent;
1221
- ModalRoot.Card = ModalCard;
1222
- ModalRoot.Close = ModalClose;
1223
- const Modal = ModalRoot;
1232
+ const Modal = withSubComponents(ModalRoot, {
1233
+ Background: ModalBackground,
1234
+ Content: ModalContent,
1235
+ Card: ModalCard,
1236
+ Close: ModalClose,
1237
+ }, 'Modal');
1224
1238
 
1225
- const Navbar = ({ className, textColor, bgColor, color, transparent, fixed, children, ...props }) => {
1239
+ const NavbarComponent = ({ className, textColor, bgColor, color, transparent, fixed, children, ...props }) => {
1226
1240
  const { bulmaHelperClasses, rest } = useBulmaClasses({
1227
1241
  color: textColor,
1228
1242
  backgroundColor: bgColor,
@@ -1302,16 +1316,18 @@ const NavbarDropdownMenu = ({ className, right, up, children, ...props }) => (js
1302
1316
  'is-up': up,
1303
1317
  }), className), ...props, children: children }));
1304
1318
  const NavbarDivider = props => (jsx("hr", { className: usePrefixedClassNames('navbar-divider'), ...props }));
1305
- Navbar.Brand = NavbarBrand;
1306
- Navbar.Item = NavbarItem;
1307
- Navbar.Link = NavbarLink;
1308
- Navbar.Burger = NavbarBurger;
1309
- Navbar.Menu = NavbarMenu;
1310
- Navbar.Start = NavbarStart;
1311
- Navbar.End = NavbarEnd;
1312
- Navbar.Dropdown = NavbarDropdown;
1313
- Navbar.DropdownMenu = NavbarDropdownMenu;
1314
- Navbar.Divider = NavbarDivider;
1319
+ const Navbar = withSubComponents(NavbarComponent, {
1320
+ Brand: NavbarBrand,
1321
+ Item: NavbarItem,
1322
+ Link: NavbarLink,
1323
+ Burger: NavbarBurger,
1324
+ Menu: NavbarMenu,
1325
+ Start: NavbarStart,
1326
+ End: NavbarEnd,
1327
+ Dropdown: NavbarDropdown,
1328
+ DropdownMenu: NavbarDropdownMenu,
1329
+ Divider: NavbarDivider,
1330
+ }, 'Navbar');
1315
1331
 
1316
1332
  const PaginationPrevious = ({ className, disabled, children, ...props }) => (jsx("a", { className: classNames(usePrefixedClassNames('pagination-previous'), className, {
1317
1333
  'is-disabled': disabled,
@@ -1329,7 +1345,7 @@ const PaginationNext = ({ className, disabled, children, ...props }) => (jsx("a"
1329
1345
  e.stopPropagation();
1330
1346
  }
1331
1347
  : props.onClick, children: children }));
1332
- const Pagination = ({ color, textColor, bgColor, size, align, rounded, className, children, ...props }) => {
1348
+ const PaginationComponent = ({ color, textColor, bgColor, size, align, rounded, className, children, ...props }) => {
1333
1349
  const { bulmaHelperClasses, rest } = useBulmaClasses({
1334
1350
  color: textColor,
1335
1351
  backgroundColor: bgColor,
@@ -1374,11 +1390,13 @@ const PaginationLink = ({ className, textColor, bgColor, active, disabled, onCli
1374
1390
  }), "aria-current": active ? 'page' : undefined, "aria-disabled": disabled, tabIndex: disabled ? -1 : 0, onClick: handleClick, ...rest, children: children }) }));
1375
1391
  };
1376
1392
  const PaginationEllipsis = props => (jsx("li", { children: jsx("span", { className: usePrefixedClassNames('pagination-ellipsis'), ...props, children: "\u2026" }) }));
1377
- Pagination.Link = PaginationLink;
1378
- Pagination.List = PaginationList;
1379
- Pagination.Ellipsis = PaginationEllipsis;
1380
- Pagination.Previous = PaginationPrevious;
1381
- Pagination.Next = PaginationNext;
1393
+ const Pagination = withSubComponents(PaginationComponent, {
1394
+ Link: PaginationLink,
1395
+ List: PaginationList,
1396
+ Ellipsis: PaginationEllipsis,
1397
+ Previous: PaginationPrevious,
1398
+ Next: PaginationNext,
1399
+ }, 'Pagination');
1382
1400
 
1383
1401
  function stripRedundantLibraryPrefix(name, library) {
1384
1402
  if (!name) {
@@ -1544,7 +1562,7 @@ const Icon = ({ className, textColor, bgColor, name, library, variant, features,
1544
1562
  return (jsx("span", { className: iconContainerClasses, "aria-label": ariaLabel, style: style, ...rest, children: jsx("i", { className: iClasses }) }));
1545
1563
  };
1546
1564
 
1547
- const Panel = ({ color, className, children, ...props }) => {
1565
+ const PanelComponent = ({ color, className, children, ...props }) => {
1548
1566
  const { bulmaHelperClasses, rest } = useBulmaClasses({
1549
1567
  color,
1550
1568
  ...props,
@@ -1565,19 +1583,21 @@ const PanelInputBlock = ({ value, onChange, placeholder, iconClassName = 'fas fa
1565
1583
  };
1566
1584
  const PanelCheckboxBlock = ({ checked, onChange, children, ...props }) => (jsxs("label", { className: usePrefixedClassNames('panel-block'), ...props, children: [jsx("input", { type: "checkbox", checked: checked, onChange: onChange }), children] }));
1567
1585
  const PanelButtonBlock = ({ children, className, ...props }) => (jsx("div", { className: usePrefixedClassNames('panel-block'), children: jsx("button", { className: classNames(usePrefixedClassNames('button', 'is-link', 'is-outlined', 'is-fullwidth'), className), ...props, children: children }) }));
1568
- Panel.Heading = PanelHeading;
1569
- Panel.Tabs = PanelTabs;
1570
- Panel.Block = PanelBlock;
1571
- Panel.Icon = PanelIcon;
1572
- Panel.InputBlock = PanelInputBlock;
1573
- Panel.CheckboxBlock = PanelCheckboxBlock;
1574
- Panel.ButtonBlock = PanelButtonBlock;
1586
+ const Panel = withSubComponents(PanelComponent, {
1587
+ Heading: PanelHeading,
1588
+ Tabs: PanelTabs,
1589
+ Block: PanelBlock,
1590
+ Icon: PanelIcon,
1591
+ InputBlock: PanelInputBlock,
1592
+ CheckboxBlock: PanelCheckboxBlock,
1593
+ ButtonBlock: PanelButtonBlock,
1594
+ }, 'Panel');
1575
1595
 
1576
1596
  const TabsContext = createContext(null);
1577
1597
  function useTabsContext() {
1578
1598
  return useContext(TabsContext);
1579
1599
  }
1580
- const Tabs = ({ align, size, fullwidth, boxed, toggle, rounded, color, value, onChange, defaultValue = 0, vertical, side, expanded, className, children, ...props }) => {
1600
+ const TabsComponent = ({ align, size, fullwidth, boxed, toggle, rounded, color, value, onChange, defaultValue = 0, vertical, side, expanded, className, children, ...props }) => {
1581
1601
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
1582
1602
  const isControlled = value !== undefined;
1583
1603
  const [internalTab, setInternalTab] = useState(defaultValue);
@@ -1650,7 +1670,7 @@ const Tab = ({ index, disabled, icon, iconLibrary, iconVariant, iconSize = 'smal
1650
1670
  return (jsx("li", { className: classNames(activeClass, className), role: "tab", "aria-selected": isActive, tabIndex: disabled ? -1 : 0, ...props, children: jsxs("a", { onClick: handleClick, "aria-disabled": disabled || undefined, children: [icon && (jsx(Icon, { name: icon, library: iconLibrary, variant: iconVariant, size: iconSize, features: iconFeatures })), children && jsx("span", { children: children })] }) }));
1651
1671
  };
1652
1672
  const TabItem = ({ active, className, children, onClick, ...props }) => (jsx("li", { className: classNames({ [usePrefixedClassNames('is-active')]: active }, className), onClick: onClick, ...props, children: children }));
1653
- const TabsContent = ({ className, children, ...props }) => {
1673
+ const TabsContentComponent = ({ className, children, ...props }) => {
1654
1674
  const contentClass = usePrefixedClassNames('tabs-content');
1655
1675
  return (jsx("div", { className: classNames(contentClass, className), ...props, children: children }));
1656
1676
  };
@@ -1662,11 +1682,15 @@ const TabContentItem = ({ index, className, children, ...props }) => {
1662
1682
  });
1663
1683
  return (jsx("div", { className: classNames(itemClass, className), role: "tabpanel", "aria-hidden": !isActive, ...props, children: children }));
1664
1684
  };
1665
- TabsContent.Item = TabContentItem;
1666
- Tabs.List = TabList;
1667
- Tabs.Tab = Tab;
1668
- Tabs.Item = TabItem;
1669
- Tabs.Content = Object.assign(TabsContent, { Item: TabContentItem });
1685
+ const TabsContent = withSubComponents(TabsContentComponent, {
1686
+ Item: TabContentItem,
1687
+ });
1688
+ const Tabs = withSubComponents(TabsComponent, {
1689
+ List: TabList,
1690
+ Tab,
1691
+ Item: TabItem,
1692
+ Content: TabsContent,
1693
+ }, 'Tabs');
1670
1694
 
1671
1695
  const Loading = ({ active = false, isFullPage = false, size, color, canCancel = false, onCancel, children, className, overlayClassName, iconClassName, indicator, overlay, ...props }) => {
1672
1696
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
@@ -1989,7 +2013,7 @@ const Step = ({ isActive = false, isCompleted = false, label, icon, clickable =
1989
2013
  : (stepNumber ?? null));
1990
2014
  return (jsx("li", { className: stepClasses, onClick: handleClick, onKeyDown: handleKeyDown, tabIndex: clickable ? 0 : undefined, role: clickable ? 'button' : undefined, "aria-current": isActive ? 'step' : undefined, ...rest, children: jsxs("div", { className: stepsLinkClass, children: [jsx("span", { className: stepsMarkerClass, children: markerContent }), (label || children) && (jsx("div", { className: stepsContentClass, children: jsx("p", { className: stepsTitleClass, children: label || children }) }))] }) }));
1991
2015
  };
1992
- 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 }) => {
2016
+ 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 }) => {
1993
2017
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
1994
2018
  const stepsClasses = usePrefixedClassNames('steps', {
1995
2019
  [`is-${size}`]: size,
@@ -2034,7 +2058,7 @@ const Steps = ({ value = 0, items, size, color, hasMarker = true, animated = tru
2034
2058
  };
2035
2059
  return (jsxs("div", { className: combinedClasses, ...rest, children: [jsx("ul", { className: listClasses, children: renderSteps() }), hasNavigation && (jsxs("div", { className: stepsNavigationClass, children: [jsx("button", { className: prevButtonClass, disabled: value === 0, onClick: onPrev ?? (() => onStepClick?.(value - 1)), children: prevLabel ?? 'Previous' }), jsx("button", { className: nextButtonClass, disabled: value === totalSteps - 1, onClick: onNext ?? (() => onStepClick?.(value + 1)), children: nextLabel ?? 'Next' })] }))] }));
2036
2060
  };
2037
- Steps.Step = Step;
2061
+ const Steps = withSubComponents(StepsComponent, { Step }, 'Steps');
2038
2062
 
2039
2063
  const SidebarComponent = forwardRef(({ isOpen, onClose, position = 'left', width = '260px', fullWidth = false, overlay = true, overlayClose = true, escapeClose = true, canCancel = true, children, inline = false, className, style, ...props }, ref) => {
2040
2064
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
@@ -2117,7 +2141,6 @@ const SidebarComponent = forwardRef(({ isOpen, onClose, position = 'left', width
2117
2141
  }
2118
2142
  return null;
2119
2143
  });
2120
- SidebarComponent.displayName = 'Sidebar';
2121
2144
  const SidebarHeader = ({ className, children, ...props }) => {
2122
2145
  const headerClass = usePrefixedClassNames('sidebar-header');
2123
2146
  return (jsx("div", { className: classNames(headerClass, className), ...props, children: children }));
@@ -2138,13 +2161,13 @@ const SidebarFooter = ({ className, children, ...props }) => {
2138
2161
  const footerClass = usePrefixedClassNames('sidebar-footer');
2139
2162
  return (jsx("div", { className: classNames(footerClass, className), ...props, children: children }));
2140
2163
  };
2141
- const Sidebar = Object.assign(SidebarComponent, {
2164
+ const Sidebar = withSubComponents(SidebarComponent, {
2142
2165
  Header: SidebarHeader,
2143
2166
  Title: SidebarTitle,
2144
2167
  Close: SidebarClose,
2145
2168
  Body: SidebarBody,
2146
2169
  Footer: SidebarFooter,
2147
- });
2170
+ }, 'Sidebar');
2148
2171
 
2149
2172
  const Toast = 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) => {
2150
2173
  const { bulmaHelperClasses, rest } = useBulmaClasses(props);
@@ -2883,7 +2906,13 @@ const Box = ({ className, textColor, bgColor, hasShadow = true, children, ...pro
2883
2906
  return (jsx("div", { className: boxClasses, ...rest, children: children }));
2884
2907
  };
2885
2908
 
2886
- const Buttons = ({ className, textColor, bgColor, isCentered, isRight, hasAddons, children, ...props }) => {
2909
+ const LinkButton = ({ variant = 'text', color, className, ...props }) => {
2910
+ const buttonColor = variant === 'underline' ? 'text' : variant;
2911
+ const prefixedClasses = usePrefixedClassNames('link-button', color && `link-button-${color}`, variant === 'underline' && 'link-button-underline');
2912
+ return (jsx(Button, { color: buttonColor, className: classNames(prefixedClasses, className), ...props }));
2913
+ };
2914
+
2915
+ const ButtonsComponent = ({ className, textColor, bgColor, isCentered, isRight, hasAddons, children, ...props }) => {
2887
2916
  const buttonsClasses = usePrefixedClassNames('buttons', {
2888
2917
  'is-centered': isCentered,
2889
2918
  'is-right': isRight,
@@ -2897,12 +2926,10 @@ const Buttons = ({ className, textColor, bgColor, isCentered, isRight, hasAddons
2897
2926
  const combinedClasses = classNames(buttonsClasses, className, bulmaHelperClasses);
2898
2927
  return (jsx("div", { className: combinedClasses, ...rest, children: children }));
2899
2928
  };
2900
-
2901
- const LinkButton = ({ variant = 'text', color, className, ...props }) => {
2902
- const buttonColor = variant === 'underline' ? 'text' : variant;
2903
- const prefixedClasses = usePrefixedClassNames('link-button', color && `link-button-${color}`, variant === 'underline' && 'link-button-underline');
2904
- return (jsx(Button, { color: buttonColor, className: classNames(prefixedClasses, className), ...props }));
2905
- };
2929
+ const Buttons = withSubComponents(ButtonsComponent, {
2930
+ Button,
2931
+ LinkButton,
2932
+ }, 'Buttons');
2906
2933
 
2907
2934
  const Code = ({ className, textColor, bgColor, children, ...props }) => {
2908
2935
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -2984,11 +3011,11 @@ const FigureComponent = ({ className, textColor, bgColor, children, ...props })
2984
3011
  const figureClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
2985
3012
  return (jsx("figure", { className: figureClasses || undefined, ...rest, children: children }));
2986
3013
  };
2987
- const Figure = Object.assign(FigureComponent, {
3014
+ const Figure = withSubComponents(FigureComponent, {
2988
3015
  Caption: FigureCaption,
2989
- });
3016
+ }, 'Figure');
2990
3017
 
2991
- const IconText = ({ className, textColor, bgColor, iconProps, children, items, ...props }) => {
3018
+ const IconTextComponent = ({ className, textColor, bgColor, iconProps, children, items, ...props }) => {
2992
3019
  const { bulmaHelperClasses, rest } = useBulmaClasses({
2993
3020
  color: textColor,
2994
3021
  backgroundColor: bgColor,
@@ -2998,6 +3025,7 @@ const IconText = ({ className, textColor, bgColor, iconProps, children, items, .
2998
3025
  const iconTextClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
2999
3026
  return (jsx("span", { className: iconTextClasses, ...rest, children: items ? (items.map((item, index) => (jsxs(React.Fragment, { children: [jsx(Icon, { ...item.iconProps }), item.text && jsx("span", { children: item.text })] }, index)))) : (jsxs(Fragment, { children: [iconProps && jsx(Icon, { ...iconProps }), children && jsx("span", { children: children })] })) }));
3000
3027
  };
3028
+ const IconText = withSubComponents(IconTextComponent, { Icon }, 'IconText');
3001
3029
 
3002
3030
  const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, src, alt, children, ...props }) => {
3003
3031
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -3180,7 +3208,7 @@ const NotificationContainer = ({ position = 'top-right' }) => {
3180
3208
  return createPortal(jsx("div", { style: containerStyle, children: items.map(item => (jsx(NotificationItem, { instance: item, onClose: notification.close }, item.id))) }), document.body);
3181
3209
  };
3182
3210
 
3183
- const OrderedList = ({ className, textColor, bgColor, children, ...props }) => {
3211
+ const OrderedListComponent = ({ className, textColor, bgColor, children, ...props }) => {
3184
3212
  const { bulmaHelperClasses, rest } = useBulmaClasses({
3185
3213
  color: textColor,
3186
3214
  backgroundColor: bgColor,
@@ -3190,6 +3218,7 @@ const OrderedList = ({ className, textColor, bgColor, children, ...props }) => {
3190
3218
  const listClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
3191
3219
  return (jsx("ol", { className: listClasses || undefined, ...rest, children: children }));
3192
3220
  };
3221
+ const OrderedList = withSubComponents(OrderedListComponent, { Item: ListItem }, 'OrderedList');
3193
3222
 
3194
3223
  const Paragraph = ({ className, textColor, bgColor, children, ...props }) => {
3195
3224
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -3283,7 +3312,69 @@ const SubTitle = ({ className, size, as = 'h1', hasSkeleton, textColor, bgColor,
3283
3312
  return (jsx(Tag, { className: subTitleClasses, ...rest, children: children }));
3284
3313
  };
3285
3314
 
3286
- const Table = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isResponsive, children, ...props }) => {
3315
+ const Thead = ({ className, children, ...props }) => {
3316
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3317
+ const theadClasses = classNames(className, bulmaHelperClasses);
3318
+ return (jsx("thead", { className: theadClasses, ...rest, children: children }));
3319
+ };
3320
+
3321
+ const Tbody = ({ className, children, ...props }) => {
3322
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3323
+ const tbodyClasses = classNames(className, bulmaHelperClasses);
3324
+ return (jsx("tbody", { className: tbodyClasses, ...rest, children: children }));
3325
+ };
3326
+
3327
+ const Tfoot = ({ className, children, ...props }) => {
3328
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3329
+ const tfootClasses = classNames(className, bulmaHelperClasses);
3330
+ return (jsx("tfoot", { className: tfootClasses, ...rest, children: children }));
3331
+ };
3332
+
3333
+ const validTableColors = [
3334
+ 'primary',
3335
+ 'link',
3336
+ 'info',
3337
+ 'success',
3338
+ 'warning',
3339
+ 'danger',
3340
+ 'black',
3341
+ 'dark',
3342
+ 'light',
3343
+ 'white',
3344
+ ];
3345
+ const Td = ({ className, color, children, ...props }) => {
3346
+ const colorClass = usePrefixedClassNames('', {
3347
+ [`is-${color}`]: color && validTableColors.includes(color),
3348
+ });
3349
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3350
+ const tdClasses = classNames(colorClass, className, bulmaHelperClasses);
3351
+ return (jsx("td", { className: tdClasses, ...rest, children: children }));
3352
+ };
3353
+
3354
+ const Tr = ({ className, isSelected, color, children, ...props }) => {
3355
+ const bulmaClasses = usePrefixedClassNames('', {
3356
+ 'is-selected': isSelected,
3357
+ [`is-${color}`]: color && validTableColors.includes(color),
3358
+ });
3359
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3360
+ const trClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
3361
+ return (jsx("tr", { className: trClasses, ...rest, children: children }));
3362
+ };
3363
+
3364
+ const validAlignments = ['left', 'right', 'centered'];
3365
+ const Th = ({ className, isAligned, width, color, children, ...props }) => {
3366
+ const bulmaClasses = usePrefixedClassNames('', {
3367
+ [`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),
3368
+ [`is-${color}`]: color && validTableColors.includes(color),
3369
+ });
3370
+ const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3371
+ const thClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
3372
+ return (jsx("th", { className: thClasses, style: width
3373
+ ? { width: typeof width === 'number' ? `${width}px` : width }
3374
+ : undefined, ...rest, children: children }));
3375
+ };
3376
+
3377
+ const TableComponent = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isResponsive, children, ...props }) => {
3287
3378
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3288
3379
  const bulmaClasses = usePrefixedClassNames('table', {
3289
3380
  'is-bordered': isBordered,
@@ -3300,6 +3391,14 @@ const Table = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFull
3300
3391
  }
3301
3392
  return tableElement;
3302
3393
  };
3394
+ const Table = withSubComponents(TableComponent, {
3395
+ Thead,
3396
+ Tbody,
3397
+ Tfoot,
3398
+ Tr,
3399
+ Th,
3400
+ Td,
3401
+ }, 'Table');
3303
3402
 
3304
3403
  const validTagColors = [
3305
3404
  'primary',
@@ -3330,7 +3429,7 @@ const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelet
3330
3429
  return (jsx("span", { className: tagClasses, ...rest, children: children }));
3331
3430
  };
3332
3431
 
3333
- const Tags = ({ className, hasAddons, isMultiline, children, ...props }) => {
3432
+ const TagsComponent = ({ className, hasAddons, isMultiline, children, ...props }) => {
3334
3433
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3335
3434
  const bulmaClasses = usePrefixedClassNames('tags', {
3336
3435
  'has-addons': hasAddons,
@@ -3339,58 +3438,7 @@ const Tags = ({ className, hasAddons, isMultiline, children, ...props }) => {
3339
3438
  const tagsClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
3340
3439
  return (jsx("div", { className: tagsClasses, ...rest, children: children }));
3341
3440
  };
3342
-
3343
- const Tbody = ({ className, children, ...props }) => {
3344
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3345
- const tbodyClasses = classNames(className, bulmaHelperClasses);
3346
- return (jsx("tbody", { className: tbodyClasses, ...rest, children: children }));
3347
- };
3348
-
3349
- const validTableColors = [
3350
- 'primary',
3351
- 'link',
3352
- 'info',
3353
- 'success',
3354
- 'warning',
3355
- 'danger',
3356
- 'black',
3357
- 'dark',
3358
- 'light',
3359
- 'white',
3360
- ];
3361
- const Td = ({ className, color, children, ...props }) => {
3362
- const colorClass = usePrefixedClassNames('', {
3363
- [`is-${color}`]: color && validTableColors.includes(color),
3364
- });
3365
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3366
- const tdClasses = classNames(colorClass, className, bulmaHelperClasses);
3367
- return (jsx("td", { className: tdClasses, ...rest, children: children }));
3368
- };
3369
-
3370
- const Tfoot = ({ className, children, ...props }) => {
3371
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3372
- const tfootClasses = classNames(className, bulmaHelperClasses);
3373
- return (jsx("tfoot", { className: tfootClasses, ...rest, children: children }));
3374
- };
3375
-
3376
- const validAlignments = ['left', 'right', 'centered'];
3377
- const Th = ({ className, isAligned, width, color, children, ...props }) => {
3378
- const bulmaClasses = usePrefixedClassNames('', {
3379
- [`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),
3380
- [`is-${color}`]: color && validTableColors.includes(color),
3381
- });
3382
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3383
- const thClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
3384
- return (jsx("th", { className: thClasses, style: width
3385
- ? { width: typeof width === 'number' ? `${width}px` : width }
3386
- : undefined, ...rest, children: children }));
3387
- };
3388
-
3389
- const Thead = ({ className, children, ...props }) => {
3390
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3391
- const theadClasses = classNames(className, bulmaHelperClasses);
3392
- return (jsx("thead", { className: theadClasses, ...rest, children: children }));
3393
- };
3441
+ const Tags = withSubComponents(TagsComponent, { Tag }, 'Tags');
3394
3442
 
3395
3443
  const validTitleSizes = ['1', '2', '3', '4', '5', '6'];
3396
3444
  const validTitleElements = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
@@ -3412,17 +3460,7 @@ const Title = ({ className, size, isSpaced, as = 'h1', hasSkeleton, textColor, b
3412
3460
  return (jsx(Tag, { className: titleClasses, ...rest, children: children }));
3413
3461
  };
3414
3462
 
3415
- const Tr = ({ className, isSelected, color, children, ...props }) => {
3416
- const bulmaClasses = usePrefixedClassNames('', {
3417
- 'is-selected': isSelected,
3418
- [`is-${color}`]: color && validTableColors.includes(color),
3419
- });
3420
- const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
3421
- const trClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
3422
- return (jsx("tr", { className: trClasses, ...rest, children: children }));
3423
- };
3424
-
3425
- const UnorderedList = ({ className, textColor, bgColor, children, ...props }) => {
3463
+ const UnorderedListComponent = ({ className, textColor, bgColor, children, ...props }) => {
3426
3464
  const { bulmaHelperClasses, rest } = useBulmaClasses({
3427
3465
  color: textColor,
3428
3466
  backgroundColor: bgColor,
@@ -3432,6 +3470,7 @@ const UnorderedList = ({ className, textColor, bgColor, children, ...props }) =>
3432
3470
  const listClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
3433
3471
  return (jsx("ul", { className: listClasses || undefined, ...rest, children: children }));
3434
3472
  };
3473
+ const UnorderedList = withSubComponents(UnorderedListComponent, { Item: ListItem }, 'UnorderedList');
3435
3474
 
3436
3475
  const FieldContext = createContext(false);
3437
3476
  const ControlContext = createContext(false);
@@ -3490,6 +3529,48 @@ const Checkbox = forwardRef(({ color, size, className, children, textColor, disa
3490
3529
  });
3491
3530
  Checkbox.displayName = 'Checkbox';
3492
3531
 
3532
+ const allowedColors = [...validColors, 'inherit', 'current'];
3533
+ const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isLoading, isExpanded, size, textColor, bgColor, iconLeft, iconRight, iconLeftName, iconLeftSize, iconRightName, iconRightSize, className, children, ...props }, ref) => {
3534
+ const Component = (as === 'p' ? 'p' : 'div');
3535
+ const { classPrefix } = useConfig();
3536
+ const { textColor: _ignoredTextColor, bgColor: _ignoredBgColor, ...restProps } = props;
3537
+ const safeTextColor = allowedColors.includes(textColor)
3538
+ ? textColor
3539
+ : undefined;
3540
+ const safeBgColor = allowedColors.includes(bgColor)
3541
+ ? bgColor
3542
+ : undefined;
3543
+ const { bulmaHelperClasses, rest } = useBulmaClasses({
3544
+ color: safeTextColor,
3545
+ backgroundColor: safeBgColor,
3546
+ ...restProps,
3547
+ });
3548
+ const leftIconProps = iconLeft ||
3549
+ (iconLeftName
3550
+ ? {
3551
+ name: iconLeftName,
3552
+ size: iconLeftSize,
3553
+ }
3554
+ : undefined);
3555
+ const rightIconProps = iconRight ||
3556
+ (iconRightName
3557
+ ? {
3558
+ name: iconRightName,
3559
+ size: iconRightSize,
3560
+ }
3561
+ : undefined);
3562
+ const mainClass = usePrefixedClassNames('control', {
3563
+ 'has-icons-left': hasIconsLeft || !!leftIconProps,
3564
+ 'has-icons-right': hasIconsRight || !!rightIconProps,
3565
+ 'is-loading': isLoading,
3566
+ 'is-expanded': isExpanded,
3567
+ [`is-${size}`]: !!size,
3568
+ });
3569
+ const controlClass = classNames(mainClass, bulmaHelperClasses, className);
3570
+ return (jsx(ControlProvider, { value: true, children: jsxs(Component, { className: controlClass, ref: ref, ...restProps, ...rest, children: [children, leftIconProps && leftIconProps.name && (jsx(Icon, { ...leftIconProps, className: prefixedClassNames(classPrefix, 'is-left') })), rightIconProps && rightIconProps.name && (jsx(Icon, { ...rightIconProps, className: prefixedClassNames(classPrefix, 'is-right') }))] }) }));
3571
+ });
3572
+ Control.displayName = 'Control';
3573
+
3493
3574
  const FieldLabel = ({ size, textColor, bgColor, className, children, ...props }) => {
3494
3575
  const { bulmaHelperClasses, rest } = useBulmaClasses({
3495
3576
  color: textColor,
@@ -3512,7 +3593,7 @@ const FieldBody = ({ textColor, bgColor, className, children, ...props }) => {
3512
3593
  const fieldBodyClass = classNames(mainClass, bulmaHelperClasses, className);
3513
3594
  return (jsx("div", { className: fieldBodyClass, ...props, ...rest, children: children }));
3514
3595
  };
3515
- const Field = ({ horizontal, grouped, hasAddons, narrow, label, labelSize, labelProps, textColor, color: _fieldColor, bgColor, className, children, ...props }) => {
3596
+ const FieldComponent = ({ horizontal, grouped, hasAddons, narrow, label, labelSize, labelProps, textColor, color: _fieldColor, bgColor, className, children, ...props }) => {
3516
3597
  const { bulmaHelperClasses, rest } = useBulmaClasses({
3517
3598
  color: textColor,
3518
3599
  backgroundColor: bgColor,
@@ -3563,52 +3644,13 @@ const Field = ({ horizontal, grouped, hasAddons, narrow, label, labelSize, label
3563
3644
  };
3564
3645
  FieldLabel.displayName = 'FieldLabel';
3565
3646
  FieldBody.displayName = 'FieldBody';
3566
- Field.Label = FieldLabel;
3567
- Field.Body = FieldBody;
3568
-
3569
- const allowedColors = [...validColors, 'inherit', 'current'];
3570
- const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isLoading, isExpanded, size, textColor, bgColor, iconLeft, iconRight, iconLeftName, iconLeftSize, iconRightName, iconRightSize, className, children, ...props }, ref) => {
3571
- const Component = (as === 'p' ? 'p' : 'div');
3572
- const { classPrefix } = useConfig();
3573
- const { textColor: _ignoredTextColor, bgColor: _ignoredBgColor, ...restProps } = props;
3574
- const safeTextColor = allowedColors.includes(textColor)
3575
- ? textColor
3576
- : undefined;
3577
- const safeBgColor = allowedColors.includes(bgColor)
3578
- ? bgColor
3579
- : undefined;
3580
- const { bulmaHelperClasses, rest } = useBulmaClasses({
3581
- color: safeTextColor,
3582
- backgroundColor: safeBgColor,
3583
- ...restProps,
3584
- });
3585
- const leftIconProps = iconLeft ||
3586
- (iconLeftName
3587
- ? {
3588
- name: iconLeftName,
3589
- size: iconLeftSize,
3590
- }
3591
- : undefined);
3592
- const rightIconProps = iconRight ||
3593
- (iconRightName
3594
- ? {
3595
- name: iconRightName,
3596
- size: iconRightSize,
3597
- }
3598
- : undefined);
3599
- const mainClass = usePrefixedClassNames('control', {
3600
- 'has-icons-left': hasIconsLeft || !!leftIconProps,
3601
- 'has-icons-right': hasIconsRight || !!rightIconProps,
3602
- 'is-loading': isLoading,
3603
- 'is-expanded': isExpanded,
3604
- [`is-${size}`]: !!size,
3605
- });
3606
- const controlClass = classNames(mainClass, bulmaHelperClasses, className);
3607
- return (jsx(ControlProvider, { value: true, children: jsxs(Component, { className: controlClass, ref: ref, ...restProps, ...rest, children: [children, leftIconProps && leftIconProps.name && (jsx(Icon, { ...leftIconProps, className: prefixedClassNames(classPrefix, 'is-left') })), rightIconProps && rightIconProps.name && (jsx(Icon, { ...rightIconProps, className: prefixedClassNames(classPrefix, 'is-right') }))] }) }));
3608
- });
3609
- Control.displayName = 'Control';
3647
+ const Field = withSubComponents(FieldComponent, {
3648
+ Label: FieldLabel,
3649
+ Body: FieldBody,
3650
+ Control,
3651
+ }, 'Field');
3610
3652
 
3611
- const Checkboxes = ({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, name, value, defaultValue, onChange, children, className, ...props }) => {
3653
+ const CheckboxesComponent = ({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, name, value, defaultValue, onChange, children, className, ...props }) => {
3612
3654
  const insideField = useInsideField();
3613
3655
  const insideControl = useInsideControl();
3614
3656
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -3643,6 +3685,7 @@ const Checkboxes = ({ label, labelSize, labelProps, horizontal, message, message
3643
3685
  }
3644
3686
  return (jsxs(Fragment, { children: [content, messageEl] }));
3645
3687
  };
3688
+ const Checkboxes = withSubComponents(CheckboxesComponent, { Checkbox }, 'Checkboxes');
3646
3689
 
3647
3690
  const File = forwardRef(({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, color, size, isBoxed, isFullwidth, isRight, isCentered, hasName, buttonLabel, iconLeft, iconRight, className, inputClassName, fileName, ...props }, ref) => {
3648
3691
  const insideField = useInsideField();
@@ -3721,7 +3764,7 @@ const Radio = forwardRef(({ color, size, className, children, textColor, disable
3721
3764
  });
3722
3765
  Radio.displayName = 'Radio';
3723
3766
 
3724
- const Radios = ({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, name, value, defaultValue, onChange, children, className, ...props }) => {
3767
+ const RadiosComponent = ({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, name, value, defaultValue, onChange, children, className, ...props }) => {
3725
3768
  const insideField = useInsideField();
3726
3769
  const insideControl = useInsideControl();
3727
3770
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -3756,6 +3799,7 @@ const Radios = ({ label, labelSize, labelProps, horizontal, message, messageColo
3756
3799
  }
3757
3800
  return (jsxs(Fragment, { children: [content, messageEl] }));
3758
3801
  };
3802
+ const Radios = withSubComponents(RadiosComponent, { Radio }, 'Radios');
3759
3803
 
3760
3804
  const switchColors = [
3761
3805
  'primary',
@@ -7617,7 +7661,7 @@ const Cell = ({ colStart, colFromEnd, colSpan, rowStart, rowFromEnd, rowSpan, cl
7617
7661
  return (jsx("div", { className: cellClasses, ...rest, children: children }));
7618
7662
  };
7619
7663
 
7620
- const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixedColsMobile, fixedColsTablet, fixedColsDesktop, fixedColsWidescreen, fixedColsFullhd, className, textColor, color: _fieldColor, bgColor, children, ...props }) => {
7664
+ const GridComponent = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixedColsMobile, fixedColsTablet, fixedColsDesktop, fixedColsWidescreen, fixedColsFullhd, className, textColor, color: _fieldColor, bgColor, children, ...props }) => {
7621
7665
  const { bulmaHelperClasses, rest } = useBulmaClasses({
7622
7666
  color: textColor,
7623
7667
  backgroundColor: bgColor,
@@ -7645,6 +7689,7 @@ const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixe
7645
7689
  }
7646
7690
  return (jsx("div", { className: gridClasses, ...rest, children: children }));
7647
7691
  };
7692
+ const Grid = withSubComponents(GridComponent, { Cell }, 'Grid');
7648
7693
 
7649
7694
  const bulmaCssVars = [
7650
7695
  '--bulma-scheme-h',
@@ -8300,7 +8345,7 @@ const Footer = ({ as = 'footer', className, children, color, bgColor, textColor,
8300
8345
  return (jsx(Tag, { className: footerClasses, ...rest, children: children }));
8301
8346
  };
8302
8347
 
8303
- const Hero = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
8348
+ const HeroComponent = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
8304
8349
  const { bulmaHelperClasses, rest } = useBulmaClasses({
8305
8350
  backgroundColor: bgColor,
8306
8351
  ...props,
@@ -8343,11 +8388,13 @@ const HeroFoot = ({ className, children, color, bgColor, textColor, ...props })
8343
8388
  const heroFootClasses = classNames(mainClass, bulmaHelperClasses, className);
8344
8389
  return (jsx("div", { className: heroFootClasses, ...rest, children: children }));
8345
8390
  };
8346
- Hero.Head = HeroHead;
8347
- Hero.Body = HeroBody;
8348
- Hero.Foot = HeroFoot;
8391
+ const Hero = withSubComponents(HeroComponent, {
8392
+ Head: HeroHead,
8393
+ Body: HeroBody,
8394
+ Foot: HeroFoot,
8395
+ }, 'Hero');
8349
8396
 
8350
- const Level = ({ isMobile, className, children, color, bgColor, textColor, ...props }) => {
8397
+ const LevelComponent = ({ isMobile, className, children, color, bgColor, textColor, ...props }) => {
8351
8398
  const { bulmaHelperClasses, rest } = useBulmaClasses({
8352
8399
  color: textColor ?? color,
8353
8400
  backgroundColor: bgColor,
@@ -8395,11 +8442,13 @@ const LevelItem = ({ as = 'div', hasTextCentered, className, children, href, tar
8395
8442
  }
8396
8443
  return (jsx(Tag, { className: levelItemClasses, ...rest, children: children }));
8397
8444
  };
8398
- Level.Left = LevelLeft;
8399
- Level.Right = LevelRight;
8400
- Level.Item = LevelItem;
8445
+ const Level = withSubComponents(LevelComponent, {
8446
+ Left: LevelLeft,
8447
+ Right: LevelRight,
8448
+ Item: LevelItem,
8449
+ }, 'Level');
8401
8450
 
8402
- const Media = ({ as = 'article', className, children, color, bgColor, textColor, ...props }) => {
8451
+ const MediaComponent = ({ as = 'article', className, children, color, bgColor, textColor, ...props }) => {
8403
8452
  const { bulmaHelperClasses, rest } = useBulmaClasses({
8404
8453
  color: textColor ?? color,
8405
8454
  backgroundColor: bgColor,
@@ -8441,10 +8490,11 @@ const MediaRight = ({ className, children, color, bgColor, textColor, ...props }
8441
8490
  const mediaRightClasses = classNames(mainClass, bulmaHelperClasses, className);
8442
8491
  return (jsx("div", { className: mediaRightClasses, ...rest, children: children }));
8443
8492
  };
8444
- const MediaWithSubcomponents = Media;
8445
- MediaWithSubcomponents.Left = MediaLeft;
8446
- MediaWithSubcomponents.Content = MediaContent;
8447
- MediaWithSubcomponents.Right = MediaRight;
8493
+ const Media = withSubComponents(MediaComponent, {
8494
+ Left: MediaLeft,
8495
+ Content: MediaContent,
8496
+ Right: MediaRight,
8497
+ }, 'Media');
8448
8498
 
8449
8499
  const Section = ({ size, className, children, color, bgColor, textColor, ...props }) => {
8450
8500
  const { bulmaHelperClasses, rest } = useBulmaClasses({
@@ -8460,5 +8510,5 @@ const Section = ({ size, className, children, color, bgColor, textColor, ...prop
8460
8510
  return (jsx("section", { className: sectionClasses, ...rest, children: children }));
8461
8511
  };
8462
8512
 
8463
- export { Autocomplete, Avatar, Avatars, Badge, Block, Box, Breadcrumb, Button, Buttons, CardWithSubComponents as Card, Carousel, CarouselItem, Cell, Checkbox, Checkboxes, Code, Collapse, Column, Columns, ConfigProvider, Container, Content, Control, DateInput, DateInputBase, DateTimeInput, DateTimeInputBase, Delete, Dialog, DialogContainer, Divider, Dropdown, DropdownDivider, DropdownItem, Emphasis, Field, FieldBody, FieldLabel, Figure, File, Footer, Grid, Hero, HeroBody, HeroFoot, HeroHead, Icon, IconText, Image, Input, InputBase, Level, LevelItem, LevelLeft, LevelRight, Link, LinkButton, ListItem, Loading, Media, MediaContent, MediaLeft, MediaRight, Menu, MenuItem, MenuLabel, MenuList, MessageWithSubComponents as Message, Modal, Navbar, NavbarBrand, NavbarBurger, NavbarDivider, NavbarDropdown, NavbarDropdownMenu, NavbarEnd, NavbarItem, NavbarLink, NavbarMenu, NavbarStart, Notification, NotificationContainer, Numberinput, OrderedList, Pagination, PaginationEllipsis, PaginationLink, PaginationList, PaginationNext, PaginationPrevious, Panel, PanelBlock, PanelButtonBlock, PanelCheckboxBlock, PanelHeading, PanelIcon, PanelInputBlock, PanelTabs, Paragraph, Pre, Progress, Radio, Radios, Rate, Reveal, Section, Select, SelectBase, Sidebar, Skeleton, Slider, Span, Step, Steps, Strong, SubTitle, Switch, Tab, TabContentItem, TabItem, TabList, Table, Tabs, TabsContent, Tag, Taginput, Tags, Tbody, Td, TextArea, TextAreaBase, Tfoot, Th, Thead, Theme, TimeInput, TimeInputBase, Title, Toast, ToastContainer, Tooltip, Tr, UnorderedList, __test_exports__, checkboxColors, checkboxSizes, classNames, createPrefixedClassNames, dialog, isBrowser$1 as isBrowser, notification, prefixedClassNames, radioColors, radioSizes, switchColors, switchSizes, toast, useBulmaClasses, useClassPrefix, useColorClasses, useConfig, useFlexboxClasses, useIconLibrary, useInsideControl, useInsideField, useOtherClasses, usePrefixedClass, usePrefixedClassNames, useSpacingClasses, useTypographyClasses, useVisibilityClasses, validAlignContents, validAlignItems, validAlignSelfs, validAlignments$1 as validAlignments, validColorShades, validColors, validDisplays, validFlexDirections, validFlexGrowShrink, validFlexWraps, validFontFamilies, validJustifyContents, validSizes$1 as validSizes, validTableColors, validTextSizes, validTextTransforms, validTextWeights, validViewports, validVisibilities };
8513
+ export { Autocomplete, Avatar, Avatars, Badge, Block, Box, Breadcrumb, Button, Buttons, Card, Carousel, CarouselItem, Cell, Checkbox, Checkboxes, Code, Collapse, Column, Columns, ConfigProvider, Container, Content, Control, DateInput, DateInputBase, DateTimeInput, DateTimeInputBase, Delete, Dialog, DialogContainer, Divider, Dropdown, DropdownDivider, DropdownItem, Emphasis, Field, FieldBody, FieldLabel, Figure, File, Footer, Grid, Hero, HeroBody, HeroFoot, HeroHead, Icon, IconText, Image, Input, InputBase, Level, LevelItem, LevelLeft, LevelRight, Link, LinkButton, ListItem, Loading, Media, MediaContent, MediaLeft, MediaRight, Menu, MenuItem, MenuLabel, MenuList, Message, Modal, Navbar, NavbarBrand, NavbarBurger, NavbarDivider, NavbarDropdown, NavbarDropdownMenu, NavbarEnd, NavbarItem, NavbarLink, NavbarMenu, NavbarStart, Notification, NotificationContainer, Numberinput, OrderedList, Pagination, PaginationEllipsis, PaginationLink, PaginationList, PaginationNext, PaginationPrevious, Panel, PanelBlock, PanelButtonBlock, PanelCheckboxBlock, PanelHeading, PanelIcon, PanelInputBlock, PanelTabs, Paragraph, Pre, Progress, Radio, Radios, Rate, Reveal, Section, Select, SelectBase, Sidebar, Skeleton, Slider, Span, Step, Steps, Strong, SubTitle, Switch, Tab, TabContentItem, TabItem, TabList, Table, Tabs, TabsContent, Tag, Taginput, Tags, Tbody, Td, TextArea, TextAreaBase, Tfoot, Th, Thead, Theme, TimeInput, TimeInputBase, Title, Toast, ToastContainer, Tooltip, Tr, UnorderedList, __test_exports__, checkboxColors, checkboxSizes, classNames, createPrefixedClassNames, dialog, isBrowser$1 as isBrowser, notification, prefixedClassNames, radioColors, radioSizes, switchColors, switchSizes, toast, useBulmaClasses, useClassPrefix, useColorClasses, useConfig, useFlexboxClasses, useIconLibrary, useInsideControl, useInsideField, useOtherClasses, usePrefixedClass, usePrefixedClassNames, useSpacingClasses, useTypographyClasses, useVisibilityClasses, validAlignContents, validAlignItems, validAlignSelfs, validAlignments$1 as validAlignments, validColorShades, validColors, validDisplays, validFlexDirections, validFlexGrowShrink, validFlexWraps, validFontFamilies, validJustifyContents, validSizes$1 as validSizes, validTableColors, validTextSizes, validTextTransforms, validTextWeights, validViewports, validVisibilities };
8464
8514
  //# sourceMappingURL=index.esm.js.map