reactive-bulma 1.5.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +24 -5
- package/dist/cjs/index.js +27 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/{Button/Button.d.ts → atoms/Button/index.d.ts} +1 -3
- package/dist/cjs/types/components/atoms/Column/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +2 -0
- package/dist/cjs/types/functions/persers.d.ts +1 -0
- package/dist/cjs/types/functions/tests/parsers.test.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/cjs/types/interfaces/atomProps.d.ts +21 -0
- package/dist/cjs/types/types/domTypes.d.ts +1 -0
- package/dist/cjs/types/types/styleTypes.d.ts +4 -0
- package/dist/esm/index.js +27 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/{Button/Button.d.ts → atoms/Button/index.d.ts} +1 -3
- package/dist/esm/types/components/atoms/Column/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +2 -0
- package/dist/esm/types/functions/persers.d.ts +1 -0
- package/dist/esm/types/functions/tests/parsers.test.d.ts +1 -0
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/esm/types/interfaces/atomProps.d.ts +21 -0
- package/dist/esm/types/types/domTypes.d.ts +1 -0
- package/dist/esm/types/types/styleTypes.d.ts +4 -0
- package/dist/index.d.ts +29 -4
- package/package.json +4 -3
- package/dist/cjs/types/components/Button/index.d.ts +0 -1
- package/dist/cjs/types/components/index.d.ts +0 -2
- package/dist/esm/types/components/Button/index.d.ts +0 -1
- package/dist/esm/types/components/index.d.ts +0 -2
package/README.md
CHANGED
@@ -14,19 +14,38 @@ npm install
|
|
14
14
|
```
|
15
15
|
|
16
16
|
## How to run it
|
17
|
-
To
|
17
|
+
To initiate on `Storybook mode` (see alternatives and interact with any component)
|
18
18
|
```sh
|
19
19
|
npm start
|
20
20
|
```
|
21
|
-
To
|
21
|
+
To compile the project with your changes
|
22
22
|
```sh
|
23
23
|
npm run build
|
24
24
|
```
|
25
25
|
|
26
|
+
## Folder structure
|
27
|
+
Once you have cloned the repo, it will show you the following folders:
|
28
|
+
- `.github:` [Github Actions](https://github.com/features/actions/) files used to run post-merge.commits like unit test coverage collection.
|
29
|
+
- `.husky:` Dedicated to [Husky](https://typicode.github.io/husky/) git-hook files.
|
30
|
+
- `.storybook:` Dedicated to [Storybook](https://storybook.js.org/) configuration.
|
31
|
+
- `src:`
|
32
|
+
- `components:` Location of all used components, using [Atomic Design hierarchy structure](https://atomicdesign.bradfrost.com/chapter-2/) (`atoms` -> `molecules` -> `organisms`).
|
33
|
+
|
34
|
+
## Versioning
|
35
|
+
After intestigating [semantic-release documentation](https://semantic-release.gitbook.io/semantic-release/) (reffer to [#3](https://github.com/NicolasOmar/reactive-bulma/issues/3)) and having a problematic implementation, I decided to change version meaning for this project with the following:
|
36
|
+
- Major versions (`1.0.0`, `2.0.0` and beyond) will reffer to milestones/version achievement.
|
37
|
+
- Minor versions (`1.1.0`, `1.2.0` and so on) will reffer to branch/story completition.
|
38
|
+
- Patch versions (`1.0.1`, `1.0.2` and so on) will reffer to bugfixes only.
|
39
|
+
|
40
|
+
To know more about actual roadmap, please go to section `Find out more` -> `Roadmap`.
|
41
|
+
|
42
|
+
## Branches and Environments
|
43
|
+
I will maintain only one deployable site based on [Storybook](https://storybook.js.org/) with automated [Netlify](https://netlify.com/) deployments with each push to `main` branch. The mentioned site is on section `Find out more` -> `Storybook site`.
|
44
|
+
|
26
45
|
## Find out more
|
27
|
-
| [Project Status](https://github.com/users/NicolasOmar/projects/3) | [Storybook site](https://my-pets-storybook.netlify.app/) | [Npm Package](https://www.npmjs.com/package/reactive-bulma)
|
28
|
-
| :--- | :--- | :--- |
|
29
|
-
| Project board for project status tracking | Site dedicated to show and test all the created components | Public package site in npm
|
46
|
+
| [Roadmap](https://docs.google.com/document/d/1kWX-dDTD-cQUeB_Vbu0K6xRvtHaSA38h76yQnhiCe9U) | [Project Status](https://github.com/users/NicolasOmar/projects/3) | [Storybook site](https://my-pets-storybook.netlify.app/) | [Npm Package](https://www.npmjs.com/package/reactive-bulma)
|
47
|
+
| :--- | :--- | :--- | :--- |
|
48
|
+
| Document with entire list of stories, splitted by versions | Project board for project status tracking | Site dedicated to show and test all the created components | Public package site in npm
|
30
49
|
|
31
50
|
## License
|
32
51
|
**MIT**
|
package/dist/cjs/index.js
CHANGED
@@ -2840,7 +2840,33 @@ function requireReact_development () {
|
|
2840
2840
|
|
2841
2841
|
var React = /*@__PURE__*/getDefaultExportFromCjs(reactExports);
|
2842
2842
|
|
2843
|
-
const
|
2843
|
+
const parseClasses = (_classes) => _classes.filter(_class => _class).join(' ');
|
2844
|
+
|
2845
|
+
const Button = ({ text = null, type = 'button', style = null, color = 'is-white', isLightColor = false, isInvertedColor = false, isOutlined = false, isRounded = false, isLoading = false, isDisabled = false, isStatic = false, size = null, onClick = null }) => {
|
2846
|
+
const buttonClasses = parseClasses([
|
2847
|
+
'button',
|
2848
|
+
color,
|
2849
|
+
isLightColor ? 'is-light' : null,
|
2850
|
+
isInvertedColor ? 'is-inverted' : null,
|
2851
|
+
isOutlined ? 'is-outlined' : null,
|
2852
|
+
isRounded ? 'is-rounded' : null,
|
2853
|
+
isLoading ? 'is-loading' : null,
|
2854
|
+
isStatic ? 'is-static' : null,
|
2855
|
+
size
|
2856
|
+
]);
|
2857
|
+
return (React.createElement("button", { "data-testid": 'test-button', type: type, className: buttonClasses, style: style !== null && style !== void 0 ? style : undefined, disabled: isDisabled !== null && isDisabled !== void 0 ? isDisabled : false, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined }, text));
|
2858
|
+
};
|
2859
|
+
|
2860
|
+
const Column = ({ size = null, offset = null, isNarrow = false, children = null }) => {
|
2861
|
+
const classes = parseClasses([
|
2862
|
+
'column',
|
2863
|
+
size,
|
2864
|
+
offset,
|
2865
|
+
isNarrow ? 'is-narrow' : null
|
2866
|
+
]);
|
2867
|
+
return (React.createElement("section", { "data-testid": 'test-column', className: classes }, children));
|
2868
|
+
};
|
2844
2869
|
|
2845
2870
|
exports.Button = Button;
|
2871
|
+
exports.Column = Column;
|
2846
2872
|
//# sourceMappingURL=index.js.map
|