@hortiview/shared-components 1.2.2 → 1.3.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## <small>1.3.1 (2025-04-08)</small>
2
+
3
+ * Merged PR 4716: refactor: changelog notes updated ([b3cc041](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/b3cc041)), closes [#14702](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/issues/14702)
4
+ * refactor: changelog notes updated ([158106a](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/158106a))
5
+
6
+ ## 1.3.0 (2025-04-08)
7
+
8
+ * Merge remote-tracking branch 'origin/main' into bugfix/modal-close-button-always-submits ([d9be0fd](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/d9be0fd))
9
+ * Merged PR 4715: add base modal header ([987e2d7](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/987e2d7)), closes [#14658](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/issues/14658)
10
+ * docs(README): modal section in readme updated ([a68bf3b](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/a68bf3b))
11
+ * refactor: release notes generator updated ([031c727](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/031c727))
12
+ * feat: modal header updated ([be51cb1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/be51cb1))
13
+
1
14
  ## [1.2.2](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.2.1...v1.2.2) (2025-04-08)
2
15
 
3
16
  ## [1.2.1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.2.0...v1.2.1) (2025-04-08)
package/README.md CHANGED
@@ -858,6 +858,10 @@ return <>
858
858
  Provides the normal Element modal with one additional change. If you are on fullscreen modal size the max-height and max-width is set to 100svh/svw (Smallest ViewPort height/width).
859
859
  This will set the modal size on an area between the mobile controls.
860
860
 
861
+ The modal also includes a custom header, which has a close button of type `button`.
862
+ The base Element design button has type `submit`, which breaks forms inside of the modal.
863
+ Please provide `onClose` and `title` props to get it work properly.
864
+
861
865
  ```jsx
862
866
  import { Modal } from '@hortiview/shared-components';
863
867
 
@@ -1 +1 @@
1
- ._bulletPoint_1cbin_1{display:list-item;margin-left:1.5rem}._title_1cbin_6{header{display:flex;justify-content:start;padding-left:.5rem!important;>div{margin-left:0!important}}}._modal_1cbin_17 [class*="lmnt-modal__actions mdc-dialog__actions"]{margin-bottom:0!important}._colorDanger_1cbin_21{color:var(--lmnt-theme-danger-on-surface)}._crossedOut_1cbin_25{position:relative;display:inline-block}._crossedOut_1cbin_25:after{content:"";position:absolute;width:3rem;height:.25rem;left:50%;top:50%;background:var(--lmnt-theme-danger-on-surface);box-shadow:0 0 0 .125rem var(--lmnt-theme-background);transform:translate(-50%,calc(-50% - .25rem)) rotate(45deg);transform-origin:center;z-index:2}
1
+ ._bulletPoint_bd412_1{display:list-item;margin-left:1.5rem}._modal_bd412_7 [class*="lmnt-modal__actions mdc-dialog__actions"]{margin-bottom:0!important}._colorDanger_bd412_11{color:var(--lmnt-theme-danger-on-surface)}._crossedOut_bd412_15{position:relative;display:inline-block}._crossedOut_bd412_15:after{content:"";position:absolute;width:3rem;height:.25rem;left:50%;top:50%;background:var(--lmnt-theme-danger-on-surface);box-shadow:0 0 0 .125rem var(--lmnt-theme-background);transform:translate(-50%,calc(-50% - .25rem)) rotate(45deg);transform-origin:center;z-index:2}
@@ -1 +1 @@
1
- ._modal_a4n3a_1 div[class*=lmnt-modal__surface]{max-height:100svh!important;max-width:100svw!important}._modal_a4n3a_1 header button{top:0!important}
1
+ ._modal_br5s5_1 div[class*=lmnt-modal__surface]{max-height:100svh!important;max-width:100svw!important}._title_br5s5_6{header{display:flex;justify-content:start;padding-left:.5rem!important;>div{width:100%;margin-left:0!important}}}
@@ -1,118 +1,108 @@
1
- import { jsx as o, jsxs as d, Fragment as m } from "react/jsx-runtime";
2
- import { B as p } from "../../index.es-CiqbARoC.js";
3
- import { G as l } from "../../index.es-DntoATwO.js";
4
- import { I as k } from "../../index.es-3043KTnb.js";
5
- import { I as A } from "../../index.es-0lQcz8m1.js";
6
- import { T as B, b as i } from "../../index.es-CF_xy2ns.js";
7
- import { u as N } from "../../uniqueId-NU3-C36A.js";
8
- import { AvailableCustomIcons as O } from "../../enums/AvailableCustomIcons.js";
9
- import { u as S } from "../../useBreakpoints-MzTZ0tCT.js";
10
- import { Iconify as x } from "../Iconify/Iconify.js";
11
- import { Modal as M } from "../Modal/Modal.js";
12
- import '../../assets/DeleteModal.css';const j = "_bulletPoint_1cbin_1", z = "_title_1cbin_6", P = "_modal_1cbin_17", G = "_colorDanger_1cbin_21", $ = "_crossedOut_1cbin_25", t = {
13
- bulletPoint: j,
14
- title: z,
15
- modal: P,
16
- colorDanger: G,
17
- crossedOut: $
18
- }, Z = ({
19
- title: e,
20
- confirmButtonLabel: r,
1
+ import { jsx as o, jsxs as p, Fragment as i } from "react/jsx-runtime";
2
+ import { B as u } from "../../index.es-CiqbARoC.js";
3
+ import { G as c } from "../../index.es-DntoATwO.js";
4
+ import { I as D } from "../../index.es-3043KTnb.js";
5
+ import { b as l } from "../../index.es-CF_xy2ns.js";
6
+ import { u as k } from "../../uniqueId-NU3-C36A.js";
7
+ import { AvailableCustomIcons as I } from "../../enums/AvailableCustomIcons.js";
8
+ import { u as N } from "../../useBreakpoints-MzTZ0tCT.js";
9
+ import { Iconify as O } from "../Iconify/Iconify.js";
10
+ import { Modal as S } from "../Modal/Modal.js";
11
+ import '../../assets/DeleteModal.css';const x = "_bulletPoint_bd412_1", B = "_modal_bd412_7", M = "_colorDanger_bd412_11", j = "_crossedOut_bd412_15", t = {
12
+ bulletPoint: x,
13
+ modal: B,
14
+ colorDanger: M,
15
+ crossedOut: j
16
+ }, R = ({
17
+ title: r,
18
+ confirmButtonLabel: e,
21
19
  cancelButtonLabel: n,
22
20
  deleteHeader: a,
23
- deleteBody: c,
21
+ deleteBody: s,
24
22
  deleteText: f,
25
23
  icon: b,
26
24
  isIconCrossedOut: g,
27
25
  impossibleDeleteHeader: h,
28
- open: y,
29
- setOpen: s,
30
- onDelete: _,
31
- onCancel: v,
32
- isDeletePossible: u = !0
26
+ open: v,
27
+ setOpen: d,
28
+ onDelete: y,
29
+ onCancel: _,
30
+ isDeletePossible: m = !0
33
31
  }) => {
34
- const { isDesktop: C } = S(), I = (D) => {
35
- D.detail.action === "close" && s(!1);
36
- };
32
+ const { isDesktop: C } = N();
37
33
  return /* @__PURE__ */ o(
38
- M,
34
+ S,
39
35
  {
40
- className: `${t.modal} ${t.title}`,
36
+ className: `${t.modal}`,
41
37
  modalSize: C ? "small" : "fullscreen",
42
- open: y,
43
- onClose: I,
44
- hideCloseIcon: !0,
45
- headerActions: [
46
- /* @__PURE__ */ d(l, { primaryAlign: "center", secondaryAlign: "center", children: [
47
- /* @__PURE__ */ o(A, { icon: "close", onClick: () => s(!1), type: "button" }),
48
- /* @__PURE__ */ o(B, { level: 6, children: e })
49
- ] }, "group")
50
- ],
38
+ open: v,
39
+ title: r,
40
+ onClose: () => d(!1),
51
41
  primaryButton: /* @__PURE__ */ o(
52
- p,
42
+ u,
53
43
  {
54
44
  "data-testid": "delete-button",
55
45
  variant: "danger",
56
- label: r,
57
- onClick: _,
58
- disabled: !u
46
+ label: e,
47
+ onClick: y,
48
+ disabled: !m
59
49
  }
60
50
  ),
61
51
  footerSupplemental: /* @__PURE__ */ o(
62
- p,
52
+ u,
63
53
  {
64
54
  "data-testid": "cancel-button",
65
55
  variant: "text",
66
56
  label: n,
67
57
  onClick: () => {
68
- v?.(), s(!1);
58
+ _?.(), d(!1);
69
59
  }
70
60
  }
71
61
  ),
72
- children: /* @__PURE__ */ d(l, { direction: "vertical", secondaryAlign: "center", children: [
73
- /* @__PURE__ */ o(q, { element: /* @__PURE__ */ o(F, { icon: b }), isCrossedOut: g }),
74
- /* @__PURE__ */ o(l, { direction: "vertical", children: u ? /* @__PURE__ */ o(
75
- H,
62
+ children: /* @__PURE__ */ p(c, { direction: "vertical", secondaryAlign: "center", children: [
63
+ /* @__PURE__ */ o(z, { element: /* @__PURE__ */ o(P, { icon: b }), isCrossedOut: g }),
64
+ /* @__PURE__ */ o(c, { direction: "vertical", children: m ? /* @__PURE__ */ o(
65
+ A,
76
66
  {
77
67
  deleteHeader: a,
78
68
  deleteText: f,
79
- deleteBody: c
69
+ deleteBody: s
80
70
  }
81
- ) : /* @__PURE__ */ o(w, { impossibleDeleteHeader: h }) })
71
+ ) : /* @__PURE__ */ o(G, { impossibleDeleteHeader: h }) })
82
72
  ] })
83
73
  }
84
74
  );
85
- }, q = ({
86
- element: e,
87
- isCrossedOut: r = !1
88
- }) => r ? /* @__PURE__ */ o("span", { className: t.crossedOut, children: e }) : e, F = ({ icon: e }) => e ? typeof e != "string" ? e : Object.values(O).includes(e) ? /* @__PURE__ */ o(
89
- x,
75
+ }, z = ({
76
+ element: r,
77
+ isCrossedOut: e = !1
78
+ }) => e ? /* @__PURE__ */ o("span", { className: t.crossedOut, children: r }) : r, P = ({ icon: r }) => r ? typeof r != "string" ? r : Object.values(I).includes(r) ? /* @__PURE__ */ o(
79
+ O,
90
80
  {
91
- icon: e,
81
+ icon: r,
92
82
  iconSize: "xlarge",
93
83
  className: t.colorDanger
94
84
  }
95
- ) : /* @__PURE__ */ o(k, { icon: e, iconSize: "xlarge", className: t.colorDanger }) : /* @__PURE__ */ o(m, {}), H = ({
96
- deleteHeader: e,
97
- deleteText: r,
85
+ ) : /* @__PURE__ */ o(D, { icon: r, iconSize: "xlarge", className: t.colorDanger }) : /* @__PURE__ */ o(i, {}), A = ({
86
+ deleteHeader: r,
87
+ deleteText: e,
98
88
  deleteBody: n
99
- }) => /* @__PURE__ */ d(m, { children: [
100
- /* @__PURE__ */ o(i, { level: 1, themeColor: "text-primary-on-background", children: e }),
101
- r && typeof r == "string" && /* @__PURE__ */ o(i, { level: 2, themeColor: "text-secondary-on-background", children: r }),
102
- r && typeof r != "string" && /* @__PURE__ */ o(m, { children: r }),
103
- n && r === void 0 && /* @__PURE__ */ o(l, { direction: "vertical", gap: "none", children: n.map((a, c) => /* @__PURE__ */ o(
104
- i,
89
+ }) => /* @__PURE__ */ p(i, { children: [
90
+ /* @__PURE__ */ o(l, { level: 1, themeColor: "text-primary-on-background", children: r }),
91
+ e && typeof e == "string" && /* @__PURE__ */ o(l, { level: 2, themeColor: "text-secondary-on-background", children: e }),
92
+ e && typeof e != "string" && /* @__PURE__ */ o(i, { children: e }),
93
+ n && e === void 0 && /* @__PURE__ */ o(c, { direction: "vertical", gap: "none", children: n.map((a, s) => /* @__PURE__ */ o(
94
+ l,
105
95
  {
106
96
  level: 2,
107
97
  className: t.bulletPoint,
108
98
  themeColor: "text-secondary-on-background",
109
99
  children: a
110
100
  },
111
- N(c.toString())
101
+ k(s.toString())
112
102
  )) })
113
- ] }), w = ({
114
- impossibleDeleteHeader: e
115
- }) => /* @__PURE__ */ o(i, { level: 1, themeColor: "text-primary-on-background", children: e });
103
+ ] }), G = ({
104
+ impossibleDeleteHeader: r
105
+ }) => /* @__PURE__ */ o(l, { level: 1, themeColor: "text-primary-on-background", children: r });
116
106
  export {
117
- Z as DeleteModal
107
+ R as DeleteModal
118
108
  };
@@ -1,3 +1,13 @@
1
1
  import { ModalProps } from '@element-public/react-modal';
2
2
 
3
- export declare const Modal: (props: ModalProps & React.HTMLProps<HTMLElement> & React.DOMAttributes<HTMLElement>) => import("react/jsx-runtime").JSX.Element;
3
+ /**
4
+ * A custom modal providing a custom header and close button.
5
+ * Which can be overridden by the user.
6
+ * @param onClose - The function to call when the modal is closed - Should be passed to the modal.
7
+ * @param title - The title of the modal.
8
+ * @param headerActions - The actions to display in the header of the modal.
9
+ * @param hideCloseIcon - If true, the close icon will be hidden. @default true.
10
+ * @param - Other element props to pass to the modal.
11
+ * @returns
12
+ */
13
+ export declare const Modal: ({ onClose, title, headerActions, hideCloseIcon, ...props }: ModalProps & React.HTMLProps<HTMLElement> & React.DOMAttributes<HTMLElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,14 @@
1
- import { jsx as ct } from "react/jsx-runtime";
2
- import { _ as dt, c as R, P as s } from "../../identity-DLWZln-X.js";
3
- import d, { forwardRef as ut, useRef as Q, useImperativeHandle as mt, useState as X, useEffect as h, useCallback as V, useMemo as Z } from "react";
4
- import { I as ft } from "../../index.es-0lQcz8m1.js";
5
- import { i as pt, c as O, a as ht } from "../../index.es-da0cf7oE.js";
6
- import { b as et, c as tt, d as Et } from "../../tslib.es6-BDCynO9F.js";
7
- import { M as gt, a as _t } from "../../component-neHBNHRu.js";
8
- import { M as Ct, c as St, m as vt } from "../../component-DsB0poTj.js";
9
- import { A as yt } from "../../animationframe-EMBh6XeO.js";
1
+ import { jsxs as ft, jsx as O } from "react/jsx-runtime";
2
+ import { G as W } from "../../index.es-DntoATwO.js";
3
+ import { I as it } from "../../index.es-0lQcz8m1.js";
4
+ import { _ as pt, c as B, P as s } from "../../identity-DLWZln-X.js";
5
+ import u, { forwardRef as ht, useRef as tt, useImperativeHandle as gt, useState as et, useEffect as g, useCallback as z, useMemo as $ } from "react";
6
+ import { i as Et, c as T, a as _t } from "../../index.es-da0cf7oE.js";
7
+ import { b as at, c as nt, d as Ct } from "../../tslib.es6-BDCynO9F.js";
8
+ import { M as St, a as vt } from "../../component-neHBNHRu.js";
9
+ import { M as yt, c as Ot, m as Tt } from "../../component-DsB0poTj.js";
10
+ import { A as At } from "../../animationframe-EMBh6XeO.js";
11
+ import { T as bt } from "../../index.es-CF_xy2ns.js";
10
12
  import '../../assets/Modal.css';/**
11
13
  * @license
12
14
  * Copyright 2016 Google Inc.
@@ -29,19 +31,19 @@ import '../../assets/Modal.css';/**
29
31
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30
32
  * THE SOFTWARE.
31
33
  */
32
- function Ot(i, e, t) {
34
+ function Dt(i, e, t) {
33
35
  return e(i, { initialFocusEl: t });
34
36
  }
35
- function Tt(i) {
37
+ function It(i) {
36
38
  return i ? i.scrollHeight > i.offsetHeight : !1;
37
39
  }
38
- function At(i) {
40
+ function Nt(i) {
39
41
  return i ? i.scrollTop === 0 : !1;
40
42
  }
41
- function bt(i) {
43
+ function Lt(i) {
42
44
  return i ? Math.ceil(i.scrollHeight - i.scrollTop) === i.clientHeight : !1;
43
45
  }
44
- function Dt(i) {
46
+ function Ft(i) {
45
47
  var e = /* @__PURE__ */ new Set();
46
48
  return [].forEach.call(i, function(t) {
47
49
  return e.add(t.offsetTop);
@@ -69,7 +71,7 @@ function Dt(i) {
69
71
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
70
72
  * THE SOFTWARE.
71
73
  */
72
- var W = "mdc-dom-focus-sentinel", It = (
74
+ var j = "mdc-dom-focus-sentinel", Rt = (
73
75
  /** @class */
74
76
  function() {
75
77
  function i(e, t) {
@@ -81,7 +83,7 @@ var W = "mdc-dom-focus-sentinel", It = (
81
83
  throw new Error("FocusTrap: Element must have at least one focusable child.");
82
84
  this.elFocusedBeforeTrapFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null, this.wrapTabFocus(this.root), this.options.skipInitialFocus || this.focusInitialElement(e, this.options.initialFocusEl);
83
85
  }, i.prototype.releaseFocus = function() {
84
- [].slice.call(this.root.querySelectorAll("." + W)).forEach(function(e) {
86
+ [].slice.call(this.root.querySelectorAll("." + j)).forEach(function(e) {
85
87
  e.parentElement.removeChild(e);
86
88
  }), !this.options.skipRestoreFocus && this.elFocusedBeforeTrapFocus && this.elFocusedBeforeTrapFocus.focus();
87
89
  }, i.prototype.wrapTabFocus = function(e) {
@@ -99,16 +101,16 @@ var W = "mdc-dom-focus-sentinel", It = (
99
101
  }, i.prototype.getFocusableElements = function(e) {
100
102
  var t = [].slice.call(e.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button"));
101
103
  return t.filter(function(n) {
102
- var o = n.getAttribute("aria-disabled") === "true" || n.getAttribute("disabled") != null || n.getAttribute("hidden") != null || n.getAttribute("aria-hidden") === "true", a = n.tabIndex >= 0 && n.getBoundingClientRect().width > 0 && !n.classList.contains(W) && !o, f = !1;
104
+ var o = n.getAttribute("aria-disabled") === "true" || n.getAttribute("disabled") != null || n.getAttribute("hidden") != null || n.getAttribute("aria-hidden") === "true", a = n.tabIndex >= 0 && n.getBoundingClientRect().width > 0 && !n.classList.contains(j) && !o, d = !1;
103
105
  if (a) {
104
- var E = getComputedStyle(n);
105
- f = E.display === "none" || E.visibility === "hidden";
106
+ var p = getComputedStyle(n);
107
+ d = p.display === "none" || p.visibility === "hidden";
106
108
  }
107
- return a && !f;
109
+ return a && !d;
108
110
  });
109
111
  }, i.prototype.createSentinel = function() {
110
112
  var e = document.createElement("div");
111
- return e.setAttribute("tabindex", "0"), e.setAttribute("aria-hidden", "true"), e.classList.add(W), e;
113
+ return e.setAttribute("tabindex", "0"), e.setAttribute("aria-hidden", "true"), e.classList.add(j), e;
112
114
  }, i;
113
115
  }()
114
116
  );
@@ -187,7 +189,7 @@ var r = {
187
189
  ".mdc-menu .mdc-deprecated-list-item"
188
190
  ].join(", "),
189
191
  SURFACE_SELECTOR: ".mdc-dialog__surface"
190
- }, z = {
192
+ }, q = {
191
193
  DIALOG_ANIMATION_CLOSE_TIME_MS: 75,
192
194
  DIALOG_ANIMATION_OPEN_TIME_MS: 150
193
195
  };
@@ -213,17 +215,17 @@ var r = {
213
215
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
214
216
  * THE SOFTWARE.
215
217
  */
216
- var B;
218
+ var w;
217
219
  (function(i) {
218
220
  i.POLL_SCROLL_POS = "poll_scroll_position", i.POLL_LAYOUT_CHANGE = "poll_layout_change";
219
- })(B || (B = {}));
220
- var nt = (
221
+ })(w || (w = {}));
222
+ var rt = (
221
223
  /** @class */
222
224
  function(i) {
223
- et(e, i);
225
+ at(e, i);
224
226
  function e(t) {
225
- var n = i.call(this, tt(tt({}, e.defaultAdapter), t)) || this;
226
- return n.dialogOpen = !1, n.isFullscreen = !1, n.animationFrame = 0, n.animationTimer = 0, n.escapeKeyAction = C.CLOSE_ACTION, n.scrimClickAction = C.CLOSE_ACTION, n.autoStackButtons = !0, n.areButtonsStacked = !1, n.suppressDefaultPressSelector = C.SUPPRESS_DEFAULT_PRESS_SELECTOR, n.animFrame = new yt(), n.contentScrollHandler = function() {
227
+ var n = i.call(this, nt(nt({}, e.defaultAdapter), t)) || this;
228
+ return n.dialogOpen = !1, n.isFullscreen = !1, n.animationFrame = 0, n.animationTimer = 0, n.escapeKeyAction = C.CLOSE_ACTION, n.scrimClickAction = C.CLOSE_ACTION, n.autoStackButtons = !0, n.areButtonsStacked = !1, n.suppressDefaultPressSelector = C.SUPPRESS_DEFAULT_PRESS_SELECTOR, n.animFrame = new At(), n.contentScrollHandler = function() {
227
229
  n.handleScrollEvent();
228
230
  }, n.windowResizeHandler = function() {
229
231
  n.layout();
@@ -245,7 +247,7 @@ var nt = (
245
247
  configurable: !0
246
248
  }), Object.defineProperty(e, "numbers", {
247
249
  get: function() {
248
- return z;
250
+ return q;
249
251
  },
250
252
  enumerable: !1,
251
253
  configurable: !0
@@ -321,13 +323,13 @@ var nt = (
321
323
  this.dialogOpen = !0, this.adapter.notifyOpening(), this.adapter.addClass(r.OPENING), this.isFullscreen && this.adapter.registerContentEventHandler("scroll", this.contentScrollHandler), t && t.isAboveFullscreenDialog && this.adapter.addClass(r.SCRIM_HIDDEN), this.adapter.registerWindowEventHandler("resize", this.windowResizeHandler), this.adapter.registerWindowEventHandler("orientationchange", this.windowOrientationChangeHandler), this.runNextAnimationFrame(function() {
322
324
  n.adapter.addClass(r.OPEN), n.adapter.addBodyClass(r.SCROLL_LOCK), n.layout(), n.animationTimer = setTimeout(function() {
323
325
  n.handleAnimationTimerEnd(), n.adapter.trapFocus(n.adapter.getInitialFocusEl()), n.adapter.notifyOpened();
324
- }, z.DIALOG_ANIMATION_OPEN_TIME_MS);
326
+ }, q.DIALOG_ANIMATION_OPEN_TIME_MS);
325
327
  });
326
328
  }, e.prototype.close = function(t) {
327
329
  var n = this;
328
330
  t === void 0 && (t = ""), this.dialogOpen && (this.dialogOpen = !1, this.adapter.notifyClosing(t), this.adapter.addClass(r.CLOSING), this.adapter.removeClass(r.OPEN), this.adapter.removeBodyClass(r.SCROLL_LOCK), this.isFullscreen && this.adapter.deregisterContentEventHandler("scroll", this.contentScrollHandler), this.adapter.deregisterWindowEventHandler("resize", this.windowResizeHandler), this.adapter.deregisterWindowEventHandler("orientationchange", this.windowOrientationChangeHandler), cancelAnimationFrame(this.animationFrame), this.animationFrame = 0, clearTimeout(this.animationTimer), this.animationTimer = setTimeout(function() {
329
331
  n.adapter.releaseFocus(), n.handleAnimationTimerEnd(), n.adapter.notifyClosed(t);
330
- }, z.DIALOG_ANIMATION_CLOSE_TIME_MS));
332
+ }, q.DIALOG_ANIMATION_CLOSE_TIME_MS));
331
333
  }, e.prototype.showSurfaceScrim = function() {
332
334
  var t = this;
333
335
  this.adapter.addClass(r.SURFACE_SCRIM_SHOWING), this.runNextAnimationFrame(function() {
@@ -357,7 +359,7 @@ var nt = (
357
359
  this.suppressDefaultPressSelector = t;
358
360
  }, e.prototype.layout = function() {
359
361
  var t = this;
360
- this.animFrame.request(B.POLL_LAYOUT_CHANGE, function() {
362
+ this.animFrame.request(w.POLL_LAYOUT_CHANGE, function() {
361
363
  t.layoutInternal();
362
364
  });
363
365
  }, e.prototype.handleClick = function(t) {
@@ -373,8 +375,8 @@ var nt = (
373
375
  if (n) {
374
376
  var o = this.adapter.getActionFromEvent(t);
375
377
  if (!o) {
376
- var a = t.composedPath ? t.composedPath()[0] : t.target, f = this.suppressDefaultPressSelector ? !this.adapter.eventTargetMatches(a, this.suppressDefaultPressSelector) : !0;
377
- n && f && this.adapter.clickDefaultButton();
378
+ var a = t.composedPath ? t.composedPath()[0] : t.target, d = this.suppressDefaultPressSelector ? !this.adapter.eventTargetMatches(a, this.suppressDefaultPressSelector) : !0;
379
+ n && d && this.adapter.clickDefaultButton();
378
380
  }
379
381
  }
380
382
  }, e.prototype.handleDocumentKeydown = function(t) {
@@ -382,7 +384,7 @@ var nt = (
382
384
  n && this.escapeKeyAction !== "" && this.close(this.escapeKeyAction);
383
385
  }, e.prototype.handleScrollEvent = function() {
384
386
  var t = this;
385
- this.animFrame.request(B.POLL_SCROLL_POS, function() {
387
+ this.animFrame.request(w.POLL_SCROLL_POS, function() {
386
388
  t.toggleScrollDividerHeader(), t.toggleScrollDividerFooter();
387
389
  });
388
390
  }, e.prototype.layoutInternal = function() {
@@ -405,7 +407,7 @@ var nt = (
405
407
  }, e.prototype.toggleScrollDividerFooter = function() {
406
408
  this.adapter.isScrollableContentAtBottom() ? this.adapter.hasClass(r.SCROLL_DIVIDER_FOOTER) && this.adapter.removeClass(r.SCROLL_DIVIDER_FOOTER) : this.adapter.addClass(r.SCROLL_DIVIDER_FOOTER);
407
409
  }, e;
408
- }(gt)
410
+ }(St)
409
411
  );
410
412
  /**
411
413
  * @license
@@ -429,10 +431,10 @@ var nt = (
429
431
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
430
432
  * THE SOFTWARE.
431
433
  */
432
- var u = nt.strings, Nt = (
434
+ var m = rt.strings, Bt = (
433
435
  /** @class */
434
436
  function(i) {
435
- et(e, i);
437
+ at(e, i);
436
438
  function e() {
437
439
  return i !== null && i.apply(this, arguments) || this;
438
440
  }
@@ -473,36 +475,36 @@ var u = nt.strings, Nt = (
473
475
  return new e(t);
474
476
  }, e.prototype.initialize = function(t) {
475
477
  var n, o;
476
- t === void 0 && (t = function(g, _) {
477
- return new It(g, _);
478
+ t === void 0 && (t = function(E, _) {
479
+ return new Rt(E, _);
478
480
  });
479
- var a = this.root.querySelector(u.CONTAINER_SELECTOR);
481
+ var a = this.root.querySelector(m.CONTAINER_SELECTOR);
480
482
  if (!a)
481
- throw new Error("Dialog component requires a " + u.CONTAINER_SELECTOR + " container element");
482
- this.container = a, this.content = this.root.querySelector(u.CONTENT_SELECTOR), this.buttons = [].slice.call(this.root.querySelectorAll(u.BUTTON_SELECTOR)), this.defaultButton = this.root.querySelector("[" + u.BUTTON_DEFAULT_ATTRIBUTE + "]"), this.focusTrapFactory = t, this.buttonRipples = [];
483
+ throw new Error("Dialog component requires a " + m.CONTAINER_SELECTOR + " container element");
484
+ this.container = a, this.content = this.root.querySelector(m.CONTENT_SELECTOR), this.buttons = [].slice.call(this.root.querySelectorAll(m.BUTTON_SELECTOR)), this.defaultButton = this.root.querySelector("[" + m.BUTTON_DEFAULT_ATTRIBUTE + "]"), this.focusTrapFactory = t, this.buttonRipples = [];
483
485
  try {
484
- for (var f = Et(this.buttons), E = f.next(); !E.done; E = f.next()) {
485
- var T = E.value;
486
- this.buttonRipples.push(new Ct(T));
486
+ for (var d = Ct(this.buttons), p = d.next(); !p.done; p = d.next()) {
487
+ var A = p.value;
488
+ this.buttonRipples.push(new yt(A));
487
489
  }
488
- } catch (g) {
489
- n = { error: g };
490
+ } catch (E) {
491
+ n = { error: E };
490
492
  } finally {
491
493
  try {
492
- E && !E.done && (o = f.return) && o.call(f);
494
+ p && !p.done && (o = d.return) && o.call(d);
493
495
  } finally {
494
496
  if (n) throw n.error;
495
497
  }
496
498
  }
497
499
  }, e.prototype.initialSyncWithDOM = function() {
498
500
  var t = this;
499
- this.focusTrap = Ot(this.container, this.focusTrapFactory, this.getInitialFocusEl() || void 0), this.handleClick = this.foundation.handleClick.bind(this.foundation), this.handleKeydown = this.foundation.handleKeydown.bind(this.foundation), this.handleDocumentKeydown = this.foundation.handleDocumentKeydown.bind(this.foundation), this.handleOpening = function() {
501
+ this.focusTrap = Dt(this.container, this.focusTrapFactory, this.getInitialFocusEl() || void 0), this.handleClick = this.foundation.handleClick.bind(this.foundation), this.handleKeydown = this.foundation.handleKeydown.bind(this.foundation), this.handleDocumentKeydown = this.foundation.handleDocumentKeydown.bind(this.foundation), this.handleOpening = function() {
500
502
  document.addEventListener("keydown", t.handleDocumentKeydown);
501
503
  }, this.handleClosing = function() {
502
504
  document.removeEventListener("keydown", t.handleDocumentKeydown);
503
- }, this.listen("click", this.handleClick), this.listen("keydown", this.handleKeydown), this.listen(u.OPENING_EVENT, this.handleOpening), this.listen(u.CLOSING_EVENT, this.handleClosing);
505
+ }, this.listen("click", this.handleClick), this.listen("keydown", this.handleKeydown), this.listen(m.OPENING_EVENT, this.handleOpening), this.listen(m.CLOSING_EVENT, this.handleClosing);
504
506
  }, e.prototype.destroy = function() {
505
- this.unlisten("click", this.handleClick), this.unlisten("keydown", this.handleKeydown), this.unlisten(u.OPENING_EVENT, this.handleOpening), this.unlisten(u.CLOSING_EVENT, this.handleClosing), this.handleClosing(), this.buttonRipples.forEach(function(t) {
507
+ this.unlisten("click", this.handleClick), this.unlisten("keydown", this.handleKeydown), this.unlisten(m.OPENING_EVENT, this.handleOpening), this.unlisten(m.CLOSING_EVENT, this.handleClosing), this.handleClosing(), this.buttonRipples.forEach(function(t) {
506
508
  t.destroy();
507
509
  }), i.prototype.destroy.call(this);
508
510
  }, e.prototype.layout = function() {
@@ -520,19 +522,19 @@ var u = nt.strings, Nt = (
520
522
  return t.root.classList.add(o);
521
523
  },
522
524
  areButtonsStacked: function() {
523
- return Dt(t.buttons);
525
+ return Ft(t.buttons);
524
526
  },
525
527
  clickDefaultButton: function() {
526
528
  t.defaultButton && t.defaultButton.click();
527
529
  },
528
530
  eventTargetMatches: function(o, a) {
529
- return o ? vt(o, a) : !1;
531
+ return o ? Tt(o, a) : !1;
530
532
  },
531
533
  getActionFromEvent: function(o) {
532
534
  if (!o.target)
533
535
  return "";
534
- var a = St(o.target, "[" + u.ACTION_ATTRIBUTE + "]");
535
- return a && a.getAttribute(u.ACTION_ATTRIBUTE);
536
+ var a = Ot(o.target, "[" + m.ACTION_ATTRIBUTE + "]");
537
+ return a && a.getAttribute(m.ACTION_ATTRIBUTE);
536
538
  },
537
539
  getInitialFocusEl: function() {
538
540
  return t.getInitialFocusEl();
@@ -541,19 +543,19 @@ var u = nt.strings, Nt = (
541
543
  return t.root.classList.contains(o);
542
544
  },
543
545
  isContentScrollable: function() {
544
- return Tt(t.content);
546
+ return It(t.content);
545
547
  },
546
548
  notifyClosed: function(o) {
547
- return t.emit(u.CLOSED_EVENT, o ? { action: o } : {});
549
+ return t.emit(m.CLOSED_EVENT, o ? { action: o } : {});
548
550
  },
549
551
  notifyClosing: function(o) {
550
- return t.emit(u.CLOSING_EVENT, o ? { action: o } : {});
552
+ return t.emit(m.CLOSING_EVENT, o ? { action: o } : {});
551
553
  },
552
554
  notifyOpened: function() {
553
- return t.emit(u.OPENED_EVENT, {});
555
+ return t.emit(m.OPENED_EVENT, {});
554
556
  },
555
557
  notifyOpening: function() {
556
- return t.emit(u.OPENING_EVENT, {});
558
+ return t.emit(m.OPENING_EVENT, {});
557
559
  },
558
560
  releaseFocus: function() {
559
561
  t.focusTrap.releaseFocus();
@@ -579,10 +581,10 @@ var u = nt.strings, Nt = (
579
581
  t.content instanceof HTMLElement && t.content.removeEventListener(o, a);
580
582
  },
581
583
  isScrollableContentAtTop: function() {
582
- return At(t.content);
584
+ return Nt(t.content);
583
585
  },
584
586
  isScrollableContentAtBottom: function() {
585
- return bt(t.content);
587
+ return Lt(t.content);
586
588
  },
587
589
  registerWindowEventHandler: function(o, a) {
588
590
  window.addEventListener(o, a);
@@ -591,13 +593,13 @@ var u = nt.strings, Nt = (
591
593
  window.removeEventListener(o, a);
592
594
  }
593
595
  };
594
- return new nt(n);
596
+ return new rt(n);
595
597
  }, e.prototype.getInitialFocusEl = function() {
596
- return this.root.querySelector("[" + u.INITIAL_FOCUS_ATTRIBUTE + "]");
598
+ return this.root.querySelector("[" + m.INITIAL_FOCUS_ATTRIBUTE + "]");
597
599
  }, e;
598
- }(_t)
600
+ }(vt)
599
601
  );
600
- const Lt = {
602
+ const wt = {
601
603
  /**
602
604
  * An action button that will not automatically trigger a dismiss or accept. It is meant to be used only in certain circumstances where more control of the modal is required such as validating forms. If primaryButton is sent with actionButton, actionButton will be ignored.
603
605
  *
@@ -760,7 +762,7 @@ const Lt = {
760
762
  * Defaults to **null**.
761
763
  */
762
764
  title: s.string
763
- }, Ft = {
765
+ }, Mt = {
764
766
  actionButton: null,
765
767
  backButton: null,
766
768
  badge: void 0,
@@ -784,149 +786,168 @@ const Lt = {
784
786
  returnFocusSelector: null,
785
787
  scrollable: !1,
786
788
  title: null
787
- }, w = /* @__PURE__ */ ut((i, e) => {
789
+ }, M = /* @__PURE__ */ ht((i, e) => {
788
790
  const {
789
791
  actionButton: t,
790
792
  actionIcons: n,
791
793
  badge: o,
792
794
  backButton: a,
793
- children: f,
794
- className: E,
795
- content: T,
796
- defaultButton: g,
795
+ children: d,
796
+ className: p,
797
+ content: A,
798
+ defaultButton: E,
797
799
  dismissiveButton: _,
798
- footerSupplemental: A,
799
- headerActions: q,
800
- hideCloseIcon: M,
801
- indicator: ot,
800
+ footerSupplemental: b,
801
+ headerActions: Y,
802
+ hideCloseIcon: k,
803
+ indicator: st,
802
804
  initialFocus: S,
803
- mobileStackedButtons: k,
804
- modalSize: p,
805
+ mobileStackedButtons: H,
806
+ modalSize: h,
805
807
  nextButton: v,
806
808
  noActions: y,
807
- onClose: H,
808
- onClosed: P,
809
- onOpen: b,
810
- onOpened: D,
811
- open: j,
812
- preventClose: U,
813
- preventPrimaryAccept: Y,
809
+ onClose: P,
810
+ onClosed: U,
811
+ onOpen: D,
812
+ onOpened: I,
813
+ open: J,
814
+ preventClose: x,
815
+ preventPrimaryAccept: Q,
814
816
  primaryButton: c,
815
- returnFocusSelector: x,
816
- scrollable: $,
817
- title: J,
818
- ...it
819
- } = i, I = Q(), l = Q();
820
- mt(e, () => I.current, []);
821
- const [K, at] = X(), [G, rt] = X(() => v || a);
822
- h(() => {
823
- rt(v || a);
817
+ returnFocusSelector: G,
818
+ scrollable: X,
819
+ title: Z,
820
+ ...lt
821
+ } = i, N = tt(), l = tt();
822
+ gt(e, () => N.current, []);
823
+ const [K, ct] = et(), [V, dt] = et(() => v || a);
824
+ g(() => {
825
+ dt(v || a);
824
826
  }, [v, a]);
825
- const N = V(() => {
826
- at(window.innerWidth <= 600);
827
+ const L = z(() => {
828
+ ct(window.innerWidth <= 600);
827
829
  }, []);
828
- h(() => (N(), window.addEventListener("resize", N), () => {
829
- window.removeEventListener("resize", N);
830
- }), [N]), h(() => (l.current = Nt.attachTo(I.current), () => {
830
+ g(() => (L(), window.addEventListener("resize", L), () => {
831
+ window.removeEventListener("resize", L);
832
+ }), [L]), g(() => (l.current = Bt.attachTo(N.current), () => {
831
833
  l.current.destroy();
832
- }), [l, I]), h(() => {
833
- l.current.foundation.setAutoStackButtons(k);
834
- }, [k]), h(() => {
834
+ }), [l, N]), g(() => {
835
+ l.current.foundation.setAutoStackButtons(H);
836
+ }, [H]), g(() => {
835
837
  y && (l.current.foundation.adapter.trapFocus = () => {
836
838
  });
837
- }, [y]), h(() => {
838
- l.current.scrimClickAction = U ? "" : "close", l.current.escapeKeyAction = U ? "" : "close";
839
- }, [U]);
840
- const L = V((m) => {
841
- H && H(m);
842
- }, [H]), F = V((m) => {
843
- x && pt(x), P && P(m);
844
- }, [x, P]);
845
- h(() => (l.current.unlisten("MDCDialog: opening", b), l.current.listen("MDCDialog: opening", b), () => {
846
- l.current.unlisten("MDCDialog: opening", b);
847
- }), [l, b]), h(() => (l.current.unlisten("MDCDialog:opened", D), l.current.listen("MDCDialog:opened", D), () => {
848
- l.current.unlisten("MDCDialog:opened", D);
849
- }), [l, D]), h(() => (l.current.unlisten("MDCDialog:closing", L), l.current.listen("MDCDialog:closing", L), () => {
850
- l.current.unlisten("MDCDialog:closing", L);
851
- }), [l, L]), h(() => (l.current.unlisten("MDCDialog:closed", F), l.current.listen("MDCDialog:closed", F), () => {
852
- l.current.unlisten("MDCDialog:closed", F);
853
- }), [l, F]), h(() => {
854
- j ? l.current.open() : l.current.close();
855
- }, [l, j]);
856
- const st = Z(() => () => {
857
- const m = {
839
+ }, [y]), g(() => {
840
+ l.current.scrimClickAction = x ? "" : "close", l.current.escapeKeyAction = x ? "" : "close";
841
+ }, [x]);
842
+ const F = z((f) => {
843
+ P && P(f);
844
+ }, [P]), R = z((f) => {
845
+ G && Et(G), U && U(f);
846
+ }, [G, U]);
847
+ g(() => (l.current.unlisten("MDCDialog: opening", D), l.current.listen("MDCDialog: opening", D), () => {
848
+ l.current.unlisten("MDCDialog: opening", D);
849
+ }), [l, D]), g(() => (l.current.unlisten("MDCDialog:opened", I), l.current.listen("MDCDialog:opened", I), () => {
850
+ l.current.unlisten("MDCDialog:opened", I);
851
+ }), [l, I]), g(() => (l.current.unlisten("MDCDialog:closing", F), l.current.listen("MDCDialog:closing", F), () => {
852
+ l.current.unlisten("MDCDialog:closing", F);
853
+ }), [l, F]), g(() => (l.current.unlisten("MDCDialog:closed", R), l.current.listen("MDCDialog:closed", R), () => {
854
+ l.current.unlisten("MDCDialog:closed", R);
855
+ }), [l, R]), g(() => {
856
+ J ? l.current.open() : l.current.close();
857
+ }, [l, J]);
858
+ const ut = $(() => () => {
859
+ const f = {
858
860
  className: "lmnt-modal__button mdc-dialog__button",
859
861
  elevation: t?.props.elevation !== "default" ? t?.props.elevation : "flat",
860
862
  variant: t?.props.variant || "filled"
861
863
  };
862
- return g === "action" && (m["data-mdc-dialog-button-default"] = !0), S === "action" && (m["data-mdc-dialog-initial-focus"] = !0), m;
863
- }, [t?.props.elevation, t?.props.variant, g, S]), lt = Z(() => () => {
864
- const m = {
864
+ return E === "action" && (f["data-mdc-dialog-button-default"] = !0), S === "action" && (f["data-mdc-dialog-initial-focus"] = !0), f;
865
+ }, [t?.props.elevation, t?.props.variant, E, S]), mt = $(() => () => {
866
+ const f = {
865
867
  className: "lmnt-modal__button mdc-dialog__button",
866
- "data-mdc-dialog-action": Y ? "" : "accept",
868
+ "data-mdc-dialog-action": Q ? "" : "accept",
867
869
  elevation: c?.props.elevation !== "default" ? c?.props.elevation : "flat",
868
870
  variant: c?.props.variant || "filled"
869
871
  };
870
- return g === "primary" && (m["data-mdc-dialog-button-default"] = !0), S === "primary" && (m["data-mdc-dialog-initial-focus"] = !0), m;
871
- }, [Y, g, S, c?.props.elevation, c?.props.variant]);
872
- return /* @__PURE__ */ d.createElement("aside", dt({
873
- ref: I,
874
- className: R("lmnt", "lmnt-modal", "mdc-dialog", $ && "lmnt-modal--scrollable mdc-dialog--scrollable", E),
872
+ return E === "primary" && (f["data-mdc-dialog-button-default"] = !0), S === "primary" && (f["data-mdc-dialog-initial-focus"] = !0), f;
873
+ }, [Q, E, S, c?.props.elevation, c?.props.variant]);
874
+ return /* @__PURE__ */ u.createElement("aside", pt({
875
+ ref: N,
876
+ className: B("lmnt", "lmnt-modal", "mdc-dialog", X && "lmnt-modal--scrollable mdc-dialog--scrollable", p),
875
877
  role: "alertdialog"
876
- }, it), /* @__PURE__ */ d.createElement("div", {
877
- className: R("lmnt-modal__container", "mdc-dialog__container", p === "fullscreen" && "mdc-dialog--fullscreen", p === "max" && "lmnt-modal__max", p === "xlarge" && "lmnt-modal__xl", p === "large" && "lmnt-modal__lg", p === "medium" && "lmnt-modal__md", p === "small" && "lmnt-modal__sm", (p === "mobile" || K) && "lmnt-modal__mobile", p === "dialog" && "lmnt-modal__dialog", y && "lmnt-modal-no-actions")
878
- }, /* @__PURE__ */ d.createElement("div", {
878
+ }, lt), /* @__PURE__ */ u.createElement("div", {
879
+ className: B("lmnt-modal__container", "mdc-dialog__container", h === "fullscreen" && "mdc-dialog--fullscreen", h === "max" && "lmnt-modal__max", h === "xlarge" && "lmnt-modal__xl", h === "large" && "lmnt-modal__lg", h === "medium" && "lmnt-modal__md", h === "small" && "lmnt-modal__sm", (h === "mobile" || K) && "lmnt-modal__mobile", h === "dialog" && "lmnt-modal__dialog", y && "lmnt-modal-no-actions")
880
+ }, /* @__PURE__ */ u.createElement("div", {
879
881
  className: "lmnt-modal__surface mdc-dialog__surface"
880
- }, /* @__PURE__ */ d.createElement("header", {
881
- className: R("lmnt-modal__title", "mdc-dialog__title", (p === "dialog" || M) && "lmnt-modal_title-hide-close-icon", n && "lmnt-modal_title-actionsIcons", $ && "lmnt-modal__title-scrollable", (M || p === "dialog" || y) && "lmnt-modal--no-close-icon")
882
- }, !M && p !== "dialog" && !y && /* @__PURE__ */ d.createElement(ft, {
882
+ }, /* @__PURE__ */ u.createElement("header", {
883
+ className: B("lmnt-modal__title", "mdc-dialog__title", (h === "dialog" || k) && "lmnt-modal_title-hide-close-icon", n && "lmnt-modal_title-actionsIcons", X && "lmnt-modal__title-scrollable", (k || h === "dialog" || y) && "lmnt-modal--no-close-icon")
884
+ }, !k && h !== "dialog" && !y && /* @__PURE__ */ u.createElement(it, {
883
885
  className: "mdc-icon-button material-icons mdc-dialog__close",
884
886
  "data-mdc-dialog-action": "close",
885
887
  icon: "clear"
886
- }), J && /* @__PURE__ */ d.createElement("div", null, J), q && /* @__PURE__ */ d.createElement("div", {
888
+ }), Z && /* @__PURE__ */ u.createElement("div", null, Z), Y && /* @__PURE__ */ u.createElement("div", {
887
889
  className: "lmnt-dialog__title-actions"
888
- }, q), o && /* @__PURE__ */ d.createElement("div", {
890
+ }, Y), o && /* @__PURE__ */ u.createElement("div", {
889
891
  className: "lmnt-badge--modal",
890
892
  style: {
891
893
  marginLeft: "0"
892
894
  }
893
- }, o)), (T || f) && /* @__PURE__ */ d.createElement("section", {
895
+ }, o)), (A || d) && /* @__PURE__ */ u.createElement("section", {
894
896
  className: "lmnt-modal__content mdc-dialog__content"
895
- }, T || f), ot, (t || a || _ || v || c || A) && /* @__PURE__ */ d.createElement("footer", {
896
- className: R("lmnt-modal__actions", "mdc-dialog__actions", K && "lmnt-dialog__actions__mobile", A && "lmnt-modal__actions--supplemental-btn", K && k && "lmnt-modal_actions-mobile-stacked")
897
- }, !G && A && /* @__PURE__ */ d.createElement("div", {
897
+ }, A || d), st, (t || a || _ || v || c || b) && /* @__PURE__ */ u.createElement("footer", {
898
+ className: B("lmnt-modal__actions", "mdc-dialog__actions", K && "lmnt-dialog__actions__mobile", b && "lmnt-modal__actions--supplemental-btn", K && H && "lmnt-modal_actions-mobile-stacked")
899
+ }, !V && b && /* @__PURE__ */ u.createElement("div", {
898
900
  className: "lmnt-dialog__actions__supplemental"
899
- }, O(A, () => {
900
- const m = {};
901
- return g === "footerSupplemental" && (m["data-mdc-dialog-button-default"] = !0), S === "footerSupplemental" && (m["data-mdc-dialog-initial-focus"] = !0), m;
902
- })), !G && (t || _ || c) && /* @__PURE__ */ d.createElement("div", {
901
+ }, T(b, () => {
902
+ const f = {};
903
+ return E === "footerSupplemental" && (f["data-mdc-dialog-button-default"] = !0), S === "footerSupplemental" && (f["data-mdc-dialog-initial-focus"] = !0), f;
904
+ })), !V && (t || _ || c) && /* @__PURE__ */ u.createElement("div", {
903
905
  className: "lmnt-dialog__actions__right-align lmnt-modal_actions_button"
904
- }, _ && O(_, {
906
+ }, _ && T(_, {
905
907
  variant: "text",
906
908
  className: "lmnt-modal__button mdc-dialog__button",
907
909
  "data-mdc-dialog-action": "close"
908
- }), t && !c && O(t, st), c && O(c, lt)), G && /* @__PURE__ */ d.createElement("div", {
910
+ }), t && !c && T(t, ut), c && T(c, mt)), V && /* @__PURE__ */ u.createElement("div", {
909
911
  className: "lmnt-modal_actions_button lmnt-dialog__actions__directional"
910
- }, /* @__PURE__ */ d.createElement("div", null, ht(a, "lmnt-modal__button")), /* @__PURE__ */ d.createElement("div", null, O(v, {
912
+ }, /* @__PURE__ */ u.createElement("div", null, _t(a, "lmnt-modal__button")), /* @__PURE__ */ u.createElement("div", null, T(v, {
911
913
  className: "lmnt-modal__button",
912
914
  "data-mdc-dialog-initial-focus": !0
913
- })))))), /* @__PURE__ */ d.createElement("div", {
915
+ })))))), /* @__PURE__ */ u.createElement("div", {
914
916
  className: "mdc-dialog__scrim"
915
917
  }));
916
918
  });
917
- w.displayName = "Modal";
918
- w.propTypes = Lt;
919
- w.defaultProps = Ft;
920
- const Rt = "_modal_a4n3a_1", Bt = {
921
- modal: Rt
922
- }, Vt = (i) => /* @__PURE__ */ ct(
923
- w,
924
- {
925
- ...i,
926
- "data-testid": "modal",
927
- className: `${Bt.modal} ${i.className ?? ""}`
928
- }
929
- );
919
+ M.displayName = "Modal";
920
+ M.propTypes = wt;
921
+ M.defaultProps = Mt;
922
+ const kt = "_modal_br5s5_1", Ht = "_title_br5s5_6", ot = {
923
+ modal: kt,
924
+ title: Ht
925
+ }, Yt = ({
926
+ onClose: i,
927
+ title: e,
928
+ headerActions: t,
929
+ hideCloseIcon: n,
930
+ ...o
931
+ }) => {
932
+ const a = $(() => {
933
+ const d = /* @__PURE__ */ ft(W, { primaryAlign: "center", secondaryAlign: "center", children: [
934
+ /* @__PURE__ */ O(it, { icon: "close", onClick: () => i?.(), type: "button" }),
935
+ /* @__PURE__ */ O(bt, { level: 6, children: e })
936
+ ] }, "base-group");
937
+ return t ? Array.isArray(t) ? [d, /* @__PURE__ */ O(W, { children: t }, "action-group")] : [d, t] : d;
938
+ }, [t, i, e]);
939
+ return /* @__PURE__ */ O(
940
+ M,
941
+ {
942
+ ...o,
943
+ "data-testid": "modal",
944
+ className: `${ot.modal} ${ot.title} ${o.className ?? ""}`,
945
+ hideCloseIcon: n !== void 0 ? n : !0,
946
+ headerActions: /* @__PURE__ */ O(W, { primaryAlign: "space-between", secondaryAlign: "center", children: a }, "header-group"),
947
+ preventClose: !0
948
+ }
949
+ );
950
+ };
930
951
  export {
931
- Vt as Modal
952
+ Yt as Modal
932
953
  };
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": "1.2.2",
4
+ "version": "1.3.1",
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>",
@@ -33,6 +33,7 @@
33
33
  [
34
34
  "@semantic-release/commit-analyzer",
35
35
  {
36
+ "preset": "conventionalCommits",
36
37
  "releaseRules": [
37
38
  {
38
39
  "type": "docs",
@@ -53,6 +54,7 @@
53
54
  [
54
55
  "@semantic-release/release-notes-generator",
55
56
  {
57
+ "preset": "conventionalCommits",
56
58
  "presetConfig": {
57
59
  "types": [
58
60
  {
@@ -62,13 +64,11 @@
62
64
  },
63
65
  {
64
66
  "type": "feat",
65
- "section": "Features",
66
- "hidden": false
67
+ "section": "Features"
67
68
  },
68
69
  {
69
70
  "type": "fix",
70
- "section": "Bug Fixes",
71
- "hidden": false
71
+ "section": "Bug Fixes"
72
72
  },
73
73
  {
74
74
  "type": "refactor",