@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.
- package/dist/ListAreaService-DDlsV9UD.js +100 -0
- package/dist/assets/BaseView.css +1 -1
- package/dist/assets/ListAreaService.css +1 -1
- package/dist/components/BaseView/BaseView.d.ts +1 -1
- package/dist/components/BaseView/BaseView.js +57 -55
- package/dist/components/BasicHeading/BasicHeading.js +38 -37
- package/dist/components/FormComponents/FormSelect/FormSelect.js +90 -1465
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +70 -3027
- package/dist/components/FormComponents/FormText/FormText.d.ts +2 -1
- package/dist/components/FormComponents/FormText/FormText.js +50 -48
- package/dist/components/ListArea/ListArea.js +1 -1
- package/dist/components/ListArea/ListArea.test.js +1 -1
- package/dist/components/ListArea/ListAreaService.d.ts +2 -2
- package/dist/components/ListArea/ListAreaService.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +30 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.js +22 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.test.d.ts +1 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +37 -0
- package/dist/index-DfbRag7b.js +2963 -0
- package/dist/react-tooltip.min-BzHiZW8k.js +1380 -0
- package/package.json +1 -1
- package/dist/ListAreaService-BoNnFzrZ.js +0 -82
|
@@ -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
|
+
};
|
package/dist/assets/BaseView.css
CHANGED
|
@@ -1 +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 +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,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
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
11
|
-
divider:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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:
|
|
18
|
-
isSorted:
|
|
19
|
-
className:
|
|
20
|
-
withAvatar:
|
|
21
|
-
listMaxHeight:
|
|
22
|
-
pathname:
|
|
23
|
-
routerLinkElement:
|
|
24
|
-
searchPlaceholder:
|
|
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 } =
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
w && /* @__PURE__ */ e(a, { desktopCol:
|
|
29
|
-
/* @__PURE__ */ e(m, {
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
34
|
+
elements: o,
|
|
35
|
+
hasSearch: h,
|
|
36
|
+
maxHeight: C,
|
|
37
|
+
isSorted: f,
|
|
38
|
+
pathname: n,
|
|
39
|
+
routerLinkElement: B,
|
|
40
|
+
searchPlaceholder: _
|
|
57
41
|
}
|
|
58
|
-
)
|
|
59
|
-
|
|
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
|
-
|
|
66
|
+
J as BaseView
|
|
65
67
|
};
|
|
@@ -1,66 +1,67 @@
|
|
|
1
1
|
import "../../assets/BasicHeading.css";
|
|
2
|
-
import { jsxs as
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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:
|
|
13
|
-
headingWrapper:
|
|
14
|
-
headingContainer:
|
|
15
|
-
invisible:
|
|
16
|
-
withAvatar:
|
|
17
|
-
iconContainer:
|
|
18
|
-
},
|
|
19
|
-
|
|
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,
|
|
27
|
+
) : /* @__PURE__ */ i(y, { iconSize: "large", iconType: "filled", icon: e, className: n.leadingIcon }) : null, E = ({
|
|
27
28
|
children: e,
|
|
28
|
-
marginBottom:
|
|
29
|
-
heading:
|
|
29
|
+
marginBottom: t,
|
|
30
|
+
heading: a,
|
|
30
31
|
icon: d,
|
|
31
32
|
className: p,
|
|
32
|
-
subHeading:
|
|
33
|
+
subHeading: r,
|
|
33
34
|
subHeadingLevel: _ = 2,
|
|
34
35
|
invisibleButton: f = !1,
|
|
35
|
-
level:
|
|
36
|
-
fontWeight:
|
|
37
|
-
withAvatar:
|
|
36
|
+
level: s = 4,
|
|
37
|
+
fontWeight: c = 400,
|
|
38
|
+
withAvatar: m = !1
|
|
38
39
|
}) => {
|
|
39
|
-
const { isLg:
|
|
40
|
-
if (
|
|
41
|
-
return typeof
|
|
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__ */
|
|
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__ */
|
|
51
|
-
/* @__PURE__ */ i(
|
|
52
|
-
/* @__PURE__ */
|
|
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:
|
|
57
|
+
level: g,
|
|
57
58
|
"data-testid": "Header",
|
|
58
59
|
className: p ?? "",
|
|
59
|
-
style: { fontWeight:
|
|
60
|
-
children:
|
|
60
|
+
style: { fontWeight: h },
|
|
61
|
+
children: a
|
|
61
62
|
}
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ i(w, { level: _, children:
|
|
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
|
-
|
|
80
|
+
E as BasicHeading
|
|
80
81
|
};
|