reactive-bulma 2.3.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/README.md +27 -3
  2. package/dist/cjs/index.js +153 -38
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/atoms/BreadcrumbItem/index.d.ts +4 -0
  5. package/dist/cjs/types/components/atoms/DropdownItem/index.d.ts +4 -0
  6. package/dist/cjs/types/components/atoms/DropdownTrigger/index.d.ts +4 -0
  7. package/dist/cjs/types/components/atoms/index.d.ts +3 -0
  8. package/dist/cjs/types/components/molecules/Breadcrumbs/index.d.ts +4 -0
  9. package/dist/cjs/types/components/molecules/Dropdown/index.d.ts +4 -0
  10. package/dist/cjs/types/components/molecules/index.d.ts +2 -0
  11. package/dist/cjs/types/interfaces/atomProps.d.ts +26 -14
  12. package/dist/cjs/types/interfaces/commonProps.d.ts +4 -0
  13. package/dist/cjs/types/interfaces/moleculeProps.d.ts +21 -3
  14. package/dist/cjs/types/types/domTypes.d.ts +1 -0
  15. package/dist/cjs/types/types/styleTypes.d.ts +2 -0
  16. package/dist/esm/index.js +149 -39
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/types/components/atoms/BreadcrumbItem/index.d.ts +4 -0
  19. package/dist/esm/types/components/atoms/DropdownItem/index.d.ts +4 -0
  20. package/dist/esm/types/components/atoms/DropdownTrigger/index.d.ts +4 -0
  21. package/dist/esm/types/components/atoms/index.d.ts +3 -0
  22. package/dist/esm/types/components/molecules/Breadcrumbs/index.d.ts +4 -0
  23. package/dist/esm/types/components/molecules/Dropdown/index.d.ts +4 -0
  24. package/dist/esm/types/components/molecules/index.d.ts +2 -0
  25. package/dist/esm/types/interfaces/atomProps.d.ts +26 -14
  26. package/dist/esm/types/interfaces/commonProps.d.ts +4 -0
  27. package/dist/esm/types/interfaces/moleculeProps.d.ts +21 -3
  28. package/dist/esm/types/types/domTypes.d.ts +1 -0
  29. package/dist/esm/types/types/styleTypes.d.ts +2 -0
  30. package/dist/index.d.ts +60 -13
  31. package/package.json +30 -27
package/README.md CHANGED
@@ -85,28 +85,34 @@ After studying [an Udemy course about Typescript](https://github.com/NicolasOmar
85
85
  [![material design dependency][badge-dependency-material-design]][link-package-dependencies]
86
86
  [![typescript dependency][badge-dependency-typescript]][link-package-dependencies]
87
87
  [![rollup dependency][badge-dependency-rollup]][link-package-dependencies]
88
+ [![postcss dependency][badge-dependency-postcss]][link-package-dependencies]
88
89
  [![storybook dependency][badge-dependency-storybook]][link-package-dependencies]
89
90
  [![semantic release dependency][badge-dependency-semantic-release]][link-package-dependencies]
90
91
  [![babel dependency][badge-dependency-babel]][link-package-dependencies]
91
92
  [![jest dependency][badge-dependency-jest]][link-package-dependencies]
92
93
  [![react testing library dependency][badge-dependency-react-testing]][link-package-dependencies]
94
+ [![lint-staged dependency][badge-dependency-lint-staged]][link-package-dependencies]
93
95
  [![prettier dependency][badge-dependency-prettier]][link-package-dependencies]
94
96
  [![eslint dependency][badge-dependency-eslint]][link-package-dependencies]
95
97
  [![husky dependency][badge-dependency-husky]][link-package-dependencies]
98
+ [![hygen dependency][badge-dependency-hygen]][link-package-dependencies]
96
99
 
97
100
  [badge-dependency-react]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/react/main?logo=react
98
101
  [badge-dependency-bulma]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/bulma/main?logo=bulma
99
102
  [badge-dependency-material-design]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/@mdi/font/main?logo=materialdesignicons
100
103
  [badge-dependency-typescript]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/typescript/main?logo=typescript
104
+ [badge-dependency-postcss]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/postcss/main?logo=postcss
101
105
  [badge-dependency-rollup]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/rollup/main?logo=rollup.js
102
106
  [badge-dependency-storybook]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/storybook/main?logo=storybook
103
107
  [badge-dependency-semantic-release]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/semantic-release/main?logo=semantic-release
104
108
  [badge-dependency-babel]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/@babel/core/main?logo=babel
105
109
  [badge-dependency-jest]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/jest/main?logo=jest
106
110
  [badge-dependency-react-testing]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/@testing-library/react/main?logo=testing-library
111
+ [badge-dependency-lint-staged]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/lint-staged/main?logo=lint-staged
107
112
  [badge-dependency-prettier]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/prettier/main?logo=prettier
108
113
  [badge-dependency-eslint]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/eslint/main?logo=eslint
109
114
  [badge-dependency-husky]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/husky/main?logo=husky
115
+ [badge-dependency-hygen]: https://img.shields.io/github/package-json/dependency-version/nicolasomar/reactive-bulma/dev/hygen/main?logo=hygen
110
116
  [link-package-dependencies]: https://github.com/NicolasOmar/reactive-bulma/blob/main/package.json
111
117
 
112
118
  ## Quick start
@@ -120,6 +126,7 @@ Several quick start options are available:
120
126
  ## Folder structure
121
127
 
122
128
  In case you have cloned the repo, it will show you the following folders:
129
+ - `_templates:` Dedicated to [Hygen](https://www.hygen.io/) configuration and implementation files. Dedicated to create new components from customizable templates
123
130
  - `.github:` [Github Actions](https://github.com/features/actions/) files used to run post-merge.commits like unit test coverage collection.
124
131
  - `.husky:` Dedicated to [Husky](https://typicode.github.io/husky/) configuration files.
125
132
  - `.storybook:` Dedicated to [Storybook](https://storybook.js.org/) configuration files.
@@ -128,6 +135,10 @@ In case you have cloned the repo, it will show you the following folders:
128
135
  - `atoms` (from `v1.0.0`).
129
136
  - `molecules` (from `v2.0.0`).
130
137
  - `organisms` (from `v3.0.0`).
138
+ - `design`: Location of common design tokens (coded on `.mdx` files) which are displayed above components sections in storybook's instance.
139
+ - `functions`: Dedicated to parsers and helper functions for repetitive logic.
140
+ - `interfaces`: Dedicated to interfaces used in components and functions typing.
141
+ - `types`: Dedicated to Bulma's style type setting (which are part of component's properties).
131
142
 
132
143
  ## Documentation
133
144
 
@@ -135,12 +146,23 @@ Reactive bulma's documentation, included in this repo in the root directory, is
135
146
 
136
147
  ### Running documentation locally
137
148
  - Go to `reactive-bulma` folder (where you cloned the repo before).
138
- - Run `npm install` to install the Node.js dependencies, including Storybook (the site builder).
149
+ - Open a console and run `npm install` to install the Node.js dependencies, including Storybook (the site builder).
139
150
  - Run `npm start`.
140
151
  - Wait until a new tab opens with url <http://localhost:6006/> in your browser.
141
152
  - In case you want to initiate it on the background, you can run `npm run start:cli`.
142
153
 
143
- Learn more about using `Storybook` by reading its [documentation](https://storybook.js.org/docs/react/get-started/install).
154
+ Learn more about `Storybook` by reading its [documentation](https://storybook.js.org/docs/react/get-started/install).
155
+
156
+ ### How to create a template component
157
+
158
+ After some time, I understood that creating component files is a repetitive and time-consuming task, so I made issue [#180](https://github.com/NicolasOmar/reactive-bulma/issues/180) to implement a library called [Hygen](https://www.hygen.io), whose function is to provide a way to generate templates for generic files that can consume time at the long term. You can run the script by the following steps:
159
+
160
+ - Open a console and run `npm run create` in your console.
161
+ - An will assistant will appear asking about how your component will be named. You can answer with text separated with spaces (` `), underscores (`_`), or hyphens (`-`)
162
+ - Then, the assistant will ask in which folder you want to create it (based on its type following [Atomic Design hierarchy structure](https://atomicdesign.bradfrost.com/chapter-2/))
163
+ - At last, the script should create all base files to reduce time and focus on custom implementation.
164
+
165
+ Learn more about `Hygen` by reading its [documentation](https://www.hygen.io/docs/quick-start).
144
166
 
145
167
  ## Usage
146
168
 
@@ -152,7 +174,9 @@ const App = () => (
152
174
  <Button text="This is a test" />
153
175
  );
154
176
  ```
155
- To see all component's variants and its code snippets, go to [Documentation](#documentation) section
177
+ To see all component's variants and its code snippets, go to [Documentation](#documentation) section.
178
+
179
+ In case you want to create a custom component for your forked Reactive Bulma version, the easiest way is by running the creation script I made, which [instructions are here](#how-to-create-a-template-component).
156
180
 
157
181
  ## Versioning
158
182