reactive-bulma 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +29 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/molecules/ColumnGroup/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/index.d.ts +1 -0
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +17 -2
- package/dist/cjs/types/types/styleTypes.d.ts +1 -0
- package/dist/esm/index.js +29 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/molecules/ColumnGroup/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/index.d.ts +1 -0
- package/dist/esm/types/interfaces/moleculeProps.d.ts +17 -2
- package/dist/esm/types/types/styleTypes.d.ts +1 -0
- package/dist/index.d.ts +19 -2
- package/package.json +15 -15
package/dist/cjs/index.js
CHANGED
@@ -3199,16 +3199,44 @@ const ButtonGroup = ({ testId = null, cssClasses = null, style = null, buttonLis
|
|
3199
3199
|
const shouldApplyColor = (hasSelectedButton && currentButtonItem.isSelected) ||
|
3200
3200
|
!hasSelectedButton;
|
3201
3201
|
const buttonConfig = Object.assign(Object.assign({}, currentButtonItem), { color: shouldApplyColor ? currentButtonItem.color : undefined });
|
3202
|
-
return (React.createElement(Button, Object.assign({ key: `button-
|
3202
|
+
return (React.createElement(Button, Object.assign({ key: `button-group-item-${i}` }, buttonConfig)));
|
3203
3203
|
})));
|
3204
3204
|
};
|
3205
3205
|
|
3206
|
+
const parseGapCssClass = (gapPropValue) => {
|
3207
|
+
switch (gapPropValue) {
|
3208
|
+
case null:
|
3209
|
+
return 'is-gapless';
|
3210
|
+
case undefined:
|
3211
|
+
return 'is-3';
|
3212
|
+
default:
|
3213
|
+
return gapPropValue;
|
3214
|
+
}
|
3215
|
+
};
|
3216
|
+
const ColumnGroup = ({ testId = null, cssClasses = null, style = null, listOfColumns, isMobileLayout = null, isMultiline = null, isVerticallyCentered = null, isHorizontallyCentered = null, gap = undefined }) => {
|
3217
|
+
const columnGroupClasses = parseClasses([
|
3218
|
+
'columns',
|
3219
|
+
isMultiline ? 'is-multiline' : null,
|
3220
|
+
isMobileLayout ? 'is-mobile' : null,
|
3221
|
+
isVerticallyCentered ? 'is-vcentered' : null,
|
3222
|
+
isHorizontallyCentered ? 'is-centered' : null,
|
3223
|
+
parseGapCssClass(gap),
|
3224
|
+
cssClasses
|
3225
|
+
]);
|
3226
|
+
const columnGroupTestId = testId !== null && testId !== void 0 ? testId : parseTestId({
|
3227
|
+
tag: 'columns',
|
3228
|
+
parsedClasses: columnGroupClasses
|
3229
|
+
});
|
3230
|
+
return (React.createElement("section", { "data-testid": columnGroupTestId, className: columnGroupClasses, style: style !== null && style !== void 0 ? style : undefined }, listOfColumns.map((_columnItem, i) => (React.createElement(Column, Object.assign({ key: `column-group-item-${i}` }, _columnItem))))));
|
3231
|
+
};
|
3232
|
+
|
3206
3233
|
exports.Block = Block;
|
3207
3234
|
exports.Box = Box;
|
3208
3235
|
exports.Button = Button;
|
3209
3236
|
exports.ButtonGroup = ButtonGroup;
|
3210
3237
|
exports.Checkbox = CheckBox;
|
3211
3238
|
exports.Column = Column;
|
3239
|
+
exports.ColumnGroup = ColumnGroup;
|
3212
3240
|
exports.Delete = Delete;
|
3213
3241
|
exports.File = File;
|
3214
3242
|
exports.Icon = Icon;
|