reactive-bulma 2.17.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -3729,6 +3729,12 @@ const Media = ({ testId = null, cssClasses = null, style = null, leftContent = n
3729
3729
  renderMediaSection(rightContent, 'right', mediaTestId)));
3730
3730
  };
3731
3731
 
3732
+ const Section = ({ testId = null, cssClasses = null, style = null, content, size = null }) => {
3733
+ const sectionClasses = parseClasses(['section', size, cssClasses]);
3734
+ const sectionTestId = testId !== null && testId !== void 0 ? testId : parseTestId({ tag: 'section', parsedClasses: sectionClasses });
3735
+ return (React.createElement("section", { "data-testid": sectionTestId, className: sectionClasses, style: style !== null && style !== void 0 ? style : undefined }, content));
3736
+ };
3737
+
3732
3738
  const renderFieldLabel = (labelText) => labelText ? (React.createElement("label", { "data-testid": 'test-form-field-label', className: 'label' }, labelText)) : null;
3733
3739
  const renderFieldBody = (inputControlConfig, isGrouped) => {
3734
3740
  if (isGrouped) {
@@ -3796,13 +3802,14 @@ const Level = ({ testId = null, cssClasses = null, style = null, leftSide = null
3796
3802
  rightSide ? (React.createElement("section", { className: 'level-right' }, renderLevelSection(rightSide))) : null));
3797
3803
  };
3798
3804
 
3805
+ const renderHeroSection = (content, type, testId, size) => type === 'body' || size === 'is-fullheight' ? (React.createElement("section", { "data-testid": `${testId}-${type}`, className: `hero-${type}` }, content)) : null;
3799
3806
  const Hero = ({ testId = null, cssClasses = null, style = null, header = null, body, footer = null, color = null, size = null }) => {
3800
3807
  const heroClasses = parseClasses(['hero', color, size, cssClasses]);
3801
3808
  const heroTestId = testId !== null && testId !== void 0 ? testId : parseTestId({ tag: 'hero', parsedClasses: heroClasses });
3802
3809
  return (React.createElement("section", { "data-testid": heroTestId, className: heroClasses, style: style !== null && style !== void 0 ? style : undefined },
3803
- size === 'is-fullheight' ? (React.createElement("section", { "data-testid": `${heroTestId}-head`, className: 'hero-head' }, header)) : null,
3804
- React.createElement("section", { "data-testid": `${heroTestId}-body`, className: 'hero-body' }, body),
3805
- size === 'is-fullheight' ? (React.createElement("section", { "data-testid": `${heroTestId}-foot`, className: 'hero-foot' }, footer)) : null));
3810
+ renderHeroSection(header, 'head', heroTestId, size),
3811
+ renderHeroSection(body, 'body', heroTestId, size),
3812
+ renderHeroSection(footer, 'foot', heroTestId, size)));
3806
3813
  };
3807
3814
 
3808
3815
  const TileGroup = ({ testId = null, cssClasses = null, style = null, context = 'is-ancestor', size = null, isVertical = false, groupConfig }) => {
@@ -3868,6 +3875,7 @@ exports.PanelBlock = PanelBlock;
3868
3875
  exports.PanelTabs = PanelTabs;
3869
3876
  exports.ProgressBar = ProgressBar;
3870
3877
  exports.RadioButton = RadioButton;
3878
+ exports.Section = Section;
3871
3879
  exports.Select = Select;
3872
3880
  exports.TabItem = TabItem;
3873
3881
  exports.Tabs = Tabs;