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,107 +1,90 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as u, Fragment as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as s } from "react";
|
|
3
|
+
import d from "../../atoms/Button/index.js";
|
|
4
4
|
import T from "../../atoms/TextArea/index.js";
|
|
5
5
|
import h from "../../atoms/Select/index.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { FormFieldType as
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
className: "label",
|
|
16
|
-
children: r
|
|
17
|
-
}
|
|
18
|
-
) : null;
|
|
19
|
-
return t ? /* @__PURE__ */ o("section", { className: "field-label", children: e }) : e;
|
|
20
|
-
}, F = ({
|
|
21
|
-
testId: r,
|
|
22
|
-
type: t,
|
|
23
|
-
input: e
|
|
24
|
-
}) => {
|
|
25
|
-
const s = {
|
|
26
|
-
testId: e?.testId ?? r ?? `test-form-field-${t}`,
|
|
27
|
-
containerTestId: r ?? `test-form-field-container-${t}`
|
|
6
|
+
import g from "../../atoms/Checkbox/index.js";
|
|
7
|
+
import N from "../../atoms/RadioButton/index.js";
|
|
8
|
+
import x from "../InputControl/index.js";
|
|
9
|
+
import { FormFieldType as t } from "../../../interfaces/moleculeProps.js";
|
|
10
|
+
const m = ({ testId: c, element: o, isHorizontal: i }) => {
|
|
11
|
+
if (o === null) return null;
|
|
12
|
+
const n = {
|
|
13
|
+
testId: o.config?.testId ?? c ?? `test-form-field-${o.type}`,
|
|
14
|
+
containerTestId: c ?? `test-form-field-container-${o.type}`
|
|
28
15
|
};
|
|
29
|
-
switch (
|
|
30
|
-
case
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
16
|
+
switch (o.type) {
|
|
17
|
+
case t.INPUT:
|
|
18
|
+
return /* @__PURE__ */ r(
|
|
19
|
+
x,
|
|
33
20
|
{
|
|
34
|
-
...
|
|
35
|
-
...
|
|
21
|
+
...o.config,
|
|
22
|
+
...n,
|
|
23
|
+
isHorizontal: i
|
|
36
24
|
}
|
|
37
25
|
);
|
|
38
|
-
case
|
|
39
|
-
return /* @__PURE__ */
|
|
26
|
+
case t.SELECT:
|
|
27
|
+
return /* @__PURE__ */ r("section", { className: "control", children: /* @__PURE__ */ r(
|
|
40
28
|
h,
|
|
41
29
|
{
|
|
42
|
-
...
|
|
43
|
-
...
|
|
30
|
+
...o.config,
|
|
31
|
+
...n
|
|
44
32
|
}
|
|
45
|
-
);
|
|
46
|
-
case
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
|
|
33
|
+
) });
|
|
34
|
+
case t.CHECKBOX:
|
|
35
|
+
return /* @__PURE__ */ r("section", { className: "control", children: /* @__PURE__ */ r(
|
|
36
|
+
g,
|
|
49
37
|
{
|
|
50
|
-
...
|
|
51
|
-
...
|
|
38
|
+
...o.config,
|
|
39
|
+
...n
|
|
52
40
|
}
|
|
53
|
-
);
|
|
54
|
-
case
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
|
|
41
|
+
) });
|
|
42
|
+
case t.RADIOBUTTON:
|
|
43
|
+
return /* @__PURE__ */ r("section", { className: "control", children: /* @__PURE__ */ r(
|
|
44
|
+
N,
|
|
57
45
|
{
|
|
58
|
-
...
|
|
59
|
-
...
|
|
46
|
+
...o.config,
|
|
47
|
+
...n
|
|
60
48
|
}
|
|
61
|
-
);
|
|
62
|
-
case
|
|
63
|
-
return /* @__PURE__ */
|
|
49
|
+
) });
|
|
50
|
+
case t.TEXTAREA:
|
|
51
|
+
return /* @__PURE__ */ r("section", { className: "control", children: /* @__PURE__ */ r(
|
|
64
52
|
T,
|
|
65
53
|
{
|
|
66
|
-
...
|
|
67
|
-
...
|
|
54
|
+
...o.config,
|
|
55
|
+
...n
|
|
68
56
|
}
|
|
69
|
-
);
|
|
57
|
+
) });
|
|
58
|
+
case t.BUTTON:
|
|
59
|
+
return /* @__PURE__ */ r("section", { className: "control", children: /* @__PURE__ */ r(
|
|
60
|
+
d,
|
|
61
|
+
{
|
|
62
|
+
...o.config,
|
|
63
|
+
...n
|
|
64
|
+
}
|
|
65
|
+
) });
|
|
70
66
|
}
|
|
71
|
-
}, N = (r) => {
|
|
72
|
-
if (!r) return null;
|
|
73
|
-
const t = u(["help", r.color]), e = I({
|
|
74
|
-
tag: "form-field-help",
|
|
75
|
-
parsedClasses: t,
|
|
76
|
-
rules: [{ regExp: /help|is/gm, replacer: "" }]
|
|
77
|
-
});
|
|
78
|
-
return /* @__PURE__ */ o(
|
|
79
|
-
"p",
|
|
80
|
-
{
|
|
81
|
-
"data-testid": e,
|
|
82
|
-
className: t,
|
|
83
|
-
children: r.text
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
67
|
}, j = ({
|
|
87
|
-
testId:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
isHorizontal: a
|
|
68
|
+
testId: c,
|
|
69
|
+
mainInput: o,
|
|
70
|
+
leftInput: i = null,
|
|
71
|
+
rightInput: n = null,
|
|
72
|
+
isHorizontal: e = !1
|
|
93
73
|
}) => {
|
|
94
|
-
const
|
|
95
|
-
() =>
|
|
96
|
-
[
|
|
97
|
-
),
|
|
98
|
-
() =>
|
|
99
|
-
[
|
|
100
|
-
),
|
|
101
|
-
|
|
102
|
-
c,
|
|
103
|
-
|
|
104
|
-
|
|
74
|
+
const f = s(
|
|
75
|
+
() => m({ testId: c, element: o, isHorizontal: e }),
|
|
76
|
+
[c, o, e]
|
|
77
|
+
), a = s(
|
|
78
|
+
() => m({ testId: c, element: i, isHorizontal: e }),
|
|
79
|
+
[c, i, e]
|
|
80
|
+
), l = s(
|
|
81
|
+
() => m({ testId: c, element: n, isHorizontal: e }),
|
|
82
|
+
[c, n, e]
|
|
83
|
+
);
|
|
84
|
+
return /* @__PURE__ */ u(p, { children: [
|
|
85
|
+
a,
|
|
86
|
+
f,
|
|
87
|
+
l
|
|
105
88
|
] });
|
|
106
89
|
};
|
|
107
90
|
export {
|
|
@@ -4,10 +4,8 @@ import { FormFieldInputProps } from '../../../interfaces/moleculeProps';
|
|
|
4
4
|
declare const _default: Meta<typeof FormFieldInput>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FormFieldInputProps>;
|
|
7
|
-
export declare const WithLabel: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FormFieldInputProps>;
|
|
8
|
-
export declare const WithLabelAndHelper: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FormFieldInputProps>;
|
|
9
|
-
export declare const ErrorCase: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FormFieldInputProps>;
|
|
10
7
|
export declare const SelectCase: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FormFieldInputProps>;
|
|
11
8
|
export declare const CheckboxCase: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FormFieldInputProps>;
|
|
12
9
|
export declare const RadiobuttonCase: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FormFieldInputProps>;
|
|
13
10
|
export declare const TextareaCase: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FormFieldInputProps>;
|
|
11
|
+
export declare const LeftAddonSelect: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FormFieldInputProps>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as M } from "react";
|
|
3
|
+
import { COMMON_CLASSES as l } from "../../../constants/classes.js";
|
|
4
|
+
import { parseClasses as C, parseTestId as G } from "../../../functions/parsers.js";
|
|
5
|
+
import { TEST_ID_REGEXP as I } from "../../../constants/regExp.js";
|
|
6
|
+
import { generateKey as H } from "../../../functions/generators.js";
|
|
7
|
+
import L from "../../atoms/GridCell/index.js";
|
|
8
|
+
const X = ({
|
|
9
|
+
testId: S = null,
|
|
10
|
+
containerTestId: A = null,
|
|
11
|
+
cssClasses: E = null,
|
|
12
|
+
containerCssClasses: T = null,
|
|
13
|
+
style: o = null,
|
|
14
|
+
containerStyle: N = null,
|
|
15
|
+
listOfCells: u,
|
|
16
|
+
gap: e = null,
|
|
17
|
+
columnGap: d = null,
|
|
18
|
+
rowGap: i = null,
|
|
19
|
+
cellMinWidth: c = null,
|
|
20
|
+
isFixed: s = !1,
|
|
21
|
+
fixedColumnsCount: r = null,
|
|
22
|
+
isAutoColumns: O = !1
|
|
23
|
+
}) => {
|
|
24
|
+
const m = "grid", p = "fixed-grid", f = e !== null || s, n = C([
|
|
25
|
+
m,
|
|
26
|
+
e === null || s ? null : `${l.GAP}${e}`,
|
|
27
|
+
f || d === null ? null : `${l.COLUMN_GAP}${d}`,
|
|
28
|
+
f || i === null ? null : `${l.ROW_GAP}${i}`,
|
|
29
|
+
s || c === null ? null : `${l.COL_MIN_WIDTH}${c}`,
|
|
30
|
+
E
|
|
31
|
+
]), _ = S ?? G({
|
|
32
|
+
tag: m,
|
|
33
|
+
parsedClasses: n
|
|
34
|
+
}), $ = M(
|
|
35
|
+
() => /* @__PURE__ */ a(
|
|
36
|
+
"section",
|
|
37
|
+
{
|
|
38
|
+
"data-testid": _,
|
|
39
|
+
className: n,
|
|
40
|
+
style: o ?? void 0,
|
|
41
|
+
children: u.map((t) => /* @__PURE__ */ a(
|
|
42
|
+
L,
|
|
43
|
+
{
|
|
44
|
+
...t
|
|
45
|
+
},
|
|
46
|
+
`grid-cell-${H()}`
|
|
47
|
+
))
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
[_, n, o, u]
|
|
51
|
+
);
|
|
52
|
+
if (s) {
|
|
53
|
+
const t = r === null && O ? l.AUTO_COLUMNS_GRID : null, g = C([
|
|
54
|
+
p,
|
|
55
|
+
r ? `${l.HAS}${r}-cols` : null,
|
|
56
|
+
t,
|
|
57
|
+
T
|
|
58
|
+
]), D = A ?? G({
|
|
59
|
+
tag: p,
|
|
60
|
+
parsedClasses: g,
|
|
61
|
+
rules: [
|
|
62
|
+
{
|
|
63
|
+
regExp: I.FIXED_GRID,
|
|
64
|
+
replacer: ""
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
regExp: I.IS_HAS,
|
|
68
|
+
replacer: "-"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
return /* @__PURE__ */ a(
|
|
73
|
+
"section",
|
|
74
|
+
{
|
|
75
|
+
"data-testid": D,
|
|
76
|
+
className: g,
|
|
77
|
+
style: N ?? void 0,
|
|
78
|
+
children: $
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
return $;
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
X as default
|
|
86
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { default as Grid } from '.';
|
|
3
|
+
declare const _default: Meta<typeof Grid>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').GridProps>;
|
|
6
|
+
export declare const LotsOfCells: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').GridProps>;
|
|
7
|
+
export declare const HugeColumnGap: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').GridProps>;
|
|
8
|
+
export declare const HugeRowGap: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').GridProps>;
|
|
9
|
+
export declare const HugeGridGap: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').GridProps>;
|
|
10
|
+
export declare const FixedGrid: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').GridProps>;
|
|
11
|
+
export declare const FixedGridWithThreeColumns: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').GridProps>;
|
|
12
|
+
export declare const FixedGridWithAutoColumns: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').GridProps>;
|
|
File without changes
|
|
@@ -1,60 +1,105 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import "
|
|
6
|
-
|
|
1
|
+
import { jsx as o, jsxs as N, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as r } from "react";
|
|
3
|
+
import { COMMON_CLASSES as t } from "../../../constants/classes.js";
|
|
4
|
+
import { parseClasses as S, parseTestId as f } from "../../../functions/parsers.js";
|
|
5
|
+
import { TEST_ID_REGEXP as p } from "../../../constants/regExp.js";
|
|
6
|
+
import G from "../../atoms/Icon/index.js";
|
|
7
|
+
import M from "../../atoms/Input/index.js";
|
|
8
|
+
const L = (l) => l ? /* @__PURE__ */ o(G, { ...l }) : null, P = (l) => l ? `${t.IS}${l}` : null, k = ({
|
|
7
9
|
testId: l = null,
|
|
8
|
-
cssClasses:
|
|
9
|
-
style:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
cssClasses: O = null,
|
|
11
|
+
style: H = null,
|
|
12
|
+
labelText: u = null,
|
|
13
|
+
inputConfig: e,
|
|
14
|
+
helper: n = null,
|
|
15
|
+
leftIcon: a = null,
|
|
16
|
+
rightIcon: c = null,
|
|
17
|
+
size: m = null,
|
|
18
|
+
isLoading: T = null,
|
|
19
|
+
isExpanded: _ = null,
|
|
20
|
+
isHorizontal: i = null
|
|
16
21
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
]),
|
|
26
|
-
tag:
|
|
27
|
-
parsedClasses:
|
|
22
|
+
const C = "control", E = S([
|
|
23
|
+
C,
|
|
24
|
+
m,
|
|
25
|
+
a ? t.ICON_LEFT : null,
|
|
26
|
+
c ? t.ICON_RIGHT : null,
|
|
27
|
+
T ? t.LOADING : null,
|
|
28
|
+
_ ? t.EXPANDED : null,
|
|
29
|
+
O
|
|
30
|
+
]), d = l ?? f({
|
|
31
|
+
tag: C,
|
|
32
|
+
parsedClasses: E,
|
|
28
33
|
rules: [
|
|
29
34
|
{
|
|
30
|
-
regExp:
|
|
35
|
+
regExp: p.IS_HAS,
|
|
31
36
|
replacer: "-"
|
|
32
37
|
},
|
|
33
38
|
{
|
|
34
|
-
regExp:
|
|
39
|
+
regExp: p.CONTROL,
|
|
35
40
|
replacer: ""
|
|
36
41
|
}
|
|
37
42
|
]
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
}), x = r(() => {
|
|
44
|
+
if (u === null) return null;
|
|
45
|
+
const s = /* @__PURE__ */ o(
|
|
46
|
+
"label",
|
|
47
|
+
{
|
|
48
|
+
"data-testid": `${d}-label`,
|
|
49
|
+
className: "label",
|
|
50
|
+
children: u
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
return i ? /* @__PURE__ */ o("section", { className: "field-label", children: s }) : s;
|
|
54
|
+
}, [u, d, i]), b = r(
|
|
55
|
+
() => /* @__PURE__ */ o(
|
|
56
|
+
M,
|
|
57
|
+
{
|
|
58
|
+
...e,
|
|
59
|
+
size: m ?? e?.size
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
[e, m]
|
|
63
|
+
), h = r(
|
|
64
|
+
() => L(a ? { ...a, position: "left" } : void 0),
|
|
65
|
+
[a]
|
|
66
|
+
), z = r(
|
|
67
|
+
() => L(c ? { ...c, position: "right" } : void 0),
|
|
68
|
+
[c]
|
|
69
|
+
), A = r(() => {
|
|
70
|
+
if (n === null) return null;
|
|
71
|
+
const s = "help", D = P(e?.color ?? n?.color), I = S([s, D]), R = f({
|
|
72
|
+
tag: s,
|
|
73
|
+
parsedClasses: I,
|
|
74
|
+
rules: [{ regExp: p.HELP, replacer: "" }]
|
|
75
|
+
});
|
|
76
|
+
return /* @__PURE__ */ o(
|
|
77
|
+
"p",
|
|
78
|
+
{
|
|
79
|
+
"data-testid": R,
|
|
80
|
+
className: I,
|
|
81
|
+
children: n.text
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}, [n, e.color]);
|
|
85
|
+
return /* @__PURE__ */ N(v, { children: [
|
|
86
|
+
x,
|
|
87
|
+
/* @__PURE__ */ N(
|
|
88
|
+
"section",
|
|
89
|
+
{
|
|
90
|
+
"data-testid": d,
|
|
91
|
+
className: E,
|
|
92
|
+
style: H ?? void 0,
|
|
93
|
+
children: [
|
|
94
|
+
b,
|
|
95
|
+
h,
|
|
96
|
+
z
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
A
|
|
101
|
+
] });
|
|
57
102
|
};
|
|
58
103
|
export {
|
|
59
|
-
|
|
104
|
+
k as default
|
|
60
105
|
};
|
|
@@ -6,6 +6,8 @@ export default _default;
|
|
|
6
6
|
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputControlProps>;
|
|
7
7
|
export declare const WithLeftIcon: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputControlProps>;
|
|
8
8
|
export declare const WithBothIcons: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputControlProps>;
|
|
9
|
+
export declare const WithLabel: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputControlProps>;
|
|
10
|
+
export declare const WithLabelAndHelper: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputControlProps>;
|
|
9
11
|
export declare const ErrorState: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputControlProps>;
|
|
10
12
|
export declare const BigSize: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputControlProps>;
|
|
11
13
|
export declare const LoadingState: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputControlProps>;
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { parseClasses as
|
|
1
|
+
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import c, { useMemo as d } from "react";
|
|
3
|
+
import p from "../MenuList/index.js";
|
|
4
|
+
import { parseClasses as f, parseTestId as M } from "../../../functions/parsers.js";
|
|
5
5
|
import { generateKey as s } from "../../../functions/generators.js";
|
|
6
|
-
const
|
|
6
|
+
const g = ({
|
|
7
7
|
testId: l = null,
|
|
8
|
-
cssClasses:
|
|
9
|
-
style:
|
|
10
|
-
menuSections:
|
|
8
|
+
cssClasses: n = null,
|
|
9
|
+
style: r = null,
|
|
10
|
+
menuSections: t
|
|
11
11
|
}) => {
|
|
12
|
-
const
|
|
12
|
+
const m = f(["menu", n]), i = l ?? M({ tag: "menu", parsedClasses: m }), o = d(
|
|
13
|
+
() => t.map((a) => /* @__PURE__ */ u(c.Fragment, { children: [
|
|
14
|
+
/* @__PURE__ */ e(
|
|
15
|
+
"p",
|
|
16
|
+
{
|
|
17
|
+
className: "menu-label",
|
|
18
|
+
children: a.label
|
|
19
|
+
},
|
|
20
|
+
`section-label-${s()}`
|
|
21
|
+
),
|
|
22
|
+
/* @__PURE__ */ e(
|
|
23
|
+
p,
|
|
24
|
+
{
|
|
25
|
+
itemList: a.itemList
|
|
26
|
+
},
|
|
27
|
+
`section-menu-list-${s()}`
|
|
28
|
+
)
|
|
29
|
+
] }, `section-${s()}`)),
|
|
30
|
+
[t]
|
|
31
|
+
);
|
|
13
32
|
return /* @__PURE__ */ e(
|
|
14
33
|
"aside",
|
|
15
34
|
{
|
|
16
35
|
"data-testid": i,
|
|
17
|
-
className:
|
|
18
|
-
style:
|
|
19
|
-
children:
|
|
20
|
-
/* @__PURE__ */ e(
|
|
21
|
-
"p",
|
|
22
|
-
{
|
|
23
|
-
className: "menu-label",
|
|
24
|
-
children: a.label
|
|
25
|
-
},
|
|
26
|
-
`section-label-${s()}`
|
|
27
|
-
),
|
|
28
|
-
/* @__PURE__ */ e(
|
|
29
|
-
c,
|
|
30
|
-
{
|
|
31
|
-
itemList: a.itemList
|
|
32
|
-
},
|
|
33
|
-
`section-menu-list-${s()}`
|
|
34
|
-
)
|
|
35
|
-
] }, `section-${s()}`))
|
|
36
|
+
className: m,
|
|
37
|
+
style: r ?? void 0,
|
|
38
|
+
children: o
|
|
36
39
|
}
|
|
37
40
|
);
|
|
38
41
|
};
|
|
39
42
|
export {
|
|
40
|
-
|
|
43
|
+
g as default
|
|
41
44
|
};
|
|
@@ -1,40 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import t from "
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
testId:
|
|
8
|
-
cssClasses:
|
|
9
|
-
style:
|
|
10
|
-
itemList:
|
|
1
|
+
import { jsxs as p, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as c } from "react";
|
|
3
|
+
import { parseClasses as b, parseTestId as f } from "../../../functions/parsers.js";
|
|
4
|
+
import { generateKey as t } from "../../../functions/generators.js";
|
|
5
|
+
import l from "../../atoms/MenuItem/index.js";
|
|
6
|
+
const x = ({
|
|
7
|
+
testId: m = null,
|
|
8
|
+
cssClasses: n = null,
|
|
9
|
+
style: r = null,
|
|
10
|
+
itemList: u
|
|
11
11
|
}) => {
|
|
12
|
-
const i =
|
|
12
|
+
const i = b(["menu-list", n]), o = m ?? f({ tag: "menu-list", parsedClasses: i }), a = c(
|
|
13
|
+
() => u.map((e) => "subListTitle" in e ? /* @__PURE__ */ p("li", { children: [
|
|
14
|
+
/* @__PURE__ */ s(l, { ...e.subListTitle }),
|
|
15
|
+
/* @__PURE__ */ s("ul", { children: e.subItems.map((d) => /* @__PURE__ */ s(
|
|
16
|
+
l,
|
|
17
|
+
{
|
|
18
|
+
...d
|
|
19
|
+
},
|
|
20
|
+
`sub-list-menu-sub-item-${t()}`
|
|
21
|
+
)) })
|
|
22
|
+
] }, `sub-list-menu-item-${t()}`) : /* @__PURE__ */ s(
|
|
23
|
+
l,
|
|
24
|
+
{
|
|
25
|
+
...e
|
|
26
|
+
},
|
|
27
|
+
`sub-list-item-${t()}`
|
|
28
|
+
)),
|
|
29
|
+
[u]
|
|
30
|
+
);
|
|
13
31
|
return /* @__PURE__ */ s(
|
|
14
32
|
"ul",
|
|
15
33
|
{
|
|
16
|
-
"data-testid":
|
|
34
|
+
"data-testid": o,
|
|
17
35
|
className: i,
|
|
18
|
-
style:
|
|
19
|
-
children:
|
|
20
|
-
/* @__PURE__ */ s(t, { ...e.subListTitle }),
|
|
21
|
-
/* @__PURE__ */ s("ul", { children: e.subItems.map((o) => /* @__PURE__ */ s(
|
|
22
|
-
t,
|
|
23
|
-
{
|
|
24
|
-
...o
|
|
25
|
-
},
|
|
26
|
-
`sub-list-menu-sub-item-${l()}`
|
|
27
|
-
)) })
|
|
28
|
-
] }, `sub-list-menu-item-${l()}`) : /* @__PURE__ */ s(
|
|
29
|
-
t,
|
|
30
|
-
{
|
|
31
|
-
...e
|
|
32
|
-
},
|
|
33
|
-
`sub-list-item-${l()}`
|
|
34
|
-
))
|
|
36
|
+
style: r ?? void 0,
|
|
37
|
+
children: a
|
|
35
38
|
}
|
|
36
39
|
);
|
|
37
40
|
};
|
|
38
41
|
export {
|
|
39
|
-
|
|
42
|
+
x as default
|
|
40
43
|
};
|