reactive-bulma 2.13.0 → 2.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. package/dist/cjs/index.js +91 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/atoms/Tile/index.d.ts +4 -0
  4. package/dist/cjs/types/components/atoms/index.d.ts +1 -0
  5. package/dist/cjs/types/components/molecules/TileBox/index.d.ts +4 -0
  6. package/dist/cjs/types/components/molecules/index.d.ts +1 -0
  7. package/dist/cjs/types/components/organisms/Hero/index.d.ts +4 -0
  8. package/dist/cjs/types/components/organisms/TileGroup/index.d.ts +4 -0
  9. package/dist/cjs/types/components/organisms/index.d.ts +2 -0
  10. package/dist/cjs/types/interfaces/atomProps.d.ts +40 -28
  11. package/dist/cjs/types/interfaces/moleculeProps.d.ts +21 -20
  12. package/dist/cjs/types/interfaces/organismProps.d.ts +24 -6
  13. package/dist/cjs/types/types/domTypes.d.ts +9 -0
  14. package/dist/cjs/types/types/styleTypes.d.ts +17 -15
  15. package/dist/esm/index.js +88 -2
  16. package/dist/esm/index.js.map +1 -1
  17. package/dist/esm/types/components/atoms/Tile/index.d.ts +4 -0
  18. package/dist/esm/types/components/atoms/index.d.ts +1 -0
  19. package/dist/esm/types/components/molecules/TileBox/index.d.ts +4 -0
  20. package/dist/esm/types/components/molecules/index.d.ts +1 -0
  21. package/dist/esm/types/components/organisms/Hero/index.d.ts +4 -0
  22. package/dist/esm/types/components/organisms/TileGroup/index.d.ts +4 -0
  23. package/dist/esm/types/components/organisms/index.d.ts +2 -0
  24. package/dist/esm/types/interfaces/atomProps.d.ts +40 -28
  25. package/dist/esm/types/interfaces/moleculeProps.d.ts +21 -20
  26. package/dist/esm/types/interfaces/organismProps.d.ts +24 -6
  27. package/dist/esm/types/types/domTypes.d.ts +9 -0
  28. package/dist/esm/types/types/styleTypes.d.ts +17 -15
  29. package/dist/index.d.ts +106 -63
  30. package/package.json +1 -1
  31. package/dist/cjs/types/types/componentEnums.d.ts +0 -5
  32. package/dist/esm/types/types/componentEnums.d.ts +0 -5
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TileProps } from '../../../interfaces/atomProps';
3
+ declare const Tile: React.FC<TileProps>;
4
+ export default Tile;
@@ -21,3 +21,4 @@ export { default as Image } from './Image';
21
21
  export { default as PaginationItem } from './PaginationItem';
22
22
  export { default as TabItem } from './TabItem';
23
23
  export { default as LevelHeader } from './LevelHeader';
24
+ export { default as Tile } from './Tile';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TileBoxProps } from '../../../interfaces/moleculeProps';
3
+ declare const TileBox: React.FC<TileBoxProps>;
4
+ export default TileBox;
@@ -13,3 +13,4 @@ export { default as InputControl } from './InputControl';
13
13
  export { default as PanelBlock } from './PanelBlock';
14
14
  export { default as PanelTabs } from './PanelTabs';
15
15
  export { default as LevelItem } from '../molecules/LevelItem';
16
+ export { default as TileBox } from './TileBox';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { HeroProps } from '../../../interfaces/organismProps';
3
+ declare const Hero: React.FC<HeroProps>;
4
+ export default Hero;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TileGroupProps } from '../../../interfaces/organismProps';
3
+ declare const TileGroup: React.FC<TileGroupProps>;
4
+ export default TileGroup;
@@ -1,3 +1,5 @@
1
1
  export { default as FormField } from './FormField';
2
2
  export { default as Panel } from './Panel';
3
3
  export { default as Level } from './Level';
4
+ export { default as Hero } from './Hero';
5
+ export { default as TileGroup } from './TileGroup';
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import { ElementProps, ComposedElementProps, ClickeableProps } from './commonProps';
3
- import { basicColorType, columnOffsetType, columnSizeType, fixedImageSizeType, iconColorModeType, elementSizeType, sizeWithoutNormalType, textColorType, titleSizeType, rightLeftAlignType } from '../types/styleTypes';
4
- import { DropdownItemType, InputType } from '../types/domTypes';
3
+ import { BasicColorType, ColumnOffsetType, ColumnSizeType, FixedImageSizeType, IconColorModeType, ElementSizeType, SizeWithoutNormalType, TextColorType, TitleSizeType, RightLeftAlignType, CommonSizeType } from '../types/styleTypes';
4
+ import { DropdownItemType, InputType, ChildrenType, TileContextType } 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
- children?: string | React.ReactElement | React.ReactElement[];
7
+ children?: ChildrenType;
8
8
  /** `Styling` Set column's size */
9
- size?: columnSizeType;
9
+ size?: ColumnSizeType;
10
10
  /** `Styling` Set column's offset (moving it as you set its size */
11
- offset?: columnOffsetType;
11
+ offset?: ColumnOffsetType;
12
12
  /** `Styling` Set if the column only will take the space it needs */
13
13
  isNarrow?: boolean;
14
14
  }
@@ -18,7 +18,7 @@ export interface ButtonProps extends ElementProps, React.ComponentPropsWithoutRe
18
18
  /** `Attribute` Will disable the button */
19
19
  isDisabled?: boolean;
20
20
  /** `Styling` Color based on bulma's color tokens */
21
- color?: basicColorType;
21
+ color?: BasicColorType;
22
22
  /** `Styling` Will adjust the selected color with a ligther style */
23
23
  isLightColor?: boolean;
24
24
  /** `Styling` Will invert button's colors (typography in color and background in white or black) */
@@ -34,7 +34,7 @@ export interface ButtonProps extends ElementProps, React.ComponentPropsWithoutRe
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?: elementSizeType;
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
  }
@@ -44,15 +44,15 @@ export interface ProgressBarProps extends ElementProps, React.ComponentPropsWith
44
44
  /** `Attribute` Sets the entire bar length comparing with current `value` */
45
45
  max?: number;
46
46
  /** `Styling` Color based on bulma's color tokens */
47
- color?: basicColorType;
47
+ color?: BasicColorType;
48
48
  /** `Styling` Set progress bar's size */
49
- size?: elementSizeType;
49
+ size?: ElementSizeType;
50
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'> {
54
54
  /** `Attribute` Reffers to the component or array of components that will be shown inside the block */
55
- children?: string | React.ReactElement | React.ReactElement[];
55
+ children?: ChildrenType;
56
56
  }
57
57
  export interface TagProps extends ComposedElementProps, React.ComponentPropsWithoutRef<'span'> {
58
58
  /** `Attribute` `Required` The text will be shown in the `Tag` */
@@ -64,15 +64,15 @@ export interface TagProps extends ComposedElementProps, React.ComponentPropsWith
64
64
  /** `Attribute` The text will be shown in the tag's addon */
65
65
  addonText?: string;
66
66
  /** `Styling` Color based on bulma's color tokens */
67
- color?: basicColorType;
67
+ color?: BasicColorType;
68
68
  /** `Styling` Will adjust the selected color with a ligther style */
69
69
  isLight?: boolean;
70
70
  /** `Styling` Will add round borders to tag's shape */
71
71
  isRounded?: boolean;
72
72
  /** `Styling` Set tag's size */
73
- size?: sizeWithoutNormalType;
73
+ size?: SizeWithoutNormalType;
74
74
  /** `Styling` Color on tag's addon based on bulma's color tokens */
75
- addonColor?: basicColorType;
75
+ addonColor?: BasicColorType;
76
76
  /** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
77
77
  onDeleteClick?: () => void;
78
78
  }
@@ -82,19 +82,19 @@ export interface ImageProps extends ComposedElementProps, React.ComponentPropsWi
82
82
  /** `Attribute` A description text for the image, useful for accessibility purposes */
83
83
  alt?: string;
84
84
  /** `Styling` Will add round borders to image's shape */
85
- fixedSize?: fixedImageSizeType;
85
+ fixedSize?: FixedImageSizeType;
86
86
  /** `Styling` Sets image size based on one of fixed ratios/fixed sizes */
87
87
  isRounded?: boolean;
88
88
  }
89
89
  export interface BoxProps extends ElementProps, React.ComponentPropsWithoutRef<'section'> {
90
90
  /** `Attribute` Reffers to the component or array of components that will be shown inside the box */
91
- children?: string | React.ReactElement | React.ReactElement[];
91
+ children?: ChildrenType;
92
92
  }
93
93
  export interface TitleSectionProps extends ElementProps, React.ComponentPropsWithoutRef<'p'> {
94
94
  /** `Attribute` Sets the text you want to show */
95
95
  text: string;
96
96
  /** `Styling` Set text size */
97
- size?: titleSizeType;
97
+ size?: TitleSizeType;
98
98
  /** `Styling` Set type of title (`title` at top, `subtitle` at below) */
99
99
  type: 'title' | 'subtitle';
100
100
  /** `Styling` Set text spacing at default or maximun length */
@@ -112,15 +112,15 @@ export interface IconProps extends ComposedElementProps {
112
112
  /** `Attribute` Sets the text you want to show next to the icon */
113
113
  text?: string;
114
114
  /** `Styling` Color based on bulma's text color tokens */
115
- color?: textColorType;
115
+ color?: TextColorType;
116
116
  /** `Styling` Set icons's size */
117
- size?: sizeWithoutNormalType;
117
+ size?: SizeWithoutNormalType;
118
118
  /** `Styling` Special usage in case you want to set as dark or light mode */
119
- colorMode?: iconColorModeType;
119
+ colorMode?: IconColorModeType;
120
120
  /** `Styling` Animates the icon spinning 360° */
121
121
  isSpinning?: boolean;
122
122
  /** `Styling` Used for `InputControl` styling purpose only. Will move the Icon itself to control's Input side */
123
- position?: rightLeftAlignType;
123
+ position?: RightLeftAlignType;
124
124
  }
125
125
  export interface InputProps extends ElementProps, ClickeableProps {
126
126
  /** `Attribute` `Required` What type of input will be used */
@@ -134,9 +134,9 @@ export interface InputProps extends ElementProps, ClickeableProps {
134
134
  /** `Attribute` Will show the input as a normal one, but is not editable and has no shadow */
135
135
  isReadonly?: boolean;
136
136
  /** `Styling` Color based on bulma's text color tokens */
137
- color?: basicColorType;
137
+ color?: BasicColorType;
138
138
  /** `Styling` Set input's size */
139
- size?: sizeWithoutNormalType;
139
+ size?: SizeWithoutNormalType;
140
140
  /** `Styling` Will add round borders to input's shape */
141
141
  isRounded?: boolean;
142
142
  /** `Styling` Will add a specific border when the input is hovered by the user */
@@ -156,7 +156,7 @@ export interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
156
156
  }
157
157
  export interface DeleteProps extends ElementProps, ClickeableProps {
158
158
  /** `Styling` Set icons's size */
159
- size?: sizeWithoutNormalType;
159
+ size?: SizeWithoutNormalType;
160
160
  }
161
161
  export interface SelectOption {
162
162
  id: string | number;
@@ -171,9 +171,9 @@ export interface SelectProps extends ComposedElementProps, ClickeableProps {
171
171
  /** `Attribute` Will allow multiple selection */
172
172
  isMultiple?: boolean;
173
173
  /** `Styling` Color based on bulma's color tokens */
174
- color?: basicColorType;
174
+ color?: BasicColorType;
175
175
  /** `Styling` Set select's size */
176
- size?: elementSizeType;
176
+ size?: ElementSizeType;
177
177
  /** `Styling`Will add round borders to input's shape */
178
178
  isRounded?: boolean;
179
179
  /** `Styling`Will add a specific border when the input is hovered by the user */
@@ -195,13 +195,13 @@ export interface FileProps extends ComposedElementProps, ClickeableProps {
195
195
  /** `Styling` Changes styling to a box style, making the button bigger and file name's position below the button */
196
196
  isBoxed?: boolean;
197
197
  /** `Styling` Color based on bulma's color tokens */
198
- color?: basicColorType;
198
+ color?: BasicColorType;
199
199
  /** `Styling` Set button's size */
200
- size?: elementSizeType;
200
+ size?: ElementSizeType;
201
201
  }
202
202
  export interface CheckBoxProps extends ComposedElementProps {
203
203
  /** `Attribute` Sets checkbox's text that will be shown next to its control */
204
- content?: string | React.ReactElement | React.ReactElement[];
204
+ content?: ChildrenType;
205
205
  /** `Attribute` Will disable the checkbox */
206
206
  isDisabled?: boolean;
207
207
  /** `Function` Click function, alone does not nothing, but can be reused for other components */
@@ -277,3 +277,15 @@ export interface LevelHeaderProps extends ElementProps {
277
277
  /** `Attribute` `Required` Main value (numeric or text) to be shown in a bigger scale below `header` */
278
278
  value: string | number;
279
279
  }
280
+ export interface TileProps extends ElementProps {
281
+ /** `Attribute` Reffers to the component or array of components that will be shown inside the tile */
282
+ children?: ChildrenType;
283
+ /** `Attribute` Indicates its hierarchy level based on [Bulma documantation](https://bulma.io/documentation/layout/tiles/#nesting-requirements). Selection any level besides `is-child` will invalidate any `color` you select */
284
+ context?: TileContextType;
285
+ /** `Styling` Set tile's size */
286
+ size?: CommonSizeType;
287
+ /** `Styling` Color based on bulma's color tokens */
288
+ color?: BasicColorType;
289
+ /** `Styling` Used for hierarchy level as ancestor or parent. It selects its children in a vertical format (like a column) */
290
+ isVertical?: boolean;
291
+ }
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { ClickeableProps, ComposedElementProps, ElementProps } from './commonProps';
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
- import { PanelBlockItemType } from '../types/domTypes';
2
+ import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps, InputProps, MenuItemProps, PaginationItemProps, TabItemProps, TileProps } from './atomProps';
3
+ import { BasicColorType, RightCenteredAlignType, BreadcrumbSeparatorType, ColumnGapType, SizeWithoutNormalType, TabsFormatType } from '../types/styleTypes';
4
+ import { ChildrenType, SingleChildType, PanelBlockItemType } from '../types/domTypes';
6
5
  export interface ButtonGroupProps extends ElementProps {
7
6
  /** `Atribute` `Required` Array of `Button` objects that will be shown */
8
7
  buttonList: ButtonProps[];
@@ -23,15 +22,15 @@ export interface ColumnGroupProps extends ElementProps {
23
22
  /** `Styling` Will center the list of columns horizontally */
24
23
  isHorizontallyCentered?: boolean;
25
24
  /** `Styling` Will adjust the space between the columns. In case to set null, it will remove those gaps */
26
- gap?: columnGapType | null;
25
+ gap?: ColumnGapType | null;
27
26
  }
28
27
  export interface NotificationProps extends ElementProps {
29
28
  /** `Attribute` Reffers to the component or array of components that will be shown inside the column */
30
- children?: string | React.ReactElement | React.ReactElement[];
29
+ children?: ChildrenType;
31
30
  /** `Atribute` Includes a `Delete` config object that will be shown */
32
31
  deleteButton?: DeleteProps;
33
32
  /** `Styling` Color based on bulma's color tokens */
34
- color?: basicColorType;
33
+ color?: BasicColorType;
35
34
  /** `Styling` Will adjust the selected color with a ligther style */
36
35
  isLightColor?: boolean;
37
36
  }
@@ -39,11 +38,11 @@ export interface BreadcrumbsProps extends ComposedElementProps {
39
38
  /** `Atribute` `Required` Array of `BreadcrumbItems` objects that will be shown */
40
39
  items: BreadcrumbItemProps[];
41
40
  /** `Styling` Will adjust element position on screen */
42
- alignment?: rightCenteredAlignType | null;
41
+ alignment?: RightCenteredAlignType | null;
43
42
  /** `Styling` Will adjust element position on screen */
44
- separator?: breadcrumbSeparatorType | null;
43
+ separator?: BreadcrumbSeparatorType | null;
45
44
  /** `Styling` Set button's size on bulma's size tokens */
46
- size?: sizeWithoutNormalType;
45
+ size?: SizeWithoutNormalType;
47
46
  }
48
47
  export interface DropdownProps extends ElementProps {
49
48
  /** `Atribute` `Required` Sets the name will be shown on the dropdown input */
@@ -61,9 +60,9 @@ export interface MessageProps extends ElementProps {
61
60
  /** `Atribute` Includes a `Delete` config object that will be shown */
62
61
  deleteButton?: DeleteProps;
63
62
  /** `Styling` Color based on bulma's color tokens */
64
- color?: basicColorType;
63
+ color?: BasicColorType;
65
64
  /** `Styling` Set button's size on bulma's size tokens */
66
- size?: sizeWithoutNormalType;
65
+ size?: SizeWithoutNormalType;
67
66
  }
68
67
  interface MenuSubListProps {
69
68
  subListTitle: MenuItemProps;
@@ -106,13 +105,13 @@ export interface PaginationProps extends ComposedElementProps {
106
105
  /** `Styling` Will add round borders to each page's shape */
107
106
  isRounded?: boolean;
108
107
  /** `Styling` Set button's size on bulma's size tokens */
109
- size?: sizeWithoutNormalType;
108
+ size?: SizeWithoutNormalType;
110
109
  /** `Styling` Will adjust the pages position on screen */
111
- alignment?: rightCenteredAlignType | null;
110
+ alignment?: RightCenteredAlignType | null;
112
111
  }
113
112
  export interface ModalProps extends ComposedElementProps {
114
113
  /** `Attribute` Reffers to the component or array of components that will be shown inside the column */
115
- children?: string | React.ReactElement | React.ReactElement[] | null;
114
+ children?: ChildrenType | null;
116
115
  /** `Function` Custom function related to the modal's close button to inject custom code if needed */
117
116
  onCloseClick?: () => void;
118
117
  }
@@ -120,11 +119,11 @@ export interface TabsProps extends ElementProps {
120
119
  /** `Attribute` `Required` List of tabs that will be shown in order */
121
120
  tabs: TabItemProps[];
122
121
  /** `Styling` Will adjust the tabs position on screen */
123
- alignment?: rightCenteredAlignType;
122
+ alignment?: RightCenteredAlignType;
124
123
  /** `Styling` Set tab's size on bulma's size tokens */
125
- size?: sizeWithoutNormalType;
124
+ size?: SizeWithoutNormalType;
126
125
  /** `Styling` Set tab's size on bulma's size tokens */
127
- format?: tabsFormatType;
126
+ format?: TabsFormatType;
128
127
  /** `Styling` Will add round tabs borders. Only visible if `format` is set to `is-toggle` */
129
128
  isRounded?: boolean;
130
129
  /** `Styling` The whole container will occupy its parent container width */
@@ -138,7 +137,7 @@ export interface InputControlProps extends ElementProps {
138
137
  /** `Attribute` `Icon` configuration that will be shown in Input's right side */
139
138
  rightIcon?: IconProps;
140
139
  /** `Styling` Set control and its input size on bulma's size tokens */
141
- size?: sizeWithoutNormalType;
140
+ size?: SizeWithoutNormalType;
142
141
  /** `Styling` Will add an animated spinner on input's right side */
143
142
  isLoading?: boolean;
144
143
  /** `Styling` Used for `FormField` styling purpose only. Will strech the input and its container in full-width */
@@ -170,8 +169,10 @@ export interface PanelTabsProps extends ElementProps {
170
169
  }
171
170
  export interface LevelItemProps extends ElementProps {
172
171
  /** `Attribute` `Required` Reffers to the component or string content that will be shown inside the level */
173
- content: string | React.ReactElement;
172
+ content: SingleChildType;
174
173
  /** `Styling` Centers item's content horizontally */
175
174
  isCentered?: boolean;
176
175
  }
176
+ export interface TileBoxProps extends TileProps {
177
+ }
177
178
  export {};
@@ -1,9 +1,11 @@
1
1
  import { ElementProps } from './commonProps';
2
2
  import { InputControlProps, LevelItemProps, PanelBlockProps, PanelTabsProps } from './moleculeProps';
3
- import { basicColorType } from '../types/styleTypes';
3
+ import { BasicColorType, SizeWithoutNormalType } from '../types/styleTypes';
4
+ import { ChildrenType } from '../types/domTypes';
5
+ import { TileProps } from './atomProps';
4
6
  export interface FormFieldHelperProps {
5
7
  text?: string;
6
- color?: basicColorType;
8
+ color?: BasicColorType;
7
9
  }
8
10
  export interface FormFieldProps extends ElementProps {
9
11
  /** `Attribute` `Required` Single or multiple `InputControlProps` config objects which will be wrapped around the `FormField` */
@@ -25,15 +27,31 @@ export interface PanelProps extends ElementProps {
25
27
  /** `Attribute` `Required` A list of configuration objects that will render a list of block with different components, based on `PanelBlockList` component */
26
28
  blockList: PanelBlockProps[];
27
29
  /** `Styling` Color based on bulma's text color tokens */
28
- color?: basicColorType;
30
+ color?: BasicColorType;
29
31
  }
30
32
  export interface LevelProps extends ElementProps {
31
- /** `Attribute` A list of `LevelItem` configurations that will displayed in Level's left side */
33
+ /** `Attribute` A list of `LevelItem` configurations that will br displayed in Level's left side */
32
34
  leftSide?: LevelItemProps[];
33
- /** `Attribute` A list of `LevelItem` configurations that will displayed in Level's center */
35
+ /** `Attribute` A list of `LevelItem` configurations that will br displayed in Level's center */
34
36
  centerSide?: LevelItemProps[];
35
- /** `Attribute` A list of `LevelItem` configurations that will displayed in Level's right side */
37
+ /** `Attribute` A list of `LevelItem` configurations that will br displayed in Level's right side */
36
38
  rightSide?: LevelItemProps[];
37
39
  /** `Styling` Will adjust the navigator on horizontal on mobile as well */
38
40
  isMobile?: boolean;
39
41
  }
42
+ export interface HeroProps extends ElementProps {
43
+ /** `Attribute` Designated section for hero's header, it will be visible only if container's `size` is setted to `is-fullheight` */
44
+ header?: ChildrenType;
45
+ /** `Attribute` `Required` Designated section for hero's body */
46
+ body: ChildrenType;
47
+ /** `Attribute` Designated section for hero's footer, it will be visible only if container's `size` is setted to `is-fullheight` */
48
+ footer?: ChildrenType;
49
+ /** `Styling` Set hero's size */
50
+ size?: SizeWithoutNormalType | 'is-halfheight' | 'is-fullheight';
51
+ /** `Styling` Color based on bulma's text color tokens */
52
+ color?: BasicColorType;
53
+ }
54
+ export interface TileGroupProps extends ElementProps, Pick<TileProps, 'context' | 'isVertical' | 'size'> {
55
+ /** `Attribute` `Required` A list of `Title` configurations that will be displayed in a grid mode on the screen */
56
+ groupConfig: TileProps[];
57
+ }
@@ -1,4 +1,13 @@
1
+ import React from 'react';
1
2
  export type ButtonType = 'submit' | 'reset' | 'button';
2
3
  export type InputType = 'text' | 'password' | 'email' | 'tel';
3
4
  export type DropdownItemType = 'item' | 'link' | 'divider';
4
5
  export type PanelBlockItemType = 'icon' | 'control' | 'button';
6
+ export type ChildrenType = string | React.ReactElement | React.ReactElement[];
7
+ export type SingleChildType = Exclude<ChildrenType, React.ReactElement[]>;
8
+ export declare enum IconSizeEnum {
9
+ 'is-small' = 24,
10
+ 'is-medium' = 36,
11
+ 'is-large' = 48
12
+ }
13
+ export type TileContextType = 'is-child' | 'is-parent' | 'is-ancestor';
@@ -1,15 +1,17 @@
1
- export 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';
2
- export type titleSizeType = 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6';
3
- export 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';
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
- 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
- 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 elementSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
8
- export type sizeWithoutNormalType = Exclude<elementSizeType, 'is-normal'>;
9
- export type iconColorModeType = 'light' | 'dark';
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' | 'is-left';
12
- export type rightCenteredAlignType = Exclude<elementAlignType, 'is-left'>;
13
- export type rightLeftAlignType = Exclude<elementAlignType, 'is-centered'>;
14
- export type breadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
15
- export type tabsFormatType = 'is-boxed' | 'is-toggle';
1
+ export type CommonSizeType = 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8' | 'is-9' | 'is-10' | 'is-11' | 'is-12';
2
+ export type AbstractSizeType = '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';
3
+ export type ColumnSizeType = CommonSizeType | AbstractSizeType;
4
+ export 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';
5
+ export type TitleSizeType = 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6';
6
+ 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';
7
+ 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';
8
+ 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';
9
+ export type ElementSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
10
+ export type SizeWithoutNormalType = Exclude<ElementSizeType, 'is-normal'>;
11
+ export type IconColorModeType = 'light' | 'dark';
12
+ export type ColumnGapType = 'is-0' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8';
13
+ export type ElementAlignType = 'is-centered' | 'is-right' | 'is-left';
14
+ export type RightCenteredAlignType = Exclude<ElementAlignType, 'is-left'>;
15
+ export type RightLeftAlignType = Exclude<ElementAlignType, 'is-centered'>;
16
+ export type BreadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
17
+ export type TabsFormatType = 'is-boxed' | 'is-toggle';
package/dist/esm/index.js CHANGED
@@ -3243,7 +3243,7 @@ const MenuItem = ({ testId = null, cssClasses = null, style = null, text, isActi
3243
3243
  return (React.createElement("a", { "data-testid": menuItemTestId, className: menuItemClasses, style: style !== null && style !== void 0 ? style : undefined, "aria-hidden": 'true', onClick: onClick !== null && onClick !== void 0 ? onClick : undefined }, text));
3244
3244
  };
3245
3245
 
3246
- const Image = ({ testId = null, containerTestId = null, cssClasses = null, containerCssClasses = null, style = null, containerStyle = null, src, alt = null, fixedSize = 'is-1by1', isRounded = false }) => {
3246
+ const Image = ({ testId = null, containerTestId = null, cssClasses = null, containerCssClasses = null, style = null, containerStyle = null, src, alt = null, fixedSize = null, isRounded = false }) => {
3247
3247
  const imageContainerClasses = parseClasses([
3248
3248
  'image',
3249
3249
  fixedSize,
@@ -3291,6 +3291,32 @@ const LevelHeader = ({ testId = null, cssClasses = null, style = null, header, v
3291
3291
  React.createElement("p", { className: 'title' }, value)));
3292
3292
  };
3293
3293
 
3294
+ const Tile = ({ testId = null, cssClasses = null, style = null, children, context = null, size = null, color = null, isVertical = false }) => {
3295
+ const tileClasses = parseClasses([
3296
+ 'tile',
3297
+ context,
3298
+ size,
3299
+ color ? `notification ${color}` : null,
3300
+ isVertical ? 'is-vertical' : null,
3301
+ cssClasses
3302
+ ]);
3303
+ const tileTestId = testId !== null && testId !== void 0 ? testId : parseTestId({
3304
+ tag: 'tile',
3305
+ parsedClasses: tileClasses,
3306
+ rules: [
3307
+ {
3308
+ regExp: /notification |tile/gm,
3309
+ replacer: ''
3310
+ },
3311
+ {
3312
+ regExp: /is-/gm,
3313
+ replacer: '-'
3314
+ }
3315
+ ]
3316
+ });
3317
+ return (React.createElement("section", { "data-testid": tileTestId, className: tileClasses, style: style !== null && style !== void 0 ? style : undefined }, children));
3318
+ };
3319
+
3294
3320
  const generateKey = (max = 5000, min = 1) => {
3295
3321
  max = Math.floor(max);
3296
3322
  min = Math.ceil(min);
@@ -3639,6 +3665,32 @@ const LevelItem = ({ testId = null, cssClasses = null, style = null, content, is
3639
3665
  return (React.createElement("section", { "data-testid": levelItemTestId, className: levelItemClasses, style: style !== null && style !== void 0 ? style : undefined }, content));
3640
3666
  };
3641
3667
 
3668
+ const TileBox = ({ testId = null, cssClasses = 'box', style = null, children = null, context = 'is-child', size, color, isVertical }) => {
3669
+ const tileBoxClasses = parseClasses([
3670
+ 'tileBox',
3671
+ context,
3672
+ size,
3673
+ color ? `notification ${color}` : null,
3674
+ isVertical ? 'is-vertical' : null,
3675
+ cssClasses
3676
+ ]);
3677
+ const tileBoxTestId = testId !== null && testId !== void 0 ? testId : parseTestId({
3678
+ tag: 'tileBox',
3679
+ parsedClasses: tileBoxClasses,
3680
+ rules: [
3681
+ {
3682
+ regExp: /notification |tileBox/gm,
3683
+ replacer: ''
3684
+ },
3685
+ {
3686
+ regExp: /is-/gm,
3687
+ replacer: '-'
3688
+ }
3689
+ ]
3690
+ });
3691
+ return (React.createElement(Tile, { testId: tileBoxTestId, cssClasses: cssClasses, style: style !== null && style !== void 0 ? style : undefined, isVertical: isVertical, context: context, size: size, color: color }, children !== null && children !== void 0 ? children : undefined));
3692
+ };
3693
+
3642
3694
  const renderFieldLabel = (labelText) => labelText ? (React.createElement("label", { "data-testid": 'test-form-field-label', className: 'label' }, labelText)) : null;
3643
3695
  const renderFieldBody = (inputControlConfig, isGrouped) => {
3644
3696
  if (isGrouped) {
@@ -3706,5 +3758,39 @@ const Level = ({ testId = null, cssClasses = null, style = null, leftSide = null
3706
3758
  rightSide ? (React.createElement("section", { className: 'level-right' }, renderLevelSection(rightSide))) : null));
3707
3759
  };
3708
3760
 
3709
- export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, FormField, 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 };
3761
+ const Hero = ({ testId = null, cssClasses = null, style = null, header = null, body, footer = null, color = null, size = null }) => {
3762
+ const heroClasses = parseClasses(['hero', color, size, cssClasses]);
3763
+ const heroTestId = testId !== null && testId !== void 0 ? testId : parseTestId({ tag: 'hero', parsedClasses: heroClasses });
3764
+ return (React.createElement("section", { "data-testid": heroTestId, className: heroClasses, style: style !== null && style !== void 0 ? style : undefined },
3765
+ size === 'is-fullheight' ? (React.createElement("section", { "data-testid": `${heroTestId}-head`, className: 'hero-head' }, header)) : null,
3766
+ React.createElement("section", { "data-testid": `${heroTestId}-body`, className: 'hero-body' }, body),
3767
+ size === 'is-fullheight' ? (React.createElement("section", { "data-testid": `${heroTestId}-foot`, className: 'hero-foot' }, footer)) : null));
3768
+ };
3769
+
3770
+ const TileGroup = ({ testId = null, cssClasses = null, style = null, context = 'is-ancestor', size = null, isVertical = false, groupConfig }) => {
3771
+ const tileGroupClasses = parseClasses([
3772
+ 'tileGroup',
3773
+ context,
3774
+ size,
3775
+ isVertical ? 'is-vertical' : null,
3776
+ cssClasses
3777
+ ]);
3778
+ const tileBoxTestId = testId !== null && testId !== void 0 ? testId : parseTestId({
3779
+ tag: 'tileGroup',
3780
+ parsedClasses: tileGroupClasses,
3781
+ rules: [
3782
+ {
3783
+ regExp: /tileGroup/gm,
3784
+ replacer: ''
3785
+ },
3786
+ {
3787
+ regExp: /is-/gm,
3788
+ replacer: '-'
3789
+ }
3790
+ ]
3791
+ });
3792
+ return (React.createElement(Tile, { testId: tileBoxTestId, cssClasses: cssClasses !== null && cssClasses !== void 0 ? cssClasses : undefined, style: style !== null && style !== void 0 ? style : undefined, context: context, size: size !== null && size !== void 0 ? size : undefined, isVertical: isVertical }, groupConfig.map(tileConfig => (React.createElement(Tile, Object.assign({ key: `tile-item-${generateKey()}` }, tileConfig))))));
3793
+ };
3794
+
3795
+ 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, Tile, TileBox, TileGroup, Title };
3710
3796
  //# sourceMappingURL=index.js.map