reactive-bulma 2.11.0 → 2.12.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/dist/cjs/index.js +77 -34
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/molecules/PanelBlock/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/PanelTabs/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/index.d.ts +2 -1
- package/dist/cjs/types/components/{molecules → organisms}/FormField/index.d.ts +1 -1
- package/dist/cjs/types/components/organisms/Panel/index.d.ts +4 -0
- package/dist/cjs/types/components/organisms/index.d.ts +2 -0
- package/dist/cjs/types/functions/generators.d.ts +4 -0
- package/dist/cjs/types/functions/parsers.d.ts +1 -4
- package/dist/cjs/types/functions/tests/generators.test.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +2 -2
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +23 -14
- package/dist/cjs/types/interfaces/organismProps.d.ts +29 -0
- package/dist/cjs/types/types/domTypes.d.ts +3 -2
- package/dist/esm/index.js +75 -35
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/molecules/PanelBlock/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/PanelTabs/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/index.d.ts +2 -1
- package/dist/esm/types/components/{molecules → organisms}/FormField/index.d.ts +1 -1
- package/dist/esm/types/components/organisms/Panel/index.d.ts +4 -0
- package/dist/esm/types/components/organisms/index.d.ts +2 -0
- package/dist/esm/types/functions/generators.d.ts +4 -0
- package/dist/esm/types/functions/parsers.d.ts +1 -4
- package/dist/esm/types/functions/tests/generators.test.d.ts +1 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +2 -2
- package/dist/esm/types/interfaces/moleculeProps.d.ts +23 -14
- package/dist/esm/types/interfaces/organismProps.d.ts +29 -0
- package/dist/esm/types/types/domTypes.d.ts +3 -2
- package/dist/index.d.ts +59 -17
- package/package.json +11 -11
@@ -10,4 +10,5 @@ export { default as Pagination } from './Pagination';
|
|
10
10
|
export { default as Modal } from './Modal';
|
11
11
|
export { default as Tabs } from './Tabs';
|
12
12
|
export { default as InputControl } from './InputControl';
|
13
|
-
export { default as
|
13
|
+
export { default as PanelBlock } from './PanelBlock';
|
14
|
+
export { default as PanelTabs } from './PanelTabs';
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { GenericObjectProps } from '../interfaces/commonProps';
|
2
|
+
import { CreateObjArrayProps } from '../interfaces/functionProps';
|
3
|
+
export declare const generateKey: (max?: number, min?: number) => string;
|
4
|
+
export declare const createObjArray: <ImportedProps>({ numberOfItems, externalParser }?: CreateObjArrayProps) => ImportedProps[] | GenericObjectProps[];
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { CreateObjArrayProps, ParseTestIdProps } from '../interfaces/functionProps';
|
1
|
+
import { ParseTestIdProps } from '../interfaces/functionProps';
|
3
2
|
/**
|
4
3
|
* @param { Array<string | null> } _classes `Required`. Array of classNames on `string` (or `null`) values
|
5
4
|
* @returns { string } A single string product of merge all classNames, separated by spaces
|
@@ -13,5 +12,3 @@ export declare const parseClasses: (_classes: Array<string | null | undefined>)
|
|
13
12
|
* @returns A single string product of merge all classNames, separated by `separator` value
|
14
13
|
*/
|
15
14
|
export declare const parseTestId: (config: ParseTestIdProps) => string;
|
16
|
-
export declare const parseKey: (max?: number, min?: number) => string;
|
17
|
-
export declare const createObjArray: <ImportedProps>({ numberOfItems, externalParser }?: CreateObjArrayProps) => ImportedProps[] | GenericObjectProps[];
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ElementProps, ComposedElementProps, ClickeableProps } from './commonProps';
|
3
3
|
import { basicColorType, columnOffsetType, columnSizeType, fixedImageSizeType, iconColorModeType, elementSizeType, sizeWithoutNormalType, textColorType, titleSizeType, rightLeftAlignType } from '../types/styleTypes';
|
4
|
-
import { DropdownItemType,
|
4
|
+
import { DropdownItemType, InputType } 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?: string | React.ReactElement | React.ReactElement[];
|
@@ -124,7 +124,7 @@ export interface IconProps extends ComposedElementProps {
|
|
124
124
|
}
|
125
125
|
export interface InputProps extends ElementProps, ClickeableProps {
|
126
126
|
/** `Attribute` `Required` What type of input will be used */
|
127
|
-
type:
|
127
|
+
type: InputType;
|
128
128
|
/** `Attribute` The value that will be shown on the input */
|
129
129
|
text?: string;
|
130
130
|
/** `Attribute` The text that will be shown if the user does not type any value */
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import { ClickeableProps, ComposedElementProps, ElementProps } from './commonProps';
|
3
3
|
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps, InputProps, MenuItemProps, PaginationItemProps, TabItemProps } from './atomProps';
|
4
4
|
import { basicColorType, rightCenteredAlignType, breadcrumbSeparatorType, columnGapType, sizeWithoutNormalType, tabsFormatType } from '../types/styleTypes';
|
5
|
+
import { PanelBlockItemType } from '../types/domTypes';
|
5
6
|
export interface ButtonGroupProps extends ElementProps {
|
6
7
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
7
8
|
buttonList: ButtonProps[];
|
@@ -143,20 +144,28 @@ export interface InputControlProps extends ElementProps {
|
|
143
144
|
/** `Styling` Used for `FormField` styling purpose only. Will strech the input and its container in full-width */
|
144
145
|
isExpanded?: boolean;
|
145
146
|
}
|
146
|
-
export interface
|
147
|
-
|
148
|
-
|
147
|
+
export interface PanelBlockItemProps {
|
148
|
+
/** `Attribute` `Required` Indicates to component's parser which type of component will be rendered based on its option */
|
149
|
+
type: PanelBlockItemType;
|
150
|
+
/** `Attribute` `Required` The component properties that will configure that specific instance */
|
151
|
+
props: InputControlProps | IconProps | ButtonProps;
|
152
|
+
}
|
153
|
+
export interface PanelBlockProps extends ComposedElementProps, ClickeableProps {
|
154
|
+
/** `Attribute` `Required` Configuration object with a type and a set of props based on the available components that could be rendered in each `PanelBlock` */
|
155
|
+
config: PanelBlockItemProps;
|
156
|
+
/** `Attribute` Usable when config's U is `icon` only. It will display a text next to mentioned icon (for user purposes) */
|
157
|
+
blockText?: string;
|
158
|
+
/** `Styling` Used for `PanelBlock` styling purpose only. Will mark its rendered component as the one selected among its group */
|
159
|
+
isActive?: boolean;
|
160
|
+
}
|
161
|
+
export interface PanelTabItem extends ClickeableProps {
|
162
|
+
/** `Attribute` `Required` Will show the text to the user in shape of tab */
|
163
|
+
text: string;
|
164
|
+
/** `Styling` Used for `PanelTab` styling purpose only. Will mark its rendered component as the one selected among its group */
|
165
|
+
isActive?: boolean;
|
149
166
|
}
|
150
|
-
export interface
|
151
|
-
/** `Attribute`
|
152
|
-
|
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;
|
167
|
+
export interface PanelTabsProps extends ElementProps {
|
168
|
+
/** `Attribute` `Required` A list of configuration objects that will render a set of tabs */
|
169
|
+
tabList: PanelTabItem[];
|
161
170
|
}
|
162
171
|
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { ElementProps } from './commonProps';
|
2
|
+
import { InputControlProps, PanelBlockProps, PanelTabsProps } from './moleculeProps';
|
3
|
+
import { basicColorType } from '../types/styleTypes';
|
4
|
+
export interface FormFieldHelperProps {
|
5
|
+
text?: string;
|
6
|
+
color?: basicColorType;
|
7
|
+
}
|
8
|
+
export interface FormFieldProps extends ElementProps {
|
9
|
+
/** `Attribute` `Required` Single or multiple `InputControlProps` config objects which will be wrapped around the `FormField` */
|
10
|
+
inputControlConfig: InputControlProps | InputControlProps[];
|
11
|
+
/** `Attribute` Sets a custom text before the wrapped input to indicate its usage */
|
12
|
+
labelText?: string;
|
13
|
+
/** `Attribute` Adds a helper text below the wrapped paragraph to provide context information */
|
14
|
+
helperConfig?: FormFieldHelperProps;
|
15
|
+
/** `Styling` Will adjust field's sections (label, input/s and helper) in horizontal position */
|
16
|
+
isHorizontal?: boolean;
|
17
|
+
/** `Styling` Will group the list of inputs in a same wrapper (useful for several inputs with same usage, as a complex address) */
|
18
|
+
isGrouped?: boolean;
|
19
|
+
}
|
20
|
+
export interface PanelProps extends ElementProps {
|
21
|
+
/** `Attribute` `Required` Will display Panel's header text */
|
22
|
+
headerText: string;
|
23
|
+
/** `Attribute` A configuration object that will render a set of tabs based on `PanelTab` component */
|
24
|
+
panelTabs?: PanelTabsProps;
|
25
|
+
/** `Attribute` `Required` A list of configuration objects that will render a list of block with different components, based on `PanelBlockList` component */
|
26
|
+
blockList: PanelBlockProps[];
|
27
|
+
/** `Styling` Color based on bulma's text color tokens */
|
28
|
+
color?: basicColorType;
|
29
|
+
}
|
@@ -1,3 +1,4 @@
|
|
1
|
-
export type
|
2
|
-
export type
|
1
|
+
export type ButtonType = 'submit' | 'reset' | 'button';
|
2
|
+
export type InputType = 'text' | 'password' | 'email' | 'tel';
|
3
3
|
export type DropdownItemType = 'item' | 'link' | 'divider';
|
4
|
+
export type PanelBlockItemType = 'icon' | 'control' | 'button';
|
package/dist/index.d.ts
CHANGED
@@ -40,8 +40,9 @@ type rightLeftAlignType = Exclude<elementAlignType, 'is-centered'>;
|
|
40
40
|
type breadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
|
41
41
|
type tabsFormatType = 'is-boxed' | 'is-toggle';
|
42
42
|
|
43
|
-
type
|
43
|
+
type InputType = 'text' | 'password' | 'email' | 'tel';
|
44
44
|
type DropdownItemType = 'item' | 'link' | 'divider';
|
45
|
+
type PanelBlockItemType = 'icon' | 'control' | 'button';
|
45
46
|
|
46
47
|
interface ColumnProps extends ElementProps, React$1.ComponentPropsWithoutRef<'section'> {
|
47
48
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
@@ -165,7 +166,7 @@ interface IconProps extends ComposedElementProps {
|
|
165
166
|
}
|
166
167
|
interface InputProps extends ElementProps, ClickeableProps {
|
167
168
|
/** `Attribute` `Required` What type of input will be used */
|
168
|
-
type:
|
169
|
+
type: InputType;
|
169
170
|
/** `Attribute` The value that will be shown on the input */
|
170
171
|
text?: string;
|
171
172
|
/** `Attribute` The text that will be shown if the user does not type any value */
|
@@ -498,21 +499,29 @@ interface InputControlProps extends ElementProps {
|
|
498
499
|
/** `Styling` Used for `FormField` styling purpose only. Will strech the input and its container in full-width */
|
499
500
|
isExpanded?: boolean;
|
500
501
|
}
|
501
|
-
interface
|
502
|
-
|
503
|
-
|
502
|
+
interface PanelBlockItemProps {
|
503
|
+
/** `Attribute` `Required` Indicates to component's parser which type of component will be rendered based on its option */
|
504
|
+
type: PanelBlockItemType;
|
505
|
+
/** `Attribute` `Required` The component properties that will configure that specific instance */
|
506
|
+
props: InputControlProps | IconProps | ButtonProps;
|
507
|
+
}
|
508
|
+
interface PanelBlockProps extends ComposedElementProps, ClickeableProps {
|
509
|
+
/** `Attribute` `Required` Configuration object with a type and a set of props based on the available components that could be rendered in each `PanelBlock` */
|
510
|
+
config: PanelBlockItemProps;
|
511
|
+
/** `Attribute` Usable when config's U is `icon` only. It will display a text next to mentioned icon (for user purposes) */
|
512
|
+
blockText?: string;
|
513
|
+
/** `Styling` Used for `PanelBlock` styling purpose only. Will mark its rendered component as the one selected among its group */
|
514
|
+
isActive?: boolean;
|
504
515
|
}
|
505
|
-
interface
|
506
|
-
/** `Attribute`
|
507
|
-
|
508
|
-
/** `
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
/** `
|
513
|
-
|
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
|
+
interface PanelTabItem extends ClickeableProps {
|
517
|
+
/** `Attribute` `Required` Will show the text to the user in shape of tab */
|
518
|
+
text: string;
|
519
|
+
/** `Styling` Used for `PanelTab` styling purpose only. Will mark its rendered component as the one selected among its group */
|
520
|
+
isActive?: boolean;
|
521
|
+
}
|
522
|
+
interface PanelTabsProps extends ElementProps {
|
523
|
+
/** `Attribute` `Required` A list of configuration objects that will render a set of tabs */
|
524
|
+
tabList: PanelTabItem[];
|
516
525
|
}
|
517
526
|
|
518
527
|
declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
|
@@ -539,6 +548,39 @@ declare const Tabs: React$1.FC<TabsProps>;
|
|
539
548
|
|
540
549
|
declare const InputControl: React$1.FC<InputControlProps>;
|
541
550
|
|
551
|
+
declare const PanelBlock: React$1.FC<PanelBlockProps>;
|
552
|
+
|
553
|
+
declare const PanelTabs: React$1.FC<PanelTabsProps>;
|
554
|
+
|
555
|
+
interface FormFieldHelperProps {
|
556
|
+
text?: string;
|
557
|
+
color?: basicColorType;
|
558
|
+
}
|
559
|
+
interface FormFieldProps extends ElementProps {
|
560
|
+
/** `Attribute` `Required` Single or multiple `InputControlProps` config objects which will be wrapped around the `FormField` */
|
561
|
+
inputControlConfig: InputControlProps | InputControlProps[];
|
562
|
+
/** `Attribute` Sets a custom text before the wrapped input to indicate its usage */
|
563
|
+
labelText?: string;
|
564
|
+
/** `Attribute` Adds a helper text below the wrapped paragraph to provide context information */
|
565
|
+
helperConfig?: FormFieldHelperProps;
|
566
|
+
/** `Styling` Will adjust field's sections (label, input/s and helper) in horizontal position */
|
567
|
+
isHorizontal?: boolean;
|
568
|
+
/** `Styling` Will group the list of inputs in a same wrapper (useful for several inputs with same usage, as a complex address) */
|
569
|
+
isGrouped?: boolean;
|
570
|
+
}
|
571
|
+
interface PanelProps extends ElementProps {
|
572
|
+
/** `Attribute` `Required` Will display Panel's header text */
|
573
|
+
headerText: string;
|
574
|
+
/** `Attribute` A configuration object that will render a set of tabs based on `PanelTab` component */
|
575
|
+
panelTabs?: PanelTabsProps;
|
576
|
+
/** `Attribute` `Required` A list of configuration objects that will render a list of block with different components, based on `PanelBlockList` component */
|
577
|
+
blockList: PanelBlockProps[];
|
578
|
+
/** `Styling` Color based on bulma's text color tokens */
|
579
|
+
color?: basicColorType;
|
580
|
+
}
|
581
|
+
|
542
582
|
declare const FormField: React$1.FC<FormFieldProps>;
|
543
583
|
|
544
|
-
|
584
|
+
declare const Panel: React$1.FC<PanelProps>;
|
585
|
+
|
586
|
+
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, Panel, PanelBlock, PanelTabs, ProgressBar, RadioButton, Select, TabItem, Tabs, Tag, TextArea, Title };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "reactive-bulma",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.12.0",
|
4
4
|
"description": "A component library based on React, Bulma, Typescript and Rollup",
|
5
5
|
"keywords": [
|
6
6
|
"typescript",
|
@@ -67,14 +67,14 @@
|
|
67
67
|
"@semantic-release/github": "^9.2.6",
|
68
68
|
"@semantic-release/npm": "^11.0.2",
|
69
69
|
"@semantic-release/release-notes-generator": "^12.1.0",
|
70
|
-
"@storybook/addon-actions": "^7.6.
|
71
|
-
"@storybook/addon-essentials": "^7.6.
|
72
|
-
"@storybook/addon-interactions": "^7.6.
|
73
|
-
"@storybook/addon-links": "^7.6.
|
74
|
-
"@storybook/addon-mdx-gfm": "^7.6.
|
75
|
-
"@storybook/cli": "^7.6.
|
76
|
-
"@storybook/react": "^7.6.
|
77
|
-
"@storybook/react-webpack5": "^7.6.
|
70
|
+
"@storybook/addon-actions": "^7.6.10",
|
71
|
+
"@storybook/addon-essentials": "^7.6.10",
|
72
|
+
"@storybook/addon-interactions": "^7.6.10",
|
73
|
+
"@storybook/addon-links": "^7.6.10",
|
74
|
+
"@storybook/addon-mdx-gfm": "^7.6.10",
|
75
|
+
"@storybook/cli": "^7.6.10",
|
76
|
+
"@storybook/react": "^7.6.10",
|
77
|
+
"@storybook/react-webpack5": "^7.6.10",
|
78
78
|
"@storybook/testing-library": "^0.2.2",
|
79
79
|
"@testing-library/jest-dom": "^6.2.0",
|
80
80
|
"@testing-library/react": "^14.1.2",
|
@@ -96,14 +96,14 @@
|
|
96
96
|
"lint-staged": "^15.2.0",
|
97
97
|
"npm-check-updates": "^16.14.12",
|
98
98
|
"postcss": "^8.4.33",
|
99
|
-
"prettier": "^3.2.
|
99
|
+
"prettier": "^3.2.4",
|
100
100
|
"react": "^18.2.0",
|
101
101
|
"react-dom": "^18.2.0",
|
102
102
|
"rollup": "^4.9.5",
|
103
103
|
"rollup-plugin-dts": "^6.1.0",
|
104
104
|
"rollup-plugin-postcss": "^4.0.2",
|
105
105
|
"semantic-release": "^23.0.0",
|
106
|
-
"storybook": "^7.6.
|
106
|
+
"storybook": "^7.6.10",
|
107
107
|
"tslib": "^2.6.2",
|
108
108
|
"typescript": "^5.3.3"
|
109
109
|
},
|