@hortiview/shared-components 0.0.6504 → 0.0.6849

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 (55) hide show
  1. package/dist/ListAreaService-DDlsV9UD.js +100 -0
  2. package/dist/assets/BaseView.css +1 -1
  3. package/dist/assets/HashTabView.css +1 -1
  4. package/dist/assets/ListAreaService.css +1 -1
  5. package/dist/components/AlertBanner/AlertBanner.js +19 -11
  6. package/dist/components/AlertBanner/AlertBanner.test.js +17 -23
  7. package/dist/components/BaseView/BaseView.d.ts +1 -1
  8. package/dist/components/BaseView/BaseView.js +57 -55
  9. package/dist/components/BaseView/BaseView.test.js +19 -25
  10. package/dist/components/BasicHeading/BasicHeading.js +52 -45
  11. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  12. package/dist/components/BlockView/BlockView.test.js +7 -7
  13. package/dist/components/ContextMenu/ContextMenu.test.js +6 -6
  14. package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
  15. package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
  16. package/dist/components/EmptyView/EmptyView.test.js +1 -1
  17. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
  18. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +5 -5
  19. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +8 -8
  20. package/dist/components/FormComponents/FormSelect/FormSelect.js +90 -1465
  21. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +70 -3027
  22. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
  23. package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
  24. package/dist/components/GenericTable/GenericTable.test.js +1 -1
  25. package/dist/components/HashTabView/HashTabView.js +33 -33
  26. package/dist/components/HashTabView/HashTabView.test.js +1 -1
  27. package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
  28. package/dist/components/Iconify/Iconify.test.js +1 -1
  29. package/dist/components/InfoGroup/InfoGroup.js +4 -4
  30. package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
  31. package/dist/components/ListArea/ListArea.js +1 -1
  32. package/dist/components/ListArea/ListArea.test.js +2 -2
  33. package/dist/components/ListArea/ListAreaService.d.ts +2 -2
  34. package/dist/components/ListArea/ListAreaService.js +1 -1
  35. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +7 -7
  36. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
  37. package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +30 -0
  38. package/dist/components/OverflowTooltip/OverflowTooltip.js +22 -0
  39. package/dist/components/OverflowTooltip/OverflowTooltip.test.d.ts +1 -0
  40. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +37 -0
  41. package/dist/components/Scrollbar/scrollbar.test.js +8 -8
  42. package/dist/components/SearchBar/SearchBar.test.js +1 -1
  43. package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
  44. package/dist/hooks/useBreakpoint.d.ts +16 -11
  45. package/dist/hooks/useBreakpoint.js +2 -3
  46. package/dist/hooks/useBreakpoints.test.d.ts +1 -0
  47. package/dist/hooks/useBreakpoints.test.js +11 -0
  48. package/dist/index-DP2ENnrX.js +2963 -0
  49. package/dist/main.js +7 -7
  50. package/dist/react-tooltip.min-BzHiZW8k.js +1380 -0
  51. package/dist/{react.esm-BBemCHUU.js → react.esm-DoZanrUz.js} +1223 -1190
  52. package/dist/useBreakpoint-2MH8ICuE.js +28 -0
  53. package/package.json +1 -1
  54. package/dist/ListAreaService-BoNnFzrZ.js +0 -82
  55. package/dist/useBreakpoint-DROHPVxO.js +0 -35
@@ -0,0 +1,28 @@
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
+ };
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.6504",
4
+ "version": "0.0.6849",
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,82 +0,0 @@
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,35 +0,0 @@
1
- import { useState as r, useEffect as c } from "react";
2
- function t(e) {
3
- const [s, a] = r(!1);
4
- return c(
5
- () => {
6
- const i = window.matchMedia(e);
7
- a(i.matches);
8
- const n = (o) => a(o.matches);
9
- return i.addEventListener("change", n), () => i.removeEventListener("change", n);
10
- },
11
- [s]
12
- // Empty array ensures effect is only run on mount and unmount
13
- ), s;
14
- }
15
- function d() {
16
- const e = {
17
- isXs: t("(max-width: 640px)"),
18
- isSm: t("(min-width: 641px) and (max-width: 768px)"),
19
- isMd: t("(min-width: 769px) and (max-width: 839px)"),
20
- isLg: t("(min-width: 840px)"),
21
- isXlg: t("(min-width: 1280px)"),
22
- active: ""
23
- };
24
- return e.isXs && (e.active = "xs"), e.isSm && (e.active = "sm"), e.isMd && (e.active = "md"), e.isLg && (e.active = "lg"), e;
25
- }
26
- const u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
27
- __proto__: null,
28
- useBreakpoints: d,
29
- useMediaQuery: t
30
- }, Symbol.toStringTag, { value: "Module" }));
31
- export {
32
- d as a,
33
- t as b,
34
- u
35
- };