@hortiview/shared-components 0.0.6890 → 0.0.6927

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.
@@ -0,0 +1,99 @@
1
+ import "./assets/ListAreaService.css";
2
+ import { jsx as r, jsxs as N } from "react/jsx-runtime";
3
+ import { TypoButton as b, Group as k, TypoSubtitle as $, TypoBody as L, Icon as O } from "@element/react-components";
4
+ import { Iconify as E } from "./components/Iconify/Iconify.js";
5
+ import { AvailableCustomIcons as j } from "./enums/AvailableCustomIcons.js";
6
+ const W = "_fullWidth_x5yt7_1", G = "_mainElevation_x5yt7_5", S = "_searchbar_x5yt7_11", w = "_roundedBottom_x5yt7_19", A = "_primaryText_x5yt7_24", P = "_list_x5yt7_28", q = "_listItem_x5yt7_56", z = "_trailingIcon_x5yt7_60", D = "_groupedListItem_x5yt7_72", F = "_iconColor_x5yt7_76", H = "_overlineTitle_x5yt7_80", J = "_truncate_x5yt7_85", K = "_truncateOverlineText_x5yt7_94", n = {
7
+ fullWidth: W,
8
+ mainElevation: G,
9
+ searchbar: S,
10
+ roundedBottom: w,
11
+ primaryText: A,
12
+ list: P,
13
+ listItem: q,
14
+ trailingIcon: z,
15
+ groupedListItem: D,
16
+ iconColor: F,
17
+ overlineTitle: H,
18
+ truncate: J,
19
+ truncateOverlineText: K
20
+ }, Z = (e, a, c, l) => {
21
+ const o = e.reduce((i, s) => {
22
+ const { groupName: t, ...m } = s;
23
+ return !t || typeof t != "string" || (i[t] || (i[t] = {
24
+ groupName: /* @__PURE__ */ r(b, { children: t }),
25
+ id: t,
26
+ items: []
27
+ }), i[t].items = [
28
+ ...i[t].items,
29
+ x(m, a, c, l)
30
+ ]), i;
31
+ }, {});
32
+ return Object.values(o);
33
+ }, tt = (e, a, c, l) => e.map((o) => x(o, a, c, l)), x = (e, a, c, l) => {
34
+ const {
35
+ id: o,
36
+ title: i,
37
+ subTitle: s,
38
+ route: t,
39
+ value: m,
40
+ noNavigation: d,
41
+ disabled: _,
42
+ icon: g,
43
+ iconType: p,
44
+ trailingIcon: T,
45
+ trailingIconType: I,
46
+ actionButton: h,
47
+ onClick: f,
48
+ customTitle: y,
49
+ listItemClassName: B,
50
+ overlineTitle: v
51
+ } = e, u = a === t;
52
+ return {
53
+ id: o,
54
+ key: o,
55
+ select: u,
56
+ primaryText: o,
57
+ secondaryText: /* @__PURE__ */ N(k, { direction: "vertical", gap: "none", children: [
58
+ y ?? /* @__PURE__ */ r(
59
+ $,
60
+ {
61
+ level: 1,
62
+ themeColor: u ? "primary" : void 0,
63
+ className: `${n.truncate} lmnt-theme-on-surface-active`,
64
+ children: i
65
+ }
66
+ ),
67
+ s && !y ? /* @__PURE__ */ r(
68
+ L,
69
+ {
70
+ level: 2,
71
+ themeColor: u ? "primary" : void 0,
72
+ className: `${n.truncate} lmnt-theme-on-surface-inactive`,
73
+ children: s
74
+ }
75
+ ) : void 0
76
+ ] }),
77
+ overlineText: /* @__PURE__ */ r("span", { className: `${n.truncate} ${n.truncateOverlineText}`, children: v }),
78
+ trailingBlock: h ?? T ?? /* @__PURE__ */ r(O, { icon: "arrow_right", className: n.iconColor }),
79
+ leadingBlock: M(g),
80
+ value: m,
81
+ componentProps: {
82
+ id: o,
83
+ key: o,
84
+ leadingBlockType: p ?? "icon",
85
+ trailingBlockType: I ?? "icon",
86
+ className: `${p === "avatar" ? "" : n.listItem} ${c} ${B ?? ""} ${v ? n.overlineTitle : ""}`,
87
+ onClick: (Q, C) => f?.(C),
88
+ tag: _ || d ? void 0 : l ?? "a",
89
+ to: _ || d ? void 0 : t,
90
+ disabled: _
91
+ }
92
+ };
93
+ }, M = (e) => typeof e == "string" && e in j ? /* @__PURE__ */ r(E, { icon: e }) : e;
94
+ export {
95
+ tt as a,
96
+ Z as g,
97
+ x as m,
98
+ n as s
99
+ };
@@ -1 +1 @@
1
- ._divider_12ecr_1{margin:0 2rem}._truncate_12ecr_5{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55vw}
1
+ ._divider_1513z_1{margin:0 2rem}._truncate_1513z_5{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55vw}._desktopList_1513z_13{width:30%}._mobileList_1513z_17{width:100%}._desktopDetail_1513z_21{width:70%}._mobileDetail_1513z_25{width:100%}
@@ -1 +1 @@
1
- ._pageHeader_fwns1_1{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;width:100%;margin-bottom:1rem;align-self:end}._headlineContainer_fwns1_11,._actionButtonContainer_fwns1_16{display:flex;align-items:center}._actionButtonContainer_fwns1_16>button{max-height:48px}._content_fwns1_25{display:flex;justify-content:space-between;gap:1.5rem}._leadingIcon_fwns1_31{margin-right:.8rem}._headingWrapper_fwns1_38{display:flex;align-items:center}._headingContainer_fwns1_43{display:flex;flex-direction:column}._invisible_fwns1_48{visibility:hidden}._withAvatar_fwns1_52{margin-left:.25rem;padding-right:1rem;margin-top:0rem}._withAvatar_fwns1_52>._iconContainer_fwns1_57{scale:1.1}._iconContainer_fwns1_57{padding-right:.5rem}
1
+ ._pageHeader_gwnjc_1{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;width:100%;margin-bottom:1rem;align-self:end}._headlineContainer_gwnjc_11,._actionButtonContainer_gwnjc_16{display:flex;align-items:center}._actionButtonContainer_gwnjc_16>button{max-height:48px}._content_gwnjc_25{display:flex;justify-content:space-between;gap:1.5rem}._leadingIcon_gwnjc_31{margin-right:.8rem}._headingWrapper_gwnjc_35{display:flex;align-items:center}._headingContainer_gwnjc_40{display:flex;flex-direction:column}._invisible_gwnjc_45{visibility:hidden}._withAvatar_gwnjc_49{margin-left:.25rem;padding-right:1rem;margin-top:0rem}._withAvatar_gwnjc_49>._iconContainer_gwnjc_54{scale:1.1}._iconContainer_gwnjc_54{padding-right:.5rem}
@@ -1 +1 @@
1
- ._fullWidth_1l0gd_1{width:100%}._mainElevation_1l0gd_5{background:var(--lmnt-theme-background);border-radius:.5rem;width:100%}._searchbar_1l0gd_11 div{border:none}._searchbar_1l0gd_11 button{margin-right:.5rem}._roundedBottom_1l0gd_19{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}._primaryText_1l0gd_24 [class*=mdc-list-item__primary-text]{display:none!important}._noOverlineText_1l0gd_28 [class*=mdc-list-item__content]{margin-top:-.625rem}._list_1l0gd_32{padding-top:0;padding-bottom:0;overflow-y:auto}._list_1l0gd_32 [class*=mdc-list-item__overline-text]{margin-bottom:-2.25rem}._list_1l0gd_32::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 .25rem rgba(0,0,0,.2);border-radius:.5rem;margin-right:.25rem;background-color:var(--lmnt-theme-background)}._list_1l0gd_32::-webkit-scrollbar{width:.5rem;background-color:var(--lmnt-theme-background)}._list_1l0gd_32::-webkit-scrollbar-thumb{border-radius:.5rem;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:var(--lmnt-theme-primary-on-surface)}._listItem_1l0gd_60{border-bottom:.0775rem solid var(--lmnt-utility-gray-surface)}._listItem_1l0gd_60 i:not(._trailingIcon_1l0gd_64){color:var(--lmnt-theme-on-surface-inactive)}._listItem_1l0gd_60 i._trailingIcon_1l0gd_64{color:var(--lmnt-theme-on-surface-disabled)}._listItem_1l0gd_60 [class^=mdc-list-item__start]{margin:0 1rem!important;align-self:center!important}._groupedListItem_1l0gd_76{height:4.5rem!important}._iconColor_1l0gd_80{color:var(--lmnt-theme-on-surface-disabled)!important}._overlineTitle_1l0gd_84 [class*=mdc-list-item__overline-text]{color:var(--lmnt-theme-on-surface-inactive)!important;line-height:1rem!important}._truncate_1l0gd_89{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%}._truncateOverlineText_1l0gd_98{margin-bottom:-1rem!important;margin-top:-1rem!important}
1
+ ._fullWidth_x5yt7_1{width:100%}._mainElevation_x5yt7_5{background:var(--lmnt-theme-background);border-radius:.5rem;width:100%}._searchbar_x5yt7_11 div{border:none}._searchbar_x5yt7_11 button{margin-right:.5rem}._roundedBottom_x5yt7_19{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}._primaryText_x5yt7_24 [class*=mdc-list-item__primary-text]{display:none!important}._list_x5yt7_28{padding-top:0;padding-bottom:0;overflow-y:auto}._list_x5yt7_28 [class*=mdc-list-item__overline-text]{margin-bottom:-2.25rem}._list_x5yt7_28::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 .25rem rgba(0,0,0,.2);border-radius:.5rem;margin-right:.25rem;background-color:var(--lmnt-theme-background)}._list_x5yt7_28::-webkit-scrollbar{width:.5rem;background-color:var(--lmnt-theme-background)}._list_x5yt7_28::-webkit-scrollbar-thumb{border-radius:.5rem;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:var(--lmnt-theme-primary-on-surface)}._listItem_x5yt7_56{border-bottom:.0775rem solid var(--lmnt-utility-gray-surface)}._listItem_x5yt7_56 i:not(._trailingIcon_x5yt7_60){color:var(--lmnt-theme-on-surface-inactive)}._listItem_x5yt7_56 i._trailingIcon_x5yt7_60{color:var(--lmnt-theme-on-surface-disabled)}._listItem_x5yt7_56 [class^=mdc-list-item__start]{margin:0 1rem!important;align-self:center!important}._groupedListItem_x5yt7_72{height:4.5rem!important}._iconColor_x5yt7_76{color:var(--lmnt-theme-on-surface-disabled)!important}._overlineTitle_x5yt7_80 [class*=mdc-list-item__overline-text]{color:var(--lmnt-theme-on-surface-inactive)!important;line-height:1rem!important}._truncate_x5yt7_85{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%}._truncateOverlineText_x5yt7_94{margin-bottom:-1rem!important;margin-top:-1rem!important}
@@ -1,7 +1,7 @@
1
1
  import "../../assets/AlertBanner.css";
2
2
  import { jsx as e, Fragment as c, jsxs as a } from "react/jsx-runtime";
3
3
  import { Group as p, TypoBody as l } from "@element/react-components";
4
- import { u as m } from "../../useBreakpoint-2MH8ICuE.js";
4
+ import { u as m } from "../../useBreakpoint-BNeVhjjZ.js";
5
5
  const d = "_messageContainer_1kpsp_1", _ = "_info_1kpsp_9", g = "_danger_1kpsp_14", u = "_success_1kpsp_19", n = {
6
6
  messageContainer: d,
7
7
  info: _,
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, Fragment as m } from "react/jsx-runtime";
2
2
  import { a as t, s } from "../../react.esm-DoZanrUz.js";
3
- import { a as l } from "../../useBreakpoint-2MH8ICuE.js";
3
+ import { a as l } from "../../useBreakpoint-BNeVhjjZ.js";
4
4
  import { AlertBanner as n } from "./AlertBanner.js";
5
5
  import { d as c, b as p, t as r, g as o, v as a } from "../../vi.JYQecGiw-BbUbJcT8.js";
6
6
  c("AlertBanner Test", () => {
@@ -1,67 +1,71 @@
1
1
  import "../../assets/BaseView.css";
2
- import { jsx as e, Fragment as w, jsxs as i } from "react/jsx-runtime";
3
- import { Grid as x, GridRow as A, GridCol as a, Group as u } from "@element/react-components";
4
- import { useMemo as l } from "react";
5
- import { BasicHeading as m } from "../BasicHeading/BasicHeading.js";
6
- import { EmptyView as D } from "../EmptyView/EmptyView.js";
7
- import { ListArea as H } from "../ListArea/ListArea.js";
8
- import { VerticalDivider as N } from "../VerticalDivider/VerticalDivider.js";
9
- import { u as V } from "../../useBreakpoint-2MH8ICuE.js";
10
- const W = "_divider_12ecr_1", j = "_truncate_12ecr_5", p = {
11
- divider: W,
12
- truncate: j
13
- }, J = ({
2
+ import { jsx as i, Fragment as z, jsxs as s } from "react/jsx-runtime";
3
+ import { Group as r } from "@element/react-components";
4
+ import { useMemo as n } from "react";
5
+ import { BasicHeading as u } from "../BasicHeading/BasicHeading.js";
6
+ import { EmptyView as B } from "../EmptyView/EmptyView.js";
7
+ import { ListArea as N } from "../ListArea/ListArea.js";
8
+ import { VerticalDivider as x } from "../VerticalDivider/VerticalDivider.js";
9
+ import { u as A } from "../../useBreakpoint-BNeVhjjZ.js";
10
+ const V = "_divider_1513z_1", W = "_truncate_1513z_5", j = "_desktopList_1513z_13", E = "_mobileList_1513z_17", H = "_desktopDetail_1513z_21", I = "_mobileDetail_1513z_25", o = {
11
+ divider: V,
12
+ truncate: W,
13
+ desktopList: j,
14
+ mobileList: E,
15
+ desktopDetail: H,
16
+ mobileDetail: I
17
+ }, Q = ({
14
18
  action: c,
15
19
  heading: d,
16
- elements: o,
17
- emptyText: s,
18
- hasSearch: h = !0,
19
- isSorted: f = !0,
20
+ elements: l,
21
+ emptyText: m,
22
+ hasSearch: p = !0,
23
+ isSorted: _ = !0,
20
24
  className: v,
21
- withAvatar: g = !1,
22
- listMaxHeight: C = "calc(100vh - 200px)",
23
- pathname: n,
24
- routerLinkElement: B,
25
- searchPlaceholder: _
25
+ withAvatar: f = !1,
26
+ listMaxHeight: h = "calc(100vh - 200px)",
27
+ pathname: a,
28
+ routerLinkElement: D,
29
+ searchPlaceholder: b
26
30
  }) => {
27
- const { isDesktop: r } = V(), t = l(() => o.find((k) => k.route === n), [n, o]), G = l(() => t?.component ?? (r ? /* @__PURE__ */ e(D, { subtitle: s }) : /* @__PURE__ */ e(w, {})), [t, r, s]), b = l(() => r ? !0 : !t, [t, r]);
28
- return /* @__PURE__ */ e(x, { className: v ?? "", fullHeight: !0, fullWidth: !0, columnGap: 0, children: /* @__PURE__ */ i(A, { children: [
29
- b && /* @__PURE__ */ e(a, { desktopCol: 3, tabletCol: 12, phoneCol: 12, children: /* @__PURE__ */ i(u, { direction: "vertical", fullWidth: !0, gap: r ? "standard" : "dense", children: [
30
- d && /* @__PURE__ */ e(m, { heading: d, level: 4, marginBottom: 0, children: c }),
31
- /* @__PURE__ */ e(
32
- H,
31
+ const { isDesktopNavbar: e } = A(), t = n(() => l.find((w) => w.route === a), [a, l]), g = n(() => t?.component ?? (e ? /* @__PURE__ */ i(B, { subtitle: m }) : /* @__PURE__ */ i(z, {})), [t, e, m]), k = n(() => e ? !0 : !t, [t, e]), L = n(() => e ? !0 : t, [t, e]);
32
+ return /* @__PURE__ */ s(r, { className: v ?? "", gap: "", fullWidth: !0, children: [
33
+ k && /* @__PURE__ */ i(r, { gap: "none", className: e ? o.desktopList : o.mobileList, children: /* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, gap: e ? "standard" : "dense", children: [
34
+ d && /* @__PURE__ */ i(u, { heading: d, level: 4, marginBottom: 0, children: c }),
35
+ /* @__PURE__ */ i(
36
+ N,
33
37
  {
34
- elements: o,
35
- hasSearch: h,
36
- maxHeight: C,
37
- isSorted: f,
38
- pathname: n,
39
- routerLinkElement: B,
40
- searchPlaceholder: _
38
+ elements: l,
39
+ hasSearch: p,
40
+ maxHeight: h,
41
+ isSorted: _,
42
+ pathname: a,
43
+ routerLinkElement: D,
44
+ searchPlaceholder: b
41
45
  }
42
46
  )
43
47
  ] }) }),
44
- /* @__PURE__ */ i(a, { desktopCol: 9, tabletCol: 12, phoneCol: 12, children: [
45
- r && /* @__PURE__ */ e(N, { className: p.divider, height: "100%" }),
46
- /* @__PURE__ */ i(u, { direction: "vertical", fullWidth: !0, children: [
47
- /* @__PURE__ */ e(
48
- m,
48
+ L && /* @__PURE__ */ s(r, { gap: "none", className: e ? o.desktopDetail : o.mobileDetail, children: [
49
+ e && /* @__PURE__ */ i(x, { className: o.divider, height: "100%" }),
50
+ /* @__PURE__ */ s(r, { direction: "vertical", fullWidth: !0, children: [
51
+ /* @__PURE__ */ i(
52
+ u,
49
53
  {
50
- className: p.truncate,
54
+ className: o.truncate,
51
55
  heading: t?.detailTitle ?? t?.title ?? "",
52
56
  level: 4,
53
57
  icon: t?.hideIconInDetail === !0 ? void 0 : t?.icon,
54
58
  marginBottom: 0,
55
59
  invisibleButton: t?.detailAction === void 0,
56
- withAvatar: g,
60
+ withAvatar: f,
57
61
  children: t?.detailAction ?? c
58
62
  }
59
63
  ),
60
- G
64
+ g
61
65
  ] })
62
66
  ] })
63
- ] }) });
67
+ ] });
64
68
  };
65
69
  export {
66
- J as BaseView
70
+ Q as BaseView
67
71
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, Fragment as s } from "react/jsx-runtime";
2
2
  import { a as r, s as e, f as p } from "../../react.esm-DoZanrUz.js";
3
- import { a as l } from "../../useBreakpoint-2MH8ICuE.js";
3
+ import { a as l } from "../../useBreakpoint-BNeVhjjZ.js";
4
4
  import { BaseView as i } from "./BaseView.js";
5
5
  import { d as u, b as m, t as n, g as t, v as c } from "../../vi.JYQecGiw-BbUbJcT8.js";
6
6
  u("BaseView Test", () => {
@@ -8,7 +8,8 @@ u("BaseView Test", () => {
8
8
  c.spyOn(l, "useBreakpoints").mockReturnValue({
9
9
  isMobile: !1,
10
10
  isTablet: !1,
11
- isDesktop: !0
11
+ isDesktop: !1,
12
+ isDesktopNavbar: !0
12
13
  });
13
14
  });
14
15
  const o = [
@@ -85,7 +86,8 @@ u("BaseView Test", () => {
85
86
  c.spyOn(l, "useBreakpoints").mockReturnValue({
86
87
  isMobile: !0,
87
88
  isTablet: !1,
88
- isDesktop: !1
89
+ isDesktop: !1,
90
+ isDesktopNavbar: !1
89
91
  }), r(
90
92
  /* @__PURE__ */ a(
91
93
  i,
@@ -2,21 +2,21 @@ import "../../assets/BasicHeading.css";
2
2
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
3
3
  import { TypoDisplay as C, TypoBody as w, Icon as u } from "@element/react-components";
4
4
  import { Iconify as y } from "../Iconify/Iconify.js";
5
- import { AvailableCustomIcons as I } from "../../enums/AvailableCustomIcons.js";
6
- import { u as B } from "../../useBreakpoint-2MH8ICuE.js";
7
- import { OverflowTooltip as N } from "../OverflowTooltip/OverflowTooltip.js";
8
- const H = "_pageHeader_fwns1_1", b = "_headlineContainer_fwns1_11", x = "_actionButtonContainer_fwns1_16", A = "_content_fwns1_25", T = "_leadingIcon_fwns1_31", W = "_headingWrapper_fwns1_38", $ = "_headingContainer_fwns1_43", j = "_invisible_fwns1_48", k = "_withAvatar_fwns1_52", z = "_iconContainer_fwns1_57", n = {
9
- pageHeader: H,
10
- headlineContainer: b,
11
- actionButtonContainer: x,
12
- content: A,
13
- leadingIcon: T,
14
- headingWrapper: W,
15
- headingContainer: $,
16
- invisible: j,
5
+ import { AvailableCustomIcons as j } from "../../enums/AvailableCustomIcons.js";
6
+ import { u as I } from "../../useBreakpoint-BNeVhjjZ.js";
7
+ import { OverflowTooltip as B } from "../OverflowTooltip/OverflowTooltip.js";
8
+ const N = "_pageHeader_gwnjc_1", H = "_headlineContainer_gwnjc_11", b = "_actionButtonContainer_gwnjc_16", x = "_content_gwnjc_25", A = "_leadingIcon_gwnjc_31", T = "_headingWrapper_gwnjc_35", W = "_headingContainer_gwnjc_40", $ = "_invisible_gwnjc_45", k = "_withAvatar_gwnjc_49", z = "_iconContainer_gwnjc_54", n = {
9
+ pageHeader: N,
10
+ headlineContainer: H,
11
+ actionButtonContainer: b,
12
+ content: x,
13
+ leadingIcon: A,
14
+ headingWrapper: T,
15
+ headingContainer: W,
16
+ invisible: $,
17
17
  withAvatar: k,
18
18
  iconContainer: z
19
- }, D = ({ icon: e }) => e ? typeof e != "string" ? /* @__PURE__ */ t("div", { className: n.iconContainer, children: e }) : e in I ? /* @__PURE__ */ t(
19
+ }, D = ({ icon: e }) => e ? typeof e != "string" ? /* @__PURE__ */ t("div", { className: n.iconContainer, children: e }) : e in j ? /* @__PURE__ */ t(
20
20
  y,
21
21
  {
22
22
  icon: e,
@@ -31,13 +31,13 @@ const H = "_pageHeader_fwns1_1", b = "_headlineContainer_fwns1_11", x = "_action
31
31
  icon: d,
32
32
  className: p,
33
33
  subHeading: r,
34
- subHeadingLevel: _ = 2,
35
- invisibleButton: f = !1,
36
- level: s = 4,
37
- fontWeight: c = 400,
34
+ subHeadingLevel: g = 2,
35
+ invisibleButton: _ = !1,
36
+ level: c = 4,
37
+ fontWeight: s = 400,
38
38
  withAvatar: m = !1
39
39
  }) => {
40
- const { isDesktop: l } = B(), h = l ? s : s + 1, g = c === "bold" ? 500 : c, v = () => {
40
+ const { isDesktop: l } = I(), h = l ? c : c + 1, f = s === "bold" ? 500 : s, v = () => {
41
41
  if (i !== void 0)
42
42
  return typeof i == "number" ? `${i}px` : "2rem";
43
43
  };
@@ -55,17 +55,17 @@ const H = "_pageHeader_fwns1_1", b = "_headlineContainer_fwns1_11", x = "_action
55
55
  children: [
56
56
  /* @__PURE__ */ t(D, { icon: d }),
57
57
  /* @__PURE__ */ o("div", { className: r ? n.headingContainer : "", children: [
58
- /* @__PURE__ */ t(N, { id: a, text: a, children: /* @__PURE__ */ t(
58
+ /* @__PURE__ */ t(B, { id: a, text: a, children: /* @__PURE__ */ t(
59
59
  C,
60
60
  {
61
61
  level: h,
62
62
  "data-testid": "Header",
63
63
  className: p ?? "",
64
- style: { fontWeight: g },
64
+ style: { fontWeight: f },
65
65
  children: a
66
66
  }
67
67
  ) }),
68
- /* @__PURE__ */ t(w, { level: _, children: r })
68
+ /* @__PURE__ */ t(w, { level: g, children: r })
69
69
  ] })
70
70
  ]
71
71
  }
@@ -73,7 +73,7 @@ const H = "_pageHeader_fwns1_1", b = "_headlineContainer_fwns1_11", x = "_action
73
73
  /* @__PURE__ */ t(
74
74
  "div",
75
75
  {
76
- className: `${n.actionButtonContainer} ${f && n.invisible}`,
76
+ className: `${n.actionButtonContainer} ${_ && n.invisible}`,
77
77
  "data-testid": "RightPart",
78
78
  children: e
79
79
  }
@@ -2,7 +2,7 @@ import "../../assets/HashTabView.css";
2
2
  import { jsx as a, jsxs as d, Fragment as T } from "react/jsx-runtime";
3
3
  import { Elevation as C, Group as i, TabBar as k, Tab as A, Padding as I } from "@element/react-components";
4
4
  import { useState as N, useEffect as P } from "react";
5
- import { u as x } from "../../useBreakpoint-2MH8ICuE.js";
5
+ import { u as x } from "../../useBreakpoint-BNeVhjjZ.js";
6
6
  const y = "_elevation_16c7u_1", W = "_themeBackground_16c7u_6", $ = "_tabBar_16c7u_10", w = "_tabWrapper_16c7u_16", j = "_tabButton_16c7u_20", E = "_childContainer_16c7u_24", z = "_childContainerPhone_16c7u_28", t = {
7
7
  elevation: y,
8
8
  themeBackground: W,
@@ -2,7 +2,7 @@ import "../../assets/InfoGroup.css";
2
2
  import { jsxs as c, jsx as e, Fragment as _ } from "react/jsx-runtime";
3
3
  import { Divider as d, Group as s, TypoCaption as v, TypoSubtitle as h } from "@element/react-components";
4
4
  import { Fragment as p } from "react";
5
- import { u as g } from "../../useBreakpoint-2MH8ICuE.js";
5
+ import { u as g } from "../../useBreakpoint-BNeVhjjZ.js";
6
6
  import { VerticalDivider as b } from "../VerticalDivider/VerticalDivider.js";
7
7
  const f = "_container_egebs_1", C = "_dividerContainer_egebs_10", y = "_mainGroup_egebs_16", w = "_row_egebs_21", G = "_valueText_egebs_46", N = "_component_egebs_54", x = "_componentContainer_egebs_87", A = "_field_egebs_95", r = {
8
8
  container: f,
@@ -4,7 +4,7 @@ import { g as Hr } from "../../_commonjsHelpers-CT_km90n.js";
4
4
  import { _ as H, a as Tr, b as wr, c as w, d as Nr, e as Wr, f as h, h as N, j as B, k as Xr, l as zr, m as I, n as Yr, o as Zr, p as Jr, q as W, r as Qr, s as Or, t as Pr, u as kr, v as Vr } from "../../get-BRDhkfK0.js";
5
5
  import { useState as re, useMemo as k } from "react";
6
6
  import { SearchBar as ee } from "../SearchBar/SearchBar.js";
7
- import { g as ae, a as te, s as T } from "../../ListAreaService-DDlsV9UD.js";
7
+ import { g as ae, a as te, s as T } from "../../ListAreaService-CiewPvfR.js";
8
8
  var ne = H;
9
9
  function se() {
10
10
  this.__data__ = new ne(), this.size = 0;
@@ -2,7 +2,7 @@ import { jsx as r, Fragment as i } from "react/jsx-runtime";
2
2
  import { TypoButton as p } from "@element/react-components";
3
3
  import { a as s, s as a, f as u } from "../../react.esm-DoZanrUz.js";
4
4
  import { ListArea as c } from "./ListArea.js";
5
- import { g as h } from "../../ListAreaService-DDlsV9UD.js";
5
+ import { g as h } from "../../ListAreaService-CiewPvfR.js";
6
6
  import { d as m, t as n, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
7
7
  m("ListArea Test", () => {
8
8
  const o = [
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "@element/react-components";
3
3
  import "../Iconify/Iconify.js";
4
4
  import "../../enums/AvailableCustomIcons.js";
5
- import { g as s, a as i, m as a } from "../../ListAreaService-DDlsV9UD.js";
5
+ import { g as s, a as i, m as a } from "../../ListAreaService-CiewPvfR.js";
6
6
  export {
7
7
  s as getGroupedItems,
8
8
  i as getListedItems,
@@ -7,14 +7,21 @@
7
7
  * - xl: 1024-1439px
8
8
  * - xxl: 1440px and up
9
9
  *
10
+ * Additional breakpoints considering the navbar width
11
+ * - lg-nav: (840 + 256) - (1023 + 256)px
12
+ * - xl-nav: (1024 + 256) - (1439 + 256)px
13
+ * - xxl-nav: (1440 + 256)px and up
14
+ *
10
15
  * They are combined as follows:
11
16
  * - isMobile: xs
12
17
  * - isTablet: sm, md
13
18
  * - isDesktop: lg, xl, xxl
19
+ * - isDesktopNavbar: lg-nav, xl-nav, xxl-nav
14
20
  * @returns {Object} An object with the current breakpoint
15
21
  */
16
- export declare const useBreakpoints: () => {
22
+ export declare const useBreakpoints: (navBarWidth?: number) => {
17
23
  isMobile: boolean;
18
24
  isTablet: boolean;
19
25
  isDesktop: boolean;
26
+ isDesktopNavbar: boolean;
20
27
  };
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { u as p } from "../useBreakpoint-2MH8ICuE.js";
2
+ import { u as p } from "../useBreakpoint-BNeVhjjZ.js";
3
3
  export {
4
4
  p as useBreakpoints
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { r as t, w as s } from "../react.esm-DoZanrUz.js";
2
- import { u as o } from "../useBreakpoint-2MH8ICuE.js";
2
+ import { u as o } from "../useBreakpoint-BNeVhjjZ.js";
3
3
  import { d as a, t as i, g as r } from "../vi.JYQecGiw-BbUbJcT8.js";
4
4
  a("useBreakpoint Test", () => {
5
5
  i("returns object", () => {
package/dist/main.js CHANGED
@@ -24,7 +24,7 @@ import { FormSelect as N } from "./components/FormComponents/FormSelect/FormSele
24
24
  import { FormSlider as Q } from "./components/FormComponents/FormSlider/FormSlider.js";
25
25
  import { FormText as W } from "./components/FormComponents/FormText/FormText.js";
26
26
  import { AvailableCustomIcons as _ } from "./enums/AvailableCustomIcons.js";
27
- import { u as rr } from "./useBreakpoint-2MH8ICuE.js";
27
+ import { u as rr } from "./useBreakpoint-BNeVhjjZ.js";
28
28
  import { capitalizeFirstLetters as er } from "./services/UtilService.js";
29
29
  export {
30
30
  t as AlertBanner,
@@ -0,0 +1,33 @@
1
+ import { useState as p, useEffect as r } from "react";
2
+ const t = (s) => {
3
+ const [a, i] = p(!1);
4
+ return r(
5
+ () => {
6
+ const e = window.matchMedia(s);
7
+ i(e.matches);
8
+ const n = (o) => i(o.matches);
9
+ return e.addEventListener("change", n), () => e.removeEventListener("change", n);
10
+ },
11
+ []
12
+ // Empty array ensures effect is only run on mount and unmount
13
+ ), a;
14
+ }, h = (s = 256) => {
15
+ const a = t("(max-width: 599px)"), i = t("(min-width: 600px) and (max-width: 719px)"), e = t("(min-width: 720px) and (max-width: 839px)"), n = t("(min-width: 840px) and (max-width: 1023px)"), o = t("(min-width: 1024px) and (max-width: 1439px)"), d = t("(min-width: 1440px)"), c = t(
16
+ `(min-width: ${840 + s}px) and (max-width: ${1023 + s}px)`
17
+ ), x = t(
18
+ `(min-width: ${1024 + s}px) and (max-width: ${1439 + s}px)`
19
+ ), m = t(`(min-width: ${1440 + s}px)`);
20
+ return {
21
+ isMobile: a,
22
+ isTablet: i || e,
23
+ isDesktop: n || o || d,
24
+ isDesktopNavbar: c || x || m
25
+ };
26
+ }, u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
27
+ __proto__: null,
28
+ useBreakpoints: h
29
+ }, Symbol.toStringTag, { value: "Module" }));
30
+ export {
31
+ u as a,
32
+ h as u
33
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hortiview/shared-components",
3
3
  "description": "This is a shared component library. It should used in the HortiView platform and its modules.",
4
- "version": "0.0.6890",
4
+ "version": "0.0.6927",
5
5
  "type": "module",
6
6
  "repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
7
7
  "author": "Falk Menge <falk.menge.ext@bayer.com>",
@@ -1,100 +0,0 @@
1
- import "./assets/ListAreaService.css";
2
- import { jsx as r, jsxs as C } from "react/jsx-runtime";
3
- import { TypoButton as N, Group as O, TypoSubtitle as k, TypoBody as $, Icon as L } from "@element/react-components";
4
- import { Iconify as E } from "./components/Iconify/Iconify.js";
5
- import { AvailableCustomIcons as j } from "./enums/AvailableCustomIcons.js";
6
- const W = "_fullWidth_1l0gd_1", G = "_mainElevation_1l0gd_5", S = "_searchbar_1l0gd_11", w = "_roundedBottom_1l0gd_19", A = "_primaryText_1l0gd_24", P = "_noOverlineText_1l0gd_28", q = "_list_1l0gd_32", z = "_listItem_1l0gd_60", D = "_trailingIcon_1l0gd_64", F = "_groupedListItem_1l0gd_76", H = "_iconColor_1l0gd_80", J = "_overlineTitle_1l0gd_84", K = "_truncate_1l0gd_89", M = "_truncateOverlineText_1l0gd_98", i = {
7
- fullWidth: W,
8
- mainElevation: G,
9
- searchbar: S,
10
- roundedBottom: w,
11
- primaryText: A,
12
- noOverlineText: P,
13
- list: q,
14
- listItem: z,
15
- trailingIcon: D,
16
- groupedListItem: F,
17
- iconColor: H,
18
- overlineTitle: J,
19
- truncate: K,
20
- truncateOverlineText: M
21
- }, tt = (e, l, c, a) => {
22
- const o = e.reduce((n, s) => {
23
- const { groupName: t, ...m } = s;
24
- return !t || typeof t != "string" || (n[t] || (n[t] = {
25
- groupName: /* @__PURE__ */ r(N, { children: t }),
26
- id: t,
27
- items: []
28
- }), n[t].items = [
29
- ...n[t].items,
30
- T(m, l, c, a)
31
- ]), n;
32
- }, {});
33
- return Object.values(o);
34
- }, et = (e, l, c, a) => e.map((o) => T(o, l, c, a)), T = (e, l, c, a) => {
35
- const {
36
- id: o,
37
- title: n,
38
- subTitle: s,
39
- route: t,
40
- value: m,
41
- noNavigation: g,
42
- disabled: d,
43
- icon: y,
44
- iconType: u,
45
- trailingIcon: I,
46
- trailingIconType: x,
47
- actionButton: f,
48
- onClick: h,
49
- customTitle: p,
50
- listItemClassName: B,
51
- overlineTitle: v
52
- } = e, _ = l === t;
53
- return {
54
- id: o,
55
- key: o,
56
- select: _,
57
- primaryText: o,
58
- secondaryText: /* @__PURE__ */ C(O, { direction: "vertical", gap: "none", children: [
59
- p ?? /* @__PURE__ */ r(
60
- k,
61
- {
62
- level: 1,
63
- bold: _,
64
- className: `${i.truncate} lmnt-theme-on-surface-active`,
65
- children: n
66
- }
67
- ),
68
- s && !p ? /* @__PURE__ */ r(
69
- $,
70
- {
71
- level: 2,
72
- themeColor: _ ? "primary" : void 0,
73
- className: `${i.truncate} lmnt-theme-on-surface-inactive`,
74
- children: s
75
- }
76
- ) : void 0
77
- ] }),
78
- overlineText: /* @__PURE__ */ r("span", { className: `${i.truncate} ${i.truncateOverlineText}`, children: v }),
79
- trailingBlock: f ?? I ?? /* @__PURE__ */ r(L, { icon: "arrow_right", className: i.iconColor }),
80
- leadingBlock: Q(y),
81
- value: m,
82
- componentProps: {
83
- id: o,
84
- key: o,
85
- leadingBlockType: u ?? "icon",
86
- trailingBlockType: x ?? "icon",
87
- className: `${u === "avatar" ? "" : i.listItem} ${c} ${B ?? ""} ${v ? i.overlineTitle : i.noOverlineText}`,
88
- onClick: (R, b) => h?.(b),
89
- tag: d || g ? void 0 : a ?? "a",
90
- to: d || g ? void 0 : t,
91
- disabled: d
92
- }
93
- };
94
- }, Q = (e) => typeof e == "string" && e in j ? /* @__PURE__ */ r(E, { icon: e }) : e;
95
- export {
96
- et as a,
97
- tt as g,
98
- T as m,
99
- i as s
100
- };
@@ -1,28 +0,0 @@
1
- import { useState as d, useEffect as c } from "react";
2
- const t = (i) => {
3
- const [a, s] = d(!1);
4
- return c(
5
- () => {
6
- const e = window.matchMedia(i);
7
- s(e.matches);
8
- const n = (o) => s(o.matches);
9
- return e.addEventListener("change", n), () => e.removeEventListener("change", n);
10
- },
11
- []
12
- // Empty array ensures effect is only run on mount and unmount
13
- ), a;
14
- }, r = () => {
15
- const i = t("(max-width: 599px)"), a = t("(min-width: 600px) and (max-width: 719px)"), s = t("(min-width: 720px) and (max-width: 839px)"), e = t("(min-width: 840px) and (max-width: 1023px)"), n = t("(min-width: 1024px) and (max-width: 1439px)"), o = t("(min-width: 1440px)");
16
- return {
17
- isMobile: i,
18
- isTablet: a || s,
19
- isDesktop: e || n || o
20
- };
21
- }, m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22
- __proto__: null,
23
- useBreakpoints: r
24
- }, Symbol.toStringTag, { value: "Module" }));
25
- export {
26
- m as a,
27
- r as u
28
- };