reactive-bulma 2.10.0 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +83 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/molecules/FormField/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/InputControl/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/index.d.ts +2 -0
- package/dist/cjs/types/functions/parsers.d.ts +1 -6
- package/dist/cjs/types/interfaces/atomProps.d.ts +20 -14
- package/dist/cjs/types/interfaces/commonProps.d.ts +1 -1
- package/dist/cjs/types/interfaces/functionProps.d.ts +5 -0
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +39 -9
- package/dist/cjs/types/types/styleTypes.d.ts +5 -3
- package/dist/esm/index.js +82 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/molecules/FormField/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/InputControl/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/index.d.ts +2 -0
- package/dist/esm/types/functions/parsers.d.ts +1 -6
- package/dist/esm/types/interfaces/atomProps.d.ts +20 -14
- package/dist/esm/types/interfaces/commonProps.d.ts +1 -1
- package/dist/esm/types/interfaces/functionProps.d.ts +5 -0
- package/dist/esm/types/interfaces/moleculeProps.d.ts +39 -9
- package/dist/esm/types/types/styleTypes.d.ts +5 -3
- package/dist/index.d.ts +66 -24
- package/package.json +1 -1
@@ -9,3 +9,5 @@ export { default as MenuList } from './MenuList';
|
|
9
9
|
export { default as Pagination } from './Pagination';
|
10
10
|
export { default as Modal } from './Modal';
|
11
11
|
export { default as Tabs } from './Tabs';
|
12
|
+
export { default as InputControl } from './InputControl';
|
13
|
+
export { default as FormField } from './FormField';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { GenericObjectProps } from '../interfaces/commonProps';
|
2
|
-
import { ParseTestIdProps } from '../interfaces/functionProps';
|
2
|
+
import { CreateObjArrayProps, ParseTestIdProps } from '../interfaces/functionProps';
|
3
3
|
/**
|
4
4
|
* @param { Array<string | null> } _classes `Required`. Array of classNames on `string` (or `null`) values
|
5
5
|
* @returns { string } A single string product of merge all classNames, separated by spaces
|
@@ -14,9 +14,4 @@ export declare const parseClasses: (_classes: Array<string | null | undefined>)
|
|
14
14
|
*/
|
15
15
|
export declare const parseTestId: (config: ParseTestIdProps) => string;
|
16
16
|
export declare const parseKey: (max?: number, min?: number) => string;
|
17
|
-
interface CreateObjArrayProps {
|
18
|
-
numberOfItems?: number;
|
19
|
-
externalParser?: (i: number) => GenericObjectProps;
|
20
|
-
}
|
21
17
|
export declare const createObjArray: <ImportedProps>({ numberOfItems, externalParser }?: CreateObjArrayProps) => ImportedProps[] | GenericObjectProps[];
|
22
|
-
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ElementProps, ComposedElementProps, ClickeableProps } from './commonProps';
|
3
|
-
import { basicColorType, columnOffsetType, columnSizeType, fixedImageSizeType, iconColorModeType,
|
3
|
+
import { basicColorType, columnOffsetType, columnSizeType, fixedImageSizeType, iconColorModeType, elementSizeType, sizeWithoutNormalType, textColorType, titleSizeType, rightLeftAlignType } from '../types/styleTypes';
|
4
4
|
import { DropdownItemType, inputTypes } from '../types/domTypes';
|
5
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 */
|
@@ -27,14 +27,14 @@ export interface ButtonProps extends ElementProps, React.ComponentPropsWithoutRe
|
|
27
27
|
isOutlined?: boolean;
|
28
28
|
/** `Styling` Will add round borders to button's shape */
|
29
29
|
isRounded?: boolean;
|
30
|
-
/** `Styling` Will change `text` for
|
30
|
+
/** `Styling` Will change `text` for an animated spinner, but will remain clickeable */
|
31
31
|
isLoading?: boolean;
|
32
32
|
/** `Styling` Similar to `isDisabled`, but will remove any color style */
|
33
33
|
isStatic?: boolean;
|
34
34
|
/** `Styling` Sets the button style when a User selects it (useful for an attached `ButtonGroup`) */
|
35
35
|
isSelected?: boolean;
|
36
36
|
/** `Styling` Set button's size on bulma's size tokens */
|
37
|
-
size?:
|
37
|
+
size?: elementSizeType;
|
38
38
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
39
39
|
onClick?: () => void;
|
40
40
|
}
|
@@ -46,8 +46,8 @@ export interface ProgressBarProps extends ElementProps, React.ComponentPropsWith
|
|
46
46
|
/** `Styling` Color based on bulma's color tokens */
|
47
47
|
color?: basicColorType;
|
48
48
|
/** `Styling` Set progress bar's size */
|
49
|
-
size?:
|
50
|
-
/** `Styling` Will change `value` for
|
49
|
+
size?: elementSizeType;
|
50
|
+
/** `Styling` Will change `value` for an animated loading */
|
51
51
|
isLoading?: boolean;
|
52
52
|
}
|
53
53
|
export interface BlockProps extends ElementProps, React.ComponentPropsWithoutRef<'section'> {
|
@@ -70,7 +70,7 @@ export interface TagProps extends ComposedElementProps, React.ComponentPropsWith
|
|
70
70
|
/** `Styling` Will add round borders to tag's shape */
|
71
71
|
isRounded?: boolean;
|
72
72
|
/** `Styling` Set tag's size */
|
73
|
-
size?:
|
73
|
+
size?: sizeWithoutNormalType;
|
74
74
|
/** `Styling` Color on tag's addon based on bulma's color tokens */
|
75
75
|
addonColor?: basicColorType;
|
76
76
|
/** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
|
@@ -79,6 +79,8 @@ export interface TagProps extends ComposedElementProps, React.ComponentPropsWith
|
|
79
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
|
+
/** `Attribute` A description text for the image, useful for accessibility purposes */
|
83
|
+
alt?: string;
|
82
84
|
/** `Styling` Will add round borders to image's shape */
|
83
85
|
fixedSize?: fixedImageSizeType;
|
84
86
|
/** `Styling` Sets image size based on one of fixed ratios/fixed sizes */
|
@@ -112,17 +114,21 @@ export interface IconProps extends ComposedElementProps {
|
|
112
114
|
/** `Styling` Color based on bulma's text color tokens */
|
113
115
|
color?: textColorType;
|
114
116
|
/** `Styling` Set icons's size */
|
115
|
-
size?:
|
117
|
+
size?: sizeWithoutNormalType;
|
116
118
|
/** `Styling` Special usage in case you want to set as dark or light mode */
|
117
119
|
colorMode?: iconColorModeType;
|
118
120
|
/** `Styling` Animates the icon spinning 360° */
|
119
121
|
isSpinning?: boolean;
|
122
|
+
/** `Styling` Used for `InputControl` styling purpose only. Will move the Icon itself to control's Input side */
|
123
|
+
position?: rightLeftAlignType;
|
120
124
|
}
|
121
125
|
export interface InputProps extends ElementProps, ClickeableProps {
|
122
126
|
/** `Attribute` `Required` What type of input will be used */
|
123
127
|
type: inputTypes;
|
124
128
|
/** `Attribute` The value that will be shown on the input */
|
125
129
|
text?: string;
|
130
|
+
/** `Attribute` The text that will be shown if the user does not type any value */
|
131
|
+
placeholder?: string;
|
126
132
|
/** `Attribute` Will disable the input */
|
127
133
|
isDisabled?: boolean;
|
128
134
|
/** `Attribute` Will show the input as a normal one, but is not editable and has no shadow */
|
@@ -130,7 +136,7 @@ export interface InputProps extends ElementProps, ClickeableProps {
|
|
130
136
|
/** `Styling` Color based on bulma's text color tokens */
|
131
137
|
color?: basicColorType;
|
132
138
|
/** `Styling` Set input's size */
|
133
|
-
size?:
|
139
|
+
size?: sizeWithoutNormalType;
|
134
140
|
/** `Styling` Will add round borders to input's shape */
|
135
141
|
isRounded?: boolean;
|
136
142
|
/** `Styling` Will add a specific border when the input is hovered by the user */
|
@@ -150,7 +156,7 @@ export interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
|
150
156
|
}
|
151
157
|
export interface DeleteProps extends ElementProps, ClickeableProps {
|
152
158
|
/** `Styling` Set icons's size */
|
153
|
-
size?:
|
159
|
+
size?: sizeWithoutNormalType;
|
154
160
|
}
|
155
161
|
export interface SelectOption {
|
156
162
|
id: string | number;
|
@@ -167,7 +173,7 @@ export interface SelectProps extends ComposedElementProps, ClickeableProps {
|
|
167
173
|
/** `Styling` Color based on bulma's color tokens */
|
168
174
|
color?: basicColorType;
|
169
175
|
/** `Styling` Set select's size */
|
170
|
-
size?:
|
176
|
+
size?: elementSizeType;
|
171
177
|
/** `Styling`Will add round borders to input's shape */
|
172
178
|
isRounded?: boolean;
|
173
179
|
/** `Styling`Will add a specific border when the input is hovered by the user */
|
@@ -191,7 +197,7 @@ export interface FileProps extends ComposedElementProps, ClickeableProps {
|
|
191
197
|
/** `Styling` Color based on bulma's color tokens */
|
192
198
|
color?: basicColorType;
|
193
199
|
/** `Styling` Set button's size */
|
194
|
-
size?:
|
200
|
+
size?: elementSizeType;
|
195
201
|
}
|
196
202
|
export interface CheckBoxProps extends ComposedElementProps {
|
197
203
|
/** `Attribute` Sets checkbox's text that will be shown next to its control */
|
@@ -250,9 +256,9 @@ export interface MenuItemProps extends ElementProps, ClickeableProps {
|
|
250
256
|
export interface PaginationItemProps extends ElementProps, ClickeableProps {
|
251
257
|
/** `Attribute` `Required` Sets the number string that will be shown in the item and in its title when user hovers it */
|
252
258
|
text: string | number;
|
253
|
-
/** `Attribute` Sets
|
259
|
+
/** `Attribute` Sets a custom text before the `text` when user hovers the item */
|
254
260
|
labelText?: string;
|
255
|
-
/** `Attribute` Sets
|
261
|
+
/** `Attribute` Sets a custom text before the `text` when user hovers the item if is the current one */
|
256
262
|
currentLabelText?: string;
|
257
263
|
/** `Styling` Makes the item the selected one, changing its background to blue */
|
258
264
|
isSelected?: boolean;
|
@@ -262,6 +268,6 @@ export interface TabItemProps extends ComposedElementProps, ClickeableProps {
|
|
262
268
|
text: string;
|
263
269
|
/** `Attribute` Adds an `Icon` component before the text */
|
264
270
|
icon?: IconProps;
|
265
|
-
/** `Styling` Used for Tabs styling purpose only. Will mark the tab as the one selected among its group */
|
271
|
+
/** `Styling` Used for `Tabs` styling purpose only. Will mark the tab as the one selected among its group */
|
266
272
|
isActive?: boolean;
|
267
273
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { GenericObjectProps } from './commonProps';
|
1
2
|
interface RegExpRule {
|
2
3
|
regExp?: RegExp;
|
3
4
|
replacer?: string;
|
@@ -8,4 +9,8 @@ export interface ParseTestIdProps {
|
|
8
9
|
rules?: RegExpRule[];
|
9
10
|
separator?: string;
|
10
11
|
}
|
12
|
+
export interface CreateObjArrayProps {
|
13
|
+
numberOfItems?: number;
|
14
|
+
externalParser?: (i: number) => GenericObjectProps;
|
15
|
+
}
|
11
16
|
export {};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ClickeableProps, ComposedElementProps, ElementProps } from './commonProps';
|
3
|
-
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, MenuItemProps, PaginationItemProps, TabItemProps } from './atomProps';
|
4
|
-
import { basicColorType,
|
3
|
+
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps, InputProps, MenuItemProps, PaginationItemProps, TabItemProps } from './atomProps';
|
4
|
+
import { basicColorType, rightCenteredAlignType, breadcrumbSeparatorType, columnGapType, sizeWithoutNormalType, tabsFormatType } from '../types/styleTypes';
|
5
5
|
export interface ButtonGroupProps extends ElementProps {
|
6
6
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
7
7
|
buttonList: ButtonProps[];
|
@@ -38,11 +38,11 @@ export interface BreadcrumbsProps extends ComposedElementProps {
|
|
38
38
|
/** `Atribute` `Required` Array of `BreadcrumbItems` objects that will be shown */
|
39
39
|
items: BreadcrumbItemProps[];
|
40
40
|
/** `Styling` Will adjust element position on screen */
|
41
|
-
alignment?:
|
41
|
+
alignment?: rightCenteredAlignType | null;
|
42
42
|
/** `Styling` Will adjust element position on screen */
|
43
43
|
separator?: breadcrumbSeparatorType | null;
|
44
44
|
/** `Styling` Set button's size on bulma's size tokens */
|
45
|
-
size?:
|
45
|
+
size?: sizeWithoutNormalType;
|
46
46
|
}
|
47
47
|
export interface DropdownProps extends ElementProps {
|
48
48
|
/** `Atribute` `Required` Sets the name will be shown on the dropdown input */
|
@@ -62,7 +62,7 @@ export interface MessageProps extends ElementProps {
|
|
62
62
|
/** `Styling` Color based on bulma's color tokens */
|
63
63
|
color?: basicColorType;
|
64
64
|
/** `Styling` Set button's size on bulma's size tokens */
|
65
|
-
size?:
|
65
|
+
size?: sizeWithoutNormalType;
|
66
66
|
}
|
67
67
|
interface MenuSubListProps {
|
68
68
|
subListTitle: MenuItemProps;
|
@@ -105,9 +105,9 @@ export interface PaginationProps extends ComposedElementProps {
|
|
105
105
|
/** `Styling` Will add round borders to each page's shape */
|
106
106
|
isRounded?: boolean;
|
107
107
|
/** `Styling` Set button's size on bulma's size tokens */
|
108
|
-
size?:
|
108
|
+
size?: sizeWithoutNormalType;
|
109
109
|
/** `Styling` Will adjust the pages position on screen */
|
110
|
-
alignment?:
|
110
|
+
alignment?: rightCenteredAlignType | null;
|
111
111
|
}
|
112
112
|
export interface ModalProps extends ComposedElementProps {
|
113
113
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
@@ -119,9 +119,9 @@ export interface TabsProps extends ElementProps {
|
|
119
119
|
/** `Attribute` `Required` List of tabs that will be shown in order */
|
120
120
|
tabs: TabItemProps[];
|
121
121
|
/** `Styling` Will adjust the tabs position on screen */
|
122
|
-
alignment?:
|
122
|
+
alignment?: rightCenteredAlignType;
|
123
123
|
/** `Styling` Set tab's size on bulma's size tokens */
|
124
|
-
size?:
|
124
|
+
size?: sizeWithoutNormalType;
|
125
125
|
/** `Styling` Set tab's size on bulma's size tokens */
|
126
126
|
format?: tabsFormatType;
|
127
127
|
/** `Styling` Will add round tabs borders. Only visible if `format` is set to `is-toggle` */
|
@@ -129,4 +129,34 @@ export interface TabsProps extends ElementProps {
|
|
129
129
|
/** `Styling` The whole container will occupy its parent container width */
|
130
130
|
isFullWidth?: boolean;
|
131
131
|
}
|
132
|
+
export interface InputControlProps extends ElementProps {
|
133
|
+
/** `Attribute` `Required` control's input configuration which will be wrapped */
|
134
|
+
inputConfig: InputProps;
|
135
|
+
/** `Attribute` `Icon` configuration that will be shown in Input's left side */
|
136
|
+
leftIcon?: IconProps;
|
137
|
+
/** `Attribute` `Icon` configuration that will be shown in Input's right side */
|
138
|
+
rightIcon?: IconProps;
|
139
|
+
/** `Styling` Set control and its input size on bulma's size tokens */
|
140
|
+
size?: sizeWithoutNormalType;
|
141
|
+
/** `Styling` Will add an animated spinner on input's right side */
|
142
|
+
isLoading?: boolean;
|
143
|
+
/** `Styling` Used for `FormField` styling purpose only. Will strech the input and its container in full-width */
|
144
|
+
isExpanded?: boolean;
|
145
|
+
}
|
146
|
+
export interface FormFieldHelperProps {
|
147
|
+
text?: string;
|
148
|
+
color?: basicColorType;
|
149
|
+
}
|
150
|
+
export interface FormFieldProps extends ElementProps {
|
151
|
+
/** `Attribute` Sets a custom text before the wrapped input to indicate its usage */
|
152
|
+
labelText?: string;
|
153
|
+
/** `Attribute` `Required` Single or multiple `InputControlProps` config objects which will be wrapped around the `FormField` */
|
154
|
+
inputControlConfig: InputControlProps | InputControlProps[];
|
155
|
+
/** `Attribute` Adds a helper text below the wrapped paragraph to provide context information */
|
156
|
+
helperConfig?: FormFieldHelperProps;
|
157
|
+
/** `Styling` Will adjust field's sections (label, input/s and helper) in horizontal position */
|
158
|
+
isHorizontal?: boolean;
|
159
|
+
/** `Styling` Will group the list of inputs in a same wrapper (useful for several inputs with same usage, as a complex address) */
|
160
|
+
isGrouped?: boolean;
|
161
|
+
}
|
132
162
|
export {};
|
@@ -4,10 +4,12 @@ export type columnOffsetType = 'is-offset-1' | 'is-offset-2' | 'is-offset-3' | '
|
|
4
4
|
export 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';
|
5
5
|
export 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';
|
6
6
|
export 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';
|
7
|
-
export type
|
8
|
-
export type
|
7
|
+
export type elementSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
|
8
|
+
export type sizeWithoutNormalType = Exclude<elementSizeType, 'is-normal'>;
|
9
9
|
export type iconColorModeType = 'light' | 'dark';
|
10
10
|
export type columnGapType = 'is-0' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8';
|
11
|
-
export type elementAlignType = 'is-centered' | 'is-right';
|
11
|
+
export type elementAlignType = 'is-centered' | 'is-right' | 'is-left';
|
12
|
+
export type rightCenteredAlignType = Exclude<elementAlignType, 'is-left'>;
|
13
|
+
export type rightLeftAlignType = Exclude<elementAlignType, 'is-centered'>;
|
12
14
|
export type breadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
|
13
15
|
export type tabsFormatType = 'is-boxed' | 'is-toggle';
|
package/dist/index.d.ts
CHANGED
@@ -30,11 +30,13 @@ type columnOffsetType = 'is-offset-1' | 'is-offset-2' | 'is-offset-3' | 'is-offs
|
|
30
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
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
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
|
34
|
-
type
|
33
|
+
type elementSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
|
34
|
+
type sizeWithoutNormalType = Exclude<elementSizeType, 'is-normal'>;
|
35
35
|
type iconColorModeType = 'light' | 'dark';
|
36
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';
|
37
|
+
type elementAlignType = 'is-centered' | 'is-right' | 'is-left';
|
38
|
+
type rightCenteredAlignType = Exclude<elementAlignType, 'is-left'>;
|
39
|
+
type rightLeftAlignType = Exclude<elementAlignType, 'is-centered'>;
|
38
40
|
type breadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
|
39
41
|
type tabsFormatType = 'is-boxed' | 'is-toggle';
|
40
42
|
|
@@ -66,14 +68,14 @@ interface ButtonProps extends ElementProps, React$1.ComponentPropsWithoutRef<'bu
|
|
66
68
|
isOutlined?: boolean;
|
67
69
|
/** `Styling` Will add round borders to button's shape */
|
68
70
|
isRounded?: boolean;
|
69
|
-
/** `Styling` Will change `text` for
|
71
|
+
/** `Styling` Will change `text` for an animated spinner, but will remain clickeable */
|
70
72
|
isLoading?: boolean;
|
71
73
|
/** `Styling` Similar to `isDisabled`, but will remove any color style */
|
72
74
|
isStatic?: boolean;
|
73
75
|
/** `Styling` Sets the button style when a User selects it (useful for an attached `ButtonGroup`) */
|
74
76
|
isSelected?: boolean;
|
75
77
|
/** `Styling` Set button's size on bulma's size tokens */
|
76
|
-
size?:
|
78
|
+
size?: elementSizeType;
|
77
79
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
78
80
|
onClick?: () => void;
|
79
81
|
}
|
@@ -85,8 +87,8 @@ interface ProgressBarProps extends ElementProps, React$1.ComponentPropsWithoutRe
|
|
85
87
|
/** `Styling` Color based on bulma's color tokens */
|
86
88
|
color?: basicColorType;
|
87
89
|
/** `Styling` Set progress bar's size */
|
88
|
-
size?:
|
89
|
-
/** `Styling` Will change `value` for
|
90
|
+
size?: elementSizeType;
|
91
|
+
/** `Styling` Will change `value` for an animated loading */
|
90
92
|
isLoading?: boolean;
|
91
93
|
}
|
92
94
|
interface BlockProps extends ElementProps, React$1.ComponentPropsWithoutRef<'section'> {
|
@@ -109,7 +111,7 @@ interface TagProps extends ComposedElementProps, React$1.ComponentPropsWithoutRe
|
|
109
111
|
/** `Styling` Will add round borders to tag's shape */
|
110
112
|
isRounded?: boolean;
|
111
113
|
/** `Styling` Set tag's size */
|
112
|
-
size?:
|
114
|
+
size?: sizeWithoutNormalType;
|
113
115
|
/** `Styling` Color on tag's addon based on bulma's color tokens */
|
114
116
|
addonColor?: basicColorType;
|
115
117
|
/** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
|
@@ -118,6 +120,8 @@ interface TagProps extends ComposedElementProps, React$1.ComponentPropsWithoutRe
|
|
118
120
|
interface ImageProps extends ComposedElementProps, React$1.ComponentPropsWithoutRef<'figure'> {
|
119
121
|
/** `Attribute` `Required` The image source that will be shown */
|
120
122
|
src: string;
|
123
|
+
/** `Attribute` A description text for the image, useful for accessibility purposes */
|
124
|
+
alt?: string;
|
121
125
|
/** `Styling` Will add round borders to image's shape */
|
122
126
|
fixedSize?: fixedImageSizeType;
|
123
127
|
/** `Styling` Sets image size based on one of fixed ratios/fixed sizes */
|
@@ -151,17 +155,21 @@ interface IconProps extends ComposedElementProps {
|
|
151
155
|
/** `Styling` Color based on bulma's text color tokens */
|
152
156
|
color?: textColorType;
|
153
157
|
/** `Styling` Set icons's size */
|
154
|
-
size?:
|
158
|
+
size?: sizeWithoutNormalType;
|
155
159
|
/** `Styling` Special usage in case you want to set as dark or light mode */
|
156
160
|
colorMode?: iconColorModeType;
|
157
161
|
/** `Styling` Animates the icon spinning 360° */
|
158
162
|
isSpinning?: boolean;
|
163
|
+
/** `Styling` Used for `InputControl` styling purpose only. Will move the Icon itself to control's Input side */
|
164
|
+
position?: rightLeftAlignType;
|
159
165
|
}
|
160
166
|
interface InputProps extends ElementProps, ClickeableProps {
|
161
167
|
/** `Attribute` `Required` What type of input will be used */
|
162
168
|
type: inputTypes;
|
163
169
|
/** `Attribute` The value that will be shown on the input */
|
164
170
|
text?: string;
|
171
|
+
/** `Attribute` The text that will be shown if the user does not type any value */
|
172
|
+
placeholder?: string;
|
165
173
|
/** `Attribute` Will disable the input */
|
166
174
|
isDisabled?: boolean;
|
167
175
|
/** `Attribute` Will show the input as a normal one, but is not editable and has no shadow */
|
@@ -169,7 +177,7 @@ interface InputProps extends ElementProps, ClickeableProps {
|
|
169
177
|
/** `Styling` Color based on bulma's text color tokens */
|
170
178
|
color?: basicColorType;
|
171
179
|
/** `Styling` Set input's size */
|
172
|
-
size?:
|
180
|
+
size?: sizeWithoutNormalType;
|
173
181
|
/** `Styling` Will add round borders to input's shape */
|
174
182
|
isRounded?: boolean;
|
175
183
|
/** `Styling` Will add a specific border when the input is hovered by the user */
|
@@ -189,7 +197,7 @@ interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
|
189
197
|
}
|
190
198
|
interface DeleteProps extends ElementProps, ClickeableProps {
|
191
199
|
/** `Styling` Set icons's size */
|
192
|
-
size?:
|
200
|
+
size?: sizeWithoutNormalType;
|
193
201
|
}
|
194
202
|
interface SelectOption {
|
195
203
|
id: string | number;
|
@@ -206,7 +214,7 @@ interface SelectProps extends ComposedElementProps, ClickeableProps {
|
|
206
214
|
/** `Styling` Color based on bulma's color tokens */
|
207
215
|
color?: basicColorType;
|
208
216
|
/** `Styling` Set select's size */
|
209
|
-
size?:
|
217
|
+
size?: elementSizeType;
|
210
218
|
/** `Styling`Will add round borders to input's shape */
|
211
219
|
isRounded?: boolean;
|
212
220
|
/** `Styling`Will add a specific border when the input is hovered by the user */
|
@@ -230,7 +238,7 @@ interface FileProps extends ComposedElementProps, ClickeableProps {
|
|
230
238
|
/** `Styling` Color based on bulma's color tokens */
|
231
239
|
color?: basicColorType;
|
232
240
|
/** `Styling` Set button's size */
|
233
|
-
size?:
|
241
|
+
size?: elementSizeType;
|
234
242
|
}
|
235
243
|
interface CheckBoxProps extends ComposedElementProps {
|
236
244
|
/** `Attribute` Sets checkbox's text that will be shown next to its control */
|
@@ -289,9 +297,9 @@ interface MenuItemProps extends ElementProps, ClickeableProps {
|
|
289
297
|
interface PaginationItemProps extends ElementProps, ClickeableProps {
|
290
298
|
/** `Attribute` `Required` Sets the number string that will be shown in the item and in its title when user hovers it */
|
291
299
|
text: string | number;
|
292
|
-
/** `Attribute` Sets
|
300
|
+
/** `Attribute` Sets a custom text before the `text` when user hovers the item */
|
293
301
|
labelText?: string;
|
294
|
-
/** `Attribute` Sets
|
302
|
+
/** `Attribute` Sets a custom text before the `text` when user hovers the item if is the current one */
|
295
303
|
currentLabelText?: string;
|
296
304
|
/** `Styling` Makes the item the selected one, changing its background to blue */
|
297
305
|
isSelected?: boolean;
|
@@ -301,7 +309,7 @@ interface TabItemProps extends ComposedElementProps, ClickeableProps {
|
|
301
309
|
text: string;
|
302
310
|
/** `Attribute` Adds an `Icon` component before the text */
|
303
311
|
icon?: IconProps;
|
304
|
-
/** `Styling` Used for Tabs styling purpose only. Will mark the tab as the one selected among its group */
|
312
|
+
/** `Styling` Used for `Tabs` styling purpose only. Will mark the tab as the one selected among its group */
|
305
313
|
isActive?: boolean;
|
306
314
|
}
|
307
315
|
|
@@ -385,11 +393,11 @@ interface BreadcrumbsProps extends ComposedElementProps {
|
|
385
393
|
/** `Atribute` `Required` Array of `BreadcrumbItems` objects that will be shown */
|
386
394
|
items: BreadcrumbItemProps[];
|
387
395
|
/** `Styling` Will adjust element position on screen */
|
388
|
-
alignment?:
|
396
|
+
alignment?: rightCenteredAlignType | null;
|
389
397
|
/** `Styling` Will adjust element position on screen */
|
390
398
|
separator?: breadcrumbSeparatorType | null;
|
391
399
|
/** `Styling` Set button's size on bulma's size tokens */
|
392
|
-
size?:
|
400
|
+
size?: sizeWithoutNormalType;
|
393
401
|
}
|
394
402
|
interface DropdownProps extends ElementProps {
|
395
403
|
/** `Atribute` `Required` Sets the name will be shown on the dropdown input */
|
@@ -409,7 +417,7 @@ interface MessageProps extends ElementProps {
|
|
409
417
|
/** `Styling` Color based on bulma's color tokens */
|
410
418
|
color?: basicColorType;
|
411
419
|
/** `Styling` Set button's size on bulma's size tokens */
|
412
|
-
size?:
|
420
|
+
size?: sizeWithoutNormalType;
|
413
421
|
}
|
414
422
|
interface MenuSubListProps {
|
415
423
|
subListTitle: MenuItemProps;
|
@@ -452,9 +460,9 @@ interface PaginationProps extends ComposedElementProps {
|
|
452
460
|
/** `Styling` Will add round borders to each page's shape */
|
453
461
|
isRounded?: boolean;
|
454
462
|
/** `Styling` Set button's size on bulma's size tokens */
|
455
|
-
size?:
|
463
|
+
size?: sizeWithoutNormalType;
|
456
464
|
/** `Styling` Will adjust the pages position on screen */
|
457
|
-
alignment?:
|
465
|
+
alignment?: rightCenteredAlignType | null;
|
458
466
|
}
|
459
467
|
interface ModalProps extends ComposedElementProps {
|
460
468
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
@@ -466,9 +474,9 @@ interface TabsProps extends ElementProps {
|
|
466
474
|
/** `Attribute` `Required` List of tabs that will be shown in order */
|
467
475
|
tabs: TabItemProps[];
|
468
476
|
/** `Styling` Will adjust the tabs position on screen */
|
469
|
-
alignment?:
|
477
|
+
alignment?: rightCenteredAlignType;
|
470
478
|
/** `Styling` Set tab's size on bulma's size tokens */
|
471
|
-
size?:
|
479
|
+
size?: sizeWithoutNormalType;
|
472
480
|
/** `Styling` Set tab's size on bulma's size tokens */
|
473
481
|
format?: tabsFormatType;
|
474
482
|
/** `Styling` Will add round tabs borders. Only visible if `format` is set to `is-toggle` */
|
@@ -476,6 +484,36 @@ interface TabsProps extends ElementProps {
|
|
476
484
|
/** `Styling` The whole container will occupy its parent container width */
|
477
485
|
isFullWidth?: boolean;
|
478
486
|
}
|
487
|
+
interface InputControlProps extends ElementProps {
|
488
|
+
/** `Attribute` `Required` control's input configuration which will be wrapped */
|
489
|
+
inputConfig: InputProps;
|
490
|
+
/** `Attribute` `Icon` configuration that will be shown in Input's left side */
|
491
|
+
leftIcon?: IconProps;
|
492
|
+
/** `Attribute` `Icon` configuration that will be shown in Input's right side */
|
493
|
+
rightIcon?: IconProps;
|
494
|
+
/** `Styling` Set control and its input size on bulma's size tokens */
|
495
|
+
size?: sizeWithoutNormalType;
|
496
|
+
/** `Styling` Will add an animated spinner on input's right side */
|
497
|
+
isLoading?: boolean;
|
498
|
+
/** `Styling` Used for `FormField` styling purpose only. Will strech the input and its container in full-width */
|
499
|
+
isExpanded?: boolean;
|
500
|
+
}
|
501
|
+
interface FormFieldHelperProps {
|
502
|
+
text?: string;
|
503
|
+
color?: basicColorType;
|
504
|
+
}
|
505
|
+
interface FormFieldProps extends ElementProps {
|
506
|
+
/** `Attribute` Sets a custom text before the wrapped input to indicate its usage */
|
507
|
+
labelText?: string;
|
508
|
+
/** `Attribute` `Required` Single or multiple `InputControlProps` config objects which will be wrapped around the `FormField` */
|
509
|
+
inputControlConfig: InputControlProps | InputControlProps[];
|
510
|
+
/** `Attribute` Adds a helper text below the wrapped paragraph to provide context information */
|
511
|
+
helperConfig?: FormFieldHelperProps;
|
512
|
+
/** `Styling` Will adjust field's sections (label, input/s and helper) in horizontal position */
|
513
|
+
isHorizontal?: boolean;
|
514
|
+
/** `Styling` Will group the list of inputs in a same wrapper (useful for several inputs with same usage, as a complex address) */
|
515
|
+
isGrouped?: boolean;
|
516
|
+
}
|
479
517
|
|
480
518
|
declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
|
481
519
|
|
@@ -499,4 +537,8 @@ declare const Modal: React$1.FC<ModalProps>;
|
|
499
537
|
|
500
538
|
declare const Tabs: React$1.FC<TabsProps>;
|
501
539
|
|
502
|
-
|
540
|
+
declare const InputControl: React$1.FC<InputControlProps>;
|
541
|
+
|
542
|
+
declare const FormField: React$1.FC<FormFieldProps>;
|
543
|
+
|
544
|
+
export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, FormField, Icon, Image, Input, InputControl, Menu, MenuItem, MenuList, Message, Modal, Notification, Pagination, PaginationItem, ProgressBar, RadioButton, Select, TabItem, Tabs, Tag, TextArea, Title };
|