reactive-bulma 4.3.2 → 4.3.4
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/components/atoms/Input/index.js +5 -5
- package/dist/components/atoms/Select/index.js +39 -35
- package/dist/components/atoms/Select/index.stories.d.ts +1 -0
- package/dist/components/atoms/TextArea/index.js +9 -9
- package/dist/components/molecules/NavBarBrand/index.js +16 -17
- package/dist/interfaces/atomProps.d.ts +5 -2
- package/dist/interfaces/commonProps.d.ts +6 -6
- package/dist/interfaces/moleculeProps.d.ts +2 -2
- package/dist/types/domTypes.d.ts +1 -1
- package/package.json +9 -9
@@ -12,8 +12,8 @@ const j = ({
|
|
12
12
|
isReadonly: o = !1,
|
13
13
|
color: r = null,
|
14
14
|
size: p = null,
|
15
|
-
isRounded:
|
16
|
-
isHovered:
|
15
|
+
isRounded: c = null,
|
16
|
+
isHovered: f = null,
|
17
17
|
isFocused: m = null,
|
18
18
|
onClick: v,
|
19
19
|
onChange: C,
|
@@ -23,8 +23,8 @@ const j = ({
|
|
23
23
|
"input",
|
24
24
|
r,
|
25
25
|
p,
|
26
|
-
|
27
|
-
|
26
|
+
c ? "is-rounded" : null,
|
27
|
+
f ? "is-hovered" : null,
|
28
28
|
m ? "is-focused" : null,
|
29
29
|
e
|
30
30
|
]), h = s ?? T({
|
@@ -37,7 +37,7 @@ const j = ({
|
|
37
37
|
"data-testid": h,
|
38
38
|
type: u,
|
39
39
|
placeholder: d ?? void 0,
|
40
|
-
|
40
|
+
value: t ?? void 0,
|
41
41
|
name: a,
|
42
42
|
disabled: i,
|
43
43
|
readOnly: o,
|
@@ -1,64 +1,68 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
2
|
import { parseClasses as j, parseTestId as k } from "../../../functions/parsers.js";
|
3
|
-
const
|
4
|
-
testId:
|
5
|
-
containerTestId:
|
6
|
-
cssClasses:
|
3
|
+
const w = ({
|
4
|
+
testId: a = null,
|
5
|
+
containerTestId: o = null,
|
6
|
+
cssClasses: i = null,
|
7
7
|
containerCssClasses: d = null,
|
8
|
-
style:
|
8
|
+
style: u = null,
|
9
9
|
containerStyle: c = null,
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
isDisabled: r,
|
11
|
+
options: p = [],
|
12
|
+
selectedValues: m,
|
13
|
+
name: f,
|
14
|
+
showOptions: v = 1,
|
13
15
|
isMultiple: s = !1,
|
14
|
-
color:
|
15
|
-
size:
|
16
|
-
isRounded:
|
17
|
-
isHovered:
|
18
|
-
isFocused:
|
19
|
-
onClick:
|
16
|
+
color: S = null,
|
17
|
+
size: h = null,
|
18
|
+
isRounded: $ = null,
|
19
|
+
isHovered: g = null,
|
20
|
+
isFocused: y = null,
|
21
|
+
onClick: C,
|
20
22
|
onChange: I,
|
21
23
|
onBlur: T
|
22
24
|
}) => {
|
23
25
|
const t = j([
|
24
26
|
"select",
|
25
|
-
|
26
|
-
|
27
|
+
S,
|
28
|
+
h,
|
27
29
|
s ? "is-multiple" : null,
|
28
|
-
|
29
|
-
|
30
|
-
|
30
|
+
$ ? "is-rounded" : null,
|
31
|
+
g ? "is-hovered" : null,
|
32
|
+
y ? "is-focused" : null,
|
31
33
|
d
|
32
|
-
]), l =
|
34
|
+
]), l = a ?? k({
|
33
35
|
tag: "select",
|
34
36
|
parsedClasses: t
|
35
|
-
}),
|
37
|
+
}), x = o ?? `${l}-container`;
|
36
38
|
return /* @__PURE__ */ e(
|
37
39
|
"section",
|
38
40
|
{
|
39
|
-
"data-testid":
|
41
|
+
"data-testid": x,
|
40
42
|
className: t,
|
41
43
|
style: c ?? void 0,
|
42
44
|
children: /* @__PURE__ */ e(
|
43
45
|
"select",
|
44
46
|
{
|
45
47
|
"data-testid": l,
|
46
|
-
className:
|
47
|
-
style:
|
48
|
-
|
48
|
+
className: i ?? void 0,
|
49
|
+
style: u ?? void 0,
|
50
|
+
value: m,
|
51
|
+
name: f,
|
52
|
+
disabled: r ?? !1,
|
49
53
|
multiple: s,
|
50
|
-
size:
|
51
|
-
|
54
|
+
size: v,
|
55
|
+
onClick: C,
|
56
|
+
onChange: I,
|
57
|
+
onBlur: T,
|
58
|
+
children: p.map(({ id: n, name: N }, b) => /* @__PURE__ */ e(
|
52
59
|
"option",
|
53
60
|
{
|
54
|
-
"data-testid": `${l}-option-${
|
55
|
-
|
56
|
-
|
57
|
-
onChange: I,
|
58
|
-
onBlur: T,
|
59
|
-
children: x
|
61
|
+
"data-testid": `${l}-option-${b}`,
|
62
|
+
value: n.toString(),
|
63
|
+
children: N
|
60
64
|
},
|
61
|
-
|
65
|
+
`key-option-${n.toString()}`
|
62
66
|
))
|
63
67
|
}
|
64
68
|
)
|
@@ -66,5 +70,5 @@ const q = ({
|
|
66
70
|
);
|
67
71
|
};
|
68
72
|
export {
|
69
|
-
|
73
|
+
w as default
|
70
74
|
};
|
@@ -5,5 +5,6 @@ export default _default;
|
|
5
5
|
export declare const OnlyRequiredProps: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').SelectProps>;
|
6
6
|
export declare const WithOneOption: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').SelectProps>;
|
7
7
|
export declare const WithSeveralOptions: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').SelectProps>;
|
8
|
+
export declare const Disabled: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').SelectProps>;
|
8
9
|
export declare const ShowsThreeOptions: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').SelectProps>;
|
9
10
|
export declare const FirstOptionsSelected: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').SelectProps>;
|
@@ -7,16 +7,16 @@ const E = ({
|
|
7
7
|
value: t = null,
|
8
8
|
name: r,
|
9
9
|
cols: n = null,
|
10
|
-
rows:
|
11
|
-
isDisabled:
|
10
|
+
rows: o = null,
|
11
|
+
isDisabled: u = !1,
|
12
12
|
isReadonly: d = !1,
|
13
13
|
isFixedSize: i = !1,
|
14
14
|
color: x = null,
|
15
15
|
size: p = null,
|
16
16
|
isHovered: c = null,
|
17
17
|
isFocused: f = null,
|
18
|
-
onClick:
|
19
|
-
onChange:
|
18
|
+
onClick: v = null,
|
19
|
+
onChange: m = null
|
20
20
|
}) => {
|
21
21
|
const e = h([
|
22
22
|
"textarea",
|
@@ -44,16 +44,16 @@ const E = ({
|
|
44
44
|
"textarea",
|
45
45
|
{
|
46
46
|
"data-testid": g,
|
47
|
-
|
47
|
+
value: t ?? void 0,
|
48
48
|
name: r,
|
49
49
|
cols: n ?? void 0,
|
50
|
-
rows:
|
51
|
-
disabled:
|
50
|
+
rows: o ?? void 0,
|
51
|
+
disabled: u,
|
52
52
|
readOnly: d,
|
53
53
|
className: e,
|
54
54
|
style: a ?? void 0,
|
55
|
-
onClick:
|
56
|
-
onChange:
|
55
|
+
onClick: v ?? void 0,
|
56
|
+
onChange: m ?? void 0
|
57
57
|
}
|
58
58
|
);
|
59
59
|
};
|
@@ -1,36 +1,35 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
2
2
|
import { parseClasses as n, parseTestId as t } from "../../../functions/parsers.js";
|
3
3
|
import "react";
|
4
|
-
import b from "../../atoms/
|
5
|
-
|
6
|
-
const x = ({
|
4
|
+
import b from "../../atoms/NavBarItem/index.js";
|
5
|
+
const C = ({
|
7
6
|
testId: d = null,
|
8
7
|
cssClasses: l = null,
|
9
8
|
style: i = null,
|
10
9
|
brandConfig: o,
|
11
|
-
isBurgerActive:
|
10
|
+
isBurgerActive: u = !1
|
12
11
|
}) => {
|
13
|
-
const r = n(["navbar-brand", l]),
|
12
|
+
const r = n(["navbar-brand", l]), c = d ?? t({ tag: "navbar-brand", parsedClasses: r }), s = n([
|
14
13
|
"navbar-burger",
|
15
|
-
|
16
|
-
]),
|
14
|
+
u ? "is-active" : null
|
15
|
+
]), p = t({
|
17
16
|
tag: "navbar-burger",
|
18
|
-
parsedClasses:
|
19
|
-
}), { children:
|
20
|
-
return /* @__PURE__ */
|
17
|
+
parsedClasses: s
|
18
|
+
}), { children: m, ...v } = o;
|
19
|
+
return /* @__PURE__ */ e(
|
21
20
|
"section",
|
22
21
|
{
|
23
|
-
"data-testid":
|
22
|
+
"data-testid": c,
|
24
23
|
className: r,
|
25
24
|
style: i ?? void 0,
|
26
25
|
children: [
|
27
|
-
/* @__PURE__ */ a(
|
28
|
-
/* @__PURE__ */
|
26
|
+
/* @__PURE__ */ a(b, { ...v, children: m }),
|
27
|
+
/* @__PURE__ */ e(
|
29
28
|
"a",
|
30
29
|
{
|
31
30
|
role: "button",
|
32
|
-
"data-testid":
|
33
|
-
className:
|
31
|
+
"data-testid": p,
|
32
|
+
className: s,
|
34
33
|
"aria-label": "menu",
|
35
34
|
"aria-expanded": "false",
|
36
35
|
children: [
|
@@ -45,5 +44,5 @@ const x = ({
|
|
45
44
|
);
|
46
45
|
};
|
47
46
|
export {
|
48
|
-
|
47
|
+
C as default
|
49
48
|
};
|
@@ -159,11 +159,14 @@ export interface DeleteProps extends ElementProps, ClickeableProps {
|
|
159
159
|
export interface SelectOption {
|
160
160
|
id: string | number;
|
161
161
|
name: string;
|
162
|
-
selected?: boolean;
|
163
162
|
}
|
164
163
|
export interface SelectProps extends ComposedElementProps, InteractiveOnChangeProps, NamedInputProps {
|
165
|
-
/** `Attribute`
|
164
|
+
/** `Attribute` Will disable the input */
|
165
|
+
isDisabled?: boolean;
|
166
|
+
/** `Attribute` Indicates the select contained on the select */
|
166
167
|
options?: SelectOption[];
|
168
|
+
/** `Attribute` Will select a different default option if the user provides it. It can be an multiple selection if `isMultiple` is true */
|
169
|
+
selectedValues?: string | string[];
|
167
170
|
/** `Attribute` Indicates how many options will be shown at first glance (before looking for the whole list */
|
168
171
|
showOptions?: number;
|
169
172
|
/** `Attribute` Will allow multiple selection */
|
@@ -16,17 +16,17 @@ export interface ElementProps {
|
|
16
16
|
}
|
17
17
|
export interface ComposedElementProps extends ElementProps, ContainerProps {
|
18
18
|
}
|
19
|
-
export interface ClickeableProps {
|
19
|
+
export interface ClickeableProps<ElementType = Element, EventType = MouseEvent> {
|
20
20
|
/** `Function` Reffers to each time the user click the element. Alone does not nothing, but can be reused for other components */
|
21
|
-
onClick?: (event: React.MouseEvent) => void;
|
21
|
+
onClick?: (event: React.MouseEvent<ElementType, EventType>) => void;
|
22
22
|
}
|
23
|
-
export interface ChangeableProps {
|
23
|
+
export interface ChangeableProps<ElementType = Element> {
|
24
24
|
/** `Function` Reffers to each time the user press a key. Alone does not nothing, but can be reused for other components */
|
25
|
-
onChange?: (event: React.ChangeEvent) => void;
|
25
|
+
onChange?: (event: React.ChangeEvent<ElementType>) => void;
|
26
26
|
}
|
27
|
-
export interface BlureableProps {
|
27
|
+
export interface BlureableProps<ElementType = Element, RelatedTargetType = Element> {
|
28
28
|
/** `Function` Reffers to each time the user focus out the element. Alone does not nothing, but can be reused for other components */
|
29
|
-
onBlur?: (event: React.FocusEvent) => void;
|
29
|
+
onBlur?: (event: React.FocusEvent<ElementType, RelatedTargetType>) => void;
|
30
30
|
}
|
31
31
|
export interface InteractiveProps extends ClickeableProps, ChangeableProps, BlureableProps {
|
32
32
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ClickeableProps, ComposedElementProps, ElementProps } from './commonProps';
|
2
|
-
import { BreadcrumbItemProps, ButtonProps, CheckBoxProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps,
|
2
|
+
import { BreadcrumbItemProps, ButtonProps, CheckBoxProps, ColumnProps, DeleteProps, DropdownItemProps, IconProps, InputProps, MenuItemProps, NavBarItemProps, PaginationItemProps, RadioButtonProps, SelectProps, TabItemProps, TableCellProps, TableHeadCellProps, TextAreaProps } from './atomProps';
|
3
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 {
|
@@ -210,7 +210,7 @@ export interface NavBarDropdownProps extends ComposedElementProps {
|
|
210
210
|
hasBoxedMenu?: boolean;
|
211
211
|
}
|
212
212
|
interface BrandConfigProps extends Omit<NavBarItemProps, 'children'> {
|
213
|
-
children:
|
213
|
+
children: SingleChildType;
|
214
214
|
}
|
215
215
|
export interface NavBarBrandProps extends ElementProps {
|
216
216
|
/** `Attribute` `Required` Configuration object to inject a `NavBarItem` with a Image configuration as its children */
|
package/dist/types/domTypes.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { default as React } from 'react';
|
2
2
|
export type ButtonType = 'submit' | 'reset' | 'button';
|
3
|
-
export type InputType = 'text' | 'password' | 'email' | 'tel' | 'number';
|
3
|
+
export type InputType = 'text' | 'password' | 'email' | 'tel' | 'number' | 'date';
|
4
4
|
export type DropdownItemType = 'item' | 'link' | 'divider';
|
5
5
|
export type PanelBlockItemType = 'icon' | 'control' | 'button';
|
6
6
|
export type ChildrenType = string | React.ReactElement | React.ReactElement[];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "reactive-bulma",
|
3
|
-
"version": "4.3.
|
3
|
+
"version": "4.3.4",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A component library based on React, Bulma, Typescript and Vite",
|
6
6
|
"keywords": [
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"prettier": "prettier src/**/*.{tsx,ts} --write",
|
42
42
|
"prettier:ci": "prettier src/**/*.{tsx,ts} --check",
|
43
43
|
"lint-staged": "lint-staged -v",
|
44
|
-
"setup": "npm ci",
|
44
|
+
"setup": "npm ci && husky",
|
45
45
|
"compile": "tsc -b",
|
46
46
|
"build": "npm run compile && vite build",
|
47
47
|
"build:storybook": "storybook build",
|
@@ -88,15 +88,15 @@
|
|
88
88
|
"@types/node": "^22.10.2",
|
89
89
|
"@types/react": "^19.0.2",
|
90
90
|
"@types/react-dom": "^19.0.2",
|
91
|
-
"@typescript-eslint/eslint-plugin": "^8.18.
|
92
|
-
"@typescript-eslint/parser": "^8.18.
|
91
|
+
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
92
|
+
"@typescript-eslint/parser": "^8.18.2",
|
93
93
|
"@vitejs/plugin-react": "^4.3.4",
|
94
94
|
"babel-jest": "^29.7.0",
|
95
95
|
"babel-loader": "^9.2.1",
|
96
96
|
"bulma": "^0.9.4",
|
97
97
|
"eslint": "^9.17.0",
|
98
98
|
"eslint-config-prettier": "^9.1.0",
|
99
|
-
"eslint-plugin-react": "^7.37.
|
99
|
+
"eslint-plugin-react": "^7.37.3",
|
100
100
|
"eslint-plugin-react-hooks": "^5.1.0",
|
101
101
|
"eslint-plugin-react-refresh": "^0.4.16",
|
102
102
|
"eslint-plugin-storybook": "^0.11.1",
|
@@ -105,8 +105,8 @@
|
|
105
105
|
"hygen": "^6.2.11",
|
106
106
|
"jest": "^29.7.0",
|
107
107
|
"jest-environment-jsdom": "^29.7.0",
|
108
|
-
"lint-staged": "^15.
|
109
|
-
"npm-check-updates": "^17.1.
|
108
|
+
"lint-staged": "^15.3.0",
|
109
|
+
"npm-check-updates": "^17.1.13",
|
110
110
|
"prettier": "^3.4.2",
|
111
111
|
"react": "^18.3.1",
|
112
112
|
"react-dom": "^18.3.1",
|
@@ -114,8 +114,8 @@
|
|
114
114
|
"storybook": "^8.4.7",
|
115
115
|
"tslib": "^2.8.1",
|
116
116
|
"typescript": "~5.7.2",
|
117
|
-
"typescript-eslint": "^8.18.
|
118
|
-
"vite": "^6.0.
|
117
|
+
"typescript-eslint": "^8.18.2",
|
118
|
+
"vite": "^6.0.6",
|
119
119
|
"vite-plugin-dts": "^4.4.0"
|
120
120
|
},
|
121
121
|
"lint-staged": {
|