reactive-bulma 4.3.28 → 4.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 +1 -0
- package/dist/assets/reactive-bulma.css +1 -1
- package/dist/components/atoms/BreadcrumbItem/index.js +58 -34
- package/dist/components/atoms/BreadcrumbItem/index.stories.d.ts +1 -0
- package/dist/components/atoms/Button/index.js +76 -38
- package/dist/components/atoms/Button/index.stories.d.ts +5 -0
- package/dist/components/atoms/Checkbox/index.js +47 -40
- package/dist/components/atoms/Column/index.js +22 -21
- package/dist/components/atoms/Delete/index.js +22 -17
- package/dist/components/atoms/GridCell/index.d.ts +4 -0
- package/dist/components/atoms/GridCell/index.js +40 -0
- package/dist/components/atoms/GridCell/index.stories.d.ts +5 -0
- package/dist/components/atoms/GridCell/index.test.d.ts +0 -0
- package/dist/components/atoms/Icon/index.js +54 -57
- package/dist/components/atoms/Image/index.js +28 -27
- package/dist/components/atoms/Image/index.stories.d.ts +1 -0
- package/dist/components/atoms/NavBarItem/index.js +7 -7
- package/dist/components/atoms/ProgressBar/index.js +25 -24
- package/dist/components/atoms/RadioButton/index.js +53 -73
- package/dist/components/atoms/Select/index.js +72 -54
- package/dist/components/atoms/TabItem/index.js +34 -30
- package/dist/components/atoms/TableCell/index.js +20 -15
- package/dist/components/atoms/TableCell/index.stories.d.ts +1 -0
- package/dist/components/atoms/TableHeadCell/index.js +22 -14
- package/dist/components/atoms/TableHeadCell/index.stories.d.ts +1 -0
- package/dist/components/atoms/Tag/index.js +36 -69
- package/dist/components/atoms/Tag/index.stories.d.ts +0 -3
- package/dist/components/atoms/TagWithAddon/index.d.ts +4 -0
- package/dist/components/atoms/TagWithAddon/index.js +91 -0
- package/dist/components/atoms/TagWithAddon/index.stories.d.ts +11 -0
- package/dist/components/atoms/TagWithAddon/index.test.d.ts +0 -0
- package/dist/components/atoms/Tile/index.js +31 -29
- package/dist/components/atoms/Title/index.js +28 -16
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/atoms/index.js +36 -32
- package/dist/components/molecules/Breadcrumbs/index.js +48 -49
- package/dist/components/molecules/CheckboxGroup/index.d.ts +4 -0
- package/dist/components/molecules/CheckboxGroup/index.js +34 -0
- package/dist/components/molecules/CheckboxGroup/index.stories.d.ts +5 -0
- package/dist/components/molecules/CheckboxGroup/index.test.d.ts +0 -0
- package/dist/components/molecules/ColumnGroup/index.js +41 -37
- package/dist/components/molecules/Dropdown/index.js +58 -49
- package/dist/components/molecules/Dropdown/index.stories.d.ts +3 -0
- package/dist/components/molecules/FormFieldInput/index.js +68 -85
- package/dist/components/molecules/FormFieldInput/index.stories.d.ts +1 -3
- package/dist/components/molecules/Grid/index.d.ts +4 -0
- package/dist/components/molecules/Grid/index.js +86 -0
- package/dist/components/molecules/Grid/index.stories.d.ts +12 -0
- package/dist/components/molecules/Grid/index.test.d.ts +0 -0
- package/dist/components/molecules/InputControl/index.js +92 -47
- package/dist/components/molecules/InputControl/index.stories.d.ts +2 -0
- package/dist/components/molecules/Menu/index.js +32 -29
- package/dist/components/molecules/MenuList/index.js +33 -30
- package/dist/components/molecules/Message/index.js +32 -26
- package/dist/components/molecules/NavBarBrand/index.js +1 -1
- package/dist/components/molecules/NavBarDropdown/index.js +55 -57
- package/dist/components/molecules/NavBarDropdown/index.stories.d.ts +2 -0
- package/dist/components/molecules/Notification/index.js +26 -25
- package/dist/components/molecules/Pagination/index.js +91 -81
- package/dist/components/molecules/Pagination/index.stories.d.ts +2 -0
- package/dist/components/molecules/Section/index.js +18 -13
- package/dist/components/molecules/TableRow/index.js +41 -32
- package/dist/components/molecules/TableRow/index.stories.d.ts +1 -0
- package/dist/components/molecules/Tabs/index.js +36 -32
- package/dist/components/molecules/TagList/index.d.ts +4 -0
- package/dist/components/molecules/TagList/index.js +31 -0
- package/dist/components/molecules/TagList/index.stories.d.ts +5 -0
- package/dist/components/molecules/TagList/index.test.d.ts +0 -0
- package/dist/components/molecules/TileBox/index.js +1 -1
- package/dist/components/molecules/index.d.ts +3 -0
- package/dist/components/molecules/index.js +26 -20
- package/dist/components/organisms/Card/index.js +84 -72
- package/dist/components/organisms/FormField/index.js +54 -57
- package/dist/components/organisms/FormField/index.stories.d.ts +2 -0
- package/dist/components/organisms/Hero/index.js +26 -20
- package/dist/components/organisms/Level/index.js +43 -30
- package/dist/components/organisms/NavBar/index.js +65 -57
- package/dist/components/organisms/Panel/index.js +33 -27
- package/dist/components/organisms/Table/index.js +2 -2
- package/dist/components/organisms/Table/index.stories.d.ts +1 -0
- package/dist/components/organisms/TileGroup/index.js +31 -36
- package/dist/constants/classes.d.ts +34 -0
- package/dist/constants/classes.js +37 -0
- package/dist/constants/regExp.d.ts +18 -0
- package/dist/constants/regExp.js +23 -0
- package/dist/functions/parsers.js +5 -4
- package/dist/index.js +104 -94
- package/dist/interfaces/atomProps.d.ts +62 -31
- package/dist/interfaces/commonProps.d.ts +5 -0
- package/dist/interfaces/moleculeProps.d.ts +67 -22
- package/dist/interfaces/moleculeProps.js +1 -1
- package/dist/interfaces/organismProps.d.ts +35 -5
- package/dist/types/domTypes.d.ts +4 -3
- package/dist/types/domTypes.js +2 -2
- package/dist/types/styleTypes.d.ts +28 -18
- package/package.json +18 -17
package/dist/index.js
CHANGED
|
@@ -1,118 +1,128 @@
|
|
|
1
1
|
import { default as a } from "./components/atoms/Button/index.js";
|
|
2
2
|
import { default as t } from "./components/atoms/Column/index.js";
|
|
3
3
|
import { default as l } from "./components/atoms/ProgressBar/index.js";
|
|
4
|
-
import { default as
|
|
4
|
+
import { default as u } from "./components/atoms/Block/index.js";
|
|
5
5
|
import { default as p } from "./components/atoms/Tag/index.js";
|
|
6
6
|
import { default as x } from "./components/atoms/Box/index.js";
|
|
7
7
|
import { default as i } from "./components/atoms/Title/index.js";
|
|
8
|
-
import { default as
|
|
8
|
+
import { default as B } from "./components/atoms/Icon/index.js";
|
|
9
9
|
import { default as b } from "./components/atoms/Input/index.js";
|
|
10
10
|
import { default as g } from "./components/atoms/TextArea/index.js";
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
11
|
+
import { default as v } from "./components/atoms/Delete/index.js";
|
|
12
|
+
import { default as G } from "./components/atoms/Select/index.js";
|
|
13
|
+
import { default as P } from "./components/atoms/File/index.js";
|
|
14
|
+
import { default as D } from "./components/atoms/Checkbox/index.js";
|
|
15
|
+
import { default as N } from "./components/atoms/RadioButton/index.js";
|
|
16
|
+
import { default as h } from "./components/atoms/BreadcrumbItem/index.js";
|
|
17
|
+
import { default as A } from "./components/atoms/DropdownTrigger/index.js";
|
|
18
|
+
import { default as S } from "./components/atoms/DropdownItem/index.js";
|
|
19
|
+
import { default as j } from "./components/atoms/MenuItem/index.js";
|
|
20
|
+
import { default as y } from "./components/atoms/Image/index.js";
|
|
21
|
+
import { default as E } from "./components/atoms/PaginationItem/index.js";
|
|
22
|
+
import { default as K } from "./components/atoms/TabItem/index.js";
|
|
23
|
+
import { default as Q } from "./components/atoms/LevelHeader/index.js";
|
|
24
|
+
import { default as V } from "./components/atoms/Tile/index.js";
|
|
25
25
|
import { default as Y } from "./components/atoms/NavBarItem/index.js";
|
|
26
26
|
import { default as _ } from "./components/atoms/TableHeadCell/index.js";
|
|
27
27
|
import { default as ee } from "./components/atoms/TableCell/index.js";
|
|
28
|
-
import { default as ae } from "./components/
|
|
29
|
-
import { default as te } from "./components/
|
|
30
|
-
import { default as le } from "./components/molecules/
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as pe } from "./components/molecules/
|
|
33
|
-
import { default as xe } from "./components/molecules/
|
|
34
|
-
import { default as ie } from "./components/molecules/
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as be } from "./components/molecules/
|
|
37
|
-
import { default as ge } from "./components/molecules/
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as Ye } from "./components/
|
|
53
|
-
import { default as _e } from "./components/
|
|
54
|
-
import { default as eo } from "./components/
|
|
55
|
-
import { default as ao } from "./components/
|
|
56
|
-
import { default as to } from "./components/organisms/
|
|
57
|
-
import { default as lo } from "./components/organisms/
|
|
58
|
-
import { default as mo } from "./components/organisms/
|
|
28
|
+
import { default as ae } from "./components/atoms/GridCell/index.js";
|
|
29
|
+
import { default as te } from "./components/atoms/TagWithAddon/index.js";
|
|
30
|
+
import { default as le } from "./components/molecules/ButtonGroup/index.js";
|
|
31
|
+
import { default as ue } from "./components/molecules/ColumnGroup/index.js";
|
|
32
|
+
import { default as pe } from "./components/molecules/Notification/index.js";
|
|
33
|
+
import { default as xe } from "./components/molecules/Breadcrumbs/index.js";
|
|
34
|
+
import { default as ie } from "./components/molecules/Dropdown/index.js";
|
|
35
|
+
import { default as Be } from "./components/molecules/Message/index.js";
|
|
36
|
+
import { default as be } from "./components/molecules/Menu/index.js";
|
|
37
|
+
import { default as ge } from "./components/molecules/MenuList/index.js";
|
|
38
|
+
import { default as ve } from "./components/molecules/Pagination/index.js";
|
|
39
|
+
import { default as Ge } from "./components/molecules/Modal/index.js";
|
|
40
|
+
import { default as Pe } from "./components/molecules/Tabs/index.js";
|
|
41
|
+
import { default as De } from "./components/molecules/InputControl/index.js";
|
|
42
|
+
import { default as Ne } from "./components/molecules/PanelBlock/index.js";
|
|
43
|
+
import { default as he } from "./components/molecules/PanelTabs/index.js";
|
|
44
|
+
import { default as Ae } from "./components/molecules/LevelItem/index.js";
|
|
45
|
+
import { default as Se } from "./components/molecules/TileBox/index.js";
|
|
46
|
+
import { default as je } from "./components/molecules/Footer/index.js";
|
|
47
|
+
import { default as ye } from "./components/molecules/Media/index.js";
|
|
48
|
+
import { default as Ee } from "./components/molecules/Section/index.js";
|
|
49
|
+
import { default as Ke } from "./components/molecules/NavBarBrand/index.js";
|
|
50
|
+
import { default as Qe } from "./components/molecules/NavBarDropdown/index.js";
|
|
51
|
+
import { default as Ve } from "./components/molecules/TableRow/index.js";
|
|
52
|
+
import { default as Ye } from "./components/molecules/FormFieldInput/index.js";
|
|
53
|
+
import { default as _e } from "./components/molecules/TagList/index.js";
|
|
54
|
+
import { default as eo } from "./components/molecules/CheckboxGroup/index.js";
|
|
55
|
+
import { default as ao } from "./components/molecules/Grid/index.js";
|
|
56
|
+
import { default as to } from "./components/organisms/FormField/index.js";
|
|
57
|
+
import { default as lo } from "./components/organisms/Panel/index.js";
|
|
58
|
+
import { default as mo } from "./components/organisms/Level/index.js";
|
|
59
|
+
import { default as so } from "./components/organisms/Hero/index.js";
|
|
60
|
+
import { default as no } from "./components/organisms/TileGroup/index.js";
|
|
61
|
+
import { default as To } from "./components/organisms/NavBar/index.js";
|
|
62
|
+
import { default as Io } from "./components/organisms/Card/index.js";
|
|
63
|
+
import { default as co } from "./components/organisms/Table/index.js";
|
|
59
64
|
export {
|
|
60
|
-
|
|
65
|
+
u as Block,
|
|
61
66
|
x as Box,
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
h as BreadcrumbItem,
|
|
68
|
+
xe as Breadcrumbs,
|
|
64
69
|
a as Button,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
le as ButtonGroup,
|
|
71
|
+
Io as Card,
|
|
72
|
+
D as Checkbox,
|
|
73
|
+
eo as CheckboxGroup,
|
|
68
74
|
t as Column,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
ue as ColumnGroup,
|
|
76
|
+
v as Delete,
|
|
77
|
+
ie as Dropdown,
|
|
78
|
+
S as DropdownItem,
|
|
79
|
+
A as DropdownTrigger,
|
|
80
|
+
P as File,
|
|
81
|
+
je as Footer,
|
|
82
|
+
to as FormField,
|
|
83
|
+
Ye as FormFieldInput,
|
|
84
|
+
ao as Grid,
|
|
85
|
+
ae as GridCell,
|
|
86
|
+
so as Hero,
|
|
87
|
+
B as Icon,
|
|
88
|
+
y as Image,
|
|
81
89
|
b as Input,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
De as InputControl,
|
|
91
|
+
mo as Level,
|
|
92
|
+
Q as LevelHeader,
|
|
93
|
+
Ae as LevelItem,
|
|
94
|
+
ye as Media,
|
|
95
|
+
be as Menu,
|
|
96
|
+
j as MenuItem,
|
|
97
|
+
ge as MenuList,
|
|
98
|
+
Be as Message,
|
|
99
|
+
Ge as Modal,
|
|
100
|
+
To as NavBar,
|
|
101
|
+
Ke as NavBarBrand,
|
|
102
|
+
Qe as NavBarDropdown,
|
|
95
103
|
Y as NavBarItem,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
pe as Notification,
|
|
105
|
+
ve as Pagination,
|
|
106
|
+
E as PaginationItem,
|
|
107
|
+
lo as Panel,
|
|
108
|
+
Ne as PanelBlock,
|
|
109
|
+
he as PanelTabs,
|
|
102
110
|
l as ProgressBar,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
N as RadioButton,
|
|
112
|
+
Ee as Section,
|
|
113
|
+
G as Select,
|
|
114
|
+
K as TabItem,
|
|
115
|
+
co as Table,
|
|
108
116
|
ee as TableCell,
|
|
109
117
|
_ as TableHeadCell,
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
Ve as TableRow,
|
|
119
|
+
Pe as Tabs,
|
|
112
120
|
p as Tag,
|
|
121
|
+
_e as TagList,
|
|
122
|
+
te as TagWithAddon,
|
|
113
123
|
g as TextArea,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
124
|
+
V as Tile,
|
|
125
|
+
Se as TileBox,
|
|
126
|
+
no as TileGroup,
|
|
117
127
|
i as Title
|
|
118
128
|
};
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ElementProps, ComposedElementProps, ClickeableProps, NamedInputProps, InteractiveProps, InteractiveOnChangeProps } from './commonProps';
|
|
3
|
-
import {
|
|
2
|
+
import { ElementProps, ComposedElementProps, ClickeableProps, NamedInputProps, InteractiveProps, InteractiveOnChangeProps, ColoredProps } from './commonProps';
|
|
3
|
+
import { ColorType, ColumnOffsetType, ColumnSizeType, FixedImageSizeType, SizeWithNormalType, BaseSizeType, TitleSizeType, RightLeftAlignType, CommonSizeType, ColorModeType, GridCellPositionType } from '../types/styleTypes';
|
|
4
4
|
import { DropdownItemType, InputType, ChildrenType, TileContextType, SingleChildType } 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 */
|
|
7
7
|
children?: ChildrenType;
|
|
8
8
|
/** `Styling` Set column's size */
|
|
9
9
|
size?: ColumnSizeType;
|
|
10
|
-
/** `Styling` Set column's offset (moving it as you set its size */
|
|
10
|
+
/** `Styling` Set column's offset (moving it as you set its `size`) */
|
|
11
11
|
offset?: ColumnOffsetType;
|
|
12
12
|
/** `Styling` Set if the column only will take the space it needs */
|
|
13
13
|
isNarrow?: boolean;
|
|
14
14
|
}
|
|
15
15
|
export interface ButtonProps extends ElementProps, React.ComponentPropsWithoutRef<'button'> {
|
|
16
|
+
/** `Attribute` The component will be rendered as an anchor instead a button */
|
|
17
|
+
isAnAnchor?: boolean;
|
|
18
|
+
/** `Attribute` In case the component has `isAnAnchor` as `true`, it will include an url to be reffered */
|
|
19
|
+
anchorHref?: string;
|
|
16
20
|
/** `Attribute` The text will be shown in the `Button` */
|
|
17
21
|
text?: string;
|
|
18
22
|
/** `Attribute` Will disable the button */
|
|
19
23
|
isDisabled?: boolean;
|
|
20
24
|
/** `Styling` Color based on bulma's color tokens */
|
|
21
|
-
color?:
|
|
22
|
-
/** `Styling` Will adjust the selected color with a ligther style */
|
|
23
|
-
|
|
25
|
+
color?: ColorType;
|
|
26
|
+
/** `Styling` Will adjust the selected color with a ligther or darker style */
|
|
27
|
+
colorMode?: ColorModeType;
|
|
24
28
|
/** `Styling` Will invert button's colors (typography in color and background in white or black) */
|
|
25
29
|
isInvertedColor?: boolean;
|
|
26
30
|
/** `Styling` Similar to `isInvertedColor`, but button's border will be colored */
|
|
@@ -33,8 +37,12 @@ export interface ButtonProps extends ElementProps, React.ComponentPropsWithoutRe
|
|
|
33
37
|
isStatic?: boolean;
|
|
34
38
|
/** `Styling` Sets the button style when a User selects it (useful for an attached `ButtonGroup`) */
|
|
35
39
|
isSelected?: boolean;
|
|
40
|
+
/** `Styling` Will adjust button's width to its container fullest */
|
|
41
|
+
isFullWidth?: boolean;
|
|
42
|
+
/** `Styling` Will adjust button's size for a responsive design, adjustable to its size */
|
|
43
|
+
isResponsive?: boolean;
|
|
36
44
|
/** `Styling` Set button's size on bulma's size tokens */
|
|
37
|
-
size?:
|
|
45
|
+
size?: SizeWithNormalType;
|
|
38
46
|
/** `Function` Click function, alone does not nothing, but can be reused for other components */
|
|
39
47
|
onClick?: () => void;
|
|
40
48
|
}
|
|
@@ -44,9 +52,9 @@ export interface ProgressBarProps extends ElementProps, React.ComponentPropsWith
|
|
|
44
52
|
/** `Attribute` Sets the entire bar length comparing with current `value` */
|
|
45
53
|
max?: number;
|
|
46
54
|
/** `Styling` Color based on bulma's color tokens */
|
|
47
|
-
color?:
|
|
55
|
+
color?: ColorType;
|
|
48
56
|
/** `Styling` Set progress bar's size */
|
|
49
|
-
size?:
|
|
57
|
+
size?: SizeWithNormalType;
|
|
50
58
|
/** `Styling` Will change `value` for an animated loading */
|
|
51
59
|
isLoading?: boolean;
|
|
52
60
|
}
|
|
@@ -54,28 +62,30 @@ export interface BlockProps extends ElementProps, React.ComponentPropsWithoutRef
|
|
|
54
62
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the block */
|
|
55
63
|
children?: ChildrenType;
|
|
56
64
|
}
|
|
57
|
-
|
|
65
|
+
interface BaseTagProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
58
66
|
/** `Attribute` `Required` The text will be shown in the `Tag` */
|
|
59
67
|
text: string;
|
|
60
68
|
/** `Attribute` Will add a delete button (for both single or addon cases) */
|
|
61
69
|
withDelete?: boolean;
|
|
62
|
-
/** `Attribute` Will add a second tag element (that could have its own text, color and delete) */
|
|
63
|
-
withAddon?: boolean;
|
|
64
|
-
/** `Attribute` The text will be shown in the tag's addon */
|
|
65
|
-
addonText?: string;
|
|
66
70
|
/** `Styling` Color based on bulma's color tokens */
|
|
67
|
-
color?:
|
|
71
|
+
color?: ColorType;
|
|
68
72
|
/** `Styling` Will adjust the selected color with a ligther style */
|
|
69
73
|
isLight?: boolean;
|
|
70
74
|
/** `Styling` Will add round borders to tag's shape */
|
|
71
75
|
isRounded?: boolean;
|
|
72
76
|
/** `Styling` Set tag's size */
|
|
73
|
-
size?:
|
|
74
|
-
/** `Styling` Color on tag's addon based on bulma's color tokens */
|
|
75
|
-
addonColor?: BasicColorType;
|
|
77
|
+
size?: BaseSizeType;
|
|
76
78
|
/** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
|
|
77
79
|
onDeleteClick?: () => void;
|
|
78
80
|
}
|
|
81
|
+
export interface TagProps extends ElementProps, BaseTagProps {
|
|
82
|
+
}
|
|
83
|
+
export interface TagWithAddonProps extends ComposedElementProps, BaseTagProps {
|
|
84
|
+
/** `Attribute` `Required` The text will be shown in the tag's addon */
|
|
85
|
+
addonText: string;
|
|
86
|
+
/** `Styling` Color on tag's addon based on bulma's color tokens */
|
|
87
|
+
addonColor?: ColorType;
|
|
88
|
+
}
|
|
79
89
|
export interface ImageProps extends ComposedElementProps, React.ComponentPropsWithoutRef<'figure'> {
|
|
80
90
|
/** `Attribute` `Required` The image source that will be shown */
|
|
81
91
|
src: string;
|
|
@@ -112,11 +122,11 @@ export interface IconProps extends ComposedElementProps {
|
|
|
112
122
|
/** `Attribute` Sets the text you want to show next to the icon */
|
|
113
123
|
text?: string;
|
|
114
124
|
/** `Styling` Color based on bulma's text color tokens */
|
|
115
|
-
color?:
|
|
125
|
+
color?: ColorType;
|
|
116
126
|
/** `Styling` Set icons's size */
|
|
117
|
-
size?:
|
|
127
|
+
size?: BaseSizeType;
|
|
118
128
|
/** `Styling` Special usage in case you want to set as dark or light mode */
|
|
119
|
-
colorMode?:
|
|
129
|
+
colorMode?: ColorModeType;
|
|
120
130
|
/** `Styling` Animates the icon spinning 360° */
|
|
121
131
|
isSpinning?: boolean;
|
|
122
132
|
/** `Styling` Used for `InputControl` styling purpose only. Will move the Icon itself to control's Input side */
|
|
@@ -134,9 +144,9 @@ export interface InputProps extends ElementProps, InteractiveProps, NamedInputPr
|
|
|
134
144
|
/** `Attribute` Will show the input as a normal one, but is not editable and has no shadow */
|
|
135
145
|
isReadonly?: boolean;
|
|
136
146
|
/** `Styling` Color based on bulma's text color tokens */
|
|
137
|
-
color?:
|
|
147
|
+
color?: ColorType;
|
|
138
148
|
/** `Styling` Set input's size */
|
|
139
|
-
size?:
|
|
149
|
+
size?: BaseSizeType;
|
|
140
150
|
/** `Styling` Will add round borders to input's shape */
|
|
141
151
|
isRounded?: boolean;
|
|
142
152
|
/** `Styling` Will add a specific border when the input is hovered by the user */
|
|
@@ -154,7 +164,7 @@ export interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
|
|
154
164
|
}
|
|
155
165
|
export interface DeleteProps extends ElementProps, ClickeableProps {
|
|
156
166
|
/** `Styling` Set icons's size */
|
|
157
|
-
size?:
|
|
167
|
+
size?: BaseSizeType;
|
|
158
168
|
}
|
|
159
169
|
export interface SelectOption {
|
|
160
170
|
id: string | number;
|
|
@@ -172,9 +182,9 @@ export interface SelectProps extends ComposedElementProps, InteractiveOnChangePr
|
|
|
172
182
|
/** `Attribute` Will allow multiple selection */
|
|
173
183
|
isMultiple?: boolean;
|
|
174
184
|
/** `Styling` Color based on bulma's color tokens */
|
|
175
|
-
color?:
|
|
185
|
+
color?: ColorType;
|
|
176
186
|
/** `Styling` Set select's size */
|
|
177
|
-
size?:
|
|
187
|
+
size?: SizeWithNormalType;
|
|
178
188
|
/** `Styling`Will add round borders to input's shape */
|
|
179
189
|
isRounded?: boolean;
|
|
180
190
|
/** `Styling`Will add a specific border when the input is hovered by the user */
|
|
@@ -196,9 +206,9 @@ export interface FileProps extends ComposedElementProps, InteractiveProps, Named
|
|
|
196
206
|
/** `Styling` Changes styling to a box style, making the button bigger and file name's position below the button */
|
|
197
207
|
isBoxed?: boolean;
|
|
198
208
|
/** `Styling` Color based on bulma's color tokens */
|
|
199
|
-
color?:
|
|
209
|
+
color?: ColorType;
|
|
200
210
|
/** `Styling` Set button's size */
|
|
201
|
-
size?:
|
|
211
|
+
size?: SizeWithNormalType;
|
|
202
212
|
}
|
|
203
213
|
export interface CheckBoxProps extends ComposedElementProps, InteractiveOnChangeProps, NamedInputProps {
|
|
204
214
|
/** `Attribute` Shows the checkbox as checked or unchecked */
|
|
@@ -225,6 +235,8 @@ export interface RadioButtonProps extends ComposedElementProps, InteractiveOnCha
|
|
|
225
235
|
export interface BreadcrumbItemProps extends ComposedElementProps, ClickeableProps {
|
|
226
236
|
/** `Attribute` `Required` Indicates item text that will be shown */
|
|
227
237
|
text: string;
|
|
238
|
+
/** `Attribute` Adds an `Icon` component before the text */
|
|
239
|
+
icon?: IconProps;
|
|
228
240
|
/** `Styling` Marks the item as the one where user is located (based on breadcrumb hierarchy) */
|
|
229
241
|
isActiveItem?: boolean;
|
|
230
242
|
}
|
|
@@ -280,7 +292,7 @@ export interface TileProps extends ElementProps {
|
|
|
280
292
|
/** `Styling` Set tile's size */
|
|
281
293
|
size?: CommonSizeType;
|
|
282
294
|
/** `Styling` Color based on bulma's color tokens */
|
|
283
|
-
color?:
|
|
295
|
+
color?: ColorType;
|
|
284
296
|
/** `Styling` Used for hierarchy level as ancestor or parent. It selects its children in a vertical format (like a column) */
|
|
285
297
|
isVertical?: boolean;
|
|
286
298
|
}
|
|
@@ -290,11 +302,30 @@ export interface NavBarItemProps extends ElementProps, ClickeableProps {
|
|
|
290
302
|
/** `Styling` Used for `NavBarDropdown` styling purpose only. Will mark the item as the one selected among its group */
|
|
291
303
|
isActive?: boolean;
|
|
292
304
|
}
|
|
293
|
-
export interface TableHeadCellProps extends ElementProps, ClickeableProps {
|
|
305
|
+
export interface TableHeadCellProps extends ElementProps, ColoredProps, ClickeableProps {
|
|
294
306
|
/** `Attribute` `Required` It will display cell's content, which could be text, an html tag or a custom component */
|
|
295
307
|
content: SingleChildType;
|
|
296
308
|
}
|
|
297
|
-
export interface TableCellProps extends ElementProps, ClickeableProps {
|
|
309
|
+
export interface TableCellProps extends ElementProps, ColoredProps, ClickeableProps {
|
|
298
310
|
/** `Attribute` `Required` It will display cell's content, which could be text, an html tag or a custom component */
|
|
299
311
|
content: SingleChildType;
|
|
300
312
|
}
|
|
313
|
+
export interface GridCellProps extends ElementProps, React.ComponentPropsWithoutRef<'section'> {
|
|
314
|
+
/** `Attribute` Reffers to the component or array of components that will be shown inside the cell */
|
|
315
|
+
children?: ChildrenType;
|
|
316
|
+
/** `Styling` Will adjust cell's position in the grid in specific points. If you want to set a specific position, work with wny of the other col/row `Start` or `StartFromEnd` properties */
|
|
317
|
+
position?: GridCellPositionType;
|
|
318
|
+
/** `Styling` Change which column a cell starts at */
|
|
319
|
+
colStart?: number;
|
|
320
|
+
/** `Styling` Change which row a cell starts at */
|
|
321
|
+
rowStart?: number;
|
|
322
|
+
/** `Styling` Change which column a cell ends at, counting from the end */
|
|
323
|
+
colStartFromEnd?: number;
|
|
324
|
+
/** `Styling` Change which row a cell ends at, counting from the end */
|
|
325
|
+
rowStartFromEnd?: number;
|
|
326
|
+
/** `Styling` Change how many columns a cell spans */
|
|
327
|
+
colSpan?: number;
|
|
328
|
+
/** `Styling` Change how many rows a cell spans */
|
|
329
|
+
rowSpan?: number;
|
|
330
|
+
}
|
|
331
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ColorType } from '../types/styleTypes';
|
|
1
2
|
export interface ContainerProps {
|
|
2
3
|
/** `Attribute` *For container case*. ID used to locate the element in unit test suites (like Jest) */
|
|
3
4
|
containerTestId?: string;
|
|
@@ -34,6 +35,10 @@ export interface InteractiveOnChangeProps extends Omit<InteractiveProps, 'onChan
|
|
|
34
35
|
/** `Function` Reffers to each time the user click the element (I recommend using this one rather than the `onClick` method). Alone does not nothing, but can be reused for other components */
|
|
35
36
|
onChange?: (event: React.ChangeEvent | React.FormEvent) => void;
|
|
36
37
|
}
|
|
38
|
+
export interface ColoredProps {
|
|
39
|
+
/** `Styling` Color based on bulma's color tokens */
|
|
40
|
+
color?: ColorType;
|
|
41
|
+
}
|
|
37
42
|
export interface NamedInputProps {
|
|
38
43
|
/** `Attribute` Used to reference the input in a form */
|
|
39
44
|
name?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClickeableProps, ComposedElementProps, ElementProps } from './commonProps';
|
|
2
|
-
import { BreadcrumbItemProps, ButtonProps, CheckBoxProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps, InputProps, MenuItemProps, NavBarItemProps, PaginationItemProps, RadioButtonProps, SelectProps, TabItemProps, TableCellProps, TableHeadCellProps, TextAreaProps } from './atomProps';
|
|
3
|
-
import {
|
|
1
|
+
import { ClickeableProps, ColoredProps, ComposedElementProps, ElementProps } from './commonProps';
|
|
2
|
+
import { BreadcrumbItemProps, ButtonProps, CheckBoxProps, ColumnProps, DeleteProps, DropdownItemProps, GridCellProps, IconProps, InputProps, MenuItemProps, NavBarItemProps, PaginationItemProps, RadioButtonProps, SelectProps, TabItemProps, TableCellProps, TableHeadCellProps, TagProps, TextAreaProps } from './atomProps';
|
|
3
|
+
import { ColorType, RightCenteredAlignType, BreadcrumbSeparatorType, ColumnGapType, BaseSizeType, TabsFormatType, MediumAndLargeSizeType, RightLeftAlignType, GridGapType, GridColumnGapType, GridRowGapType, GridCellMinWidthType, FixedGridColumnsType } from '../types/styleTypes';
|
|
4
4
|
import { ChildrenType, SingleChildType, PanelBlockItemType } from '../types/domTypes';
|
|
5
5
|
export interface ButtonGroupProps extends ElementProps {
|
|
6
6
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
|
@@ -30,7 +30,7 @@ export interface NotificationProps extends ElementProps {
|
|
|
30
30
|
/** `Atribute` Includes a `Delete` config object that will be shown */
|
|
31
31
|
deleteButton?: DeleteProps;
|
|
32
32
|
/** `Styling` Color based on bulma's color tokens */
|
|
33
|
-
color?:
|
|
33
|
+
color?: ColorType;
|
|
34
34
|
/** `Styling` Will adjust the selected color with a ligther style */
|
|
35
35
|
isLightColor?: boolean;
|
|
36
36
|
}
|
|
@@ -42,9 +42,15 @@ export interface BreadcrumbsProps extends ComposedElementProps {
|
|
|
42
42
|
/** `Styling` Will adjust element position on screen */
|
|
43
43
|
separator?: BreadcrumbSeparatorType | null;
|
|
44
44
|
/** `Styling` Set breadcrumb's size on bulma's size tokens */
|
|
45
|
-
size?:
|
|
45
|
+
size?: BaseSizeType;
|
|
46
46
|
}
|
|
47
47
|
export interface DropdownProps extends ElementProps {
|
|
48
|
+
/** `Styling` Will display dropdown content when the user hovers the mouse on the input */
|
|
49
|
+
isHoverable?: boolean;
|
|
50
|
+
/** `Styling` Will align dropdown's content to the right */
|
|
51
|
+
isRightAligned?: boolean;
|
|
52
|
+
/** `Styling` Will set dropdown's menu above its input */
|
|
53
|
+
isContentUp?: boolean;
|
|
48
54
|
/** `Atribute` `Required` Sets the name will be shown on the dropdown input */
|
|
49
55
|
inputText: string;
|
|
50
56
|
/** `Attribute` Sets a relationship between dropdown trigger's button and dropdown's menu to toggle display */
|
|
@@ -60,9 +66,9 @@ export interface MessageProps extends ElementProps {
|
|
|
60
66
|
/** `Atribute` Includes a `Delete` config object that will be shown */
|
|
61
67
|
deleteButton?: DeleteProps;
|
|
62
68
|
/** `Styling` Color based on bulma's color tokens */
|
|
63
|
-
color?:
|
|
69
|
+
color?: ColorType;
|
|
64
70
|
/** `Styling` Set button's size on bulma's size tokens */
|
|
65
|
-
size?:
|
|
71
|
+
size?: BaseSizeType;
|
|
66
72
|
}
|
|
67
73
|
interface MenuSubListProps {
|
|
68
74
|
subListTitle: MenuItemProps;
|
|
@@ -105,7 +111,7 @@ export interface PaginationProps extends ComposedElementProps {
|
|
|
105
111
|
/** `Styling` Will add round borders to each page's shape */
|
|
106
112
|
isRounded?: boolean;
|
|
107
113
|
/** `Styling` Set button's size on bulma's size tokens */
|
|
108
|
-
size?:
|
|
114
|
+
size?: BaseSizeType;
|
|
109
115
|
/** `Styling` Will adjust the pages position on screen */
|
|
110
116
|
alignment?: RightCenteredAlignType | null;
|
|
111
117
|
}
|
|
@@ -121,7 +127,7 @@ export interface TabsProps extends ElementProps {
|
|
|
121
127
|
/** `Styling` Will adjust the tabs position on screen */
|
|
122
128
|
alignment?: RightCenteredAlignType;
|
|
123
129
|
/** `Styling` Set tab's size on bulma's size tokens */
|
|
124
|
-
size?:
|
|
130
|
+
size?: BaseSizeType;
|
|
125
131
|
/** `Styling` Set tab's size on bulma's size tokens */
|
|
126
132
|
format?: TabsFormatType;
|
|
127
133
|
/** `Styling` Will add round tabs borders. Only visible if `format` is set to `is-toggle` */
|
|
@@ -129,19 +135,29 @@ export interface TabsProps extends ElementProps {
|
|
|
129
135
|
/** `Styling` The whole container will occupy its parent container width */
|
|
130
136
|
isFullWidth?: boolean;
|
|
131
137
|
}
|
|
138
|
+
export interface HelperProps {
|
|
139
|
+
text?: string;
|
|
140
|
+
color?: ColorType;
|
|
141
|
+
}
|
|
132
142
|
export interface InputControlProps extends ElementProps {
|
|
143
|
+
/** `Attribute` Sets a custom label above the Input to indicate its usage */
|
|
144
|
+
labelText?: string;
|
|
133
145
|
/** `Attribute` `Required` control's input configuration which will be wrapped */
|
|
134
146
|
inputConfig: InputProps;
|
|
147
|
+
/** `Attribute` Sets a custom text below the input to show a message */
|
|
148
|
+
helper?: HelperProps;
|
|
135
149
|
/** `Attribute` `Icon` configuration that will be shown in Input's left side */
|
|
136
150
|
leftIcon?: IconProps;
|
|
137
151
|
/** `Attribute` `Icon` configuration that will be shown in Input's right side */
|
|
138
152
|
rightIcon?: IconProps;
|
|
139
153
|
/** `Styling` Set control and its input size on bulma's size tokens */
|
|
140
|
-
size?:
|
|
154
|
+
size?: BaseSizeType;
|
|
141
155
|
/** `Styling` Will add an animated spinner on input's right side */
|
|
142
156
|
isLoading?: boolean;
|
|
143
157
|
/** `Styling` Used for `FormField` styling purpose only. Will strech the input and its container in full-width */
|
|
144
158
|
isExpanded?: boolean;
|
|
159
|
+
/** `Styling` Will adjust field's sections (label, input/s and helper) in horizontal position */
|
|
160
|
+
isHorizontal?: boolean;
|
|
145
161
|
}
|
|
146
162
|
export interface PanelBlockItemProps {
|
|
147
163
|
/** `Attribute` `Required` Indicates to component's parser which type of component will be rendered based on its option */
|
|
@@ -208,6 +224,8 @@ export interface NavBarDropdownProps extends ComposedElementProps {
|
|
|
208
224
|
hasDropdownUp?: boolean;
|
|
209
225
|
/** `Styling` Sets dropdown's menu design like a box, also adds some animation when its diplayed */
|
|
210
226
|
hasBoxedMenu?: boolean;
|
|
227
|
+
/** `Styling` Removes dropdown's indicating arrow */
|
|
228
|
+
isArrowLess?: boolean;
|
|
211
229
|
}
|
|
212
230
|
interface BrandConfigProps extends Omit<NavBarItemProps, 'children'> {
|
|
213
231
|
children: SingleChildType;
|
|
@@ -218,7 +236,7 @@ export interface NavBarBrandProps extends ElementProps {
|
|
|
218
236
|
/** `Styling` It sets brand's burger button as active (changing looks from a burger to a cross) */
|
|
219
237
|
isBurgerActive?: boolean;
|
|
220
238
|
}
|
|
221
|
-
export interface TableRowProps extends ElementProps, ClickeableProps {
|
|
239
|
+
export interface TableRowProps extends ElementProps, ColoredProps, ClickeableProps {
|
|
222
240
|
/** `Attribute` Configuration object to inject a `TableHeaderCell` as row's head */
|
|
223
241
|
headCell?: TableHeadCellProps;
|
|
224
242
|
/** `Attribute` `Required` List of `TableCell` that will be rendered on the table */
|
|
@@ -231,21 +249,48 @@ export declare enum FormFieldType {
|
|
|
231
249
|
SELECT = "select",
|
|
232
250
|
CHECKBOX = "checkbox",
|
|
233
251
|
RADIOBUTTON = "radiobutton",
|
|
234
|
-
TEXTAREA = "textarea"
|
|
252
|
+
TEXTAREA = "textarea",
|
|
253
|
+
BUTTON = "button"
|
|
235
254
|
}
|
|
236
|
-
export type FormFieldConfig = InputControlProps | SelectProps | CheckBoxProps | RadioButtonProps | TextAreaProps;
|
|
237
|
-
export interface
|
|
238
|
-
|
|
239
|
-
|
|
255
|
+
export type FormFieldConfig = InputControlProps | SelectProps | CheckBoxProps | RadioButtonProps | TextAreaProps | ButtonProps;
|
|
256
|
+
export interface FormFieldElement {
|
|
257
|
+
type: FormFieldType;
|
|
258
|
+
config: FormFieldConfig;
|
|
240
259
|
}
|
|
241
260
|
export interface FormFieldInputProps extends ElementProps {
|
|
242
|
-
/** `Attribute`
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
/** `Attribute`
|
|
247
|
-
|
|
261
|
+
/** `Attribute` `Required` Main input that will use the provided label and helper */
|
|
262
|
+
mainInput: FormFieldElement;
|
|
263
|
+
/** `Attribute` Input that will be included at main's left (will work only if `withAddons` is in `true`) */
|
|
264
|
+
leftInput?: FormFieldElement;
|
|
265
|
+
/** `Attribute` Input that will be included at main's right (will work only if `withAddons` is in `true`) */
|
|
266
|
+
rightInput?: FormFieldElement;
|
|
248
267
|
/** `Styling` Will adjust field's sections (label, input/s and helper) in horizontal position */
|
|
249
268
|
isHorizontal?: boolean;
|
|
250
269
|
}
|
|
270
|
+
export interface TagListProps extends ElementProps {
|
|
271
|
+
/** `Attribute` List of tags to fix their space evenly */
|
|
272
|
+
listOfTags: TagProps[];
|
|
273
|
+
}
|
|
274
|
+
export interface CheckboxGroupProps extends ElementProps {
|
|
275
|
+
/** `Attribute` `Required` A list of Checkbox config objetcs to be rendered in the same space */
|
|
276
|
+
listOfCheckboxes: CheckBoxProps[];
|
|
277
|
+
}
|
|
278
|
+
export interface GridProps extends ComposedElementProps {
|
|
279
|
+
/** `Attribute` `Required` `GridCell` A list of Cell config objetcs to be rendered as part of the grid */
|
|
280
|
+
listOfCells: GridCellProps[];
|
|
281
|
+
/** `Styling` Will change the space between columns and rows at the same level. This value will be nullify if `isFixed` is true */
|
|
282
|
+
gap?: GridGapType;
|
|
283
|
+
/** `Styling` Will change the space between columns. This value will be nullify if `gap` has a value or if `isFixed` is true */
|
|
284
|
+
columnGap?: GridColumnGapType;
|
|
285
|
+
/** `Styling` Will change the space between rows. This value will be nullify if `gap` has a value or if `isFixed` is true */
|
|
286
|
+
rowGap?: GridRowGapType;
|
|
287
|
+
/** `Styling` Will change the minimum column width by increments of `1.5rem` */
|
|
288
|
+
cellMinWidth?: GridCellMinWidthType;
|
|
289
|
+
/** `Styling` Will set a fixed amount of columns per row. If is not set at `fixedColumnsCount`, it will be set at 2 columns */
|
|
290
|
+
isFixed?: boolean;
|
|
291
|
+
/** `Styling` Will change the amount of columns shown per row */
|
|
292
|
+
fixedColumnsCount?: FixedGridColumnsType;
|
|
293
|
+
/** `Styling` Will set grid's columns automatically, changing its count for each breakpoint */
|
|
294
|
+
isAutoColumns?: boolean;
|
|
295
|
+
}
|
|
251
296
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var E = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.SELECT = "select", t.CHECKBOX = "checkbox", t.RADIOBUTTON = "radiobutton", t.TEXTAREA = "textarea", t))(E || {});
|
|
1
|
+
var E = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.SELECT = "select", t.CHECKBOX = "checkbox", t.RADIOBUTTON = "radiobutton", t.TEXTAREA = "textarea", t.BUTTON = "button", t))(E || {});
|
|
2
2
|
export {
|
|
3
3
|
E as FormFieldType
|
|
4
4
|
};
|