reactive-bulma 2.13.0 → 2.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/organisms/Hero/index.d.ts +4 -0
- package/dist/cjs/types/components/organisms/index.d.ts +1 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +28 -27
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +18 -18
- package/dist/cjs/types/interfaces/organismProps.d.ts +16 -3
- package/dist/cjs/types/types/componentEnums.d.ts +3 -0
- package/dist/cjs/types/types/styleTypes.d.ts +15 -15
- package/dist/esm/index.js +10 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/organisms/Hero/index.d.ts +4 -0
- package/dist/esm/types/components/organisms/index.d.ts +1 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +28 -27
- package/dist/esm/types/interfaces/moleculeProps.d.ts +18 -18
- package/dist/esm/types/interfaces/organismProps.d.ts +16 -3
- package/dist/esm/types/types/componentEnums.d.ts +3 -0
- package/dist/esm/types/types/styleTypes.d.ts +15 -15
- package/dist/index.d.ts +77 -60
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -24,33 +24,36 @@ interface ClickeableProps {
|
|
24
24
|
onClick?: () => void;
|
25
25
|
}
|
26
26
|
|
27
|
-
type
|
28
|
-
type
|
29
|
-
type
|
30
|
-
type
|
31
|
-
type
|
32
|
-
type
|
33
|
-
type
|
34
|
-
type
|
35
|
-
type
|
36
|
-
type
|
37
|
-
type
|
38
|
-
type
|
39
|
-
type
|
40
|
-
type
|
41
|
-
type
|
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 FixedImageSizeType = 'is-16x16' | 'is-24x24' | 'is-32x32' | 'is-48x48' | 'is-64x64' | 'is-96x96' | 'is-128x128' | 'is-square' | 'is-1by1' | 'is-5by4' | 'is-4by3' | 'is-3by2' | 'is-5by3' | 'is-16by9' | 'is-2by1' | 'is-3by1' | 'is-4by5' | 'is-3by4' | 'is-2by3' | 'is-3by5' | 'is-9by16' | 'is-1by2' | 'is-1by3';
|
33
|
+
type ElementSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
|
34
|
+
type SizeWithoutNormalType = Exclude<ElementSizeType, 'is-normal'>;
|
35
|
+
type IconColorModeType = 'light' | 'dark';
|
36
|
+
type ColumnGapType = 'is-0' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8';
|
37
|
+
type ElementAlignType = 'is-centered' | 'is-right' | 'is-left';
|
38
|
+
type RightCenteredAlignType = Exclude<ElementAlignType, 'is-left'>;
|
39
|
+
type RightLeftAlignType = Exclude<ElementAlignType, 'is-centered'>;
|
40
|
+
type BreadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
|
41
|
+
type TabsFormatType = 'is-boxed' | 'is-toggle';
|
42
42
|
|
43
43
|
type InputType = 'text' | 'password' | 'email' | 'tel';
|
44
44
|
type DropdownItemType = 'item' | 'link' | 'divider';
|
45
45
|
type PanelBlockItemType = 'icon' | 'control' | 'button';
|
46
46
|
|
47
|
+
type ChildrenType = string | React$1.ReactElement | React$1.ReactElement[];
|
48
|
+
type SingleChildType = Exclude<ChildrenType, React$1.ReactElement[]>;
|
49
|
+
|
47
50
|
interface ColumnProps extends ElementProps, React$1.ComponentPropsWithoutRef<'section'> {
|
48
51
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
49
|
-
children?:
|
52
|
+
children?: ChildrenType;
|
50
53
|
/** `Styling` Set column's size */
|
51
|
-
size?:
|
54
|
+
size?: ColumnSizeType;
|
52
55
|
/** `Styling` Set column's offset (moving it as you set its size */
|
53
|
-
offset?:
|
56
|
+
offset?: ColumnOffsetType;
|
54
57
|
/** `Styling` Set if the column only will take the space it needs */
|
55
58
|
isNarrow?: boolean;
|
56
59
|
}
|
@@ -60,7 +63,7 @@ interface ButtonProps extends ElementProps, React$1.ComponentPropsWithoutRef<'bu
|
|
60
63
|
/** `Attribute` Will disable the button */
|
61
64
|
isDisabled?: boolean;
|
62
65
|
/** `Styling` Color based on bulma's color tokens */
|
63
|
-
color?:
|
66
|
+
color?: BasicColorType;
|
64
67
|
/** `Styling` Will adjust the selected color with a ligther style */
|
65
68
|
isLightColor?: boolean;
|
66
69
|
/** `Styling` Will invert button's colors (typography in color and background in white or black) */
|
@@ -76,7 +79,7 @@ interface ButtonProps extends ElementProps, React$1.ComponentPropsWithoutRef<'bu
|
|
76
79
|
/** `Styling` Sets the button style when a User selects it (useful for an attached `ButtonGroup`) */
|
77
80
|
isSelected?: boolean;
|
78
81
|
/** `Styling` Set button's size on bulma's size tokens */
|
79
|
-
size?:
|
82
|
+
size?: ElementSizeType;
|
80
83
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
81
84
|
onClick?: () => void;
|
82
85
|
}
|
@@ -86,15 +89,15 @@ interface ProgressBarProps extends ElementProps, React$1.ComponentPropsWithoutRe
|
|
86
89
|
/** `Attribute` Sets the entire bar length comparing with current `value` */
|
87
90
|
max?: number;
|
88
91
|
/** `Styling` Color based on bulma's color tokens */
|
89
|
-
color?:
|
92
|
+
color?: BasicColorType;
|
90
93
|
/** `Styling` Set progress bar's size */
|
91
|
-
size?:
|
94
|
+
size?: ElementSizeType;
|
92
95
|
/** `Styling` Will change `value` for an animated loading */
|
93
96
|
isLoading?: boolean;
|
94
97
|
}
|
95
98
|
interface BlockProps extends ElementProps, React$1.ComponentPropsWithoutRef<'section'> {
|
96
99
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the block */
|
97
|
-
children?:
|
100
|
+
children?: ChildrenType;
|
98
101
|
}
|
99
102
|
interface TagProps extends ComposedElementProps, React$1.ComponentPropsWithoutRef<'span'> {
|
100
103
|
/** `Attribute` `Required` The text will be shown in the `Tag` */
|
@@ -106,15 +109,15 @@ interface TagProps extends ComposedElementProps, React$1.ComponentPropsWithoutRe
|
|
106
109
|
/** `Attribute` The text will be shown in the tag's addon */
|
107
110
|
addonText?: string;
|
108
111
|
/** `Styling` Color based on bulma's color tokens */
|
109
|
-
color?:
|
112
|
+
color?: BasicColorType;
|
110
113
|
/** `Styling` Will adjust the selected color with a ligther style */
|
111
114
|
isLight?: boolean;
|
112
115
|
/** `Styling` Will add round borders to tag's shape */
|
113
116
|
isRounded?: boolean;
|
114
117
|
/** `Styling` Set tag's size */
|
115
|
-
size?:
|
118
|
+
size?: SizeWithoutNormalType;
|
116
119
|
/** `Styling` Color on tag's addon based on bulma's color tokens */
|
117
|
-
addonColor?:
|
120
|
+
addonColor?: BasicColorType;
|
118
121
|
/** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
|
119
122
|
onDeleteClick?: () => void;
|
120
123
|
}
|
@@ -124,19 +127,19 @@ interface ImageProps extends ComposedElementProps, React$1.ComponentPropsWithout
|
|
124
127
|
/** `Attribute` A description text for the image, useful for accessibility purposes */
|
125
128
|
alt?: string;
|
126
129
|
/** `Styling` Will add round borders to image's shape */
|
127
|
-
fixedSize?:
|
130
|
+
fixedSize?: FixedImageSizeType;
|
128
131
|
/** `Styling` Sets image size based on one of fixed ratios/fixed sizes */
|
129
132
|
isRounded?: boolean;
|
130
133
|
}
|
131
134
|
interface BoxProps extends ElementProps, React$1.ComponentPropsWithoutRef<'section'> {
|
132
135
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the box */
|
133
|
-
children?:
|
136
|
+
children?: ChildrenType;
|
134
137
|
}
|
135
138
|
interface TitleSectionProps extends ElementProps, React$1.ComponentPropsWithoutRef<'p'> {
|
136
139
|
/** `Attribute` Sets the text you want to show */
|
137
140
|
text: string;
|
138
141
|
/** `Styling` Set text size */
|
139
|
-
size?:
|
142
|
+
size?: TitleSizeType;
|
140
143
|
/** `Styling` Set type of title (`title` at top, `subtitle` at below) */
|
141
144
|
type: 'title' | 'subtitle';
|
142
145
|
/** `Styling` Set text spacing at default or maximun length */
|
@@ -154,15 +157,15 @@ interface IconProps extends ComposedElementProps {
|
|
154
157
|
/** `Attribute` Sets the text you want to show next to the icon */
|
155
158
|
text?: string;
|
156
159
|
/** `Styling` Color based on bulma's text color tokens */
|
157
|
-
color?:
|
160
|
+
color?: TextColorType;
|
158
161
|
/** `Styling` Set icons's size */
|
159
|
-
size?:
|
162
|
+
size?: SizeWithoutNormalType;
|
160
163
|
/** `Styling` Special usage in case you want to set as dark or light mode */
|
161
|
-
colorMode?:
|
164
|
+
colorMode?: IconColorModeType;
|
162
165
|
/** `Styling` Animates the icon spinning 360° */
|
163
166
|
isSpinning?: boolean;
|
164
167
|
/** `Styling` Used for `InputControl` styling purpose only. Will move the Icon itself to control's Input side */
|
165
|
-
position?:
|
168
|
+
position?: RightLeftAlignType;
|
166
169
|
}
|
167
170
|
interface InputProps extends ElementProps, ClickeableProps {
|
168
171
|
/** `Attribute` `Required` What type of input will be used */
|
@@ -176,9 +179,9 @@ interface InputProps extends ElementProps, ClickeableProps {
|
|
176
179
|
/** `Attribute` Will show the input as a normal one, but is not editable and has no shadow */
|
177
180
|
isReadonly?: boolean;
|
178
181
|
/** `Styling` Color based on bulma's text color tokens */
|
179
|
-
color?:
|
182
|
+
color?: BasicColorType;
|
180
183
|
/** `Styling` Set input's size */
|
181
|
-
size?:
|
184
|
+
size?: SizeWithoutNormalType;
|
182
185
|
/** `Styling` Will add round borders to input's shape */
|
183
186
|
isRounded?: boolean;
|
184
187
|
/** `Styling` Will add a specific border when the input is hovered by the user */
|
@@ -198,7 +201,7 @@ interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
|
198
201
|
}
|
199
202
|
interface DeleteProps extends ElementProps, ClickeableProps {
|
200
203
|
/** `Styling` Set icons's size */
|
201
|
-
size?:
|
204
|
+
size?: SizeWithoutNormalType;
|
202
205
|
}
|
203
206
|
interface SelectOption {
|
204
207
|
id: string | number;
|
@@ -213,9 +216,9 @@ interface SelectProps extends ComposedElementProps, ClickeableProps {
|
|
213
216
|
/** `Attribute` Will allow multiple selection */
|
214
217
|
isMultiple?: boolean;
|
215
218
|
/** `Styling` Color based on bulma's color tokens */
|
216
|
-
color?:
|
219
|
+
color?: BasicColorType;
|
217
220
|
/** `Styling` Set select's size */
|
218
|
-
size?:
|
221
|
+
size?: ElementSizeType;
|
219
222
|
/** `Styling`Will add round borders to input's shape */
|
220
223
|
isRounded?: boolean;
|
221
224
|
/** `Styling`Will add a specific border when the input is hovered by the user */
|
@@ -237,13 +240,13 @@ interface FileProps extends ComposedElementProps, ClickeableProps {
|
|
237
240
|
/** `Styling` Changes styling to a box style, making the button bigger and file name's position below the button */
|
238
241
|
isBoxed?: boolean;
|
239
242
|
/** `Styling` Color based on bulma's color tokens */
|
240
|
-
color?:
|
243
|
+
color?: BasicColorType;
|
241
244
|
/** `Styling` Set button's size */
|
242
|
-
size?:
|
245
|
+
size?: ElementSizeType;
|
243
246
|
}
|
244
247
|
interface CheckBoxProps extends ComposedElementProps {
|
245
248
|
/** `Attribute` Sets checkbox's text that will be shown next to its control */
|
246
|
-
content?:
|
249
|
+
content?: ChildrenType;
|
247
250
|
/** `Attribute` Will disable the checkbox */
|
248
251
|
isDisabled?: boolean;
|
249
252
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
@@ -386,15 +389,15 @@ interface ColumnGroupProps extends ElementProps {
|
|
386
389
|
/** `Styling` Will center the list of columns horizontally */
|
387
390
|
isHorizontallyCentered?: boolean;
|
388
391
|
/** `Styling` Will adjust the space between the columns. In case to set null, it will remove those gaps */
|
389
|
-
gap?:
|
392
|
+
gap?: ColumnGapType | null;
|
390
393
|
}
|
391
394
|
interface NotificationProps extends ElementProps {
|
392
395
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
393
|
-
children?:
|
396
|
+
children?: ChildrenType;
|
394
397
|
/** `Atribute` Includes a `Delete` config object that will be shown */
|
395
398
|
deleteButton?: DeleteProps;
|
396
399
|
/** `Styling` Color based on bulma's color tokens */
|
397
|
-
color?:
|
400
|
+
color?: BasicColorType;
|
398
401
|
/** `Styling` Will adjust the selected color with a ligther style */
|
399
402
|
isLightColor?: boolean;
|
400
403
|
}
|
@@ -402,11 +405,11 @@ interface BreadcrumbsProps extends ComposedElementProps {
|
|
402
405
|
/** `Atribute` `Required` Array of `BreadcrumbItems` objects that will be shown */
|
403
406
|
items: BreadcrumbItemProps[];
|
404
407
|
/** `Styling` Will adjust element position on screen */
|
405
|
-
alignment?:
|
408
|
+
alignment?: RightCenteredAlignType | null;
|
406
409
|
/** `Styling` Will adjust element position on screen */
|
407
|
-
separator?:
|
410
|
+
separator?: BreadcrumbSeparatorType | null;
|
408
411
|
/** `Styling` Set button's size on bulma's size tokens */
|
409
|
-
size?:
|
412
|
+
size?: SizeWithoutNormalType;
|
410
413
|
}
|
411
414
|
interface DropdownProps extends ElementProps {
|
412
415
|
/** `Atribute` `Required` Sets the name will be shown on the dropdown input */
|
@@ -424,9 +427,9 @@ interface MessageProps extends ElementProps {
|
|
424
427
|
/** `Atribute` Includes a `Delete` config object that will be shown */
|
425
428
|
deleteButton?: DeleteProps;
|
426
429
|
/** `Styling` Color based on bulma's color tokens */
|
427
|
-
color?:
|
430
|
+
color?: BasicColorType;
|
428
431
|
/** `Styling` Set button's size on bulma's size tokens */
|
429
|
-
size?:
|
432
|
+
size?: SizeWithoutNormalType;
|
430
433
|
}
|
431
434
|
interface MenuSubListProps {
|
432
435
|
subListTitle: MenuItemProps;
|
@@ -469,13 +472,13 @@ interface PaginationProps extends ComposedElementProps {
|
|
469
472
|
/** `Styling` Will add round borders to each page's shape */
|
470
473
|
isRounded?: boolean;
|
471
474
|
/** `Styling` Set button's size on bulma's size tokens */
|
472
|
-
size?:
|
475
|
+
size?: SizeWithoutNormalType;
|
473
476
|
/** `Styling` Will adjust the pages position on screen */
|
474
|
-
alignment?:
|
477
|
+
alignment?: RightCenteredAlignType | null;
|
475
478
|
}
|
476
479
|
interface ModalProps extends ComposedElementProps {
|
477
480
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
478
|
-
children?:
|
481
|
+
children?: ChildrenType | null;
|
479
482
|
/** `Function` Custom function related to the modal's close button to inject custom code if needed */
|
480
483
|
onCloseClick?: () => void;
|
481
484
|
}
|
@@ -483,11 +486,11 @@ interface TabsProps extends ElementProps {
|
|
483
486
|
/** `Attribute` `Required` List of tabs that will be shown in order */
|
484
487
|
tabs: TabItemProps[];
|
485
488
|
/** `Styling` Will adjust the tabs position on screen */
|
486
|
-
alignment?:
|
489
|
+
alignment?: RightCenteredAlignType;
|
487
490
|
/** `Styling` Set tab's size on bulma's size tokens */
|
488
|
-
size?:
|
491
|
+
size?: SizeWithoutNormalType;
|
489
492
|
/** `Styling` Set tab's size on bulma's size tokens */
|
490
|
-
format?:
|
493
|
+
format?: TabsFormatType;
|
491
494
|
/** `Styling` Will add round tabs borders. Only visible if `format` is set to `is-toggle` */
|
492
495
|
isRounded?: boolean;
|
493
496
|
/** `Styling` The whole container will occupy its parent container width */
|
@@ -501,7 +504,7 @@ interface InputControlProps extends ElementProps {
|
|
501
504
|
/** `Attribute` `Icon` configuration that will be shown in Input's right side */
|
502
505
|
rightIcon?: IconProps;
|
503
506
|
/** `Styling` Set control and its input size on bulma's size tokens */
|
504
|
-
size?:
|
507
|
+
size?: SizeWithoutNormalType;
|
505
508
|
/** `Styling` Will add an animated spinner on input's right side */
|
506
509
|
isLoading?: boolean;
|
507
510
|
/** `Styling` Used for `FormField` styling purpose only. Will strech the input and its container in full-width */
|
@@ -533,7 +536,7 @@ interface PanelTabsProps extends ElementProps {
|
|
533
536
|
}
|
534
537
|
interface LevelItemProps extends ElementProps {
|
535
538
|
/** `Attribute` `Required` Reffers to the component or string content that will be shown inside the level */
|
536
|
-
content:
|
539
|
+
content: SingleChildType;
|
537
540
|
/** `Styling` Centers item's content horizontally */
|
538
541
|
isCentered?: boolean;
|
539
542
|
}
|
@@ -570,7 +573,7 @@ declare const LevelItem: React$1.FC<LevelItemProps>;
|
|
570
573
|
|
571
574
|
interface FormFieldHelperProps {
|
572
575
|
text?: string;
|
573
|
-
color?:
|
576
|
+
color?: BasicColorType;
|
574
577
|
}
|
575
578
|
interface FormFieldProps extends ElementProps {
|
576
579
|
/** `Attribute` `Required` Single or multiple `InputControlProps` config objects which will be wrapped around the `FormField` */
|
@@ -592,7 +595,7 @@ interface PanelProps extends ElementProps {
|
|
592
595
|
/** `Attribute` `Required` A list of configuration objects that will render a list of block with different components, based on `PanelBlockList` component */
|
593
596
|
blockList: PanelBlockProps[];
|
594
597
|
/** `Styling` Color based on bulma's text color tokens */
|
595
|
-
color?:
|
598
|
+
color?: BasicColorType;
|
596
599
|
}
|
597
600
|
interface LevelProps extends ElementProps {
|
598
601
|
/** `Attribute` A list of `LevelItem` configurations that will displayed in Level's left side */
|
@@ -604,6 +607,18 @@ interface LevelProps extends ElementProps {
|
|
604
607
|
/** `Styling` Will adjust the navigator on horizontal on mobile as well */
|
605
608
|
isMobile?: boolean;
|
606
609
|
}
|
610
|
+
interface HeroProps extends ElementProps {
|
611
|
+
/** `Attribute` Designated section for hero's header, it will be visible only if container's `size` is setted to `is-fullheight` */
|
612
|
+
header?: ChildrenType;
|
613
|
+
/** `Attribute` `Required` Designated section for hero's body */
|
614
|
+
body: ChildrenType;
|
615
|
+
/** `Attribute` Designated section for hero's footer, it will be visible only if container's `size` is setted to `is-fullheight` */
|
616
|
+
footer?: ChildrenType;
|
617
|
+
/** `Styling` Set hero's size */
|
618
|
+
size?: SizeWithoutNormalType | 'is-halfheight' | 'is-fullheight';
|
619
|
+
/** `Styling` Color based on bulma's text color tokens */
|
620
|
+
color?: BasicColorType;
|
621
|
+
}
|
607
622
|
|
608
623
|
declare const FormField: React$1.FC<FormFieldProps>;
|
609
624
|
|
@@ -611,4 +626,6 @@ declare const Panel: React$1.FC<PanelProps>;
|
|
611
626
|
|
612
627
|
declare const Level: React$1.FC<LevelProps>;
|
613
628
|
|
614
|
-
|
629
|
+
declare const Hero: React$1.FC<HeroProps>;
|
630
|
+
|
631
|
+
export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, FormField, Hero, Icon, Image, Input, InputControl, Level, LevelHeader, LevelItem, Menu, MenuItem, MenuList, Message, Modal, Notification, Pagination, PaginationItem, Panel, PanelBlock, PanelTabs, ProgressBar, RadioButton, Select, TabItem, Tabs, Tag, TextArea, Title };
|