@hortiview/shared-components 2.8.6 → 2.8.7
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 +6 -0
- package/dist/{AlertBanner-DlgFtlZm.js → AlertBanner-D-NTP_6i.js} +3 -3
- package/dist/{BigLoadingSpinner-B_HFhx2F.js → BigLoadingSpinner-CCxsMWnc.js} +1 -1
- package/dist/{GenericCard-Cv8qaFLu.js → GenericCard-DOKyENNm.js} +3 -3
- package/dist/{ListAreaService-D9HRsvH0.js → ListAreaService-CI-s1Xx5.js} +5 -5
- package/dist/{OfflineView-Bw-sbsym.js → OfflineView-DHtzNLwt.js} +3 -3
- package/dist/_Map-BmafU0dj.js +113 -0
- package/dist/components/AlertBanner/AlertBanner.js +4 -4
- package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
- package/dist/components/AlertBanner/LinkBanner.js +3 -3
- package/dist/components/BaseView/BaseView.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.js +1 -1
- package/dist/components/ChipCard/ChipCard.js +499 -390
- package/dist/components/ContextMenu/ContextMenu.js +4 -4
- package/dist/components/DeleteModal/DeleteModal.js +5 -5
- package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +3 -3
- package/dist/components/EmptyView/EmptyView.js +161 -125
- package/dist/components/Filter/Filter.js +11 -11
- package/dist/components/Filter/Filter.test.js +51 -35
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +10 -10
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +2 -2
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.js +540 -535
- package/dist/components/FormComponents/FormText/FormText.js +2 -2
- package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
- package/dist/components/GenericTable/GenericTable.js +8246 -7153
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
- package/dist/components/HashTabView/HashTabView.js +552 -541
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/Iconify/Iconify.js +2 -2
- package/dist/components/InfoCard/InfoCard.js +4 -4
- package/dist/components/InfoGroup/InfoGroup.js +3 -3
- package/dist/components/ListArea/ListArea.js +16 -16
- package/dist/components/ListArea/ListArea.test.js +20 -20
- package/dist/components/ListArea/ListAreaService.js +6 -6
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +164 -178
- package/dist/components/Modal/Modal.js +305 -312
- package/dist/components/ModulePadding/ModulePadding.js +8 -8
- package/dist/components/OfflineView/OfflineView.js +4 -4
- package/dist/components/OfflineView/OfflineView.test.js +1 -1
- package/dist/components/OnboardingBanner/OnboardingBanner.js +13 -13
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/Select/Select.js +2 -2
- 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/StepperIndicator.js +1 -1
- package/dist/defineProperty-CmuOyxyf.js +318 -0
- package/dist/es.string.iterator-DrqCBub-.js +581 -0
- package/dist/find-B-dm7n_F.js +88 -0
- package/dist/{get-CqneoueQ.js → get-DuK51wnj.js} +1 -1
- package/dist/get-u1nFMLdT.js +377 -0
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-BIZAN_pL.js +213 -0
- package/dist/includes-Bt-Stz_B.js +110 -0
- package/dist/index-Cpb-8cAN.js +2465 -0
- package/dist/index.es-0QJC9VS2.js +325 -0
- package/dist/{index.es-CyjMwj5g.js → index.es-45NOgWlB.js} +93 -101
- package/dist/index.es-B6ZgiW2s.js +3790 -0
- package/dist/{index.es-1zrFd4Te.js → index.es-BGordhUK.js} +352 -323
- package/dist/index.es-BRtk0Q33.js +42 -0
- package/dist/index.es-BXj90wb_.js +402 -0
- package/dist/index.es-Bg8hxXM8.js +912 -0
- package/dist/index.es-Bgjh6euR.js +292 -0
- package/dist/index.es-Bo1Rhtyb.js +80 -0
- package/dist/{index.es-BaX-8joZ.js → index.es-CK4oZMKs.js} +3329 -3232
- package/dist/{index.es-nQ0lMwpE.js → index.es-CKdJX75f.js} +74 -78
- package/dist/index.es-CmF6xAUJ.js +48 -0
- package/dist/{index.es-p4O33fMu.js → index.es-Cq04gn3U.js} +321 -305
- package/dist/{index.es-Cdu6tjUC.js → index.es-D1IpdMde.js} +87 -95
- package/dist/index.es-DDYCugj-.js +166 -0
- package/dist/{index.es-jFaPNuBO.js → index.es-DENZVv7_.js} +427 -444
- package/dist/{index.es-Dnrk7XL6.js → index.es-DObVvepK.js} +158 -166
- package/dist/index.es-DeF-y7fd.js +122 -0
- package/dist/{index.es-ks_RnHLh.js → index.es-Dfju71Pi.js} +27 -37
- package/dist/index.es-DqSY-ePE.js +4923 -0
- package/dist/index.es-DwzB1d7_.js +1061 -0
- package/dist/index.es-IXyb5F6n.js +457 -0
- package/dist/index.es-t7hFwQSs.js +67 -0
- package/dist/isArray-DN9s620O.js +83 -0
- package/dist/{isArray-CSaAxHlq.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/{isEmpty-SkzPhavO.js → isEmpty-CxD71Jv8.js} +4 -5
- package/dist/{isString-CZsZiWgW.js → isString-BNaBRq3S.js} +2 -2
- package/dist/isTypedArray-Dw_IY7Zq.js +212 -0
- package/dist/keyboard-B-WUULl-.js +173 -0
- package/dist/main.js +2 -2
- package/dist/map-Dbvlv_6y.js +707 -0
- package/dist/omit-uTAyrUTm.js +645 -0
- package/dist/orderBy-BXxEvUw6.js +571 -0
- package/dist/parse-int-qVAoFbOL.js +75 -0
- package/dist/services/UtilService.js +7 -7
- package/dist/slicedToArray-BWk2gTCn.js +436 -0
- package/dist/{toString-BFJes2_D.js → toString-CrgB_7Pe.js} +1 -1
- package/dist/{uniqueId-DrPMzA-E.js → uniqueId-NU3-C36A.js} +1 -1
- package/package.json +3 -3
- package/dist/_baseIsEqual-Df2URKWm.js +0 -240
- package/dist/_getAllKeys-BQWmkEw5.js +0 -86
- package/dist/_getTag-BkGSRa18.js +0 -79
- package/dist/_setToString-B6E13pDg.js +0 -580
- package/dist/get-DQr2KQKm.js +0 -113
- package/dist/index-D5m--65X.js +0 -1491
- package/dist/index.es-8MVlRCi4.js +0 -1066
- package/dist/index.es-BbaCXS9-.js +0 -45
- package/dist/index.es-BikIx4uw.js +0 -3242
- package/dist/index.es-CDMu_yu0.js +0 -954
- package/dist/index.es-ChSlnpSq.js +0 -309
- package/dist/index.es-D66OkZJH.js +0 -4853
- package/dist/index.es-DFFyENnI.js +0 -63
- package/dist/index.es-DTMwaJ6B.js +0 -56
- package/dist/index.es-DgTJmbgD.js +0 -268
- package/dist/index.es-DmsyeHLO.js +0 -306
- package/dist/index.es-Dw1eih7R.js +0 -159
- package/dist/index.es-eKuwB1ll.js +0 -54
- package/dist/index.es-qxTN-Bb2.js +0 -107
- package/dist/index.es-xnSvM9b9.js +0 -444
- package/dist/isArray-DDZrq40X.js +0 -456
- package/dist/keyboard-Bpt0aBqQ.js +0 -107
- package/dist/omit-BN3qeeaj.js +0 -364
- package/dist/orderBy-D4LvP9Az.js +0 -316
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { G as
|
|
3
|
-
import { I as
|
|
4
|
-
import { _ as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { M as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { jsxs as Yt, jsx as E, Fragment as Jt } from "react/jsx-runtime";
|
|
2
|
+
import { G as Y } from "../../index.es-DDYCugj-.js";
|
|
3
|
+
import { I as Pt } from "../../index.es-IXyb5F6n.js";
|
|
4
|
+
import { _ as Qt, a as Xt, c as P, P as l } from "../../index-Cpb-8cAN.js";
|
|
5
|
+
import { _ as Lt } from "../../slicedToArray-BWk2gTCn.js";
|
|
6
|
+
import u, { forwardRef as Zt, useRef as Rt, useImperativeHandle as te, useState as wt, useEffect as _, useCallback as J, useMemo as Z, Fragment as ee } from "react";
|
|
7
|
+
import { w as kt, j as ne, c as D, a as oe } from "../../index.es-BXj90wb_.js";
|
|
8
|
+
import { b as Ht, c as Mt, d as ie } from "../../tslib.es6-BDCynO9F.js";
|
|
9
|
+
import { M as ae, a as re } from "../../component-neHBNHRu.js";
|
|
10
|
+
import { M as se, c as le, m as ce } from "../../component-DsB0poTj.js";
|
|
11
|
+
import { A as de } from "../../animationframe-EMBh6XeO.js";
|
|
12
|
+
import { P as ue } from "../../index.es-Bo1Rhtyb.js";
|
|
13
|
+
import { b as fe } from "../../index.es-BGordhUK.js";
|
|
14
|
+
import { Iconify as me } from "../Iconify/Iconify.js";
|
|
15
|
+
import { O as pe } from "../../OfflineView-DHtzNLwt.js";
|
|
15
16
|
import '../../assets/Modal.css';/**
|
|
16
17
|
* @license
|
|
17
18
|
* Copyright 2016 Google Inc.
|
|
@@ -34,21 +35,21 @@ import '../../assets/Modal.css';/**
|
|
|
34
35
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
35
36
|
* THE SOFTWARE.
|
|
36
37
|
*/
|
|
37
|
-
function
|
|
38
|
-
return e(
|
|
38
|
+
function he(o, e, t) {
|
|
39
|
+
return e(o, { initialFocusEl: t });
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
41
|
+
function ge(o) {
|
|
42
|
+
return o ? o.scrollHeight > o.offsetHeight : !1;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
44
|
+
function Ce(o) {
|
|
45
|
+
return o ? o.scrollTop === 0 : !1;
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
47
|
+
function _e(o) {
|
|
48
|
+
return o ? Math.ceil(o.scrollHeight - o.scrollTop) === o.clientHeight : !1;
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function Ee(o) {
|
|
50
51
|
var e = /* @__PURE__ */ new Set();
|
|
51
|
-
return [].forEach.call(
|
|
52
|
+
return [].forEach.call(o, function(t) {
|
|
52
53
|
return e.add(t.offsetTop);
|
|
53
54
|
}), e.size > 1;
|
|
54
55
|
}
|
|
@@ -74,47 +75,47 @@ function kt(i) {
|
|
|
74
75
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
75
76
|
* THE SOFTWARE.
|
|
76
77
|
*/
|
|
77
|
-
var
|
|
78
|
+
var Q = "mdc-dom-focus-sentinel", ve = (
|
|
78
79
|
/** @class */
|
|
79
80
|
function() {
|
|
80
|
-
function
|
|
81
|
+
function o(e, t) {
|
|
81
82
|
t === void 0 && (t = {}), this.root = e, this.options = t, this.elFocusedBeforeTrapFocus = null;
|
|
82
83
|
}
|
|
83
|
-
return
|
|
84
|
+
return o.prototype.trapFocus = function() {
|
|
84
85
|
var e = this.getFocusableElements(this.root);
|
|
85
86
|
if (e.length === 0)
|
|
86
87
|
throw new Error("FocusTrap: Element must have at least one focusable child.");
|
|
87
88
|
this.elFocusedBeforeTrapFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null, this.wrapTabFocus(this.root), this.options.skipInitialFocus || this.focusInitialElement(e, this.options.initialFocusEl);
|
|
88
|
-
},
|
|
89
|
-
[].slice.call(this.root.querySelectorAll("." +
|
|
89
|
+
}, o.prototype.releaseFocus = function() {
|
|
90
|
+
[].slice.call(this.root.querySelectorAll("." + Q)).forEach(function(e) {
|
|
90
91
|
e.parentElement.removeChild(e);
|
|
91
92
|
}), !this.options.skipRestoreFocus && this.elFocusedBeforeTrapFocus && this.elFocusedBeforeTrapFocus.focus();
|
|
92
|
-
},
|
|
93
|
-
var t = this, n = this.createSentinel(),
|
|
93
|
+
}, o.prototype.wrapTabFocus = function(e) {
|
|
94
|
+
var t = this, n = this.createSentinel(), i = this.createSentinel();
|
|
94
95
|
n.addEventListener("focus", function() {
|
|
95
96
|
var a = t.getFocusableElements(e);
|
|
96
97
|
a.length > 0 && a[a.length - 1].focus();
|
|
97
|
-
}),
|
|
98
|
+
}), i.addEventListener("focus", function() {
|
|
98
99
|
var a = t.getFocusableElements(e);
|
|
99
100
|
a.length > 0 && a[0].focus();
|
|
100
|
-
}), e.insertBefore(n, e.children[0]), e.appendChild(
|
|
101
|
-
},
|
|
101
|
+
}), e.insertBefore(n, e.children[0]), e.appendChild(i);
|
|
102
|
+
}, o.prototype.focusInitialElement = function(e, t) {
|
|
102
103
|
var n = 0;
|
|
103
104
|
t && (n = Math.max(e.indexOf(t), 0)), e[n].focus();
|
|
104
|
-
},
|
|
105
|
+
}, o.prototype.getFocusableElements = function(e) {
|
|
105
106
|
var t = [].slice.call(e.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button"));
|
|
106
107
|
return t.filter(function(n) {
|
|
107
|
-
var
|
|
108
|
+
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(Q) && !i, p = !1;
|
|
108
109
|
if (a) {
|
|
109
|
-
var
|
|
110
|
-
|
|
110
|
+
var h = getComputedStyle(n);
|
|
111
|
+
p = h.display === "none" || h.visibility === "hidden";
|
|
111
112
|
}
|
|
112
|
-
return a && !
|
|
113
|
+
return a && !p;
|
|
113
114
|
});
|
|
114
|
-
},
|
|
115
|
+
}, o.prototype.createSentinel = function() {
|
|
115
116
|
var e = document.createElement("div");
|
|
116
|
-
return e.setAttribute("tabindex", "0"), e.setAttribute("aria-hidden", "true"), e.classList.add(
|
|
117
|
-
},
|
|
117
|
+
return e.setAttribute("tabindex", "0"), e.setAttribute("aria-hidden", "true"), e.classList.add(Q), e;
|
|
118
|
+
}, o;
|
|
118
119
|
}()
|
|
119
120
|
);
|
|
120
121
|
/**
|
|
@@ -139,7 +140,7 @@ var $ = "mdc-dom-focus-sentinel", Ht = (
|
|
|
139
140
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
140
141
|
* THE SOFTWARE.
|
|
141
142
|
*/
|
|
142
|
-
var
|
|
143
|
+
var s = {
|
|
143
144
|
CLOSING: "mdc-dialog--closing",
|
|
144
145
|
OPEN: "mdc-dialog--open",
|
|
145
146
|
OPENING: "mdc-dialog--opening",
|
|
@@ -172,7 +173,7 @@ var r = {
|
|
|
172
173
|
// to prevent interactions with the content behind this scrim, and to capture
|
|
173
174
|
// scrim clicks.
|
|
174
175
|
SCRIM_HIDDEN: "mdc-dialog__scrim--hidden"
|
|
175
|
-
},
|
|
176
|
+
}, O = {
|
|
176
177
|
ACTION_ATTRIBUTE: "data-mdc-dialog-action",
|
|
177
178
|
BUTTON_DEFAULT_ATTRIBUTE: "data-mdc-dialog-button-default",
|
|
178
179
|
BUTTON_SELECTOR: ".mdc-dialog__button",
|
|
@@ -192,7 +193,7 @@ var r = {
|
|
|
192
193
|
".mdc-menu .mdc-deprecated-list-item"
|
|
193
194
|
].join(", "),
|
|
194
195
|
SURFACE_SELECTOR: ".mdc-dialog__surface"
|
|
195
|
-
},
|
|
196
|
+
}, X = {
|
|
196
197
|
DIALOG_ANIMATION_CLOSE_TIME_MS: 75,
|
|
197
198
|
DIALOG_ANIMATION_OPEN_TIME_MS: 150
|
|
198
199
|
};
|
|
@@ -218,17 +219,17 @@ var r = {
|
|
|
218
219
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
219
220
|
* THE SOFTWARE.
|
|
220
221
|
*/
|
|
221
|
-
var
|
|
222
|
-
(function(
|
|
223
|
-
|
|
224
|
-
})(
|
|
225
|
-
var
|
|
222
|
+
var x;
|
|
223
|
+
(function(o) {
|
|
224
|
+
o.POLL_SCROLL_POS = "poll_scroll_position", o.POLL_LAYOUT_CHANGE = "poll_layout_change";
|
|
225
|
+
})(x || (x = {}));
|
|
226
|
+
var xt = (
|
|
226
227
|
/** @class */
|
|
227
|
-
function(
|
|
228
|
-
|
|
228
|
+
function(o) {
|
|
229
|
+
Ht(e, o);
|
|
229
230
|
function e(t) {
|
|
230
|
-
var n =
|
|
231
|
-
return n.dialogOpen = !1, n.isFullscreen = !1, n.animationFrame = 0, n.animationTimer = 0, n.escapeKeyAction =
|
|
231
|
+
var n = o.call(this, Mt(Mt({}, e.defaultAdapter), t)) || this;
|
|
232
|
+
return n.dialogOpen = !1, n.isFullscreen = !1, n.animationFrame = 0, n.animationTimer = 0, n.escapeKeyAction = O.CLOSE_ACTION, n.scrimClickAction = O.CLOSE_ACTION, n.autoStackButtons = !0, n.areButtonsStacked = !1, n.suppressDefaultPressSelector = O.SUPPRESS_DEFAULT_PRESS_SELECTOR, n.animFrame = new de(), n.contentScrollHandler = function() {
|
|
232
233
|
n.handleScrollEvent();
|
|
233
234
|
}, n.windowResizeHandler = function() {
|
|
234
235
|
n.layout();
|
|
@@ -238,19 +239,19 @@ var rt = (
|
|
|
238
239
|
}
|
|
239
240
|
return Object.defineProperty(e, "cssClasses", {
|
|
240
241
|
get: function() {
|
|
241
|
-
return
|
|
242
|
+
return s;
|
|
242
243
|
},
|
|
243
244
|
enumerable: !1,
|
|
244
245
|
configurable: !0
|
|
245
246
|
}), Object.defineProperty(e, "strings", {
|
|
246
247
|
get: function() {
|
|
247
|
-
return
|
|
248
|
+
return O;
|
|
248
249
|
},
|
|
249
250
|
enumerable: !1,
|
|
250
251
|
configurable: !0
|
|
251
252
|
}), Object.defineProperty(e, "numbers", {
|
|
252
253
|
get: function() {
|
|
253
|
-
return
|
|
254
|
+
return X;
|
|
254
255
|
},
|
|
255
256
|
enumerable: !1,
|
|
256
257
|
configurable: !0
|
|
@@ -318,30 +319,30 @@ var rt = (
|
|
|
318
319
|
enumerable: !1,
|
|
319
320
|
configurable: !0
|
|
320
321
|
}), e.prototype.init = function() {
|
|
321
|
-
this.adapter.hasClass(
|
|
322
|
+
this.adapter.hasClass(s.STACKED) && this.setAutoStackButtons(!1), this.isFullscreen = this.adapter.hasClass(s.FULLSCREEN);
|
|
322
323
|
}, e.prototype.destroy = function() {
|
|
323
|
-
this.dialogOpen && this.close(
|
|
324
|
+
this.dialogOpen && this.close(O.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);
|
|
324
325
|
}, e.prototype.open = function(t) {
|
|
325
326
|
var n = this;
|
|
326
|
-
this.dialogOpen = !0, this.adapter.notifyOpening(), this.adapter.addClass(
|
|
327
|
-
n.adapter.addClass(
|
|
327
|
+
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() {
|
|
328
|
+
n.adapter.addClass(s.OPEN), n.adapter.addBodyClass(s.SCROLL_LOCK), n.layout(), n.animationTimer = setTimeout(function() {
|
|
328
329
|
n.handleAnimationTimerEnd(), n.adapter.trapFocus(n.adapter.getInitialFocusEl()), n.adapter.notifyOpened();
|
|
329
|
-
},
|
|
330
|
+
}, X.DIALOG_ANIMATION_OPEN_TIME_MS);
|
|
330
331
|
});
|
|
331
332
|
}, e.prototype.close = function(t) {
|
|
332
333
|
var n = this;
|
|
333
|
-
t === void 0 && (t = ""), this.dialogOpen && (this.dialogOpen = !1, this.adapter.notifyClosing(t), this.adapter.addClass(
|
|
334
|
+
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() {
|
|
334
335
|
n.adapter.releaseFocus(), n.handleAnimationTimerEnd(), n.adapter.notifyClosed(t);
|
|
335
|
-
},
|
|
336
|
+
}, X.DIALOG_ANIMATION_CLOSE_TIME_MS));
|
|
336
337
|
}, e.prototype.showSurfaceScrim = function() {
|
|
337
338
|
var t = this;
|
|
338
|
-
this.adapter.addClass(
|
|
339
|
-
t.adapter.addClass(
|
|
339
|
+
this.adapter.addClass(s.SURFACE_SCRIM_SHOWING), this.runNextAnimationFrame(function() {
|
|
340
|
+
t.adapter.addClass(s.SURFACE_SCRIM_SHOWN);
|
|
340
341
|
});
|
|
341
342
|
}, e.prototype.hideSurfaceScrim = function() {
|
|
342
|
-
this.adapter.removeClass(
|
|
343
|
+
this.adapter.removeClass(s.SURFACE_SCRIM_SHOWN), this.adapter.addClass(s.SURFACE_SCRIM_HIDING);
|
|
343
344
|
}, e.prototype.handleSurfaceScrimTransitionEnd = function() {
|
|
344
|
-
this.adapter.removeClass(
|
|
345
|
+
this.adapter.removeClass(s.SURFACE_SCRIM_HIDING), this.adapter.removeClass(s.SURFACE_SCRIM_SHOWING);
|
|
345
346
|
}, e.prototype.isOpen = function() {
|
|
346
347
|
return this.dialogOpen;
|
|
347
348
|
}, e.prototype.getEscapeKeyAction = function() {
|
|
@@ -362,24 +363,24 @@ var rt = (
|
|
|
362
363
|
this.suppressDefaultPressSelector = t;
|
|
363
364
|
}, e.prototype.layout = function() {
|
|
364
365
|
var t = this;
|
|
365
|
-
this.animFrame.request(
|
|
366
|
+
this.animFrame.request(x.POLL_LAYOUT_CHANGE, function() {
|
|
366
367
|
t.layoutInternal();
|
|
367
368
|
});
|
|
368
369
|
}, e.prototype.handleClick = function(t) {
|
|
369
|
-
var n = this.adapter.eventTargetMatches(t.target,
|
|
370
|
+
var n = this.adapter.eventTargetMatches(t.target, O.SCRIM_SELECTOR);
|
|
370
371
|
if (n && this.scrimClickAction !== "")
|
|
371
372
|
this.close(this.scrimClickAction);
|
|
372
373
|
else {
|
|
373
|
-
var
|
|
374
|
-
|
|
374
|
+
var i = this.adapter.getActionFromEvent(t);
|
|
375
|
+
i && this.close(i);
|
|
375
376
|
}
|
|
376
377
|
}, e.prototype.handleKeydown = function(t) {
|
|
377
378
|
var n = t.key === "Enter" || t.keyCode === 13;
|
|
378
379
|
if (n) {
|
|
379
|
-
var
|
|
380
|
-
if (!
|
|
381
|
-
var a = t.composedPath ? t.composedPath()[0] : t.target,
|
|
382
|
-
n &&
|
|
380
|
+
var i = this.adapter.getActionFromEvent(t);
|
|
381
|
+
if (!i) {
|
|
382
|
+
var a = t.composedPath ? t.composedPath()[0] : t.target, p = this.suppressDefaultPressSelector ? !this.adapter.eventTargetMatches(a, this.suppressDefaultPressSelector) : !0;
|
|
383
|
+
n && p && this.adapter.clickDefaultButton();
|
|
383
384
|
}
|
|
384
385
|
}
|
|
385
386
|
}, e.prototype.handleDocumentKeydown = function(t) {
|
|
@@ -387,30 +388,30 @@ var rt = (
|
|
|
387
388
|
n && this.escapeKeyAction !== "" && this.close(this.escapeKeyAction);
|
|
388
389
|
}, e.prototype.handleScrollEvent = function() {
|
|
389
390
|
var t = this;
|
|
390
|
-
this.animFrame.request(
|
|
391
|
+
this.animFrame.request(x.POLL_SCROLL_POS, function() {
|
|
391
392
|
t.toggleScrollDividerHeader(), t.toggleScrollDividerFooter();
|
|
392
393
|
});
|
|
393
394
|
}, e.prototype.layoutInternal = function() {
|
|
394
395
|
this.autoStackButtons && this.detectStackedButtons(), this.toggleScrollableClasses();
|
|
395
396
|
}, e.prototype.handleAnimationTimerEnd = function() {
|
|
396
|
-
this.animationTimer = 0, this.adapter.removeClass(
|
|
397
|
+
this.animationTimer = 0, this.adapter.removeClass(s.OPENING), this.adapter.removeClass(s.CLOSING);
|
|
397
398
|
}, e.prototype.runNextAnimationFrame = function(t) {
|
|
398
399
|
var n = this;
|
|
399
400
|
cancelAnimationFrame(this.animationFrame), this.animationFrame = requestAnimationFrame(function() {
|
|
400
401
|
n.animationFrame = 0, clearTimeout(n.animationTimer), n.animationTimer = setTimeout(t, 0);
|
|
401
402
|
});
|
|
402
403
|
}, e.prototype.detectStackedButtons = function() {
|
|
403
|
-
this.adapter.removeClass(
|
|
404
|
+
this.adapter.removeClass(s.STACKED);
|
|
404
405
|
var t = this.adapter.areButtonsStacked();
|
|
405
|
-
t && this.adapter.addClass(
|
|
406
|
+
t && this.adapter.addClass(s.STACKED), t !== this.areButtonsStacked && (this.adapter.reverseButtons(), this.areButtonsStacked = t);
|
|
406
407
|
}, e.prototype.toggleScrollableClasses = function() {
|
|
407
|
-
this.adapter.removeClass(
|
|
408
|
+
this.adapter.removeClass(s.SCROLLABLE), this.adapter.isContentScrollable() && (this.adapter.addClass(s.SCROLLABLE), this.isFullscreen && (this.toggleScrollDividerHeader(), this.toggleScrollDividerFooter()));
|
|
408
409
|
}, e.prototype.toggleScrollDividerHeader = function() {
|
|
409
|
-
this.adapter.isScrollableContentAtTop() ? this.adapter.hasClass(
|
|
410
|
+
this.adapter.isScrollableContentAtTop() ? this.adapter.hasClass(s.SCROLL_DIVIDER_HEADER) && this.adapter.removeClass(s.SCROLL_DIVIDER_HEADER) : this.adapter.addClass(s.SCROLL_DIVIDER_HEADER);
|
|
410
411
|
}, e.prototype.toggleScrollDividerFooter = function() {
|
|
411
|
-
this.adapter.isScrollableContentAtBottom() ? this.adapter.hasClass(
|
|
412
|
+
this.adapter.isScrollableContentAtBottom() ? this.adapter.hasClass(s.SCROLL_DIVIDER_FOOTER) && this.adapter.removeClass(s.SCROLL_DIVIDER_FOOTER) : this.adapter.addClass(s.SCROLL_DIVIDER_FOOTER);
|
|
412
413
|
}, e;
|
|
413
|
-
}(
|
|
414
|
+
}(ae)
|
|
414
415
|
);
|
|
415
416
|
/**
|
|
416
417
|
* @license
|
|
@@ -434,12 +435,12 @@ var rt = (
|
|
|
434
435
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
435
436
|
* THE SOFTWARE.
|
|
436
437
|
*/
|
|
437
|
-
var
|
|
438
|
+
var f = xt.strings, Se = (
|
|
438
439
|
/** @class */
|
|
439
|
-
function(
|
|
440
|
-
|
|
440
|
+
function(o) {
|
|
441
|
+
Ht(e, o);
|
|
441
442
|
function e() {
|
|
442
|
-
return
|
|
443
|
+
return o !== null && o.apply(this, arguments) || this;
|
|
443
444
|
}
|
|
444
445
|
return Object.defineProperty(e.prototype, "isOpen", {
|
|
445
446
|
get: function() {
|
|
@@ -477,39 +478,39 @@ var u = rt.strings, Pt = (
|
|
|
477
478
|
}), e.attachTo = function(t) {
|
|
478
479
|
return new e(t);
|
|
479
480
|
}, e.prototype.initialize = function(t) {
|
|
480
|
-
var n,
|
|
481
|
-
t === void 0 && (t = function(
|
|
482
|
-
return new
|
|
481
|
+
var n, i;
|
|
482
|
+
t === void 0 && (t = function(g, y) {
|
|
483
|
+
return new ve(g, y);
|
|
483
484
|
});
|
|
484
|
-
var a = this.root.querySelector(
|
|
485
|
+
var a = this.root.querySelector(f.CONTAINER_SELECTOR);
|
|
485
486
|
if (!a)
|
|
486
|
-
throw new Error("Dialog component requires a " +
|
|
487
|
-
this.container = a, this.content = this.root.querySelector(
|
|
487
|
+
throw new Error("Dialog component requires a " + f.CONTAINER_SELECTOR + " container element");
|
|
488
|
+
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 = [];
|
|
488
489
|
try {
|
|
489
|
-
for (var
|
|
490
|
-
var
|
|
491
|
-
this.buttonRipples.push(new
|
|
490
|
+
for (var p = ie(this.buttons), h = p.next(); !h.done; h = p.next()) {
|
|
491
|
+
var S = h.value;
|
|
492
|
+
this.buttonRipples.push(new se(S));
|
|
492
493
|
}
|
|
493
|
-
} catch (
|
|
494
|
-
n = { error:
|
|
494
|
+
} catch (g) {
|
|
495
|
+
n = { error: g };
|
|
495
496
|
} finally {
|
|
496
497
|
try {
|
|
497
|
-
|
|
498
|
+
h && !h.done && (i = p.return) && i.call(p);
|
|
498
499
|
} finally {
|
|
499
500
|
if (n) throw n.error;
|
|
500
501
|
}
|
|
501
502
|
}
|
|
502
503
|
}, e.prototype.initialSyncWithDOM = function() {
|
|
503
504
|
var t = this;
|
|
504
|
-
this.focusTrap =
|
|
505
|
+
this.focusTrap = he(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() {
|
|
505
506
|
document.addEventListener("keydown", t.handleDocumentKeydown);
|
|
506
507
|
}, this.handleClosing = function() {
|
|
507
508
|
document.removeEventListener("keydown", t.handleDocumentKeydown);
|
|
508
|
-
}, this.listen("click", this.handleClick), this.listen("keydown", this.handleKeydown), this.listen(
|
|
509
|
+
}, this.listen("click", this.handleClick), this.listen("keydown", this.handleKeydown), this.listen(f.OPENING_EVENT, this.handleOpening), this.listen(f.CLOSING_EVENT, this.handleClosing);
|
|
509
510
|
}, e.prototype.destroy = function() {
|
|
510
|
-
this.unlisten("click", this.handleClick), this.unlisten("keydown", this.handleKeydown), this.unlisten(
|
|
511
|
+
this.unlisten("click", this.handleClick), this.unlisten("keydown", this.handleKeydown), this.unlisten(f.OPENING_EVENT, this.handleOpening), this.unlisten(f.CLOSING_EVENT, this.handleClosing), this.handleClosing(), this.buttonRipples.forEach(function(t) {
|
|
511
512
|
t.destroy();
|
|
512
|
-
}),
|
|
513
|
+
}), o.prototype.destroy.call(this);
|
|
513
514
|
}, e.prototype.layout = function() {
|
|
514
515
|
this.foundation.layout();
|
|
515
516
|
}, e.prototype.open = function() {
|
|
@@ -518,254 +519,253 @@ var u = rt.strings, Pt = (
|
|
|
518
519
|
t === void 0 && (t = ""), this.foundation.close(t);
|
|
519
520
|
}, e.prototype.getDefaultFoundation = function() {
|
|
520
521
|
var t = this, n = {
|
|
521
|
-
addBodyClass: function(
|
|
522
|
-
return document.body.classList.add(
|
|
522
|
+
addBodyClass: function(i) {
|
|
523
|
+
return document.body.classList.add(i);
|
|
523
524
|
},
|
|
524
|
-
addClass: function(
|
|
525
|
-
return t.root.classList.add(
|
|
525
|
+
addClass: function(i) {
|
|
526
|
+
return t.root.classList.add(i);
|
|
526
527
|
},
|
|
527
528
|
areButtonsStacked: function() {
|
|
528
|
-
return
|
|
529
|
+
return Ee(t.buttons);
|
|
529
530
|
},
|
|
530
531
|
clickDefaultButton: function() {
|
|
531
532
|
t.defaultButton && t.defaultButton.click();
|
|
532
533
|
},
|
|
533
|
-
eventTargetMatches: function(
|
|
534
|
-
return
|
|
534
|
+
eventTargetMatches: function(i, a) {
|
|
535
|
+
return i ? ce(i, a) : !1;
|
|
535
536
|
},
|
|
536
|
-
getActionFromEvent: function(
|
|
537
|
-
if (!
|
|
537
|
+
getActionFromEvent: function(i) {
|
|
538
|
+
if (!i.target)
|
|
538
539
|
return "";
|
|
539
|
-
var a =
|
|
540
|
-
return a && a.getAttribute(
|
|
540
|
+
var a = le(i.target, "[" + f.ACTION_ATTRIBUTE + "]");
|
|
541
|
+
return a && a.getAttribute(f.ACTION_ATTRIBUTE);
|
|
541
542
|
},
|
|
542
543
|
getInitialFocusEl: function() {
|
|
543
544
|
return t.getInitialFocusEl();
|
|
544
545
|
},
|
|
545
|
-
hasClass: function(
|
|
546
|
-
return t.root.classList.contains(
|
|
546
|
+
hasClass: function(i) {
|
|
547
|
+
return t.root.classList.contains(i);
|
|
547
548
|
},
|
|
548
549
|
isContentScrollable: function() {
|
|
549
|
-
return
|
|
550
|
+
return ge(t.content);
|
|
550
551
|
},
|
|
551
|
-
notifyClosed: function(
|
|
552
|
-
return t.emit(
|
|
552
|
+
notifyClosed: function(i) {
|
|
553
|
+
return t.emit(f.CLOSED_EVENT, i ? { action: i } : {});
|
|
553
554
|
},
|
|
554
|
-
notifyClosing: function(
|
|
555
|
-
return t.emit(
|
|
555
|
+
notifyClosing: function(i) {
|
|
556
|
+
return t.emit(f.CLOSING_EVENT, i ? { action: i } : {});
|
|
556
557
|
},
|
|
557
558
|
notifyOpened: function() {
|
|
558
|
-
return t.emit(
|
|
559
|
+
return t.emit(f.OPENED_EVENT, {});
|
|
559
560
|
},
|
|
560
561
|
notifyOpening: function() {
|
|
561
|
-
return t.emit(
|
|
562
|
+
return t.emit(f.OPENING_EVENT, {});
|
|
562
563
|
},
|
|
563
564
|
releaseFocus: function() {
|
|
564
565
|
t.focusTrap.releaseFocus();
|
|
565
566
|
},
|
|
566
|
-
removeBodyClass: function(
|
|
567
|
-
return document.body.classList.remove(
|
|
567
|
+
removeBodyClass: function(i) {
|
|
568
|
+
return document.body.classList.remove(i);
|
|
568
569
|
},
|
|
569
|
-
removeClass: function(
|
|
570
|
-
return t.root.classList.remove(
|
|
570
|
+
removeClass: function(i) {
|
|
571
|
+
return t.root.classList.remove(i);
|
|
571
572
|
},
|
|
572
573
|
reverseButtons: function() {
|
|
573
|
-
t.buttons.reverse(), t.buttons.forEach(function(
|
|
574
|
-
|
|
574
|
+
t.buttons.reverse(), t.buttons.forEach(function(i) {
|
|
575
|
+
i.parentElement.appendChild(i);
|
|
575
576
|
});
|
|
576
577
|
},
|
|
577
578
|
trapFocus: function() {
|
|
578
579
|
t.focusTrap.trapFocus();
|
|
579
580
|
},
|
|
580
|
-
registerContentEventHandler: function(
|
|
581
|
-
t.content instanceof HTMLElement && t.content.addEventListener(
|
|
581
|
+
registerContentEventHandler: function(i, a) {
|
|
582
|
+
t.content instanceof HTMLElement && t.content.addEventListener(i, a);
|
|
582
583
|
},
|
|
583
|
-
deregisterContentEventHandler: function(
|
|
584
|
-
t.content instanceof HTMLElement && t.content.removeEventListener(
|
|
584
|
+
deregisterContentEventHandler: function(i, a) {
|
|
585
|
+
t.content instanceof HTMLElement && t.content.removeEventListener(i, a);
|
|
585
586
|
},
|
|
586
587
|
isScrollableContentAtTop: function() {
|
|
587
|
-
return
|
|
588
|
+
return Ce(t.content);
|
|
588
589
|
},
|
|
589
590
|
isScrollableContentAtBottom: function() {
|
|
590
|
-
return
|
|
591
|
+
return _e(t.content);
|
|
591
592
|
},
|
|
592
|
-
registerWindowEventHandler: function(
|
|
593
|
-
window.addEventListener(
|
|
593
|
+
registerWindowEventHandler: function(i, a) {
|
|
594
|
+
window.addEventListener(i, a);
|
|
594
595
|
},
|
|
595
|
-
deregisterWindowEventHandler: function(
|
|
596
|
-
window.removeEventListener(
|
|
596
|
+
deregisterWindowEventHandler: function(i, a) {
|
|
597
|
+
window.removeEventListener(i, a);
|
|
597
598
|
}
|
|
598
599
|
};
|
|
599
|
-
return new
|
|
600
|
+
return new xt(n);
|
|
600
601
|
}, e.prototype.getInitialFocusEl = function() {
|
|
601
|
-
return this.root.querySelector("[" +
|
|
602
|
+
return this.root.querySelector("[" + f.INITIAL_FOCUS_ATTRIBUTE + "]");
|
|
602
603
|
}, e;
|
|
603
|
-
}(
|
|
604
|
-
)
|
|
605
|
-
const Ut = {
|
|
604
|
+
}(re)
|
|
605
|
+
), ye = {
|
|
606
606
|
/**
|
|
607
607
|
* 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.
|
|
608
608
|
*
|
|
609
609
|
* Defaults to **null**.
|
|
610
610
|
*/
|
|
611
|
-
actionButton:
|
|
611
|
+
actionButton: l.node,
|
|
612
612
|
/**
|
|
613
613
|
* Button for any navigating to the previous page in a Directional modal.
|
|
614
614
|
*
|
|
615
615
|
* Defaults to **null**.
|
|
616
616
|
*/
|
|
617
|
-
backButton:
|
|
617
|
+
backButton: l.node,
|
|
618
618
|
/**
|
|
619
619
|
* The custom modal label badge to be rendered.
|
|
620
620
|
*
|
|
621
621
|
* Defaults to **undefined**.
|
|
622
622
|
*/
|
|
623
|
-
badge:
|
|
623
|
+
badge: l.node,
|
|
624
624
|
/**
|
|
625
625
|
* Accepts any valid markup. Optionally, `content` may be used instead. If `content` and `children` are both set, `content` will take priority.
|
|
626
626
|
*
|
|
627
627
|
* Defaults to **null**.
|
|
628
628
|
*/
|
|
629
|
-
children:
|
|
629
|
+
children: l.node,
|
|
630
630
|
/**
|
|
631
631
|
* 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.
|
|
632
632
|
*
|
|
633
633
|
* Defaults to **null**.
|
|
634
634
|
*/
|
|
635
|
-
content:
|
|
635
|
+
content: l.node,
|
|
636
636
|
/**
|
|
637
637
|
* Button that is the default action, triggered by pressing the Enter key.
|
|
638
638
|
*
|
|
639
639
|
* Defaults to **'primary'**.
|
|
640
640
|
*/
|
|
641
|
-
defaultButton:
|
|
641
|
+
defaultButton: l.oneOf(["close", "primary", "action", "footerSupplemental"]),
|
|
642
642
|
/**
|
|
643
643
|
* Button to cancel or close the modal.
|
|
644
644
|
*
|
|
645
645
|
* Defaults to **null**.
|
|
646
646
|
*/
|
|
647
|
-
dismissiveButton:
|
|
647
|
+
dismissiveButton: l.node,
|
|
648
648
|
/**
|
|
649
649
|
* Button to be displayed in left corner of the modal footer. Should be a text button.
|
|
650
650
|
*
|
|
651
651
|
* Defaults to **null**.
|
|
652
652
|
*/
|
|
653
|
-
footerSupplemental:
|
|
653
|
+
footerSupplemental: l.node,
|
|
654
654
|
/**
|
|
655
655
|
* 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.
|
|
656
656
|
*
|
|
657
657
|
* Defaults to **null**.
|
|
658
658
|
*/
|
|
659
|
-
headerActions:
|
|
659
|
+
headerActions: l.node,
|
|
660
660
|
/**
|
|
661
661
|
* If true, the close icon in the upper left corner will not be rendered.
|
|
662
662
|
*
|
|
663
663
|
* Defaults to **false**.
|
|
664
664
|
*/
|
|
665
|
-
hideCloseIcon:
|
|
665
|
+
hideCloseIcon: l.bool,
|
|
666
666
|
/**
|
|
667
667
|
* A slot for StepperIndicator.
|
|
668
668
|
*
|
|
669
669
|
* Defaults to **null**.
|
|
670
670
|
*/
|
|
671
|
-
indicator:
|
|
671
|
+
indicator: l.node,
|
|
672
672
|
/**
|
|
673
673
|
* 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 `data-mdc-dialog-initial-focus` 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.
|
|
674
674
|
*
|
|
675
675
|
* Defaults to **null**.
|
|
676
676
|
*/
|
|
677
|
-
initialFocus:
|
|
677
|
+
initialFocus: l.oneOf(["null", "primary", "action", "footerSupplemental"]),
|
|
678
678
|
/**
|
|
679
679
|
* If true, the buttons in the footer will be full width and stacked on mobile.
|
|
680
680
|
*
|
|
681
681
|
* Defaults to **false**.
|
|
682
682
|
*/
|
|
683
|
-
mobileStackedButtons:
|
|
683
|
+
mobileStackedButtons: l.bool,
|
|
684
684
|
/**
|
|
685
685
|
* String to determine the size of the modal.
|
|
686
686
|
*
|
|
687
687
|
* Defaults to **'max'**.
|
|
688
688
|
*/
|
|
689
|
-
modalSize:
|
|
689
|
+
modalSize: l.oneOf(["fullscreen", "max", "xlarge", "large", "medium", "small", "dialog"]),
|
|
690
690
|
/**
|
|
691
691
|
* Button for navigating to the next page in a Directional modal or closing on the last page.
|
|
692
692
|
*
|
|
693
693
|
* Defaults to **null**.
|
|
694
694
|
*/
|
|
695
|
-
nextButton:
|
|
695
|
+
nextButton: l.node,
|
|
696
696
|
/**
|
|
697
697
|
* 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.
|
|
698
698
|
*
|
|
699
699
|
* Defaults to **null**.
|
|
700
700
|
*/
|
|
701
|
-
noActions:
|
|
701
|
+
noActions: l.bool,
|
|
702
702
|
/**
|
|
703
703
|
* Fired when the Dialog begins its closing animation. Where event.detail.action is the action which closed the dialog (close or accept).
|
|
704
704
|
*
|
|
705
705
|
* Defaults to **null**.
|
|
706
706
|
*/
|
|
707
|
-
onClose:
|
|
707
|
+
onClose: l.func,
|
|
708
708
|
/**
|
|
709
709
|
* Fired when the Dialog finishes its closing animation. Where event.detail.action is the action which closed the dialog (close or accept).
|
|
710
710
|
*
|
|
711
711
|
* Defaults to **null**.
|
|
712
712
|
*/
|
|
713
|
-
onClosed:
|
|
713
|
+
onClosed: l.func,
|
|
714
714
|
/**
|
|
715
715
|
* Fired when the Dialog begins its opening animation.
|
|
716
716
|
*
|
|
717
717
|
* Defaults to **null**.
|
|
718
718
|
*/
|
|
719
|
-
onOpen:
|
|
719
|
+
onOpen: l.func,
|
|
720
720
|
/**
|
|
721
721
|
* Fired when the Dialog finishes its opening animation.
|
|
722
722
|
*
|
|
723
723
|
* Defaults to **null**.
|
|
724
724
|
*/
|
|
725
|
-
onOpened:
|
|
725
|
+
onOpened: l.func,
|
|
726
726
|
/**
|
|
727
727
|
* If true, the Modal will be visible on screen.
|
|
728
728
|
*
|
|
729
729
|
* Defaults to **false**.
|
|
730
730
|
*/
|
|
731
|
-
open:
|
|
731
|
+
open: l.bool,
|
|
732
732
|
/**
|
|
733
733
|
* 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.
|
|
734
734
|
*
|
|
735
735
|
* Defaults to **false**.
|
|
736
736
|
*/
|
|
737
|
-
preventClose:
|
|
737
|
+
preventClose: l.bool,
|
|
738
738
|
/**
|
|
739
739
|
* 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).
|
|
740
740
|
*
|
|
741
741
|
* Defaults to **false**.
|
|
742
742
|
*/
|
|
743
|
-
preventPrimaryAccept:
|
|
743
|
+
preventPrimaryAccept: l.bool,
|
|
744
744
|
/**
|
|
745
745
|
* Button for the primary action of the modal.
|
|
746
746
|
*
|
|
747
747
|
* Defaults to **null**.
|
|
748
748
|
*/
|
|
749
|
-
primaryButton:
|
|
749
|
+
primaryButton: l.node,
|
|
750
750
|
/**
|
|
751
751
|
* 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.
|
|
752
752
|
*
|
|
753
753
|
* Defaults to **null**.
|
|
754
754
|
*/
|
|
755
|
-
returnFocusSelector:
|
|
755
|
+
returnFocusSelector: l.string,
|
|
756
756
|
/**
|
|
757
757
|
* If true, wrapping will be disabled and a scrollable area will be created.
|
|
758
758
|
*
|
|
759
759
|
* Defaults to **false**.
|
|
760
760
|
*/
|
|
761
|
-
scrollable:
|
|
761
|
+
scrollable: l.bool,
|
|
762
762
|
/**
|
|
763
763
|
* String for the modal title.
|
|
764
764
|
*
|
|
765
765
|
* Defaults to **null**.
|
|
766
766
|
*/
|
|
767
|
-
title:
|
|
768
|
-
},
|
|
767
|
+
title: l.string
|
|
768
|
+
}, Oe = {
|
|
769
769
|
actionButton: null,
|
|
770
770
|
backButton: null,
|
|
771
771
|
badge: void 0,
|
|
@@ -782,6 +782,10 @@ const Ut = {
|
|
|
782
782
|
modalSize: "max",
|
|
783
783
|
nextButton: null,
|
|
784
784
|
noActions: null,
|
|
785
|
+
onClose: null,
|
|
786
|
+
onClosed: null,
|
|
787
|
+
onOpen: null,
|
|
788
|
+
onOpened: null,
|
|
785
789
|
open: !1,
|
|
786
790
|
preventClose: !1,
|
|
787
791
|
preventPrimaryAccept: !1,
|
|
@@ -789,196 +793,185 @@ const Ut = {
|
|
|
789
793
|
returnFocusSelector: null,
|
|
790
794
|
scrollable: !1,
|
|
791
795
|
title: null
|
|
792
|
-
},
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
hideCloseIcon: P,
|
|
806
|
-
indicator: st,
|
|
807
|
-
initialFocus: O,
|
|
808
|
-
mobileStackedButtons: U,
|
|
809
|
-
modalSize: _,
|
|
810
|
-
nextButton: T,
|
|
811
|
-
noActions: A,
|
|
812
|
-
onClose: x,
|
|
813
|
-
onClosed: G,
|
|
814
|
-
onOpen: D,
|
|
815
|
-
onOpened: I,
|
|
816
|
-
open: Q,
|
|
817
|
-
preventClose: K,
|
|
818
|
-
preventPrimaryAccept: X,
|
|
819
|
-
primaryButton: c,
|
|
820
|
-
returnFocusSelector: W,
|
|
821
|
-
scrollable: Z,
|
|
822
|
-
title: tt,
|
|
823
|
-
...lt
|
|
824
|
-
} = i, N = et(), l = et();
|
|
825
|
-
_t(e, () => N.current, []);
|
|
826
|
-
const [V, ct] = nt(), [z, dt] = nt(() => T || a);
|
|
827
|
-
E(() => {
|
|
828
|
-
dt(T || a);
|
|
829
|
-
}, [T, a]);
|
|
830
|
-
const L = q(() => {
|
|
831
|
-
ct(window.innerWidth <= 600);
|
|
796
|
+
}, Ae = ["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"], r = Oe, tt = /* @__PURE__ */ Zt(function(o, e) {
|
|
797
|
+
var t = o.actionButton, n = t === void 0 ? r.actionButton : t, i = o.actionIcons, a = i === void 0 ? r.actionIcons : i, p = o.badge, h = p === void 0 ? r.badge : p, S = o.backButton, g = S === void 0 ? r.backButton : S, y = o.children, v = y === void 0 ? r.children : y, $ = o.className, $t = $ === void 0 ? r.className : $, et = o.content, nt = et === void 0 ? r.content : et, ot = o.defaultButton, A = ot === void 0 ? r.defaultButton : ot, it = o.dismissiveButton, N = it === void 0 ? r.dismissiveButton : it, at = o.footerSupplemental, B = at === void 0 ? r.footerSupplemental : at, rt = o.headerActions, st = rt === void 0 ? r.headerActions : rt, lt = o.hideCloseIcon, U = lt === void 0 ? r.hideCloseIcon : lt, ct = o.indicator, Ut = ct === void 0 ? r.indicator : ct, dt = o.initialFocus, b = dt === void 0 ? r.initialFocus : dt, ut = o.mobileStackedButtons, G = ut === void 0 ? r.mobileStackedButtons : ut, ft = o.modalSize, C = ft === void 0 ? r.modalSize : ft, mt = o.nextButton, T = mt === void 0 ? r.nextButton : mt, pt = o.noActions, I = pt === void 0 ? r.noActions : pt, ht = o.onClose, K = ht === void 0 ? r.onClose : ht, gt = o.onClosed, W = gt === void 0 ? r.onClosed : gt, Ct = o.onOpen, F = Ct === void 0 ? r.onOpen : Ct, _t = o.onOpened, L = _t === void 0 ? r.onOpened : _t, Et = o.open, vt = Et === void 0 ? r.open : Et, St = o.preventClose, V = St === void 0 ? r.preventClose : St, yt = o.preventPrimaryAccept, Ot = yt === void 0 ? r.preventPrimaryAccept : yt, At = o.primaryButton, d = At === void 0 ? r.primaryButton : At, bt = o.returnFocusSelector, z = bt === void 0 ? r.returnFocusSelector : bt, Tt = o.scrollable, It = Tt === void 0 ? r.scrollable : Tt, Dt = o.title, Nt = Dt === void 0 ? r.title : Dt, Gt = Qt(o, Ae), R = Rt(), c = Rt();
|
|
798
|
+
te(e, function() {
|
|
799
|
+
return R.current;
|
|
800
|
+
}, []);
|
|
801
|
+
var Kt = wt(), Bt = Lt(Kt, 2), j = Bt[0], Wt = Bt[1], Vt = wt(function() {
|
|
802
|
+
return T || g;
|
|
803
|
+
}), Ft = Lt(Vt, 2), q = Ft[0], zt = Ft[1];
|
|
804
|
+
_(function() {
|
|
805
|
+
zt(T || g);
|
|
806
|
+
}, [T, g]);
|
|
807
|
+
var w = J(function() {
|
|
808
|
+
kt() && Wt(window.innerWidth <= 600);
|
|
832
809
|
}, []);
|
|
833
|
-
|
|
834
|
-
window.
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
810
|
+
_(function() {
|
|
811
|
+
return kt() ? (w(), window.addEventListener("resize", w), function() {
|
|
812
|
+
window.removeEventListener("resize", w);
|
|
813
|
+
}) : function() {
|
|
814
|
+
};
|
|
815
|
+
}, [w]), _(function() {
|
|
816
|
+
return c.current = Se.attachTo(R.current), function() {
|
|
817
|
+
c.current.destroy();
|
|
818
|
+
};
|
|
819
|
+
}, [c, R]), _(function() {
|
|
820
|
+
c.current.foundation.setAutoStackButtons(G);
|
|
821
|
+
}, [G]), _(function() {
|
|
822
|
+
I && (c.current.foundation.adapter.trapFocus = function() {
|
|
841
823
|
});
|
|
842
|
-
}, [
|
|
843
|
-
|
|
844
|
-
}, [
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
}, [
|
|
848
|
-
|
|
849
|
-
}, [
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
l.current.unlisten("MDCDialog:closed", R);
|
|
858
|
-
}), [l, R]), E(() => {
|
|
859
|
-
Q ? l.current.open() : l.current.close();
|
|
860
|
-
}, [l, Q]);
|
|
861
|
-
const ut = J(() => () => {
|
|
862
|
-
const m = {
|
|
863
|
-
className: "lmnt-modal__button mdc-dialog__button",
|
|
864
|
-
elevation: t?.props.elevation !== "default" ? t?.props.elevation : "flat",
|
|
865
|
-
variant: t?.props.variant || "filled"
|
|
824
|
+
}, [I]), _(function() {
|
|
825
|
+
c.current.scrimClickAction = V ? "" : "close", c.current.escapeKeyAction = V ? "" : "close";
|
|
826
|
+
}, [V]);
|
|
827
|
+
var k = J(function(m) {
|
|
828
|
+
K && K(m);
|
|
829
|
+
}, [K]), M = J(function(m) {
|
|
830
|
+
z && ne(z), W && W(m);
|
|
831
|
+
}, [z, W]);
|
|
832
|
+
_(function() {
|
|
833
|
+
return c.current.unlisten("MDCDialog: opening", F), c.current.listen("MDCDialog: opening", F), function() {
|
|
834
|
+
c.current.unlisten("MDCDialog: opening", F);
|
|
835
|
+
};
|
|
836
|
+
}, [c, F]), _(function() {
|
|
837
|
+
return c.current.unlisten("MDCDialog:opened", L), c.current.listen("MDCDialog:opened", L), function() {
|
|
838
|
+
c.current.unlisten("MDCDialog:opened", L);
|
|
866
839
|
};
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
840
|
+
}, [c, L]), _(function() {
|
|
841
|
+
return c.current.unlisten("MDCDialog:closing", k), c.current.listen("MDCDialog:closing", k), function() {
|
|
842
|
+
c.current.unlisten("MDCDialog:closing", k);
|
|
843
|
+
};
|
|
844
|
+
}, [c, k]), _(function() {
|
|
845
|
+
return c.current.unlisten("MDCDialog:closed", M), c.current.listen("MDCDialog:closed", M), function() {
|
|
846
|
+
c.current.unlisten("MDCDialog:closed", M);
|
|
847
|
+
};
|
|
848
|
+
}, [c, M]), _(function() {
|
|
849
|
+
vt ? c.current.open() : c.current.close();
|
|
850
|
+
}, [c, vt]);
|
|
851
|
+
var jt = Z(function() {
|
|
852
|
+
return function() {
|
|
853
|
+
var m = {
|
|
854
|
+
className: "lmnt-modal__button mdc-dialog__button",
|
|
855
|
+
elevation: n?.props.elevation !== "default" ? n?.props.elevation : "flat",
|
|
856
|
+
variant: n?.props.variant || "filled"
|
|
857
|
+
};
|
|
858
|
+
return A === "action" && (m["data-mdc-dialog-button-default"] = !0), b === "action" && (m["data-mdc-dialog-initial-focus"] = !0), m;
|
|
859
|
+
};
|
|
860
|
+
}, [n?.props.elevation, n?.props.variant, A, b]), qt = Z(function() {
|
|
861
|
+
return function() {
|
|
862
|
+
var m = {
|
|
863
|
+
className: "lmnt-modal__button mdc-dialog__button",
|
|
864
|
+
"data-mdc-dialog-action": Ot ? "" : "accept",
|
|
865
|
+
elevation: d?.props.elevation !== "default" ? d?.props.elevation : "flat",
|
|
866
|
+
variant: d?.props.variant || "filled"
|
|
867
|
+
};
|
|
868
|
+
return A === "primary" && (m["data-mdc-dialog-button-default"] = !0), b === "primary" && (m["data-mdc-dialog-initial-focus"] = !0), m;
|
|
874
869
|
};
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
className: B("lmnt", "lmnt-modal", "mdc-dialog", Z && "lmnt-modal--scrollable mdc-dialog--scrollable", p),
|
|
870
|
+
}, [Ot, A, b, d?.props.elevation, d?.props.variant]);
|
|
871
|
+
return /* @__PURE__ */ u.createElement("aside", Xt({
|
|
872
|
+
ref: R,
|
|
873
|
+
className: P("lmnt", "lmnt-modal", "mdc-dialog", It && "lmnt-modal--scrollable mdc-dialog--scrollable", $t),
|
|
880
874
|
role: "alertdialog"
|
|
881
|
-
},
|
|
882
|
-
className:
|
|
883
|
-
}, /* @__PURE__ */
|
|
875
|
+
}, Gt), /* @__PURE__ */ u.createElement("div", {
|
|
876
|
+
className: P("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" || j) && "lmnt-modal__mobile", C === "dialog" && "lmnt-modal__dialog", I && "lmnt-modal-no-actions")
|
|
877
|
+
}, /* @__PURE__ */ u.createElement("div", {
|
|
884
878
|
className: "lmnt-modal__surface mdc-dialog__surface"
|
|
885
|
-
}, /* @__PURE__ */
|
|
886
|
-
className:
|
|
887
|
-
}, !
|
|
879
|
+
}, /* @__PURE__ */ u.createElement("header", {
|
|
880
|
+
className: P("lmnt-modal__title", "mdc-dialog__title", (C === "dialog" || U) && "lmnt-modal_title-hide-close-icon", a && "lmnt-modal_title-actionsIcons", It && "lmnt-modal__title-scrollable", (U || C === "dialog" || I) && "lmnt-modal--no-close-icon")
|
|
881
|
+
}, !U && C !== "dialog" && !I && /* @__PURE__ */ u.createElement(Pt, {
|
|
888
882
|
className: "mdc-icon-button material-icons mdc-dialog__close",
|
|
889
883
|
"data-mdc-dialog-action": "close",
|
|
890
884
|
icon: "clear"
|
|
891
|
-
}),
|
|
885
|
+
}), Nt && /* @__PURE__ */ u.createElement("div", null, Nt), st && /* @__PURE__ */ u.createElement("div", {
|
|
892
886
|
className: "lmnt-dialog__title-actions"
|
|
893
|
-
},
|
|
887
|
+
}, st), h && /* @__PURE__ */ u.createElement("div", {
|
|
894
888
|
className: "lmnt-badge--modal",
|
|
895
889
|
style: {
|
|
896
890
|
marginLeft: "0"
|
|
897
891
|
}
|
|
898
|
-
},
|
|
892
|
+
}, h)), (nt || v) && /* @__PURE__ */ u.createElement("section", {
|
|
899
893
|
className: "lmnt-modal__content mdc-dialog__content"
|
|
900
|
-
},
|
|
901
|
-
className:
|
|
902
|
-
}, !
|
|
894
|
+
}, nt || v), Ut, (n || g || N || T || d || B) && /* @__PURE__ */ u.createElement("footer", {
|
|
895
|
+
className: P("lmnt-modal__actions", "mdc-dialog__actions", j && "lmnt-dialog__actions__mobile", B && "lmnt-modal__actions--supplemental-btn", j && G && "lmnt-modal_actions-mobile-stacked")
|
|
896
|
+
}, !q && B && /* @__PURE__ */ u.createElement("div", {
|
|
903
897
|
className: "lmnt-dialog__actions__supplemental"
|
|
904
|
-
},
|
|
905
|
-
|
|
906
|
-
return
|
|
907
|
-
})), !
|
|
898
|
+
}, D(B, function() {
|
|
899
|
+
var m = {};
|
|
900
|
+
return A === "footerSupplemental" && (m["data-mdc-dialog-button-default"] = !0), b === "footerSupplemental" && (m["data-mdc-dialog-initial-focus"] = !0), m;
|
|
901
|
+
})), !q && (n || N || d) && /* @__PURE__ */ u.createElement("div", {
|
|
908
902
|
className: "lmnt-dialog__actions__right-align lmnt-modal_actions_button"
|
|
909
|
-
},
|
|
903
|
+
}, N && D(N, {
|
|
910
904
|
variant: "text",
|
|
911
905
|
className: "lmnt-modal__button mdc-dialog__button",
|
|
912
906
|
"data-mdc-dialog-action": "close"
|
|
913
|
-
}),
|
|
907
|
+
}), n && !d && D(n, jt), d && D(d, qt)), q && /* @__PURE__ */ u.createElement("div", {
|
|
914
908
|
className: "lmnt-modal_actions_button lmnt-dialog__actions__directional"
|
|
915
|
-
}, /* @__PURE__ */
|
|
909
|
+
}, /* @__PURE__ */ u.createElement("div", null, oe(g, "lmnt-modal__button")), /* @__PURE__ */ u.createElement("div", null, D(T, {
|
|
916
910
|
className: "lmnt-modal__button",
|
|
917
911
|
"data-mdc-dialog-initial-focus": !0
|
|
918
|
-
})))))), /* @__PURE__ */
|
|
912
|
+
})))))), /* @__PURE__ */ u.createElement("div", {
|
|
919
913
|
className: "mdc-dialog__scrim"
|
|
920
914
|
}));
|
|
921
915
|
});
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
onClose: i,
|
|
916
|
+
tt.displayName = "Modal";
|
|
917
|
+
tt.propTypes = ye;
|
|
918
|
+
const be = "_modal_fr8bw_1", Te = "_title_fr8bw_6", Ie = "_titleWithoutCloseIcon_fr8bw_18", De = "_closeButton_fr8bw_22", H = {
|
|
919
|
+
modal: be,
|
|
920
|
+
title: Te,
|
|
921
|
+
titleWithoutCloseIcon: Ie,
|
|
922
|
+
closeButton: De
|
|
923
|
+
}, We = ({
|
|
924
|
+
onClose: o,
|
|
932
925
|
title: e,
|
|
933
926
|
headerActions: t,
|
|
934
927
|
actionButton: n,
|
|
935
|
-
hideCloseIcon:
|
|
928
|
+
hideCloseIcon: i,
|
|
936
929
|
leadingIcon: a,
|
|
937
|
-
isOnline:
|
|
938
|
-
offlineViewProps:
|
|
939
|
-
children:
|
|
940
|
-
...
|
|
930
|
+
isOnline: p = !0,
|
|
931
|
+
offlineViewProps: h,
|
|
932
|
+
children: S,
|
|
933
|
+
...g
|
|
941
934
|
}) => {
|
|
942
|
-
const
|
|
943
|
-
const
|
|
935
|
+
const y = Z(() => {
|
|
936
|
+
const v = {
|
|
944
937
|
id: "base",
|
|
945
|
-
action: /* @__PURE__ */
|
|
946
|
-
!
|
|
947
|
-
|
|
938
|
+
action: /* @__PURE__ */ Yt(Y, { primaryAlign: "center", secondaryAlign: "center", children: [
|
|
939
|
+
!i && /* @__PURE__ */ E(
|
|
940
|
+
Pt,
|
|
948
941
|
{
|
|
949
942
|
icon: "close",
|
|
950
|
-
onClick: () =>
|
|
943
|
+
onClick: () => o?.(),
|
|
951
944
|
type: "button",
|
|
952
|
-
className:
|
|
945
|
+
className: H.closeButton
|
|
953
946
|
}
|
|
954
947
|
),
|
|
955
|
-
a ? /* @__PURE__ */
|
|
956
|
-
/* @__PURE__ */
|
|
957
|
-
|
|
948
|
+
a ? /* @__PURE__ */ E(ue, { customPadding: "0.25rem 0 0 0.75rem", children: /* @__PURE__ */ E(me, { icon: a }) }) : /* @__PURE__ */ E(Jt, {}),
|
|
949
|
+
/* @__PURE__ */ E(
|
|
950
|
+
fe,
|
|
958
951
|
{
|
|
959
952
|
level: 6,
|
|
960
|
-
className:
|
|
953
|
+
className: i && !a ? H.titleWithoutCloseIcon : "",
|
|
961
954
|
children: e
|
|
962
955
|
}
|
|
963
956
|
)
|
|
964
957
|
] }, "base-group")
|
|
965
958
|
};
|
|
966
|
-
return t ? Array.isArray(t) ? [
|
|
967
|
-
}, [t,
|
|
968
|
-
return /* @__PURE__ */
|
|
969
|
-
|
|
959
|
+
return t ? Array.isArray(t) ? [v, { id: "action-group", action: /* @__PURE__ */ E(Y, { children: t }, "action-group") }] : [v, { id: "action", action: t }] : [v];
|
|
960
|
+
}, [t, i, a, o, e]);
|
|
961
|
+
return /* @__PURE__ */ E(
|
|
962
|
+
tt,
|
|
970
963
|
{
|
|
971
|
-
...
|
|
964
|
+
...g,
|
|
972
965
|
"data-testid": "modal",
|
|
973
|
-
className: `${
|
|
966
|
+
className: `${H.modal} ${H.title} ${g.className ?? ""}`,
|
|
974
967
|
hideCloseIcon: !0,
|
|
975
968
|
actionButton: n,
|
|
976
|
-
headerActions: /* @__PURE__ */
|
|
969
|
+
headerActions: /* @__PURE__ */ E(Y, { primaryAlign: "space-between", secondaryAlign: "center", children: y.map((v) => /* @__PURE__ */ E(ee, { children: v.action }, v.id)) }, "header-group"),
|
|
977
970
|
preventClose: !0,
|
|
978
|
-
children:
|
|
971
|
+
children: p ? S : /* @__PURE__ */ E(pe, { ...h })
|
|
979
972
|
}
|
|
980
973
|
);
|
|
981
974
|
};
|
|
982
975
|
export {
|
|
983
|
-
|
|
976
|
+
We as Modal
|
|
984
977
|
};
|