@hortiview/shared-components 1.3.5 → 1.4.1

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 (27) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/{BigLoadingSpinner-iegTbDcD.js → BigLoadingSpinner-CqSGYzZA.js} +2 -2
  3. package/dist/components/AlertBanner/AlertBanner.js +14 -14
  4. package/dist/components/BlockView/BlockView.js +26 -24
  5. package/dist/components/ContextMenu/ContextMenu.js +29 -29
  6. package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
  7. package/dist/components/Disclaimer/Disclaimer.js +7 -6
  8. package/dist/components/EmptyView/EmptyView.js +47 -37
  9. package/dist/components/Filter/Filter.d.ts +2 -1
  10. package/dist/components/Filter/Filter.js +107 -90
  11. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5156 -5154
  12. package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
  13. package/dist/components/FormComponents/FormSelect/FormSelect.js +22 -22
  14. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -6
  15. package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +3 -1
  16. package/dist/components/FormComponents/FormToggle/FormToggle.js +32 -26
  17. package/dist/components/FormComponents/FormToggle/FormToggle.test.js +19 -15
  18. package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -10
  19. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
  20. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  21. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +1 -1
  22. package/dist/components/OverflowTooltip/OverflowTooltip.js +10 -9
  23. package/dist/components/SearchBar/SearchBar.js +3 -2
  24. package/dist/components/Select/Select.d.ts +1 -1
  25. package/dist/components/Select/Select.js +34 -27
  26. package/dist/components/VerticalDivider/VerticalDivider.js +12 -5
  27. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,44 @@
1
+ ## [1.4.1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.4.0...v1.4.1) (2025-04-18)
2
+
3
+ ### Bug Fixes
4
+
5
+ * fix datepicker ([99e84f0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/99e84f0b256f7a65266af0d933b49b8bd3a7e8db))
6
+
7
+ ### Documentation
8
+
9
+ * add a method comment for getValidDay ([6d10f38](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/6d10f388199e13072068b641a24872ce934963ef))
10
+ * add comment to useUtc prop to prevent future bugs ([95b9391](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/95b939198711e2809335b42b2bf60ff0efabbb31))
11
+
12
+ ### Code Refactoring
13
+
14
+ * remove button ([f5f4aff](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/f5f4aff457942839296d2b4810f0287c378a8c1a))
15
+
16
+ ## [1.4.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.3.5...v1.4.0) (2025-04-11)
17
+
18
+ ### Features
19
+
20
+ * add className & change useEffect ([61e2109](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/61e21095a0ecd98336b28991caa3a9cf8b0e5e91))
21
+ * add data-testid to Filter.tsx ([384b36e](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/384b36e5068c7b6381ea4884dd4ad5965808bc5f))
22
+ * add data-testids to shared components ([1ef7d22](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/1ef7d225316e73ee02c1d0aad69575e27da03841)), closes [#11762](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/issues/11762)
23
+ * add dataTestId ([bbf3c6a](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/bbf3c6a3507f5683c91496349f224f29a311c4a0))
24
+ * add new data-testids ([21ded33](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/21ded33c5494474b2df0096ebefb1fdecabb7407))
25
+ * add test for FormToggle & add data-testid prop ([eef11be](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/eef11becd8c2dca76297923165c5f8077dadb3ea))
26
+ * add useRef and uniqueid & change data-testid ([5f42796](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/5f4279616ef2f6c9649697f929f7404120caacbf))
27
+ * add useRef with uniqueId & add data-testid to stories ([b39d83d](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/b39d83d9a3f8b649d7996295b4a0d90a47316610))
28
+ * change data-testid ([3355b85](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/3355b85ef67c19d50d1e6cce9b8dd818acb72b4e))
29
+ * change ids and change useeffect ([eeb23a5](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/eeb23a582a9c3daf0a7216172f41edc322f1969c))
30
+
31
+ ### Bug Fixes
32
+
33
+ * fix yarn error ([fa13133](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/fa1313320003e0ede7b7a61ca03734d99556725a))
34
+
35
+ ### Code Refactoring
36
+
37
+ * change data-testids ([e26c73e](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/e26c73e717f6bb5772074ddd9f112160e3726804))
38
+ * change ids ([6483533](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/6483533f149b50edcf807ce900bb4a8c9f38d16d))
39
+ * remove data-testid & change dataTestId in Select.test.tsx ([c91cbc9](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/c91cbc9ea6c425df3d1e5bef23c4f8612d589bf3))
40
+ * remove useRef ([9d2edca](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/9d2edcae4c9d6a46c77089d2faf111c4e7b71f61))
41
+
1
42
  ## [1.3.5](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.3.4...v1.3.5) (2025-04-09)
2
43
 
3
44
  ### Bug Fixes
@@ -9,8 +9,8 @@ import './assets/BigLoadingSpinner.css';const e = "_loadingBigOverlay_7dxo1_1",
9
9
  }, l = ({ text: a }) => /* @__PURE__ */ n("div", { className: o.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
10
10
  /* @__PURE__ */ i(d, { icon: "hortiview", className: o.logo, "data-testid": "logo-icon" }),
11
11
  /* @__PURE__ */ i(r, { tag: "p", bold: !0, level: 1, className: o.bigLoadSpinnerCardText, children: a })
12
- ] }), b = (a) => /* @__PURE__ */ i("div", { className: o.loadingBigOverlay, children: /* @__PURE__ */ i(l, { ...a }) });
12
+ ] }), _ = (a) => /* @__PURE__ */ i("div", { "data-testid": "big-loading-spinner", className: o.loadingBigOverlay, children: /* @__PURE__ */ i(l, { ...a }) });
13
13
  export {
14
- b as B,
14
+ _ as B,
15
15
  o as s
16
16
  };
@@ -1,34 +1,34 @@
1
- import { jsx as s, Fragment as c, jsxs as m } from "react/jsx-runtime";
2
- import { G as _ } from "../../index.es-DntoATwO.js";
3
- import { b as g } from "../../index.es-CF_xy2ns.js";
4
- import { u as l } from "../../useBreakpoints-MzTZ0tCT.js";
5
- import '../../assets/AlertBanner.css';const d = "_messageContainer_1seos_1", p = "_info_1seos_9", f = "_danger_1seos_14", u = "_success_1seos_19", y = "_warning_1seos_24", n = {
6
- messageContainer: d,
1
+ import { jsx as e, Fragment as c, jsxs as d } from "react/jsx-runtime";
2
+ import { G as l } from "../../index.es-DntoATwO.js";
3
+ import { b as m } from "../../index.es-CF_xy2ns.js";
4
+ import { u as _ } from "../../useBreakpoints-MzTZ0tCT.js";
5
+ import '../../assets/AlertBanner.css';const g = "_messageContainer_1seos_1", p = "_info_1seos_9", f = "_danger_1seos_14", u = "_success_1seos_19", y = "_warning_1seos_24", n = {
6
+ messageContainer: g,
7
7
  info: p,
8
8
  danger: f,
9
9
  success: u,
10
10
  warning: y
11
- }, b = ({
12
- text: e,
11
+ }, C = ({
12
+ text: s,
13
13
  color: r = "info",
14
14
  isOpen: o = !0,
15
15
  action: i,
16
16
  isBold: t = !0
17
17
  }) => {
18
- const { isDesktop: a } = l();
19
- return o ? /* @__PURE__ */ s("div", { className: `${n.messageContainer} ${n[r]}`, children: /* @__PURE__ */ m(
20
- _,
18
+ const { isDesktop: a } = _();
19
+ return o ? /* @__PURE__ */ e("div", { "data-testid": "alert-banner", className: `${n.messageContainer} ${n[r]}`, children: /* @__PURE__ */ d(
20
+ l,
21
21
  {
22
22
  direction: a ? "horizontal" : "vertical",
23
23
  primaryAlign: "space-between",
24
24
  secondaryAlign: "center",
25
25
  children: [
26
- typeof e == "string" ? /* @__PURE__ */ s(g, { bold: t, level: 2, children: e }) : /* @__PURE__ */ s("div", { children: e }),
26
+ typeof s == "string" ? /* @__PURE__ */ e(m, { bold: t, level: 2, children: s }) : /* @__PURE__ */ e("div", { children: s }),
27
27
  i
28
28
  ]
29
29
  }
30
- ) }) : /* @__PURE__ */ s(c, {});
30
+ ) }) : /* @__PURE__ */ e(c, {});
31
31
  };
32
32
  export {
33
- b as AlertBanner
33
+ C as AlertBanner
34
34
  };
@@ -1,4 +1,4 @@
1
- import { jsxs as h, jsx as t, Fragment as v } from "react/jsx-runtime";
1
+ import { jsxs as v, jsx as t, Fragment as h } from "react/jsx-runtime";
2
2
  import { d as C, T as R, a as B } from "../../index.es-CF_xy2ns.js";
3
3
  import { useState as A, useEffect as D, useMemo as S } from "react";
4
4
  import { getBlockNumberByDto as F } from "../../services/BlockService.js";
@@ -16,48 +16,50 @@ import '../../assets/BlockView.css';const M = "_grid_17o13_1", V = "_black_17o13
16
16
  }, Y = ({
17
17
  rows: e,
18
18
  columns: r,
19
- hideText: m = !1,
19
+ hideText: b = !1,
20
20
  errorBlocks: f = [],
21
- showNumbers: g = !0,
22
- clickable: N = !0,
23
- size: b = 15,
24
- onClick: _ = null,
21
+ showNumbers: w = !0,
22
+ clickable: g = !0,
23
+ size: m = 15,
24
+ onClick: d = null,
25
25
  currentBlock: a,
26
- blocks: d,
27
- blockViewTitle: $,
28
- blockLabel: w,
26
+ blocks: k,
27
+ blockViewTitle: N,
28
+ blockLabel: $,
29
29
  emptyViewTitle: x
30
30
  }) => {
31
- const [u, k] = A(0);
31
+ const [u, _] = A(0);
32
32
  D(() => {
33
33
  if (!a) return;
34
34
  const l = F(a, r);
35
- k(l);
35
+ _(l);
36
36
  }, [a, r]);
37
37
  const L = S(() => e * r, [e, r]), T = (l) => {
38
- _ && _(l, a ?? void 0);
39
- }, E = ({ row: l, column: i }) => d.length === 0 ? !0 : d.some((n) => n.position?.row === l && n.position?.column === i), y = !e && !r;
40
- return /* @__PURE__ */ h("div", { "data-testid": "block-view-container", className: o.grid, children: [
41
- !m && /* @__PURE__ */ t(C, { level: 1, bold: !0, className: o.black, children: $ }),
38
+ d && d(l, a ?? void 0);
39
+ }, E = ({ row: l, column: i }) => k.length === 0 ? !0 : k.some((s) => s.position?.row === l && s.position?.column === i), y = !e && !r;
40
+ return /* @__PURE__ */ v("div", { "data-testid": "block-view-container", className: o.grid, children: [
41
+ !b && /* @__PURE__ */ t(C, { level: 1, bold: !0, className: o.black, children: N }),
42
42
  /* @__PURE__ */ t(
43
43
  "div",
44
44
  {
45
+ "data-testid": "block-view-layout",
45
46
  className: y ? o.emptyLayout : o.blockLayout,
46
- style: { width: `${b}rem`, height: `${b}rem` },
47
- children: y ? /* @__PURE__ */ t(P, { emptyViewTitle: x }) : /* @__PURE__ */ t(v, { children: Array.from({ length: e }).map((l, i) => /* @__PURE__ */ t("div", { className: o.blockRow, children: Array.from({ length: r }).map((n, s) => {
48
- const c = r * i + s + 1, p = E({ row: i + 1, column: s + 1 });
47
+ style: { width: `${m}rem`, height: `${m}rem` },
48
+ children: y ? /* @__PURE__ */ t(P, { emptyViewTitle: x }) : /* @__PURE__ */ t(h, { children: Array.from({ length: e }).map((l, i) => /* @__PURE__ */ t("div", { "data-testid": "block-view-row", className: o.blockRow, children: Array.from({ length: r }).map((s, n) => {
49
+ const c = r * i + n + 1, p = E({ row: i + 1, column: n + 1 });
49
50
  return /* @__PURE__ */ t(
50
51
  "div",
51
52
  {
52
53
  "data-testid": "block-view-block",
53
54
  className: `${o.block} ${u === c ? o.active : ""} ${p ? "" : o.empty} ${f.includes(c) ? o.error : ""}`,
54
55
  id: `block${c}`,
55
- onClick: N ? () => {
56
- k(c), T({ row: i + 1, column: s + 1 });
56
+ onClick: g ? () => {
57
+ _(c), T({ row: i + 1, column: n + 1 });
57
58
  } : void 0,
58
- children: g && p && /* @__PURE__ */ t(
59
+ children: w && p && /* @__PURE__ */ t(
59
60
  "div",
60
61
  {
62
+ "data-testid": "block-view-block-number",
61
63
  className: `${o.blockText} ${u === c ? o.black : ""}`,
62
64
  children: c
63
65
  }
@@ -68,13 +70,13 @@ import '../../assets/BlockView.css';const M = "_grid_17o13_1", V = "_black_17o13
68
70
  }) }, i)) })
69
71
  }
70
72
  ),
71
- !m && /* @__PURE__ */ h(R, { themeColor: "primary", level: 6, children: [
73
+ !b && /* @__PURE__ */ v(R, { themeColor: "primary", level: 6, children: [
72
74
  L,
73
75
  " ",
74
- w
76
+ $
75
77
  ] })
76
78
  ] });
77
- }, P = ({ emptyViewTitle: e }) => e ? /* @__PURE__ */ t(B, { bold: !0, children: e }) : /* @__PURE__ */ t(v, {});
79
+ }, P = ({ emptyViewTitle: e }) => e ? /* @__PURE__ */ t(B, { bold: !0, children: e }) : /* @__PURE__ */ t(h, {});
78
80
  export {
79
81
  Y as BlockView
80
82
  };
@@ -1,60 +1,60 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { I as u } from "../../index.es-0lQcz8m1.js";
3
- import { M as f, L as d, a as _ } from "../../index.es-d5xhUpJZ.js";
4
- import { useState as p, useCallback as a, useEffect as I } from "react";
5
- import { u as v } from "../../uniqueId-NU3-C36A.js";
6
- import '../../assets/ContextMenu.css';const y = "_menu_ol91v_1", C = "_icon_ol91v_5", k = "_listItem_ol91v_9", l = {
7
- menu: y,
8
- icon: C,
9
- listItem: k
10
- }, b = ({
2
+ import { I as f } from "../../index.es-0lQcz8m1.js";
3
+ import { M as d, L as _, a as p } from "../../index.es-d5xhUpJZ.js";
4
+ import { useState as I, useCallback as a, useEffect as v } from "react";
5
+ import { u as C } from "../../uniqueId-NU3-C36A.js";
6
+ import '../../assets/ContextMenu.css';const k = "_menu_ol91v_1", y = "_icon_ol91v_5", M = "_listItem_ol91v_9", l = {
7
+ menu: k,
8
+ icon: y,
9
+ listItem: M
10
+ }, N = ({
11
11
  triggerOpen: s = null,
12
- actions: m,
13
- iconOrientation: c = "vertical"
12
+ actions: c,
13
+ iconOrientation: m = "vertical"
14
14
  }) => {
15
- const [t, o] = p(!1), r = a(() => {
16
- o(!t);
17
- }, [t]), i = a(() => {
18
- o(!1);
15
+ const [e, t] = I(!1), r = a(() => {
16
+ t(!e);
17
+ }, [e]), i = a(() => {
18
+ t(!1);
19
19
  }, []);
20
- return I(() => {
21
- o(s !== null ? s : !1);
20
+ return v(() => {
21
+ t(s !== null ? s : !1);
22
22
  }, [s]), /* @__PURE__ */ n(
23
- f,
23
+ d,
24
24
  {
25
25
  className: l.menu,
26
26
  "data-testid": "selection-menu",
27
- open: t,
27
+ open: e,
28
28
  surfaceOnly: !0,
29
29
  hoistToBody: !0,
30
30
  onClose: i,
31
31
  trigger: /* @__PURE__ */ n(
32
- u,
32
+ f,
33
33
  {
34
34
  className: l.icon,
35
- variant: t ? "filled-primary" : void 0,
35
+ variant: e ? "filled-primary" : void 0,
36
36
  "data-testid": "open-button",
37
- icon: c === "vertical" ? "more_vert" : "more_horiz",
37
+ icon: m === "vertical" ? "more_vert" : "more_horiz",
38
38
  onClick: r
39
39
  }
40
40
  ),
41
- children: /* @__PURE__ */ n(d, { children: m.map((e) => /* @__PURE__ */ n(
42
- _,
41
+ children: /* @__PURE__ */ n(_, { children: c.map((o, u) => /* @__PURE__ */ n(
42
+ p,
43
43
  {
44
44
  className: l.listItem,
45
- ...e,
45
+ ...o,
46
46
  leadingBlockType: "icon",
47
- "data-testid": `list-item-button-${e.primaryText}`,
47
+ "data-testid": `list-item-button-${u}`,
48
48
  onClick: () => {
49
- e?.onClick?.(), e.closeOnClick !== !1 && i();
49
+ o?.onClick?.(), o.closeOnClick !== !1 && i();
50
50
  }
51
51
  },
52
- v(`LI_${e.primaryText?.toString()}_`)
52
+ C(`LI_${o.primaryText?.toString()}_`)
53
53
  )) })
54
54
  },
55
55
  "selectionmenu"
56
56
  );
57
57
  };
58
58
  export {
59
- b as ContextMenu
59
+ N as ContextMenu
60
60
  };
@@ -16,7 +16,7 @@ k("ContextMenu Test", () => {
16
16
  B(/* @__PURE__ */ r(p, { actions: g, triggerOpen: !0 }));
17
17
  const c = t.getByTestId("open-button"), n = t.getByTestId("selection-menu");
18
18
  e(n).toBeInTheDocument(), e(n).not.toHaveClass("mdc-menu-surface--open"), o.click(c), await s(() => e(n).toHaveClass("mdc-menu-surface--animating-open")), e(t.getByText("Open")).toBeInTheDocument(), e(t.getByText("Delete")).toBeInTheDocument(), e(t.getByText("Edit")).toBeInTheDocument();
19
- const m = t.getByTestId("list-item-button-Open"), u = t.getByTestId("list-item-button-Delete"), d = t.getByTestId("list-item-button-Edit");
19
+ const m = t.getByTestId("list-item-button-0"), u = t.getByTestId("list-item-button-1"), d = t.getByTestId("list-item-button-2");
20
20
  e(m).toBeInTheDocument(), e(u).toBeInTheDocument(), e(d).toBeInTheDocument(), o.click(m), e(C).toHaveBeenCalled(), e(i).not.toHaveBeenCalled(), e(a).not.toHaveBeenCalled(), o.click(u), e(i).toHaveBeenCalled(), o.click(d), e(a).toHaveBeenCalled();
21
21
  });
22
22
  });
@@ -1,20 +1,21 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import { G as n } from "../../index.es-DntoATwO.js";
3
- import { I as m } from "../../index.es-3043KTnb.js";
4
- import { d as t, b as d } from "../../index.es-CF_xy2ns.js";
5
- import '../../assets/Disclaimer.css';const p = "_disclaimer_1k38t_1", y = "_iconArea_1k38t_7", c = {
3
+ import { I as t } from "../../index.es-3043KTnb.js";
4
+ import { d as m, b as d } from "../../index.es-CF_xy2ns.js";
5
+ import '../../assets/Disclaimer.css';const p = "_disclaimer_1k38t_1", y = "_iconArea_1k38t_7", a = {
6
6
  disclaimer: p,
7
7
  iconArea: y
8
- }, g = ({ text: o, subtext: i, icon: e, level: a = 2, bold: s = !1 }) => /* @__PURE__ */ l(
8
+ }, g = ({ text: c, subtext: i, icon: e, level: o = 2, bold: s = !1 }) => /* @__PURE__ */ l(
9
9
  n,
10
10
  {
11
+ "data-testid": "disclaimer",
11
12
  direction: e || i ? "vertical" : "horizontal",
12
13
  secondaryAlign: "center",
13
14
  primaryAlign: "center",
14
15
  children: [
15
- /* @__PURE__ */ r(t, { className: c.disclaimer, level: a, bold: s, children: o }),
16
+ /* @__PURE__ */ r(m, { className: a.disclaimer, level: o, bold: s, children: c }),
16
17
  i && /* @__PURE__ */ r(d, { level: 2, children: i }),
17
- e && /* @__PURE__ */ r("div", { className: c.iconArea, children: /* @__PURE__ */ r(m, { className: c.Icon, icon: e, iconSize: "large" }) })
18
+ e && /* @__PURE__ */ r("div", { className: a.iconArea, children: /* @__PURE__ */ r(t, { className: a.Icon, icon: e, iconSize: "large" }) })
18
19
  ]
19
20
  }
20
21
  );
@@ -1,7 +1,7 @@
1
1
  import { jsx as m, jsxs as $ } from "react/jsx-runtime";
2
2
  import { G as _ } from "../../index.es-DntoATwO.js";
3
3
  import { c as P, _ as C, P as e } from "../../identity-DLWZln-X.js";
4
- import c, { forwardRef as T, useRef as H, useImperativeHandle as w, useMemo as y } from "react";
4
+ import c, { forwardRef as T, useRef as w, useImperativeHandle as H, useMemo as y } from "react";
5
5
  import { e as N, b as O } from "../../index.es-CF_xy2ns.js";
6
6
  import { I as B } from "../../index.es-3043KTnb.js";
7
7
  const j = {
@@ -157,55 +157,55 @@ const j = {
157
157
  className: void 0,
158
158
  overlayThemeColor: "dark",
159
159
  position: "full"
160
- }, f = /* @__PURE__ */ T((t, o) => {
160
+ }, f = /* @__PURE__ */ T((r, o) => {
161
161
  const {
162
- children: l,
163
- className: a,
162
+ children: a,
163
+ className: l,
164
164
  position: n,
165
- overlayThemeColor: r,
165
+ overlayThemeColor: t,
166
166
  ...i
167
- } = t, s = H();
168
- w(o, () => s.current, []);
169
- const d = y(() => n !== "none" && P("lmnt", "lmnt-hero-overlay ", !r.includes("gradient") && r !== "surface" && `lmnt-hero-overlay__${r}`, r.includes("gradient") && r !== "surface" && `lmnt-theme--bg-${r}`, r === "surface" && "lmnt-theme-surface-bg", `lmnt-hero-overlay__${n}`, a), [r, n, a]);
167
+ } = r, s = w();
168
+ H(o, () => s.current, []);
169
+ const d = y(() => n !== "none" && P("lmnt", "lmnt-hero-overlay ", !t.includes("gradient") && t !== "surface" && `lmnt-hero-overlay__${t}`, t.includes("gradient") && t !== "surface" && `lmnt-theme--bg-${t}`, t === "surface" && "lmnt-theme-surface-bg", `lmnt-hero-overlay__${n}`, l), [t, n, l]);
170
170
  return /* @__PURE__ */ c.createElement("div", C({
171
171
  className: d
172
- }, i), l && l);
172
+ }, i), a && a);
173
173
  });
174
174
  f.displayName = "HeroOverlay";
175
175
  f.propTypes = R;
176
176
  f.defaultProps = U;
177
- const v = /* @__PURE__ */ T((t, o) => {
177
+ const v = /* @__PURE__ */ T((r, o) => {
178
178
  const {
179
- alignment: l,
180
- children: a,
179
+ alignment: a,
180
+ children: l,
181
181
  className: n,
182
- imageUrl: r,
182
+ imageUrl: t,
183
183
  style: i,
184
184
  themeColor: s,
185
185
  overlay: d,
186
186
  overlayProps: g,
187
187
  ...u
188
- } = t, p = H();
189
- w(o, () => p.current, []);
190
- const k = y(() => P("lmnt lmnt-hero", s && `lmnt-theme-${s}-bg`, `lmnt-hero__align-${l}`, n), [l, n, s]), h = y(() => r ? {
188
+ } = r, p = w();
189
+ H(o, () => p.current, []);
190
+ const k = y(() => P("lmnt lmnt-hero", s && `lmnt-theme-${s}-bg`, `lmnt-hero__align-${a}`, n), [a, n, s]), h = y(() => t ? {
191
191
  ...i,
192
- backgroundImage: `url(${r})`
193
- } : i, [r, i]);
192
+ backgroundImage: `url(${t})`
193
+ } : i, [t, i]);
194
194
  return /* @__PURE__ */ c.createElement("div", C({
195
195
  ref: p,
196
196
  className: k,
197
197
  style: h
198
- }, u), d && /* @__PURE__ */ c.createElement(f, g), a);
198
+ }, u), d && /* @__PURE__ */ c.createElement(f, g), l);
199
199
  });
200
200
  v.displayName = "Hero";
201
201
  v.propTypes = j;
202
202
  v.defaultProps = A;
203
- const b = /* @__PURE__ */ T((t, o) => {
203
+ const b = /* @__PURE__ */ T((r, o) => {
204
204
  const {
205
- children: l,
206
- className: a,
205
+ children: a,
206
+ className: l,
207
207
  heroBtn: n,
208
- logo: r,
208
+ logo: t,
209
209
  overline: i,
210
210
  padding: s,
211
211
  title: d,
@@ -213,8 +213,8 @@ const b = /* @__PURE__ */ T((t, o) => {
213
213
  subtitle: u,
214
214
  textColor: p,
215
215
  ...k
216
- } = t, h = H(), E = y(() => P("lmnt lmnt-hero-content", `lmnt-theme-${p}`, a), [a, p]);
217
- w(o, () => h.current, []);
216
+ } = r, h = w(), E = y(() => P("lmnt lmnt-hero-content", `lmnt-theme-${p}`, l), [l, p]);
217
+ H(o, () => h.current, []);
218
218
  const x = y(() => ({
219
219
  ...g,
220
220
  padding: s
@@ -224,11 +224,11 @@ const b = /* @__PURE__ */ T((t, o) => {
224
224
  className: E
225
225
  }, k, {
226
226
  style: x
227
- }), l || /* @__PURE__ */ c.createElement(_, {
227
+ }), a || /* @__PURE__ */ c.createElement(_, {
228
228
  gap: "dense",
229
229
  direction: "vertical",
230
230
  secondaryAlign: "center"
231
- }, r && r, i && /* @__PURE__ */ c.createElement(N, {
231
+ }, t && t, i && /* @__PURE__ */ c.createElement(N, {
232
232
  type: "overline"
233
233
  }, i), d && /* @__PURE__ */ c.createElement(N, {
234
234
  type: "display2"
@@ -240,10 +240,10 @@ b.displayName = "HeroContent";
240
240
  b.propTypes = I;
241
241
  b.defaultProps = D;
242
242
  const F = ({
243
- title: t = "",
243
+ title: r = "",
244
244
  subtitle: o = "",
245
- icon: l = "dashbord",
246
- text: a = "",
245
+ icon: a = "dashbord",
246
+ text: l = "",
247
247
  action: n
248
248
  }) => /* @__PURE__ */ m(
249
249
  v,
@@ -254,18 +254,28 @@ const F = ({
254
254
  children: /* @__PURE__ */ m(
255
255
  b,
256
256
  {
257
- logo: /* @__PURE__ */ m(B, { iconSize: "large", icon: l }),
257
+ "data-testid": "empty-view-content",
258
+ logo: /* @__PURE__ */ m(B, { iconSize: "large", icon: a }),
258
259
  overline: "",
259
260
  subtitle: o,
260
- title: t,
261
- heroBtn: /* @__PURE__ */ m(G, { action: n, text: a })
261
+ title: r,
262
+ heroBtn: /* @__PURE__ */ m(G, { action: n, text: l })
262
263
  }
263
264
  )
264
265
  }
265
- ), G = ({ action: t, text: o }) => o ? t ? /* @__PURE__ */ $(_, { direction: "vertical", primaryAlign: "center", secondaryAlign: "center", children: [
266
- /* @__PURE__ */ m(O, { level: 2, children: o }),
267
- t
268
- ] }) : /* @__PURE__ */ m(O, { level: 2, children: o }) : t;
266
+ ), G = ({ action: r, text: o }) => o ? r ? /* @__PURE__ */ $(
267
+ _,
268
+ {
269
+ "data-testid": "empty-view-with-action",
270
+ direction: "vertical",
271
+ primaryAlign: "center",
272
+ secondaryAlign: "center",
273
+ children: [
274
+ /* @__PURE__ */ m(O, { level: 2, children: o }),
275
+ r
276
+ ]
277
+ }
278
+ ) : /* @__PURE__ */ m(O, { level: 2, children: o }) : r;
269
279
  export {
270
280
  F as EmptyView
271
281
  };
@@ -12,6 +12,7 @@ type FilterProps = {
12
12
  filters: FilterData[];
13
13
  useModal?: boolean;
14
14
  selectAllLabel?: string;
15
+ 'data-testid'?: string;
15
16
  };
16
17
  /**
17
18
  * Filter component that allows the user to filter the data provided
@@ -28,5 +29,5 @@ type FilterProps = {
28
29
  * if false the filters will be displayed directly in the page, be aware that the filters will be displayed in a row and there needs to be enough space for them
29
30
  * @returns
30
31
  */
31
- export declare const Filter: ({ clearFilterText, closeCallback, currentFilter, filterButtonAsIcon, filterButtonText, filterModalTitle, filters, modalCancelButtonText, modalConfirmButtonText, useModal, selectAllLabel, }: FilterProps) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const Filter: ({ clearFilterText, closeCallback, currentFilter, filterButtonAsIcon, filterButtonText, filterModalTitle, filters, modalCancelButtonText, modalConfirmButtonText, useModal, selectAllLabel, "data-testid": dataTestId, }: FilterProps) => import("react/jsx-runtime").JSX.Element;
32
33
  export {};