reactive-bulma 1.16.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -1
- package/dist/cjs/index.js +14 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/Delete/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +1 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +4 -0
- package/dist/esm/index.js +14 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/Delete/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +1 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +4 -0
- package/dist/index.d.ts +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -31,7 +31,7 @@ Component library based on React, Bulma, Typescript and Rollup
|
|
31
31
|
|
32
32
|
![Npm Version][badge-npm-version]
|
33
33
|
![Npm Bundle Size][badge-npm-size]
|
34
|
-
![Npm Downloads][badge-npm-downloads]
|
34
|
+
[![Npm Downloads][badge-npm-downloads]][link-npm-downloads]
|
35
35
|
[![Netlify Status][badge-netlify-status]][link-netlify-status]
|
36
36
|
[![Code Coverage][badge-code-coverage]][link-code-coverage]
|
37
37
|
[![Quality Gate Status][badge-soundcloud-quality]][link-soundcloud-status]
|
@@ -47,6 +47,7 @@ Component library based on React, Bulma, Typescript and Rollup
|
|
47
47
|
[badge-npm-version]: https://img.shields.io/github/package-json/v/nicolasomar/reactive-bulma?label=npm%20version&logo=npm&labelColor=535353&color=success&style=flat
|
48
48
|
[badge-npm-size]: https://img.shields.io/bundlephobia/min/reactive-bulma?label=bundle%20size&labelColor=535353&logo=npm&style=flat
|
49
49
|
[badge-npm-downloads]: https://img.shields.io/npm/dm/reactive-bulma?label=downloads&labelColor=535353&style=flat&logo=npm
|
50
|
+
[link-npm-downloads]: https://www.npmjs.com/package/reactive-bulma?activeTab=versions
|
50
51
|
[badge-netlify-status]: https://api.netlify.com/api/v1/badges/3101f2b5-0e28-4734-b749-ebb0e3e413c6/deploy-status
|
51
52
|
[link-netlify-status]: https://app.netlify.com/sites/reactivebulma/deploys
|
52
53
|
[badge-code-coverage]: https://img.shields.io/codecov/c/github/nicolasomar/reactive-bulma?label=coverage&labelColor=535353&logo=codecov&style=flat
|
@@ -123,6 +124,7 @@ Reactive bulma's documentation, included in this repo in the root directory, is
|
|
123
124
|
- Run `npm install` to install the Node.js dependencies, including Storybook (the site builder).
|
124
125
|
- Run `npm start`.
|
125
126
|
- Wait until a new tab opens with url <http://localhost:6006/> in your browser.
|
127
|
+
- In case you want to initiate it on the background, you can run `npm run start:off`.
|
126
128
|
|
127
129
|
Learn more about using `Storybook` by reading its [documentation](https://storybook.js.org/docs/react/get-started/install).
|
128
130
|
|
package/dist/cjs/index.js
CHANGED
@@ -2923,21 +2923,21 @@ const Tag = ({ text, testId = null, style = null, color = null, isLight = null,
|
|
2923
2923
|
});
|
2924
2924
|
return withAddon ? (React.createElement("section", { "data-testid": _testId, style: style !== null && style !== void 0 ? style : undefined, className: tagsWrapperClasses },
|
2925
2925
|
React.createElement("span", { className: tagClasses }, text),
|
2926
|
-
withDelete ? (React.createElement("a", { "data-testid": `${_testId}-delete`, className: 'tag is-delete', onClick: onDeleteClick
|
2926
|
+
withDelete ? (React.createElement("a", { "data-testid": `${_testId}-delete`, className: 'tag is-delete', onClick: onDeleteClick !== null && onDeleteClick !== void 0 ? onDeleteClick : undefined })) : (React.createElement("span", { className: addonTagClasses }, addonText)))) : (React.createElement("span", { "data-testid": _testId, style: style !== null && style !== void 0 ? style : undefined, className: tagClasses },
|
2927
2927
|
text,
|
2928
|
-
withDelete ? (React.createElement("button", { "data-testid": `${_testId}-delete`, className: 'delete', onClick: onDeleteClick
|
2928
|
+
withDelete ? (React.createElement("button", { "data-testid": `${_testId}-delete`, className: 'delete', onClick: onDeleteClick !== null && onDeleteClick !== void 0 ? onDeleteClick : undefined })) : null));
|
2929
2929
|
};
|
2930
2930
|
|
2931
2931
|
const Box = ({ testId = 'test-box', style = null, children = null }) => children ? (React.createElement("section", { "data-testid": testId, className: 'box', style: style !== null && style !== void 0 ? style : undefined }, children)) : null;
|
2932
2932
|
|
2933
2933
|
const renderTitleSection = (section) => {
|
2934
|
-
var _a, _b;
|
2934
|
+
var _a, _b, _c;
|
2935
2935
|
const sectionClasses = parseClasses([
|
2936
2936
|
section === null || section === void 0 ? void 0 : section.prop,
|
2937
2937
|
(_a = section === null || section === void 0 ? void 0 : section.size) !== null && _a !== void 0 ? _a : 'is-6',
|
2938
2938
|
(section === null || section === void 0 ? void 0 : section.prop) === 'title' && (section === null || section === void 0 ? void 0 : section.isSpaced) ? 'is-spaced' : null
|
2939
2939
|
]);
|
2940
|
-
return section ? (React.createElement("p", { "data-testid": (_b = section === null || section === void 0 ? void 0 : section.testId) !== null && _b !== void 0 ? _b : `${section === null || section === void 0 ? void 0 : section.prop}-test`, className: sectionClasses, style: section.style
|
2940
|
+
return section ? (React.createElement("p", { "data-testid": (_b = section === null || section === void 0 ? void 0 : section.testId) !== null && _b !== void 0 ? _b : `${section === null || section === void 0 ? void 0 : section.prop}-test`, className: sectionClasses, style: (_c = section.style) !== null && _c !== void 0 ? _c : undefined }, section === null || section === void 0 ? void 0 : section.text)) : null;
|
2941
2941
|
};
|
2942
2942
|
const Title = ({ main, secondary }) => (React.createElement(React.Fragment, null,
|
2943
2943
|
renderTitleSection(main),
|
@@ -3038,10 +3038,20 @@ const TextArea = ({ testId = null, text = null, cols = null, rows = null, isDisa
|
|
3038
3038
|
return (React.createElement("textarea", { "data-testid": _testId, defaultValue: text !== null && text !== void 0 ? text : undefined, cols: cols !== null && cols !== void 0 ? cols : undefined, rows: rows !== null && rows !== void 0 ? rows : undefined, disabled: isDisabled, readOnly: isReadonly, style: style !== null && style !== void 0 ? style : undefined, className: textAreaClasses, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined, onChange: onChange !== null && onChange !== void 0 ? onChange : undefined }));
|
3039
3039
|
};
|
3040
3040
|
|
3041
|
+
const Delete = ({ testId = null, style = null, size = null, onClick = null }) => {
|
3042
|
+
const deleteClasses = parseClasses(['delete', size]);
|
3043
|
+
const _testId = testId !== null && testId !== void 0 ? testId : parseTestId({
|
3044
|
+
tag: 'delete',
|
3045
|
+
parsedClasses: deleteClasses
|
3046
|
+
});
|
3047
|
+
return (React.createElement("button", { "data-testid": _testId, style: style !== null && style !== void 0 ? style : undefined, className: deleteClasses, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined }));
|
3048
|
+
};
|
3049
|
+
|
3041
3050
|
exports.Block = Block;
|
3042
3051
|
exports.Box = Box;
|
3043
3052
|
exports.Button = Button;
|
3044
3053
|
exports.Column = Column;
|
3054
|
+
exports.Delete = Delete;
|
3045
3055
|
exports.Icon = Icon;
|
3046
3056
|
exports.Input = Input;
|
3047
3057
|
exports.ProgressBar = ProgressBar;
|