reactive-bulma 1.20.1 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { RadioButtonProps } from '../../../interfaces/atomProps';
3
+ declare const RadioButton: React.FC<RadioButtonProps>;
4
+ export default RadioButton;
@@ -11,3 +11,5 @@ export { default as TextArea } from './TextArea';
11
11
  export { default as Delete } from './Delete';
12
12
  export { default as Select } from './Select';
13
13
  export { default as File } from './File';
14
+ export { default as Checkbox } from './Checkbox';
15
+ export { default as RadioButton } from './RadioButton';
@@ -1,14 +1,14 @@
1
1
  import { ParseTestIdProps } from '../interfaces/functionProps';
2
2
  /**
3
- * @param { Array<string | null> } _classes Required. Array of classNames on `string` (or `null`) values
3
+ * @param { Array<string | null> } _classes `Required`. Array of classNames on `string` (or `null`) values
4
4
  * @returns { string } A single string product of merge all classNames, separated by spaces
5
5
  */
6
6
  export declare const parseClasses: (_classes: Array<string | null | undefined>) => string;
7
7
  /**
8
8
  * @param { ParseTestIdProps } config Configuration object
9
- * @param { string } config.tag Required. Component tag used between to build the final testId string.
10
- * @param { string } config.parsedClasses Required. A single string of previously parsed classes what will be joined with `tag` property.
11
- * @param { { usedRegExp?: RegExp, regExpReplacer?: string }[] } config.rules Optional. An array of objects used with a regular expression to check each case and a replacer for each one, giving oportunity to handle specific cases of component class names.
9
+ * @param { string } config.tag `Required`. Component tag used between to build the final testId string.
10
+ * @param { string } config.parsedClasses `Required`. A single string of previously parsed classes what will be joined with `tag` property.
11
+ * @param { { regExp?: RegExp, replacer?: string }[] } config.rules Optional. An array of objects used with a regular expression to check each case and a replacer for each one, giving oportunity to handle specific cases of component class names.
12
12
  * @returns A single string product of merge all classNames, separated by `separator` value
13
13
  */
14
14
  export declare const parseTestId: (config: ParseTestIdProps) => string;
@@ -220,14 +220,24 @@ export interface CheckBoxProps extends BasicProps {
220
220
  /** `Function` Click function, alone does not nothing, but can be reused for other components */
221
221
  onChange?: () => void;
222
222
  }
223
- interface RadioButtonItemProps {
223
+ export interface RadioButtonItemProps extends Pick<BasicProps, 'testId' | 'style'> {
224
+ /** `Attribute` `Required` Sets checkbox's text*/
224
225
  label: string;
225
- name: string;
226
+ /** `Attribute` Sets the name that will relate this checkbox with the others */
227
+ name?: string;
228
+ /** `Attribute` Shows the checkbox as checked or unchecked */
226
229
  isChecked?: boolean;
230
+ /** `Attribute` Will disable the checkbox */
227
231
  isDisabled?: boolean;
232
+ /** `Function` Click function, alone does not nothing, but can be reused for other components */
233
+ onChange?: () => void;
228
234
  }
229
235
  export interface RadioButtonProps extends BasicProps {
236
+ /** `Attribute` `Required` Indicates the options contained to be selected */
230
237
  options: RadioButtonItemProps[];
238
+ /** `Attribute` `Required` Sets the name that will relate this checkbox with the others */
239
+ name: string;
240
+ /** `Function` Click function, alone does not nothing, but can be reused for other components */
231
241
  onChange?: () => void;
232
242
  }
233
243
  export {};
@@ -1,6 +1,6 @@
1
1
  interface RegExpRule {
2
- usedRegExp?: RegExp;
3
- regExpReplacer?: string;
2
+ regExp?: RegExp;
3
+ replacer?: string;
4
4
  }
5
5
  export interface ParseTestIdProps {
6
6
  tag: string;
package/dist/index.d.ts CHANGED
@@ -213,6 +213,34 @@ interface FileProps extends BasicProps {
213
213
  /** `Function` Click function, alone does not nothing, but can be reused for other components */
214
214
  onClick?: () => void;
215
215
  }
216
+ interface CheckBoxProps extends BasicProps {
217
+ /** `Attribute` Sets checkbox's text that will be shown next to its control */
218
+ content?: string | React.ReactElement;
219
+ /** `Attribute` Will disable the checkbox */
220
+ isDisabled?: boolean;
221
+ /** `Function` Click function, alone does not nothing, but can be reused for other components */
222
+ onChange?: () => void;
223
+ }
224
+ interface RadioButtonItemProps extends Pick<BasicProps, 'testId' | 'style'> {
225
+ /** `Attribute` `Required` Sets checkbox's text*/
226
+ label: string;
227
+ /** `Attribute` Sets the name that will relate this checkbox with the others */
228
+ name?: string;
229
+ /** `Attribute` Shows the checkbox as checked or unchecked */
230
+ isChecked?: boolean;
231
+ /** `Attribute` Will disable the checkbox */
232
+ isDisabled?: boolean;
233
+ /** `Function` Click function, alone does not nothing, but can be reused for other components */
234
+ onChange?: () => void;
235
+ }
236
+ interface RadioButtonProps extends BasicProps {
237
+ /** `Attribute` `Required` Indicates the options contained to be selected */
238
+ options: RadioButtonItemProps[];
239
+ /** `Attribute` `Required` Sets the name that will relate this checkbox with the others */
240
+ name: string;
241
+ /** `Function` Click function, alone does not nothing, but can be reused for other components */
242
+ onChange?: () => void;
243
+ }
216
244
 
217
245
  declare const Button: React.FC<ButtonProps>;
218
246
 
@@ -240,4 +268,8 @@ declare const Select: React.FC<SelectProps>;
240
268
 
241
269
  declare const File: React.FC<FileProps>;
242
270
 
243
- export { Block, Box, Button, Column, Delete, File, Icon, Input, ProgressBar, Select, Tag, TextArea, Title };
271
+ declare const CheckBox: React.FC<CheckBoxProps>;
272
+
273
+ declare const RadioButton: React.FC<RadioButtonProps>;
274
+
275
+ export { Block, Box, Button, CheckBox as Checkbox, Column, Delete, File, Icon, Input, ProgressBar, RadioButton, Select, Tag, TextArea, Title };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reactive-bulma",
3
- "version": "1.20.1",
4
- "description": "A typescript-react-based component library based on bulma",
3
+ "version": "1.21.0",
4
+ "description": "A component library based on React, Bulma, Typescript and Rollup",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "react",
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "author": "Nicolás Omar González Passerino",
18
18
  "license": "MIT",
19
- "homepage": "https://github.com/NicolasOmar/reactive-bulma#readme",
19
+ "homepage": "https://reactivebulma.netlify.app",
20
20
  "repository": {
21
21
  "type": "git",
22
22
  "url": "https://github.com/NicolasOmar/reactive-bulma.git"
@@ -45,55 +45,55 @@
45
45
  "semantic-release": "semantic-release"
46
46
  },
47
47
  "devDependencies": {
48
- "@babel/core": "^7.22.8",
49
- "@babel/preset-env": "^7.22.7",
48
+ "@babel/core": "^7.22.9",
49
+ "@babel/preset-env": "^7.22.9",
50
50
  "@babel/preset-react": "^7.22.5",
51
51
  "@babel/preset-typescript": "^7.22.5",
52
52
  "@mdi/font": "^7.2.96",
53
- "@rollup/plugin-commonjs": "^25.0.2",
53
+ "@rollup/plugin-commonjs": "^25.0.3",
54
54
  "@rollup/plugin-node-resolve": "^15.1.0",
55
55
  "@rollup/plugin-typescript": "^11.1.2",
56
56
  "@semantic-release/changelog": "^6.0.3",
57
57
  "@semantic-release/commit-analyzer": "^10.0.1",
58
58
  "@semantic-release/exec": "^6.0.3",
59
59
  "@semantic-release/git": "^10.0.1",
60
- "@semantic-release/github": "^9.0.3",
60
+ "@semantic-release/github": "^9.0.4",
61
61
  "@semantic-release/npm": "^10.0.4",
62
62
  "@semantic-release/release-notes-generator": "^11.0.4",
63
- "@storybook/addon-actions": "^7.0.26",
64
- "@storybook/addon-essentials": "^7.0.26",
65
- "@storybook/addon-interactions": "^7.0.26",
66
- "@storybook/addon-links": "^7.0.26",
67
- "@storybook/addon-mdx-gfm": "^7.0.26",
68
- "@storybook/cli": "^7.0.26",
69
- "@storybook/react": "^7.0.26",
70
- "@storybook/react-webpack5": "^7.0.26",
63
+ "@storybook/addon-actions": "^7.1.0",
64
+ "@storybook/addon-essentials": "^7.1.0",
65
+ "@storybook/addon-interactions": "^7.1.0",
66
+ "@storybook/addon-links": "^7.1.0",
67
+ "@storybook/addon-mdx-gfm": "^7.1.0",
68
+ "@storybook/cli": "^7.1.0",
69
+ "@storybook/react": "^7.1.0",
70
+ "@storybook/react-webpack5": "^7.1.0",
71
71
  "@storybook/testing-library": "^0.2.0",
72
- "@testing-library/jest-dom": "^5.16.5",
72
+ "@testing-library/jest-dom": "^5.17.0",
73
73
  "@testing-library/react": "^14.0.0",
74
- "@types/jest": "^29.5.2",
75
- "@types/react": "^18.2.14",
76
- "@typescript-eslint/eslint-plugin": "^5.61.0",
77
- "@typescript-eslint/parser": "^5.61.0",
74
+ "@types/jest": "^29.5.3",
75
+ "@types/react": "^18.2.15",
76
+ "@typescript-eslint/eslint-plugin": "^6.1.0",
77
+ "@typescript-eslint/parser": "^6.1.0",
78
78
  "babel-jest": "^29.6.1",
79
79
  "babel-loader": "^9.1.3",
80
80
  "bulma": "^0.9.4",
81
- "eslint": "^8.44.0",
81
+ "eslint": "^8.45.0",
82
82
  "eslint-config-prettier": "^8.8.0",
83
- "eslint-plugin-react": "^7.32.2",
83
+ "eslint-plugin-react": "^7.33.0",
84
84
  "husky": "^8.0.3",
85
85
  "jest": "^29.6.1",
86
86
  "jest-environment-jsdom": "^29.6.1",
87
87
  "lint-staged": "^13.2.3",
88
- "postcss": "^8.4.25",
88
+ "postcss": "^8.4.26",
89
89
  "prettier": "^3.0.0",
90
90
  "react": "^18.2.0",
91
91
  "react-dom": "^18.2.0",
92
- "rollup": "^3.26.2",
92
+ "rollup": "^3.26.3",
93
93
  "rollup-plugin-dts": "^5.3.0",
94
94
  "rollup-plugin-postcss": "^4.0.2",
95
95
  "semantic-release": "^21.0.7",
96
- "storybook": "^7.0.26",
96
+ "storybook": "^7.1.0",
97
97
  "tslib": "^2.6.0",
98
98
  "typescript": "^5.1.6"
99
99
  },