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.
Files changed (96) hide show
  1. package/README.md +1 -0
  2. package/dist/assets/reactive-bulma.css +1 -1
  3. package/dist/components/atoms/BreadcrumbItem/index.js +58 -34
  4. package/dist/components/atoms/BreadcrumbItem/index.stories.d.ts +1 -0
  5. package/dist/components/atoms/Button/index.js +76 -38
  6. package/dist/components/atoms/Button/index.stories.d.ts +5 -0
  7. package/dist/components/atoms/Checkbox/index.js +47 -40
  8. package/dist/components/atoms/Column/index.js +22 -21
  9. package/dist/components/atoms/Delete/index.js +22 -17
  10. package/dist/components/atoms/GridCell/index.d.ts +4 -0
  11. package/dist/components/atoms/GridCell/index.js +40 -0
  12. package/dist/components/atoms/GridCell/index.stories.d.ts +5 -0
  13. package/dist/components/atoms/GridCell/index.test.d.ts +0 -0
  14. package/dist/components/atoms/Icon/index.js +54 -57
  15. package/dist/components/atoms/Image/index.js +28 -27
  16. package/dist/components/atoms/Image/index.stories.d.ts +1 -0
  17. package/dist/components/atoms/NavBarItem/index.js +7 -7
  18. package/dist/components/atoms/ProgressBar/index.js +25 -24
  19. package/dist/components/atoms/RadioButton/index.js +53 -73
  20. package/dist/components/atoms/Select/index.js +72 -54
  21. package/dist/components/atoms/TabItem/index.js +34 -30
  22. package/dist/components/atoms/TableCell/index.js +20 -15
  23. package/dist/components/atoms/TableCell/index.stories.d.ts +1 -0
  24. package/dist/components/atoms/TableHeadCell/index.js +22 -14
  25. package/dist/components/atoms/TableHeadCell/index.stories.d.ts +1 -0
  26. package/dist/components/atoms/Tag/index.js +36 -69
  27. package/dist/components/atoms/Tag/index.stories.d.ts +0 -3
  28. package/dist/components/atoms/TagWithAddon/index.d.ts +4 -0
  29. package/dist/components/atoms/TagWithAddon/index.js +91 -0
  30. package/dist/components/atoms/TagWithAddon/index.stories.d.ts +11 -0
  31. package/dist/components/atoms/TagWithAddon/index.test.d.ts +0 -0
  32. package/dist/components/atoms/Tile/index.js +31 -29
  33. package/dist/components/atoms/Title/index.js +28 -16
  34. package/dist/components/atoms/index.d.ts +2 -0
  35. package/dist/components/atoms/index.js +36 -32
  36. package/dist/components/molecules/Breadcrumbs/index.js +48 -49
  37. package/dist/components/molecules/CheckboxGroup/index.d.ts +4 -0
  38. package/dist/components/molecules/CheckboxGroup/index.js +34 -0
  39. package/dist/components/molecules/CheckboxGroup/index.stories.d.ts +5 -0
  40. package/dist/components/molecules/CheckboxGroup/index.test.d.ts +0 -0
  41. package/dist/components/molecules/ColumnGroup/index.js +41 -37
  42. package/dist/components/molecules/Dropdown/index.js +58 -49
  43. package/dist/components/molecules/Dropdown/index.stories.d.ts +3 -0
  44. package/dist/components/molecules/FormFieldInput/index.js +68 -85
  45. package/dist/components/molecules/FormFieldInput/index.stories.d.ts +1 -3
  46. package/dist/components/molecules/Grid/index.d.ts +4 -0
  47. package/dist/components/molecules/Grid/index.js +86 -0
  48. package/dist/components/molecules/Grid/index.stories.d.ts +12 -0
  49. package/dist/components/molecules/Grid/index.test.d.ts +0 -0
  50. package/dist/components/molecules/InputControl/index.js +92 -47
  51. package/dist/components/molecules/InputControl/index.stories.d.ts +2 -0
  52. package/dist/components/molecules/Menu/index.js +32 -29
  53. package/dist/components/molecules/MenuList/index.js +33 -30
  54. package/dist/components/molecules/Message/index.js +32 -26
  55. package/dist/components/molecules/NavBarBrand/index.js +1 -1
  56. package/dist/components/molecules/NavBarDropdown/index.js +55 -57
  57. package/dist/components/molecules/NavBarDropdown/index.stories.d.ts +2 -0
  58. package/dist/components/molecules/Notification/index.js +26 -25
  59. package/dist/components/molecules/Pagination/index.js +91 -81
  60. package/dist/components/molecules/Pagination/index.stories.d.ts +2 -0
  61. package/dist/components/molecules/Section/index.js +18 -13
  62. package/dist/components/molecules/TableRow/index.js +41 -32
  63. package/dist/components/molecules/TableRow/index.stories.d.ts +1 -0
  64. package/dist/components/molecules/Tabs/index.js +36 -32
  65. package/dist/components/molecules/TagList/index.d.ts +4 -0
  66. package/dist/components/molecules/TagList/index.js +31 -0
  67. package/dist/components/molecules/TagList/index.stories.d.ts +5 -0
  68. package/dist/components/molecules/TagList/index.test.d.ts +0 -0
  69. package/dist/components/molecules/TileBox/index.js +1 -1
  70. package/dist/components/molecules/index.d.ts +3 -0
  71. package/dist/components/molecules/index.js +26 -20
  72. package/dist/components/organisms/Card/index.js +84 -72
  73. package/dist/components/organisms/FormField/index.js +54 -57
  74. package/dist/components/organisms/FormField/index.stories.d.ts +2 -0
  75. package/dist/components/organisms/Hero/index.js +26 -20
  76. package/dist/components/organisms/Level/index.js +43 -30
  77. package/dist/components/organisms/NavBar/index.js +65 -57
  78. package/dist/components/organisms/Panel/index.js +33 -27
  79. package/dist/components/organisms/Table/index.js +2 -2
  80. package/dist/components/organisms/Table/index.stories.d.ts +1 -0
  81. package/dist/components/organisms/TileGroup/index.js +31 -36
  82. package/dist/constants/classes.d.ts +34 -0
  83. package/dist/constants/classes.js +37 -0
  84. package/dist/constants/regExp.d.ts +18 -0
  85. package/dist/constants/regExp.js +23 -0
  86. package/dist/functions/parsers.js +5 -4
  87. package/dist/index.js +104 -94
  88. package/dist/interfaces/atomProps.d.ts +62 -31
  89. package/dist/interfaces/commonProps.d.ts +5 -0
  90. package/dist/interfaces/moleculeProps.d.ts +67 -22
  91. package/dist/interfaces/moleculeProps.js +1 -1
  92. package/dist/interfaces/organismProps.d.ts +35 -5
  93. package/dist/types/domTypes.d.ts +4 -3
  94. package/dist/types/domTypes.js +2 -2
  95. package/dist/types/styleTypes.d.ts +28 -18
  96. package/package.json +23 -22
@@ -1,107 +1,90 @@
1
- import { jsxs as f, Fragment as p, jsx as o } from "react/jsx-runtime";
2
- import { useMemo as m } from "react";
3
- import { parseClasses as u, parseTestId as I } from "../../../functions/parsers.js";
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 b from "../../atoms/Checkbox/index.js";
7
- import C from "../../atoms/RadioButton/index.js";
8
- import E from "../InputControl/index.js";
9
- import { FormFieldType as l } from "../../../interfaces/moleculeProps.js";
10
- const x = (r, t) => {
11
- const e = r !== null ? /* @__PURE__ */ o(
12
- "label",
13
- {
14
- "data-testid": "test-form-field-label",
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 (t) {
30
- case l.INPUT:
31
- return /* @__PURE__ */ o(
32
- E,
16
+ switch (o.type) {
17
+ case t.INPUT:
18
+ return /* @__PURE__ */ r(
19
+ x,
33
20
  {
34
- ...e,
35
- ...s
21
+ ...o.config,
22
+ ...n,
23
+ isHorizontal: i
36
24
  }
37
25
  );
38
- case l.SELECT:
39
- return /* @__PURE__ */ o(
26
+ case t.SELECT:
27
+ return /* @__PURE__ */ r("section", { className: "control", children: /* @__PURE__ */ r(
40
28
  h,
41
29
  {
42
- ...e,
43
- ...s
30
+ ...o.config,
31
+ ...n
44
32
  }
45
- );
46
- case l.CHECKBOX:
47
- return /* @__PURE__ */ o(
48
- b,
33
+ ) });
34
+ case t.CHECKBOX:
35
+ return /* @__PURE__ */ r("section", { className: "control", children: /* @__PURE__ */ r(
36
+ g,
49
37
  {
50
- ...e,
51
- ...s
38
+ ...o.config,
39
+ ...n
52
40
  }
53
- );
54
- case l.RADIOBUTTON:
55
- return /* @__PURE__ */ o(
56
- C,
41
+ ) });
42
+ case t.RADIOBUTTON:
43
+ return /* @__PURE__ */ r("section", { className: "control", children: /* @__PURE__ */ r(
44
+ N,
57
45
  {
58
- ...e,
59
- ...s
46
+ ...o.config,
47
+ ...n
60
48
  }
61
- );
62
- case l.TEXTAREA:
63
- return /* @__PURE__ */ o(
49
+ ) });
50
+ case t.TEXTAREA:
51
+ return /* @__PURE__ */ r("section", { className: "control", children: /* @__PURE__ */ r(
64
52
  T,
65
53
  {
66
- ...e,
67
- ...s
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: r = null,
88
- labelText: t,
89
- type: e,
90
- input: s,
91
- helper: n,
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 c = m(
95
- () => x(t, a),
96
- [t, a]
97
- ), d = m(
98
- () => F({ testId: r ?? void 0, type: e, input: s }),
99
- [r, e, s]
100
- ), i = m(() => N(n), [n]);
101
- return /* @__PURE__ */ f(p, { children: [
102
- c,
103
- d,
104
- i
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,4 @@
1
+ import { default as React } from 'react';
2
+ import { GridProps } from '../../../interfaces/moleculeProps';
3
+ declare const Grid: React.FC<GridProps>;
4
+ export default Grid;
@@ -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 x, jsx as i } from "react/jsx-runtime";
2
- import { parseClasses as f, parseTestId as g } from "../../../functions/parsers.js";
3
- import C from "../../atoms/Icon/index.js";
4
- import h from "../../atoms/Input/index.js";
5
- import "react";
6
- const e = (l) => l ? /* @__PURE__ */ i(C, { ...l }) : null, y = ({
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: a = null,
9
- style: p = null,
10
- inputConfig: o,
11
- leftIcon: s = null,
12
- rightIcon: n = null,
13
- size: t = null,
14
- isLoading: u = null,
15
- isExpanded: d = null
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 r = f([
18
- "control",
19
- t,
20
- s ? "has-icons-left" : null,
21
- n ? "has-icons-right" : null,
22
- u ? "is-loading" : null,
23
- d ? "is-expanded" : null,
24
- a
25
- ]), c = l ?? g({
26
- tag: "control",
27
- parsedClasses: r,
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: /has-|is-/gm,
35
+ regExp: p.IS_HAS,
31
36
  replacer: "-"
32
37
  },
33
38
  {
34
- regExp: /control/gm,
39
+ regExp: p.CONTROL,
35
40
  replacer: ""
36
41
  }
37
42
  ]
38
- }), m = {
39
- ...o,
40
- size: t ?? o?.size
41
- };
42
- return /* @__PURE__ */ x(
43
- "section",
44
- {
45
- "data-testid": c,
46
- className: r,
47
- style: p ?? void 0,
48
- children: [
49
- /* @__PURE__ */ i(h, { ...m }),
50
- e(s ? { ...s, position: "is-left" } : void 0),
51
- e(
52
- n ? { ...n, position: "is-right" } : void 0
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
- y as default
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 { jsx as e, jsxs as o } from "react/jsx-runtime";
2
- import u from "react";
3
- import c from "../MenuList/index.js";
4
- import { parseClasses as d, parseTestId as p } from "../../../functions/parsers.js";
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 C = ({
6
+ const g = ({
7
7
  testId: l = null,
8
- cssClasses: m = null,
9
- style: n = null,
10
- menuSections: r
8
+ cssClasses: n = null,
9
+ style: r = null,
10
+ menuSections: t
11
11
  }) => {
12
- const t = d(["menu", m]), i = l ?? p({ tag: "menu", parsedClasses: t });
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: t,
18
- style: n ?? void 0,
19
- children: r.map((a) => /* @__PURE__ */ o(u.Fragment, { 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
- C as default
43
+ g as default
41
44
  };
@@ -1,40 +1,43 @@
1
- import { jsx as s, jsxs as p } from "react/jsx-runtime";
2
- import { parseClasses as d, parseTestId as b } from "../../../functions/parsers.js";
3
- import "react";
4
- import t from "../../atoms/MenuItem/index.js";
5
- import { generateKey as l } from "../../../functions/generators.js";
6
- const h = ({
7
- testId: u = null,
8
- cssClasses: r = null,
9
- style: n = null,
10
- itemList: m
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 = d(["menu-list", r]), a = u ?? b({ tag: "menu-list", parsedClasses: 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": a,
34
+ "data-testid": o,
17
35
  className: i,
18
- style: n ?? void 0,
19
- children: m.map((e) => "subListTitle" in e ? /* @__PURE__ */ p("li", { 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
- h as default
42
+ x as default
40
43
  };