reactive-bulma 2.6.0 → 2.7.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/dist/cjs/index.js +54 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/MenuItem/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +1 -0
- package/dist/cjs/types/components/molecules/Menu/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/MenuList/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/index.d.ts +2 -0
- package/dist/cjs/types/functions/parsers.d.ts +1 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +6 -0
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +21 -1
- package/dist/esm/index.js +52 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/MenuItem/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +1 -0
- package/dist/esm/types/components/molecules/Menu/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/MenuList/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/index.d.ts +2 -0
- package/dist/esm/types/functions/parsers.d.ts +1 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +6 -0
- package/dist/esm/types/interfaces/moleculeProps.d.ts +21 -1
- package/dist/index.d.ts +32 -1
- package/package.json +11 -11
@@ -16,3 +16,4 @@ export { default as RadioButton } from './RadioButton';
|
|
16
16
|
export { default as BreadcrumbItem } from './BreadcrumbItem';
|
17
17
|
export { default as DropdownTrigger } from './DropdownTrigger';
|
18
18
|
export { default as DropdownItem } from './DropdownItem';
|
19
|
+
export { default as MenuItem } from './MenuItem';
|
@@ -4,3 +4,5 @@ export { default as Notification } from './Notification';
|
|
4
4
|
export { default as Breadcrumbs } from './Breadcrumbs';
|
5
5
|
export { default as Dropdown } from './Dropdown';
|
6
6
|
export { default as Message } from './Message';
|
7
|
+
export { default as Menu } from './Menu';
|
8
|
+
export { default as MenuList } from './MenuList';
|
@@ -12,3 +12,4 @@ export declare const parseClasses: (_classes: Array<string | null | undefined>)
|
|
12
12
|
* @returns A single string product of merge all classNames, separated by `separator` value
|
13
13
|
*/
|
14
14
|
export declare const parseTestId: (config: ParseTestIdProps) => string;
|
15
|
+
export declare const parseKey: (max?: number, min?: number) => string;
|
@@ -241,3 +241,9 @@ export interface DropdownItemProps extends ElementProps, ClickeableProps {
|
|
241
241
|
/** `Styling` Marks the item as the one where user is located (based on dropdown hierarchy) */
|
242
242
|
isActiveItem?: boolean;
|
243
243
|
}
|
244
|
+
export interface MenuItemProps extends ElementProps, ClickeableProps {
|
245
|
+
/** `Attribute` `Required` Sets the text will be shown on the menu item */
|
246
|
+
text: string;
|
247
|
+
/** `Styling` Generates a blue background to mark the item as the active one in the `MenuList` */
|
248
|
+
isActive?: boolean;
|
249
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ComposedElementProps, ElementProps } from './commonProps';
|
3
|
-
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps } from './atomProps';
|
3
|
+
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, MenuItemProps } from './atomProps';
|
4
4
|
import { basicColorType, basicSizeType, breadcrumbAlignType, breadcrumbSeparatorType, columnGapType } from '../types/styleTypes';
|
5
5
|
export interface ButtonGroupProps extends ElementProps {
|
6
6
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
@@ -64,3 +64,23 @@ export interface MessageProps extends ElementProps {
|
|
64
64
|
/** `Styling` Set button's size on bulma's size tokens */
|
65
65
|
size?: Exclude<basicSizeType, 'is-normal'>;
|
66
66
|
}
|
67
|
+
interface MenuSubListProps {
|
68
|
+
subListTitle: MenuItemProps;
|
69
|
+
subItems: MenuItemProps[];
|
70
|
+
}
|
71
|
+
type MenuListItemType = MenuItemProps | MenuSubListProps;
|
72
|
+
export interface MenuListProps extends ElementProps {
|
73
|
+
/** `Attribute` `Required` List of menu items that can be used as single ones or in a list/sublist format */
|
74
|
+
itemList: Array<MenuListItemType>;
|
75
|
+
}
|
76
|
+
interface MenuSectionProps {
|
77
|
+
/** `Attribute` `Required` Label that will be show at the beginning of each section */
|
78
|
+
label: string;
|
79
|
+
/** `Attribute` `Required` List of menu items that can be used as single ones or in a list/sublist format */
|
80
|
+
itemList: Array<MenuListItemType>;
|
81
|
+
}
|
82
|
+
export interface MenuProps extends ElementProps {
|
83
|
+
/** `Attribute` `Required` List of sections that can be single or second level MenuItems */
|
84
|
+
menuSections: MenuSectionProps[];
|
85
|
+
}
|
86
|
+
export {};
|
package/dist/index.d.ts
CHANGED
@@ -269,6 +269,12 @@ interface DropdownItemProps extends ElementProps, ClickeableProps {
|
|
269
269
|
/** `Styling` Marks the item as the one where user is located (based on dropdown hierarchy) */
|
270
270
|
isActiveItem?: boolean;
|
271
271
|
}
|
272
|
+
interface MenuItemProps extends ElementProps, ClickeableProps {
|
273
|
+
/** `Attribute` `Required` Sets the text will be shown on the menu item */
|
274
|
+
text: string;
|
275
|
+
/** `Styling` Generates a blue background to mark the item as the active one in the `MenuList` */
|
276
|
+
isActive?: boolean;
|
277
|
+
}
|
272
278
|
|
273
279
|
declare const Button: React$1.FC<ButtonProps>;
|
274
280
|
|
@@ -306,6 +312,8 @@ declare const DropdownTrigger: React$1.FC<DropdownTriggerProps>;
|
|
306
312
|
|
307
313
|
declare const DropdownItem: React$1.FC<DropdownItemProps>;
|
308
314
|
|
315
|
+
declare const MenuItem: React$1.FC<MenuItemProps>;
|
316
|
+
|
309
317
|
interface ButtonGroupProps extends ElementProps {
|
310
318
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
311
319
|
buttonList: ButtonProps[];
|
@@ -368,6 +376,25 @@ interface MessageProps extends ElementProps {
|
|
368
376
|
/** `Styling` Set button's size on bulma's size tokens */
|
369
377
|
size?: Exclude<basicSizeType, 'is-normal'>;
|
370
378
|
}
|
379
|
+
interface MenuSubListProps {
|
380
|
+
subListTitle: MenuItemProps;
|
381
|
+
subItems: MenuItemProps[];
|
382
|
+
}
|
383
|
+
type MenuListItemType = MenuItemProps | MenuSubListProps;
|
384
|
+
interface MenuListProps extends ElementProps {
|
385
|
+
/** `Attribute` `Required` List of menu items that can be used as single ones or in a list/sublist format */
|
386
|
+
itemList: Array<MenuListItemType>;
|
387
|
+
}
|
388
|
+
interface MenuSectionProps {
|
389
|
+
/** `Attribute` `Required` Label that will be show at the beginning of each section */
|
390
|
+
label: string;
|
391
|
+
/** `Attribute` `Required` List of menu items that can be used as single ones or in a list/sublist format */
|
392
|
+
itemList: Array<MenuListItemType>;
|
393
|
+
}
|
394
|
+
interface MenuProps extends ElementProps {
|
395
|
+
/** `Attribute` `Required` List of sections that can be single or second level MenuItems */
|
396
|
+
menuSections: MenuSectionProps[];
|
397
|
+
}
|
371
398
|
|
372
399
|
declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
|
373
400
|
|
@@ -381,4 +408,8 @@ declare const Dropdown: React$1.FC<DropdownProps>;
|
|
381
408
|
|
382
409
|
declare const Message: React$1.FC<MessageProps>;
|
383
410
|
|
384
|
-
|
411
|
+
declare const Menu: React$1.FC<MenuProps>;
|
412
|
+
|
413
|
+
declare const MenuList: React$1.FC<MenuListProps>;
|
414
|
+
|
415
|
+
export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, Icon, Input, Menu, MenuItem, MenuList, Message, Notification, ProgressBar, RadioButton, Select, Tag, TextArea, Title };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "reactive-bulma",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.7.0",
|
4
4
|
"description": "A component library based on React, Bulma, Typescript and Rollup",
|
5
5
|
"keywords": [
|
6
6
|
"typescript",
|
@@ -52,10 +52,10 @@
|
|
52
52
|
"update:doctor": "npm run lint && npm run test && npm run build"
|
53
53
|
},
|
54
54
|
"devDependencies": {
|
55
|
-
"@babel/core": "^7.23.
|
56
|
-
"@babel/preset-env": "^7.23.
|
57
|
-
"@babel/preset-react": "^7.
|
58
|
-
"@babel/preset-typescript": "^7.23.
|
55
|
+
"@babel/core": "^7.23.3",
|
56
|
+
"@babel/preset-env": "^7.23.3",
|
57
|
+
"@babel/preset-react": "^7.23.3",
|
58
|
+
"@babel/preset-typescript": "^7.23.3",
|
59
59
|
"@mdi/font": "^7.3.67",
|
60
60
|
"@rollup/plugin-commonjs": "^25.0.7",
|
61
61
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
@@ -64,7 +64,7 @@
|
|
64
64
|
"@semantic-release/commit-analyzer": "^11.1.0",
|
65
65
|
"@semantic-release/exec": "^6.0.3",
|
66
66
|
"@semantic-release/git": "^10.0.1",
|
67
|
-
"@semantic-release/github": "^9.2.
|
67
|
+
"@semantic-release/github": "^9.2.3",
|
68
68
|
"@semantic-release/npm": "^11.0.1",
|
69
69
|
"@semantic-release/release-notes-generator": "^12.1.0",
|
70
70
|
"@storybook/addon-actions": "^7.5.3",
|
@@ -77,10 +77,10 @@
|
|
77
77
|
"@storybook/react-webpack5": "^7.5.3",
|
78
78
|
"@storybook/testing-library": "^0.2.2",
|
79
79
|
"@testing-library/jest-dom": "^6.1.4",
|
80
|
-
"@testing-library/react": "^14.
|
80
|
+
"@testing-library/react": "^14.1.0",
|
81
81
|
"@testing-library/user-event": "^14.5.1",
|
82
|
-
"@types/jest": "^29.5.
|
83
|
-
"@types/react": "^18.2.
|
82
|
+
"@types/jest": "^29.5.8",
|
83
|
+
"@types/react": "^18.2.37",
|
84
84
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
85
85
|
"@typescript-eslint/parser": "^6.10.0",
|
86
86
|
"babel-jest": "^29.7.0",
|
@@ -93,13 +93,13 @@
|
|
93
93
|
"hygen": "^6.2.11",
|
94
94
|
"jest": "^29.7.0",
|
95
95
|
"jest-environment-jsdom": "^29.7.0",
|
96
|
-
"lint-staged": "^15.0
|
96
|
+
"lint-staged": "^15.1.0",
|
97
97
|
"npm-check-updates": "^16.14.6",
|
98
98
|
"postcss": "^8.4.31",
|
99
99
|
"prettier": "^3.0.3",
|
100
100
|
"react": "^18.2.0",
|
101
101
|
"react-dom": "^18.2.0",
|
102
|
-
"rollup": "^4.3.
|
102
|
+
"rollup": "^4.3.1",
|
103
103
|
"rollup-plugin-dts": "^6.1.0",
|
104
104
|
"rollup-plugin-postcss": "^4.0.2",
|
105
105
|
"semantic-release": "^22.0.7",
|