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.
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 +18 -17
@@ -1,45 +1,49 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { parseClasses as p, parseTestId as b } from "../../../functions/parsers.js";
3
- import "react";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { useMemo as T } from "react";
3
+ import { COMMON_CLASSES as l } from "../../../constants/classes.js";
4
+ import { parseClasses as $, parseTestId as b } from "../../../functions/parsers.js";
5
+ import { generateKey as S } from "../../../functions/generators.js";
4
6
  import f from "../../atoms/TabItem/index.js";
5
- import { generateKey as h } from "../../../functions/generators.js";
6
- const y = ({
7
- testId: e = null,
8
- cssClasses: a = null,
7
+ const v = ({
8
+ testId: m = null,
9
+ cssClasses: u = null,
9
10
  style: i = null,
10
- tabs: r,
11
- alignment: n = null,
12
- size: o = null,
13
- format: u = null,
11
+ tabs: e,
12
+ alignment: t = null,
13
+ size: a = null,
14
+ format: r = null,
14
15
  isRounded: d = null,
15
- isFullWidth: m = null
16
+ isFullWidth: c = null
16
17
  }) => {
17
- const s = p([
18
+ const n = $([
18
19
  "tabs",
19
- n,
20
- o,
21
- u,
22
- d ? "is-toggle-rounded" : null,
23
- m ? "is-fullwidth" : null,
24
- a
25
- ]), c = e ?? b({ tag: "tabs", parsedClasses: s });
26
- return /* @__PURE__ */ l(
20
+ t ? `${l.IS}${t}` : null,
21
+ a ? `${l.IS}${a}` : null,
22
+ r ? `${l.IS}${r}` : null,
23
+ d ? l.TOGGLE_ROUNDED : null,
24
+ c ? l.FULL_WIDTH : null,
25
+ u
26
+ ]), p = m ?? b({ tag: "tabs", parsedClasses: n }), I = T(
27
+ () => e.map((o) => /* @__PURE__ */ s(
28
+ "li",
29
+ {
30
+ className: o.isActive ? l.ACTIVE : void 0,
31
+ children: /* @__PURE__ */ s(f, { ...o })
32
+ },
33
+ `tab-item-${S()}`
34
+ )),
35
+ [e]
36
+ );
37
+ return /* @__PURE__ */ s(
27
38
  "section",
28
39
  {
29
- "data-testid": c,
30
- className: s,
40
+ "data-testid": p,
41
+ className: n,
31
42
  style: i ?? void 0,
32
- children: /* @__PURE__ */ l("ul", { children: r.map((t) => /* @__PURE__ */ l(
33
- "li",
34
- {
35
- className: t.isActive ? "is-active" : void 0,
36
- children: /* @__PURE__ */ l(f, { ...t })
37
- },
38
- `tab-item-${h()}`
39
- )) })
43
+ children: /* @__PURE__ */ s("ul", { children: I })
40
44
  }
41
45
  );
42
46
  };
43
47
  export {
44
- y as default
48
+ v as default
45
49
  };
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { TagListProps } from '../../../interfaces/moleculeProps';
3
+ declare const TagList: React.FC<TagListProps>;
4
+ export default TagList;
@@ -0,0 +1,31 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import "react";
3
+ import { parseClasses as m, parseTestId as n } from "../../../functions/parsers.js";
4
+ import p from "../../atoms/Tag/index.js";
5
+ import { generateKey as g } from "../../../functions/generators.js";
6
+ const C = ({
7
+ testId: a = null,
8
+ cssClasses: e = null,
9
+ style: r = null,
10
+ listOfTags: o
11
+ }) => {
12
+ const s = m(["tags", e]), i = a ?? n({ tag: "tags", parsedClasses: s });
13
+ return /* @__PURE__ */ t(
14
+ "section",
15
+ {
16
+ "data-testid": i,
17
+ className: s,
18
+ style: r ?? void 0,
19
+ children: o.map((l) => /* @__PURE__ */ t(
20
+ p,
21
+ {
22
+ ...l
23
+ },
24
+ `tag-list-item-${g()}`
25
+ ))
26
+ }
27
+ );
28
+ };
29
+ export {
30
+ C as default
31
+ };
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as TagList } from '.';
3
+ declare const _default: Meta<typeof TagList>;
4
+ export default _default;
5
+ export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/moleculeProps').TagListProps>;
@@ -1,6 +1,6 @@
1
1
  import { jsx as x } from "react/jsx-runtime";
2
- import { parseClasses as d, parseTestId as m } from "../../../functions/parsers.js";
3
2
  import "react";
3
+ import { parseClasses as d, parseTestId as m } from "../../../functions/parsers.js";
4
4
  import u from "../../atoms/Tile/index.js";
5
5
  const T = ({
6
6
  testId: r = null,
@@ -21,3 +21,6 @@ export { default as NavBarBrand } from './NavBarBrand';
21
21
  export { default as NavBarDropdown } from './NavBarDropdown';
22
22
  export { default as TableRow } from './TableRow';
23
23
  export { default as FormFieldInput } from './FormFieldInput';
24
+ export { default as TagList } from './TagList';
25
+ export { default as CheckboxGroup } from './CheckboxGroup';
26
+ export { default as Grid } from './Grid';
@@ -5,44 +5,50 @@ import { default as d } from "./Breadcrumbs/index.js";
5
5
  import { default as s } from "./Dropdown/index.js";
6
6
  import { default as x } from "./Message/index.js";
7
7
  import { default as i } from "./Menu/index.js";
8
- import { default as M } from "./MenuList/index.js";
9
- import { default as c } from "./Pagination/index.js";
10
- import { default as v } from "./Modal/index.js";
11
- import { default as F } from "./Tabs/index.js";
12
- import { default as N } from "./InputControl/index.js";
13
- import { default as g } from "./PanelBlock/index.js";
14
- import { default as D } from "./PanelTabs/index.js";
15
- import { default as L } from "./LevelItem/index.js";
16
- import { default as R } from "./TileBox/index.js";
17
- import { default as h } from "./Footer/index.js";
8
+ import { default as b } from "./MenuList/index.js";
9
+ import { default as M } from "./Pagination/index.js";
10
+ import { default as G } from "./Modal/index.js";
11
+ import { default as v } from "./Tabs/index.js";
12
+ import { default as C } from "./InputControl/index.js";
13
+ import { default as I } from "./PanelBlock/index.js";
14
+ import { default as N } from "./PanelTabs/index.js";
15
+ import { default as k } from "./LevelItem/index.js";
16
+ import { default as h } from "./TileBox/index.js";
17
+ import { default as S } from "./Footer/index.js";
18
18
  import { default as q } from "./Media/index.js";
19
19
  import { default as z } from "./Section/index.js";
20
20
  import { default as E } from "./NavBarBrand/index.js";
21
21
  import { default as J } from "./NavBarDropdown/index.js";
22
22
  import { default as O } from "./TableRow/index.js";
23
23
  import { default as U } from "./FormFieldInput/index.js";
24
+ import { default as W } from "./TagList/index.js";
25
+ import { default as Y } from "./CheckboxGroup/index.js";
26
+ import { default as _ } from "./Grid/index.js";
24
27
  export {
25
28
  d as Breadcrumbs,
26
29
  e as ButtonGroup,
30
+ Y as CheckboxGroup,
27
31
  t as ColumnGroup,
28
32
  s as Dropdown,
29
- h as Footer,
33
+ S as Footer,
30
34
  U as FormFieldInput,
31
- N as InputControl,
32
- L as LevelItem,
35
+ _ as Grid,
36
+ C as InputControl,
37
+ k as LevelItem,
33
38
  q as Media,
34
39
  i as Menu,
35
- M as MenuList,
40
+ b as MenuList,
36
41
  x as Message,
37
- v as Modal,
42
+ G as Modal,
38
43
  E as NavBarBrand,
39
44
  J as NavBarDropdown,
40
45
  l as Notification,
41
- c as Pagination,
42
- g as PanelBlock,
43
- D as PanelTabs,
46
+ M as Pagination,
47
+ I as PanelBlock,
48
+ N as PanelTabs,
44
49
  z as Section,
45
50
  O as TableRow,
46
- F as Tabs,
47
- R as TileBox
51
+ v as Tabs,
52
+ W as TagList,
53
+ h as TileBox
48
54
  };
@@ -1,88 +1,100 @@
1
- import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
- import { parseClasses as u, parseTestId as N } from "../../../functions/parsers.js";
3
- import "react";
4
- import $ from "../../atoms/Image/index.js";
5
- import { generateKey as o } from "../../../functions/generators.js";
6
- const I = ({
7
- testId: m = null,
8
- cssClasses: h = null,
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { useMemo as r } from "react";
3
+ import { parseClasses as g, parseTestId as y } from "../../../functions/parsers.js";
4
+ import { generateKey as m } from "../../../functions/generators.js";
5
+ import z from "../../atoms/Image/index.js";
6
+ const A = ({
7
+ testId: h = null,
8
+ cssClasses: u = null,
9
9
  style: p = null,
10
10
  headerText: c = null,
11
11
  image: d = null,
12
- content: s,
12
+ content: t,
13
13
  footerLinks: l = null
14
14
  }) => {
15
- const n = u(["card", h]), e = m ?? N({ tag: "card", parsedClasses: n });
16
- return /* @__PURE__ */ i(
17
- "section",
18
- {
19
- "data-testid": e,
20
- className: n,
21
- style: p ?? void 0,
22
- children: [
23
- c ? /* @__PURE__ */ i(
24
- "header",
25
- {
26
- "data-testid": `${e}-header`,
27
- className: "card-header",
28
- children: [
29
- /* @__PURE__ */ a("p", { className: "card-header-title", children: c }),
30
- /* @__PURE__ */ a(
31
- "button",
15
+ const i = g(["card", u]), a = h ?? y({ tag: "card", parsedClasses: i }), N = r(
16
+ () => c ? /* @__PURE__ */ o(
17
+ "header",
18
+ {
19
+ "data-testid": `${a}-header`,
20
+ className: "card-header",
21
+ children: [
22
+ /* @__PURE__ */ e("p", { className: "card-header-title", children: c }),
23
+ /* @__PURE__ */ e(
24
+ "button",
25
+ {
26
+ className: "card-header-icon",
27
+ "aria-label": "more options",
28
+ children: /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(
29
+ "i",
32
30
  {
33
- className: "card-header-icon",
34
- "aria-label": "more options",
35
- children: /* @__PURE__ */ a("span", { className: "icon", children: /* @__PURE__ */ a(
36
- "i",
37
- {
38
- className: "fas fa-angle-down",
39
- "aria-hidden": "true"
40
- }
41
- ) })
31
+ className: "fas fa-angle-down",
32
+ "aria-hidden": "true"
42
33
  }
43
- )
44
- ]
45
- }
46
- ) : null,
47
- d ? /* @__PURE__ */ a(
48
- "section",
49
- {
50
- "data-testid": `${e}-image`,
51
- className: "card-image",
52
- children: /* @__PURE__ */ a($, { ...d })
53
- }
54
- ) : null,
55
- /* @__PURE__ */ a(
34
+ ) })
35
+ }
36
+ )
37
+ ]
38
+ }
39
+ ) : null,
40
+ [c, a]
41
+ ), $ = r(
42
+ () => d ? /* @__PURE__ */ e(
43
+ "section",
44
+ {
45
+ "data-testid": `${a}-image`,
46
+ className: "card-image",
47
+ children: /* @__PURE__ */ e(z, { ...d })
48
+ }
49
+ ) : null,
50
+ [d, a]
51
+ ), f = r(
52
+ () => /* @__PURE__ */ e(
53
+ "section",
54
+ {
55
+ "data-testid": `${a}-content`,
56
+ className: "card-content",
57
+ children: Array.isArray(t) ? t.map((s, n) => /* @__PURE__ */ e(
56
58
  "section",
57
59
  {
58
- "data-testid": `${e}-content`,
59
- className: "card-content",
60
- children: Array.isArray(s) ? s.map((t, r) => /* @__PURE__ */ a(
61
- "section",
62
- {
63
- "data-testid": `${e}-content-item-${r}`,
64
- className: "content",
65
- children: t
66
- },
67
- `card-content-item-${o()}`
68
- )) : /* @__PURE__ */ a("section", { className: "content", children: s })
69
- }
70
- ),
71
- l ? /* @__PURE__ */ a("section", { className: "card-footer", children: l.map((t, r) => /* @__PURE__ */ a(
72
- "a",
73
- {
74
- "data-testid": `${e}-footer-item-${r}`,
75
- className: "card-footer-item",
76
- "aria-hidden": "true",
77
- onClick: t.onClick ?? void 0,
78
- children: t.text
60
+ "data-testid": `${a}-content-item-${n}`,
61
+ className: "content",
62
+ children: s
79
63
  },
80
- `card-footer-item-${o()}`
81
- )) }) : null
64
+ `card-content-item-${m()}`
65
+ )) : /* @__PURE__ */ e("section", { className: "content", children: t })
66
+ }
67
+ ),
68
+ [a, t]
69
+ ), C = r(
70
+ () => l ? /* @__PURE__ */ e("section", { className: "card-footer", children: l.map((s, n) => /* @__PURE__ */ e(
71
+ "a",
72
+ {
73
+ "data-testid": `${a}-footer-item-${n}`,
74
+ className: "card-footer-item",
75
+ "aria-hidden": "true",
76
+ onClick: s.onClick ?? void 0,
77
+ children: s.text
78
+ },
79
+ `card-footer-item-${m()}`
80
+ )) }) : null,
81
+ [l, a]
82
+ );
83
+ return /* @__PURE__ */ o(
84
+ "section",
85
+ {
86
+ "data-testid": a,
87
+ className: i,
88
+ style: p ?? void 0,
89
+ children: [
90
+ N,
91
+ $,
92
+ f,
93
+ C
82
94
  ]
83
95
  }
84
96
  );
85
97
  };
86
98
  export {
87
- I as default
99
+ A as default
88
100
  };
@@ -1,68 +1,65 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { useMemo as i } from "react";
3
- import m from "../../molecules/FormFieldInput/index.js";
4
- import { parseClasses as u, parseTestId as y } from "../../../functions/parsers.js";
5
- import { generateKey as c } from "../../../functions/generators.js";
6
- const F = (e, o, r) => {
7
- const a = o ? `grouped-input-control-body-${c()}` : `input-control-body-${c()}`;
8
- if (o)
9
- return Array.isArray(e) ? e.map((l, t) => {
10
- const d = {
11
- ...l,
12
- isHorizontal: l.isHorizontal ?? r,
13
- testId: `test-grouped-input-control-${t}`
14
- };
15
- return /* @__PURE__ */ s(
16
- m,
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useMemo as I } from "react";
3
+ import t from "../../molecules/FormFieldInput/index.js";
4
+ import { parseClasses as h, parseTestId as A } from "../../../functions/parsers.js";
5
+ import { generateKey as m } from "../../../functions/generators.js";
6
+ const N = ({
7
+ testId: c = null,
8
+ cssClasses: i = null,
9
+ style: u = null,
10
+ inputsConfig: e,
11
+ isHorizontal: r = !1,
12
+ isGrouped: s = !1,
13
+ withAddons: p = !1
14
+ }) => {
15
+ const a = h([
16
+ "field",
17
+ r ? "is-horizontal" : null,
18
+ s ? "is-grouped" : null,
19
+ p ? "has-addons" : null,
20
+ i
21
+ ]), y = c ?? A({ tag: "field", parsedClasses: a }), d = I(() => {
22
+ const n = s ? `grouped-input-control-body-${m()}` : `input-control-body-${m()}`;
23
+ if (s)
24
+ return Array.isArray(e) ? e.map((l, f) => {
25
+ const F = {
26
+ ...l,
27
+ isHorizontal: l.isHorizontal ?? r,
28
+ testId: `test-grouped-input-control-${f}`
29
+ };
30
+ return /* @__PURE__ */ o(
31
+ t,
32
+ {
33
+ ...F
34
+ },
35
+ n
36
+ );
37
+ }) : /* @__PURE__ */ o(
38
+ t,
17
39
  {
18
- ...d
40
+ ...e,
41
+ isHorizontal: e.isHorizontal ?? r
19
42
  },
20
- a
43
+ n
21
44
  );
22
- }) : /* @__PURE__ */ s(
23
- m,
24
- {
25
- labelText: e.labelText,
26
- input: e.input,
27
- type: e.type,
28
- helper: e.helper,
45
+ {
46
+ const l = Array.isArray(e) ? null : {
47
+ ...e,
29
48
  isHorizontal: e.isHorizontal ?? r
30
- }
31
- );
32
- {
33
- const l = Array.isArray(e) ? null : {
34
- ...e,
35
- isHorizontal: e.isHorizontal ?? r
36
- };
37
- return l !== null ? /* @__PURE__ */ s(m, { ...l }) : null;
38
- }
39
- }, z = ({
40
- testId: e = null,
41
- cssClasses: o = null,
42
- style: r = null,
43
- config: a,
44
- isHorizontal: l = !1,
45
- isGrouped: t = !1
46
- }) => {
47
- const d = u([
48
- "field",
49
- l ? "is-horizontal" : null,
50
- t ? "is-grouped" : null,
51
- o
52
- ]), p = e ?? y({ tag: "field", parsedClasses: d }), n = i(
53
- () => F(a, t, l),
54
- [a, t, l]
55
- );
56
- return /* @__PURE__ */ s(
49
+ };
50
+ return l !== null ? /* @__PURE__ */ o(t, { ...l }) : null;
51
+ }
52
+ }, [e, s, r]);
53
+ return /* @__PURE__ */ o(
57
54
  "section",
58
55
  {
59
- "data-testid": p,
60
- className: d,
61
- style: r ?? void 0,
62
- children: l ? /* @__PURE__ */ s("section", { className: "field-body", children: n }) : n
56
+ "data-testid": y,
57
+ className: a,
58
+ style: u ?? void 0,
59
+ children: r ? /* @__PURE__ */ o("section", { className: "field-body", children: d }) : d
63
60
  }
64
61
  );
65
62
  };
66
63
  export {
67
- z as default
64
+ N as default
68
65
  };
@@ -5,3 +5,5 @@ export default _default;
5
5
  export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/organismProps').FormFieldProps>;
6
6
  export declare const InHorizontalMode: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/organismProps').FormFieldProps>;
7
7
  export declare const GroupedInputs: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/organismProps').FormFieldProps>;
8
+ export declare const InputWithAddon: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/organismProps').FormFieldProps>;
9
+ export declare const InputWithBothAddons: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/organismProps').FormFieldProps>;
@@ -1,37 +1,43 @@
1
- import { jsxs as h, jsx as i } from "react/jsx-runtime";
2
- import { parseClasses as m, parseTestId as f } from "../../../functions/parsers.js";
3
- const n = (o, s, t, r) => s === "body" || r === "is-fullheight" ? /* @__PURE__ */ i(
1
+ import { jsxs as m, jsx as $ } from "react/jsx-runtime";
2
+ import { COMMON_CLASSES as c } from "../../../constants/classes.js";
3
+ import { parseClasses as f, parseTestId as C } from "../../../functions/parsers.js";
4
+ const a = "hero", r = (o, l, t, n) => l === "body" || n === "fullheight" ? /* @__PURE__ */ $(
4
5
  "section",
5
6
  {
6
- "data-testid": `${t}-${s}`,
7
- className: `hero-${s}`,
7
+ "data-testid": `${t}-${l}`,
8
+ className: `${a}-${l}`,
8
9
  children: o
9
10
  }
10
- ) : null, C = ({
11
+ ) : null, x = ({
11
12
  testId: o = null,
12
- cssClasses: s = null,
13
+ cssClasses: l = null,
13
14
  style: t = null,
14
- header: r = null,
15
- body: d,
16
- footer: c = null,
17
- color: u = null,
18
- size: e = null
15
+ header: n = null,
16
+ body: h,
17
+ footer: i = null,
18
+ color: d = null,
19
+ size: s = null
19
20
  }) => {
20
- const a = m(["hero", u, e, s]), l = o ?? f({ tag: "hero", parsedClasses: a });
21
- return /* @__PURE__ */ h(
21
+ const u = f([
22
+ a,
23
+ d ? `${c.IS}${d}` : null,
24
+ s ? `${c.IS}${s}` : null,
25
+ l
26
+ ]), e = o ?? C({ tag: a, parsedClasses: u });
27
+ return /* @__PURE__ */ m(
22
28
  "section",
23
29
  {
24
- "data-testid": l,
25
- className: a,
30
+ "data-testid": e,
31
+ className: u,
26
32
  style: t ?? void 0,
27
33
  children: [
28
- n(r, "head", l, e),
29
- n(d, "body", l, e),
30
- n(c, "foot", l, e)
34
+ r(n, "head", e, s),
35
+ r(h, "body", e, s),
36
+ r(i, "foot", e, s)
31
37
  ]
32
38
  }
33
39
  );
34
40
  };
35
41
  export {
36
- C as default
42
+ x as default
37
43
  };