reactive-bulma 4.3.3 → 4.3.5
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 +9 -9
- package/dist/components/atoms/TextArea/index.js +9 -9
- package/dist/components/molecules/FormFieldInput/index.js +27 -27
- package/dist/components/molecules/NavBarBrand/index.js +16 -17
- 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 -8
@@ -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,6 +1,6 @@
|
|
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
|
3
|
+
const w = ({
|
4
4
|
testId: a = null,
|
5
5
|
containerTestId: o = null,
|
6
6
|
cssClasses: i = null,
|
@@ -12,7 +12,7 @@ const q = ({
|
|
12
12
|
selectedValues: m,
|
13
13
|
name: f,
|
14
14
|
showOptions: v = 1,
|
15
|
-
isMultiple:
|
15
|
+
isMultiple: s = !1,
|
16
16
|
color: S = null,
|
17
17
|
size: h = null,
|
18
18
|
isRounded: $ = null,
|
@@ -22,24 +22,24 @@ const q = ({
|
|
22
22
|
onChange: I,
|
23
23
|
onBlur: T
|
24
24
|
}) => {
|
25
|
-
const
|
25
|
+
const t = j([
|
26
26
|
"select",
|
27
27
|
S,
|
28
28
|
h,
|
29
|
-
|
29
|
+
s ? "is-multiple" : null,
|
30
30
|
$ ? "is-rounded" : null,
|
31
31
|
g ? "is-hovered" : null,
|
32
32
|
y ? "is-focused" : null,
|
33
33
|
d
|
34
34
|
]), l = a ?? k({
|
35
35
|
tag: "select",
|
36
|
-
parsedClasses:
|
36
|
+
parsedClasses: t
|
37
37
|
}), x = o ?? `${l}-container`;
|
38
38
|
return /* @__PURE__ */ e(
|
39
39
|
"section",
|
40
40
|
{
|
41
41
|
"data-testid": x,
|
42
|
-
className:
|
42
|
+
className: t,
|
43
43
|
style: c ?? void 0,
|
44
44
|
children: /* @__PURE__ */ e(
|
45
45
|
"select",
|
@@ -47,10 +47,10 @@ const q = ({
|
|
47
47
|
"data-testid": l,
|
48
48
|
className: i ?? void 0,
|
49
49
|
style: u ?? void 0,
|
50
|
-
|
50
|
+
value: m,
|
51
51
|
name: f,
|
52
52
|
disabled: r ?? !1,
|
53
|
-
multiple:
|
53
|
+
multiple: s,
|
54
54
|
size: v,
|
55
55
|
onClick: C,
|
56
56
|
onChange: I,
|
@@ -70,5 +70,5 @@ const q = ({
|
|
70
70
|
);
|
71
71
|
};
|
72
72
|
export {
|
73
|
-
|
73
|
+
w as default
|
74
74
|
};
|
@@ -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,5 +1,5 @@
|
|
1
|
-
import { jsxs as f, Fragment as p, jsx as
|
2
|
-
import { useMemo as
|
1
|
+
import { jsxs as f, Fragment as p, jsx as o } from "react/jsx-runtime";
|
2
|
+
import { useMemo as m } from "react";
|
3
3
|
import { parseClasses as u, parseTestId as I } from "../../../functions/parsers.js";
|
4
4
|
import T from "../../atoms/TextArea/index.js";
|
5
5
|
import h from "../../atoms/Select/index.js";
|
@@ -8,7 +8,7 @@ import C from "../../atoms/RadioButton/index.js";
|
|
8
8
|
import E from "../InputControl/index.js";
|
9
9
|
import { FormFieldType as l } from "../../../interfaces/moleculeProps.js";
|
10
10
|
const x = (r, t) => {
|
11
|
-
const e = r !== null ? /* @__PURE__ */
|
11
|
+
const e = r !== null ? /* @__PURE__ */ o(
|
12
12
|
"label",
|
13
13
|
{
|
14
14
|
"data-testid": "test-form-field-label",
|
@@ -16,55 +16,55 @@ const x = (r, t) => {
|
|
16
16
|
children: r
|
17
17
|
}
|
18
18
|
) : null;
|
19
|
-
return t ? /* @__PURE__ */
|
19
|
+
return t ? /* @__PURE__ */ o("section", { className: "field-label", children: e }) : e;
|
20
20
|
}, F = ({
|
21
21
|
testId: r,
|
22
22
|
type: t,
|
23
23
|
input: e
|
24
24
|
}) => {
|
25
|
-
const
|
26
|
-
testId: r ?? `test-form-field-${t}`,
|
25
|
+
const s = {
|
26
|
+
testId: (e == null ? void 0 : e.testId) ?? r ?? `test-form-field-${t}`,
|
27
27
|
containerTestId: r ?? `test-form-field-container-${t}`
|
28
28
|
};
|
29
29
|
switch (t) {
|
30
30
|
case l.INPUT:
|
31
|
-
return /* @__PURE__ */
|
31
|
+
return /* @__PURE__ */ o(
|
32
32
|
E,
|
33
33
|
{
|
34
34
|
...e,
|
35
|
-
...
|
35
|
+
...s
|
36
36
|
}
|
37
37
|
);
|
38
38
|
case l.SELECT:
|
39
|
-
return /* @__PURE__ */
|
39
|
+
return /* @__PURE__ */ o(
|
40
40
|
h,
|
41
41
|
{
|
42
42
|
...e,
|
43
|
-
...
|
43
|
+
...s
|
44
44
|
}
|
45
45
|
);
|
46
46
|
case l.CHECKBOX:
|
47
|
-
return /* @__PURE__ */
|
47
|
+
return /* @__PURE__ */ o(
|
48
48
|
b,
|
49
49
|
{
|
50
50
|
...e,
|
51
|
-
...
|
51
|
+
...s
|
52
52
|
}
|
53
53
|
);
|
54
54
|
case l.RADIOBUTTON:
|
55
|
-
return /* @__PURE__ */
|
55
|
+
return /* @__PURE__ */ o(
|
56
56
|
C,
|
57
57
|
{
|
58
58
|
...e,
|
59
|
-
...
|
59
|
+
...s
|
60
60
|
}
|
61
61
|
);
|
62
62
|
case l.TEXTAREA:
|
63
|
-
return /* @__PURE__ */
|
63
|
+
return /* @__PURE__ */ o(
|
64
64
|
T,
|
65
65
|
{
|
66
66
|
...e,
|
67
|
-
...
|
67
|
+
...s
|
68
68
|
}
|
69
69
|
);
|
70
70
|
}
|
@@ -75,7 +75,7 @@ const x = (r, t) => {
|
|
75
75
|
parsedClasses: t,
|
76
76
|
rules: [{ regExp: /help|is/gm, replacer: "" }]
|
77
77
|
});
|
78
|
-
return /* @__PURE__ */
|
78
|
+
return /* @__PURE__ */ o(
|
79
79
|
"p",
|
80
80
|
{
|
81
81
|
"data-testid": e,
|
@@ -87,17 +87,17 @@ const x = (r, t) => {
|
|
87
87
|
testId: r = null,
|
88
88
|
labelText: t,
|
89
89
|
type: e,
|
90
|
-
input:
|
91
|
-
helper:
|
92
|
-
isHorizontal:
|
90
|
+
input: s,
|
91
|
+
helper: a,
|
92
|
+
isHorizontal: n
|
93
93
|
}) => {
|
94
|
-
const c =
|
95
|
-
() => x(t,
|
96
|
-
[t,
|
97
|
-
), d =
|
98
|
-
() => F({ testId: r ?? void 0, type: e, input:
|
99
|
-
[r, e,
|
100
|
-
), i =
|
94
|
+
const c = m(
|
95
|
+
() => x(t, n),
|
96
|
+
[t, n]
|
97
|
+
), d = m(
|
98
|
+
() => F({ testId: r ?? void 0, type: e, input: s }),
|
99
|
+
[r, e, s]
|
100
|
+
), i = m(() => N(a), [a]);
|
101
101
|
return /* @__PURE__ */ f(p, { children: [
|
102
102
|
c,
|
103
103
|
d,
|
@@ -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
|
};
|
@@ -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.5",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A component library based on React, Bulma, Typescript and Vite",
|
6
6
|
"keywords": [
|
@@ -88,25 +88,26 @@
|
|
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",
|
103
103
|
"glob": "^11.0.0",
|
104
104
|
"globals": "^15.14.0",
|
105
|
+
"husky": "^9.1.7",
|
105
106
|
"hygen": "^6.2.11",
|
106
107
|
"jest": "^29.7.0",
|
107
108
|
"jest-environment-jsdom": "^29.7.0",
|
108
|
-
"lint-staged": "^15.
|
109
|
-
"npm-check-updates": "^17.1.
|
109
|
+
"lint-staged": "^15.3.0",
|
110
|
+
"npm-check-updates": "^17.1.13",
|
110
111
|
"prettier": "^3.4.2",
|
111
112
|
"react": "^18.3.1",
|
112
113
|
"react-dom": "^18.3.1",
|
@@ -114,8 +115,8 @@
|
|
114
115
|
"storybook": "^8.4.7",
|
115
116
|
"tslib": "^2.8.1",
|
116
117
|
"typescript": "~5.7.2",
|
117
|
-
"typescript-eslint": "^8.18.
|
118
|
-
"vite": "^6.0.
|
118
|
+
"typescript-eslint": "^8.18.2",
|
119
|
+
"vite": "^6.0.6",
|
119
120
|
"vite-plugin-dts": "^4.4.0"
|
120
121
|
},
|
121
122
|
"lint-staged": {
|