@hortiview/shared-components 0.0.6403 → 0.0.6829

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,100 @@
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 +1 @@
1
- ._divider_anyyu_1{margin:0 2rem}
1
+ ._divider_12ecr_1{margin:0 2rem}._truncate_12ecr_5{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55vw}
@@ -1 +1 @@
1
- ._fullWidth_9hcwy_1{width:100%}._mainElevation_9hcwy_5{background:var(--lmnt-theme-background);border-radius:.5rem;width:100%}._searchbar_9hcwy_11 div{border:none}._searchbar_9hcwy_11 button{margin-right:.5rem}._roundedBottom_9hcwy_19{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}._primaryText_9hcwy_24 [class*=mdc-list-item__primary-text]{display:none!important}._noOverlineText_9hcwy_28 [class*=mdc-list-item__content]{margin-top:-.625rem}._list_9hcwy_32{padding-top:0;padding-bottom:0;overflow-y:auto}._list_9hcwy_32 [class*=mdc-list-item__overline-text]{margin-bottom:-2.25rem}._list_9hcwy_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_9hcwy_32::-webkit-scrollbar{width:.5rem;background-color:var(--lmnt-theme-background)}._list_9hcwy_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_9hcwy_60{border-bottom:.0775rem solid var(--lmnt-utility-gray-surface)}._listItem_9hcwy_60 i:not(._trailingIcon_9hcwy_64){color:var(--lmnt-theme-on-surface-inactive)}._listItem_9hcwy_60 i._trailingIcon_9hcwy_64{color:var(--lmnt-theme-on-surface-disabled)}._listItem_9hcwy_60 [class^=mdc-list-item__start]{margin:0 1rem!important;align-self:center!important}._groupedListItem_9hcwy_76{height:4.5rem!important}._iconColor_9hcwy_80{color:var(--lmnt-theme-on-surface-disabled)!important}._overlineTitle_9hcwy_84 [class*=mdc-list-item__overline-text]{color:var(--lmnt-theme-on-surface-inactive)!important;line-height:1rem!important}
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,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { LinkProps } from '../../types/internal/ReactRouterTypes';
3
2
  import { BaseListElement } from '../../types/ListElement';
3
+ import { LinkProps } from '../../types/internal/ReactRouterTypes';
4
4
  type BaseViewProps = {
5
5
  /**
6
6
  * elements to be displayed in the list area
@@ -1,65 +1,67 @@
1
1
  import "../../assets/BaseView.css";
2
- import { jsx as t, Fragment as k, jsxs as e } from "react/jsx-runtime";
3
- import { useMemo as n } from "react";
4
- import { EmptyView as y } from "../EmptyView/EmptyView.js";
5
- import { ListArea as A } from "../ListArea/ListArea.js";
6
- import { VerticalDivider as H } from "../VerticalDivider/VerticalDivider.js";
7
- import { a as L } from "../../useBreakpoint-DROHPVxO.js";
8
- import { Grid as V, GridRow as W, GridCol as a, Group as m } from "@element/react-components";
9
- import { BasicHeading as u } from "../BasicHeading/BasicHeading.js";
10
- const _ = "_divider_anyyu_1", j = {
11
- divider: _
12
- }, z = ({
13
- action: d,
14
- heading: c,
2
+ import { jsx as e, Fragment as k, jsxs as i } from "react/jsx-runtime";
3
+ import { Grid as A, GridRow as H, 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 L } from "../EmptyView/EmptyView.js";
7
+ import { ListArea as N } from "../ListArea/ListArea.js";
8
+ import { VerticalDivider as V } from "../VerticalDivider/VerticalDivider.js";
9
+ import { a as W } from "../../useBreakpoint-DROHPVxO.js";
10
+ const j = "_divider_12ecr_1", D = "_truncate_12ecr_5", p = {
11
+ divider: j,
12
+ truncate: D
13
+ }, J = ({
14
+ action: c,
15
+ heading: d,
15
16
  elements: o,
16
17
  emptyText: s,
17
- hasSearch: p = !0,
18
- isSorted: h = !0,
19
- className: f,
20
- withAvatar: v = !1,
21
- listMaxHeight: g = "calc(100vh - 200px)",
22
- pathname: l,
23
- routerLinkElement: C,
24
- searchPlaceholder: B
18
+ hasSearch: h = !0,
19
+ isSorted: f = !0,
20
+ className: v,
21
+ withAvatar: g = !1,
22
+ listMaxHeight: C = "calc(100vh - 200px)",
23
+ pathname: n,
24
+ routerLinkElement: B,
25
+ searchPlaceholder: _
25
26
  }) => {
26
- const { isLg: r, isXs: G } = L(), i = n(() => o.find((x) => x.route === l), [l, o]), b = n(() => i?.component ?? (r ? /* @__PURE__ */ t(y, { subtitle: s }) : /* @__PURE__ */ t(k, {})), [i, r, s]), w = n(() => r ? !0 : !i, [i, r]);
27
- return /* @__PURE__ */ t(V, { className: f ?? "", fullHeight: !0, fullWidth: !0, columnGap: 0, children: /* @__PURE__ */ e(W, { children: [
28
- w && /* @__PURE__ */ e(a, { desktopCol: 4, tabletCol: 12, phoneCol: 12, children: [
29
- /* @__PURE__ */ e(m, { direction: "vertical", fullWidth: !0, gap: G ? "dense" : "standard", children: [
30
- c && /* @__PURE__ */ t(u, { heading: c, level: 4, marginBottom: 0, children: d }),
31
- /* @__PURE__ */ t(
32
- A,
33
- {
34
- elements: o,
35
- hasSearch: p,
36
- maxHeight: g,
37
- isSorted: h,
38
- pathname: l,
39
- routerLinkElement: C,
40
- searchPlaceholder: B
41
- }
42
- )
43
- ] }),
44
- r && /* @__PURE__ */ t(H, { className: j.divider, height: "100%" })
45
- ] }),
46
- /* @__PURE__ */ t(a, { desktopCol: 8, tabletCol: 12, phoneCol: 12, children: /* @__PURE__ */ e(m, { direction: "vertical", fullWidth: !0, children: [
47
- /* @__PURE__ */ t(
48
- u,
27
+ const { isLg: r, isXs: G } = W(), t = l(() => o.find((x) => x.route === n), [n, o]), b = l(() => t?.component ?? (r ? /* @__PURE__ */ e(L, { subtitle: s }) : /* @__PURE__ */ e(k, {})), [t, r, s]), w = l(() => r ? !0 : !t, [t, r]);
28
+ return /* @__PURE__ */ e(A, { className: v ?? "", fullHeight: !0, fullWidth: !0, columnGap: 0, children: /* @__PURE__ */ i(H, { children: [
29
+ w && /* @__PURE__ */ e(a, { desktopCol: 3, tabletCol: 12, phoneCol: 12, children: /* @__PURE__ */ i(u, { direction: "vertical", fullWidth: !0, gap: G ? "dense" : "standard", children: [
30
+ d && /* @__PURE__ */ e(m, { heading: d, level: 4, marginBottom: 0, children: c }),
31
+ /* @__PURE__ */ e(
32
+ N,
49
33
  {
50
- heading: i?.detailTitle ?? i?.title ?? "",
51
- level: 4,
52
- icon: i?.hideIconInDetail === !0 ? void 0 : i?.icon,
53
- marginBottom: 0,
54
- invisibleButton: i?.detailAction === void 0,
55
- withAvatar: v,
56
- children: i?.detailAction ?? d
34
+ elements: o,
35
+ hasSearch: h,
36
+ maxHeight: C,
37
+ isSorted: f,
38
+ pathname: n,
39
+ routerLinkElement: B,
40
+ searchPlaceholder: _
57
41
  }
58
- ),
59
- b
60
- ] }) })
42
+ )
43
+ ] }) }),
44
+ /* @__PURE__ */ i(a, { desktopCol: 9, tabletCol: 12, phoneCol: 12, children: [
45
+ r && /* @__PURE__ */ e(V, { className: p.divider, height: "100%" }),
46
+ /* @__PURE__ */ i(u, { direction: "vertical", fullWidth: !0, children: [
47
+ /* @__PURE__ */ e(
48
+ m,
49
+ {
50
+ className: p.truncate,
51
+ heading: t?.detailTitle ?? t?.title ?? "",
52
+ level: 4,
53
+ icon: t?.hideIconInDetail === !0 ? void 0 : t?.icon,
54
+ marginBottom: 0,
55
+ invisibleButton: t?.detailAction === void 0,
56
+ withAvatar: g,
57
+ children: t?.detailAction ?? c
58
+ }
59
+ ),
60
+ b
61
+ ] })
62
+ ] })
61
63
  ] }) });
62
64
  };
63
65
  export {
64
- z as BaseView
66
+ J as BaseView
65
67
  };
@@ -1,66 +1,67 @@
1
1
  import "../../assets/BasicHeading.css";
2
- import { jsxs as t, jsx as i } from "react/jsx-runtime";
2
+ import { jsxs as o, jsx as i } from "react/jsx-runtime";
3
3
  import { TypoDisplay as C, TypoBody as w, Icon as y } from "@element/react-components";
4
- import { a as u } from "../../useBreakpoint-DROHPVxO.js";
5
- import { Iconify as I } from "../Iconify/Iconify.js";
6
- import { AvailableCustomIcons as B } from "../../enums/AvailableCustomIcons.js";
7
- const N = "_pageHeader_fwns1_1", H = "_headlineContainer_fwns1_11", b = "_actionButtonContainer_fwns1_16", A = "_content_fwns1_25", W = "_leadingIcon_fwns1_31", $ = "_headingWrapper_fwns1_38", x = "_headingContainer_fwns1_43", T = "_invisible_fwns1_48", j = "_withAvatar_fwns1_52", z = "_iconContainer_fwns1_57", n = {
8
- pageHeader: N,
9
- headlineContainer: H,
10
- actionButtonContainer: b,
4
+ import { Iconify as u } from "../Iconify/Iconify.js";
5
+ import { AvailableCustomIcons as I } from "../../enums/AvailableCustomIcons.js";
6
+ import { a as B } from "../../useBreakpoint-DROHPVxO.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", z = "_withAvatar_fwns1_52", L = "_iconContainer_fwns1_57", n = {
9
+ pageHeader: H,
10
+ headlineContainer: b,
11
+ actionButtonContainer: x,
11
12
  content: A,
12
- leadingIcon: W,
13
- headingWrapper: $,
14
- headingContainer: x,
15
- invisible: T,
16
- withAvatar: j,
17
- iconContainer: z
18
- }, L = ({ icon: e }) => e ? typeof e != "string" ? /* @__PURE__ */ i("div", { className: n.iconContainer, children: e }) : e in B ? /* @__PURE__ */ i(
19
- I,
13
+ leadingIcon: T,
14
+ headingWrapper: W,
15
+ headingContainer: $,
16
+ invisible: j,
17
+ withAvatar: z,
18
+ iconContainer: L
19
+ }, S = ({ icon: e }) => e ? typeof e != "string" ? /* @__PURE__ */ i("div", { className: n.iconContainer, children: e }) : e in I ? /* @__PURE__ */ i(
20
+ u,
20
21
  {
21
22
  icon: e,
22
23
  className: n.leadingIcon,
23
24
  iconSize: "large",
24
25
  iconType: "filled"
25
26
  }
26
- ) : /* @__PURE__ */ i(y, { iconSize: "large", iconType: "filled", icon: e, className: n.leadingIcon }) : null, q = ({
27
+ ) : /* @__PURE__ */ i(y, { iconSize: "large", iconType: "filled", icon: e, className: n.leadingIcon }) : null, E = ({
27
28
  children: e,
28
- marginBottom: a,
29
- heading: l,
29
+ marginBottom: t,
30
+ heading: a,
30
31
  icon: d,
31
32
  className: p,
32
- subHeading: o,
33
+ subHeading: r,
33
34
  subHeadingLevel: _ = 2,
34
35
  invisibleButton: f = !1,
35
- level: r = 4,
36
- fontWeight: s = 400,
37
- withAvatar: g = !1
36
+ level: s = 4,
37
+ fontWeight: c = 400,
38
+ withAvatar: m = !1
38
39
  }) => {
39
- const { isLg: c } = u(), h = c ? r : r + 1, m = s === "bold" ? 500 : s, v = () => {
40
- if (a !== void 0)
41
- return typeof a == "number" ? `${a}px` : "2rem";
40
+ const { isLg: l } = B(), g = l ? s : s + 1, h = c === "bold" ? 500 : c, v = () => {
41
+ if (t !== void 0)
42
+ return typeof t == "number" ? `${t}px` : "2rem";
42
43
  };
43
- return /* @__PURE__ */ t(
44
+ return /* @__PURE__ */ o(
44
45
  "div",
45
46
  {
46
47
  className: n.pageHeader,
47
48
  style: { marginBottom: v() },
48
49
  "data-testid": "HeaderContainer",
49
50
  children: [
50
- /* @__PURE__ */ t("div", { className: `${g && c ? n.withAvatar : ""} ${n.headingWrapper}`, children: [
51
- /* @__PURE__ */ i(L, { icon: d }),
52
- /* @__PURE__ */ t("div", { className: o ? n.headingContainer : "", children: [
53
- /* @__PURE__ */ i(
51
+ /* @__PURE__ */ o("div", { className: `${m && l ? n.withAvatar : ""} ${n.headingWrapper}`, children: [
52
+ /* @__PURE__ */ i(S, { icon: d }),
53
+ /* @__PURE__ */ o("div", { className: r ? n.headingContainer : "", children: [
54
+ /* @__PURE__ */ i(N, { id: a, text: a, children: /* @__PURE__ */ i(
54
55
  C,
55
56
  {
56
- level: h,
57
+ level: g,
57
58
  "data-testid": "Header",
58
59
  className: p ?? "",
59
- style: { fontWeight: m },
60
- children: l
60
+ style: { fontWeight: h },
61
+ children: a
61
62
  }
62
- ),
63
- /* @__PURE__ */ i(w, { level: _, children: o })
63
+ ) }),
64
+ /* @__PURE__ */ i(w, { level: _, children: r })
64
65
  ] })
65
66
  ] }),
66
67
  /* @__PURE__ */ i(
@@ -76,5 +77,5 @@ const N = "_pageHeader_fwns1_1", H = "_headlineContainer_fwns1_11", b = "_action
76
77
  );
77
78
  };
78
79
  export {
79
- q as BasicHeading
80
+ E as BasicHeading
80
81
  };