reactive-bulma 2.2.1 → 2.4.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.
- package/README.md +20 -3
- package/dist/cjs/index.js +99 -38
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/BreadcrumbItem/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +1 -0
- package/dist/cjs/types/components/molecules/Breadcrumbs/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/Notification/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/index.d.ts +2 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +26 -18
- package/dist/cjs/types/interfaces/commonProps.d.ts +1 -15
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +24 -3
- package/dist/cjs/types/types/styleTypes.d.ts +2 -0
- package/dist/esm/index.js +97 -39
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/BreadcrumbItem/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +1 -0
- package/dist/esm/types/components/molecules/Breadcrumbs/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/Notification/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/index.d.ts +2 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +26 -18
- package/dist/esm/types/interfaces/commonProps.d.ts +1 -15
- package/dist/esm/types/interfaces/moleculeProps.d.ts +24 -3
- package/dist/esm/types/types/styleTypes.d.ts +2 -0
- package/dist/index.d.ts +56 -24
- package/package.json +31 -29
@@ -1,8 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { ElementProps, ComposedElementProps } from './commonProps';
|
3
3
|
import { basicColorType, columnOffsetType, columnSizeType, fixedImageSizeType, iconColorModeType, basicSizeType, textColorType, titleSizeType } from '../types/styleTypes';
|
4
4
|
import { inputTypes } from '../types/domTypes';
|
5
|
-
export interface ColumnProps extends
|
5
|
+
export interface ColumnProps extends ElementProps, React.ComponentPropsWithoutRef<'section'> {
|
6
6
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
7
7
|
children?: string | React.ReactElement | React.ReactElement[];
|
8
8
|
/** `Styling` Set column's size */
|
@@ -12,7 +12,7 @@ export interface ColumnProps extends BasicProps, React.ComponentPropsWithoutRef<
|
|
12
12
|
/** `Styling` Set if the column only will take the space it needs */
|
13
13
|
isNarrow?: boolean;
|
14
14
|
}
|
15
|
-
export interface ButtonProps extends
|
15
|
+
export interface ButtonProps extends ElementProps, React.ComponentPropsWithoutRef<'button'> {
|
16
16
|
/** `Attribute` The text will be shown in the `Button` */
|
17
17
|
text?: string;
|
18
18
|
/** `Attribute` Will disable the button */
|
@@ -38,7 +38,7 @@ export interface ButtonProps extends BasicProps, React.ComponentPropsWithoutRef<
|
|
38
38
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
39
39
|
onClick?: () => void;
|
40
40
|
}
|
41
|
-
export interface ProgressBarProps extends
|
41
|
+
export interface ProgressBarProps extends ElementProps, React.ComponentPropsWithoutRef<'progress'> {
|
42
42
|
/** `Attribute` Sets colored bar at the level against `max` value (`100` by default) */
|
43
43
|
value?: number;
|
44
44
|
/** `Attribute` Sets the entire bar length comparing with current `value` */
|
@@ -50,11 +50,11 @@ export interface ProgressBarProps extends BasicProps, React.ComponentPropsWithou
|
|
50
50
|
/** `Styling` Will change `value` for a animated loading */
|
51
51
|
isLoading?: boolean;
|
52
52
|
}
|
53
|
-
export interface BlockProps extends
|
53
|
+
export interface BlockProps extends ElementProps, React.ComponentPropsWithoutRef<'section'> {
|
54
54
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the block */
|
55
55
|
children?: string | React.ReactElement | React.ReactElement[];
|
56
56
|
}
|
57
|
-
export interface TagProps extends
|
57
|
+
export interface TagProps extends ComposedElementProps, React.ComponentPropsWithoutRef<'span'> {
|
58
58
|
/** `Attribute` `Required` The text will be shown in the `Tag` */
|
59
59
|
text: string;
|
60
60
|
/** `Attribute` Will add a delete button (for both single or addon cases) */
|
@@ -76,7 +76,7 @@ export interface TagProps extends BasicProps, React.ComponentPropsWithoutRef<'sp
|
|
76
76
|
/** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
|
77
77
|
onDeleteClick?: () => void;
|
78
78
|
}
|
79
|
-
export interface ImageProps extends
|
79
|
+
export interface ImageProps extends ComposedElementProps, React.ComponentPropsWithoutRef<'figure'> {
|
80
80
|
/** `Attribute` `Required` The image source that will be shown */
|
81
81
|
src: string;
|
82
82
|
/** `Styling` Will add round borders to image's shape */
|
@@ -84,11 +84,11 @@ export interface ImageProps extends BasicProps, React.ComponentPropsWithoutRef<'
|
|
84
84
|
/** `Styling` Sets image size based on one of fixed ratios/fixed sizes */
|
85
85
|
isRounded?: boolean;
|
86
86
|
}
|
87
|
-
export interface BoxProps extends
|
87
|
+
export interface BoxProps extends ElementProps, React.ComponentPropsWithoutRef<'section'> {
|
88
88
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the box */
|
89
89
|
children?: string | React.ReactElement | React.ReactElement[];
|
90
90
|
}
|
91
|
-
export interface TitleSectionProps extends
|
91
|
+
export interface TitleSectionProps extends ElementProps, React.ComponentPropsWithoutRef<'p'> {
|
92
92
|
/** `Attribute` Sets the text you want to show */
|
93
93
|
text: string;
|
94
94
|
/** `Styling` Set text size */
|
@@ -104,7 +104,7 @@ export interface TitleProps {
|
|
104
104
|
/** `Attribute` Subtitle title configuration object */
|
105
105
|
secondary?: TitleSectionProps;
|
106
106
|
}
|
107
|
-
export interface IconProps extends
|
107
|
+
export interface IconProps extends ComposedElementProps {
|
108
108
|
/** `Attribute` `Required` Sets the icon key work based on [Material Design icon list](https://pictogrammers.com/library/mdi/) */
|
109
109
|
iconLabel: string;
|
110
110
|
/** `Attribute` Sets the text you want to show next to the icon */
|
@@ -118,7 +118,7 @@ export interface IconProps extends BasicProps {
|
|
118
118
|
/** `Styling` Animates the icon spinning 360° */
|
119
119
|
isSpinning?: boolean;
|
120
120
|
}
|
121
|
-
export interface InputProps extends
|
121
|
+
export interface InputProps extends ElementProps {
|
122
122
|
/** `Attribute` `Required` What type of input will be used */
|
123
123
|
type: inputTypes;
|
124
124
|
/** `Attribute` The value that will be shown on the input */
|
@@ -150,7 +150,7 @@ export interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
|
150
150
|
/** `Styling` Will disable characteristic sizable property by removing its control on bottom-right corner */
|
151
151
|
isFixedSize?: boolean;
|
152
152
|
}
|
153
|
-
export interface DeleteProps extends
|
153
|
+
export interface DeleteProps extends ElementProps {
|
154
154
|
/** `Styling` Set icons's size */
|
155
155
|
size?: Exclude<basicSizeType, 'is-normal'>;
|
156
156
|
/** `Function` Click function. Alone does not nothing, but can be reused for other components */
|
@@ -161,7 +161,7 @@ export interface SelectOption {
|
|
161
161
|
name: string;
|
162
162
|
selected?: boolean;
|
163
163
|
}
|
164
|
-
export interface SelectProps extends
|
164
|
+
export interface SelectProps extends ComposedElementProps {
|
165
165
|
/** `Attribute` Indicates the options contained on the select */
|
166
166
|
options?: SelectOption[];
|
167
167
|
/** `Attribute` Indicates how many options will be shown at first glance (before looking for the whole list */
|
@@ -181,7 +181,7 @@ export interface SelectProps extends BasicProps {
|
|
181
181
|
/** `Function` Click function. Alone does not nothing, but can be reused for other components */
|
182
182
|
onClick?: () => void;
|
183
183
|
}
|
184
|
-
export interface FileProps extends
|
184
|
+
export interface FileProps extends ComposedElementProps {
|
185
185
|
/** `Attribute` The name of the file to be uploaded */
|
186
186
|
fileName?: string;
|
187
187
|
/** `Attribute` The icon displayed in file's button" */
|
@@ -201,15 +201,15 @@ export interface FileProps extends BasicProps {
|
|
201
201
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
202
202
|
onClick?: () => void;
|
203
203
|
}
|
204
|
-
export interface CheckBoxProps extends
|
204
|
+
export interface CheckBoxProps extends ComposedElementProps {
|
205
205
|
/** `Attribute` Sets checkbox's text that will be shown next to its control */
|
206
|
-
content?: string | React.ReactElement;
|
206
|
+
content?: string | React.ReactElement | React.ReactElement[];
|
207
207
|
/** `Attribute` Will disable the checkbox */
|
208
208
|
isDisabled?: boolean;
|
209
209
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
210
210
|
onChange?: () => void;
|
211
211
|
}
|
212
|
-
export interface RadioButtonItemProps extends Pick<
|
212
|
+
export interface RadioButtonItemProps extends Pick<ElementProps, 'testId' | 'style'> {
|
213
213
|
/** `Attribute` `Required` Sets checkbox's text*/
|
214
214
|
label: string;
|
215
215
|
/** `Attribute` Sets the name that will relate this checkbox with the others */
|
@@ -221,7 +221,7 @@ export interface RadioButtonItemProps extends Pick<BasicProps, 'testId' | 'style
|
|
221
221
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
222
222
|
onChange?: () => void;
|
223
223
|
}
|
224
|
-
export interface RadioButtonProps extends
|
224
|
+
export interface RadioButtonProps extends ComposedElementProps {
|
225
225
|
/** `Attribute` `Required` Indicates the options contained to be selected */
|
226
226
|
options: RadioButtonItemProps[];
|
227
227
|
/** `Attribute` `Required` Sets the name that will relate this checkbox with the others */
|
@@ -229,3 +229,11 @@ export interface RadioButtonProps extends BasicProps {
|
|
229
229
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
230
230
|
onChange?: () => void;
|
231
231
|
}
|
232
|
+
export interface BreadcrumbItemProps extends ComposedElementProps {
|
233
|
+
/** `Attribute` `Required` Indicates item text that will be shown */
|
234
|
+
text: string;
|
235
|
+
/** `Styling` Marks the item as the one where user is located (based on breadcrumb hierarchy) */
|
236
|
+
isActiveItem?: boolean;
|
237
|
+
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
238
|
+
onClick?: () => void;
|
239
|
+
}
|
@@ -1,18 +1,4 @@
|
|
1
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
2
|
export interface ContainerProps {
|
17
3
|
/** `Attribute` *For container case*. ID used to locate the element in unit test suites (like Jest) */
|
18
4
|
containerTestId?: string;
|
@@ -29,5 +15,5 @@ export interface ElementProps {
|
|
29
15
|
/** `Attribute` Custom styling applicable for specific scenarios */
|
30
16
|
style?: React.CSSProperties;
|
31
17
|
}
|
32
|
-
export interface
|
18
|
+
export interface ComposedElementProps extends ElementProps, ContainerProps {
|
33
19
|
}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
|
2
|
-
import {
|
3
|
-
import {
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ComposedElementProps, ElementProps } from './commonProps';
|
3
|
+
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps } from './atomProps';
|
4
|
+
import { basicColorType, basicSizeType, breadcrumbAlignType, breadcrumbSeparatorType, columnGapType } from '../types/styleTypes';
|
4
5
|
export interface ButtonGroupProps extends ElementProps {
|
5
6
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
6
7
|
buttonList: ButtonProps[];
|
@@ -23,3 +24,23 @@ export interface ColumnGroupProps extends ElementProps {
|
|
23
24
|
/** `Styling` Will adjust the space between the columns. In case to set null, it will remove those gaps */
|
24
25
|
gap?: columnGapType | null;
|
25
26
|
}
|
27
|
+
export interface NotificationProps extends ElementProps {
|
28
|
+
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
29
|
+
children?: string | React.ReactElement | React.ReactElement[];
|
30
|
+
/** `Atribute` Includes a `Delete` config object that will be shown */
|
31
|
+
deleteButton?: DeleteProps;
|
32
|
+
/** `Styling` Color based on bulma's color tokens */
|
33
|
+
color?: basicColorType;
|
34
|
+
/** `Styling` Will adjust the selected color with a ligther style */
|
35
|
+
isLightColor?: boolean;
|
36
|
+
}
|
37
|
+
export interface BreadcrumbsProps extends ComposedElementProps {
|
38
|
+
/** `Atribute` `Required` Array of `BreadcrumbItems` objects that will be shown */
|
39
|
+
items: BreadcrumbItemProps[];
|
40
|
+
/** `Styling` Will adjust element position on screen */
|
41
|
+
alignment?: breadcrumbAlignType | null;
|
42
|
+
/** `Styling` Will adjust element position on screen */
|
43
|
+
separator?: breadcrumbSeparatorType | null;
|
44
|
+
/** `Styling` Set button's size on bulma's size tokens */
|
45
|
+
size?: Exclude<basicSizeType, 'is-normal'>;
|
46
|
+
}
|
@@ -7,3 +7,5 @@ export type fixedImageSizeType = 'is-16x16' | 'is-24x24' | 'is-32x32' | 'is-48x4
|
|
7
7
|
export type basicSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
|
8
8
|
export type iconColorModeType = 'light' | 'dark';
|
9
9
|
export type columnGapType = 'is-0' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8';
|
10
|
+
export type breadcrumbAlignType = 'is-centered' | 'is-right';
|
11
|
+
export type breadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
|
package/dist/index.d.ts
CHANGED
@@ -1,17 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import React$1 from 'react';
|
3
3
|
|
4
|
-
interface
|
5
|
-
/** `Attribute` ID used to locate the element in unit test suites (like Jest) */
|
6
|
-
testId?: string;
|
4
|
+
interface ContainerProps {
|
7
5
|
/** `Attribute` *For container case*. ID used to locate the element in unit test suites (like Jest) */
|
8
6
|
containerTestId?: string;
|
9
|
-
/** `Attribute` Custom CSS classes, applicable for specific scenarios */
|
10
|
-
cssClasses?: string;
|
11
7
|
/** `Attribute` *For container case*. Custom CSS classes, applicable for specific scenarios */
|
12
8
|
containerCssClasses?: string;
|
13
|
-
/** `Attribute` Custom styling applicable for specific scenarios */
|
14
|
-
style?: React.CSSProperties;
|
15
9
|
/** `Attribute` *For container case*. Custom styling applicable for specific scenarios */
|
16
10
|
containerStyle?: React.CSSProperties;
|
17
11
|
}
|
@@ -23,6 +17,8 @@ interface ElementProps {
|
|
23
17
|
/** `Attribute` Custom styling applicable for specific scenarios */
|
24
18
|
style?: React.CSSProperties;
|
25
19
|
}
|
20
|
+
interface ComposedElementProps extends ElementProps, ContainerProps {
|
21
|
+
}
|
26
22
|
|
27
23
|
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
24
|
type titleSizeType = 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6';
|
@@ -32,10 +28,12 @@ type textColorType = 'has-text-white' | 'has-text-black' | 'has-text-light' | 'h
|
|
32
28
|
type basicSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
|
33
29
|
type iconColorModeType = 'light' | 'dark';
|
34
30
|
type columnGapType = 'is-0' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8';
|
31
|
+
type breadcrumbAlignType = 'is-centered' | 'is-right';
|
32
|
+
type breadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
|
35
33
|
|
36
34
|
type inputTypes = 'text' | 'password' | 'email' | 'tel';
|
37
35
|
|
38
|
-
interface ColumnProps extends
|
36
|
+
interface ColumnProps extends ElementProps, React$1.ComponentPropsWithoutRef<'section'> {
|
39
37
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
40
38
|
children?: string | React$1.ReactElement | React$1.ReactElement[];
|
41
39
|
/** `Styling` Set column's size */
|
@@ -45,7 +43,7 @@ interface ColumnProps extends BasicProps, React$1.ComponentPropsWithoutRef<'sect
|
|
45
43
|
/** `Styling` Set if the column only will take the space it needs */
|
46
44
|
isNarrow?: boolean;
|
47
45
|
}
|
48
|
-
interface ButtonProps extends
|
46
|
+
interface ButtonProps extends ElementProps, React$1.ComponentPropsWithoutRef<'button'> {
|
49
47
|
/** `Attribute` The text will be shown in the `Button` */
|
50
48
|
text?: string;
|
51
49
|
/** `Attribute` Will disable the button */
|
@@ -71,7 +69,7 @@ interface ButtonProps extends BasicProps, React$1.ComponentPropsWithoutRef<'butt
|
|
71
69
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
72
70
|
onClick?: () => void;
|
73
71
|
}
|
74
|
-
interface ProgressBarProps extends
|
72
|
+
interface ProgressBarProps extends ElementProps, React$1.ComponentPropsWithoutRef<'progress'> {
|
75
73
|
/** `Attribute` Sets colored bar at the level against `max` value (`100` by default) */
|
76
74
|
value?: number;
|
77
75
|
/** `Attribute` Sets the entire bar length comparing with current `value` */
|
@@ -83,11 +81,11 @@ interface ProgressBarProps extends BasicProps, React$1.ComponentPropsWithoutRef<
|
|
83
81
|
/** `Styling` Will change `value` for a animated loading */
|
84
82
|
isLoading?: boolean;
|
85
83
|
}
|
86
|
-
interface BlockProps extends
|
84
|
+
interface BlockProps extends ElementProps, React$1.ComponentPropsWithoutRef<'section'> {
|
87
85
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the block */
|
88
86
|
children?: string | React$1.ReactElement | React$1.ReactElement[];
|
89
87
|
}
|
90
|
-
interface TagProps extends
|
88
|
+
interface TagProps extends ComposedElementProps, React$1.ComponentPropsWithoutRef<'span'> {
|
91
89
|
/** `Attribute` `Required` The text will be shown in the `Tag` */
|
92
90
|
text: string;
|
93
91
|
/** `Attribute` Will add a delete button (for both single or addon cases) */
|
@@ -109,11 +107,11 @@ interface TagProps extends BasicProps, React$1.ComponentPropsWithoutRef<'span'>
|
|
109
107
|
/** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
|
110
108
|
onDeleteClick?: () => void;
|
111
109
|
}
|
112
|
-
interface BoxProps extends
|
110
|
+
interface BoxProps extends ElementProps, React$1.ComponentPropsWithoutRef<'section'> {
|
113
111
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the box */
|
114
112
|
children?: string | React$1.ReactElement | React$1.ReactElement[];
|
115
113
|
}
|
116
|
-
interface TitleSectionProps extends
|
114
|
+
interface TitleSectionProps extends ElementProps, React$1.ComponentPropsWithoutRef<'p'> {
|
117
115
|
/** `Attribute` Sets the text you want to show */
|
118
116
|
text: string;
|
119
117
|
/** `Styling` Set text size */
|
@@ -129,7 +127,7 @@ interface TitleProps {
|
|
129
127
|
/** `Attribute` Subtitle title configuration object */
|
130
128
|
secondary?: TitleSectionProps;
|
131
129
|
}
|
132
|
-
interface IconProps extends
|
130
|
+
interface IconProps extends ComposedElementProps {
|
133
131
|
/** `Attribute` `Required` Sets the icon key work based on [Material Design icon list](https://pictogrammers.com/library/mdi/) */
|
134
132
|
iconLabel: string;
|
135
133
|
/** `Attribute` Sets the text you want to show next to the icon */
|
@@ -143,7 +141,7 @@ interface IconProps extends BasicProps {
|
|
143
141
|
/** `Styling` Animates the icon spinning 360° */
|
144
142
|
isSpinning?: boolean;
|
145
143
|
}
|
146
|
-
interface InputProps extends
|
144
|
+
interface InputProps extends ElementProps {
|
147
145
|
/** `Attribute` `Required` What type of input will be used */
|
148
146
|
type: inputTypes;
|
149
147
|
/** `Attribute` The value that will be shown on the input */
|
@@ -175,7 +173,7 @@ interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
|
175
173
|
/** `Styling` Will disable characteristic sizable property by removing its control on bottom-right corner */
|
176
174
|
isFixedSize?: boolean;
|
177
175
|
}
|
178
|
-
interface DeleteProps extends
|
176
|
+
interface DeleteProps extends ElementProps {
|
179
177
|
/** `Styling` Set icons's size */
|
180
178
|
size?: Exclude<basicSizeType, 'is-normal'>;
|
181
179
|
/** `Function` Click function. Alone does not nothing, but can be reused for other components */
|
@@ -186,7 +184,7 @@ interface SelectOption {
|
|
186
184
|
name: string;
|
187
185
|
selected?: boolean;
|
188
186
|
}
|
189
|
-
interface SelectProps extends
|
187
|
+
interface SelectProps extends ComposedElementProps {
|
190
188
|
/** `Attribute` Indicates the options contained on the select */
|
191
189
|
options?: SelectOption[];
|
192
190
|
/** `Attribute` Indicates how many options will be shown at first glance (before looking for the whole list */
|
@@ -206,7 +204,7 @@ interface SelectProps extends BasicProps {
|
|
206
204
|
/** `Function` Click function. Alone does not nothing, but can be reused for other components */
|
207
205
|
onClick?: () => void;
|
208
206
|
}
|
209
|
-
interface FileProps extends
|
207
|
+
interface FileProps extends ComposedElementProps {
|
210
208
|
/** `Attribute` The name of the file to be uploaded */
|
211
209
|
fileName?: string;
|
212
210
|
/** `Attribute` The icon displayed in file's button" */
|
@@ -226,15 +224,15 @@ interface FileProps extends BasicProps {
|
|
226
224
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
227
225
|
onClick?: () => void;
|
228
226
|
}
|
229
|
-
interface CheckBoxProps extends
|
227
|
+
interface CheckBoxProps extends ComposedElementProps {
|
230
228
|
/** `Attribute` Sets checkbox's text that will be shown next to its control */
|
231
|
-
content?: string | React$1.ReactElement;
|
229
|
+
content?: string | React$1.ReactElement | React$1.ReactElement[];
|
232
230
|
/** `Attribute` Will disable the checkbox */
|
233
231
|
isDisabled?: boolean;
|
234
232
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
235
233
|
onChange?: () => void;
|
236
234
|
}
|
237
|
-
interface RadioButtonItemProps extends Pick<
|
235
|
+
interface RadioButtonItemProps extends Pick<ElementProps, 'testId' | 'style'> {
|
238
236
|
/** `Attribute` `Required` Sets checkbox's text*/
|
239
237
|
label: string;
|
240
238
|
/** `Attribute` Sets the name that will relate this checkbox with the others */
|
@@ -246,7 +244,7 @@ interface RadioButtonItemProps extends Pick<BasicProps, 'testId' | 'style'> {
|
|
246
244
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
247
245
|
onChange?: () => void;
|
248
246
|
}
|
249
|
-
interface RadioButtonProps extends
|
247
|
+
interface RadioButtonProps extends ComposedElementProps {
|
250
248
|
/** `Attribute` `Required` Indicates the options contained to be selected */
|
251
249
|
options: RadioButtonItemProps[];
|
252
250
|
/** `Attribute` `Required` Sets the name that will relate this checkbox with the others */
|
@@ -254,6 +252,14 @@ interface RadioButtonProps extends BasicProps {
|
|
254
252
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
255
253
|
onChange?: () => void;
|
256
254
|
}
|
255
|
+
interface BreadcrumbItemProps extends ComposedElementProps {
|
256
|
+
/** `Attribute` `Required` Indicates item text that will be shown */
|
257
|
+
text: string;
|
258
|
+
/** `Styling` Marks the item as the one where user is located (based on breadcrumb hierarchy) */
|
259
|
+
isActiveItem?: boolean;
|
260
|
+
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
261
|
+
onClick?: () => void;
|
262
|
+
}
|
257
263
|
|
258
264
|
declare const Button: React$1.FC<ButtonProps>;
|
259
265
|
|
@@ -285,6 +291,8 @@ declare const CheckBox: React$1.FC<CheckBoxProps>;
|
|
285
291
|
|
286
292
|
declare const RadioButton: React$1.FC<RadioButtonProps>;
|
287
293
|
|
294
|
+
declare const BreadcrumbItem: React$1.FC<BreadcrumbItemProps>;
|
295
|
+
|
288
296
|
interface ButtonGroupProps extends ElementProps {
|
289
297
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
290
298
|
buttonList: ButtonProps[];
|
@@ -307,9 +315,33 @@ interface ColumnGroupProps extends ElementProps {
|
|
307
315
|
/** `Styling` Will adjust the space between the columns. In case to set null, it will remove those gaps */
|
308
316
|
gap?: columnGapType | null;
|
309
317
|
}
|
318
|
+
interface NotificationProps extends ElementProps {
|
319
|
+
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
320
|
+
children?: string | React.ReactElement | React.ReactElement[];
|
321
|
+
/** `Atribute` Includes a `Delete` config object that will be shown */
|
322
|
+
deleteButton?: DeleteProps;
|
323
|
+
/** `Styling` Color based on bulma's color tokens */
|
324
|
+
color?: basicColorType;
|
325
|
+
/** `Styling` Will adjust the selected color with a ligther style */
|
326
|
+
isLightColor?: boolean;
|
327
|
+
}
|
328
|
+
interface BreadcrumbsProps extends ComposedElementProps {
|
329
|
+
/** `Atribute` `Required` Array of `BreadcrumbItems` objects that will be shown */
|
330
|
+
items: BreadcrumbItemProps[];
|
331
|
+
/** `Styling` Will adjust element position on screen */
|
332
|
+
alignment?: breadcrumbAlignType | null;
|
333
|
+
/** `Styling` Will adjust element position on screen */
|
334
|
+
separator?: breadcrumbSeparatorType | null;
|
335
|
+
/** `Styling` Set button's size on bulma's size tokens */
|
336
|
+
size?: Exclude<basicSizeType, 'is-normal'>;
|
337
|
+
}
|
310
338
|
|
311
339
|
declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
|
312
340
|
|
313
341
|
declare const ColumnGroup: React$1.FC<ColumnGroupProps>;
|
314
342
|
|
315
|
-
|
343
|
+
declare const Notification: React$1.FC<NotificationProps>;
|
344
|
+
|
345
|
+
declare const Breadcrumbs: React$1.FC<BreadcrumbsProps>;
|
346
|
+
|
347
|
+
export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, File, Icon, Input, Notification, ProgressBar, RadioButton, Select, Tag, TextArea, Title };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "reactive-bulma",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.4.0",
|
4
4
|
"description": "A component library based on React, Bulma, Typescript and Rollup",
|
5
5
|
"keywords": [
|
6
6
|
"typescript",
|
@@ -44,58 +44,60 @@
|
|
44
44
|
"prepare": "npm run build",
|
45
45
|
"build": "rollup -c --bundleConfigAsCjs",
|
46
46
|
"build:storybook": "storybook build",
|
47
|
-
"semantic-release": "semantic-release"
|
47
|
+
"semantic-release": "semantic-release",
|
48
|
+
"create": "hygen component new"
|
48
49
|
},
|
49
50
|
"devDependencies": {
|
50
|
-
"@babel/core": "^7.23.
|
51
|
-
"@babel/preset-env": "^7.
|
51
|
+
"@babel/core": "^7.23.2",
|
52
|
+
"@babel/preset-env": "^7.23.2",
|
52
53
|
"@babel/preset-react": "^7.22.15",
|
53
|
-
"@babel/preset-typescript": "^7.23.
|
54
|
-
"@mdi/font": "^7.
|
55
|
-
"@rollup/plugin-commonjs": "^25.0.
|
56
|
-
"@rollup/plugin-node-resolve": "^15.2.
|
57
|
-
"@rollup/plugin-typescript": "^11.1.
|
54
|
+
"@babel/preset-typescript": "^7.23.2",
|
55
|
+
"@mdi/font": "^7.3.67",
|
56
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
57
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
58
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
58
59
|
"@semantic-release/changelog": "^6.0.3",
|
59
60
|
"@semantic-release/commit-analyzer": "^11.0.0",
|
60
61
|
"@semantic-release/exec": "^6.0.3",
|
61
62
|
"@semantic-release/git": "^10.0.1",
|
62
|
-
"@semantic-release/github": "^9.
|
63
|
+
"@semantic-release/github": "^9.2.1",
|
63
64
|
"@semantic-release/npm": "^11.0.0",
|
64
65
|
"@semantic-release/release-notes-generator": "^12.0.0",
|
65
|
-
"@storybook/addon-actions": "^7.4.
|
66
|
-
"@storybook/addon-essentials": "^7.4.
|
67
|
-
"@storybook/addon-interactions": "^7.4.
|
68
|
-
"@storybook/addon-links": "^7.4.
|
69
|
-
"@storybook/addon-mdx-gfm": "^7.4.
|
70
|
-
"@storybook/cli": "^7.4.
|
71
|
-
"@storybook/react": "^7.4.
|
72
|
-
"@storybook/react-webpack5": "^7.4.
|
73
|
-
"@storybook/testing-library": "^0.2.
|
74
|
-
"@testing-library/jest-dom": "^6.1.
|
66
|
+
"@storybook/addon-actions": "^7.4.6",
|
67
|
+
"@storybook/addon-essentials": "^7.4.6",
|
68
|
+
"@storybook/addon-interactions": "^7.4.6",
|
69
|
+
"@storybook/addon-links": "^7.4.6",
|
70
|
+
"@storybook/addon-mdx-gfm": "^7.4.6",
|
71
|
+
"@storybook/cli": "^7.4.6",
|
72
|
+
"@storybook/react": "^7.4.6",
|
73
|
+
"@storybook/react-webpack5": "^7.4.6",
|
74
|
+
"@storybook/testing-library": "^0.2.2",
|
75
|
+
"@testing-library/jest-dom": "^6.1.4",
|
75
76
|
"@testing-library/react": "^14.0.0",
|
76
77
|
"@types/jest": "^29.5.5",
|
77
|
-
"@types/react": "^18.2.
|
78
|
-
"@typescript-eslint/eslint-plugin": "^6.7.
|
79
|
-
"@typescript-eslint/parser": "^6.7.
|
78
|
+
"@types/react": "^18.2.28",
|
79
|
+
"@typescript-eslint/eslint-plugin": "^6.7.5",
|
80
|
+
"@typescript-eslint/parser": "^6.7.5",
|
80
81
|
"babel-jest": "^29.7.0",
|
81
82
|
"babel-loader": "^9.1.3",
|
82
83
|
"bulma": "^0.9.4",
|
83
|
-
"eslint": "^8.
|
84
|
+
"eslint": "^8.51.0",
|
84
85
|
"eslint-config-prettier": "^9.0.0",
|
85
86
|
"eslint-plugin-react": "^7.33.2",
|
86
87
|
"husky": "^8.0.3",
|
88
|
+
"hygen": "^6.2.11",
|
87
89
|
"jest": "^29.7.0",
|
88
90
|
"jest-environment-jsdom": "^29.7.0",
|
89
|
-
"lint-staged": "^
|
90
|
-
"postcss": "^8.4.
|
91
|
+
"lint-staged": "^15.0.1",
|
92
|
+
"postcss": "^8.4.31",
|
91
93
|
"prettier": "^3.0.3",
|
92
94
|
"react": "^18.2.0",
|
93
95
|
"react-dom": "^18.2.0",
|
94
|
-
"rollup": "^
|
95
|
-
"rollup-plugin-dts": "^6.0
|
96
|
+
"rollup": "^4.1.4",
|
97
|
+
"rollup-plugin-dts": "^6.1.0",
|
96
98
|
"rollup-plugin-postcss": "^4.0.2",
|
97
99
|
"semantic-release": "^22.0.5",
|
98
|
-
"storybook": "^7.4.
|
100
|
+
"storybook": "^7.4.6",
|
99
101
|
"tslib": "^2.6.2",
|
100
102
|
"typescript": "^5.2.2"
|
101
103
|
},
|