@hortiview/shared-components 0.0.6359 → 0.0.6504

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,82 @@
1
+ import "./assets/ListAreaService.css";
2
+ import { jsx as l, jsxs as b } from "react/jsx-runtime";
3
+ import { TypoButton as C, Group as k, TypoSubtitle as N, TypoBody as L, Icon as O } from "@element/react-components";
4
+ import { Iconify as E } from "./components/Iconify/Iconify.js";
5
+ import { AvailableCustomIcons as $ } from "./enums/AvailableCustomIcons.js";
6
+ const j = "_fullWidth_9hcwy_1", W = "_mainElevation_9hcwy_5", G = "_searchbar_9hcwy_11", S = "_roundedBottom_9hcwy_19", A = "_primaryText_9hcwy_24", P = "_noOverlineText_9hcwy_28", q = "_list_9hcwy_32", z = "_listItem_9hcwy_60", D = "_trailingIcon_9hcwy_64", F = "_groupedListItem_9hcwy_76", H = "_iconColor_9hcwy_80", J = "_overlineTitle_9hcwy_84", a = {
7
+ fullWidth: j,
8
+ mainElevation: W,
9
+ searchbar: G,
10
+ roundedBottom: S,
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
+ }, Y = (e, n, r, c) => {
20
+ const o = e.reduce((i, s) => {
21
+ const { groupName: t, ...m } = s;
22
+ return !t || typeof t != "string" || (i[t] || (i[t] = {
23
+ groupName: /* @__PURE__ */ l(C, { children: t }),
24
+ id: t,
25
+ items: []
26
+ }), i[t].items = [
27
+ ...i[t].items,
28
+ h(m, n, r, c)
29
+ ]), i;
30
+ }, {});
31
+ return Object.values(o);
32
+ }, Z = (e, n, r, c) => e.map((o) => h(o, n, r, c)), h = (e, n, r, c) => {
33
+ const {
34
+ id: o,
35
+ title: i,
36
+ subTitle: s,
37
+ route: t,
38
+ value: m,
39
+ noNavigation: p,
40
+ disabled: _,
41
+ icon: g,
42
+ iconType: y,
43
+ trailingIcon: T,
44
+ trailingIconType: I,
45
+ actionButton: f,
46
+ onClick: w,
47
+ customTitle: u,
48
+ listItemClassName: x,
49
+ overlineTitle: v
50
+ } = e, d = n === t;
51
+ return {
52
+ id: o,
53
+ key: o,
54
+ select: d,
55
+ primaryText: o,
56
+ secondaryText: /* @__PURE__ */ b(k, { direction: "vertical", gap: "none", children: [
57
+ u ?? /* @__PURE__ */ l(N, { level: 1, bold: d, className: "lmnt-theme-on-surface-active", children: i }),
58
+ s && !u ? /* @__PURE__ */ l(L, { level: 2, themeColor: d ? "primary" : void 0, className: "lmnt-theme-on-surface-inactive", children: s }) : void 0
59
+ ] }),
60
+ overlineText: v,
61
+ trailingBlock: f ?? T ?? /* @__PURE__ */ l(O, { icon: "arrow_right", className: a.iconColor }),
62
+ leadingBlock: K(g),
63
+ value: m,
64
+ componentProps: {
65
+ id: o,
66
+ key: o,
67
+ leadingBlockType: y ?? "icon",
68
+ trailingBlockType: I ?? "icon",
69
+ className: `${y === "avatar" ? "" : a.listItem} ${r} ${x ?? ""} ${v ? a.overlineTitle : a.noOverlineText}`,
70
+ onClick: (M, B) => w?.(B),
71
+ tag: _ || p ? void 0 : c ?? "a",
72
+ to: _ || p ? void 0 : t,
73
+ disabled: _
74
+ }
75
+ };
76
+ }, K = (e) => typeof e == "string" && e in $ ? /* @__PURE__ */ l(E, { icon: e }) : e;
77
+ export {
78
+ Z as a,
79
+ Y as g,
80
+ h as m,
81
+ a as s
82
+ };
@@ -1 +1 @@
1
- ._fullWidth_1ja2q_1{width:100%}._mainElevation_1ja2q_5{background:var(--lmnt-theme-background);border-radius:.5rem;width:100%}._searchbar_1ja2q_11 div{border:none}._searchbar_1ja2q_11 button{margin-right:.5rem}._roundedBottom_1ja2q_19{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}._primaryText_1ja2q_24 [class*=mdc-list-item__primary-text]{display:none!important}._noOverlineText_1ja2q_28 [class*=mdc-list-item__content]{margin-top:-.625rem}._list_1ja2q_32{padding-top:0;padding-bottom:0;overflow-y:auto}._list_1ja2q_32 [class*=mdc-list-item__overline-text]{margin-bottom:-2.25rem}._list_1ja2q_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_1ja2q_32::-webkit-scrollbar{width:.5rem;background-color:var(--lmnt-theme-background)}._list_1ja2q_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_1ja2q_60{border-bottom:.0775rem solid var(--lmnt-utility-gray-surface)}._listItem_1ja2q_60 i:not(._trailingIcon_1ja2q_64){color:var(--lmnt-theme-on-surface-inactive)}._listItem_1ja2q_60 i._trailingIcon_1ja2q_64{color:var(--lmnt-theme-on-surface-disabled)}._listItem_1ja2q_60 [class^=mdc-list-item__start]{margin:0 1rem!important;align-self:center!important}._groupedListItem_1ja2q_76{height:4.5rem!important}
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,21 +1,21 @@
1
1
  import "../../assets/BaseView.css";
2
- import { jsx as t, Fragment as x, jsxs as e } from "react/jsx-runtime";
2
+ import { jsx as t, Fragment as k, jsxs as e } from "react/jsx-runtime";
3
3
  import { useMemo as n } from "react";
4
- import { EmptyView as k } from "../EmptyView/EmptyView.js";
5
- import { ListArea as y } from "../ListArea/ListArea.js";
6
- import { VerticalDivider as A } from "../VerticalDivider/VerticalDivider.js";
7
- import { a as H } from "../../useBreakpoint-DROHPVxO.js";
8
- import { Grid as L, GridRow as V, GridCol as m, Group as u } from "@element/react-components";
9
- import { BasicHeading as a } from "../BasicHeading/BasicHeading.js";
10
- const W = "_divider_anyyu_1", _ = {
11
- divider: W
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
12
  }, z = ({
13
13
  action: d,
14
14
  heading: c,
15
15
  elements: o,
16
16
  emptyText: s,
17
- hasSearch: h = !0,
18
- isSorted: p = !0,
17
+ hasSearch: p = !0,
18
+ isSorted: h = !0,
19
19
  className: f,
20
20
  withAvatar: v = !1,
21
21
  listMaxHeight: g = "calc(100vh - 200px)",
@@ -23,29 +23,29 @@ const W = "_divider_anyyu_1", _ = {
23
23
  routerLinkElement: C,
24
24
  searchPlaceholder: B
25
25
  }) => {
26
- const { isLg: r } = H(), i = n(() => o.find((w) => w.route === l), [l, o]), G = n(() => i?.component ?? (r ? /* @__PURE__ */ t(k, { subtitle: s }) : /* @__PURE__ */ t(x, {})), [i, r, s]), b = n(() => r ? !0 : !i, [i, r]);
27
- return /* @__PURE__ */ t(L, { className: f ?? "", fullHeight: !0, fullWidth: !0, columnGap: 0, children: /* @__PURE__ */ e(V, { children: [
28
- b && /* @__PURE__ */ e(m, { desktopCol: 4, tabletCol: 12, phoneCol: 12, children: [
29
- /* @__PURE__ */ e(u, { direction: "vertical", fullWidth: !0, children: [
30
- c && /* @__PURE__ */ t(a, { heading: c, level: 4, marginBottom: 0, children: d }),
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
31
  /* @__PURE__ */ t(
32
- y,
32
+ A,
33
33
  {
34
34
  elements: o,
35
- hasSearch: h,
35
+ hasSearch: p,
36
36
  maxHeight: g,
37
- isSorted: p,
37
+ isSorted: h,
38
38
  pathname: l,
39
39
  routerLinkElement: C,
40
40
  searchPlaceholder: B
41
41
  }
42
42
  )
43
43
  ] }),
44
- r && /* @__PURE__ */ t(A, { className: _.divider, height: "100%" })
44
+ r && /* @__PURE__ */ t(H, { className: j.divider, height: "100%" })
45
45
  ] }),
46
- /* @__PURE__ */ t(m, { desktopCol: 8, tabletCol: 12, phoneCol: 12, children: /* @__PURE__ */ e(u, { direction: "vertical", fullWidth: !0, children: [
46
+ /* @__PURE__ */ t(a, { desktopCol: 8, tabletCol: 12, phoneCol: 12, children: /* @__PURE__ */ e(m, { direction: "vertical", fullWidth: !0, children: [
47
47
  /* @__PURE__ */ t(
48
- a,
48
+ u,
49
49
  {
50
50
  heading: i?.detailTitle ?? i?.title ?? "",
51
51
  level: 4,
@@ -56,7 +56,7 @@ const W = "_divider_anyyu_1", _ = {
56
56
  children: i?.detailAction ?? d
57
57
  }
58
58
  ),
59
- G
59
+ b
60
60
  ] }) })
61
61
  ] }) });
62
62
  };
@@ -1,9 +1,10 @@
1
+ import { TextfieldProps } from '@element/react-components';
1
2
  import { ReactNode } from 'react';
2
3
  import { FieldPath, FieldValues, Path, RegisterOptions } from 'react-hook-form';
3
4
  /**
4
5
  * a generic FormText property type. the generic T represents the interface, which is used in the form, like {@link CreateOrganizationDto}
5
6
  */
6
- export type FormTextProps<T extends FieldValues> = {
7
+ export type FormTextProps<T extends FieldValues> = TextfieldProps & {
7
8
  /** the path to the property, like Address.AddressLine1 */
8
9
  propertyName: Path<T>;
9
10
  /** the label of the Textbox */
@@ -1,14 +1,14 @@
1
1
  import "../../../assets/FormText.css";
2
- import { jsx as n, Fragment as h, jsxs as I } from "react/jsx-runtime";
3
- import { Textfield as M, TypoCaption as P } from "@element/react-components";
4
- import { useState as R, useMemo as d } from "react";
5
- import { useFormContext as V, Controller as C } from "react-hook-form";
6
- const W = "_formTextAreaHelperText_1n0bk_1", w = "_invalid_1n0bk_6", D = "_required_1n0bk_9", E = "_formTextArea_1n0bk_1", i = {
7
- formTextAreaHelperText: W,
8
- invalid: w,
9
- required: D,
10
- formTextArea: E
11
- }, G = ({
2
+ import { jsx as n, Fragment as C, jsxs as M } from "react/jsx-runtime";
3
+ import { Textfield as P, TypoCaption as R } from "@element/react-components";
4
+ import { useState as V, useMemo as d } from "react";
5
+ import { useFormContext as W, Controller as _ } from "react-hook-form";
6
+ const w = "_formTextAreaHelperText_1n0bk_1", D = "_invalid_1n0bk_6", E = "_required_1n0bk_9", G = "_formTextArea_1n0bk_1", i = {
7
+ formTextAreaHelperText: w,
8
+ invalid: D,
9
+ required: E,
10
+ formTextArea: G
11
+ }, J = ({
12
12
  count: e,
13
13
  maxCount: c,
14
14
  invalid: m = !1,
@@ -17,93 +17,95 @@ const W = "_formTextAreaHelperText_1n0bk_1", w = "_invalid_1n0bk_6", D = "_requi
17
17
  "div",
18
18
  {
19
19
  className: `${i.formTextAreaHelperText} ${m ? i.invalid : ""} ${r ? i.required : ""}`,
20
- children: /* @__PURE__ */ n(P, { children: `${e}/${c}` })
20
+ children: /* @__PURE__ */ n(R, { children: `${e}/${c}` })
21
21
  }
22
- ), Z = (e) => e.textarea ? /* @__PURE__ */ n(J, { ...e }) : /* @__PURE__ */ n(K, { ...e }), J = (e) => /* @__PURE__ */ n("div", { className: i.formTextArea, children: /* @__PURE__ */ n(_, { ...e }) }), K = (e) => /* @__PURE__ */ n(_, { ...e }), _ = ({
22
+ ), N = (e) => e.textarea ? /* @__PURE__ */ n(K, { ...e }) : /* @__PURE__ */ n(O, { ...e }), K = (e) => /* @__PURE__ */ n("div", { className: i.formTextArea, children: /* @__PURE__ */ n(A, { ...e }) }), O = (e) => /* @__PURE__ */ n(A, { ...e }), A = ({
23
23
  propertyName: e,
24
24
  label: c,
25
25
  disabled: m = !1,
26
26
  textarea: r = !1,
27
- hidden: A = !1,
28
- placeholder: q,
29
- type: F,
30
- prefixText: $,
31
- inputMode: L,
32
- trailingIcon: k,
27
+ hidden: q = !1,
28
+ placeholder: F,
29
+ type: $,
30
+ prefixText: L,
31
+ inputMode: k,
32
+ trailingIcon: H,
33
33
  trigger: x = "likeForm",
34
- rules: t
34
+ rules: t,
35
+ ...f
35
36
  }) => {
36
37
  const {
37
- control: f,
38
+ control: v,
38
39
  getFieldState: u,
39
40
  formState: { errors: s },
40
41
  trigger: T
41
- } = V(), [H, b] = R(0), S = (a) => {
42
+ } = W(), [b, B] = V(0), S = (a) => {
42
43
  const l = a.target.value;
43
- b(l?.length ?? 0);
44
- }, B = () => {
44
+ B(l?.length ?? 0);
45
+ }, j = () => {
45
46
  if (s && s[e]) {
46
47
  const a = s[e]?.message;
47
48
  return a || "Invalid input";
48
49
  }
49
- return z;
50
+ return I;
50
51
  }, o = d(
51
52
  () => t?.maxLength?.value,
52
53
  [t]
53
- ), j = d(
54
+ ), z = d(
54
55
  () => t?.minLength?.value,
55
56
  [t]
56
- ), v = d(
57
+ ), g = d(
57
58
  () => t?.required?.value,
58
59
  [t]
59
- ), z = d(
60
+ ), I = d(
60
61
  () => t?.required?.message,
61
62
  [t]
62
63
  );
63
- return A ? /* @__PURE__ */ n(C, { name: e, control: f, render: () => /* @__PURE__ */ n(h, {}) }) : /* @__PURE__ */ n(
64
- C,
64
+ return q ? /* @__PURE__ */ n(_, { name: e, control: v, render: () => /* @__PURE__ */ n(C, {}) }) : /* @__PURE__ */ n(
65
+ _,
65
66
  {
66
67
  name: e,
67
68
  rules: t,
68
- control: f,
69
- render: ({ field: { ref: a, ...l } }) => /* @__PURE__ */ I(h, { children: [
69
+ control: v,
70
+ render: ({ field: { ref: a, ...l } }) => /* @__PURE__ */ M(C, { children: [
70
71
  /* @__PURE__ */ n(
71
- M,
72
+ P,
72
73
  {
74
+ ...f,
73
75
  ...l,
74
76
  value: l.value ?? "",
75
- type: F,
77
+ type: $,
76
78
  fullWidth: !0,
77
- inputMode: L,
78
- placeholder: q,
79
- prefixText: $,
79
+ inputMode: k,
80
+ placeholder: F,
81
+ prefixText: L,
80
82
  disabled: m,
81
- helperText: B(),
82
- helperTextPersistent: s !== void 0 || v || o !== void 0 && r,
83
+ helperText: j(),
84
+ helperTextPersistent: s !== void 0 || g || o !== void 0 && r,
83
85
  label: c,
84
86
  variant: "outlined",
85
87
  maxlength: o,
86
- minLength: j,
88
+ minLength: z,
87
89
  textarea: r,
88
90
  noResize: !1,
89
91
  onBlur: () => {
90
- x === "onBlur" && T(e);
92
+ x === "onBlur" && T(e), f.onBlur?.();
91
93
  },
92
- onChange: (g) => {
93
- l.onChange(g), r && o !== void 0 && S(g), x === "onChange" && T(e);
94
+ onChange: (h) => {
95
+ l.onChange(h), r && o !== void 0 && S(h), x === "onChange" && T(e);
94
96
  },
95
97
  valid: !u(e).invalid,
96
98
  className: `${i.formText} ${u(e).invalid ? i.invalid : ""}`,
97
- trailingIcon: k
99
+ trailingIcon: H
98
100
  }
99
101
  ),
100
- o && r && /* @__PURE__ */ n(
101
- G,
102
+ o !== void 0 && r && /* @__PURE__ */ n(
103
+ J,
102
104
  {
103
- count: H,
105
+ count: b,
104
106
  maxCount: o,
105
107
  invalid: u(e).invalid,
106
- required: v
108
+ required: g
107
109
  }
108
110
  )
109
111
  ] })
@@ -111,5 +113,5 @@ const W = "_formTextAreaHelperText_1n0bk_1", w = "_invalid_1n0bk_6", D = "_requi
111
113
  );
112
114
  };
113
115
  export {
114
- Z as FormText
116
+ N as FormText
115
117
  };
@@ -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-zxVNvD59.js";
7
+ import { g as ae, a as te, s as T } from "../../ListAreaService-BoNnFzrZ.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 { r as s, s as a, f as u } from "../../react.esm-BBemCHUU.js";
4
4
  import { ListArea as c } from "./ListArea.js";
5
- import { g as h } from "../../ListAreaService-zxVNvD59.js";
5
+ import { g as h } from "../../ListAreaService-BoNnFzrZ.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-zxVNvD59.js";
5
+ import { g as s, a as i, m as a } from "../../ListAreaService-BoNnFzrZ.js";
6
6
  export {
7
7
  s as getGroupedItems,
8
8
  i as getListedItems,
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.6359",
4
+ "version": "0.0.6504",
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,80 +0,0 @@
1
- import "./assets/ListAreaService.css";
2
- import { jsx as s, jsxs as B } from "react/jsx-runtime";
3
- import { TypoButton as b, Group as k, TypoSubtitle as C, TypoBody as L, Icon as N } from "@element/react-components";
4
- import { Iconify as O } from "./components/Iconify/Iconify.js";
5
- import { AvailableCustomIcons as E } from "./enums/AvailableCustomIcons.js";
6
- const $ = "_fullWidth_1ja2q_1", W = "_mainElevation_1ja2q_5", G = "_searchbar_1ja2q_11", S = "_roundedBottom_1ja2q_19", w = "_primaryText_1ja2q_24", A = "_noOverlineText_1ja2q_28", P = "_list_1ja2q_32", z = "_listItem_1ja2q_60", D = "_trailingIcon_1ja2q_64", F = "_groupedListItem_1ja2q_76", v = {
7
- fullWidth: $,
8
- mainElevation: W,
9
- searchbar: G,
10
- roundedBottom: S,
11
- primaryText: w,
12
- noOverlineText: A,
13
- list: P,
14
- listItem: z,
15
- trailingIcon: D,
16
- groupedListItem: F
17
- }, V = (e, n, r, a) => {
18
- const o = e.reduce((i, l) => {
19
- const { groupName: t, ...c } = l;
20
- return !t || typeof t != "string" || (i[t] || (i[t] = {
21
- groupName: /* @__PURE__ */ s(b, { children: t }),
22
- id: t,
23
- items: []
24
- }), i[t].items = [
25
- ...i[t].items,
26
- y(c, n, r, a)
27
- ]), i;
28
- }, {});
29
- return Object.values(o);
30
- }, X = (e, n, r, a) => e.map((o) => y(o, n, r, a)), y = (e, n, r, a) => {
31
- const {
32
- id: o,
33
- title: i,
34
- subTitle: l,
35
- route: t,
36
- value: c,
37
- noNavigation: p,
38
- disabled: m,
39
- icon: I,
40
- iconType: _,
41
- trailingIcon: T,
42
- trailingIconType: f,
43
- actionButton: j,
44
- onClick: x,
45
- customTitle: u,
46
- listItemClassName: h,
47
- overlineTitle: g
48
- } = e, d = n === t;
49
- return {
50
- id: o,
51
- key: o,
52
- select: d,
53
- primaryText: o,
54
- secondaryText: /* @__PURE__ */ B(k, { direction: "vertical", gap: "none", children: [
55
- u ?? /* @__PURE__ */ s(C, { level: 1, bold: d, children: i }),
56
- l && !u ? /* @__PURE__ */ s(L, { level: 2, themeColor: d ? "primary" : void 0, children: l }) : void 0
57
- ] }),
58
- overlineText: g,
59
- trailingBlock: j ?? T ?? /* @__PURE__ */ s(N, { icon: "arrow_right" }),
60
- leadingBlock: H(I),
61
- value: c,
62
- componentProps: {
63
- id: o,
64
- key: o,
65
- leadingBlockType: _ ?? "icon",
66
- trailingBlockType: f ?? "icon",
67
- className: `${_ === "avatar" ? "" : v.listItem} ${r} ${h ?? ""} ${g ? "" : v.noOverlineText}`,
68
- onClick: (J, q) => x?.(q),
69
- tag: m || p ? void 0 : a ?? "a",
70
- to: m || p ? void 0 : t,
71
- disabled: m
72
- }
73
- };
74
- }, H = (e) => typeof e == "string" && e in E ? /* @__PURE__ */ s(O, { icon: e }) : e;
75
- export {
76
- X as a,
77
- V as g,
78
- y as m,
79
- v as s
80
- };