reactive-bulma 2.7.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +80 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/PaginationItem/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +1 -0
- package/dist/cjs/types/components/molecules/Pagination/index.d.ts +4 -0
- package/dist/cjs/types/components/molecules/index.d.ts +1 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +14 -4
- package/dist/cjs/types/interfaces/moleculeProps.d.ts +32 -6
- package/dist/cjs/types/types/styleTypes.d.ts +2 -1
- package/dist/esm/index.js +79 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/PaginationItem/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +1 -0
- package/dist/esm/types/components/molecules/Pagination/index.d.ts +4 -0
- package/dist/esm/types/components/molecules/index.d.ts +1 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +14 -4
- package/dist/esm/types/interfaces/moleculeProps.d.ts +32 -6
- package/dist/esm/types/types/styleTypes.d.ts +2 -1
- package/dist/index.d.ts +49 -8
- package/package.json +10 -10
@@ -17,3 +17,4 @@ export { default as BreadcrumbItem } from './BreadcrumbItem';
|
|
17
17
|
export { default as DropdownTrigger } from './DropdownTrigger';
|
18
18
|
export { default as DropdownItem } from './DropdownItem';
|
19
19
|
export { default as MenuItem } from './MenuItem';
|
20
|
+
export { default as PaginationItem } from './PaginationItem';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ElementProps, ComposedElementProps, ClickeableProps } from './commonProps';
|
3
|
-
import { basicColorType, columnOffsetType, columnSizeType, fixedImageSizeType, iconColorModeType, basicSizeType, textColorType, titleSizeType } from '../types/styleTypes';
|
3
|
+
import { basicColorType, columnOffsetType, columnSizeType, fixedImageSizeType, iconColorModeType, basicSizeType, textColorType, titleSizeType, reducedSizeType } from '../types/styleTypes';
|
4
4
|
import { DropdownItemType, inputTypes } 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 */
|
@@ -70,7 +70,7 @@ export interface TagProps extends ComposedElementProps, React.ComponentPropsWith
|
|
70
70
|
/** `Styling` Will add round borders to tag's shape */
|
71
71
|
isRounded?: boolean;
|
72
72
|
/** `Styling` Set tag's size */
|
73
|
-
size?:
|
73
|
+
size?: reducedSizeType;
|
74
74
|
/** `Styling` Color on tag's addon based on bulma's color tokens */
|
75
75
|
addonColor?: basicColorType;
|
76
76
|
/** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
|
@@ -112,7 +112,7 @@ export interface IconProps extends ComposedElementProps {
|
|
112
112
|
/** `Styling` Color based on bulma's text color tokens */
|
113
113
|
color?: textColorType;
|
114
114
|
/** `Styling` Set icons's size */
|
115
|
-
size?:
|
115
|
+
size?: reducedSizeType;
|
116
116
|
/** `Styling` Special usage in case you want to set as dark or light mode */
|
117
117
|
colorMode?: iconColorModeType;
|
118
118
|
/** `Styling` Animates the icon spinning 360° */
|
@@ -150,7 +150,7 @@ export interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
|
150
150
|
}
|
151
151
|
export interface DeleteProps extends ElementProps, ClickeableProps {
|
152
152
|
/** `Styling` Set icons's size */
|
153
|
-
size?:
|
153
|
+
size?: reducedSizeType;
|
154
154
|
}
|
155
155
|
export interface SelectOption {
|
156
156
|
id: string | number;
|
@@ -247,3 +247,13 @@ export interface MenuItemProps extends ElementProps, ClickeableProps {
|
|
247
247
|
/** `Styling` Generates a blue background to mark the item as the active one in the `MenuList` */
|
248
248
|
isActive?: boolean;
|
249
249
|
}
|
250
|
+
export interface PaginationItemProps extends ElementProps, ClickeableProps {
|
251
|
+
/** `Attribute` `Required` Sets the number string that will be shown in the item and in its title when user hovers it */
|
252
|
+
text: string | number;
|
253
|
+
/** `Attribute` Sets the custom text before the `text` when user hovers the item */
|
254
|
+
labelText?: string;
|
255
|
+
/** `Attribute` Sets the custom text before the `text` when user hovers the item if is the current one */
|
256
|
+
currentLabelText?: string;
|
257
|
+
/** `Styling` Makes the item the selected one, changing its background to blue */
|
258
|
+
isSelected?: boolean;
|
259
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { ComposedElementProps, ElementProps } from './commonProps';
|
3
|
-
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, MenuItemProps } from './atomProps';
|
4
|
-
import { basicColorType,
|
2
|
+
import { ClickeableProps, ComposedElementProps, ElementProps } from './commonProps';
|
3
|
+
import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps, MenuItemProps, PaginationItemProps } from './atomProps';
|
4
|
+
import { basicColorType, elementAlignType, breadcrumbSeparatorType, columnGapType, reducedSizeType } from '../types/styleTypes';
|
5
5
|
export interface ButtonGroupProps extends ElementProps {
|
6
6
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
7
7
|
buttonList: ButtonProps[];
|
@@ -38,11 +38,11 @@ export interface BreadcrumbsProps extends ComposedElementProps {
|
|
38
38
|
/** `Atribute` `Required` Array of `BreadcrumbItems` objects that will be shown */
|
39
39
|
items: BreadcrumbItemProps[];
|
40
40
|
/** `Styling` Will adjust element position on screen */
|
41
|
-
alignment?:
|
41
|
+
alignment?: elementAlignType | null;
|
42
42
|
/** `Styling` Will adjust element position on screen */
|
43
43
|
separator?: breadcrumbSeparatorType | null;
|
44
44
|
/** `Styling` Set button's size on bulma's size tokens */
|
45
|
-
size?:
|
45
|
+
size?: reducedSizeType;
|
46
46
|
}
|
47
47
|
export interface DropdownProps extends ElementProps {
|
48
48
|
/** `Atribute` `Required` Sets the name will be shown on the dropdown input */
|
@@ -62,7 +62,7 @@ export interface MessageProps extends ElementProps {
|
|
62
62
|
/** `Styling` Color based on bulma's color tokens */
|
63
63
|
color?: basicColorType;
|
64
64
|
/** `Styling` Set button's size on bulma's size tokens */
|
65
|
-
size?:
|
65
|
+
size?: reducedSizeType;
|
66
66
|
}
|
67
67
|
interface MenuSubListProps {
|
68
68
|
subListTitle: MenuItemProps;
|
@@ -83,4 +83,30 @@ export interface MenuProps extends ElementProps {
|
|
83
83
|
/** `Attribute` `Required` List of sections that can be single or second level MenuItems */
|
84
84
|
menuSections: MenuSectionProps[];
|
85
85
|
}
|
86
|
+
export interface PaginationNavigationButtonProps extends ClickeableProps {
|
87
|
+
/** `Attribute` `Required` Text that will be shown on the button */
|
88
|
+
text: string;
|
89
|
+
/** `Attribute` Will disable the button */
|
90
|
+
isDisabled?: boolean;
|
91
|
+
/** `Attribute` Custom CSS classes, applicable for specific scenarios */
|
92
|
+
cssClasses?: string;
|
93
|
+
}
|
94
|
+
export interface PaginationProps extends ComposedElementProps {
|
95
|
+
/** `Attribute` `Required` List of sections that can be single or second level MenuItems */
|
96
|
+
pages: PaginationItemProps[];
|
97
|
+
/** `Attribute` Adds a couple of ellipsis between the first and last item */
|
98
|
+
hasEllipsis?: boolean;
|
99
|
+
/** `Attribute` Number of items that will be hidden if `hasEllipsis` is `true` */
|
100
|
+
ellipsisItems?: number;
|
101
|
+
/** `Attribute` Toogle `Previous` and `Next page` buttons next to the selectable pages */
|
102
|
+
showPreviousPageButton?: PaginationNavigationButtonProps | null;
|
103
|
+
/** `Attribute` Toogle `Previous` and `Next page` buttons next to the selectable pages */
|
104
|
+
showNextPageButton?: PaginationNavigationButtonProps | null;
|
105
|
+
/** `Styling` Will add round borders to each page's shape */
|
106
|
+
isRounded?: boolean;
|
107
|
+
/** `Styling` Set button's size on bulma's size tokens */
|
108
|
+
size?: reducedSizeType;
|
109
|
+
/** `Styling` Will adjust the pages position on screen */
|
110
|
+
alignment?: elementAlignType | null;
|
111
|
+
}
|
86
112
|
export {};
|
@@ -5,7 +5,8 @@ export type basicColorType = 'is-white' | 'is-light' | 'is-dark' | 'is-black' |
|
|
5
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
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
7
|
export type basicSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
|
8
|
+
export type reducedSizeType = Exclude<basicSizeType, 'is-normal'>;
|
8
9
|
export type iconColorModeType = 'light' | 'dark';
|
9
10
|
export type columnGapType = 'is-0' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8';
|
10
|
-
export type
|
11
|
+
export type elementAlignType = 'is-centered' | 'is-right';
|
11
12
|
export type breadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
|
package/dist/index.d.ts
CHANGED
@@ -30,9 +30,10 @@ type columnOffsetType = 'is-offset-1' | 'is-offset-2' | 'is-offset-3' | 'is-offs
|
|
30
30
|
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';
|
31
31
|
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';
|
32
32
|
type basicSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
|
33
|
+
type reducedSizeType = Exclude<basicSizeType, 'is-normal'>;
|
33
34
|
type iconColorModeType = 'light' | 'dark';
|
34
35
|
type columnGapType = 'is-0' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8';
|
35
|
-
type
|
36
|
+
type elementAlignType = 'is-centered' | 'is-right';
|
36
37
|
type breadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';
|
37
38
|
|
38
39
|
type inputTypes = 'text' | 'password' | 'email' | 'tel';
|
@@ -106,7 +107,7 @@ interface TagProps extends ComposedElementProps, React$1.ComponentPropsWithoutRe
|
|
106
107
|
/** `Styling` Will add round borders to tag's shape */
|
107
108
|
isRounded?: boolean;
|
108
109
|
/** `Styling` Set tag's size */
|
109
|
-
size?:
|
110
|
+
size?: reducedSizeType;
|
110
111
|
/** `Styling` Color on tag's addon based on bulma's color tokens */
|
111
112
|
addonColor?: basicColorType;
|
112
113
|
/** `Function` Click function for `delete` option, alone does not nothing, but can be reused for other components */
|
@@ -140,7 +141,7 @@ interface IconProps extends ComposedElementProps {
|
|
140
141
|
/** `Styling` Color based on bulma's text color tokens */
|
141
142
|
color?: textColorType;
|
142
143
|
/** `Styling` Set icons's size */
|
143
|
-
size?:
|
144
|
+
size?: reducedSizeType;
|
144
145
|
/** `Styling` Special usage in case you want to set as dark or light mode */
|
145
146
|
colorMode?: iconColorModeType;
|
146
147
|
/** `Styling` Animates the icon spinning 360° */
|
@@ -178,7 +179,7 @@ interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
|
178
179
|
}
|
179
180
|
interface DeleteProps extends ElementProps, ClickeableProps {
|
180
181
|
/** `Styling` Set icons's size */
|
181
|
-
size?:
|
182
|
+
size?: reducedSizeType;
|
182
183
|
}
|
183
184
|
interface SelectOption {
|
184
185
|
id: string | number;
|
@@ -275,6 +276,16 @@ interface MenuItemProps extends ElementProps, ClickeableProps {
|
|
275
276
|
/** `Styling` Generates a blue background to mark the item as the active one in the `MenuList` */
|
276
277
|
isActive?: boolean;
|
277
278
|
}
|
279
|
+
interface PaginationItemProps extends ElementProps, ClickeableProps {
|
280
|
+
/** `Attribute` `Required` Sets the number string that will be shown in the item and in its title when user hovers it */
|
281
|
+
text: string | number;
|
282
|
+
/** `Attribute` Sets the custom text before the `text` when user hovers the item */
|
283
|
+
labelText?: string;
|
284
|
+
/** `Attribute` Sets the custom text before the `text` when user hovers the item if is the current one */
|
285
|
+
currentLabelText?: string;
|
286
|
+
/** `Styling` Makes the item the selected one, changing its background to blue */
|
287
|
+
isSelected?: boolean;
|
288
|
+
}
|
278
289
|
|
279
290
|
declare const Button: React$1.FC<ButtonProps>;
|
280
291
|
|
@@ -314,6 +325,8 @@ declare const DropdownItem: React$1.FC<DropdownItemProps>;
|
|
314
325
|
|
315
326
|
declare const MenuItem: React$1.FC<MenuItemProps>;
|
316
327
|
|
328
|
+
declare const PaginationItem: React$1.FC<PaginationItemProps>;
|
329
|
+
|
317
330
|
interface ButtonGroupProps extends ElementProps {
|
318
331
|
/** `Atribute` `Required` Array of `Button` objects that will be shown */
|
319
332
|
buttonList: ButtonProps[];
|
@@ -350,11 +363,11 @@ interface BreadcrumbsProps extends ComposedElementProps {
|
|
350
363
|
/** `Atribute` `Required` Array of `BreadcrumbItems` objects that will be shown */
|
351
364
|
items: BreadcrumbItemProps[];
|
352
365
|
/** `Styling` Will adjust element position on screen */
|
353
|
-
alignment?:
|
366
|
+
alignment?: elementAlignType | null;
|
354
367
|
/** `Styling` Will adjust element position on screen */
|
355
368
|
separator?: breadcrumbSeparatorType | null;
|
356
369
|
/** `Styling` Set button's size on bulma's size tokens */
|
357
|
-
size?:
|
370
|
+
size?: reducedSizeType;
|
358
371
|
}
|
359
372
|
interface DropdownProps extends ElementProps {
|
360
373
|
/** `Atribute` `Required` Sets the name will be shown on the dropdown input */
|
@@ -374,7 +387,7 @@ interface MessageProps extends ElementProps {
|
|
374
387
|
/** `Styling` Color based on bulma's color tokens */
|
375
388
|
color?: basicColorType;
|
376
389
|
/** `Styling` Set button's size on bulma's size tokens */
|
377
|
-
size?:
|
390
|
+
size?: reducedSizeType;
|
378
391
|
}
|
379
392
|
interface MenuSubListProps {
|
380
393
|
subListTitle: MenuItemProps;
|
@@ -395,6 +408,32 @@ interface MenuProps extends ElementProps {
|
|
395
408
|
/** `Attribute` `Required` List of sections that can be single or second level MenuItems */
|
396
409
|
menuSections: MenuSectionProps[];
|
397
410
|
}
|
411
|
+
interface PaginationNavigationButtonProps extends ClickeableProps {
|
412
|
+
/** `Attribute` `Required` Text that will be shown on the button */
|
413
|
+
text: string;
|
414
|
+
/** `Attribute` Will disable the button */
|
415
|
+
isDisabled?: boolean;
|
416
|
+
/** `Attribute` Custom CSS classes, applicable for specific scenarios */
|
417
|
+
cssClasses?: string;
|
418
|
+
}
|
419
|
+
interface PaginationProps extends ComposedElementProps {
|
420
|
+
/** `Attribute` `Required` List of sections that can be single or second level MenuItems */
|
421
|
+
pages: PaginationItemProps[];
|
422
|
+
/** `Attribute` Adds a couple of ellipsis between the first and last item */
|
423
|
+
hasEllipsis?: boolean;
|
424
|
+
/** `Attribute` Number of items that will be hidden if `hasEllipsis` is `true` */
|
425
|
+
ellipsisItems?: number;
|
426
|
+
/** `Attribute` Toogle `Previous` and `Next page` buttons next to the selectable pages */
|
427
|
+
showPreviousPageButton?: PaginationNavigationButtonProps | null;
|
428
|
+
/** `Attribute` Toogle `Previous` and `Next page` buttons next to the selectable pages */
|
429
|
+
showNextPageButton?: PaginationNavigationButtonProps | null;
|
430
|
+
/** `Styling` Will add round borders to each page's shape */
|
431
|
+
isRounded?: boolean;
|
432
|
+
/** `Styling` Set button's size on bulma's size tokens */
|
433
|
+
size?: reducedSizeType;
|
434
|
+
/** `Styling` Will adjust the pages position on screen */
|
435
|
+
alignment?: elementAlignType | null;
|
436
|
+
}
|
398
437
|
|
399
438
|
declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
|
400
439
|
|
@@ -412,4 +451,6 @@ declare const Menu: React$1.FC<MenuProps>;
|
|
412
451
|
|
413
452
|
declare const MenuList: React$1.FC<MenuListProps>;
|
414
453
|
|
415
|
-
|
454
|
+
declare const Pagination: React$1.FC<PaginationProps>;
|
455
|
+
|
456
|
+
export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, Icon, Input, Menu, MenuItem, MenuList, Message, Notification, Pagination, PaginationItem, 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.8.0",
|
4
4
|
"description": "A component library based on React, Bulma, Typescript and Rollup",
|
5
5
|
"keywords": [
|
6
6
|
"typescript",
|
@@ -77,16 +77,16 @@
|
|
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.1.
|
80
|
+
"@testing-library/react": "^14.1.2",
|
81
81
|
"@testing-library/user-event": "^14.5.1",
|
82
82
|
"@types/jest": "^29.5.8",
|
83
83
|
"@types/react": "^18.2.37",
|
84
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
85
|
-
"@typescript-eslint/parser": "^6.
|
84
|
+
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
85
|
+
"@typescript-eslint/parser": "^6.12.0",
|
86
86
|
"babel-jest": "^29.7.0",
|
87
87
|
"babel-loader": "^9.1.3",
|
88
88
|
"bulma": "^0.9.4",
|
89
|
-
"eslint": "^8.
|
89
|
+
"eslint": "^8.54.0",
|
90
90
|
"eslint-config-prettier": "^9.0.0",
|
91
91
|
"eslint-plugin-react": "^7.33.2",
|
92
92
|
"husky": "^8.0.3",
|
@@ -94,18 +94,18 @@
|
|
94
94
|
"jest": "^29.7.0",
|
95
95
|
"jest-environment-jsdom": "^29.7.0",
|
96
96
|
"lint-staged": "^15.1.0",
|
97
|
-
"npm-check-updates": "^16.14.
|
97
|
+
"npm-check-updates": "^16.14.11",
|
98
98
|
"postcss": "^8.4.31",
|
99
|
-
"prettier": "^3.0
|
99
|
+
"prettier": "^3.1.0",
|
100
100
|
"react": "^18.2.0",
|
101
101
|
"react-dom": "^18.2.0",
|
102
|
-
"rollup": "^4.
|
102
|
+
"rollup": "^4.5.0",
|
103
103
|
"rollup-plugin-dts": "^6.1.0",
|
104
104
|
"rollup-plugin-postcss": "^4.0.2",
|
105
|
-
"semantic-release": "^22.0.
|
105
|
+
"semantic-release": "^22.0.8",
|
106
106
|
"storybook": "^7.5.3",
|
107
107
|
"tslib": "^2.6.2",
|
108
|
-
"typescript": "^5.
|
108
|
+
"typescript": "^5.3.2"
|
109
109
|
},
|
110
110
|
"lint-staged": {
|
111
111
|
"src/**/*.(ts|tsx)": [
|