@hortiview/shared-components 2.26.0 → 2.26.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 +34 -0
- package/dist/{AlertBanner-BFzaGOer.js → AlertBanner-C9TvBTkH.js} +3 -3
- package/dist/{GenericCard-grpa3KJR.js → GenericCard-2v0lBsVu.js} +3 -3
- package/dist/{ListAreaService-B0x97Jin.js → ListAreaService-PaN1DrXf.js} +5 -5
- package/dist/assets/FormSelect.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +4 -4
- package/dist/components/AlertBanner/LinkBanner.js +3 -3
- package/dist/components/AllowedButton/AllowedButton.js +1 -1
- package/dist/components/AllowedIconButton/AllowedIconButton.js +1 -1
- package/dist/components/BaseView/BaseView.js +4 -4
- package/dist/components/BasicHeading/BasicHeading.js +4 -4
- package/dist/components/BlockView/BlockView.js +2 -2
- package/dist/components/ButtonCard/ButtonCard.js +3 -3
- package/dist/components/ChipCard/ChipCard.js +10 -10
- package/dist/components/ConfirmationModal/ConfirmationModal.js +3 -3
- package/dist/components/ContextMenu/ContextMenu.js +3 -3
- package/dist/components/DeleteModal/DeleteModal.js +4 -4
- package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +3 -3
- package/dist/components/EmptyView/EmptyView.js +3 -3
- package/dist/components/ErrorBanner/ErrorBanner.js +5 -5
- package/dist/components/Filter/Filter.js +6 -6
- package/dist/components/FloatingActionButton/FloatingActionButton.js +3 -3
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +4 -4
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +104 -99
- package/dist/components/FormComponents/FormSelect/FormSelectService.d.ts +34 -0
- package/dist/components/FormComponents/FormSelect/FormSelectService.js +20 -0
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.js +6 -6
- package/dist/components/FormComponents/FormText/FormText.js +2 -2
- package/dist/components/FormComponents/FormToggle/FormToggle.js +3 -3
- package/dist/components/GenericTable/GenericTable.js +5349 -5409
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
- package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
- package/dist/components/HashTabView/HashTabView.js +6 -6
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/Iconify/Iconify.js +1 -1
- package/dist/components/InfoCard/InfoCard.js +4 -4
- package/dist/components/InfoGroup/InfoGroup.js +3 -3
- package/dist/components/ListArea/ListArea.js +5 -5
- package/dist/components/ListArea/ListAreaService.js +6 -6
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +5 -5
- package/dist/components/Modal/Modal.js +150 -142
- package/dist/components/ModulePadding/ModulePadding.js +1 -1
- package/dist/components/OfflineView/OfflineView.js +3 -3
- package/dist/components/OnboardingBanner/OnboardingBanner.js +7 -7
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/components/StepperButton.js +1 -1
- package/dist/components/Stepper/components/StepperHeader.js +2 -2
- package/dist/components/Stepper/components/StepperItem.js +2 -2
- package/dist/{defineProperty-B7N9EBBI.js → defineProperty-SoB5opr-.js} +51 -51
- package/dist/{es.string.iterator-DBx2A42F.js → es.string.iterator-BrOvr7F6.js} +78 -78
- package/dist/{find-eU9ab_u7.js → find-OaLSg5iu.js} +35 -35
- package/dist/includes-CSD_V_RY.js +112 -0
- package/dist/{index-Df2FYN-K.js → index-_-9ybP20.js} +76 -76
- package/dist/{index.es-C27R5Xae.js → index.es-0SkNh4dU.js} +2 -2
- package/dist/{index.es-B19PQgzU.js → index.es-B1cewJEy.js} +4 -4
- package/dist/{index.es-Z0aF-7Cn.js → index.es-BE1XL1dD.js} +3 -3
- package/dist/{index.es-BcnmoCEg.js → index.es-BSaDtduL.js} +6 -6
- package/dist/{index.es-Ci3O23C_.js → index.es-BVW2k-5y.js} +4 -4
- package/dist/index.es-BZkGOjEo.js +383 -0
- package/dist/{index.es-Cr1PSTyq.js → index.es-C2ejWpji.js} +3 -3
- package/dist/{index.es-DgncYOqO.js → index.es-C8AExypY.js} +2 -2
- package/dist/{index.es-BOvO8moE.js → index.es-CNrSvjAv.js} +5 -6
- package/dist/{index.es-l_3PNohs.js → index.es-CTKwa3Es.js} +1 -1
- package/dist/{index.es-BwafUoK3.js → index.es-CVPUG1pf.js} +785 -781
- package/dist/index.es-CpPnZRt7.js +604 -0
- package/dist/{index.es-DHoIQ8lu.js → index.es-CwgwR6SB.js} +1 -1
- package/dist/{index.es-BOG3_7IM.js → index.es-DHL1mFb3.js} +249 -317
- package/dist/{index.es-DHnCVuQ8.js → index.es-DPGGEmi5.js} +5 -5
- package/dist/{index.es-C6I3L4U4.js → index.es-DRC-9PLs.js} +43 -43
- package/dist/{index.es-C2IOpX7R.js → index.es-DVgCBhVx.js} +3020 -2798
- package/dist/{index.es-B9BUXRQn.js → index.es-DsOSfaF5.js} +39 -39
- package/dist/{index.es-DUrjyxNI.js → index.es-EXzC8zuP.js} +2 -2
- package/dist/index.es-LckFzDz-.js +1069 -0
- package/dist/{index.es-DdeCB7LW.js → index.es-Pc5KKhcb.js} +1 -1
- package/dist/{index.es-Cg57snrN.js → index.es-_PSuLbjQ.js} +15 -16
- package/dist/{index.es-DhlgTSuU.js → index.es-eZDofmng.js} +10 -13
- package/dist/{keyboard-DbG3oyPU.js → keyboard-DQ9O_Ke1.js} +21 -21
- package/dist/main.js +1 -1
- package/dist/{map-ZSVweMI1.js → map-BErBeya5.js} +85 -85
- package/dist/parse-int-BYd7r_4n.js +47 -0
- package/dist/{slicedToArray-DC6VAZtW.js → slicedToArray-C2Ed3239.js} +67 -67
- package/dist/string-trim-v5pkXsl2.js +32 -0
- package/package.json +4 -4
- package/dist/correct-is-regexp-logic-BJ-OWRrn.js +0 -44
- package/dist/index.es-CkB4776y.js +0 -391
- package/dist/index.es-D1iB_QlE.js +0 -608
- package/dist/index.es-DEBGoIKX.js +0 -1061
- package/dist/parse-int-CGpIXMGa.js +0 -75
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsx as g, Fragment as
|
|
2
|
-
import { G as U } from "../../index.es-
|
|
3
|
-
import { I as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import m, { forwardRef as
|
|
7
|
-
import { w as
|
|
8
|
-
import { b as
|
|
9
|
-
import { M as
|
|
10
|
-
import { M as
|
|
11
|
-
import { A as
|
|
12
|
-
import { P as
|
|
13
|
-
import { b as
|
|
14
|
-
import { ErrorBanner as
|
|
15
|
-
import { Iconify as
|
|
16
|
-
import { OfflineView as
|
|
17
|
-
import '../../assets/Modal.css';function
|
|
1
|
+
import { jsx as g, Fragment as wt, jsxs as kt } from "react/jsx-runtime";
|
|
2
|
+
import { G as U } from "../../index.es-BE1XL1dD.js";
|
|
3
|
+
import { I as Ut } from "../../index.es-BZkGOjEo.js";
|
|
4
|
+
import { _ as Zt, a as te, c as G, P as l } from "../../index-_-9ybP20.js";
|
|
5
|
+
import { _ as Mt } from "../../slicedToArray-C2Ed3239.js";
|
|
6
|
+
import m, { forwardRef as ee, useRef as Pt, useImperativeHandle as ne, useState as Ht, useEffect as v, useCallback as Z, useMemo as nt, Fragment as oe } from "react";
|
|
7
|
+
import { w as xt, j as ie, c as D, a as ae } from "../../index.es-DRC-9PLs.js";
|
|
8
|
+
import { b as Gt, c as $t, d as re } from "../../tslib.es6-BDCynO9F.js";
|
|
9
|
+
import { M as le, a as se } from "../../component-By6nyiBU.js";
|
|
10
|
+
import { M as ce, c as ue, m as de } from "../../component-DYpB_4EP.js";
|
|
11
|
+
import { A as me } from "../../animationframe-CqXArbwZ.js";
|
|
12
|
+
import { P as fe } from "../../index.es-C8AExypY.js";
|
|
13
|
+
import { b as pe } from "../../index.es-EXzC8zuP.js";
|
|
14
|
+
import { ErrorBanner as he } from "../ErrorBanner/ErrorBanner.js";
|
|
15
|
+
import { Iconify as ge } from "../Iconify/Iconify.js";
|
|
16
|
+
import { OfflineView as _e } from "../OfflineView/OfflineView.js";
|
|
17
|
+
import '../../assets/Modal.css';function Ce(o, e, t) {
|
|
18
18
|
return e(o, { initialFocusEl: t });
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function ve(o) {
|
|
21
21
|
return o ? o.scrollHeight > o.offsetHeight : !1;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Ee(o) {
|
|
24
24
|
return o ? o.scrollTop === 0 : !1;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function Se(o) {
|
|
27
27
|
return o ? Math.ceil(o.scrollHeight - o.scrollTop) === o.clientHeight : !1;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function ye(o) {
|
|
30
30
|
var e = /* @__PURE__ */ new Set();
|
|
31
31
|
return [].forEach.call(o, function(t) {
|
|
32
32
|
return e.add(t.offsetTop);
|
|
33
33
|
}), e.size > 1;
|
|
34
34
|
}
|
|
35
|
-
var tt = "mdc-dom-focus-sentinel",
|
|
35
|
+
var tt = "mdc-dom-focus-sentinel", Oe = (
|
|
36
36
|
/** @class */
|
|
37
37
|
(function() {
|
|
38
38
|
function o(e, t) {
|
|
@@ -62,12 +62,12 @@ var tt = "mdc-dom-focus-sentinel", Se = (
|
|
|
62
62
|
}, o.prototype.getFocusableElements = function(e) {
|
|
63
63
|
var t = [].slice.call(e.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button"));
|
|
64
64
|
return t.filter(function(n) {
|
|
65
|
-
var i = 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(tt) && !i,
|
|
65
|
+
var i = 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(tt) && !i, d = !1;
|
|
66
66
|
if (a) {
|
|
67
67
|
var h = getComputedStyle(n);
|
|
68
|
-
|
|
68
|
+
d = h.display === "none" || h.visibility === "hidden";
|
|
69
69
|
}
|
|
70
|
-
return a && !
|
|
70
|
+
return a && !d;
|
|
71
71
|
});
|
|
72
72
|
}, o.prototype.createSentinel = function() {
|
|
73
73
|
var e = document.createElement("div");
|
|
@@ -75,7 +75,7 @@ var tt = "mdc-dom-focus-sentinel", Se = (
|
|
|
75
75
|
}, o;
|
|
76
76
|
})()
|
|
77
77
|
);
|
|
78
|
-
var
|
|
78
|
+
var s = {
|
|
79
79
|
CLOSING: "mdc-dialog--closing",
|
|
80
80
|
OPEN: "mdc-dialog--open",
|
|
81
81
|
OPENING: "mdc-dialog--opening",
|
|
@@ -136,13 +136,13 @@ var K;
|
|
|
136
136
|
(function(o) {
|
|
137
137
|
o.POLL_SCROLL_POS = "poll_scroll_position", o.POLL_LAYOUT_CHANGE = "poll_layout_change";
|
|
138
138
|
})(K || (K = {}));
|
|
139
|
-
var
|
|
139
|
+
var Kt = (
|
|
140
140
|
/** @class */
|
|
141
141
|
(function(o) {
|
|
142
|
-
|
|
142
|
+
Gt(e, o);
|
|
143
143
|
function e(t) {
|
|
144
|
-
var n = o.call(this,
|
|
145
|
-
return n.dialogOpen = !1, n.isFullscreen = !1, n.animationFrame = 0, n.animationTimer = 0, n.escapeKeyAction = A.CLOSE_ACTION, n.scrimClickAction = A.CLOSE_ACTION, n.autoStackButtons = !0, n.areButtonsStacked = !1, n.suppressDefaultPressSelector = A.SUPPRESS_DEFAULT_PRESS_SELECTOR, n.animFrame = new
|
|
144
|
+
var n = o.call(this, $t($t({}, e.defaultAdapter), t)) || this;
|
|
145
|
+
return n.dialogOpen = !1, n.isFullscreen = !1, n.animationFrame = 0, n.animationTimer = 0, n.escapeKeyAction = A.CLOSE_ACTION, n.scrimClickAction = A.CLOSE_ACTION, n.autoStackButtons = !0, n.areButtonsStacked = !1, n.suppressDefaultPressSelector = A.SUPPRESS_DEFAULT_PRESS_SELECTOR, n.animFrame = new me(), n.contentScrollHandler = function() {
|
|
146
146
|
n.handleScrollEvent();
|
|
147
147
|
}, n.windowResizeHandler = function() {
|
|
148
148
|
n.layout();
|
|
@@ -152,7 +152,7 @@ var Gt = (
|
|
|
152
152
|
}
|
|
153
153
|
return Object.defineProperty(e, "cssClasses", {
|
|
154
154
|
get: function() {
|
|
155
|
-
return
|
|
155
|
+
return s;
|
|
156
156
|
},
|
|
157
157
|
enumerable: !1,
|
|
158
158
|
configurable: !0
|
|
@@ -232,30 +232,30 @@ var Gt = (
|
|
|
232
232
|
enumerable: !1,
|
|
233
233
|
configurable: !0
|
|
234
234
|
}), e.prototype.init = function() {
|
|
235
|
-
this.adapter.hasClass(
|
|
235
|
+
this.adapter.hasClass(s.STACKED) && this.setAutoStackButtons(!1), this.isFullscreen = this.adapter.hasClass(s.FULLSCREEN);
|
|
236
236
|
}, e.prototype.destroy = function() {
|
|
237
237
|
this.dialogOpen && this.close(A.DESTROY_ACTION), this.animationTimer && (clearTimeout(this.animationTimer), this.handleAnimationTimerEnd()), this.isFullscreen && this.adapter.deregisterContentEventHandler("scroll", this.contentScrollHandler), this.animFrame.cancelAll(), this.adapter.deregisterWindowEventHandler("resize", this.windowResizeHandler), this.adapter.deregisterWindowEventHandler("orientationchange", this.windowOrientationChangeHandler);
|
|
238
238
|
}, e.prototype.open = function(t) {
|
|
239
239
|
var n = this;
|
|
240
|
-
this.dialogOpen = !0, this.adapter.notifyOpening(), this.adapter.addClass(
|
|
241
|
-
n.adapter.addClass(
|
|
240
|
+
this.dialogOpen = !0, this.adapter.notifyOpening(), this.adapter.addClass(s.OPENING), this.isFullscreen && this.adapter.registerContentEventHandler("scroll", this.contentScrollHandler), t && t.isAboveFullscreenDialog && this.adapter.addClass(s.SCRIM_HIDDEN), this.adapter.registerWindowEventHandler("resize", this.windowResizeHandler), this.adapter.registerWindowEventHandler("orientationchange", this.windowOrientationChangeHandler), this.runNextAnimationFrame(function() {
|
|
241
|
+
n.adapter.addClass(s.OPEN), n.adapter.addBodyClass(s.SCROLL_LOCK), n.layout(), n.animationTimer = setTimeout(function() {
|
|
242
242
|
n.handleAnimationTimerEnd(), n.adapter.trapFocus(n.adapter.getInitialFocusEl()), n.adapter.notifyOpened();
|
|
243
243
|
}, et.DIALOG_ANIMATION_OPEN_TIME_MS);
|
|
244
244
|
});
|
|
245
245
|
}, e.prototype.close = function(t) {
|
|
246
246
|
var n = this;
|
|
247
|
-
t === void 0 && (t = ""), this.dialogOpen && (this.dialogOpen = !1, this.adapter.notifyClosing(t), this.adapter.addClass(
|
|
247
|
+
t === void 0 && (t = ""), this.dialogOpen && (this.dialogOpen = !1, this.adapter.notifyClosing(t), this.adapter.addClass(s.CLOSING), this.adapter.removeClass(s.OPEN), this.adapter.removeBodyClass(s.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() {
|
|
248
248
|
n.adapter.releaseFocus(), n.handleAnimationTimerEnd(), n.adapter.notifyClosed(t);
|
|
249
249
|
}, et.DIALOG_ANIMATION_CLOSE_TIME_MS));
|
|
250
250
|
}, e.prototype.showSurfaceScrim = function() {
|
|
251
251
|
var t = this;
|
|
252
|
-
this.adapter.addClass(
|
|
253
|
-
t.adapter.addClass(
|
|
252
|
+
this.adapter.addClass(s.SURFACE_SCRIM_SHOWING), this.runNextAnimationFrame(function() {
|
|
253
|
+
t.adapter.addClass(s.SURFACE_SCRIM_SHOWN);
|
|
254
254
|
});
|
|
255
255
|
}, e.prototype.hideSurfaceScrim = function() {
|
|
256
|
-
this.adapter.removeClass(
|
|
256
|
+
this.adapter.removeClass(s.SURFACE_SCRIM_SHOWN), this.adapter.addClass(s.SURFACE_SCRIM_HIDING);
|
|
257
257
|
}, e.prototype.handleSurfaceScrimTransitionEnd = function() {
|
|
258
|
-
this.adapter.removeClass(
|
|
258
|
+
this.adapter.removeClass(s.SURFACE_SCRIM_HIDING), this.adapter.removeClass(s.SURFACE_SCRIM_SHOWING);
|
|
259
259
|
}, e.prototype.isOpen = function() {
|
|
260
260
|
return this.dialogOpen;
|
|
261
261
|
}, e.prototype.getEscapeKeyAction = function() {
|
|
@@ -292,8 +292,8 @@ var Gt = (
|
|
|
292
292
|
if (n) {
|
|
293
293
|
var i = this.adapter.getActionFromEvent(t);
|
|
294
294
|
if (!i) {
|
|
295
|
-
var a = t.composedPath ? t.composedPath()[0] : t.target,
|
|
296
|
-
n &&
|
|
295
|
+
var a = t.composedPath ? t.composedPath()[0] : t.target, d = this.suppressDefaultPressSelector ? !this.adapter.eventTargetMatches(a, this.suppressDefaultPressSelector) : !0;
|
|
296
|
+
n && d && this.adapter.clickDefaultButton();
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}, e.prototype.handleDocumentKeydown = function(t) {
|
|
@@ -307,29 +307,29 @@ var Gt = (
|
|
|
307
307
|
}, e.prototype.layoutInternal = function() {
|
|
308
308
|
this.autoStackButtons && this.detectStackedButtons(), this.toggleScrollableClasses();
|
|
309
309
|
}, e.prototype.handleAnimationTimerEnd = function() {
|
|
310
|
-
this.animationTimer = 0, this.adapter.removeClass(
|
|
310
|
+
this.animationTimer = 0, this.adapter.removeClass(s.OPENING), this.adapter.removeClass(s.CLOSING);
|
|
311
311
|
}, e.prototype.runNextAnimationFrame = function(t) {
|
|
312
312
|
var n = this;
|
|
313
313
|
cancelAnimationFrame(this.animationFrame), this.animationFrame = requestAnimationFrame(function() {
|
|
314
314
|
n.animationFrame = 0, clearTimeout(n.animationTimer), n.animationTimer = setTimeout(t, 0);
|
|
315
315
|
});
|
|
316
316
|
}, e.prototype.detectStackedButtons = function() {
|
|
317
|
-
this.adapter.removeClass(
|
|
317
|
+
this.adapter.removeClass(s.STACKED);
|
|
318
318
|
var t = this.adapter.areButtonsStacked();
|
|
319
|
-
t && this.adapter.addClass(
|
|
319
|
+
t && this.adapter.addClass(s.STACKED), t !== this.areButtonsStacked && (this.adapter.reverseButtons(), this.areButtonsStacked = t);
|
|
320
320
|
}, e.prototype.toggleScrollableClasses = function() {
|
|
321
|
-
this.adapter.removeClass(
|
|
321
|
+
this.adapter.removeClass(s.SCROLLABLE), this.adapter.isContentScrollable() && (this.adapter.addClass(s.SCROLLABLE), this.isFullscreen && (this.toggleScrollDividerHeader(), this.toggleScrollDividerFooter()));
|
|
322
322
|
}, e.prototype.toggleScrollDividerHeader = function() {
|
|
323
|
-
this.adapter.isScrollableContentAtTop() ? this.adapter.hasClass(
|
|
323
|
+
this.adapter.isScrollableContentAtTop() ? this.adapter.hasClass(s.SCROLL_DIVIDER_HEADER) && this.adapter.removeClass(s.SCROLL_DIVIDER_HEADER) : this.adapter.addClass(s.SCROLL_DIVIDER_HEADER);
|
|
324
324
|
}, e.prototype.toggleScrollDividerFooter = function() {
|
|
325
|
-
this.adapter.isScrollableContentAtBottom() ? this.adapter.hasClass(
|
|
325
|
+
this.adapter.isScrollableContentAtBottom() ? this.adapter.hasClass(s.SCROLL_DIVIDER_FOOTER) && this.adapter.removeClass(s.SCROLL_DIVIDER_FOOTER) : this.adapter.addClass(s.SCROLL_DIVIDER_FOOTER);
|
|
326
326
|
}, e;
|
|
327
|
-
})(
|
|
327
|
+
})(le)
|
|
328
328
|
);
|
|
329
|
-
var f =
|
|
329
|
+
var f = Kt.strings, Ae = (
|
|
330
330
|
/** @class */
|
|
331
331
|
(function(o) {
|
|
332
|
-
|
|
332
|
+
Gt(e, o);
|
|
333
333
|
function e() {
|
|
334
334
|
return o !== null && o.apply(this, arguments) || this;
|
|
335
335
|
}
|
|
@@ -371,29 +371,29 @@ var f = Gt.strings, ye = (
|
|
|
371
371
|
}, e.prototype.initialize = function(t) {
|
|
372
372
|
var n, i;
|
|
373
373
|
t === void 0 && (t = function(_, S) {
|
|
374
|
-
return new
|
|
374
|
+
return new Oe(_, S);
|
|
375
375
|
});
|
|
376
376
|
var a = this.root.querySelector(f.CONTAINER_SELECTOR);
|
|
377
377
|
if (!a)
|
|
378
378
|
throw new Error("Dialog component requires a " + f.CONTAINER_SELECTOR + " container element");
|
|
379
379
|
this.container = a, this.content = this.root.querySelector(f.CONTENT_SELECTOR), this.buttons = [].slice.call(this.root.querySelectorAll(f.BUTTON_SELECTOR)), this.defaultButton = this.root.querySelector("[" + f.BUTTON_DEFAULT_ATTRIBUTE + "]"), this.focusTrapFactory = t, this.buttonRipples = [];
|
|
380
380
|
try {
|
|
381
|
-
for (var
|
|
381
|
+
for (var d = re(this.buttons), h = d.next(); !h.done; h = d.next()) {
|
|
382
382
|
var O = h.value;
|
|
383
|
-
this.buttonRipples.push(new
|
|
383
|
+
this.buttonRipples.push(new ce(O));
|
|
384
384
|
}
|
|
385
385
|
} catch (_) {
|
|
386
386
|
n = { error: _ };
|
|
387
387
|
} finally {
|
|
388
388
|
try {
|
|
389
|
-
h && !h.done && (i =
|
|
389
|
+
h && !h.done && (i = d.return) && i.call(d);
|
|
390
390
|
} finally {
|
|
391
391
|
if (n) throw n.error;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
}, e.prototype.initialSyncWithDOM = function() {
|
|
395
395
|
var t = this;
|
|
396
|
-
this.focusTrap =
|
|
396
|
+
this.focusTrap = Ce(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() {
|
|
397
397
|
document.addEventListener("keydown", t.handleDocumentKeydown);
|
|
398
398
|
}, this.handleClosing = function() {
|
|
399
399
|
document.removeEventListener("keydown", t.handleDocumentKeydown);
|
|
@@ -417,18 +417,18 @@ var f = Gt.strings, ye = (
|
|
|
417
417
|
return t.root.classList.add(i);
|
|
418
418
|
},
|
|
419
419
|
areButtonsStacked: function() {
|
|
420
|
-
return
|
|
420
|
+
return ye(t.buttons);
|
|
421
421
|
},
|
|
422
422
|
clickDefaultButton: function() {
|
|
423
423
|
t.defaultButton && t.defaultButton.click();
|
|
424
424
|
},
|
|
425
425
|
eventTargetMatches: function(i, a) {
|
|
426
|
-
return i ?
|
|
426
|
+
return i ? de(i, a) : !1;
|
|
427
427
|
},
|
|
428
428
|
getActionFromEvent: function(i) {
|
|
429
429
|
if (!i.target)
|
|
430
430
|
return "";
|
|
431
|
-
var a =
|
|
431
|
+
var a = ue(i.target, "[" + f.ACTION_ATTRIBUTE + "]");
|
|
432
432
|
return a && a.getAttribute(f.ACTION_ATTRIBUTE);
|
|
433
433
|
},
|
|
434
434
|
getInitialFocusEl: function() {
|
|
@@ -438,7 +438,7 @@ var f = Gt.strings, ye = (
|
|
|
438
438
|
return t.root.classList.contains(i);
|
|
439
439
|
},
|
|
440
440
|
isContentScrollable: function() {
|
|
441
|
-
return
|
|
441
|
+
return ve(t.content);
|
|
442
442
|
},
|
|
443
443
|
notifyClosed: function(i) {
|
|
444
444
|
return t.emit(f.CLOSED_EVENT, i ? { action: i } : {});
|
|
@@ -476,10 +476,10 @@ var f = Gt.strings, ye = (
|
|
|
476
476
|
t.content instanceof HTMLElement && t.content.removeEventListener(i, a);
|
|
477
477
|
},
|
|
478
478
|
isScrollableContentAtTop: function() {
|
|
479
|
-
return
|
|
479
|
+
return Ee(t.content);
|
|
480
480
|
},
|
|
481
481
|
isScrollableContentAtBottom: function() {
|
|
482
|
-
return
|
|
482
|
+
return Se(t.content);
|
|
483
483
|
},
|
|
484
484
|
registerWindowEventHandler: function(i, a) {
|
|
485
485
|
window.addEventListener(i, a);
|
|
@@ -488,175 +488,181 @@ var f = Gt.strings, ye = (
|
|
|
488
488
|
window.removeEventListener(i, a);
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
|
-
return new
|
|
491
|
+
return new Kt(n);
|
|
492
492
|
}, e.prototype.getInitialFocusEl = function() {
|
|
493
493
|
return this.root.querySelector("[" + f.INITIAL_FOCUS_ATTRIBUTE + "]");
|
|
494
494
|
}, e;
|
|
495
|
-
})(
|
|
496
|
-
),
|
|
495
|
+
})(se)
|
|
496
|
+
), be = {
|
|
497
497
|
/**
|
|
498
498
|
* 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.
|
|
499
499
|
*
|
|
500
500
|
* Defaults to **null**.
|
|
501
501
|
*/
|
|
502
|
-
actionButton:
|
|
502
|
+
actionButton: l.node,
|
|
503
503
|
/**
|
|
504
504
|
* Button for any navigating to the previous page in a Directional modal.
|
|
505
505
|
*
|
|
506
506
|
* Defaults to **null**.
|
|
507
507
|
*/
|
|
508
|
-
backButton:
|
|
508
|
+
backButton: l.node,
|
|
509
509
|
/**
|
|
510
510
|
* The custom modal label badge to be rendered.
|
|
511
511
|
*
|
|
512
512
|
* Defaults to **undefined**.
|
|
513
513
|
*/
|
|
514
|
-
badge:
|
|
514
|
+
badge: l.node,
|
|
515
515
|
/**
|
|
516
516
|
* Accepts any valid markup. Optionally, `content` may be used instead. If `content` and `children` are both set, `content` will take priority.
|
|
517
517
|
*
|
|
518
518
|
* Defaults to **null**.
|
|
519
519
|
*/
|
|
520
|
-
children:
|
|
520
|
+
children: l.node,
|
|
521
521
|
/**
|
|
522
522
|
* Primary content of the dialog. Accepts any valid markup. Optionally, `children` may be used instead. If content and `children` are both set, content will take priority.
|
|
523
523
|
*
|
|
524
524
|
* Defaults to **null**.
|
|
525
525
|
*/
|
|
526
|
-
content:
|
|
526
|
+
content: l.node,
|
|
527
527
|
/**
|
|
528
528
|
* Button that is the default action, triggered by pressing the Enter key.
|
|
529
529
|
*
|
|
530
530
|
* Defaults to **'primary'**.
|
|
531
531
|
*/
|
|
532
|
-
defaultButton:
|
|
532
|
+
defaultButton: l.oneOf(["close", "primary", "action", "footerSupplemental"]),
|
|
533
533
|
/**
|
|
534
534
|
* Button to cancel or close the modal.
|
|
535
535
|
*
|
|
536
536
|
* Defaults to **null**.
|
|
537
537
|
*/
|
|
538
|
-
dismissiveButton:
|
|
538
|
+
dismissiveButton: l.node,
|
|
539
539
|
/**
|
|
540
540
|
* Button to be displayed in left corner of the modal footer. Should be a text button.
|
|
541
541
|
*
|
|
542
542
|
* Defaults to **null**.
|
|
543
543
|
*/
|
|
544
|
-
footerSupplemental:
|
|
544
|
+
footerSupplemental: l.node,
|
|
545
545
|
/**
|
|
546
546
|
* Content to be displayed in right corner of the modal header. Should be a text button or a group of up to 3 icon buttons.
|
|
547
547
|
*
|
|
548
548
|
* Defaults to **null**.
|
|
549
549
|
*/
|
|
550
|
-
headerActions:
|
|
550
|
+
headerActions: l.node,
|
|
551
551
|
/**
|
|
552
552
|
* If true, the close icon in the upper left corner will not be rendered.
|
|
553
553
|
*
|
|
554
554
|
* Defaults to **false**.
|
|
555
555
|
*/
|
|
556
|
-
hideCloseIcon:
|
|
556
|
+
hideCloseIcon: l.bool,
|
|
557
|
+
/**
|
|
558
|
+
* Choose between the classic Material Icons (default), newer Material Symbols, or custom.
|
|
559
|
+
*
|
|
560
|
+
* Defaults to **'material-icons'**.
|
|
561
|
+
*/
|
|
562
|
+
iconSource: l.oneOf(["material-icons", "material-symbols"]),
|
|
557
563
|
/**
|
|
558
564
|
* A slot for StepperIndicator.
|
|
559
565
|
*
|
|
560
566
|
* Defaults to **null**.
|
|
561
567
|
*/
|
|
562
|
-
indicator:
|
|
568
|
+
indicator: l.node,
|
|
563
569
|
/**
|
|
564
570
|
* Button to initially focus on after the dialog has opened. If left null, the initial focus will be on the first focusable element in the modal. As an alternative you can add the prop `data-mdc-dialog-initial-focus='true'` to any element within the modal to make that element the initial focus. If it is a directional modal, the initial focus will be on the nextButton.
|
|
565
571
|
*
|
|
566
572
|
* Defaults to **null**.
|
|
567
573
|
*/
|
|
568
|
-
initialFocus:
|
|
574
|
+
initialFocus: l.oneOf(["null", "primary", "action", "footerSupplemental"]),
|
|
569
575
|
/**
|
|
570
576
|
* If true, the buttons in the footer will be full width and stacked on mobile.
|
|
571
577
|
*
|
|
572
578
|
* Defaults to **false**.
|
|
573
579
|
*/
|
|
574
|
-
mobileStackedButtons:
|
|
580
|
+
mobileStackedButtons: l.bool,
|
|
575
581
|
/**
|
|
576
582
|
* String to determine the size of the modal.
|
|
577
583
|
*
|
|
578
584
|
* Defaults to **'max'**.
|
|
579
585
|
*/
|
|
580
|
-
modalSize:
|
|
586
|
+
modalSize: l.oneOf(["fullscreen", "max", "xlarge", "large", "medium", "small", "dialog"]),
|
|
581
587
|
/**
|
|
582
588
|
* Button for navigating to the next page in a Directional modal or closing on the last page.
|
|
583
589
|
*
|
|
584
590
|
* Defaults to **null**.
|
|
585
591
|
*/
|
|
586
|
-
nextButton:
|
|
592
|
+
nextButton: l.node,
|
|
587
593
|
/**
|
|
588
594
|
* Set to true if the modal will not have any actions. Should be used sparingly and the modal should be closed programmatically. For example, can be used to stop the user from interacting or navigating away while a payment is processing.
|
|
589
595
|
*
|
|
590
596
|
* Defaults to **null**.
|
|
591
597
|
*/
|
|
592
|
-
noActions:
|
|
598
|
+
noActions: l.bool,
|
|
593
599
|
/**
|
|
594
600
|
* Fired when the Dialog begins its closing animation. Where event.detail.action is the action which closed the dialog (close or accept).
|
|
595
601
|
*
|
|
596
602
|
* Defaults to **null**.
|
|
597
603
|
*/
|
|
598
|
-
onClose:
|
|
604
|
+
onClose: l.func,
|
|
599
605
|
/**
|
|
600
606
|
* Fired when the Dialog finishes its closing animation. Where event.detail.action is the action which closed the dialog (close or accept).
|
|
601
607
|
*
|
|
602
608
|
* Defaults to **null**.
|
|
603
609
|
*/
|
|
604
|
-
onClosed:
|
|
610
|
+
onClosed: l.func,
|
|
605
611
|
/**
|
|
606
612
|
* Fired when the Dialog begins its opening animation.
|
|
607
613
|
*
|
|
608
614
|
* Defaults to **null**.
|
|
609
615
|
*/
|
|
610
|
-
onOpen:
|
|
616
|
+
onOpen: l.func,
|
|
611
617
|
/**
|
|
612
618
|
* Fired when the Dialog finishes its opening animation.
|
|
613
619
|
*
|
|
614
620
|
* Defaults to **null**.
|
|
615
621
|
*/
|
|
616
|
-
onOpened:
|
|
622
|
+
onOpened: l.func,
|
|
617
623
|
/**
|
|
618
624
|
* If true, the Modal will be visible on screen.
|
|
619
625
|
*
|
|
620
626
|
* Defaults to **false**.
|
|
621
627
|
*/
|
|
622
|
-
open:
|
|
628
|
+
open: l.bool,
|
|
623
629
|
/**
|
|
624
630
|
* Prevents the user from closing the dialog by hitting escape or clicking the scrim. Use caution when using this as the modal should always have a way for the user to close it.
|
|
625
631
|
*
|
|
626
632
|
* Defaults to **false**.
|
|
627
633
|
*/
|
|
628
|
-
preventClose:
|
|
634
|
+
preventClose: l.bool,
|
|
629
635
|
/**
|
|
630
636
|
* Prevents the default behavior which adds an event listener for the Enter key to the Primary button. Any onEnter/submission behavior will need to be added by the developer (including closing the Modal).
|
|
631
637
|
*
|
|
632
638
|
* Defaults to **false**.
|
|
633
639
|
*/
|
|
634
|
-
preventPrimaryAccept:
|
|
640
|
+
preventPrimaryAccept: l.bool,
|
|
635
641
|
/**
|
|
636
642
|
* Button for the primary action of the modal.
|
|
637
643
|
*
|
|
638
644
|
* Defaults to **null**.
|
|
639
645
|
*/
|
|
640
|
-
primaryButton:
|
|
646
|
+
primaryButton: l.node,
|
|
641
647
|
/**
|
|
642
648
|
* DOM selector to provide a target to return focus. Accepts any valid _query_ (see mdn docs for Element.querySelector). If omitted focus will return to the last focused element upon closing.
|
|
643
649
|
*
|
|
644
650
|
* Defaults to **null**.
|
|
645
651
|
*/
|
|
646
|
-
returnFocusSelector:
|
|
652
|
+
returnFocusSelector: l.string,
|
|
647
653
|
/**
|
|
648
654
|
* If true, wrapping will be disabled and a scrollable area will be created.
|
|
649
655
|
*
|
|
650
656
|
* Defaults to **false**.
|
|
651
657
|
*/
|
|
652
|
-
scrollable:
|
|
658
|
+
scrollable: l.bool,
|
|
653
659
|
/**
|
|
654
660
|
* String for the modal title.
|
|
655
661
|
*
|
|
656
662
|
* Defaults to **null**.
|
|
657
663
|
*/
|
|
658
|
-
title:
|
|
659
|
-
},
|
|
664
|
+
title: l.string
|
|
665
|
+
}, Te = {
|
|
660
666
|
actionButton: null,
|
|
661
667
|
backButton: null,
|
|
662
668
|
badge: void 0,
|
|
@@ -667,6 +673,7 @@ var f = Gt.strings, ye = (
|
|
|
667
673
|
footerSupplemental: null,
|
|
668
674
|
headerActions: null,
|
|
669
675
|
hideCloseIcon: !1,
|
|
676
|
+
iconSource: "material-icons",
|
|
670
677
|
indicator: null,
|
|
671
678
|
initialFocus: null,
|
|
672
679
|
mobileStackedButtons: !1,
|
|
@@ -684,27 +691,27 @@ var f = Gt.strings, ye = (
|
|
|
684
691
|
returnFocusSelector: null,
|
|
685
692
|
scrollable: !1,
|
|
686
693
|
title: null
|
|
687
|
-
},
|
|
688
|
-
var t = o.actionButton, n = t === void 0 ? r.actionButton : t, i = o.actionIcons, a = i === void 0 ? r.actionIcons : i,
|
|
689
|
-
|
|
694
|
+
}, Ie = ["actionButton", "actionIcons", "badge", "backButton", "children", "className", "content", "defaultButton", "dismissiveButton", "footerSupplemental", "headerActions", "hideCloseIcon", "indicator", "initialFocus", "mobileStackedButtons", "modalSize", "nextButton", "noActions", "onClose", "onClosed", "onOpen", "onOpened", "open", "preventClose", "preventPrimaryAccept", "primaryButton", "returnFocusSelector", "scrollable", "title", "iconSource"], r = Te, ot = /* @__PURE__ */ ee(function(o, e) {
|
|
695
|
+
var t = o.actionButton, n = t === void 0 ? r.actionButton : t, i = o.actionIcons, a = i === void 0 ? r.actionIcons : i, d = o.badge, h = d === void 0 ? r.badge : d, O = o.backButton, _ = O === void 0 ? r.backButton : O, S = o.children, F = S === void 0 ? r.children : S, b = o.className, W = b === void 0 ? r.className : b, E = o.content, L = E === void 0 ? r.content : E, it = o.defaultButton, T = it === void 0 ? r.defaultButton : it, at = o.dismissiveButton, R = at === void 0 ? r.dismissiveButton : at, rt = o.footerSupplemental, w = rt === void 0 ? r.footerSupplemental : rt, lt = o.headerActions, st = lt === void 0 ? r.headerActions : lt, ct = o.hideCloseIcon, V = ct === void 0 ? r.hideCloseIcon : ct, ut = o.indicator, Wt = ut === void 0 ? r.indicator : ut, dt = o.initialFocus, I = dt === void 0 ? r.initialFocus : dt, mt = o.mobileStackedButtons, z = mt === void 0 ? r.mobileStackedButtons : mt, ft = o.modalSize, C = ft === void 0 ? r.modalSize : ft, pt = o.nextButton, N = pt === void 0 ? r.nextButton : pt, ht = o.noActions, B = ht === void 0 ? r.noActions : ht, gt = o.onClose, j = gt === void 0 ? r.onClose : gt, _t = o.onClosed, q = _t === void 0 ? r.onClosed : _t, Ct = o.onOpen, k = Ct === void 0 ? r.onOpen : Ct, vt = o.onOpened, M = vt === void 0 ? r.onOpened : vt, Et = o.open, St = Et === void 0 ? r.open : Et, yt = o.preventClose, Y = yt === void 0 ? r.preventClose : yt, Ot = o.preventPrimaryAccept, At = Ot === void 0 ? r.preventPrimaryAccept : Ot, bt = o.primaryButton, u = bt === void 0 ? r.primaryButton : bt, Tt = o.returnFocusSelector, J = Tt === void 0 ? r.returnFocusSelector : Tt, It = o.scrollable, Nt = It === void 0 ? r.scrollable : It, Bt = o.title, Dt = Bt === void 0 ? r.title : Bt, Ft = o.iconSource, Vt = Ft === void 0 ? r.iconSource : Ft, zt = Zt(o, Ie), P = Pt(), c = Pt();
|
|
696
|
+
ne(e, function() {
|
|
690
697
|
return P.current;
|
|
691
698
|
}, []);
|
|
692
|
-
var
|
|
699
|
+
var jt = Ht(), Lt = Mt(jt, 2), Q = Lt[0], qt = Lt[1], Yt = Ht(function() {
|
|
693
700
|
return N || _;
|
|
694
|
-
}),
|
|
701
|
+
}), Rt = Mt(Yt, 2), X = Rt[0], Jt = Rt[1];
|
|
695
702
|
v(function() {
|
|
696
|
-
|
|
703
|
+
Jt(N || _);
|
|
697
704
|
}, [N, _]);
|
|
698
705
|
var H = Z(function() {
|
|
699
|
-
|
|
706
|
+
xt() && qt(window.innerWidth <= 600);
|
|
700
707
|
}, []);
|
|
701
708
|
v(function() {
|
|
702
|
-
return
|
|
709
|
+
return xt() ? (H(), window.addEventListener("resize", H), function() {
|
|
703
710
|
window.removeEventListener("resize", H);
|
|
704
711
|
}) : function() {
|
|
705
712
|
};
|
|
706
713
|
}, [H]), v(function() {
|
|
707
|
-
return c.current =
|
|
714
|
+
return c.current = Ae.attachTo(P.current), function() {
|
|
708
715
|
c.current.destroy();
|
|
709
716
|
};
|
|
710
717
|
}, [c, P]), v(function() {
|
|
@@ -718,7 +725,7 @@ var f = Gt.strings, ye = (
|
|
|
718
725
|
var x = Z(function(p) {
|
|
719
726
|
j && j(p);
|
|
720
727
|
}, [j]), $ = Z(function(p) {
|
|
721
|
-
J &&
|
|
728
|
+
J && ie(J), q && q(p);
|
|
722
729
|
}, [J, q]);
|
|
723
730
|
v(function() {
|
|
724
731
|
return c.current.unlisten("MDCDialog: opening", k), c.current.listen("MDCDialog: opening", k), function() {
|
|
@@ -739,40 +746,41 @@ var f = Gt.strings, ye = (
|
|
|
739
746
|
}, [c, $]), v(function() {
|
|
740
747
|
St ? c.current.open() : c.current.close();
|
|
741
748
|
}, [c, St]);
|
|
742
|
-
var
|
|
749
|
+
var Qt = nt(function() {
|
|
743
750
|
return function() {
|
|
744
751
|
var p = {
|
|
745
752
|
className: "lmnt-modal__button mdc-dialog__button",
|
|
746
753
|
elevation: n?.props.elevation !== "default" ? n?.props.elevation : "flat",
|
|
747
754
|
variant: n?.props.variant || "filled"
|
|
748
755
|
};
|
|
749
|
-
return
|
|
756
|
+
return T === "action" && (p["data-mdc-dialog-button-default"] = !0), I === "action" && (p["data-mdc-dialog-initial-focus"] = !0), p;
|
|
750
757
|
};
|
|
751
|
-
}, [n?.props.elevation, n?.props.variant,
|
|
758
|
+
}, [n?.props.elevation, n?.props.variant, T, I]), Xt = nt(function() {
|
|
752
759
|
return function() {
|
|
753
760
|
var p = {
|
|
754
761
|
className: "lmnt-modal__button mdc-dialog__button",
|
|
755
762
|
"data-mdc-dialog-action": At ? "" : "accept",
|
|
756
|
-
elevation:
|
|
757
|
-
variant:
|
|
763
|
+
elevation: u?.props.elevation !== "default" ? u?.props.elevation : "flat",
|
|
764
|
+
variant: u?.props.variant || "filled"
|
|
758
765
|
};
|
|
759
|
-
return
|
|
766
|
+
return T === "primary" && (p["data-mdc-dialog-button-default"] = !0), I === "primary" && (p["data-mdc-dialog-initial-focus"] = !0), p;
|
|
760
767
|
};
|
|
761
|
-
}, [At,
|
|
762
|
-
return /* @__PURE__ */ m.createElement("aside",
|
|
768
|
+
}, [At, T, I, u?.props.elevation, u?.props.variant]);
|
|
769
|
+
return /* @__PURE__ */ m.createElement("aside", te({
|
|
763
770
|
ref: P,
|
|
764
771
|
className: G("lmnt", "lmnt-modal", "mdc-dialog", Nt && "lmnt-modal--scrollable mdc-dialog--scrollable", W),
|
|
765
772
|
role: "alertdialog"
|
|
766
|
-
},
|
|
773
|
+
}, zt), /* @__PURE__ */ m.createElement("div", {
|
|
767
774
|
className: G("lmnt-modal__container", "mdc-dialog__container", C === "fullscreen" && "mdc-dialog--fullscreen", C === "max" && "lmnt-modal__max", C === "xlarge" && "lmnt-modal__xl", C === "large" && "lmnt-modal__lg", C === "medium" && "lmnt-modal__md", C === "small" && "lmnt-modal__sm", (C === "mobile" || Q) && "lmnt-modal__mobile", C === "dialog" && "lmnt-modal__dialog", B && "lmnt-modal-no-actions")
|
|
768
775
|
}, /* @__PURE__ */ m.createElement("div", {
|
|
769
776
|
className: "lmnt-modal__surface mdc-dialog__surface"
|
|
770
777
|
}, /* @__PURE__ */ m.createElement("header", {
|
|
771
778
|
className: G("lmnt-modal__title", "mdc-dialog__title", (C === "dialog" || V) && "lmnt-modal_title-hide-close-icon", a && "lmnt-modal_title-actionsIcons", Nt && "lmnt-modal__title-scrollable", (V || C === "dialog" || B) && "lmnt-modal--no-close-icon")
|
|
772
|
-
}, !V && C !== "dialog" && !B && /* @__PURE__ */ m.createElement(
|
|
779
|
+
}, !V && C !== "dialog" && !B && /* @__PURE__ */ m.createElement(Ut, {
|
|
773
780
|
className: "mdc-icon-button material-icons mdc-dialog__close",
|
|
774
781
|
"data-mdc-dialog-action": "close",
|
|
775
|
-
icon: "clear"
|
|
782
|
+
icon: "clear",
|
|
783
|
+
iconSource: Vt
|
|
776
784
|
}), Dt && /* @__PURE__ */ m.createElement("div", null, Dt), st && /* @__PURE__ */ m.createElement("div", {
|
|
777
785
|
className: "lmnt-dialog__title-actions"
|
|
778
786
|
}, st), h && /* @__PURE__ */ m.createElement("div", {
|
|
@@ -782,22 +790,22 @@ var f = Gt.strings, ye = (
|
|
|
782
790
|
}
|
|
783
791
|
}, h)), (L || F) && /* @__PURE__ */ m.createElement("section", {
|
|
784
792
|
className: "lmnt-modal__content mdc-dialog__content"
|
|
785
|
-
}, L || F),
|
|
793
|
+
}, L || F), Wt, (n || _ || R || N || u || w) && /* @__PURE__ */ m.createElement("footer", {
|
|
786
794
|
className: G("lmnt-modal__actions", "mdc-dialog__actions", Q && "lmnt-dialog__actions__mobile", w && "lmnt-modal__actions--supplemental-btn", Q && z && "lmnt-modal_actions-mobile-stacked")
|
|
787
795
|
}, !X && w && /* @__PURE__ */ m.createElement("div", {
|
|
788
796
|
className: "lmnt-dialog__actions__supplemental"
|
|
789
797
|
}, D(w, function() {
|
|
790
798
|
var p = {};
|
|
791
|
-
return
|
|
792
|
-
})), !X && (n || R ||
|
|
799
|
+
return T === "footerSupplemental" && (p["data-mdc-dialog-button-default"] = !0), I === "footerSupplemental" && (p["data-mdc-dialog-initial-focus"] = !0), p;
|
|
800
|
+
})), !X && (n || R || u) && /* @__PURE__ */ m.createElement("div", {
|
|
793
801
|
className: "lmnt-dialog__actions__right-align lmnt-modal_actions_button"
|
|
794
802
|
}, R && D(R, {
|
|
795
803
|
variant: "text",
|
|
796
804
|
className: "lmnt-modal__button mdc-dialog__button",
|
|
797
805
|
"data-mdc-dialog-action": "close"
|
|
798
|
-
}), n && !
|
|
806
|
+
}), n && !u && D(n, Qt), u && D(u, Xt)), X && /* @__PURE__ */ m.createElement("div", {
|
|
799
807
|
className: "lmnt-modal_actions_button lmnt-dialog__actions__directional"
|
|
800
|
-
}, /* @__PURE__ */ m.createElement("div", null,
|
|
808
|
+
}, /* @__PURE__ */ m.createElement("div", null, ae(_, "lmnt-modal__button")), /* @__PURE__ */ m.createElement("div", null, D(N, {
|
|
801
809
|
className: "lmnt-modal__button",
|
|
802
810
|
"data-mdc-dialog-initial-focus": !0
|
|
803
811
|
})))))), /* @__PURE__ */ m.createElement("div", {
|
|
@@ -805,32 +813,32 @@ var f = Gt.strings, ye = (
|
|
|
805
813
|
}));
|
|
806
814
|
});
|
|
807
815
|
ot.displayName = "Modal";
|
|
808
|
-
ot.propTypes =
|
|
809
|
-
const
|
|
810
|
-
modal:
|
|
811
|
-
gap:
|
|
812
|
-
title:
|
|
813
|
-
titleWithoutCloseIcon:
|
|
814
|
-
closeButton:
|
|
815
|
-
errorBanner:
|
|
816
|
-
},
|
|
816
|
+
ot.propTypes = be;
|
|
817
|
+
const Ne = "_modal_1l955_1", Be = "_gap_1l955_18", De = "_title_1l955_23", Fe = "_titleWithoutCloseIcon_1l955_36", Le = "_closeButton_1l955_40", Re = "_errorBanner_1l955_52", y = {
|
|
818
|
+
modal: Ne,
|
|
819
|
+
gap: Be,
|
|
820
|
+
title: De,
|
|
821
|
+
titleWithoutCloseIcon: Fe,
|
|
822
|
+
closeButton: Le,
|
|
823
|
+
errorBanner: Re
|
|
824
|
+
}, Je = ({
|
|
817
825
|
onClose: o,
|
|
818
826
|
title: e,
|
|
819
827
|
headerActions: t,
|
|
820
828
|
actionButton: n,
|
|
821
829
|
hideCloseIcon: i,
|
|
822
830
|
closeIcon: a = "close",
|
|
823
|
-
leadingIcon:
|
|
831
|
+
leadingIcon: d,
|
|
824
832
|
isOnline: h = !0,
|
|
825
833
|
offlineViewProps: O,
|
|
826
834
|
children: _,
|
|
827
835
|
errorBannerProps: { hasError: S, ...F } = { hasError: !1 },
|
|
828
|
-
...
|
|
836
|
+
...b
|
|
829
837
|
}) => {
|
|
830
838
|
const W = nt(() => {
|
|
831
839
|
const E = {
|
|
832
840
|
id: "base",
|
|
833
|
-
action: /* @__PURE__ */
|
|
841
|
+
action: /* @__PURE__ */ kt(
|
|
834
842
|
U,
|
|
835
843
|
{
|
|
836
844
|
primaryAlign: "center",
|
|
@@ -838,7 +846,7 @@ const be = "_modal_1l955_1", Ie = "_gap_1l955_18", Ne = "_title_1l955_23", Be =
|
|
|
838
846
|
className: y.gap,
|
|
839
847
|
children: [
|
|
840
848
|
!i && /* @__PURE__ */ g(
|
|
841
|
-
|
|
849
|
+
Ut,
|
|
842
850
|
{
|
|
843
851
|
icon: a,
|
|
844
852
|
onClick: () => o?.(),
|
|
@@ -846,12 +854,12 @@ const be = "_modal_1l955_1", Ie = "_gap_1l955_18", Ne = "_title_1l955_23", Be =
|
|
|
846
854
|
className: y.closeButton
|
|
847
855
|
}
|
|
848
856
|
),
|
|
849
|
-
|
|
857
|
+
d ? /* @__PURE__ */ g(fe, { customPadding: "0.25rem 0 0 0.75rem", children: /* @__PURE__ */ g(ge, { icon: d }) }) : /* @__PURE__ */ g(wt, {}),
|
|
850
858
|
/* @__PURE__ */ g(
|
|
851
|
-
|
|
859
|
+
pe,
|
|
852
860
|
{
|
|
853
861
|
level: 6,
|
|
854
|
-
className: i && !
|
|
862
|
+
className: i && !d ? y.titleWithoutCloseIcon : "",
|
|
855
863
|
children: e
|
|
856
864
|
}
|
|
857
865
|
)
|
|
@@ -867,24 +875,24 @@ const be = "_modal_1l955_1", Ie = "_gap_1l955_18", Ne = "_title_1l955_23", Be =
|
|
|
867
875
|
action: /* @__PURE__ */ g(U, { className: y.gap, children: t }, "action-group")
|
|
868
876
|
};
|
|
869
877
|
return [E, L];
|
|
870
|
-
}, [t, i, a,
|
|
878
|
+
}, [t, i, a, d, o, e]);
|
|
871
879
|
return /* @__PURE__ */ g(
|
|
872
880
|
ot,
|
|
873
881
|
{
|
|
874
|
-
...
|
|
882
|
+
...b,
|
|
875
883
|
"data-testid": "modal",
|
|
876
|
-
className: `${y.modal} ${y.title} ${
|
|
884
|
+
className: `${y.modal} ${y.title} ${b.className ?? ""}`,
|
|
877
885
|
hideCloseIcon: !0,
|
|
878
886
|
actionButton: n,
|
|
879
|
-
headerActions: /* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */ g(U, { fullWidth: !0, primaryAlign: "space-between", secondaryAlign: "center", children: W.map((E) => /* @__PURE__ */ g(
|
|
881
|
-
S && /* @__PURE__ */ g("div", { className: y.errorBanner, children: /* @__PURE__ */ g(
|
|
887
|
+
headerActions: /* @__PURE__ */ kt(U, { fullWidth: !0, gap: "none", direction: "vertical", children: [
|
|
888
|
+
/* @__PURE__ */ g(U, { fullWidth: !0, primaryAlign: "space-between", secondaryAlign: "center", children: W.map((E) => /* @__PURE__ */ g(oe, { children: E.action }, E.id)) }),
|
|
889
|
+
S && /* @__PURE__ */ g("div", { className: y.errorBanner, children: /* @__PURE__ */ g(he, { ...F, isOpen: S }) })
|
|
882
890
|
] }, "header-group"),
|
|
883
891
|
preventClose: !0,
|
|
884
|
-
children: h ? /* @__PURE__ */ g(
|
|
892
|
+
children: h ? /* @__PURE__ */ g(wt, { children: _ }) : /* @__PURE__ */ g(_e, { ...O })
|
|
885
893
|
}
|
|
886
894
|
);
|
|
887
895
|
};
|
|
888
896
|
export {
|
|
889
|
-
|
|
897
|
+
Je as Modal
|
|
890
898
|
};
|