reactive-bulma 3.0.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +147 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/NavBarItem/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +1 -0
- package/dist/cjs/types/components/molecules/NavBarBrand/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/NavBarDropdown/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/index.d.ts +2 -0
- package/dist/cjs/types/components/organisms/Card/index.d.ts +4 -0
- package/dist/cjs/types/components/organisms/NavBar/index.d.ts +4 -0
- package/dist/cjs/types/components/organisms/index.d.ts +2 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +7 -1
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +27 -2
- package/dist/cjs/types/interfaces/organismProps.d.ts +39 -4
- package/dist/cjs/types/types/domTypes.d.ts +1 -0
- package/dist/esm/index.js +143 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/NavBarItem/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +1 -0
- package/dist/esm/types/components/molecules/NavBarBrand/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/NavBarDropdown/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/index.d.ts +2 -0
- package/dist/esm/types/components/organisms/Card/index.d.ts +4 -0
- package/dist/esm/types/components/organisms/NavBar/index.d.ts +4 -0
- package/dist/esm/types/components/organisms/index.d.ts +2 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +7 -1
- package/dist/esm/types/interfaces/moleculeProps.d.ts +27 -2
- package/dist/esm/types/interfaces/organismProps.d.ts +39 -4
- package/dist/esm/types/types/domTypes.d.ts +1 -0
- package/dist/index.d.ts +78 -1
- package/package.json +6 -6
@@ -22,3 +22,4 @@ export { default as PaginationItem } from './PaginationItem';
|
|
22
22
|
export { default as TabItem } from './TabItem';
|
23
23
|
export { default as LevelHeader } from './LevelHeader';
|
24
24
|
export { default as Tile } from './Tile';
|
25
|
+
export { default as NavBarItem } from './NavBarItem';
|
@@ -17,3 +17,5 @@ export { default as TileBox } from './TileBox';
|
|
17
17
|
export { default as Footer } from './Footer';
|
18
18
|
export { default as Media } from './Media';
|
19
19
|
export { default as Section } from './Section';
|
20
|
+
export { default as NavBarBrand } from './NavBarBrand';
|
21
|
+
export { default as NavBarDropdown } from './NavBarDropdown';
|
@@ -3,3 +3,5 @@ export { default as Panel } from './Panel';
|
|
3
3
|
export { default as Level } from './Level';
|
4
4
|
export { default as Hero } from './Hero';
|
5
5
|
export { default as TileGroup } from './TileGroup';
|
6
|
+
export { default as NavBar } from './NavBar';
|
7
|
+
export { default as Card } from './Card';
|
@@ -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, CommonSizeType } from '../types/styleTypes';
|
4
|
-
import { DropdownItemType, InputType, ChildrenType, TileContextType } from '../types/domTypes';
|
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;
|
@@ -289,3 +289,9 @@ export interface TileProps extends ElementProps {
|
|
289
289
|
/** `Styling` Used for hierarchy level as ancestor or parent. It selects its children in a vertical format (like a column) */
|
290
290
|
isVertical?: boolean;
|
291
291
|
}
|
292
|
+
export interface NavBarItemProps extends ElementProps, ClickeableProps {
|
293
|
+
/** `Attribute` `Required` Reffers to the component or string that will be shown inside the item */
|
294
|
+
children: SingleChildType;
|
295
|
+
/** `Styling` Used for `NavBarDropdown` styling purpose only. Will mark the item as the one selected among its group */
|
296
|
+
isActive?: boolean;
|
297
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ClickeableProps, ComposedElementProps, ElementProps } from './commonProps';
|
2
|
-
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps, InputProps, MenuItemProps, PaginationItemProps, TabItemProps, TileProps } from './atomProps';
|
3
|
-
import { BasicColorType, RightCenteredAlignType, BreadcrumbSeparatorType, ColumnGapType, SizeWithoutNormalType, TabsFormatType, MediumAndLargeSizeType } from '../types/styleTypes';
|
2
|
+
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps, ImageProps, InputProps, MenuItemProps, NavBarItemProps, PaginationItemProps, TabItemProps, TileProps } from './atomProps';
|
3
|
+
import { BasicColorType, RightCenteredAlignType, BreadcrumbSeparatorType, ColumnGapType, SizeWithoutNormalType, TabsFormatType, MediumAndLargeSizeType, RightLeftAlignType } 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 */
|
@@ -195,4 +195,29 @@ export interface SectionProps extends ElementProps {
|
|
195
195
|
/** `Styling` Set button's size on bulma's size tokens */
|
196
196
|
size?: MediumAndLargeSizeType;
|
197
197
|
}
|
198
|
+
export interface NavBarDropdownProps extends ComposedElementProps {
|
199
|
+
/** `Attribute` `Required` It will show the presentation text to be clicked or hovered in order to display its menu */
|
200
|
+
text: string;
|
201
|
+
/** `Attribute` `Required` A list of configuration objects that will render in dropdown's menu. Those can be items or dividers */
|
202
|
+
items: Array<NavBarItemProps | 'divider'>;
|
203
|
+
/** `Styling` Used for `NavBar` styling purpose only. Will set the dropdown on a specific position based on the proveded value */
|
204
|
+
position?: RightLeftAlignType;
|
205
|
+
/** `Styling` Used to display dropdown's menu when user clicks on its text */
|
206
|
+
isActive?: boolean;
|
207
|
+
/** `Styling` Similar to `isActive`, but will display when user hovers its pointer on its text */
|
208
|
+
isHoverable?: boolean;
|
209
|
+
/** `Styling` Sets dropdown's menu on top of the text instead default styling */
|
210
|
+
hasDropdownUp?: boolean;
|
211
|
+
/** `Styling` Sets dropdown's menu design like a box, also adds some animation when its diplayed */
|
212
|
+
hasBoxedMenu?: boolean;
|
213
|
+
}
|
214
|
+
interface BrandConfigProps extends Omit<NavBarItemProps, 'children'> {
|
215
|
+
children: ImageProps;
|
216
|
+
}
|
217
|
+
export interface NavBarBrandProps extends ElementProps {
|
218
|
+
/** `Attribute` `Required` Configuration object to inject a NavBarItem with a Image configuration as its children */
|
219
|
+
brandConfig: BrandConfigProps;
|
220
|
+
/** `Styling` It sets brand's burger button as active (changing looks from a burger to a cross) */
|
221
|
+
isBurgerActive?: boolean;
|
222
|
+
}
|
198
223
|
export {};
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { ElementProps } from './commonProps';
|
2
|
-
import { InputControlProps, LevelItemProps, PanelBlockProps, PanelTabsProps } from './moleculeProps';
|
1
|
+
import { ClickeableProps, ElementProps } from './commonProps';
|
2
|
+
import { InputControlProps, LevelItemProps, NavBarBrandProps, NavBarDropdownProps, PanelBlockProps, PanelTabsProps } from './moleculeProps';
|
3
|
+
import { ImageProps, NavBarItemProps, TileProps } from './atomProps';
|
3
4
|
import { BasicColorType, SizeWithHeightType } from '../types/styleTypes';
|
4
|
-
import { ChildrenType } from '../types/domTypes';
|
5
|
-
import { TileProps } from './atomProps';
|
5
|
+
import { ChildrenType, NavBarFixedPositionType } from '../types/domTypes';
|
6
6
|
export interface FormFieldHelperProps {
|
7
7
|
text?: string;
|
8
8
|
color?: BasicColorType;
|
@@ -55,3 +55,38 @@ export interface TileGroupProps extends ElementProps, Pick<TileProps, 'context'
|
|
55
55
|
/** `Attribute` `Required` A list of `Title` configurations that will be displayed in a grid mode on the screen */
|
56
56
|
groupConfig: TileProps[];
|
57
57
|
}
|
58
|
+
export interface NavBarMenuProps {
|
59
|
+
itemList: Array<NavBarItemProps | NavBarDropdownProps>;
|
60
|
+
showInMobile?: boolean;
|
61
|
+
}
|
62
|
+
export interface NavBarProps extends ElementProps {
|
63
|
+
/** `Attribute` Configuration object for navbar's left section, it needs of a `NavBarBrand` object to be displayed at NavBar's start */
|
64
|
+
brandConfig?: NavBarBrandProps;
|
65
|
+
/** `Attribute` Configuration object for navbar's left section, it needs of a list of `NavBarItem` or `NavBarDropdown` objects to be displayed */
|
66
|
+
itemsAtStart?: NavBarMenuProps;
|
67
|
+
/** `Attribute` Configuration object for navbar's right section, it needs of a list of `NavBarItem` or `NavBarDropdown` objects to be displayed */
|
68
|
+
itemsAtEnd?: NavBarMenuProps;
|
69
|
+
/** `Styling` Sets navbar's position at screen's top or bottom */
|
70
|
+
fixedPosition?: NavBarFixedPositionType;
|
71
|
+
/** `Styling` Color based on bulma's text color tokens */
|
72
|
+
color?: BasicColorType;
|
73
|
+
/** `Styling` Sets navbar's color as transparent */
|
74
|
+
isTransparent?: boolean;
|
75
|
+
/** `Styling` Adds a small padding around the navbar */
|
76
|
+
isSpaced?: boolean;
|
77
|
+
/** `Styling` Adds a small shadow on navbar's bottom */
|
78
|
+
hasShadow?: boolean;
|
79
|
+
}
|
80
|
+
export interface CardFooterProps extends ClickeableProps {
|
81
|
+
text: string;
|
82
|
+
}
|
83
|
+
export interface CardProps extends ElementProps {
|
84
|
+
/** `Attribute` It will shot a text on card's top, just a paragraph */
|
85
|
+
headerText?: string;
|
86
|
+
/** `Attribute` A single configuration object that will render an `Image` component */
|
87
|
+
image?: ImageProps;
|
88
|
+
/** `Attribute` `Required` Deisgnated section where you can include a string, a single or list of components (each one separated in its own `content` section) */
|
89
|
+
content: ChildrenType;
|
90
|
+
/** `Attribute` A list of footer links that will be rendered on card's bottom, below its content */
|
91
|
+
footerLinks?: CardFooterProps[];
|
92
|
+
}
|
@@ -13,3 +13,4 @@ export declare enum IconSizeEnum {
|
|
13
13
|
export type TileContextType = 'is-child' | 'is-parent' | 'is-ancestor';
|
14
14
|
export type HeroContentType = 'head' | 'body' | 'foot';
|
15
15
|
export type MediaSectionType = 'left' | 'content' | 'right';
|
16
|
+
export type NavBarFixedPositionType = 'top' | 'bottom';
|
package/dist/index.d.ts
CHANGED
@@ -50,6 +50,7 @@ type PanelBlockItemType = 'icon' | 'control' | 'button';
|
|
50
50
|
type ChildrenType = string | React$1.ReactElement | React$1.ReactElement[];
|
51
51
|
type SingleChildType = Exclude<ChildrenType, React$1.ReactElement[]>;
|
52
52
|
type TileContextType = 'is-child' | 'is-parent' | 'is-ancestor';
|
53
|
+
type NavBarFixedPositionType = 'top' | 'bottom';
|
53
54
|
|
54
55
|
interface ColumnProps extends ElementProps, React$1.ComponentPropsWithoutRef<'section'> {
|
55
56
|
/** `Attribute` Reffers to the component or array of components that will be shown inside the column */
|
@@ -338,6 +339,12 @@ interface TileProps extends ElementProps {
|
|
338
339
|
/** `Styling` Used for hierarchy level as ancestor or parent. It selects its children in a vertical format (like a column) */
|
339
340
|
isVertical?: boolean;
|
340
341
|
}
|
342
|
+
interface NavBarItemProps extends ElementProps, ClickeableProps {
|
343
|
+
/** `Attribute` `Required` Reffers to the component or string that will be shown inside the item */
|
344
|
+
children: SingleChildType;
|
345
|
+
/** `Styling` Used for `NavBarDropdown` styling purpose only. Will mark the item as the one selected among its group */
|
346
|
+
isActive?: boolean;
|
347
|
+
}
|
341
348
|
|
342
349
|
declare const Button: React$1.FC<ButtonProps>;
|
343
350
|
|
@@ -387,6 +394,8 @@ declare const LevelHeader: React$1.FC<LevelHeaderProps>;
|
|
387
394
|
|
388
395
|
declare const Tile: React$1.FC<TileProps>;
|
389
396
|
|
397
|
+
declare const NavBarItem: React$1.FC<NavBarItemProps>;
|
398
|
+
|
390
399
|
interface ButtonGroupProps extends ElementProps {
|
391
400
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
392
401
|
buttonList: ButtonProps[];
|
@@ -580,6 +589,31 @@ interface SectionProps extends ElementProps {
|
|
580
589
|
/** `Styling` Set button's size on bulma's size tokens */
|
581
590
|
size?: MediumAndLargeSizeType;
|
582
591
|
}
|
592
|
+
interface NavBarDropdownProps extends ComposedElementProps {
|
593
|
+
/** `Attribute` `Required` It will show the presentation text to be clicked or hovered in order to display its menu */
|
594
|
+
text: string;
|
595
|
+
/** `Attribute` `Required` A list of configuration objects that will render in dropdown's menu. Those can be items or dividers */
|
596
|
+
items: Array<NavBarItemProps | 'divider'>;
|
597
|
+
/** `Styling` Used for `NavBar` styling purpose only. Will set the dropdown on a specific position based on the proveded value */
|
598
|
+
position?: RightLeftAlignType;
|
599
|
+
/** `Styling` Used to display dropdown's menu when user clicks on its text */
|
600
|
+
isActive?: boolean;
|
601
|
+
/** `Styling` Similar to `isActive`, but will display when user hovers its pointer on its text */
|
602
|
+
isHoverable?: boolean;
|
603
|
+
/** `Styling` Sets dropdown's menu on top of the text instead default styling */
|
604
|
+
hasDropdownUp?: boolean;
|
605
|
+
/** `Styling` Sets dropdown's menu design like a box, also adds some animation when its diplayed */
|
606
|
+
hasBoxedMenu?: boolean;
|
607
|
+
}
|
608
|
+
interface BrandConfigProps extends Omit<NavBarItemProps, 'children'> {
|
609
|
+
children: ImageProps;
|
610
|
+
}
|
611
|
+
interface NavBarBrandProps extends ElementProps {
|
612
|
+
/** `Attribute` `Required` Configuration object to inject a NavBarItem with a Image configuration as its children */
|
613
|
+
brandConfig: BrandConfigProps;
|
614
|
+
/** `Styling` It sets brand's burger button as active (changing looks from a burger to a cross) */
|
615
|
+
isBurgerActive?: boolean;
|
616
|
+
}
|
583
617
|
|
584
618
|
declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
|
585
619
|
|
@@ -619,6 +653,10 @@ declare const Media: React$1.FC<MediaProps>;
|
|
619
653
|
|
620
654
|
declare const Section: React$1.FC<SectionProps>;
|
621
655
|
|
656
|
+
declare const NavBarBrand: React$1.FC<NavBarBrandProps>;
|
657
|
+
|
658
|
+
declare const NavBarDropdown: React$1.FC<NavBarDropdownProps>;
|
659
|
+
|
622
660
|
interface FormFieldHelperProps {
|
623
661
|
text?: string;
|
624
662
|
color?: BasicColorType;
|
@@ -671,6 +709,41 @@ interface TileGroupProps extends ElementProps, Pick<TileProps, 'context' | 'isVe
|
|
671
709
|
/** `Attribute` `Required` A list of `Title` configurations that will be displayed in a grid mode on the screen */
|
672
710
|
groupConfig: TileProps[];
|
673
711
|
}
|
712
|
+
interface NavBarMenuProps {
|
713
|
+
itemList: Array<NavBarItemProps | NavBarDropdownProps>;
|
714
|
+
showInMobile?: boolean;
|
715
|
+
}
|
716
|
+
interface NavBarProps extends ElementProps {
|
717
|
+
/** `Attribute` Configuration object for navbar's left section, it needs of a `NavBarBrand` object to be displayed at NavBar's start */
|
718
|
+
brandConfig?: NavBarBrandProps;
|
719
|
+
/** `Attribute` Configuration object for navbar's left section, it needs of a list of `NavBarItem` or `NavBarDropdown` objects to be displayed */
|
720
|
+
itemsAtStart?: NavBarMenuProps;
|
721
|
+
/** `Attribute` Configuration object for navbar's right section, it needs of a list of `NavBarItem` or `NavBarDropdown` objects to be displayed */
|
722
|
+
itemsAtEnd?: NavBarMenuProps;
|
723
|
+
/** `Styling` Sets navbar's position at screen's top or bottom */
|
724
|
+
fixedPosition?: NavBarFixedPositionType;
|
725
|
+
/** `Styling` Color based on bulma's text color tokens */
|
726
|
+
color?: BasicColorType;
|
727
|
+
/** `Styling` Sets navbar's color as transparent */
|
728
|
+
isTransparent?: boolean;
|
729
|
+
/** `Styling` Adds a small padding around the navbar */
|
730
|
+
isSpaced?: boolean;
|
731
|
+
/** `Styling` Adds a small shadow on navbar's bottom */
|
732
|
+
hasShadow?: boolean;
|
733
|
+
}
|
734
|
+
interface CardFooterProps extends ClickeableProps {
|
735
|
+
text: string;
|
736
|
+
}
|
737
|
+
interface CardProps extends ElementProps {
|
738
|
+
/** `Attribute` It will shot a text on card's top, just a paragraph */
|
739
|
+
headerText?: string;
|
740
|
+
/** `Attribute` A single configuration object that will render an `Image` component */
|
741
|
+
image?: ImageProps;
|
742
|
+
/** `Attribute` `Required` Deisgnated section where you can include a string, a single or list of components (each one separated in its own `content` section) */
|
743
|
+
content: ChildrenType;
|
744
|
+
/** `Attribute` A list of footer links that will be rendered on card's bottom, below its content */
|
745
|
+
footerLinks?: CardFooterProps[];
|
746
|
+
}
|
674
747
|
|
675
748
|
declare const FormField: React$1.FC<FormFieldProps>;
|
676
749
|
|
@@ -682,4 +755,8 @@ declare const Hero: React$1.FC<HeroProps>;
|
|
682
755
|
|
683
756
|
declare const TileGroup: React$1.FC<TileGroupProps>;
|
684
757
|
|
685
|
-
|
758
|
+
declare const NavBar: React$1.FC<NavBarProps>;
|
759
|
+
|
760
|
+
declare const Card: React$1.FC<CardProps>;
|
761
|
+
|
762
|
+
export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, Card, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, Footer, FormField, Hero, Icon, Image, Input, InputControl, Level, LevelHeader, LevelItem, Media, Menu, MenuItem, MenuList, Message, Modal, NavBar, NavBarBrand, NavBarDropdown, NavBarItem, Notification, Pagination, PaginationItem, Panel, PanelBlock, PanelTabs, ProgressBar, RadioButton, Section, Select, TabItem, Tabs, Tag, TextArea, Tile, TileBox, TileGroup, Title };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "reactive-bulma",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.2.0",
|
4
4
|
"description": "A component library based on React, Bulma, Typescript and Rollup",
|
5
5
|
"keywords": [
|
6
6
|
"typescript",
|
@@ -76,25 +76,25 @@
|
|
76
76
|
"@storybook/react": "^7.6.10",
|
77
77
|
"@storybook/react-webpack5": "^7.6.10",
|
78
78
|
"@storybook/testing-library": "^0.2.2",
|
79
|
-
"@testing-library/jest-dom": "^6.
|
79
|
+
"@testing-library/jest-dom": "^6.4.0",
|
80
80
|
"@testing-library/react": "^14.1.2",
|
81
81
|
"@testing-library/user-event": "^14.5.2",
|
82
82
|
"@types/jest": "^29.5.11",
|
83
83
|
"@types/react": "^18.2.48",
|
84
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
85
|
-
"@typescript-eslint/parser": "^6.
|
84
|
+
"@typescript-eslint/eslint-plugin": "^6.20.0",
|
85
|
+
"@typescript-eslint/parser": "^6.20.0",
|
86
86
|
"babel-jest": "^29.7.0",
|
87
87
|
"babel-loader": "^9.1.3",
|
88
88
|
"bulma": "^0.9.4",
|
89
89
|
"eslint": "^8.56.0",
|
90
90
|
"eslint-config-prettier": "^9.1.0",
|
91
91
|
"eslint-plugin-react": "^7.33.2",
|
92
|
-
"husky": "^9.0.
|
92
|
+
"husky": "^9.0.7",
|
93
93
|
"hygen": "^6.2.11",
|
94
94
|
"jest": "^29.7.0",
|
95
95
|
"jest-environment-jsdom": "^29.7.0",
|
96
96
|
"lint-staged": "^15.2.0",
|
97
|
-
"npm-check-updates": "^16.14.
|
97
|
+
"npm-check-updates": "^16.14.14",
|
98
98
|
"postcss": "^8.4.33",
|
99
99
|
"prettier": "^3.2.4",
|
100
100
|
"react": "^18.2.0",
|