reactive-bulma 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ButtonGroupProps } from '../../../interfaces/moleculeProps';
3
+ declare const ButtonGroup: React.FC<ButtonGroupProps>;
4
+ export default ButtonGroup;
@@ -0,0 +1 @@
1
+ export { default as ButtonGroup } from './ButtonGroup';
@@ -1,3 +1,4 @@
1
1
  import '../node_modules/bulma/css/bulma.min.css';
2
2
  import '../node_modules/@mdi/font/css/materialdesignicons.min.css';
3
3
  export * from './components/atoms';
4
+ export * from './components/molecules';
@@ -1,20 +1,7 @@
1
1
  import React from 'react';
2
+ import { BasicProps } from './commonProps';
2
3
  import { basicColorType, columnOffsetType, columnSizeType, fixedImageSizeType, iconColorModeType, basicSizeType, textColorType, titleSizeType } from '../types/styleTypes';
3
4
  import { inputTypes } from '../types/domTypes';
4
- interface BasicProps {
5
- /** `Attribute` ID used to locate the element in unit test suites (like Jest) */
6
- testId?: string;
7
- /** `Attribute` *For container case*. ID used to locate the element in unit test suites (like Jest) */
8
- containerTestId?: string;
9
- /** `Attribute` Custom CSS classes, applicable for specific scenarios */
10
- cssClasses?: string;
11
- /** `Attribute` *For container case*. Custom CSS classes, applicable for specific scenarios */
12
- containerCssClasses?: string;
13
- /** `Attribute` Custom styling applicable for specific scenarios */
14
- style?: React.CSSProperties;
15
- /** `Attribute` *For container case*. Custom styling applicable for specific scenarios */
16
- containerStyle?: React.CSSProperties;
17
- }
18
5
  export interface ColumnProps extends BasicProps, React.ComponentPropsWithoutRef<'section'> {
19
6
  /** `Attribute` Reffers to the component or array of components that will be shown inside the column */
20
7
  children?: string | React.ReactElement | React.ReactElement[];
@@ -44,6 +31,8 @@ export interface ButtonProps extends BasicProps, React.ComponentPropsWithoutRef<
44
31
  isLoading?: boolean;
45
32
  /** `Styling` Similar to `isDisabled`, but will remove any color style */
46
33
  isStatic?: boolean;
34
+ /** `Styling` Sets the button style when a User selects it (useful for an attached `ButtonGroup`) */
35
+ isSelected?: boolean;
47
36
  /** `Styling` Set button's size on bulma's size tokens */
48
37
  size?: basicSizeType;
49
38
  /** `Function` Click function, alone does not nothing, but can be reused for other components */
@@ -240,4 +229,3 @@ export interface RadioButtonProps extends BasicProps {
240
229
  /** `Function` Click function, alone does not nothing, but can be reused for other components */
241
230
  onChange?: () => void;
242
231
  }
243
- export {};
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ export interface BasicProps {
3
+ /** `Attribute` ID used to locate the element in unit test suites (like Jest) */
4
+ testId?: string;
5
+ /** `Attribute` *For container case*. ID used to locate the element in unit test suites (like Jest) */
6
+ containerTestId?: string;
7
+ /** `Attribute` Custom CSS classes, applicable for specific scenarios */
8
+ cssClasses?: string;
9
+ /** `Attribute` *For container case*. Custom CSS classes, applicable for specific scenarios */
10
+ containerCssClasses?: string;
11
+ /** `Attribute` Custom styling applicable for specific scenarios */
12
+ style?: React.CSSProperties;
13
+ /** `Attribute` *For container case*. Custom styling applicable for specific scenarios */
14
+ containerStyle?: React.CSSProperties;
15
+ }
16
+ export interface ContainerProps {
17
+ /** `Attribute` *For container case*. ID used to locate the element in unit test suites (like Jest) */
18
+ containerTestId?: string;
19
+ /** `Attribute` *For container case*. Custom CSS classes, applicable for specific scenarios */
20
+ containerCssClasses?: string;
21
+ /** `Attribute` *For container case*. Custom styling applicable for specific scenarios */
22
+ containerStyle?: React.CSSProperties;
23
+ }
24
+ export interface ElementProps {
25
+ /** `Attribute` ID used to locate the element in unit test suites (like Jest) */
26
+ testId?: string;
27
+ /** `Attribute` Custom CSS classes, applicable for specific scenarios */
28
+ cssClasses?: string;
29
+ /** `Attribute` Custom styling applicable for specific scenarios */
30
+ style?: React.CSSProperties;
31
+ }
32
+ export interface ComponentProps extends BasicProps, ElementProps {
33
+ }
@@ -0,0 +1,10 @@
1
+ import { ElementProps } from './commonProps';
2
+ import { ButtonProps } from './atomProps';
3
+ export interface ButtonGroupProps extends ElementProps {
4
+ /** `Atribute` Array of button objects that will be shown */
5
+ buttonList: ButtonProps[];
6
+ /** `Styling` Will group the list of buttonList in a single line */
7
+ isAttached?: boolean;
8
+ /** `Styling` Sets group position on the container */
9
+ position?: 'left' | 'centered' | 'right';
10
+ }
package/dist/index.d.ts CHANGED
@@ -1,14 +1,5 @@
1
- import React from 'react';
2
-
3
- type columnSizeType = 'is-three-quarters' | 'is-two-thirds' | 'is-half' | 'is-one-third' | 'is-one-quarter' | 'is-full' | 'is-four-fifths' | 'is-three-fifths' | 'is-two-fifths' | 'is-one-fifth' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8' | 'is-9' | 'is-10' | 'is-11' | 'is-12';
4
- type titleSizeType = 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6';
5
- type columnOffsetType = 'is-offset-1' | 'is-offset-2' | 'is-offset-3' | 'is-offset-4' | 'is-offset-5' | 'is-offset-6' | 'is-offset-7' | 'is-offset-8' | 'is-offset-9' | 'is-offset-10' | 'is-offset-11' | 'is-offset-12';
6
- type basicColorType = 'is-white' | 'is-light' | 'is-dark' | 'is-black' | 'is-text' | 'is-ghost' | 'is-primary' | 'is-link' | 'is-info' | 'is-success' | 'is-warning' | 'is-danger';
7
- type textColorType = 'has-text-white' | 'has-text-black' | 'has-text-light' | 'has-text-dark' | 'has-text-primary' | 'has-text-link' | 'has-text-info' | 'has-text-success' | 'has-text-warning' | 'has-text-danger';
8
- type basicSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
9
- type iconColorModeType = 'light' | 'dark';
10
-
11
- type inputTypes = 'text' | 'password' | 'email' | 'tel';
1
+ /// <reference types="react" />
2
+ import React$1 from 'react';
12
3
 
13
4
  interface BasicProps {
14
5
  /** `Attribute` ID used to locate the element in unit test suites (like Jest) */
@@ -24,9 +15,28 @@ interface BasicProps {
24
15
  /** `Attribute` *For container case*. Custom styling applicable for specific scenarios */
25
16
  containerStyle?: React.CSSProperties;
26
17
  }
27
- interface ColumnProps extends BasicProps, React.ComponentPropsWithoutRef<'section'> {
18
+ interface ElementProps {
19
+ /** `Attribute` ID used to locate the element in unit test suites (like Jest) */
20
+ testId?: string;
21
+ /** `Attribute` Custom CSS classes, applicable for specific scenarios */
22
+ cssClasses?: string;
23
+ /** `Attribute` Custom styling applicable for specific scenarios */
24
+ style?: React.CSSProperties;
25
+ }
26
+
27
+ type columnSizeType = 'is-three-quarters' | 'is-two-thirds' | 'is-half' | 'is-one-third' | 'is-one-quarter' | 'is-full' | 'is-four-fifths' | 'is-three-fifths' | 'is-two-fifths' | 'is-one-fifth' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8' | 'is-9' | 'is-10' | 'is-11' | 'is-12';
28
+ type titleSizeType = 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6';
29
+ type columnOffsetType = 'is-offset-1' | 'is-offset-2' | 'is-offset-3' | 'is-offset-4' | 'is-offset-5' | 'is-offset-6' | 'is-offset-7' | 'is-offset-8' | 'is-offset-9' | 'is-offset-10' | 'is-offset-11' | 'is-offset-12';
30
+ type basicColorType = 'is-white' | 'is-light' | 'is-dark' | 'is-black' | 'is-text' | 'is-ghost' | 'is-primary' | 'is-link' | 'is-info' | 'is-success' | 'is-warning' | 'is-danger';
31
+ type textColorType = 'has-text-white' | 'has-text-black' | 'has-text-light' | 'has-text-dark' | 'has-text-primary' | 'has-text-link' | 'has-text-info' | 'has-text-success' | 'has-text-warning' | 'has-text-danger';
32
+ type basicSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
33
+ type iconColorModeType = 'light' | 'dark';
34
+
35
+ type inputTypes = 'text' | 'password' | 'email' | 'tel';
36
+
37
+ interface ColumnProps extends BasicProps, React$1.ComponentPropsWithoutRef<'section'> {
28
38
  /** `Attribute` Reffers to the component or array of components that will be shown inside the column */
29
- children?: string | React.ReactElement | React.ReactElement[];
39
+ children?: string | React$1.ReactElement | React$1.ReactElement[];
30
40
  /** `Styling` Set column's size */
31
41
  size?: columnSizeType;
32
42
  /** `Styling` Set column's offset (moving it as you set its size */
@@ -34,7 +44,7 @@ interface ColumnProps extends BasicProps, React.ComponentPropsWithoutRef<'sectio
34
44
  /** `Styling` Set if the column only will take the space it needs */
35
45
  isNarrow?: boolean;
36
46
  }
37
- interface ButtonProps extends BasicProps, React.ComponentPropsWithoutRef<'button'> {
47
+ interface ButtonProps extends BasicProps, React$1.ComponentPropsWithoutRef<'button'> {
38
48
  /** `Attribute` The text will be shown in the `Button` */
39
49
  text?: string;
40
50
  /** `Attribute` Will disable the button */
@@ -53,12 +63,14 @@ interface ButtonProps extends BasicProps, React.ComponentPropsWithoutRef<'button
53
63
  isLoading?: boolean;
54
64
  /** `Styling` Similar to `isDisabled`, but will remove any color style */
55
65
  isStatic?: boolean;
66
+ /** `Styling` Sets the button style when a User selects it (useful for an attached `ButtonGroup`) */
67
+ isSelected?: boolean;
56
68
  /** `Styling` Set button's size on bulma's size tokens */
57
69
  size?: basicSizeType;
58
70
  /** `Function` Click function, alone does not nothing, but can be reused for other components */
59
71
  onClick?: () => void;
60
72
  }
61
- interface ProgressBarProps extends BasicProps, React.ComponentPropsWithoutRef<'progress'> {
73
+ interface ProgressBarProps extends BasicProps, React$1.ComponentPropsWithoutRef<'progress'> {
62
74
  /** `Attribute` Sets colored bar at the level against `max` value (`100` by default) */
63
75
  value?: number;
64
76
  /** `Attribute` Sets the entire bar length comparing with current `value` */
@@ -70,11 +82,11 @@ interface ProgressBarProps extends BasicProps, React.ComponentPropsWithoutRef<'p
70
82
  /** `Styling` Will change `value` for a animated loading */
71
83
  isLoading?: boolean;
72
84
  }
73
- interface BlockProps extends BasicProps, React.ComponentPropsWithoutRef<'section'> {
85
+ interface BlockProps extends BasicProps, React$1.ComponentPropsWithoutRef<'section'> {
74
86
  /** `Attribute` Reffers to the component or array of components that will be shown inside the block */
75
- children?: string | React.ReactElement | React.ReactElement[];
87
+ children?: string | React$1.ReactElement | React$1.ReactElement[];
76
88
  }
77
- interface TagProps extends BasicProps, React.ComponentPropsWithoutRef<'span'> {
89
+ interface TagProps extends BasicProps, React$1.ComponentPropsWithoutRef<'span'> {
78
90
  /** `Attribute` `Required` The text will be shown in the `Tag` */
79
91
  text: string;
80
92
  /** `Attribute` Will add a delete button (for both single or addon cases) */
@@ -96,11 +108,11 @@ interface TagProps extends BasicProps, React.ComponentPropsWithoutRef<'span'> {
96
108
  /** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
97
109
  onDeleteClick?: () => void;
98
110
  }
99
- interface BoxProps extends BasicProps, React.ComponentPropsWithoutRef<'section'> {
111
+ interface BoxProps extends BasicProps, React$1.ComponentPropsWithoutRef<'section'> {
100
112
  /** `Attribute` Reffers to the component or array of components that will be shown inside the box */
101
- children?: string | React.ReactElement | React.ReactElement[];
113
+ children?: string | React$1.ReactElement | React$1.ReactElement[];
102
114
  }
103
- interface TitleSectionProps extends BasicProps, React.ComponentPropsWithoutRef<'p'> {
115
+ interface TitleSectionProps extends BasicProps, React$1.ComponentPropsWithoutRef<'p'> {
104
116
  /** `Attribute` Sets the text you want to show */
105
117
  text: string;
106
118
  /** `Styling` Set text size */
@@ -215,7 +227,7 @@ interface FileProps extends BasicProps {
215
227
  }
216
228
  interface CheckBoxProps extends BasicProps {
217
229
  /** `Attribute` Sets checkbox's text that will be shown next to its control */
218
- content?: string | React.ReactElement;
230
+ content?: string | React$1.ReactElement;
219
231
  /** `Attribute` Will disable the checkbox */
220
232
  isDisabled?: boolean;
221
233
  /** `Function` Click function, alone does not nothing, but can be reused for other components */
@@ -242,34 +254,45 @@ interface RadioButtonProps extends BasicProps {
242
254
  onChange?: () => void;
243
255
  }
244
256
 
245
- declare const Button: React.FC<ButtonProps>;
257
+ declare const Button: React$1.FC<ButtonProps>;
246
258
 
247
- declare const Column: React.FC<ColumnProps>;
259
+ declare const Column: React$1.FC<ColumnProps>;
248
260
 
249
- declare const ProgressBar: React.FC<ProgressBarProps>;
261
+ declare const ProgressBar: React$1.FC<ProgressBarProps>;
250
262
 
251
- declare const Block: React.FC<BlockProps>;
263
+ declare const Block: React$1.FC<BlockProps>;
252
264
 
253
- declare const Tag: React.FC<TagProps>;
265
+ declare const Tag: React$1.FC<TagProps>;
254
266
 
255
- declare const Box: React.FC<BoxProps>;
267
+ declare const Box: React$1.FC<BoxProps>;
256
268
 
257
- declare const Title: React.FC<TitleProps>;
269
+ declare const Title: React$1.FC<TitleProps>;
258
270
 
259
- declare const Icon: React.FC<IconProps>;
271
+ declare const Icon: React$1.FC<IconProps>;
260
272
 
261
- declare const Input: React.FC<InputProps>;
273
+ declare const Input: React$1.FC<InputProps>;
262
274
 
263
- declare const TextArea: React.FC<TextAreaProps>;
275
+ declare const TextArea: React$1.FC<TextAreaProps>;
264
276
 
265
- declare const Delete: React.FC<DeleteProps>;
277
+ declare const Delete: React$1.FC<DeleteProps>;
266
278
 
267
- declare const Select: React.FC<SelectProps>;
279
+ declare const Select: React$1.FC<SelectProps>;
268
280
 
269
- declare const File: React.FC<FileProps>;
281
+ declare const File: React$1.FC<FileProps>;
270
282
 
271
- declare const CheckBox: React.FC<CheckBoxProps>;
283
+ declare const CheckBox: React$1.FC<CheckBoxProps>;
284
+
285
+ declare const RadioButton: React$1.FC<RadioButtonProps>;
286
+
287
+ interface ButtonGroupProps extends ElementProps {
288
+ /** `Atribute` Array of button objects that will be shown */
289
+ buttonList: ButtonProps[];
290
+ /** `Styling` Will group the list of buttonList in a single line */
291
+ isAttached?: boolean;
292
+ /** `Styling` Sets group position on the container */
293
+ position?: 'left' | 'centered' | 'right';
294
+ }
272
295
 
273
- declare const RadioButton: React.FC<RadioButtonProps>;
296
+ declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
274
297
 
275
- export { Block, Box, Button, CheckBox as Checkbox, Column, Delete, File, Icon, Input, ProgressBar, RadioButton, Select, Tag, TextArea, Title };
298
+ export { Block, Box, Button, ButtonGroup, CheckBox as Checkbox, Column, Delete, File, Icon, Input, ProgressBar, RadioButton, Select, Tag, TextArea, Title };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactive-bulma",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "A component library based on React, Bulma, Typescript and Rollup",
5
5
  "keywords": [
6
6
  "typescript",
@@ -47,57 +47,57 @@
47
47
  "semantic-release": "semantic-release"
48
48
  },
49
49
  "devDependencies": {
50
- "@babel/core": "^7.22.9",
51
- "@babel/preset-env": "^7.22.9",
52
- "@babel/preset-react": "^7.22.5",
53
- "@babel/preset-typescript": "^7.22.5",
50
+ "@babel/core": "^7.22.20",
51
+ "@babel/preset-env": "^7.22.20",
52
+ "@babel/preset-react": "^7.22.15",
53
+ "@babel/preset-typescript": "^7.22.15",
54
54
  "@mdi/font": "^7.2.96",
55
- "@rollup/plugin-commonjs": "^25.0.3",
56
- "@rollup/plugin-node-resolve": "^15.1.0",
57
- "@rollup/plugin-typescript": "^11.1.2",
55
+ "@rollup/plugin-commonjs": "^25.0.4",
56
+ "@rollup/plugin-node-resolve": "^15.2.1",
57
+ "@rollup/plugin-typescript": "^11.1.3",
58
58
  "@semantic-release/changelog": "^6.0.3",
59
- "@semantic-release/commit-analyzer": "^10.0.1",
59
+ "@semantic-release/commit-analyzer": "^11.0.0",
60
60
  "@semantic-release/exec": "^6.0.3",
61
61
  "@semantic-release/git": "^10.0.1",
62
- "@semantic-release/github": "^9.0.4",
63
- "@semantic-release/npm": "^10.0.4",
64
- "@semantic-release/release-notes-generator": "^11.0.4",
65
- "@storybook/addon-actions": "^7.2.1",
66
- "@storybook/addon-essentials": "^7.2.1",
67
- "@storybook/addon-interactions": "^7.2.1",
68
- "@storybook/addon-links": "^7.2.1",
69
- "@storybook/addon-mdx-gfm": "^7.2.1",
70
- "@storybook/cli": "^7.2.1",
71
- "@storybook/react": "^7.2.1",
72
- "@storybook/react-webpack5": "^7.2.1",
73
- "@storybook/testing-library": "^0.2.0",
74
- "@testing-library/jest-dom": "^5.17.0",
62
+ "@semantic-release/github": "^9.0.6",
63
+ "@semantic-release/npm": "^11.0.0",
64
+ "@semantic-release/release-notes-generator": "^12.0.0",
65
+ "@storybook/addon-actions": "^7.4.2",
66
+ "@storybook/addon-essentials": "^7.4.2",
67
+ "@storybook/addon-interactions": "^7.4.2",
68
+ "@storybook/addon-links": "^7.4.2",
69
+ "@storybook/addon-mdx-gfm": "^7.4.2",
70
+ "@storybook/cli": "^7.4.2",
71
+ "@storybook/react": "^7.4.2",
72
+ "@storybook/react-webpack5": "^7.4.2",
73
+ "@storybook/testing-library": "^0.2.1",
74
+ "@testing-library/jest-dom": "^6.1.3",
75
75
  "@testing-library/react": "^14.0.0",
76
- "@types/jest": "^29.5.3",
77
- "@types/react": "^18.2.18",
78
- "@typescript-eslint/eslint-plugin": "^6.2.1",
79
- "@typescript-eslint/parser": "^6.2.1",
80
- "babel-jest": "^29.6.2",
76
+ "@types/jest": "^29.5.5",
77
+ "@types/react": "^18.2.22",
78
+ "@typescript-eslint/eslint-plugin": "^6.7.2",
79
+ "@typescript-eslint/parser": "^6.7.2",
80
+ "babel-jest": "^29.7.0",
81
81
  "babel-loader": "^9.1.3",
82
82
  "bulma": "^0.9.4",
83
- "eslint": "^8.46.0",
84
- "eslint-config-prettier": "^8.10.0",
85
- "eslint-plugin-react": "^7.33.1",
83
+ "eslint": "^8.49.0",
84
+ "eslint-config-prettier": "^9.0.0",
85
+ "eslint-plugin-react": "^7.33.2",
86
86
  "husky": "^8.0.3",
87
- "jest": "^29.6.2",
88
- "jest-environment-jsdom": "^29.6.2",
89
- "lint-staged": "^13.2.3",
90
- "postcss": "^8.4.27",
91
- "prettier": "^3.0.1",
87
+ "jest": "^29.7.0",
88
+ "jest-environment-jsdom": "^29.7.0",
89
+ "lint-staged": "^14.0.1",
90
+ "postcss": "^8.4.29",
91
+ "prettier": "^3.0.3",
92
92
  "react": "^18.2.0",
93
93
  "react-dom": "^18.2.0",
94
- "rollup": "^3.27.1",
95
- "rollup-plugin-dts": "^5.3.1",
94
+ "rollup": "^3.29.2",
95
+ "rollup-plugin-dts": "^6.0.2",
96
96
  "rollup-plugin-postcss": "^4.0.2",
97
- "semantic-release": "^21.0.7",
98
- "storybook": "^7.2.1",
99
- "tslib": "^2.6.1",
100
- "typescript": "^5.1.6"
97
+ "semantic-release": "^22.0.0",
98
+ "storybook": "^7.4.2",
99
+ "tslib": "^2.6.2",
100
+ "typescript": "^5.2.2"
101
101
  },
102
102
  "lint-staged": {
103
103
  "src/**/*.(ts|tsx)": [