@hortiview/shared-components 0.0.4540 → 0.0.4624

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 (83) hide show
  1. package/README.md +101 -29
  2. package/dist/BlockView.module-8kbPxxc4.js +15 -0
  3. package/dist/HashTabView.module-BY0tbl3B.js +13 -0
  4. package/dist/HeaderFilter.module-DiBmulr5.js +7 -0
  5. package/dist/_getTag-DNUtgXkb.js +136 -0
  6. package/dist/_stringToPath-BfzwTbL6.js +54 -0
  7. package/dist/assets/{main.css → DeleteModal.css} +1 -1
  8. package/dist/assets/HeaderFilter.css +1 -0
  9. package/dist/assets/Scrollbar.css +1 -0
  10. package/dist/assets/disclaimer.css +1 -0
  11. package/dist/baseView.module-DXWalo9p.js +7 -0
  12. package/dist/basicHeading.module-ClcvD7x2.js +16 -0
  13. package/dist/{component-D1YrRAXe.js → component-Rx4bNsGO.js} +61 -54
  14. package/dist/components/BaseView/BaseView.js +28 -30
  15. package/dist/components/BaseView/BaseView.test.js +16 -15
  16. package/dist/components/BasicHeading/BasicHeading.d.ts +2 -5
  17. package/dist/components/BasicHeading/BasicHeading.js +40 -51
  18. package/dist/components/BasicHeading/BasicHeading.test.js +33 -333
  19. package/dist/components/BlockView/BlockView.js +41 -51
  20. package/dist/components/BlockView/BlockView.test.js +15 -14
  21. package/dist/components/DeleteModal/DeleteModal.d.ts +65 -0
  22. package/dist/components/DeleteModal/DeleteModal.js +4719 -0
  23. package/dist/components/DeleteModal/DeleteModal.test.d.ts +1 -0
  24. package/dist/components/DeleteModal/DeleteModal.test.js +85 -0
  25. package/dist/components/Disclaimer/Disclaimer.d.ts +33 -0
  26. package/dist/components/Disclaimer/Disclaimer.js +21 -0
  27. package/dist/components/Disclaimer/Disclaimer.test.d.ts +1 -0
  28. package/dist/components/Disclaimer/Disclaimer.test.js +13 -0
  29. package/dist/components/EmptyView/EmptyView.js +4 -4
  30. package/dist/components/EmptyView/EmptyView.test.js +14 -13
  31. package/dist/components/HashTabView/HashTabView.js +60 -68
  32. package/dist/components/HashTabView/HashTabView.test.js +9 -8
  33. package/dist/components/HeaderFilter/HeaderFilter.d.ts +33 -0
  34. package/dist/components/HeaderFilter/HeaderFilter.js +7605 -0
  35. package/dist/components/HeaderFilter/HeaderFilter.test.d.ts +1 -0
  36. package/dist/components/HeaderFilter/HeaderFilter.test.js +46 -0
  37. package/dist/components/Iconify/Iconify.js +1 -1
  38. package/dist/components/Iconify/Iconify.test.js +8 -7
  39. package/dist/components/ListArea/ListArea.js +247 -5344
  40. package/dist/components/ListArea/ListArea.test.js +4 -3
  41. package/dist/components/ListArea/ListAreaService.js +56 -9
  42. package/dist/components/Scrollbar/Scrollbar.d.ts +2 -0
  43. package/dist/components/Scrollbar/Scrollbar.js +9 -0
  44. package/dist/components/Scrollbar/scrollbar.test.d.ts +1 -0
  45. package/dist/components/Scrollbar/scrollbar.test.js +15 -0
  46. package/dist/components/SearchBar/SearchBar.js +2051 -3
  47. package/dist/components/SearchBar/SearchBar.test.js +16 -15
  48. package/dist/components/VerticalDivider/VerticalDivider.js +4 -6
  49. package/dist/components/VerticalDivider/VerticalDivider.test.js +8 -7
  50. package/dist/disclaimer.module-BZydt-Q_.js +8 -0
  51. package/dist/hooks/useBreakpoint.js +2 -2
  52. package/dist/index.es-Ba9oZK_n.js +769 -0
  53. package/dist/{index.es-CUWXKh7P.js → index.es-C1ojb4Lq.js} +8 -8
  54. package/dist/{index.es-DYsXox--.js → index.es-CNBieliG.js} +1 -1
  55. package/dist/index.es-CQ3ep412.js +305 -0
  56. package/dist/{index.es-mBp_Btvi.js → index.es-CVCp4d0C.js} +2 -2
  57. package/dist/{index.es-WZ1mqvGz.js → index.es-Cct4Uapb.js} +106 -99
  58. package/dist/index.es-Cj9DW-2T.js +430 -0
  59. package/dist/{index.es-BD4kFWFx.js → index.es-Cm4X20_S.js} +4 -4
  60. package/dist/{index.es-Cv6meSAn.js → index.es-InSNsV4f.js} +1 -1
  61. package/dist/index.es-L0ZCcbUf.js +4939 -0
  62. package/dist/listArea.module-B04TR5bj.js +14 -0
  63. package/dist/main.d.ts +5 -0
  64. package/dist/main.js +33 -23
  65. package/dist/react.esm-BeDwcQWb.js +12741 -0
  66. package/dist/searchBar.module-9gKyrZRT.js +7 -0
  67. package/dist/services/UtilService.d.ts +6 -0
  68. package/dist/services/UtilService.js +4 -0
  69. package/dist/services/services.test.d.ts +1 -0
  70. package/dist/services/services.test.js +22 -0
  71. package/dist/{tslib.es6-BOWp4lfV.js → tslib.es6-CIXEwqhg.js} +4 -4
  72. package/dist/{useBreakpoint-DROHPVxO.js → useBreakpoint-DyAmuka7.js} +2 -2
  73. package/dist/verticalDivider.module-C3_GL-fH.js +7 -0
  74. package/dist/vi.JYQecGiw-BbUbJcT8.js +9795 -0
  75. package/package.json +1 -1
  76. package/dist/ListAreaService-CFOmATRF.js +0 -68
  77. package/dist/SearchBar-CY2zfu6B.js +0 -3232
  78. package/dist/vi.JYQecGiw-8gz0k16C.js +0 -22532
  79. /package/dist/assets/{BaseView.css → baseView.css} +0 -0
  80. /package/dist/assets/{BasicHeading.css → basicHeading.css} +0 -0
  81. /package/dist/assets/{ListAreaService.css → listArea.css} +0 -0
  82. /package/dist/assets/{SearchBar.css → searchBar.css} +0 -0
  83. /package/dist/assets/{VerticalDivider.css → verticalDivider.css} +0 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,85 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { r as c, s as e } from "../../react.esm-BeDwcQWb.js";
3
+ import { DeleteModal as b } from "./DeleteModal.js";
4
+ import { d, t as a, v as o, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
+ d("DeleteModal Test", () => {
6
+ a("should render the DeleteModal properly", () => {
7
+ c(
8
+ /* @__PURE__ */ n(
9
+ b,
10
+ {
11
+ icon: "block",
12
+ open: !0,
13
+ setOpen: o.fn(),
14
+ onDelete: o.fn(),
15
+ title: "DELETE",
16
+ confirmButtonLabel: "Remove",
17
+ cancelButtonLabel: "Cancel",
18
+ deleteHeader: "Delete my block",
19
+ impossibleDeleteHeader: "block cant be deleted",
20
+ deleteBody: ["block 1", "block 2", "block 3"],
21
+ isDeletePossible: !0
22
+ }
23
+ )
24
+ ), t(e.getByText("DELETE")).toBeInTheDocument(), t(e.getByTestId("block")).toBeInTheDocument(), t(e.getByText("block 1")).toBeInTheDocument(), t(e.getByText("block 2")).toBeInTheDocument(), t(e.getByText("block 3")).toBeInTheDocument(), t(e.getByText("Remove")).toBeInTheDocument(), t(e.getByText("Cancel")).toBeInTheDocument(), t(e.queryByText("block cant be deleted")).not.toBeInTheDocument();
25
+ }), a("should render the DeleteModal properly when isDeletePossible = false", () => {
26
+ c(
27
+ /* @__PURE__ */ n(
28
+ b,
29
+ {
30
+ icon: "block",
31
+ open: !0,
32
+ setOpen: o.fn(),
33
+ onDelete: o.fn(),
34
+ title: "DELETE",
35
+ confirmButtonLabel: "Remove",
36
+ cancelButtonLabel: "Cancel",
37
+ deleteHeader: "Delete my block",
38
+ impossibleDeleteHeader: "block cant be deleted",
39
+ deleteBody: ["block 1", "block 2", "block 3"],
40
+ isDeletePossible: !1
41
+ }
42
+ )
43
+ ), e.debug(), t(e.getByText("DELETE")).toBeInTheDocument(), t(e.getByTestId("block")).toBeInTheDocument(), t(e.queryByText("block 1")).not.toBeInTheDocument(), t(e.queryByText("block 2")).not.toBeInTheDocument(), t(e.queryByText("block 3")).not.toBeInTheDocument(), t(e.getByText("Remove")).toBeInTheDocument(), t(e.getByText("Remove").parentElement).toBeDisabled(), t(e.getByText("Cancel")).toBeInTheDocument(), t(e.queryByText("block cant be deleted")).toBeInTheDocument();
44
+ }), a("should call setOpen with false when clicking on cancel button", () => {
45
+ const l = o.fn();
46
+ c(
47
+ /* @__PURE__ */ n(
48
+ b,
49
+ {
50
+ icon: "block",
51
+ open: !0,
52
+ setOpen: l,
53
+ onDelete: o.fn(),
54
+ title: "DELETE",
55
+ confirmButtonLabel: "Remove",
56
+ cancelButtonLabel: "Cancel",
57
+ deleteHeader: "Delete my block",
58
+ impossibleDeleteHeader: "block cant be deleted",
59
+ deleteBody: ["block 1", "block 2", "block 3"],
60
+ isDeletePossible: !0
61
+ }
62
+ )
63
+ ), e.getByText("Cancel").click(), t(l).toHaveBeenCalledWith(!1);
64
+ }), a("should call onDelete when clicking on delete button", () => {
65
+ const l = o.fn();
66
+ c(
67
+ /* @__PURE__ */ n(
68
+ b,
69
+ {
70
+ icon: "block",
71
+ open: !0,
72
+ setOpen: o.fn(),
73
+ onDelete: l,
74
+ title: "DELETE",
75
+ confirmButtonLabel: "Remove",
76
+ cancelButtonLabel: "Cancel",
77
+ deleteHeader: "Delete my block",
78
+ impossibleDeleteHeader: "block cant be deleted",
79
+ deleteBody: ["block 1", "block 2", "block 3"],
80
+ isDeletePossible: !0
81
+ }
82
+ )
83
+ ), e.getByText("Remove").click(), t(l).toHaveBeenCalled();
84
+ });
85
+ });
@@ -0,0 +1,33 @@
1
+ type DisclaimerProps = {
2
+ /**
3
+ * The text of the disclaimer - required
4
+ */
5
+ text: string;
6
+ /**
7
+ * The level of the disclaimer - optional, defaults to _2_
8
+ */
9
+ level?: 1 | 2;
10
+ /**
11
+ * Whether the disclaimer should be bold - optional, defaults to _false_
12
+ */
13
+ bold?: boolean;
14
+ /**
15
+ * The icon of the disclaimer - optional, defaults to _wifi_off_
16
+ */
17
+ icon?: string;
18
+ /**
19
+ * The subtext of the disclaimer - optional
20
+ */
21
+ subtext?: string;
22
+ };
23
+ /**
24
+ * A disclaimer component with additional icon and subtext
25
+ * @prop **text** - the text of the disclaimer - required
26
+ * @prop **level** - the level of the disclaimer - optional, defaults to _2_
27
+ * @prop **bold** - whether the disclaimer should be bold - optional, defaults to _false_
28
+ * @prop **icon** - the icon of the disclaimer - optional, defaults to _wifi_off_
29
+ * @prop **subtext** - the subtext of the disclaimer - optional
30
+ * @returns
31
+ */
32
+ export declare const Disclaimer: ({ text, subtext, icon, level, bold }: DisclaimerProps) => import("react/jsx-runtime").JSX.Element;
33
+ export {};
@@ -0,0 +1,21 @@
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
+ import { s as o } from "../../disclaimer.module-BZydt-Q_.js";
3
+ import { G as m } from "../../index.es-CNBieliG.js";
4
+ import { a as n, b as t } from "../../index.es-Cm4X20_S.js";
5
+ import { I as p } from "../../index.es-InSNsV4f.js";
6
+ const v = ({ text: a, subtext: e, icon: i, level: s = 2, bold: l = !1 }) => /* @__PURE__ */ c(
7
+ m,
8
+ {
9
+ direction: i || e ? "vertical" : "horizontal",
10
+ secondaryAlign: "center",
11
+ primaryAlign: "center",
12
+ children: [
13
+ /* @__PURE__ */ r(n, { className: o.disclaimer, level: s, bold: l, children: a }),
14
+ e && /* @__PURE__ */ r(t, { level: 2, children: e }),
15
+ i && /* @__PURE__ */ r("div", { className: o.iconArea, children: /* @__PURE__ */ r(p, { className: o.Icon, icon: i, iconSize: "large" }) })
16
+ ]
17
+ }
18
+ );
19
+ export {
20
+ v as Disclaimer
21
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { r, s as t } from "../../react.esm-BeDwcQWb.js";
3
+ import { Disclaimer as s } from "./Disclaimer.js";
4
+ import { d as i, t as m, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
+ i("Disclaimer test", () => {
6
+ m("should render with default text", () => {
7
+ r(/* @__PURE__ */ o(s, { text: "disclaimer.default" })), e(t.getByText("disclaimer.default")).toBeInTheDocument();
8
+ }), m("should render with custom text", () => {
9
+ r(/* @__PURE__ */ o(s, { text: "custom-text" })), e(t.getByText("custom-text")).toBeInTheDocument(), e(t.queryByText("disclaimer.default")).not.toBeInTheDocument();
10
+ }), m("should render Disclaimer including the custom text", () => {
11
+ r(/* @__PURE__ */ o(s, { subtext: "custom-text", text: "offline-alterText" })), e(t.getByText("offline-alterText")).toBeInTheDocument(), e(t.getByText("custom-text")).toBeInTheDocument();
12
+ });
13
+ });
@@ -1,9 +1,9 @@
1
1
  import { jsx as k } from "react/jsx-runtime";
2
- import { P as e, c as P, _ as C } from "../../index.es-WZ1mqvGz.js";
2
+ import { P as e, c as P, _ as C } from "../../index.es-Cct4Uapb.js";
3
3
  import l, { forwardRef as H, useRef as T, useImperativeHandle as O, useMemo as p } from "react";
4
- import { G as E } from "../../index.es-DYsXox--.js";
5
- import { d as N } from "../../index.es-BD4kFWFx.js";
6
- import { I as x } from "../../index.es-Cv6meSAn.js";
4
+ import { G as E } from "../../index.es-CNBieliG.js";
5
+ import { d as N } from "../../index.es-Cm4X20_S.js";
6
+ import { I as x } from "../../index.es-InSNsV4f.js";
7
7
  const $ = {
8
8
  /**
9
9
  * Aligns the Hero contents.
@@ -1,18 +1,19 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { d as r, t as s, r as d, g as e, s as n } from "../../vi.JYQecGiw-8gz0k16C.js";
3
- import { EmptyView as i } from "./EmptyView.js";
4
- r("EmptyView", () => {
5
- s("should render", () => {
6
- d(/* @__PURE__ */ o(i, {})), e(n.getByText("dashbord")).toBeInTheDocument();
7
- }), s("should render with custom icon", () => {
8
- d(/* @__PURE__ */ o(i, { icon: "add" })), e(n.getByText("add")).toBeInTheDocument();
9
- }), s("should render with title", () => {
10
- d(/* @__PURE__ */ o(i, { icon: "add", title: "TITLE" }));
11
- const t = n.getByText("TITLE");
2
+ import { r as s, s as d } from "../../react.esm-BeDwcQWb.js";
3
+ import { EmptyView as n } from "./EmptyView.js";
4
+ import { d as i, t as r, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
+ i("EmptyView", () => {
6
+ r("should render", () => {
7
+ s(/* @__PURE__ */ o(n, {})), e(d.getByText("dashbord")).toBeInTheDocument();
8
+ }), r("should render with custom icon", () => {
9
+ s(/* @__PURE__ */ o(n, { icon: "add" })), e(d.getByText("add")).toBeInTheDocument();
10
+ }), r("should render with title", () => {
11
+ s(/* @__PURE__ */ o(n, { icon: "add", title: "TITLE" }));
12
+ const t = d.getByText("TITLE");
12
13
  e(t).toBeInTheDocument(), e(t).toHaveClass(/headline2/);
13
- }), s("should render with subtitle", () => {
14
- d(/* @__PURE__ */ o(i, { icon: "add", subtitle: "SUB_TITLE" }));
15
- const t = n.getByText("SUB_TITLE");
14
+ }), r("should render with subtitle", () => {
15
+ s(/* @__PURE__ */ o(n, { icon: "add", subtitle: "SUB_TITLE" }));
16
+ const t = d.getByText("SUB_TITLE");
16
17
  e(t).toBeInTheDocument(), e(t).toHaveClass(/headline6/);
17
18
  });
18
19
  });
@@ -1,13 +1,13 @@
1
- import "../../assets/HashTabView.css";
2
1
  import { jsx as I, jsxs as q, Fragment as dt } from "react/jsx-runtime";
3
2
  import p, { forwardRef as w, useMemo as rt, useRef as C, useImperativeHandle as W, useContext as ft, useEffect as D, useCallback as ht, createContext as pt, useState as mt } from "react";
4
- import { a as gt } from "../../useBreakpoint-DROHPVxO.js";
5
- import { P as i, _ as x, c as K, d as tt, a as at } from "../../index.es-WZ1mqvGz.js";
6
- import { I as Tt } from "../../index.es-Cv6meSAn.js";
7
- import { c as T, _ as E, b as vt } from "../../tslib.es6-BOWp4lfV.js";
8
- import { a as k, b, c as H, m as _t, d as bt, M as et } from "../../component-D1YrRAXe.js";
9
- import { E as St } from "../../index.es-CUWXKh7P.js";
10
- import { G as Y } from "../../index.es-DYsXox--.js";
3
+ import { s as A } from "../../HashTabView.module-BY0tbl3B.js";
4
+ import { u as Tt } from "../../useBreakpoint-DyAmuka7.js";
5
+ import { P as i, _ as x, c as K, d as tt, e as at } from "../../index.es-Cct4Uapb.js";
6
+ import { I as gt } from "../../index.es-InSNsV4f.js";
7
+ import { _ as g, a as E, c as vt } from "../../tslib.es6-CIXEwqhg.js";
8
+ import { a as H, d as b, b as k, m as _t, f as bt, M as et } from "../../component-Rx4bNsGO.js";
9
+ import { E as St } from "../../index.es-C1ojb4Lq.js";
10
+ import { G as Y } from "../../index.es-CNBieliG.js";
11
11
  /**
12
12
  * @license
13
13
  * Copyright 2018 Google Inc.
@@ -94,7 +94,7 @@ var Z = (
94
94
  var Et = (
95
95
  /** @class */
96
96
  function(a) {
97
- T(e, a);
97
+ g(e, a);
98
98
  function e() {
99
99
  return a !== null && a.apply(this, arguments) || this;
100
100
  }
@@ -152,7 +152,7 @@ var Et = (
152
152
  var yt = (
153
153
  /** @class */
154
154
  function(a) {
155
- T(e, a);
155
+ g(e, a);
156
156
  function e() {
157
157
  return a !== null && a.apply(this, arguments) || this;
158
158
  }
@@ -210,7 +210,7 @@ var yt = (
210
210
  var At = (
211
211
  /** @class */
212
212
  function(a) {
213
- T(e, a);
213
+ g(e, a);
214
214
  function e() {
215
215
  return a !== null && a.apply(this, arguments) || this;
216
216
  }
@@ -268,7 +268,7 @@ var At = (
268
268
  var U = (
269
269
  /** @class */
270
270
  function(a) {
271
- T(e, a);
271
+ g(e, a);
272
272
  function e(t) {
273
273
  var n = a.call(this, E(E({}, e.defaultAdapter), t)) || this;
274
274
  return n.isAnimating_ = !1, n;
@@ -417,7 +417,7 @@ var U = (
417
417
  }, e.prototype.isRTL_ = function() {
418
418
  return this.adapter.getScrollContentStyleValue("direction") === "rtl";
419
419
  }, e;
420
- }(k)
420
+ }(H)
421
421
  );
422
422
  /**
423
423
  * @license
@@ -475,7 +475,7 @@ function Lt(a, e) {
475
475
  var it = (
476
476
  /** @class */
477
477
  function(a) {
478
- T(e, a);
478
+ g(e, a);
479
479
  function e() {
480
480
  return a !== null && a.apply(this, arguments) || this;
481
481
  }
@@ -547,7 +547,7 @@ var it = (
547
547
  }, e.prototype.scrollTo = function(t) {
548
548
  this.foundation.scrollTo(t);
549
549
  }, e;
550
- }(H)
550
+ }(k)
551
551
  );
552
552
  /**
553
553
  * @license
@@ -603,7 +603,7 @@ var Rt = {
603
603
  var v = (
604
604
  /** @class */
605
605
  function(a) {
606
- T(e, a);
606
+ g(e, a);
607
607
  function e(t) {
608
608
  return a.call(this, E(E({}, e.defaultAdapter), t)) || this;
609
609
  }
@@ -638,7 +638,7 @@ var v = (
638
638
  }), e.prototype.computeContentClientRect = function() {
639
639
  return this.adapter.computeContentClientRect();
640
640
  }, e;
641
- }(k)
641
+ }(H)
642
642
  );
643
643
  /**
644
644
  * @license
@@ -665,7 +665,7 @@ var v = (
665
665
  var Ot = (
666
666
  /** @class */
667
667
  function(a) {
668
- T(e, a);
668
+ g(e, a);
669
669
  function e() {
670
670
  return a !== null && a.apply(this, arguments) || this;
671
671
  }
@@ -701,7 +701,7 @@ var Ot = (
701
701
  var Dt = (
702
702
  /** @class */
703
703
  function(a) {
704
- T(e, a);
704
+ g(e, a);
705
705
  function e() {
706
706
  return a !== null && a.apply(this, arguments) || this;
707
707
  }
@@ -742,7 +742,7 @@ var Dt = (
742
742
  var ct = (
743
743
  /** @class */
744
744
  function(a) {
745
- T(e, a);
745
+ g(e, a);
746
746
  function e() {
747
747
  return a !== null && a.apply(this, arguments) || this;
748
748
  }
@@ -773,7 +773,7 @@ var ct = (
773
773
  }, e.prototype.deactivate = function() {
774
774
  this.foundation.deactivate();
775
775
  }, e;
776
- }(H)
776
+ }(k)
777
777
  );
778
778
  /**
779
779
  * @license
@@ -832,7 +832,7 @@ var F = {
832
832
  var O = (
833
833
  /** @class */
834
834
  function(a) {
835
- T(e, a);
835
+ g(e, a);
836
836
  function e(t) {
837
837
  var n = a.call(this, E(E({}, e.defaultAdapter), t)) || this;
838
838
  return n.focusOnActivate_ = !0, n;
@@ -904,7 +904,7 @@ var O = (
904
904
  rootRight: n + t
905
905
  };
906
906
  }, e;
907
- }(k)
907
+ }(H)
908
908
  );
909
909
  /**
910
910
  * @license
@@ -931,7 +931,7 @@ var O = (
931
931
  var lt = (
932
932
  /** @class */
933
933
  function(a) {
934
- T(e, a);
934
+ g(e, a);
935
935
  function e() {
936
936
  return a !== null && a.apply(this, arguments) || this;
937
937
  }
@@ -1025,7 +1025,7 @@ var lt = (
1025
1025
  }, e.prototype.focus = function() {
1026
1026
  this.root.focus();
1027
1027
  }, e;
1028
- }(H)
1028
+ }(k)
1029
1029
  );
1030
1030
  /**
1031
1031
  * @license
@@ -1107,7 +1107,7 @@ R.set(_.SPACE_KEYCODE, d.SPACE_KEY);
1107
1107
  var st = (
1108
1108
  /** @class */
1109
1109
  function(a) {
1110
- T(e, a);
1110
+ g(e, a);
1111
1111
  function e(t) {
1112
1112
  var n = a.call(this, E(E({}, e.defaultAdapter), t)) || this;
1113
1113
  return n.useAutomaticActivation_ = !1, n;
@@ -1219,14 +1219,14 @@ var st = (
1219
1219
  var c = this.adapter.getTabDimensionsAtIndex(n), l = c.contentLeft - r - o, s = c.contentRight - r, u = s - _.EXTRA_SCROLL_AMOUNT, f = l + _.EXTRA_SCROLL_AMOUNT;
1220
1220
  return n < t ? Math.min(u, 0) : Math.max(f, 0);
1221
1221
  }, e.prototype.calculateScrollIncrementRTL_ = function(t, n, r, o, c) {
1222
- var l = this.adapter.getTabDimensionsAtIndex(n), s = c - l.contentLeft - r, u = c - l.contentRight - r - o, f = u + _.EXTRA_SCROLL_AMOUNT, g = s - _.EXTRA_SCROLL_AMOUNT;
1223
- return n > t ? Math.max(f, 0) : Math.min(g, 0);
1222
+ var l = this.adapter.getTabDimensionsAtIndex(n), s = c - l.contentLeft - r, u = c - l.contentRight - r - o, f = u + _.EXTRA_SCROLL_AMOUNT, T = s - _.EXTRA_SCROLL_AMOUNT;
1223
+ return n > t ? Math.max(f, 0) : Math.min(T, 0);
1224
1224
  }, e.prototype.findAdjacentTabIndexClosestToEdge_ = function(t, n, r, o) {
1225
1225
  var c = n.rootLeft - r, l = n.rootRight - r - o, s = c + l, u = c < 0 || s < 0, f = l > 0 || s > 0;
1226
1226
  return u ? t - 1 : f ? t + 1 : -1;
1227
1227
  }, e.prototype.findAdjacentTabIndexClosestToEdgeRTL_ = function(t, n, r, o, c) {
1228
- var l = c - n.rootLeft - o - r, s = c - n.rootRight - r, u = l + s, f = l > 0 || u > 0, g = s < 0 || u < 0;
1229
- return f ? t + 1 : g ? t - 1 : -1;
1228
+ var l = c - n.rootLeft - o - r, s = c - n.rootRight - r, u = l + s, f = l > 0 || u > 0, T = s < 0 || u < 0;
1229
+ return f ? t + 1 : T ? t - 1 : -1;
1230
1230
  }, e.prototype.getKeyFromEvent_ = function(t) {
1231
1231
  return L.has(t.key) ? t.key : R.get(t.keyCode);
1232
1232
  }, e.prototype.isActivationKey_ = function(t) {
@@ -1248,7 +1248,7 @@ var st = (
1248
1248
  this.adapter.incrementScroll(s);
1249
1249
  }
1250
1250
  }, e;
1251
- }(k)
1251
+ }(H)
1252
1252
  );
1253
1253
  /**
1254
1254
  * @license
@@ -1275,7 +1275,7 @@ var st = (
1275
1275
  var Q = st.strings, Pt = 0, Nt = (
1276
1276
  /** @class */
1277
1277
  function(a) {
1278
- T(e, a);
1278
+ g(e, a);
1279
1279
  function e() {
1280
1280
  return a !== null && a.apply(this, arguments) || this;
1281
1281
  }
@@ -1393,7 +1393,7 @@ var Q = st.strings, Pt = 0, Nt = (
1393
1393
  var n = this.root.querySelector(Q.TAB_SCROLLER_SELECTOR);
1394
1394
  return n ? t(n) : null;
1395
1395
  }, e;
1396
- }(H)
1396
+ }(k)
1397
1397
  );
1398
1398
  const Mt = {
1399
1399
  /**
@@ -1444,8 +1444,8 @@ const Mt = {
1444
1444
  } = a, u = rt(() => ({
1445
1445
  ...l,
1446
1446
  padding: c
1447
- }), [l, c]), f = t || "div", g = C();
1448
- return W(e, () => g.current, []), /* @__PURE__ */ p.createElement(f, x({
1447
+ }), [l, c]), f = t || "div", T = C();
1448
+ return W(e, () => T.current, []), /* @__PURE__ */ p.createElement(f, x({
1449
1449
  className: K("lmnt", "lmnt-padding", n === "dense" && "lmnt-padding--dense", n === "standard" && "lmnt-padding--standard", n === "airy" && "lmnt-padding--airy", o),
1450
1450
  style: u
1451
1451
  }, s), r);
@@ -1602,7 +1602,7 @@ const Wt = {
1602
1602
  * Defaults to **false**.
1603
1603
  */
1604
1604
  stacked: i.bool
1605
- }, Bt = {
1605
+ }, Vt = {
1606
1606
  active: void 0,
1607
1607
  badge: void 0,
1608
1608
  children: null,
@@ -1654,9 +1654,9 @@ M.defaultProps = {
1654
1654
  id: null,
1655
1655
  transition: "slide"
1656
1656
  };
1657
- const ut = /* @__PURE__ */ pt({}), Vt = (a, e) => {
1657
+ const ut = /* @__PURE__ */ pt({}), Bt = (a, e) => {
1658
1658
  if (a)
1659
- return typeof a == "string" ? /* @__PURE__ */ p.createElement(Tt, {
1659
+ return typeof a == "string" ? /* @__PURE__ */ p.createElement(gt, {
1660
1660
  tabIndex: 0,
1661
1661
  role: "button",
1662
1662
  className: "mdc-tab__icon",
@@ -1681,16 +1681,16 @@ const ut = /* @__PURE__ */ pt({}), Vt = (a, e) => {
1681
1681
  indicatorIcon: s,
1682
1682
  indicatorSize: u,
1683
1683
  indicatorTransition: f,
1684
- label: g,
1684
+ label: T,
1685
1685
  stacked: S,
1686
1686
  ...P
1687
1687
  } = a, h = C(), m = C();
1688
1688
  W(e, () => h.current, []);
1689
- const y = ft(ut), V = y.stacked || S, G = y.clustered || c;
1689
+ const y = ft(ut), B = y.stacked || S, G = y.clustered || c;
1690
1690
  D(() => (m.current = lt.attachTo(h.current), () => {
1691
1691
  m.current.destroy();
1692
1692
  }), []);
1693
- const $ = K("lmnt", "lmnt-tab", "mdc-tab", "mdc-button", t && "mdc-tab--active", G && "mdc-tab--min-width", V && "mdc-tab--stacked", o);
1693
+ const $ = K("lmnt", "lmnt-tab", "mdc-tab", "mdc-button", t && "mdc-tab--active", G && "mdc-tab--min-width", B && "mdc-tab--stacked", o);
1694
1694
  return /* @__PURE__ */ p.createElement("button", x({
1695
1695
  type: "button",
1696
1696
  "aria-selected": t,
@@ -1699,13 +1699,13 @@ const ut = /* @__PURE__ */ pt({}), Vt = (a, e) => {
1699
1699
  role: "tab"
1700
1700
  }, P), /* @__PURE__ */ p.createElement("span", {
1701
1701
  className: "mdc-tab__content"
1702
- }, l && Vt(l, g), /* @__PURE__ */ p.createElement("span", {
1702
+ }, l && Bt(l, T), /* @__PURE__ */ p.createElement("span", {
1703
1703
  className: "mdc-tab__text-label"
1704
1704
  }, r), u === "content" && /* @__PURE__ */ p.createElement(M, {
1705
1705
  active: t,
1706
1706
  icon: s,
1707
1707
  transition: f
1708
- }, s), n && !V && at(n, {
1708
+ }, s), n && !B && at(n, {
1709
1709
  className: "lmnt-tab-bar--notification-badge"
1710
1710
  })), u === "full" && /* @__PURE__ */ p.createElement(M, {
1711
1711
  active: t,
@@ -1717,7 +1717,7 @@ const ut = /* @__PURE__ */ pt({}), Vt = (a, e) => {
1717
1717
  });
1718
1718
  X.displayName = "Tab";
1719
1719
  X.propTypes = Kt;
1720
- X.defaultProps = Bt;
1720
+ X.defaultProps = Vt;
1721
1721
  const z = /* @__PURE__ */ w((a, e) => {
1722
1722
  const {
1723
1723
  align: t,
@@ -1749,7 +1749,7 @@ z.defaultProps = {
1749
1749
  className: void 0,
1750
1750
  children: void 0
1751
1751
  };
1752
- const B = /* @__PURE__ */ w((a, e) => {
1752
+ const V = /* @__PURE__ */ w((a, e) => {
1753
1753
  const {
1754
1754
  activeTabIndex: t,
1755
1755
  children: n,
@@ -1760,7 +1760,7 @@ const B = /* @__PURE__ */ w((a, e) => {
1760
1760
  onTabActivated: s,
1761
1761
  raised: u,
1762
1762
  scrollable: f,
1763
- stacked: g,
1763
+ stacked: T,
1764
1764
  variant: S,
1765
1765
  ...P
1766
1766
  } = a, h = C(), m = C();
@@ -1771,33 +1771,25 @@ const B = /* @__PURE__ */ w((a, e) => {
1771
1771
  }), [n, m, y]), D(() => {
1772
1772
  m.current.activateTab(t);
1773
1773
  }, [m, t]);
1774
- const V = K("lmnt", "lmnt-tab-bar", "mdc-tab-bar", u && !f && "mdc-tab-bar--raised", l && "mdc-tab-bar--elevated", S === "primary" && "mdc-tab-bar--primary", S === "secondary" && "mdc-tab-bar--secondary", S === "surface" && "mdc-tab-bar--surface", r), G = rt(() => ({
1775
- stacked: g,
1774
+ const B = K("lmnt", "lmnt-tab-bar", "mdc-tab-bar", u && !f && "mdc-tab-bar--raised", l && "mdc-tab-bar--elevated", S === "primary" && "mdc-tab-bar--primary", S === "secondary" && "mdc-tab-bar--secondary", S === "surface" && "mdc-tab-bar--surface", r), G = rt(() => ({
1775
+ stacked: T,
1776
1776
  clustered: c
1777
- }), [g, c]);
1777
+ }), [T, c]);
1778
1778
  return /* @__PURE__ */ p.createElement(ut.Provider, {
1779
1779
  value: G
1780
1780
  }, /* @__PURE__ */ p.createElement("div", x({
1781
- className: V,
1781
+ className: B,
1782
1782
  role: "tablist",
1783
1783
  ref: h
1784
1784
  }, P), /* @__PURE__ */ p.createElement(z, {
1785
1785
  align: o
1786
1786
  }, n)));
1787
1787
  });
1788
- B.displayName = "TabBar";
1789
- B.propTypes = Wt;
1790
- B.defaultProps = xt;
1791
- B.displayName = "TabBar";
1792
- const Yt = "_elevation_1rcw6_1", Ft = "_themeBackground_1rcw6_6", kt = "_tabBar_1rcw6_10", Ht = "_tabWrapper_1rcw6_16", jt = "_tabButton_1rcw6_20", Xt = "_childContainer_1rcw6_24", zt = "_childContainerLg_1rcw6_28", A = {
1793
- elevation: Yt,
1794
- themeBackground: Ft,
1795
- tabBar: kt,
1796
- tabWrapper: Ht,
1797
- tabButton: jt,
1798
- childContainer: Xt,
1799
- childContainerLg: zt
1800
- }, nt = (a, e, t) => !t || !e || !a ? 0 : a.findIndex((n) => `#${n.hash}` === e) ?? 0, re = ({
1788
+ V.displayName = "TabBar";
1789
+ V.propTypes = Wt;
1790
+ V.defaultProps = xt;
1791
+ V.displayName = "TabBar";
1792
+ const nt = (a, e, t) => !t || !e || !a ? 0 : a.findIndex((n) => `#${n.hash}` === e) ?? 0, Ut = ({
1801
1793
  tabs: a,
1802
1794
  hasHash: e = !0,
1803
1795
  hash: t = "",
@@ -1809,14 +1801,14 @@ const Yt = "_elevation_1rcw6_1", Ft = "_themeBackground_1rcw6_6", kt = "_tabBar_
1809
1801
  backgroundColor: s = "themeBackground",
1810
1802
  onChange: u
1811
1803
  }) => {
1812
- const [f, g] = mt(nt(a, t, e)), { isLg: S } = gt();
1804
+ const [f, T] = mt(nt(a, t, e)), { isLg: S } = Tt();
1813
1805
  D(() => {
1814
1806
  const h = nt(a, t, e);
1815
- g(h);
1807
+ T(h);
1816
1808
  }, [t, a, e]);
1817
1809
  const P = (h) => {
1818
1810
  const m = a[h].hash;
1819
- m != null && e && (window.location.hash = m), g(h), u?.(h);
1811
+ m != null && e && (window.location.hash = m), T(h), u?.(h);
1820
1812
  };
1821
1813
  return /* @__PURE__ */ I(
1822
1814
  St,
@@ -1826,7 +1818,7 @@ const Yt = "_elevation_1rcw6_1", Ft = "_themeBackground_1rcw6_6", kt = "_tabBar_
1826
1818
  children: /* @__PURE__ */ q(Y, { direction: "vertical", gap: c, secondaryAlign: "stretch", children: [
1827
1819
  /* @__PURE__ */ q(Y, { direction: S ? "horizontal" : "vertical", className: A.tabWrapper, children: [
1828
1820
  /* @__PURE__ */ I(
1829
- B,
1821
+ V,
1830
1822
  {
1831
1823
  className: A.tabBar,
1832
1824
  clustered: S ? r : !1,
@@ -1863,5 +1855,5 @@ const Yt = "_elevation_1rcw6_1", Ft = "_themeBackground_1rcw6_6", kt = "_tabBar_
1863
1855
  );
1864
1856
  };
1865
1857
  export {
1866
- re as HashTabView
1858
+ Ut as HashTabView
1867
1859
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as n, Fragment as o } from "react/jsx-runtime";
2
- import { d as h, t as a, r as c, g as t, s as e, f as r } from "../../vi.JYQecGiw-8gz0k16C.js";
3
- import { HashTabView as l } from "./HashTabView.js";
2
+ import { r as a, s as e, f as r } from "../../react.esm-BeDwcQWb.js";
3
+ import { HashTabView as c } from "./HashTabView.js";
4
+ import { d as h, t as l, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
4
5
  const m = [
5
6
  {
6
7
  title: "Map",
@@ -18,13 +19,13 @@ const m = [
18
19
  }
19
20
  ];
20
21
  h("HashTabView test", () => {
21
- a("should render HashTabView with all given tabs, icons and the initial component", () => {
22
- c(/* @__PURE__ */ n(l, { tabs: m })), t(e.getByText(/Map/)).toBeInTheDocument(), t(e.getByText("map")).toBeInTheDocument(), t(e.getByText(/TrIcon1/)).toBeInTheDocument(), t(e.getByText(/Manually/)).toBeInTheDocument(), t(e.getByText("list_alt")).toBeInTheDocument(), t(e.getByText(/TrIcon2/)).toBeInTheDocument(), t(e.getByText("My map component")).toBeInTheDocument();
23
- }), a("should change to component on tab-click", () => {
24
- c(/* @__PURE__ */ n(l, { tabs: m }));
22
+ l("should render HashTabView with all given tabs, icons and the initial component", () => {
23
+ a(/* @__PURE__ */ n(c, { tabs: m })), t(e.getByText(/Map/)).toBeInTheDocument(), t(e.getByText("map")).toBeInTheDocument(), t(e.getByText(/TrIcon1/)).toBeInTheDocument(), t(e.getByText(/Manually/)).toBeInTheDocument(), t(e.getByText("list_alt")).toBeInTheDocument(), t(e.getByText(/TrIcon2/)).toBeInTheDocument(), t(e.getByText("My map component")).toBeInTheDocument();
24
+ }), l("should change to component on tab-click", () => {
25
+ a(/* @__PURE__ */ n(c, { tabs: m }));
25
26
  const i = e.getByText(/Manually/);
26
27
  r.click(i), t(e.getByText("My manually component")).toBeInTheDocument();
27
- }), a("should render the correct tab according to hash in route", () => {
28
- c(/* @__PURE__ */ n(l, { tabs: m, hash: "#manually" })), t(e.getByText("My manually component")).toBeInTheDocument();
28
+ }), l("should render the correct tab according to hash in route", () => {
29
+ a(/* @__PURE__ */ n(c, { tabs: m, hash: "#manually" })), t(e.getByText("My manually component")).toBeInTheDocument();
29
30
  });
30
31
  });