reactive-bulma 3.1.0 → 3.2.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/cjs/index.js CHANGED
@@ -3961,12 +3961,31 @@ const NavBar = ({ testId = null, cssClasses = null, style = null, brandConfig =
3961
3961
  renderNavBarMenuSection(itemsAtEnd, 'end', navBarTestId))));
3962
3962
  };
3963
3963
 
3964
+ const Card = ({ testId = null, cssClasses = null, style = null, headerText = null, image = null, content, footerLinks = null }) => {
3965
+ const cardClasses = parseClasses(['card', cssClasses]);
3966
+ const cardTestId = testId !== null && testId !== void 0 ? testId : parseTestId({ tag: 'card', parsedClasses: cardClasses });
3967
+ return (React.createElement("section", { "data-testid": cardTestId, className: cardClasses, style: style !== null && style !== void 0 ? style : undefined },
3968
+ headerText ? (React.createElement("header", { "data-testid": `${cardTestId}-header`, className: 'card-header' },
3969
+ React.createElement("p", { className: 'card-header-title' }, headerText),
3970
+ React.createElement("button", { className: 'card-header-icon', "aria-label": 'more options' },
3971
+ React.createElement("span", { className: 'icon' },
3972
+ React.createElement("i", { className: 'fas fa-angle-down', "aria-hidden": 'true' }))))) : null,
3973
+ image ? (React.createElement("section", { "data-testid": `${cardTestId}-image`, className: 'card-image' },
3974
+ React.createElement(Image, Object.assign({}, image)))) : null,
3975
+ React.createElement("section", { "data-testid": `${cardTestId}-content`, className: 'card-content' }, Array.isArray(content) ? (content.map((_contentConfig, i) => (React.createElement("section", { key: `card-content-item-${generateKey()}`, "data-testid": `${cardTestId}-content-item-${i}`, className: 'content' }, _contentConfig)))) : (React.createElement("section", { className: 'content' }, content))),
3976
+ footerLinks ? (React.createElement("section", { className: 'card-footer' }, footerLinks.map((_footerConfig, i) => {
3977
+ var _a;
3978
+ return (React.createElement("a", { key: `card-footer-item-${generateKey()}`, "data-testid": `${cardTestId}-footer-item-${i}`, className: 'card-footer-item', "aria-hidden": 'true', onClick: (_a = _footerConfig.onClick) !== null && _a !== void 0 ? _a : undefined }, _footerConfig.text));
3979
+ }))) : null));
3980
+ };
3981
+
3964
3982
  exports.Block = Block;
3965
3983
  exports.Box = Box;
3966
3984
  exports.BreadcrumbItem = BreadcrumbItem;
3967
3985
  exports.Breadcrumbs = Breadcrumbs;
3968
3986
  exports.Button = Button;
3969
3987
  exports.ButtonGroup = ButtonGroup;
3988
+ exports.Card = Card;
3970
3989
  exports.Checkbox = CheckBox;
3971
3990
  exports.Column = Column;
3972
3991
  exports.ColumnGroup = ColumnGroup;