reactive-bulma 2.16.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 +22 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/molecules/Media/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/Section/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/index.d.ts +2 -0
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +16 -2
- package/dist/cjs/types/interfaces/organismProps.d.ts +2 -2
- package/dist/cjs/types/types/domTypes.d.ts +2 -0
- package/dist/cjs/types/types/styleTypes.d.ts +2 -0
- package/dist/esm/index.js +21 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/molecules/Media/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/Section/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/index.d.ts +2 -0
- package/dist/esm/types/interfaces/moleculeProps.d.ts +16 -2
- package/dist/esm/types/interfaces/organismProps.d.ts +2 -2
- package/dist/esm/types/types/domTypes.d.ts +2 -0
- package/dist/esm/types/types/styleTypes.d.ts +2 -0
- package/dist/index.d.ts +23 -3
- package/package.json +6 -6
package/dist/cjs/index.js
CHANGED
@@ -3719,6 +3719,22 @@ const Footer = ({ testId = null, containerTestId = null, cssClasses = null, cont
|
|
3719
3719
|
React.createElement("section", { "data-testid": footerContentTestId, className: footerContentClasses, style: style !== null && style !== void 0 ? style : undefined }, content)));
|
3720
3720
|
};
|
3721
3721
|
|
3722
|
+
const renderMediaSection = (content, position, testId) => content ? (React.createElement("section", { "data-testid": `${testId}-${position}`, className: `media-${position}` }, content)) : null;
|
3723
|
+
const Media = ({ testId = null, cssClasses = null, style = null, leftContent = null, centerContent = null, rightContent = null }) => {
|
3724
|
+
const mediaClasses = parseClasses(['media', cssClasses]);
|
3725
|
+
const mediaTestId = testId !== null && testId !== void 0 ? testId : parseTestId({ tag: 'media', parsedClasses: mediaClasses });
|
3726
|
+
return (React.createElement("article", { "data-testid": mediaTestId, className: mediaClasses, style: style !== null && style !== void 0 ? style : undefined },
|
3727
|
+
renderMediaSection(leftContent, 'left', mediaTestId),
|
3728
|
+
renderMediaSection(centerContent, 'content', mediaTestId),
|
3729
|
+
renderMediaSection(rightContent, 'right', mediaTestId)));
|
3730
|
+
};
|
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
|
+
|
3722
3738
|
const renderFieldLabel = (labelText) => labelText ? (React.createElement("label", { "data-testid": 'test-form-field-label', className: 'label' }, labelText)) : null;
|
3723
3739
|
const renderFieldBody = (inputControlConfig, isGrouped) => {
|
3724
3740
|
if (isGrouped) {
|
@@ -3786,13 +3802,14 @@ const Level = ({ testId = null, cssClasses = null, style = null, leftSide = null
|
|
3786
3802
|
rightSide ? (React.createElement("section", { className: 'level-right' }, renderLevelSection(rightSide))) : null));
|
3787
3803
|
};
|
3788
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;
|
3789
3806
|
const Hero = ({ testId = null, cssClasses = null, style = null, header = null, body, footer = null, color = null, size = null }) => {
|
3790
3807
|
const heroClasses = parseClasses(['hero', color, size, cssClasses]);
|
3791
3808
|
const heroTestId = testId !== null && testId !== void 0 ? testId : parseTestId({ tag: 'hero', parsedClasses: heroClasses });
|
3792
3809
|
return (React.createElement("section", { "data-testid": heroTestId, className: heroClasses, style: style !== null && style !== void 0 ? style : undefined },
|
3793
|
-
|
3794
|
-
|
3795
|
-
|
3810
|
+
renderHeroSection(header, 'head', heroTestId, size),
|
3811
|
+
renderHeroSection(body, 'body', heroTestId, size),
|
3812
|
+
renderHeroSection(footer, 'foot', heroTestId, size)));
|
3796
3813
|
};
|
3797
3814
|
|
3798
3815
|
const TileGroup = ({ testId = null, cssClasses = null, style = null, context = 'is-ancestor', size = null, isVertical = false, groupConfig }) => {
|
@@ -3844,6 +3861,7 @@ exports.InputControl = InputControl;
|
|
3844
3861
|
exports.Level = Level;
|
3845
3862
|
exports.LevelHeader = LevelHeader;
|
3846
3863
|
exports.LevelItem = LevelItem;
|
3864
|
+
exports.Media = Media;
|
3847
3865
|
exports.Menu = Menu;
|
3848
3866
|
exports.MenuItem = MenuItem;
|
3849
3867
|
exports.MenuList = MenuList;
|
@@ -3857,6 +3875,7 @@ exports.PanelBlock = PanelBlock;
|
|
3857
3875
|
exports.PanelTabs = PanelTabs;
|
3858
3876
|
exports.ProgressBar = ProgressBar;
|
3859
3877
|
exports.RadioButton = RadioButton;
|
3878
|
+
exports.Section = Section;
|
3860
3879
|
exports.Select = Select;
|
3861
3880
|
exports.TabItem = TabItem;
|
3862
3881
|
exports.Tabs = Tabs;
|