reactive-bulma 2.14.0 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +81 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/Tile/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +1 -0
- package/dist/cjs/types/components/molecules/TileBox/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/index.d.ts +1 -0
- package/dist/cjs/types/components/organisms/TileGroup/index.d.ts +4 -0
- package/dist/cjs/types/components/organisms/index.d.ts +1 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +14 -3
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +4 -3
- package/dist/cjs/types/interfaces/organismProps.d.ts +9 -4
- package/dist/cjs/types/types/domTypes.d.ts +9 -0
- package/dist/cjs/types/types/styleTypes.d.ts +4 -2
- package/dist/esm/index.js +79 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/Tile/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +1 -0
- package/dist/esm/types/components/molecules/TileBox/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/index.d.ts +1 -0
- package/dist/esm/types/components/organisms/TileGroup/index.d.ts +4 -0
- package/dist/esm/types/components/organisms/index.d.ts +1 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +14 -3
- package/dist/esm/types/interfaces/moleculeProps.d.ts +4 -3
- package/dist/esm/types/interfaces/organismProps.d.ts +9 -4
- package/dist/esm/types/types/domTypes.d.ts +9 -0
- package/dist/esm/types/types/styleTypes.d.ts +4 -2
- package/dist/index.d.ts +33 -7
- package/package.json +1 -1
- package/dist/cjs/types/types/componentEnums.d.ts +0 -8
- package/dist/esm/types/types/componentEnums.d.ts +0 -8
@@ -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';
|
@@ -1,8 +1,7 @@
|
|
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';
|
5
|
-
import { ChildrenType } from '../types/componentEnums';
|
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';
|
6
5
|
export interface ColumnProps extends ElementProps, React.ComponentPropsWithoutRef<'section'> {
|
7
6
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
8
7
|
children?: ChildrenType;
|
@@ -278,3 +277,15 @@ export interface LevelHeaderProps extends ElementProps {
|
|
278
277
|
/** `Attribute` `Required` Main value (numeric or text) to be shown in a bigger scale below `header` */
|
279
278
|
value: string | number;
|
280
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
1
|
import { ClickeableProps, ComposedElementProps, ElementProps } from './commonProps';
|
2
|
-
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps, InputProps, MenuItemProps, PaginationItemProps, TabItemProps } from './atomProps';
|
2
|
+
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps, InputProps, MenuItemProps, PaginationItemProps, TabItemProps, TileProps } from './atomProps';
|
3
3
|
import { BasicColorType, RightCenteredAlignType, BreadcrumbSeparatorType, ColumnGapType, SizeWithoutNormalType, TabsFormatType } from '../types/styleTypes';
|
4
|
-
import { PanelBlockItemType } from '../types/domTypes';
|
5
|
-
import { ChildrenType, SingleChildType } from '../types/componentEnums';
|
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[];
|
@@ -174,4 +173,6 @@ export interface LevelItemProps extends ElementProps {
|
|
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,7 +1,8 @@
|
|
1
1
|
import { ElementProps } from './commonProps';
|
2
2
|
import { InputControlProps, LevelItemProps, PanelBlockProps, PanelTabsProps } from './moleculeProps';
|
3
3
|
import { BasicColorType, SizeWithoutNormalType } from '../types/styleTypes';
|
4
|
-
import { ChildrenType } from '../types/
|
4
|
+
import { ChildrenType } from '../types/domTypes';
|
5
|
+
import { TileProps } from './atomProps';
|
5
6
|
export interface FormFieldHelperProps {
|
6
7
|
text?: string;
|
7
8
|
color?: BasicColorType;
|
@@ -29,11 +30,11 @@ export interface PanelProps extends ElementProps {
|
|
29
30
|
color?: BasicColorType;
|
30
31
|
}
|
31
32
|
export interface LevelProps extends ElementProps {
|
32
|
-
/** `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 */
|
33
34
|
leftSide?: LevelItemProps[];
|
34
|
-
/** `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 */
|
35
36
|
centerSide?: LevelItemProps[];
|
36
|
-
/** `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 */
|
37
38
|
rightSide?: LevelItemProps[];
|
38
39
|
/** `Styling` Will adjust the navigator on horizontal on mobile as well */
|
39
40
|
isMobile?: boolean;
|
@@ -50,3 +51,7 @@ export interface HeroProps extends ElementProps {
|
|
50
51
|
/** `Styling` Color based on bulma's text color tokens */
|
51
52
|
color?: BasicColorType;
|
52
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,6 +1,8 @@
|
|
1
|
-
export type
|
2
|
-
export type
|
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;
|
3
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';
|
4
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';
|
5
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';
|
6
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';
|
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 =
|
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) {
|
@@ -3715,5 +3767,30 @@ const Hero = ({ testId = null, cssClasses = null, style = null, header = null, b
|
|
3715
3767
|
size === 'is-fullheight' ? (React.createElement("section", { "data-testid": `${heroTestId}-foot`, className: 'hero-foot' }, footer)) : null));
|
3716
3768
|
};
|
3717
3769
|
|
3718
|
-
|
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 };
|
3719
3796
|
//# sourceMappingURL=index.js.map
|