reactive-bulma 4.3.27 → 4.4.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/README.md +1 -0
- package/dist/assets/reactive-bulma.css +1 -1
- package/dist/components/atoms/BreadcrumbItem/index.js +58 -34
- package/dist/components/atoms/BreadcrumbItem/index.stories.d.ts +1 -0
- package/dist/components/atoms/Button/index.js +76 -38
- package/dist/components/atoms/Button/index.stories.d.ts +5 -0
- package/dist/components/atoms/Checkbox/index.js +47 -40
- package/dist/components/atoms/Column/index.js +22 -21
- package/dist/components/atoms/Delete/index.js +22 -17
- package/dist/components/atoms/GridCell/index.d.ts +4 -0
- package/dist/components/atoms/GridCell/index.js +40 -0
- package/dist/components/atoms/GridCell/index.stories.d.ts +5 -0
- package/dist/components/atoms/GridCell/index.test.d.ts +0 -0
- package/dist/components/atoms/Icon/index.js +54 -57
- package/dist/components/atoms/Image/index.js +28 -27
- package/dist/components/atoms/Image/index.stories.d.ts +1 -0
- package/dist/components/atoms/NavBarItem/index.js +7 -7
- package/dist/components/atoms/ProgressBar/index.js +25 -24
- package/dist/components/atoms/RadioButton/index.js +53 -73
- package/dist/components/atoms/Select/index.js +72 -54
- package/dist/components/atoms/TabItem/index.js +34 -30
- package/dist/components/atoms/TableCell/index.js +20 -15
- package/dist/components/atoms/TableCell/index.stories.d.ts +1 -0
- package/dist/components/atoms/TableHeadCell/index.js +22 -14
- package/dist/components/atoms/TableHeadCell/index.stories.d.ts +1 -0
- package/dist/components/atoms/Tag/index.js +36 -69
- package/dist/components/atoms/Tag/index.stories.d.ts +0 -3
- package/dist/components/atoms/TagWithAddon/index.d.ts +4 -0
- package/dist/components/atoms/TagWithAddon/index.js +91 -0
- package/dist/components/atoms/TagWithAddon/index.stories.d.ts +11 -0
- package/dist/components/atoms/TagWithAddon/index.test.d.ts +0 -0
- package/dist/components/atoms/Tile/index.js +31 -29
- package/dist/components/atoms/Title/index.js +28 -16
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/atoms/index.js +36 -32
- package/dist/components/molecules/Breadcrumbs/index.js +48 -49
- package/dist/components/molecules/CheckboxGroup/index.d.ts +4 -0
- package/dist/components/molecules/CheckboxGroup/index.js +34 -0
- package/dist/components/molecules/CheckboxGroup/index.stories.d.ts +5 -0
- package/dist/components/molecules/CheckboxGroup/index.test.d.ts +0 -0
- package/dist/components/molecules/ColumnGroup/index.js +41 -37
- package/dist/components/molecules/Dropdown/index.js +58 -49
- package/dist/components/molecules/Dropdown/index.stories.d.ts +3 -0
- package/dist/components/molecules/FormFieldInput/index.js +68 -85
- package/dist/components/molecules/FormFieldInput/index.stories.d.ts +1 -3
- package/dist/components/molecules/Grid/index.d.ts +4 -0
- package/dist/components/molecules/Grid/index.js +86 -0
- package/dist/components/molecules/Grid/index.stories.d.ts +12 -0
- package/dist/components/molecules/Grid/index.test.d.ts +0 -0
- package/dist/components/molecules/InputControl/index.js +92 -47
- package/dist/components/molecules/InputControl/index.stories.d.ts +2 -0
- package/dist/components/molecules/Menu/index.js +32 -29
- package/dist/components/molecules/MenuList/index.js +33 -30
- package/dist/components/molecules/Message/index.js +32 -26
- package/dist/components/molecules/NavBarBrand/index.js +1 -1
- package/dist/components/molecules/NavBarDropdown/index.js +55 -57
- package/dist/components/molecules/NavBarDropdown/index.stories.d.ts +2 -0
- package/dist/components/molecules/Notification/index.js +26 -25
- package/dist/components/molecules/Pagination/index.js +91 -81
- package/dist/components/molecules/Pagination/index.stories.d.ts +2 -0
- package/dist/components/molecules/Section/index.js +18 -13
- package/dist/components/molecules/TableRow/index.js +41 -32
- package/dist/components/molecules/TableRow/index.stories.d.ts +1 -0
- package/dist/components/molecules/Tabs/index.js +36 -32
- package/dist/components/molecules/TagList/index.d.ts +4 -0
- package/dist/components/molecules/TagList/index.js +31 -0
- package/dist/components/molecules/TagList/index.stories.d.ts +5 -0
- package/dist/components/molecules/TagList/index.test.d.ts +0 -0
- package/dist/components/molecules/TileBox/index.js +1 -1
- package/dist/components/molecules/index.d.ts +3 -0
- package/dist/components/molecules/index.js +26 -20
- package/dist/components/organisms/Card/index.js +84 -72
- package/dist/components/organisms/FormField/index.js +54 -57
- package/dist/components/organisms/FormField/index.stories.d.ts +2 -0
- package/dist/components/organisms/Hero/index.js +26 -20
- package/dist/components/organisms/Level/index.js +43 -30
- package/dist/components/organisms/NavBar/index.js +65 -57
- package/dist/components/organisms/Panel/index.js +33 -27
- package/dist/components/organisms/Table/index.js +2 -2
- package/dist/components/organisms/Table/index.stories.d.ts +1 -0
- package/dist/components/organisms/TileGroup/index.js +31 -36
- package/dist/constants/classes.d.ts +34 -0
- package/dist/constants/classes.js +37 -0
- package/dist/constants/regExp.d.ts +18 -0
- package/dist/constants/regExp.js +23 -0
- package/dist/functions/parsers.js +5 -4
- package/dist/index.js +104 -94
- package/dist/interfaces/atomProps.d.ts +62 -31
- package/dist/interfaces/commonProps.d.ts +5 -0
- package/dist/interfaces/moleculeProps.d.ts +67 -22
- package/dist/interfaces/moleculeProps.js +1 -1
- package/dist/interfaces/organismProps.d.ts +35 -5
- package/dist/types/domTypes.d.ts +4 -3
- package/dist/types/domTypes.js +2 -2
- package/dist/types/styleTypes.d.ts +28 -18
- package/package.json +23 -22
|
@@ -1,42 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { parseClasses as p, parseTestId as u } from "../../../functions/parsers.js";
|
|
3
|
-
import g from "../../atoms/Delete/index.js";
|
|
1
|
+
import { jsxs as m, jsx as l } from "react/jsx-runtime";
|
|
4
2
|
import "react";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { COMMON_CLASSES as o } from "../../../constants/classes.js";
|
|
4
|
+
import { parseClasses as $, parseTestId as g } from "../../../functions/parsers.js";
|
|
5
|
+
import C from "../../atoms/Delete/index.js";
|
|
6
|
+
const y = ({
|
|
7
|
+
testId: i = null,
|
|
8
|
+
cssClasses: c = null,
|
|
9
|
+
style: u = null,
|
|
9
10
|
headerText: a = null,
|
|
10
|
-
bodyText:
|
|
11
|
-
deleteButton:
|
|
12
|
-
color:
|
|
13
|
-
size:
|
|
11
|
+
bodyText: p,
|
|
12
|
+
deleteButton: t = null,
|
|
13
|
+
color: n = null,
|
|
14
|
+
size: r = null
|
|
14
15
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
|
|
16
|
+
const s = "message", d = $([
|
|
17
|
+
s,
|
|
18
|
+
n ? `${o.IS}${n}` : null,
|
|
19
|
+
r ? `${o.IS}${r}` : null,
|
|
20
|
+
c
|
|
21
|
+
]), e = i ?? g({ tag: s, parsedClasses: d });
|
|
22
|
+
return /* @__PURE__ */ m(
|
|
17
23
|
"article",
|
|
18
24
|
{
|
|
19
|
-
"data-testid":
|
|
20
|
-
className:
|
|
21
|
-
style:
|
|
25
|
+
"data-testid": e,
|
|
26
|
+
className: d,
|
|
27
|
+
style: u ?? void 0,
|
|
22
28
|
children: [
|
|
23
|
-
a && /* @__PURE__ */
|
|
29
|
+
a && /* @__PURE__ */ m(
|
|
24
30
|
"section",
|
|
25
31
|
{
|
|
26
|
-
"data-testid": `${
|
|
27
|
-
className:
|
|
32
|
+
"data-testid": `${e}-header`,
|
|
33
|
+
className: `${s}-header`,
|
|
28
34
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
35
|
+
/* @__PURE__ */ l("p", { children: a }),
|
|
36
|
+
t ? /* @__PURE__ */ l(C, { ...t }) : null
|
|
31
37
|
]
|
|
32
38
|
}
|
|
33
39
|
),
|
|
34
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ l(
|
|
35
41
|
"section",
|
|
36
42
|
{
|
|
37
|
-
"data-testid": `${
|
|
38
|
-
className:
|
|
39
|
-
children:
|
|
43
|
+
"data-testid": `${e}-body`,
|
|
44
|
+
className: `${s}-body`,
|
|
45
|
+
children: p
|
|
40
46
|
}
|
|
41
47
|
)
|
|
42
48
|
]
|
|
@@ -44,5 +50,5 @@ const N = ({
|
|
|
44
50
|
);
|
|
45
51
|
};
|
|
46
52
|
export {
|
|
47
|
-
|
|
53
|
+
y as default
|
|
48
54
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { parseClasses as n, parseTestId as t } from "../../../functions/parsers.js";
|
|
3
2
|
import "react";
|
|
3
|
+
import { parseClasses as n, parseTestId as t } from "../../../functions/parsers.js";
|
|
4
4
|
import b from "../../atoms/NavBarItem/index.js";
|
|
5
5
|
const C = ({
|
|
6
6
|
testId: d = null,
|
|
@@ -1,80 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
cssClasses: t = null,
|
|
22
|
-
containerCssClasses: i = null,
|
|
23
|
-
style: p = null,
|
|
24
|
-
containerStyle: v = null,
|
|
25
|
-
text: m,
|
|
26
|
-
items: c,
|
|
27
|
-
position: u = null,
|
|
28
|
-
isActive: w = !1,
|
|
29
|
-
isHoverable: b = !1,
|
|
30
|
-
hasDropdownUp: h = !1,
|
|
31
|
-
hasBoxedMenu: f = !1
|
|
1
|
+
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as T, Fragment as j } from "react";
|
|
3
|
+
import { parseClasses as r, parseTestId as d } from "../../../functions/parsers.js";
|
|
4
|
+
import { generateKey as k } from "../../../functions/generators.js";
|
|
5
|
+
import E from "../../atoms/NavBarItem/index.js";
|
|
6
|
+
const M = ({
|
|
7
|
+
testId: t = null,
|
|
8
|
+
containerTestId: i = null,
|
|
9
|
+
cssClasses: p = null,
|
|
10
|
+
containerCssClasses: m = null,
|
|
11
|
+
style: v = null,
|
|
12
|
+
containerStyle: c = null,
|
|
13
|
+
text: u,
|
|
14
|
+
items: e,
|
|
15
|
+
position: w = null,
|
|
16
|
+
isActive: b = !1,
|
|
17
|
+
isHoverable: h = !1,
|
|
18
|
+
hasDropdownUp: f = !1,
|
|
19
|
+
hasBoxedMenu: g = !1,
|
|
20
|
+
isArrowLess: B = null
|
|
32
21
|
}) => {
|
|
33
|
-
const
|
|
22
|
+
const s = r([
|
|
34
23
|
"navbar-item",
|
|
35
24
|
"has-dropdown",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
]),
|
|
25
|
+
w,
|
|
26
|
+
b ? "is-active" : null,
|
|
27
|
+
h ? "is-hoverable" : null,
|
|
28
|
+
f ? "has-dropdown-up" : null,
|
|
29
|
+
m
|
|
30
|
+
]), C = i ?? d({
|
|
42
31
|
tag: "navbar-dropdown-container",
|
|
43
|
-
parsedClasses:
|
|
32
|
+
parsedClasses: s,
|
|
44
33
|
rules: [
|
|
45
34
|
{ regExp: /navbar-item|has-dropdown/gm, replacer: "" },
|
|
46
35
|
{ regExp: /is-|has-/gm, replacer: "-" }
|
|
47
36
|
]
|
|
48
|
-
}),
|
|
37
|
+
}), n = r([
|
|
49
38
|
"navbar-dropdown",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
]),
|
|
39
|
+
g ? "is-boxed" : null,
|
|
40
|
+
p
|
|
41
|
+
]), N = r([
|
|
42
|
+
"navbar-link",
|
|
43
|
+
B ? "is-arrowless" : null
|
|
44
|
+
]), x = t ?? d({
|
|
53
45
|
tag: "navbar-dropdown",
|
|
54
|
-
parsedClasses:
|
|
55
|
-
})
|
|
56
|
-
|
|
46
|
+
parsedClasses: n
|
|
47
|
+
}), D = T(
|
|
48
|
+
() => e.map((o) => {
|
|
49
|
+
const l = o === "divider", I = l ? "navbar-dropdown-divider" : "navbar-dropdown-item";
|
|
50
|
+
return /* @__PURE__ */ a(j, { children: l ? /* @__PURE__ */ a("hr", { className: "navbar-divider" }) : /* @__PURE__ */ a(E, { ...o }) }, `${I}-${k()}`);
|
|
51
|
+
}),
|
|
52
|
+
[e]
|
|
53
|
+
);
|
|
54
|
+
return /* @__PURE__ */ y(
|
|
57
55
|
"section",
|
|
58
56
|
{
|
|
59
|
-
"data-testid":
|
|
60
|
-
className:
|
|
61
|
-
style:
|
|
57
|
+
"data-testid": C,
|
|
58
|
+
className: s,
|
|
59
|
+
style: c ?? void 0,
|
|
62
60
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ a(
|
|
64
62
|
"a",
|
|
65
63
|
{
|
|
66
|
-
className:
|
|
64
|
+
className: N,
|
|
67
65
|
"aria-hidden": "true",
|
|
68
|
-
children:
|
|
66
|
+
children: u
|
|
69
67
|
}
|
|
70
68
|
),
|
|
71
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ a(
|
|
72
70
|
"section",
|
|
73
71
|
{
|
|
74
72
|
"data-testid": x,
|
|
75
|
-
className:
|
|
76
|
-
style:
|
|
77
|
-
children:
|
|
73
|
+
className: n,
|
|
74
|
+
style: v ?? void 0,
|
|
75
|
+
children: D
|
|
78
76
|
}
|
|
79
77
|
)
|
|
80
78
|
]
|
|
@@ -82,5 +80,5 @@ const D = (a) => a === "divider" ? /* @__PURE__ */ r(
|
|
|
82
80
|
);
|
|
83
81
|
};
|
|
84
82
|
export {
|
|
85
|
-
|
|
83
|
+
M as default
|
|
86
84
|
};
|
|
@@ -5,6 +5,8 @@ export default _default;
|
|
|
5
5
|
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').NavBarDropdownProps>;
|
|
6
6
|
export declare const OpenState: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').NavBarDropdownProps>;
|
|
7
7
|
export declare const Hoverable: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').NavBarDropdownProps>;
|
|
8
|
+
export declare const HasAnActiveItem: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').NavBarDropdownProps>;
|
|
8
9
|
export declare const HasDividerItems: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').NavBarDropdownProps>;
|
|
9
10
|
export declare const HasBoxedMenu: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').NavBarDropdownProps>;
|
|
11
|
+
export declare const WithoutArrow: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').NavBarDropdownProps>;
|
|
10
12
|
export declare const InverseDropdown: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').NavBarDropdownProps>;
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { parseClasses as f, parseTestId as m } from "../../../functions/parsers.js";
|
|
3
|
-
import p from "../../atoms/Delete/index.js";
|
|
1
|
+
import { jsxs as f, jsx as m } from "react/jsx-runtime";
|
|
4
2
|
import "react";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { COMMON_CLASSES as i } from "../../../constants/classes.js";
|
|
4
|
+
import { parseClasses as p, parseTestId as d } from "../../../functions/parsers.js";
|
|
5
|
+
import C from "../../atoms/Delete/index.js";
|
|
6
|
+
const j = ({
|
|
7
|
+
testId: o = null,
|
|
8
|
+
cssClasses: a = null,
|
|
9
|
+
style: e = null,
|
|
10
|
+
children: r = null,
|
|
10
11
|
deleteButton: s = null,
|
|
11
|
-
color:
|
|
12
|
-
isLightColor:
|
|
12
|
+
color: t = null,
|
|
13
|
+
isLightColor: c = null
|
|
13
14
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
]),
|
|
20
|
-
tag:
|
|
21
|
-
parsedClasses:
|
|
15
|
+
const l = "notification", n = p([
|
|
16
|
+
l,
|
|
17
|
+
t ? `${i.IS}${t}` : null,
|
|
18
|
+
c ? i.LIGHT : null,
|
|
19
|
+
a
|
|
20
|
+
]), u = o ?? d({
|
|
21
|
+
tag: l,
|
|
22
|
+
parsedClasses: n
|
|
22
23
|
});
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ f(
|
|
24
25
|
"section",
|
|
25
26
|
{
|
|
26
|
-
"data-testid":
|
|
27
|
-
className:
|
|
28
|
-
style:
|
|
27
|
+
"data-testid": u,
|
|
28
|
+
className: n,
|
|
29
|
+
style: e ?? void 0,
|
|
29
30
|
children: [
|
|
30
|
-
s ? /* @__PURE__ */
|
|
31
|
-
|
|
31
|
+
s ? /* @__PURE__ */ m(C, { ...s }) : null,
|
|
32
|
+
r
|
|
32
33
|
]
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
36
|
};
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
j as default
|
|
38
39
|
};
|
|
@@ -1,103 +1,113 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { generateKey as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
) }) : null, C = (n) => {
|
|
14
|
-
if (!n) return null;
|
|
15
|
-
const a = c([
|
|
16
|
-
n.cssClasses,
|
|
17
|
-
n.isDisabled ? "is-disabled" : null
|
|
1
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import x, { useCallback as A, useMemo as B } from "react";
|
|
3
|
+
import { COMMON_CLASSES as i } from "../../../constants/classes.js";
|
|
4
|
+
import { parseClasses as u, parseTestId as S } from "../../../functions/parsers.js";
|
|
5
|
+
import { generateKey as d } from "../../../functions/generators.js";
|
|
6
|
+
import D from "../../atoms/PaginationItem/index.js";
|
|
7
|
+
const n = "pagination", P = "pagination-list", F = (e) => {
|
|
8
|
+
if (!e) return null;
|
|
9
|
+
const l = u([
|
|
10
|
+
e.cssClasses,
|
|
11
|
+
e.isDisabled ? i.DISABLED : null
|
|
18
12
|
]);
|
|
19
13
|
return /* @__PURE__ */ s(
|
|
20
14
|
"a",
|
|
21
15
|
{
|
|
22
|
-
className:
|
|
23
|
-
onClick:
|
|
16
|
+
className: l,
|
|
17
|
+
onClick: e.onClick ?? void 0,
|
|
24
18
|
"aria-hidden": "true",
|
|
25
|
-
children:
|
|
19
|
+
children: e.text
|
|
26
20
|
}
|
|
27
21
|
);
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
...t
|
|
40
|
-
},
|
|
41
|
-
`pagination-item-${k()}`
|
|
42
|
-
);
|
|
43
|
-
if (i === --l)
|
|
44
|
-
return /* @__PURE__ */ d(m.Fragment, { children: [
|
|
45
|
-
f(a),
|
|
46
|
-
/* @__PURE__ */ s(o, { ...t })
|
|
47
|
-
] }, "last-pagination-item");
|
|
48
|
-
}), w = ({
|
|
49
|
-
testId: n = null,
|
|
50
|
-
containerTestId: a = null,
|
|
51
|
-
cssClasses: e = null,
|
|
52
|
-
containerCssClasses: t = null,
|
|
53
|
-
style: i = null,
|
|
54
|
-
containerStyle: l = null,
|
|
55
|
-
pages: r,
|
|
56
|
-
ellipsisItems: h = 0,
|
|
57
|
-
showPreviousPageButton: x = {
|
|
22
|
+
}, G = ({
|
|
23
|
+
testId: e = null,
|
|
24
|
+
containerTestId: l = null,
|
|
25
|
+
cssClasses: I = null,
|
|
26
|
+
containerCssClasses: b = null,
|
|
27
|
+
style: k = null,
|
|
28
|
+
containerStyle: y = null,
|
|
29
|
+
pages: m,
|
|
30
|
+
ellipsisItems: r = 0,
|
|
31
|
+
showPreviousPageButton: E = {
|
|
58
32
|
text: "Previous",
|
|
59
|
-
cssClasses:
|
|
33
|
+
cssClasses: `${n}-previous`
|
|
60
34
|
},
|
|
61
|
-
showNextPageButton:
|
|
35
|
+
showNextPageButton: L = {
|
|
62
36
|
text: "Next page",
|
|
63
|
-
cssClasses:
|
|
37
|
+
cssClasses: `${n}-next`
|
|
64
38
|
},
|
|
65
|
-
hasEllipsis:
|
|
66
|
-
isRounded:
|
|
67
|
-
alignment:
|
|
68
|
-
size:
|
|
39
|
+
hasEllipsis: o = !1,
|
|
40
|
+
isRounded: M = !1,
|
|
41
|
+
alignment: p = null,
|
|
42
|
+
size: C = null
|
|
69
43
|
}) => {
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
]),
|
|
77
|
-
tag:
|
|
78
|
-
parsedClasses:
|
|
79
|
-
}),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
]),
|
|
83
|
-
|
|
44
|
+
const f = u([
|
|
45
|
+
n,
|
|
46
|
+
M ? i.ROUNDED : null,
|
|
47
|
+
C ? `${i.IS}${C}` : null,
|
|
48
|
+
p ? `${i.IS}${p}` : null,
|
|
49
|
+
I
|
|
50
|
+
]), O = e ?? S({
|
|
51
|
+
tag: n,
|
|
52
|
+
parsedClasses: f
|
|
53
|
+
}), g = u([
|
|
54
|
+
P,
|
|
55
|
+
b
|
|
56
|
+
]), R = l ?? S({
|
|
57
|
+
tag: P,
|
|
58
|
+
parsedClasses: g
|
|
59
|
+
}), $ = A(
|
|
60
|
+
(a) => F(a),
|
|
61
|
+
[]
|
|
62
|
+
), T = B(() => {
|
|
63
|
+
const a = o ? /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
|
|
64
|
+
"span",
|
|
65
|
+
{
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
className: `${n}-ellipsis`,
|
|
68
|
+
children: "…"
|
|
69
|
+
}
|
|
70
|
+
) }) : null;
|
|
71
|
+
return m.map((N, t, { length: h }) => {
|
|
72
|
+
const j = h - r - 1, v = /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(D, { ...N }) });
|
|
73
|
+
if (t === 0)
|
|
74
|
+
return /* @__PURE__ */ c(x.Fragment, { children: [
|
|
75
|
+
v,
|
|
76
|
+
a
|
|
77
|
+
] }, `first-pagination-item-${d()}`);
|
|
78
|
+
if (!o || t > r && t < j)
|
|
79
|
+
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(D, { ...N }) }, `${n}-item-${d()}`);
|
|
80
|
+
if (t === --h)
|
|
81
|
+
return /* @__PURE__ */ c(
|
|
82
|
+
x.Fragment,
|
|
83
|
+
{
|
|
84
|
+
children: [
|
|
85
|
+
a,
|
|
86
|
+
v
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
`last-${n}-item-${d()}`
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
}, [m, o, r]);
|
|
93
|
+
return /* @__PURE__ */ c(
|
|
84
94
|
"nav",
|
|
85
95
|
{
|
|
86
|
-
"data-testid":
|
|
87
|
-
className:
|
|
88
|
-
style:
|
|
96
|
+
"data-testid": O,
|
|
97
|
+
className: f,
|
|
98
|
+
style: y ?? void 0,
|
|
89
99
|
role: "navigation",
|
|
90
100
|
"aria-label": "pagination",
|
|
91
101
|
children: [
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
$(E),
|
|
103
|
+
$(L),
|
|
94
104
|
/* @__PURE__ */ s(
|
|
95
105
|
"ul",
|
|
96
106
|
{
|
|
97
|
-
"data-testid":
|
|
98
|
-
className:
|
|
99
|
-
style:
|
|
100
|
-
children:
|
|
107
|
+
"data-testid": R,
|
|
108
|
+
className: g,
|
|
109
|
+
style: k ?? void 0,
|
|
110
|
+
children: T
|
|
101
111
|
}
|
|
102
112
|
)
|
|
103
113
|
]
|
|
@@ -105,5 +115,5 @@ const f = (n) => n ? /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
|
|
|
105
115
|
);
|
|
106
116
|
};
|
|
107
117
|
export {
|
|
108
|
-
|
|
118
|
+
G as default
|
|
109
119
|
};
|
|
@@ -4,6 +4,8 @@ declare const _default: Meta<typeof Pagination>;
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').PaginationProps>;
|
|
6
6
|
export declare const Centered: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').PaginationProps>;
|
|
7
|
+
export declare const BigSize: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').PaginationProps>;
|
|
8
|
+
export declare const Rounded: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').PaginationProps>;
|
|
7
9
|
export declare const CustomNavigationButtons: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').PaginationProps>;
|
|
8
10
|
export declare const DisabledNavigationButtons: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').PaginationProps>;
|
|
9
11
|
export declare const NoNavigationButtons: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').PaginationProps>;
|
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { COMMON_CLASSES as i } from "../../../constants/classes.js";
|
|
3
|
+
import { parseClasses as d, parseTestId as m } from "../../../functions/parsers.js";
|
|
4
|
+
const S = ({
|
|
5
|
+
testId: l = null,
|
|
6
|
+
cssClasses: o = null,
|
|
7
|
+
style: n = null,
|
|
8
|
+
content: a,
|
|
9
|
+
size: s = null
|
|
9
10
|
}) => {
|
|
10
|
-
const
|
|
11
|
+
const t = "section", e = d([
|
|
12
|
+
t,
|
|
13
|
+
s ? `${i.IS}${s}` : null,
|
|
14
|
+
o
|
|
15
|
+
]), r = l ?? m({ tag: t, parsedClasses: e });
|
|
11
16
|
return /* @__PURE__ */ c(
|
|
12
17
|
"section",
|
|
13
18
|
{
|
|
14
|
-
"data-testid":
|
|
15
|
-
className:
|
|
16
|
-
style:
|
|
17
|
-
children:
|
|
19
|
+
"data-testid": r,
|
|
20
|
+
className: e,
|
|
21
|
+
style: n ?? void 0,
|
|
22
|
+
children: a
|
|
18
23
|
}
|
|
19
24
|
);
|
|
20
25
|
};
|
|
21
26
|
export {
|
|
22
|
-
|
|
27
|
+
S as default
|
|
23
28
|
};
|
|
@@ -1,42 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as r } from "react";
|
|
3
|
+
import { COMMON_CLASSES as C } from "../../../constants/classes.js";
|
|
4
|
+
import { parseClasses as T, parseTestId as w } from "../../../functions/parsers.js";
|
|
5
|
+
import { generateKey as S } from "../../../functions/generators.js";
|
|
6
|
+
import x from "../../atoms/TableHeadCell/index.js";
|
|
7
|
+
import I from "../../atoms/TableCell/index.js";
|
|
8
|
+
const z = ({
|
|
9
|
+
testId: a = null,
|
|
10
|
+
cssClasses: m = null,
|
|
11
|
+
style: n = null,
|
|
12
|
+
color: l = null,
|
|
13
|
+
headCell: e = null,
|
|
14
|
+
listOfCells: s,
|
|
15
|
+
isSelected: i = !1,
|
|
16
|
+
onClick: p = null
|
|
15
17
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const o = T([
|
|
19
|
+
i ? "is-selected" : null,
|
|
20
|
+
l ? `${C.IS}${l}` : null,
|
|
21
|
+
m
|
|
22
|
+
]), u = a ?? w({ tag: "table-row", parsedClasses: o }), d = r(
|
|
23
|
+
() => e ? /* @__PURE__ */ t(x, { ...e }) : null,
|
|
24
|
+
[e]
|
|
25
|
+
), b = r(
|
|
26
|
+
() => s.map((c) => /* @__PURE__ */ t(
|
|
27
|
+
I,
|
|
28
|
+
{
|
|
29
|
+
...c
|
|
30
|
+
},
|
|
31
|
+
`table-row-${S()}`
|
|
32
|
+
)),
|
|
33
|
+
[s]
|
|
34
|
+
);
|
|
35
|
+
return /* @__PURE__ */ f(
|
|
21
36
|
"tr",
|
|
22
37
|
{
|
|
23
|
-
"data-testid":
|
|
24
|
-
className:
|
|
25
|
-
style:
|
|
26
|
-
onClick:
|
|
38
|
+
"data-testid": u,
|
|
39
|
+
className: o,
|
|
40
|
+
style: n ?? void 0,
|
|
41
|
+
onClick: p ?? void 0,
|
|
27
42
|
children: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
f,
|
|
31
|
-
{
|
|
32
|
-
...p
|
|
33
|
-
},
|
|
34
|
-
`table-row-${w()}`
|
|
35
|
-
))
|
|
43
|
+
d,
|
|
44
|
+
b
|
|
36
45
|
]
|
|
37
46
|
}
|
|
38
47
|
);
|
|
39
48
|
};
|
|
40
49
|
export {
|
|
41
|
-
|
|
50
|
+
z as default
|
|
42
51
|
};
|
|
@@ -3,5 +3,6 @@ import { default as TableRow } from '.';
|
|
|
3
3
|
declare const _default: Meta<typeof TableRow>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').TableRowProps>;
|
|
6
|
+
export declare const Colored: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').TableRowProps>;
|
|
6
7
|
export declare const WithHeaderCell: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').TableRowProps>;
|
|
7
8
|
export declare const Selected: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').TableRowProps>;
|