reactive-bulma 4.3.28 → 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 +18 -17
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsxs as I, Fragment as b, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as f } from "react";
|
|
3
|
+
import v from "../Icon/index.js";
|
|
4
|
+
import { parseTestId as r } from "../../../functions/parsers.js";
|
|
5
|
+
const x = ({
|
|
6
|
+
testId: i = null,
|
|
7
|
+
containerTestId: m = null,
|
|
7
8
|
cssClasses: t = null,
|
|
8
9
|
containerCssClasses: l = null,
|
|
9
|
-
style:
|
|
10
|
-
containerStyle:
|
|
11
|
-
icon:
|
|
12
|
-
text:
|
|
13
|
-
onClick:
|
|
10
|
+
style: n = null,
|
|
11
|
+
containerStyle: s = null,
|
|
12
|
+
icon: e = null,
|
|
13
|
+
text: d,
|
|
14
|
+
onClick: u = null
|
|
14
15
|
}) => {
|
|
15
|
-
const
|
|
16
|
+
const p = m ?? r({
|
|
16
17
|
tag: "tab-item-container",
|
|
17
18
|
parsedClasses: l ?? ""
|
|
18
|
-
}),
|
|
19
|
-
|
|
19
|
+
}), o = i ?? r({ tag: "tab-item", parsedClasses: t ?? "" }), c = f(
|
|
20
|
+
() => /* @__PURE__ */ I(b, { children: [
|
|
21
|
+
e ? /* @__PURE__ */ a(v, { ...e }) : null,
|
|
22
|
+
/* @__PURE__ */ a(
|
|
23
|
+
"span",
|
|
24
|
+
{
|
|
25
|
+
"data-testid": o,
|
|
26
|
+
className: t ?? void 0,
|
|
27
|
+
style: n ?? void 0,
|
|
28
|
+
children: d
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
] }),
|
|
32
|
+
[e, o, t, n, d]
|
|
33
|
+
);
|
|
34
|
+
return /* @__PURE__ */ a(
|
|
20
35
|
"a",
|
|
21
36
|
{
|
|
22
|
-
"data-testid":
|
|
37
|
+
"data-testid": p,
|
|
23
38
|
className: l ?? void 0,
|
|
24
|
-
style:
|
|
39
|
+
style: s ?? void 0,
|
|
25
40
|
"aria-hidden": "true",
|
|
26
|
-
onClick:
|
|
27
|
-
children:
|
|
28
|
-
a ? /* @__PURE__ */ e(I, { ...a }) : null,
|
|
29
|
-
/* @__PURE__ */ e(
|
|
30
|
-
"span",
|
|
31
|
-
{
|
|
32
|
-
"data-testid": p,
|
|
33
|
-
className: t ?? void 0,
|
|
34
|
-
style: i ?? void 0,
|
|
35
|
-
children: r
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
]
|
|
41
|
+
onClick: u ?? void 0,
|
|
42
|
+
children: c
|
|
39
43
|
}
|
|
40
44
|
);
|
|
41
45
|
};
|
|
42
46
|
export {
|
|
43
|
-
|
|
47
|
+
x as default
|
|
44
48
|
};
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { COMMON_CLASSES as C } from "../../../constants/classes.js";
|
|
3
|
+
import { parseClasses as i, parseTestId as u } from "../../../functions/parsers.js";
|
|
4
|
+
const b = ({
|
|
5
|
+
testId: s = null,
|
|
6
|
+
cssClasses: t = null,
|
|
7
|
+
style: a = null,
|
|
8
|
+
color: l = null,
|
|
9
|
+
content: n,
|
|
10
|
+
onClick: r = null
|
|
9
11
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
+
const e = i([
|
|
13
|
+
l ? `${C.IS}${l}` : null,
|
|
14
|
+
t
|
|
15
|
+
]), o = s ?? u({ tag: "table-cell", parsedClasses: e });
|
|
16
|
+
return /* @__PURE__ */ d(
|
|
12
17
|
"td",
|
|
13
18
|
{
|
|
14
19
|
"data-testid": o,
|
|
15
|
-
className:
|
|
16
|
-
style:
|
|
17
|
-
onClick:
|
|
18
|
-
children:
|
|
20
|
+
className: e,
|
|
21
|
+
style: a ?? void 0,
|
|
22
|
+
onClick: r ?? void 0,
|
|
23
|
+
children: n
|
|
19
24
|
}
|
|
20
25
|
);
|
|
21
26
|
};
|
|
22
27
|
export {
|
|
23
|
-
|
|
28
|
+
b as default
|
|
24
29
|
};
|
|
@@ -3,3 +3,4 @@ import { default as TableCell } from '.';
|
|
|
3
3
|
declare const _default: Meta<typeof TableCell>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TableCellProps>;
|
|
6
|
+
export declare const Colored: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TableCellProps>;
|
|
@@ -1,24 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { COMMON_CLASSES as C } from "../../../constants/classes.js";
|
|
3
|
+
import { parseClasses as i, parseTestId as u } from "../../../functions/parsers.js";
|
|
4
|
+
const b = ({
|
|
5
|
+
testId: s = null,
|
|
6
|
+
cssClasses: a = null,
|
|
6
7
|
style: t = null,
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
color: l = null,
|
|
9
|
+
content: d,
|
|
10
|
+
onClick: n = null
|
|
9
11
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
+
const e = i([
|
|
13
|
+
l ? `${C.IS}${l}` : null,
|
|
14
|
+
a
|
|
15
|
+
]), r = s ?? u({
|
|
16
|
+
tag: "table-head-cell",
|
|
17
|
+
parsedClasses: e
|
|
18
|
+
});
|
|
19
|
+
return /* @__PURE__ */ o(
|
|
12
20
|
"th",
|
|
13
21
|
{
|
|
14
|
-
"data-testid":
|
|
15
|
-
className:
|
|
22
|
+
"data-testid": r,
|
|
23
|
+
className: e,
|
|
16
24
|
style: t ?? void 0,
|
|
17
|
-
onClick:
|
|
18
|
-
children:
|
|
25
|
+
onClick: n ?? void 0,
|
|
26
|
+
children: d
|
|
19
27
|
}
|
|
20
28
|
);
|
|
21
29
|
};
|
|
22
30
|
export {
|
|
23
|
-
|
|
31
|
+
b as default
|
|
24
32
|
};
|
|
@@ -3,3 +3,4 @@ import { default as TableHeadCell } from '.';
|
|
|
3
3
|
declare const _default: Meta<typeof TableHeadCell>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TableHeadCellProps>;
|
|
6
|
+
export declare const Colored: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TableHeadCellProps>;
|
|
@@ -1,81 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
style:
|
|
9
|
-
containerStyle: f = null,
|
|
1
|
+
import { jsxs as C, jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import { COMMON_CLASSES as l } from "../../../constants/classes.js";
|
|
3
|
+
import { TEST_ID_REGEXP as n } from "../../../constants/regExp.js";
|
|
4
|
+
import { parseClasses as T, parseTestId as E } from "../../../functions/parsers.js";
|
|
5
|
+
const N = ({
|
|
6
|
+
testId: r = null,
|
|
7
|
+
cssClasses: u = null,
|
|
8
|
+
style: o = null,
|
|
10
9
|
text: d,
|
|
11
|
-
withDelete:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
size: t = null,
|
|
18
|
-
addonColor: j = null,
|
|
19
|
-
onDeleteClick: c = null
|
|
10
|
+
withDelete: p = !1,
|
|
11
|
+
color: s = null,
|
|
12
|
+
isLight: g = null,
|
|
13
|
+
isRounded: c = null,
|
|
14
|
+
size: e = null,
|
|
15
|
+
onDeleteClick: m = null
|
|
20
16
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
"tags",
|
|
23
|
-
"has-addons",
|
|
24
|
-
t ? t.replace("is-", "are-") : null,
|
|
25
|
-
C
|
|
26
|
-
]), e = n([
|
|
17
|
+
const a = T([
|
|
27
18
|
"tag",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
]),
|
|
34
|
-
tag:
|
|
35
|
-
parsedClasses: a
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
style: f ?? void 0,
|
|
43
|
-
className: o,
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ l(
|
|
46
|
-
"span",
|
|
47
|
-
{
|
|
48
|
-
"data-testid": s,
|
|
49
|
-
className: e,
|
|
50
|
-
children: d
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
r ? /* @__PURE__ */ l(
|
|
54
|
-
"a",
|
|
55
|
-
{
|
|
56
|
-
"data-testid": u,
|
|
57
|
-
className: "tag is-delete",
|
|
58
|
-
title: "delete",
|
|
59
|
-
"aria-hidden": "true",
|
|
60
|
-
onClick: c ?? void 0
|
|
61
|
-
}
|
|
62
|
-
) : /* @__PURE__ */ l("span", { className: x, children: T })
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
) : /* @__PURE__ */ i(
|
|
19
|
+
s ? `${l.IS}${s}` : null,
|
|
20
|
+
g ? l.LIGHT : null,
|
|
21
|
+
c ? l.ROUNDED : null,
|
|
22
|
+
e ? `${l.IS}${e}` : null,
|
|
23
|
+
u
|
|
24
|
+
]), t = r ?? E({
|
|
25
|
+
tag: "tag",
|
|
26
|
+
parsedClasses: a,
|
|
27
|
+
rules: [
|
|
28
|
+
{ regExp: n.TAG, replacer: "" },
|
|
29
|
+
{ regExp: n.IS, replacer: "-" }
|
|
30
|
+
]
|
|
31
|
+
}), i = `${t}-delete`;
|
|
32
|
+
return /* @__PURE__ */ C(
|
|
66
33
|
"span",
|
|
67
34
|
{
|
|
68
|
-
"data-testid":
|
|
69
|
-
style:
|
|
70
|
-
className:
|
|
35
|
+
"data-testid": t,
|
|
36
|
+
style: o ?? void 0,
|
|
37
|
+
className: a,
|
|
71
38
|
children: [
|
|
72
39
|
d,
|
|
73
|
-
|
|
40
|
+
p ? /* @__PURE__ */ I(
|
|
74
41
|
"button",
|
|
75
42
|
{
|
|
76
|
-
"data-testid":
|
|
43
|
+
"data-testid": i,
|
|
77
44
|
className: "delete",
|
|
78
|
-
onClick:
|
|
45
|
+
onClick: m ?? void 0
|
|
79
46
|
}
|
|
80
47
|
) : null
|
|
81
48
|
]
|
|
@@ -83,5 +50,5 @@ const q = ({
|
|
|
83
50
|
);
|
|
84
51
|
};
|
|
85
52
|
export {
|
|
86
|
-
|
|
53
|
+
N as default
|
|
87
54
|
};
|
|
@@ -8,6 +8,3 @@ export declare const Rounded: import('storybook/internal/csf').AnnotatedStoryFn<
|
|
|
8
8
|
export declare const LightColor: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagProps>;
|
|
9
9
|
export declare const LargeSize: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagProps>;
|
|
10
10
|
export declare const WithDeleteButton: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagProps>;
|
|
11
|
-
export declare const WithAnAddon: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagProps>;
|
|
12
|
-
export declare const ColoredAddon: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagProps>;
|
|
13
|
-
export declare const WithDeleteAddon: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagProps>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsxs as O, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { COMMON_CLASSES as s } from "../../../constants/classes.js";
|
|
3
|
+
import { TEST_ID_REGEXP as e } from "../../../constants/regExp.js";
|
|
4
|
+
import { parseClasses as t, parseTestId as n } from "../../../functions/parsers.js";
|
|
5
|
+
const R = ({
|
|
6
|
+
testId: p = null,
|
|
7
|
+
containerTestId: T = null,
|
|
8
|
+
cssClasses: C = null,
|
|
9
|
+
containerCssClasses: A = null,
|
|
10
|
+
style: S = null,
|
|
11
|
+
containerStyle: m = null,
|
|
12
|
+
text: I,
|
|
13
|
+
withDelete: $ = !1,
|
|
14
|
+
addonText: E,
|
|
15
|
+
color: d = null,
|
|
16
|
+
isLight: b = null,
|
|
17
|
+
isRounded: h = null,
|
|
18
|
+
size: a = null,
|
|
19
|
+
addonColor: r = null,
|
|
20
|
+
onDeleteClick: D = null
|
|
21
|
+
}) => {
|
|
22
|
+
const o = "tags", g = t([
|
|
23
|
+
o,
|
|
24
|
+
s.HAS_ADDONS,
|
|
25
|
+
a ? `${s.ARE}${a}` : null,
|
|
26
|
+
A
|
|
27
|
+
]), i = t([
|
|
28
|
+
"tag",
|
|
29
|
+
d ? `${s.IS}${d}` : null,
|
|
30
|
+
b ? s.LIGHT : null,
|
|
31
|
+
h ? s.ROUNDED : null,
|
|
32
|
+
a ? `${s.IS}${a}` : null,
|
|
33
|
+
C
|
|
34
|
+
]), u = t([
|
|
35
|
+
"tag",
|
|
36
|
+
r ? `${s.IS}${r}` : null
|
|
37
|
+
]), N = T ?? n({
|
|
38
|
+
tag: o,
|
|
39
|
+
parsedClasses: g,
|
|
40
|
+
rules: [
|
|
41
|
+
{ regExp: e.TAGS, replacer: "" },
|
|
42
|
+
{ regExp: e.HAS_ADDONS, replacer: "" }
|
|
43
|
+
]
|
|
44
|
+
}), x = p ?? n({ tag: "tag", parsedClasses: i }), c = n({
|
|
45
|
+
tag: "tag-addon",
|
|
46
|
+
parsedClasses: u,
|
|
47
|
+
rules: [
|
|
48
|
+
{ regExp: e.TAG, replacer: "" },
|
|
49
|
+
{ regExp: e.IS, replacer: "-" }
|
|
50
|
+
]
|
|
51
|
+
}), f = `${c}-delete`;
|
|
52
|
+
return /* @__PURE__ */ O(
|
|
53
|
+
"section",
|
|
54
|
+
{
|
|
55
|
+
"data-testid": N,
|
|
56
|
+
className: g,
|
|
57
|
+
style: m ?? void 0,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ l(
|
|
60
|
+
"span",
|
|
61
|
+
{
|
|
62
|
+
"data-testid": x,
|
|
63
|
+
className: i,
|
|
64
|
+
children: I
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
$ ? /* @__PURE__ */ l(
|
|
68
|
+
"a",
|
|
69
|
+
{
|
|
70
|
+
"data-testid": f,
|
|
71
|
+
className: "tag is-delete",
|
|
72
|
+
title: "delete",
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
onClick: D ?? void 0
|
|
75
|
+
}
|
|
76
|
+
) : /* @__PURE__ */ l(
|
|
77
|
+
"span",
|
|
78
|
+
{
|
|
79
|
+
"data-testid": c,
|
|
80
|
+
className: u,
|
|
81
|
+
style: S ?? void 0,
|
|
82
|
+
children: E
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
R as default
|
|
91
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { default as TagWithAddon } from '.';
|
|
3
|
+
declare const _default: Meta<typeof TagWithAddon>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagWithAddonProps>;
|
|
6
|
+
export declare const Colored: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagWithAddonProps>;
|
|
7
|
+
export declare const Rounded: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagWithAddonProps>;
|
|
8
|
+
export declare const LightColor: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagWithAddonProps>;
|
|
9
|
+
export declare const LargeSize: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagWithAddonProps>;
|
|
10
|
+
export declare const ColoredAddon: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagWithAddonProps>;
|
|
11
|
+
export declare const WithDeleteButton: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').TagWithAddonProps>;
|
|
File without changes
|
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
+
import { COMMON_CLASSES as l } from "../../../constants/classes.js";
|
|
3
|
+
import { TEST_ID_REGEXP as a } from "../../../constants/regExp.js";
|
|
4
|
+
import { parseClasses as C, parseTestId as E } from "../../../functions/parsers.js";
|
|
5
|
+
const $ = ({
|
|
6
|
+
testId: n = null,
|
|
7
|
+
cssClasses: o = null,
|
|
8
|
+
style: p = null,
|
|
9
|
+
children: u,
|
|
10
|
+
context: i = null,
|
|
11
|
+
size: s = null,
|
|
12
|
+
color: e = null,
|
|
13
|
+
isVertical: I = !1
|
|
12
14
|
}) => {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
]),
|
|
21
|
-
tag:
|
|
22
|
-
parsedClasses:
|
|
15
|
+
const t = "tile", r = C([
|
|
16
|
+
t,
|
|
17
|
+
i,
|
|
18
|
+
s ? `${l.IS}${s}` : null,
|
|
19
|
+
e ? `${l.NOTIFICATION} ${e}` : null,
|
|
20
|
+
I ? `${l.VERTICAL}` : null,
|
|
21
|
+
o
|
|
22
|
+
]), m = n ?? E({
|
|
23
|
+
tag: t,
|
|
24
|
+
parsedClasses: r,
|
|
23
25
|
rules: [
|
|
24
26
|
{
|
|
25
|
-
regExp:
|
|
27
|
+
regExp: a.TILE,
|
|
26
28
|
replacer: ""
|
|
27
29
|
},
|
|
28
30
|
{
|
|
29
|
-
regExp:
|
|
31
|
+
regExp: a.IS,
|
|
30
32
|
replacer: "-"
|
|
31
33
|
}
|
|
32
34
|
]
|
|
33
35
|
});
|
|
34
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ T(
|
|
35
37
|
"section",
|
|
36
38
|
{
|
|
37
|
-
"data-testid":
|
|
38
|
-
className:
|
|
39
|
-
style:
|
|
40
|
-
children:
|
|
39
|
+
"data-testid": m,
|
|
40
|
+
className: r,
|
|
41
|
+
style: p ?? void 0,
|
|
42
|
+
children: u
|
|
41
43
|
}
|
|
42
44
|
);
|
|
43
45
|
};
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
$ as default
|
|
46
48
|
};
|
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsxs as m, Fragment as a, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as l } from "react";
|
|
3
|
+
import { COMMON_CLASSES as p } from "../../../constants/classes.js";
|
|
4
|
+
import { parseClasses as S } from "../../../functions/parsers.js";
|
|
5
|
+
const o = (t) => {
|
|
6
|
+
if (t === void 0) return null;
|
|
7
|
+
const { type: e, size: s, isSpaced: i, cssClasses: r } = t, n = S([
|
|
8
|
+
e,
|
|
9
|
+
s ? `${p.IS}${s}` : null,
|
|
10
|
+
e === "title" && i ? "is-spaced" : null,
|
|
11
|
+
r
|
|
12
|
+
]), d = t?.testId ?? `test-${t?.type}`;
|
|
13
|
+
return /* @__PURE__ */ c(
|
|
11
14
|
"p",
|
|
12
15
|
{
|
|
13
16
|
"data-testid": d,
|
|
14
17
|
className: n,
|
|
15
|
-
style:
|
|
16
|
-
children:
|
|
18
|
+
style: t?.style ?? void 0,
|
|
19
|
+
children: t?.text
|
|
17
20
|
}
|
|
18
21
|
);
|
|
19
|
-
}, x = ({ main:
|
|
20
|
-
s
|
|
21
|
-
|
|
22
|
-
]
|
|
22
|
+
}, x = ({ main: t, secondary: e }) => {
|
|
23
|
+
const s = l(
|
|
24
|
+
() => o(t),
|
|
25
|
+
[t]
|
|
26
|
+
), i = l(
|
|
27
|
+
() => o(e),
|
|
28
|
+
[e]
|
|
29
|
+
);
|
|
30
|
+
return /* @__PURE__ */ m(a, { children: [
|
|
31
|
+
s,
|
|
32
|
+
i
|
|
33
|
+
] });
|
|
34
|
+
};
|
|
23
35
|
export {
|
|
24
36
|
x as default
|
|
25
37
|
};
|
|
@@ -25,3 +25,5 @@ export { default as Tile } from './Tile';
|
|
|
25
25
|
export { default as NavBarItem } from './NavBarItem';
|
|
26
26
|
export { default as TableHeadCell } from './TableHeadCell';
|
|
27
27
|
export { default as TableCell } from './TableCell';
|
|
28
|
+
export { default as GridCell } from './GridCell';
|
|
29
|
+
export { default as TagWithAddon } from './TagWithAddon';
|