@nysds/nys-modal 1.10.1 → 1.11.0
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/dist/nys-modal.js +151 -188
- package/dist/nys-modal.js.map +1 -1
- package/package.json +3 -6
package/dist/nys-modal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css as
|
|
1
|
+
import { css as M, LitElement as U, html as w } from "lit";
|
|
2
2
|
/*!
|
|
3
3
|
* ▒█▄░▒█ ▒█░░▒█ ▒█▀▀▀█ ▒█▀▀▄ ▒█▀▀▀█
|
|
4
4
|
* ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
|
|
@@ -14,18 +14,18 @@ import { css as D, LitElement as N, html as S } from "lit";
|
|
|
14
14
|
* Copyright 2019 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
18
|
-
let
|
|
17
|
+
const _ = globalThis, E = _.ShadowRoot && (_.ShadyCSS === void 0 || _.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, O = Symbol(), C = /* @__PURE__ */ new WeakMap();
|
|
18
|
+
let D = class {
|
|
19
19
|
constructor(t, e, s) {
|
|
20
|
-
if (this._$cssResult$ = !0, s !==
|
|
20
|
+
if (this._$cssResult$ = !0, s !== O) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
21
21
|
this.cssText = t, this.t = e;
|
|
22
22
|
}
|
|
23
23
|
get styleSheet() {
|
|
24
24
|
let t = this.o;
|
|
25
25
|
const e = this.t;
|
|
26
|
-
if (
|
|
26
|
+
if (E && t === void 0) {
|
|
27
27
|
const s = e !== void 0 && e.length === 1;
|
|
28
|
-
s && (t =
|
|
28
|
+
s && (t = C.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && C.set(e, t));
|
|
29
29
|
}
|
|
30
30
|
return t;
|
|
31
31
|
}
|
|
@@ -33,26 +33,26 @@ let T = class {
|
|
|
33
33
|
return this.cssText;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
36
|
+
const k = (i) => new D(typeof i == "string" ? i : i + "", void 0, O), N = (i, t) => {
|
|
37
|
+
if (E) i.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
|
|
38
38
|
else for (const e of t) {
|
|
39
|
-
const s = document.createElement("style"), o =
|
|
39
|
+
const s = document.createElement("style"), o = _.litNonce;
|
|
40
40
|
o !== void 0 && s.setAttribute("nonce", o), s.textContent = e.cssText, i.appendChild(s);
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, P = E ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
43
43
|
let e = "";
|
|
44
44
|
for (const s of t.cssRules) e += s.cssText;
|
|
45
|
-
return
|
|
45
|
+
return k(e);
|
|
46
46
|
})(i) : i;
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
51
|
*/
|
|
52
|
-
const { is:
|
|
52
|
+
const { is: T, defineProperty: L, getOwnPropertyDescriptor: R, getOwnPropertyNames: j, getOwnPropertySymbols: z, getPrototypeOf: q } = Object, g = globalThis, x = g.trustedTypes, F = x ? x.emptyScript : "", W = g.reactiveElementPolyfillSupport, m = (i, t) => i, v = { toAttribute(i, t) {
|
|
53
53
|
switch (t) {
|
|
54
54
|
case Boolean:
|
|
55
|
-
i = i ?
|
|
55
|
+
i = i ? F : null;
|
|
56
56
|
break;
|
|
57
57
|
case Object:
|
|
58
58
|
case Array:
|
|
@@ -77,46 +77,44 @@ const { is: z, defineProperty: j, getOwnPropertyDescriptor: q, getOwnPropertyNam
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
return e;
|
|
80
|
-
} },
|
|
81
|
-
Symbol.metadata
|
|
82
|
-
class
|
|
80
|
+
} }, S = (i, t) => !T(i, t), A = { attribute: !0, type: String, converter: v, reflect: !1, useDefault: !1, hasChanged: S };
|
|
81
|
+
Symbol.metadata ??= Symbol("metadata"), g.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
82
|
+
class f extends HTMLElement {
|
|
83
83
|
static addInitializer(t) {
|
|
84
|
-
this._$Ei(), (this.l
|
|
84
|
+
this._$Ei(), (this.l ??= []).push(t);
|
|
85
85
|
}
|
|
86
86
|
static get observedAttributes() {
|
|
87
87
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
88
88
|
}
|
|
89
|
-
static createProperty(t, e =
|
|
90
|
-
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
89
|
+
static createProperty(t, e = A) {
|
|
90
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
91
91
|
const s = Symbol(), o = this.getPropertyDescriptor(t, s, e);
|
|
92
|
-
o !== void 0 &&
|
|
92
|
+
o !== void 0 && L(this.prototype, t, o);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
static getPropertyDescriptor(t, e, s) {
|
|
96
|
-
const { get: o, set: n } =
|
|
96
|
+
const { get: o, set: n } = R(this.prototype, t) ?? { get() {
|
|
97
97
|
return this[e];
|
|
98
98
|
}, set(r) {
|
|
99
99
|
this[e] = r;
|
|
100
100
|
} };
|
|
101
|
-
return { get() {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const a = o == null ? void 0 : o.call(this);
|
|
105
|
-
n.call(this, r), this.requestUpdate(t, a, s);
|
|
101
|
+
return { get: o, set(r) {
|
|
102
|
+
const a = o?.call(this);
|
|
103
|
+
n?.call(this, r), this.requestUpdate(t, a, s);
|
|
106
104
|
}, configurable: !0, enumerable: !0 };
|
|
107
105
|
}
|
|
108
106
|
static getPropertyOptions(t) {
|
|
109
|
-
return this.elementProperties.get(t) ??
|
|
107
|
+
return this.elementProperties.get(t) ?? A;
|
|
110
108
|
}
|
|
111
109
|
static _$Ei() {
|
|
112
|
-
if (this.hasOwnProperty(
|
|
113
|
-
const t =
|
|
110
|
+
if (this.hasOwnProperty(m("elementProperties"))) return;
|
|
111
|
+
const t = q(this);
|
|
114
112
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
115
113
|
}
|
|
116
114
|
static finalize() {
|
|
117
|
-
if (this.hasOwnProperty(
|
|
118
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
119
|
-
const e = this.properties, s = [...
|
|
115
|
+
if (this.hasOwnProperty(m("finalized"))) return;
|
|
116
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(m("properties"))) {
|
|
117
|
+
const e = this.properties, s = [...j(e), ...z(e)];
|
|
120
118
|
for (const o of s) this.createProperty(o, e[o]);
|
|
121
119
|
}
|
|
122
120
|
const t = this[Symbol.metadata];
|
|
@@ -135,8 +133,8 @@ class m extends HTMLElement {
|
|
|
135
133
|
const e = [];
|
|
136
134
|
if (Array.isArray(t)) {
|
|
137
135
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
138
|
-
for (const o of s) e.unshift(
|
|
139
|
-
} else t !== void 0 && e.push(
|
|
136
|
+
for (const o of s) e.unshift(P(o));
|
|
137
|
+
} else t !== void 0 && e.push(P(t));
|
|
140
138
|
return e;
|
|
141
139
|
}
|
|
142
140
|
static _$Eu(t, e) {
|
|
@@ -147,16 +145,13 @@ class m extends HTMLElement {
|
|
|
147
145
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
148
146
|
}
|
|
149
147
|
_$Ev() {
|
|
150
|
-
|
|
151
|
-
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
|
148
|
+
this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
|
|
152
149
|
}
|
|
153
150
|
addController(t) {
|
|
154
|
-
|
|
155
|
-
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
151
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
|
|
156
152
|
}
|
|
157
153
|
removeController(t) {
|
|
158
|
-
|
|
159
|
-
(e = this._$EO) == null || e.delete(t);
|
|
154
|
+
this._$EO?.delete(t);
|
|
160
155
|
}
|
|
161
156
|
_$E_() {
|
|
162
157
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
@@ -165,54 +160,47 @@ class m extends HTMLElement {
|
|
|
165
160
|
}
|
|
166
161
|
createRenderRoot() {
|
|
167
162
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
168
|
-
return
|
|
163
|
+
return N(t, this.constructor.elementStyles), t;
|
|
169
164
|
}
|
|
170
165
|
connectedCallback() {
|
|
171
|
-
|
|
172
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
173
|
-
var s;
|
|
174
|
-
return (s = e.hostConnected) == null ? void 0 : s.call(e);
|
|
175
|
-
});
|
|
166
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
|
|
176
167
|
}
|
|
177
168
|
enableUpdating(t) {
|
|
178
169
|
}
|
|
179
170
|
disconnectedCallback() {
|
|
180
|
-
|
|
181
|
-
(t = this._$EO) == null || t.forEach((e) => {
|
|
182
|
-
var s;
|
|
183
|
-
return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
|
|
184
|
-
});
|
|
171
|
+
this._$EO?.forEach(((t) => t.hostDisconnected?.()));
|
|
185
172
|
}
|
|
186
173
|
attributeChangedCallback(t, e, s) {
|
|
187
174
|
this._$AK(t, s);
|
|
188
175
|
}
|
|
189
|
-
_$
|
|
190
|
-
var n;
|
|
176
|
+
_$ET(t, e) {
|
|
191
177
|
const s = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, s);
|
|
192
178
|
if (o !== void 0 && s.reflect === !0) {
|
|
193
|
-
const
|
|
194
|
-
this._$Em = t,
|
|
179
|
+
const n = (s.converter?.toAttribute !== void 0 ? s.converter : v).toAttribute(e, s.type);
|
|
180
|
+
this._$Em = t, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$Em = null;
|
|
195
181
|
}
|
|
196
182
|
}
|
|
197
183
|
_$AK(t, e) {
|
|
198
|
-
var n;
|
|
199
184
|
const s = this.constructor, o = s._$Eh.get(t);
|
|
200
185
|
if (o !== void 0 && this._$Em !== o) {
|
|
201
|
-
const
|
|
202
|
-
this._$Em = o
|
|
186
|
+
const n = s.getPropertyOptions(o), r = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : v;
|
|
187
|
+
this._$Em = o;
|
|
188
|
+
const a = r.fromAttribute(e, n.type);
|
|
189
|
+
this[o] = a ?? this._$Ej?.get(o) ?? a, this._$Em = null;
|
|
203
190
|
}
|
|
204
191
|
}
|
|
205
192
|
requestUpdate(t, e, s) {
|
|
206
193
|
if (t !== void 0) {
|
|
207
|
-
|
|
208
|
-
|
|
194
|
+
const o = this.constructor, n = this[t];
|
|
195
|
+
if (s ??= o.getPropertyOptions(t), !((s.hasChanged ?? S)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, s)))) return;
|
|
196
|
+
this.C(t, e, s);
|
|
209
197
|
}
|
|
210
|
-
this.isUpdatePending === !1 && (this._$ES = this._$
|
|
198
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
211
199
|
}
|
|
212
|
-
|
|
213
|
-
this._$AL.has(t) || this._$AL.set(t, e),
|
|
200
|
+
C(t, e, { useDefault: s, reflect: o, wrapped: n }, r) {
|
|
201
|
+
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, r ?? e ?? this[t]), n !== !0 || r !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), o === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
214
202
|
}
|
|
215
|
-
async _$
|
|
203
|
+
async _$EP() {
|
|
216
204
|
this.isUpdatePending = !0;
|
|
217
205
|
try {
|
|
218
206
|
await this._$ES;
|
|
@@ -226,38 +214,33 @@ class m extends HTMLElement {
|
|
|
226
214
|
return this.performUpdate();
|
|
227
215
|
}
|
|
228
216
|
performUpdate() {
|
|
229
|
-
var s;
|
|
230
217
|
if (!this.isUpdatePending) return;
|
|
231
218
|
if (!this.hasUpdated) {
|
|
232
|
-
if (this.renderRoot
|
|
233
|
-
for (const [
|
|
219
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
220
|
+
for (const [o, n] of this._$Ep) this[o] = n;
|
|
234
221
|
this._$Ep = void 0;
|
|
235
222
|
}
|
|
236
|
-
const
|
|
237
|
-
if (
|
|
223
|
+
const s = this.constructor.elementProperties;
|
|
224
|
+
if (s.size > 0) for (const [o, n] of s) {
|
|
225
|
+
const { wrapped: r } = n, a = this[o];
|
|
226
|
+
r !== !0 || this._$AL.has(o) || a === void 0 || this.C(o, void 0, n, a);
|
|
227
|
+
}
|
|
238
228
|
}
|
|
239
229
|
let t = !1;
|
|
240
230
|
const e = this._$AL;
|
|
241
231
|
try {
|
|
242
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}), this.update(e)) : this._$EU();
|
|
246
|
-
} catch (o) {
|
|
247
|
-
throw t = !1, this._$EU(), o;
|
|
232
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((s) => s.hostUpdate?.())), this.update(e)) : this._$EM();
|
|
233
|
+
} catch (s) {
|
|
234
|
+
throw t = !1, this._$EM(), s;
|
|
248
235
|
}
|
|
249
236
|
t && this._$AE(e);
|
|
250
237
|
}
|
|
251
238
|
willUpdate(t) {
|
|
252
239
|
}
|
|
253
240
|
_$AE(t) {
|
|
254
|
-
|
|
255
|
-
(e = this._$EO) == null || e.forEach((s) => {
|
|
256
|
-
var o;
|
|
257
|
-
return (o = s.hostUpdated) == null ? void 0 : o.call(s);
|
|
258
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
241
|
+
this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
259
242
|
}
|
|
260
|
-
_$
|
|
243
|
+
_$EM() {
|
|
261
244
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
262
245
|
}
|
|
263
246
|
get updateComplete() {
|
|
@@ -270,44 +253,44 @@ class m extends HTMLElement {
|
|
|
270
253
|
return !0;
|
|
271
254
|
}
|
|
272
255
|
update(t) {
|
|
273
|
-
this._$
|
|
256
|
+
this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
|
|
274
257
|
}
|
|
275
258
|
updated(t) {
|
|
276
259
|
}
|
|
277
260
|
firstUpdated(t) {
|
|
278
261
|
}
|
|
279
262
|
}
|
|
280
|
-
|
|
263
|
+
f.elementStyles = [], f.shadowRootOptions = { mode: "open" }, f[m("elementProperties")] = /* @__PURE__ */ new Map(), f[m("finalized")] = /* @__PURE__ */ new Map(), W?.({ ReactiveElement: f }), (g.reactiveElementVersions ??= []).push("2.1.1");
|
|
281
264
|
/**
|
|
282
265
|
* @license
|
|
283
266
|
* Copyright 2017 Google LLC
|
|
284
267
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
285
268
|
*/
|
|
286
|
-
const
|
|
269
|
+
const H = { attribute: !0, type: String, converter: v, reflect: !1, hasChanged: S }, I = (i = H, t, e) => {
|
|
287
270
|
const { kind: s, metadata: o } = e;
|
|
288
271
|
let n = globalThis.litPropertyMetadata.get(o);
|
|
289
|
-
if (n === void 0 && globalThis.litPropertyMetadata.set(o, n = /* @__PURE__ */ new Map()), n.set(e.name, i), s === "accessor") {
|
|
272
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(o, n = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), n.set(e.name, i), s === "accessor") {
|
|
290
273
|
const { name: r } = e;
|
|
291
274
|
return { set(a) {
|
|
292
|
-
const
|
|
293
|
-
t.set.call(this, a), this.requestUpdate(r,
|
|
275
|
+
const c = t.get.call(this);
|
|
276
|
+
t.set.call(this, a), this.requestUpdate(r, c, i);
|
|
294
277
|
}, init(a) {
|
|
295
|
-
return a !== void 0 && this.
|
|
278
|
+
return a !== void 0 && this.C(r, void 0, i, a), a;
|
|
296
279
|
} };
|
|
297
280
|
}
|
|
298
281
|
if (s === "setter") {
|
|
299
282
|
const { name: r } = e;
|
|
300
283
|
return function(a) {
|
|
301
|
-
const
|
|
302
|
-
t.call(this, a), this.requestUpdate(r,
|
|
284
|
+
const c = this[r];
|
|
285
|
+
t.call(this, a), this.requestUpdate(r, c, i);
|
|
303
286
|
};
|
|
304
287
|
}
|
|
305
288
|
throw Error("Unsupported decorator location: " + s);
|
|
306
289
|
};
|
|
307
|
-
function
|
|
308
|
-
return (t, e) => typeof e == "object" ?
|
|
290
|
+
function p(i) {
|
|
291
|
+
return (t, e) => typeof e == "object" ? I(i, t, e) : ((s, o, n) => {
|
|
309
292
|
const r = o.hasOwnProperty(n);
|
|
310
|
-
return o.constructor.createProperty(n,
|
|
293
|
+
return o.constructor.createProperty(n, s), r ? Object.getOwnPropertyDescriptor(o, n) : void 0;
|
|
311
294
|
})(i, t, e);
|
|
312
295
|
}
|
|
313
296
|
/**
|
|
@@ -315,10 +298,10 @@ function f(i) {
|
|
|
315
298
|
* Copyright 2017 Google LLC
|
|
316
299
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
317
300
|
*/
|
|
318
|
-
function
|
|
319
|
-
return
|
|
301
|
+
function B(i) {
|
|
302
|
+
return p({ ...i, state: !0, attribute: !1 });
|
|
320
303
|
}
|
|
321
|
-
const
|
|
304
|
+
const K = M`
|
|
322
305
|
:host {
|
|
323
306
|
/* Global Modal Styles */
|
|
324
307
|
--_nys-modal-width: 480px;
|
|
@@ -470,14 +453,14 @@ const J = D`
|
|
|
470
453
|
}
|
|
471
454
|
}
|
|
472
455
|
`;
|
|
473
|
-
var
|
|
474
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
456
|
+
var V = Object.defineProperty, J = Object.getOwnPropertyDescriptor, h = (i, t, e, s) => {
|
|
457
|
+
for (var o = s > 1 ? void 0 : s ? J(t, e) : t, n = i.length - 1, r; n >= 0; n--)
|
|
475
458
|
(r = i[n]) && (o = (s ? r(t, e, o) : r(o)) || o);
|
|
476
|
-
return s && o &&
|
|
459
|
+
return s && o && V(t, e, o), o;
|
|
477
460
|
};
|
|
478
|
-
let
|
|
479
|
-
var
|
|
480
|
-
const
|
|
461
|
+
let G = 0;
|
|
462
|
+
var d;
|
|
463
|
+
const l = (d = class extends U {
|
|
481
464
|
/**************** Lifecycle Methods ****************/
|
|
482
465
|
constructor() {
|
|
483
466
|
super(), this.id = "", this.heading = "", this.subheading = "", this.open = !1, this.mandatory = !1, this._width = "md", this._actionButtonSlot = null, this._prevFocusedElement = null, this._originalBodyOverflow = null, this.hasBodySlots = !1, this.hasActionSlots = !1;
|
|
@@ -486,12 +469,12 @@ const d = (u = class extends N {
|
|
|
486
469
|
return this._width;
|
|
487
470
|
}
|
|
488
471
|
set width(t) {
|
|
489
|
-
this._width =
|
|
472
|
+
this._width = d.VALID_WIDTHS.includes(
|
|
490
473
|
t
|
|
491
474
|
) ? t : "md";
|
|
492
475
|
}
|
|
493
476
|
connectedCallback() {
|
|
494
|
-
super.connectedCallback(), this.id || (this.id = `nys-{{componentName}}-${Date.now()}-${
|
|
477
|
+
super.connectedCallback(), this.id || (this.id = `nys-{{componentName}}-${Date.now()}-${G++}`), window.addEventListener("resize", () => this._updateSlottedButtonWidth()), window.addEventListener("keydown", (t) => this._handleKeydown(t));
|
|
495
478
|
}
|
|
496
479
|
disconnectedCallback() {
|
|
497
480
|
super.disconnectedCallback(), this._restoreBodyScroll(), window.removeEventListener("keydown", (t) => this._handleKeydown(t));
|
|
@@ -513,45 +496,34 @@ const d = (u = class extends N {
|
|
|
513
496
|
this._prevFocusedElement = document.activeElement;
|
|
514
497
|
}
|
|
515
498
|
_focusOnModal() {
|
|
516
|
-
|
|
517
|
-
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".nys-modal");
|
|
518
|
-
t == null || t.focus();
|
|
499
|
+
this.shadowRoot?.querySelector(".nys-modal")?.focus();
|
|
519
500
|
}
|
|
520
501
|
async _restorePrevFocused() {
|
|
521
|
-
var e;
|
|
522
502
|
const t = this._prevFocusedElement;
|
|
523
503
|
if (t && t.tagName.toLowerCase() === "nys-button") {
|
|
524
|
-
const
|
|
525
|
-
if (
|
|
526
|
-
|
|
504
|
+
const e = await t.getButtonElement();
|
|
505
|
+
if (e) {
|
|
506
|
+
e.focus();
|
|
527
507
|
return;
|
|
528
508
|
}
|
|
529
509
|
} else
|
|
530
|
-
|
|
510
|
+
this._prevFocusedElement?.focus();
|
|
531
511
|
this._prevFocusedElement = null;
|
|
532
512
|
}
|
|
533
513
|
// Check if the slot contains stuff (aka user add texts & action buttons), and render visibility accordingly
|
|
534
514
|
async _handleBodySlotChange() {
|
|
535
|
-
|
|
536
|
-
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot");
|
|
515
|
+
const t = this.shadowRoot?.querySelector("slot");
|
|
537
516
|
t && (this.hasBodySlots = t.assignedNodes({ flatten: !0 }).some(
|
|
538
|
-
(
|
|
539
|
-
var o;
|
|
540
|
-
return s.nodeType === Node.ELEMENT_NODE || ((o = s.textContent) == null ? void 0 : o.trim());
|
|
541
|
-
}
|
|
517
|
+
(e) => e.nodeType === Node.ELEMENT_NODE || e.textContent?.trim()
|
|
542
518
|
));
|
|
543
519
|
}
|
|
544
520
|
// Determines whether we hide the action buttons slot container based on if user put in action buttons
|
|
545
521
|
async _handleActionSlotChange() {
|
|
546
|
-
|
|
547
|
-
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(
|
|
522
|
+
const t = this.shadowRoot?.querySelector(
|
|
548
523
|
'slot[name="actions"]'
|
|
549
524
|
);
|
|
550
525
|
t && (this.hasActionSlots = t.assignedNodes({ flatten: !0 }).some(
|
|
551
|
-
(
|
|
552
|
-
var o;
|
|
553
|
-
return s.nodeType === Node.ELEMENT_NODE || ((o = s.textContent) == null ? void 0 : o.trim());
|
|
554
|
-
}
|
|
526
|
+
(e) => e.nodeType === Node.ELEMENT_NODE || e.textContent?.trim()
|
|
555
527
|
), this._actionButtonSlot = t, this._updateSlottedButtonWidth());
|
|
556
528
|
}
|
|
557
529
|
// Design has it that the slotted action buttons should be fullWidth and display:column direction for mobile view.
|
|
@@ -561,7 +533,7 @@ const d = (u = class extends N {
|
|
|
561
533
|
const t = window.innerWidth <= 480;
|
|
562
534
|
this._actionButtonSlot.assignedElements().forEach((e) => {
|
|
563
535
|
e.querySelectorAll("nys-button").forEach((s) => {
|
|
564
|
-
t ? s
|
|
536
|
+
t ? s?.setAttribute("fullWidth", "") : s?.removeAttribute("fullWidth");
|
|
565
537
|
});
|
|
566
538
|
});
|
|
567
539
|
}
|
|
@@ -592,49 +564,39 @@ const d = (u = class extends N {
|
|
|
592
564
|
* We add the "Close this window" ariaLabel after the initial VO is done
|
|
593
565
|
*/
|
|
594
566
|
_updateDismissAria() {
|
|
595
|
-
|
|
596
|
-
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("nys-button");
|
|
567
|
+
const t = this.shadowRoot?.querySelector("nys-button");
|
|
597
568
|
t && (t.setAttribute("ariaLabel", " "), this.open && setTimeout(() => {
|
|
598
569
|
t.setAttribute("ariaLabel", "Close this window");
|
|
599
570
|
}, 100));
|
|
600
571
|
}
|
|
601
572
|
/****************** Event Handlers ******************/
|
|
602
573
|
async _handleKeydown(t) {
|
|
603
|
-
var e;
|
|
604
574
|
if (this.open && (t.key === "Escape" && !this.mandatory && (t.preventDefault(), this._closeModal()), t.key === "Tab")) {
|
|
605
|
-
const
|
|
606
|
-
if (!
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
for (const
|
|
611
|
-
const
|
|
612
|
-
for (const
|
|
613
|
-
|
|
614
|
-
(
|
|
615
|
-
|
|
575
|
+
const e = this.shadowRoot?.querySelector(".nys-modal");
|
|
576
|
+
if (!e) return;
|
|
577
|
+
const s = 'a[href], area[href], button:not([disabled]), details, iframe, object, input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [contentEditable="true"], [tabindex]:not([tabindex^="-"])', o = [], n = e.querySelector("nys-button");
|
|
578
|
+
n && o.push(n);
|
|
579
|
+
const r = Array.from(e.querySelectorAll("slot"));
|
|
580
|
+
for (const a of r) {
|
|
581
|
+
const c = a.assignedElements({ flatten: !0 });
|
|
582
|
+
for (const u of c)
|
|
583
|
+
u instanceof HTMLElement && u.matches(s) && o.push(u), u.querySelectorAll("nys-button").forEach(
|
|
584
|
+
(b) => {
|
|
585
|
+
o.push(b);
|
|
616
586
|
}
|
|
617
587
|
);
|
|
618
588
|
}
|
|
619
|
-
if (
|
|
620
|
-
const
|
|
621
|
-
let
|
|
589
|
+
if (o.length > 0) {
|
|
590
|
+
const a = o[0], c = o[o.length - 1];
|
|
591
|
+
let u = document.activeElement, b = o.indexOf(u);
|
|
622
592
|
if (t.shiftKey) {
|
|
623
593
|
t.preventDefault();
|
|
624
|
-
let
|
|
625
|
-
|
|
626
|
-
const
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
} else
|
|
631
|
-
x.focus();
|
|
632
|
-
} else if (y === b)
|
|
633
|
-
if (t.preventDefault(), l.tagName.toLowerCase() === "nys-button") {
|
|
634
|
-
const h = await l.getButtonElement();
|
|
635
|
-
h == null || h.focus();
|
|
636
|
-
} else
|
|
637
|
-
l.focus();
|
|
594
|
+
let y = b - 1;
|
|
595
|
+
y < 0 && (y = o.length - 1);
|
|
596
|
+
const $ = o[y];
|
|
597
|
+
o[y].tagName.toLowerCase() === "nys-button" ? (await $.getButtonElement())?.focus() : $.focus();
|
|
598
|
+
} else
|
|
599
|
+
u === c && (t.preventDefault(), a.tagName.toLowerCase() === "nys-button" ? (await a.getButtonElement())?.focus() : a.focus());
|
|
638
600
|
}
|
|
639
601
|
}
|
|
640
602
|
}
|
|
@@ -642,7 +604,7 @@ const d = (u = class extends N {
|
|
|
642
604
|
this.open = !1, this._dispatchCloseEvent();
|
|
643
605
|
}
|
|
644
606
|
render() {
|
|
645
|
-
return this.open ?
|
|
607
|
+
return this.open ? w`<div
|
|
646
608
|
id=${this.id}
|
|
647
609
|
class="nys-modal-overlay"
|
|
648
610
|
role="dialog"
|
|
@@ -654,14 +616,15 @@ const d = (u = class extends N {
|
|
|
654
616
|
<div class="nys-modal_header">
|
|
655
617
|
<div class="nys-modal_header-inner">
|
|
656
618
|
<h2 id="${this.id}-heading">${this.heading}</h2>
|
|
657
|
-
${this.mandatory ? "" :
|
|
619
|
+
${this.mandatory ? "" : w`<nys-button
|
|
620
|
+
id="dismiss-modal"
|
|
658
621
|
circle
|
|
659
622
|
icon="close"
|
|
660
623
|
variant="ghost"
|
|
661
|
-
|
|
624
|
+
@nys-click=${this._closeModal}
|
|
662
625
|
></nys-button>`}
|
|
663
626
|
</div>
|
|
664
|
-
${this.subheading ?
|
|
627
|
+
${this.subheading ? w`<p id="${this.id}-subheading">${this.subheading}</p>` : ""}
|
|
665
628
|
</div>
|
|
666
629
|
|
|
667
630
|
<div
|
|
@@ -684,34 +647,34 @@ const d = (u = class extends N {
|
|
|
684
647
|
</div>
|
|
685
648
|
</div>` : "";
|
|
686
649
|
}
|
|
687
|
-
},
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
],
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
],
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
],
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
],
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
],
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
],
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
],
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
],
|
|
712
|
-
let
|
|
713
|
-
customElements.get("nys-modal") || customElements.define("nys-modal",
|
|
650
|
+
}, d.VALID_WIDTHS = ["sm", "md", "lg"], d.styles = K, d);
|
|
651
|
+
h([
|
|
652
|
+
p({ type: String })
|
|
653
|
+
], l.prototype, "id", 2);
|
|
654
|
+
h([
|
|
655
|
+
p({ type: String })
|
|
656
|
+
], l.prototype, "heading", 2);
|
|
657
|
+
h([
|
|
658
|
+
p({ type: String })
|
|
659
|
+
], l.prototype, "subheading", 2);
|
|
660
|
+
h([
|
|
661
|
+
p({ type: Boolean, reflect: !0 })
|
|
662
|
+
], l.prototype, "open", 2);
|
|
663
|
+
h([
|
|
664
|
+
p({ type: Boolean, reflect: !0 })
|
|
665
|
+
], l.prototype, "mandatory", 2);
|
|
666
|
+
h([
|
|
667
|
+
p({ reflect: !0 })
|
|
668
|
+
], l.prototype, "width", 1);
|
|
669
|
+
h([
|
|
670
|
+
B()
|
|
671
|
+
], l.prototype, "hasBodySlots", 2);
|
|
672
|
+
h([
|
|
673
|
+
B()
|
|
674
|
+
], l.prototype, "hasActionSlots", 2);
|
|
675
|
+
let Q = l;
|
|
676
|
+
customElements.get("nys-modal") || customElements.define("nys-modal", Q);
|
|
714
677
|
export {
|
|
715
|
-
|
|
678
|
+
Q as NysModal
|
|
716
679
|
};
|
|
717
680
|
//# sourceMappingURL=nys-modal.js.map
|
package/dist/nys-modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nys-modal.js","sources":["../../../node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/@lit/reactive-element/decorators/property.js","../../../node_modules/@lit/reactive-element/decorators/state.js","../src/nys-modal.styles.ts","../src/nys-modal.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(this[t],s))return;this.P(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.4\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.P(o,void 0,t),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { css } from \"lit\";\n\nexport default css`\n :host {\n /* Global Modal Styles */\n --_nys-modal-width: 480px;\n --_nys-modal-min-width: 320px;\n --_nys-modal-border-radius: var(--nys-radius-lg, 8px);\n --_nys-modal-border-color: var(--nys-color-neutral-200, #bec0c1);\n --_nys-modal-border-width: 1px;\n --_nys-modal-background-color: var(--nys-color-surface, #fff);\n --_nys-modal-margin: var(--nys-space-250, 20px);\n --_nys-modal-padding: var(--nys-space-300, 24px);\n --_nys-modal-gap: var(--nys-space-200, 16px);\n\n /* Modal Overlay */\n --_nys-modal-background-color--overlay: var(\n --nys-color-black-transparent-700,\n rgba(27, 27, 27, 0.7)\n );\n\n /* Modal Header */\n --_nys-modal-gap--header: var(--nys-space-100, 8px);\n\n /* Modal Footer */\n --_nys-modal-gap--footer: var(--nys-space-250, 20px);\n\n /* Typography */\n --_nys-modal-font-size: var(--nys-font-size-ui-md, 16px);\n --_nys-modal-font-weight--header: var(--nys-font-weight-bold, 700);\n --_nys-modal-font-weight--subheader: var(--nys-font-weight-regular, 400);\n --_nys-modal-line-height: var(--nys-font-lineheight-ui-md, 24px);\n --_nys-modal-font-family: var(\n --nys-font-family-ui,\n var(\n --nys-font-family-sans,\n \"Proxima Nova\",\n \"Helvetica Neue\",\n \"Helvetica\",\n \"Arial\",\n sans-serif\n )\n );\n }\n\n /*** CSS & Slot resets ***/\n * {\n box-sizing: border-box;\n }\n\n ::slotted(p) {\n margin: 0 !important;\n }\n\n h2,\n p {\n flex: 1;\n margin: 0;\n margin-bottom: 0;\n }\n\n /*** Modal Overlay (black transparent background) ***/\n .nys-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n background: var(--_nys-modal-background-color--overlay);\n }\n\n /*** Base ***/\n .nys-modal {\n display: flex;\n flex-direction: column;\n margin: var(--_nys-modal-margin);\n padding: var(--_nys-modal-padding);\n gap: var(--_nys-modal-gap);\n width: var(--_nys-modal-width);\n min-width: var(--_nys-modal-min-width);\n border-radius: var(--_nys-modal-border-radius);\n border: var(--_nys-modal-border-width) solid var(--_nys-modal-border-color);\n font-family: var(--_nys-modal-font-family);\n font-size: var(--_nys-modal-font-size);\n line-height: var(--_nys-modal-line-height);\n background: var(--_nys-modal-background-color);\n position: relative;\n z-index: 10000;\n }\n\n /*** Modal Header ***/\n .nys-modal_header {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--_nys-modal-gap--header);\n }\n\n .nys-modal_header p {\n font-weight: var(--_nys-modal-font-weight--subheader);\n }\n\n .nys-modal_header-inner {\n display: flex;\n align-items: center;\n width: 100%;\n font-weight: var(--_nys-modal-font-weight--header);\n }\n\n /*** Modal Body ***/\n .nys-modal_body {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .nys-modal_body-inner {\n overflow: auto;\n width: 100%;\n max-height: 45vh;\n }\n\n .nys-modal_body.hidden {\n display: none;\n }\n\n /*** Modal Footer (i.e. where the button slot is) ***/\n .nys-modal_footer ::slotted(*) {\n display: flex;\n flex-direction: column-reverse;\n justify-content: center;\n gap: var(--_nys-modal-gap--footer);\n align-self: stretch;\n }\n\n .nys-modal_footer.hidden ::slotted(*) {\n display: none;\n }\n\n @media (min-width: 480px) {\n .nys-modal_body-inner {\n max-height: 25vh;\n }\n .nys-modal_footer ::slotted(*) {\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n }\n }\n`;\n","import { LitElement, html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport styles from \"./nys-modal.styles\";\n\nlet componentIdCounter = 0; // Counter for generating unique IDs\n\nexport class NysModal extends LitElement {\n @property({ type: String }) id = \"\";\n @property({ type: String }) heading = \"\";\n @property({ type: String }) subheading = \"\";\n @property({ type: Boolean, reflect: true }) open = false;\n @property({ type: Boolean, reflect: true }) mandatory = false;\n\n private static readonly VALID_WIDTHS = [\"sm\", \"md\", \"lg\"] as const;\n private _width: (typeof NysModal.VALID_WIDTHS)[number] = \"md\";\n @property({ reflect: true })\n get width(): (typeof NysModal.VALID_WIDTHS)[number] {\n return this._width;\n }\n set width(value: string) {\n this._width = NysModal.VALID_WIDTHS.includes(\n value as (typeof NysModal.VALID_WIDTHS)[number],\n )\n ? (value as (typeof NysModal.VALID_WIDTHS)[number])\n : \"md\";\n }\n\n private _actionButtonSlot: HTMLSlotElement | null = null; // cache action button slots (if given) so we can manipulate their widths for mobile vs desktop\n private _prevFocusedElement: HTMLElement | null = null;\n private _originalBodyOverflow: string | null = null;\n\n // Track slot contents to control what HTML is rendered\n @state() private hasBodySlots = false;\n @state() private hasActionSlots = false;\n\n static styles = styles;\n\n /**************** Lifecycle Methods ****************/\n constructor() {\n super();\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.id) {\n this.id = `nys-{{componentName}}-${Date.now()}-${componentIdCounter++}`;\n }\n window.addEventListener(\"resize\", () => this._updateSlottedButtonWidth());\n window.addEventListener(\"keydown\", (e) => this._handleKeydown(e));\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._restoreBodyScroll(); // make sure scroll is restored when modal is removed\n window.removeEventListener(\"keydown\", (e) => this._handleKeydown(e));\n }\n\n firstUpdated() {\n this._handleBodySlotChange();\n this._handleActionSlotChange();\n }\n\n async updated(changeProps: Map<string, any>) {\n // Hide main body's scroll bar if modal is open/active\n if (changeProps.has(\"open\")) {\n if (this.open) {\n this._hideBodyScroll();\n this._dispatchOpenEvent();\n await this.updateComplete;\n this._savePrevFocused();\n this._focusOnModal();\n this._updateDismissAria();\n } else {\n this._restorePrevFocused();\n this._restoreBodyScroll();\n this._dispatchCloseEvent();\n this._updateDismissAria();\n }\n }\n }\n\n /******************** Functions ********************/\n private _hideBodyScroll() {\n if (this._originalBodyOverflow === null) {\n this._originalBodyOverflow = document.body.style.overflow;\n }\n document.body.style.overflow = \"hidden\";\n }\n\n private _restoreBodyScroll() {\n if (this._originalBodyOverflow !== null) {\n document.body.style.overflow = this._originalBodyOverflow;\n this._originalBodyOverflow = null;\n }\n }\n\n private _savePrevFocused() {\n this._prevFocusedElement = document.activeElement as HTMLElement;\n }\n\n private _focusOnModal() {\n const modal = this.shadowRoot?.querySelector<HTMLElement>(\".nys-modal\");\n modal?.focus();\n }\n\n private async _restorePrevFocused() {\n const prev = this._prevFocusedElement;\n\n if (prev && prev.tagName.toLowerCase() === \"nys-button\") {\n const innerBtn = await (prev as any).getButtonElement();\n if (innerBtn) {\n innerBtn.focus();\n return;\n }\n } else {\n this._prevFocusedElement?.focus();\n }\n this._prevFocusedElement = null;\n }\n\n // Check if the slot contains stuff (aka user add texts & action buttons), and render visibility accordingly\n private async _handleBodySlotChange() {\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>(\"slot\");\n if (!slot) return;\n this.hasBodySlots = slot\n .assignedNodes({ flatten: true })\n .some(\n (node) =>\n node.nodeType === Node.ELEMENT_NODE || node.textContent?.trim(),\n );\n }\n\n // Determines whether we hide the action buttons slot container based on if user put in action buttons\n private async _handleActionSlotChange() {\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>(\n 'slot[name=\"actions\"]',\n );\n if (!slot) return;\n this.hasActionSlots = slot\n .assignedNodes({ flatten: true })\n .some(\n (node) =>\n node.nodeType === Node.ELEMENT_NODE || node.textContent?.trim(),\n );\n\n // Cached the action button slot container so we can use it continuously for _updateSlottedButtonWidth() during screen resize\n this._actionButtonSlot = slot;\n // Update button widths immediately\n this._updateSlottedButtonWidth();\n }\n\n // Design has it that the slotted action buttons should be fullWidth and display:column direction for mobile view.\n // Therefore, we need to account for mobile size and screen resizes\n private _updateSlottedButtonWidth() {\n if (!this._actionButtonSlot) return; // use the cached variable\n const isMobile = window.innerWidth <= 480;\n\n this._actionButtonSlot.assignedElements().forEach((el) => {\n el.querySelectorAll(\"nys-button\").forEach((btn) => {\n if (isMobile) {\n btn?.setAttribute(\"fullWidth\", \"\");\n } else {\n btn?.removeAttribute(\"fullWidth\");\n }\n });\n });\n }\n\n private _dispatchOpenEvent() {\n this.dispatchEvent(\n new CustomEvent(\"nys-open\", {\n detail: { id: this.id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _dispatchCloseEvent() {\n this.dispatchEvent(\n new CustomEvent(\"nys-close\", {\n detail: { id: this.id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _getAriaDescribedBy() {\n // Handling what aria-describedby needs to announce in VO based on if the subheading or slot contents exists\n const ariaDescriptions: string[] = [];\n if (this.subheading) {\n ariaDescriptions.push(`${this.id}-subheading`);\n }\n if (this.hasBodySlots) {\n ariaDescriptions.push(`${this.id}-desc`);\n }\n return ariaDescriptions.join(\" \");\n }\n\n /**\n * This exist to prevent the VO for dismiss button from announcing itself between the heading & subheading/slot content.\n * We add the \"Close this window\" ariaLabel after the initial VO is done\n */\n private _updateDismissAria() {\n const dismissBtn = this.shadowRoot?.querySelector(\"nys-button\");\n if (!dismissBtn) return;\n\n // Hide from VO initially\n dismissBtn.setAttribute(\"ariaLabel\", \" \");\n\n if (this.open) {\n // After focus is moved into modal, update label\n setTimeout(() => {\n dismissBtn.setAttribute(\"ariaLabel\", \"Close this window\");\n }, 100);\n }\n }\n\n /****************** Event Handlers ******************/\n private async _handleKeydown(e: KeyboardEvent) {\n if (!this.open) return;\n\n /** Exit the modal for \"escape\" key **/\n if (e.key === \"Escape\" && !this.mandatory) {\n e.preventDefault();\n this._closeModal();\n }\n\n /** Trap focus to be within the modal only **/\n if (e.key === \"Tab\") {\n const modal = this.shadowRoot?.querySelector(\".nys-modal\");\n if (!modal) return;\n\n // Gather all elements from slots + dismissible btn\n const knownFocusableElements =\n 'a[href], area[href], button:not([disabled]), details, iframe, object, input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [contentEditable=\"true\"], [tabindex]:not([tabindex^=\"-\"])';\n const focusableElements: HTMLElement[] = [];\n const dismissBtn = modal.querySelector(\"nys-button\") as HTMLElement;\n\n if (dismissBtn) {\n focusableElements.push(dismissBtn);\n }\n\n // Gather from slot elements to store the focusable elements for trapping\n const slotElements = Array.from(modal.querySelectorAll(\"slot\"));\n for (const slot of slotElements) {\n const assigned = slot.assignedElements({ flatten: true });\n for (const el of assigned) {\n if (el instanceof HTMLElement && el.matches(knownFocusableElements)) {\n focusableElements.push(el);\n }\n // also account for the action slot container that has nys-buttons\n el.querySelectorAll<HTMLElement>(\"nys-button\").forEach(\n (actionBtn) => {\n focusableElements.push(actionBtn);\n },\n );\n }\n }\n\n if (focusableElements.length > 0) {\n // Laying out the starting (i.e. dismiss btn) and ending elements for looping focus elements\n const firstFocusableEl = focusableElements[0];\n const lastFocusableEl = focusableElements[focusableElements.length - 1];\n let active = document.activeElement as HTMLElement | null;\n let activeIndex = focusableElements.indexOf(active as HTMLElement);\n\n /**\n * Move focus backward when Shift+Tab is pressed.\n * Focus goes to the previous element in focusableElements.\n * If currently at the first element, wrap around to the last element.\n * For <nys-button>, focus the internal button. For other elements, focus directly.\n */\n if (e.shiftKey) {\n e.preventDefault();\n\n let prevIndex = activeIndex - 1;\n if (prevIndex < 0) {\n prevIndex = focusableElements.length - 1; // wrap back to lastFocusableEl\n }\n\n const prevElement = focusableElements[prevIndex];\n const isNysButton =\n focusableElements[prevIndex].tagName.toLowerCase() === \"nys-button\";\n\n if (isNysButton) {\n const innerBtn = await (prevElement as any).getButtonElement();\n innerBtn?.focus();\n } else {\n prevElement.focus();\n }\n } else {\n // Tab (go back to first focusable element if we're at last)\n if (active === lastFocusableEl) {\n e.preventDefault();\n if (firstFocusableEl.tagName.toLowerCase() === \"nys-button\") {\n const innerBtn = await (\n firstFocusableEl as any\n ).getButtonElement();\n innerBtn?.focus();\n } else {\n firstFocusableEl.focus();\n }\n }\n }\n }\n }\n }\n\n private _closeModal() {\n this.open = false;\n this._dispatchCloseEvent();\n }\n\n render() {\n return this.open\n ? html`<div\n id=${this.id}\n class=\"nys-modal-overlay\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"${this.id}-heading\"\n aria-describedby=\"${this._getAriaDescribedBy()}\"\n >\n <div class=\"nys-modal\" tabindex=\"-1\">\n <div class=\"nys-modal_header\">\n <div class=\"nys-modal_header-inner\">\n <h2 id=\"${this.id}-heading\">${this.heading}</h2>\n ${!this.mandatory\n ? html`<nys-button\n circle\n icon=\"close\"\n variant=\"ghost\"\n .onClick=${() => this._closeModal()}\n ></nys-button>`\n : \"\"}\n </div>\n ${this.subheading\n ? html`<p id=\"${this.id}-subheading\">${this.subheading}</p>`\n : \"\"}\n </div>\n\n <div\n id=\"${this.id}-desc\"\n class=\"nys-modal_body ${!this.hasBodySlots ? \"hidden\" : \"\"}\"\n >\n <div class=\"nys-modal_body-inner\">\n <slot @slotchange=${this._handleBodySlotChange}></slot>\n </div>\n </div>\n\n <div\n class=\"nys-modal_footer ${!this.hasActionSlots ? \"hidden\" : \"\"}\"\n >\n <slot\n name=\"actions\"\n @slotchange=${this._handleActionSlotChange}\n ></slot>\n </div>\n </div>\n </div>`\n : \"\";\n }\n}\n\nif (!customElements.get(\"nys-modal\")) {\n customElements.define(\"nys-modal\", NysModal);\n}\n"],"names":["t","e","s","o","n$2","r","n","S","c","i","h","a","l","p","d","u","f","y","b","_a","styles","css","componentIdCounter","_NysModal","LitElement","value","changeProps","modal","prev","innerBtn","slot","node","isMobile","el","btn","ariaDescriptions","dismissBtn","knownFocusableElements","focusableElements","slotElements","assigned","actionBtn","firstFocusableEl","lastFocusableEl","active","activeIndex","prevIndex","prevElement","html","__decorateClass","property","state","NysModal"],"mappings":";;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,MAAMA,IAAE,YAAWC,IAAED,EAAE,eAAsBA,EAAE,aAAX,UAAqBA,EAAE,SAAS,iBAAe,wBAAuB,SAAS,aAAW,aAAY,cAAc,WAAUE,IAAE,OAAM,GAAGC,IAAE,oBAAI;AAAO,IAAAC,IAAC,MAAO;AAAA,EAAC,YAAY,GAAE,GAAED,GAAE;AAAC,QAAG,KAAK,eAAa,IAAGA,MAAID,EAAE,OAAM,MAAM,mEAAmE;AAAE,SAAK,UAAQ,GAAE,KAAK,IAAE;AAAA,EAAC;A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AA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GADf3B,EACiB,WAAA,MAAA,CAAA;AACA0B,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAFf3B,EAEiB,WAAA,WAAA,CAAA;AACA0B,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAHf3B,EAGiB,WAAA,cAAA,CAAA;AACgB0B,EAAA;AAAA,EAA3CC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAJ/B3B,EAIiC,WAAA,QAAA,CAAA;AACA0B,EAAA;AAAA,EAA3CC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAL/B3B,EAKiC,WAAA,aAAA,CAAA;AAKxC0B,EAAA;AAAA,EADHC,EAAS,EAAE,SAAS,GAAA,CAAM;AAAA,GAThB3B,EAUP,WAAA,SAAA,CAAA;AAgBa0B,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA1BI5B,EA0BM,WAAA,gBAAA,CAAA;AACA0B,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA3BI5B,EA2BM,WAAA,kBAAA,CAAA;AA3BZ,IAAM6B,IAAN7B;AAwWF,eAAe,IAAI,WAAW,KACjC,eAAe,OAAO,aAAa6B,CAAQ;","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"nys-modal.js","sources":["../../../node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/@lit/reactive-element/decorators/property.js","../../../node_modules/@lit/reactive-element/decorators/state.js","../src/nys-modal.styles.ts","../src/nys-modal.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.1\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { css } from \"lit\";\n\nexport default css`\n :host {\n /* Global Modal Styles */\n --_nys-modal-width: 480px;\n --_nys-modal-min-width: 320px;\n --_nys-modal-border-radius: var(--nys-radius-lg, 8px);\n --_nys-modal-border-color: var(--nys-color-neutral-200, #bec0c1);\n --_nys-modal-border-width: 1px;\n --_nys-modal-background-color: var(--nys-color-surface, #fff);\n --_nys-modal-margin: var(--nys-space-250, 20px);\n --_nys-modal-padding: var(--nys-space-300, 24px);\n --_nys-modal-gap: var(--nys-space-200, 16px);\n\n /* Modal Overlay */\n --_nys-modal-background-color--overlay: var(\n --nys-color-black-transparent-700,\n rgba(27, 27, 27, 0.7)\n );\n\n /* Modal Header */\n --_nys-modal-gap--header: var(--nys-space-100, 8px);\n\n /* Modal Footer */\n --_nys-modal-gap--footer: var(--nys-space-250, 20px);\n\n /* Typography */\n --_nys-modal-font-size: var(--nys-font-size-ui-md, 16px);\n --_nys-modal-font-weight--header: var(--nys-font-weight-bold, 700);\n --_nys-modal-font-weight--subheader: var(--nys-font-weight-regular, 400);\n --_nys-modal-line-height: var(--nys-font-lineheight-ui-md, 24px);\n --_nys-modal-font-family: var(\n --nys-font-family-ui,\n var(\n --nys-font-family-sans,\n \"Proxima Nova\",\n \"Helvetica Neue\",\n \"Helvetica\",\n \"Arial\",\n sans-serif\n )\n );\n }\n\n /*** CSS & Slot resets ***/\n * {\n box-sizing: border-box;\n }\n\n ::slotted(p) {\n margin: 0 !important;\n }\n\n h2,\n p {\n flex: 1;\n margin: 0;\n margin-bottom: 0;\n }\n\n /*** Modal Overlay (black transparent background) ***/\n .nys-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n background: var(--_nys-modal-background-color--overlay);\n }\n\n /*** Base ***/\n .nys-modal {\n display: flex;\n flex-direction: column;\n margin: var(--_nys-modal-margin);\n padding: var(--_nys-modal-padding);\n gap: var(--_nys-modal-gap);\n width: var(--_nys-modal-width);\n min-width: var(--_nys-modal-min-width);\n border-radius: var(--_nys-modal-border-radius);\n border: var(--_nys-modal-border-width) solid var(--_nys-modal-border-color);\n font-family: var(--_nys-modal-font-family);\n font-size: var(--_nys-modal-font-size);\n line-height: var(--_nys-modal-line-height);\n background: var(--_nys-modal-background-color);\n position: relative;\n z-index: 10000;\n }\n\n /*** Modal Header ***/\n .nys-modal_header {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--_nys-modal-gap--header);\n }\n\n .nys-modal_header p {\n font-weight: var(--_nys-modal-font-weight--subheader);\n }\n\n .nys-modal_header-inner {\n display: flex;\n align-items: center;\n width: 100%;\n font-weight: var(--_nys-modal-font-weight--header);\n }\n\n /*** Modal Body ***/\n .nys-modal_body {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .nys-modal_body-inner {\n overflow: auto;\n width: 100%;\n max-height: 45vh;\n }\n\n .nys-modal_body.hidden {\n display: none;\n }\n\n /*** Modal Footer (i.e. where the button slot is) ***/\n .nys-modal_footer ::slotted(*) {\n display: flex;\n flex-direction: column-reverse;\n justify-content: center;\n gap: var(--_nys-modal-gap--footer);\n align-self: stretch;\n }\n\n .nys-modal_footer.hidden ::slotted(*) {\n display: none;\n }\n\n @media (min-width: 480px) {\n .nys-modal_body-inner {\n max-height: 25vh;\n }\n .nys-modal_footer ::slotted(*) {\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n }\n }\n`;\n","import { LitElement, html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport styles from \"./nys-modal.styles\";\n\nlet componentIdCounter = 0; // Counter for generating unique IDs\n\nexport class NysModal extends LitElement {\n @property({ type: String }) id = \"\";\n @property({ type: String }) heading = \"\";\n @property({ type: String }) subheading = \"\";\n @property({ type: Boolean, reflect: true }) open = false;\n @property({ type: Boolean, reflect: true }) mandatory = false;\n\n private static readonly VALID_WIDTHS = [\"sm\", \"md\", \"lg\"] as const;\n private _width: (typeof NysModal.VALID_WIDTHS)[number] = \"md\";\n @property({ reflect: true })\n get width(): (typeof NysModal.VALID_WIDTHS)[number] {\n return this._width;\n }\n set width(value: string) {\n this._width = NysModal.VALID_WIDTHS.includes(\n value as (typeof NysModal.VALID_WIDTHS)[number],\n )\n ? (value as (typeof NysModal.VALID_WIDTHS)[number])\n : \"md\";\n }\n\n private _actionButtonSlot: HTMLSlotElement | null = null; // cache action button slots (if given) so we can manipulate their widths for mobile vs desktop\n private _prevFocusedElement: HTMLElement | null = null;\n private _originalBodyOverflow: string | null = null;\n\n // Track slot contents to control what HTML is rendered\n @state() private hasBodySlots = false;\n @state() private hasActionSlots = false;\n\n static styles = styles;\n\n /**************** Lifecycle Methods ****************/\n constructor() {\n super();\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.id) {\n this.id = `nys-{{componentName}}-${Date.now()}-${componentIdCounter++}`;\n }\n window.addEventListener(\"resize\", () => this._updateSlottedButtonWidth());\n window.addEventListener(\"keydown\", (e) => this._handleKeydown(e));\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._restoreBodyScroll(); // make sure scroll is restored when modal is removed\n window.removeEventListener(\"keydown\", (e) => this._handleKeydown(e));\n }\n\n firstUpdated() {\n this._handleBodySlotChange();\n this._handleActionSlotChange();\n }\n\n async updated(changeProps: Map<string, any>) {\n // Hide main body's scroll bar if modal is open/active\n if (changeProps.has(\"open\")) {\n if (this.open) {\n this._hideBodyScroll();\n this._dispatchOpenEvent();\n await this.updateComplete;\n this._savePrevFocused();\n this._focusOnModal();\n this._updateDismissAria();\n } else {\n this._restorePrevFocused();\n this._restoreBodyScroll();\n this._dispatchCloseEvent();\n this._updateDismissAria();\n }\n }\n }\n\n /******************** Functions ********************/\n private _hideBodyScroll() {\n if (this._originalBodyOverflow === null) {\n this._originalBodyOverflow = document.body.style.overflow;\n }\n document.body.style.overflow = \"hidden\";\n }\n\n private _restoreBodyScroll() {\n if (this._originalBodyOverflow !== null) {\n document.body.style.overflow = this._originalBodyOverflow;\n this._originalBodyOverflow = null;\n }\n }\n\n private _savePrevFocused() {\n this._prevFocusedElement = document.activeElement as HTMLElement;\n }\n\n private _focusOnModal() {\n const modal = this.shadowRoot?.querySelector<HTMLElement>(\".nys-modal\");\n modal?.focus();\n }\n\n private async _restorePrevFocused() {\n const prev = this._prevFocusedElement;\n\n if (prev && prev.tagName.toLowerCase() === \"nys-button\") {\n const innerBtn = await (prev as any).getButtonElement();\n if (innerBtn) {\n innerBtn.focus();\n return;\n }\n } else {\n this._prevFocusedElement?.focus();\n }\n this._prevFocusedElement = null;\n }\n\n // Check if the slot contains stuff (aka user add texts & action buttons), and render visibility accordingly\n private async _handleBodySlotChange() {\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>(\"slot\");\n if (!slot) return;\n this.hasBodySlots = slot\n .assignedNodes({ flatten: true })\n .some(\n (node) =>\n node.nodeType === Node.ELEMENT_NODE || node.textContent?.trim(),\n );\n }\n\n // Determines whether we hide the action buttons slot container based on if user put in action buttons\n private async _handleActionSlotChange() {\n const slot = this.shadowRoot?.querySelector<HTMLSlotElement>(\n 'slot[name=\"actions\"]',\n );\n if (!slot) return;\n this.hasActionSlots = slot\n .assignedNodes({ flatten: true })\n .some(\n (node) =>\n node.nodeType === Node.ELEMENT_NODE || node.textContent?.trim(),\n );\n\n // Cached the action button slot container so we can use it continuously for _updateSlottedButtonWidth() during screen resize\n this._actionButtonSlot = slot;\n // Update button widths immediately\n this._updateSlottedButtonWidth();\n }\n\n // Design has it that the slotted action buttons should be fullWidth and display:column direction for mobile view.\n // Therefore, we need to account for mobile size and screen resizes\n private _updateSlottedButtonWidth() {\n if (!this._actionButtonSlot) return; // use the cached variable\n const isMobile = window.innerWidth <= 480;\n\n this._actionButtonSlot.assignedElements().forEach((el) => {\n el.querySelectorAll(\"nys-button\").forEach((btn) => {\n if (isMobile) {\n btn?.setAttribute(\"fullWidth\", \"\");\n } else {\n btn?.removeAttribute(\"fullWidth\");\n }\n });\n });\n }\n\n private _dispatchOpenEvent() {\n this.dispatchEvent(\n new CustomEvent(\"nys-open\", {\n detail: { id: this.id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _dispatchCloseEvent() {\n this.dispatchEvent(\n new CustomEvent(\"nys-close\", {\n detail: { id: this.id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _getAriaDescribedBy() {\n // Handling what aria-describedby needs to announce in VO based on if the subheading or slot contents exists\n const ariaDescriptions: string[] = [];\n if (this.subheading) {\n ariaDescriptions.push(`${this.id}-subheading`);\n }\n if (this.hasBodySlots) {\n ariaDescriptions.push(`${this.id}-desc`);\n }\n return ariaDescriptions.join(\" \");\n }\n\n /**\n * This exist to prevent the VO for dismiss button from announcing itself between the heading & subheading/slot content.\n * We add the \"Close this window\" ariaLabel after the initial VO is done\n */\n private _updateDismissAria() {\n const dismissBtn = this.shadowRoot?.querySelector(\"nys-button\");\n if (!dismissBtn) return;\n\n // Hide from VO initially\n dismissBtn.setAttribute(\"ariaLabel\", \" \");\n\n if (this.open) {\n // After focus is moved into modal, update label\n setTimeout(() => {\n dismissBtn.setAttribute(\"ariaLabel\", \"Close this window\");\n }, 100);\n }\n }\n\n /****************** Event Handlers ******************/\n private async _handleKeydown(e: KeyboardEvent) {\n if (!this.open) return;\n\n /** Exit the modal for \"escape\" key **/\n if (e.key === \"Escape\" && !this.mandatory) {\n e.preventDefault();\n this._closeModal();\n }\n\n /** Trap focus to be within the modal only **/\n if (e.key === \"Tab\") {\n const modal = this.shadowRoot?.querySelector(\".nys-modal\");\n if (!modal) return;\n\n // Gather all elements from slots + dismissible btn\n const knownFocusableElements =\n 'a[href], area[href], button:not([disabled]), details, iframe, object, input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [contentEditable=\"true\"], [tabindex]:not([tabindex^=\"-\"])';\n const focusableElements: HTMLElement[] = [];\n const dismissBtn = modal.querySelector(\"nys-button\") as HTMLElement;\n\n if (dismissBtn) {\n focusableElements.push(dismissBtn);\n }\n\n // Gather from slot elements to store the focusable elements for trapping\n const slotElements = Array.from(modal.querySelectorAll(\"slot\"));\n for (const slot of slotElements) {\n const assigned = slot.assignedElements({ flatten: true });\n for (const el of assigned) {\n if (el instanceof HTMLElement && el.matches(knownFocusableElements)) {\n focusableElements.push(el);\n }\n // also account for the action slot container that has nys-buttons\n el.querySelectorAll<HTMLElement>(\"nys-button\").forEach(\n (actionBtn) => {\n focusableElements.push(actionBtn);\n },\n );\n }\n }\n\n if (focusableElements.length > 0) {\n // Laying out the starting (i.e. dismiss btn) and ending elements for looping focus elements\n const firstFocusableEl = focusableElements[0];\n const lastFocusableEl = focusableElements[focusableElements.length - 1];\n let active = document.activeElement as HTMLElement | null;\n let activeIndex = focusableElements.indexOf(active as HTMLElement);\n\n /**\n * Move focus backward when Shift+Tab is pressed.\n * Focus goes to the previous element in focusableElements.\n * If currently at the first element, wrap around to the last element.\n * For <nys-button>, focus the internal button. For other elements, focus directly.\n */\n if (e.shiftKey) {\n e.preventDefault();\n\n let prevIndex = activeIndex - 1;\n if (prevIndex < 0) {\n prevIndex = focusableElements.length - 1; // wrap back to lastFocusableEl\n }\n\n const prevElement = focusableElements[prevIndex];\n const isNysButton =\n focusableElements[prevIndex].tagName.toLowerCase() === \"nys-button\";\n\n if (isNysButton) {\n const innerBtn = await (prevElement as any).getButtonElement();\n innerBtn?.focus();\n } else {\n prevElement.focus();\n }\n } else {\n // Tab (go back to first focusable element if we're at last)\n if (active === lastFocusableEl) {\n e.preventDefault();\n if (firstFocusableEl.tagName.toLowerCase() === \"nys-button\") {\n const innerBtn = await (\n firstFocusableEl as any\n ).getButtonElement();\n innerBtn?.focus();\n } else {\n firstFocusableEl.focus();\n }\n }\n }\n }\n }\n }\n\n private _closeModal() {\n this.open = false;\n this._dispatchCloseEvent();\n }\n\n render() {\n return this.open\n ? html`<div\n id=${this.id}\n class=\"nys-modal-overlay\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"${this.id}-heading\"\n aria-describedby=\"${this._getAriaDescribedBy()}\"\n >\n <div class=\"nys-modal\" tabindex=\"-1\">\n <div class=\"nys-modal_header\">\n <div class=\"nys-modal_header-inner\">\n <h2 id=\"${this.id}-heading\">${this.heading}</h2>\n ${!this.mandatory\n ? html`<nys-button\n id=\"dismiss-modal\"\n circle\n icon=\"close\"\n variant=\"ghost\"\n @nys-click=${this._closeModal}\n ></nys-button>`\n : \"\"}\n </div>\n ${this.subheading\n ? html`<p id=\"${this.id}-subheading\">${this.subheading}</p>`\n : \"\"}\n </div>\n\n <div\n id=\"${this.id}-desc\"\n class=\"nys-modal_body ${!this.hasBodySlots ? \"hidden\" : \"\"}\"\n >\n <div class=\"nys-modal_body-inner\">\n <slot @slotchange=${this._handleBodySlotChange}></slot>\n </div>\n </div>\n\n <div\n class=\"nys-modal_footer ${!this.hasActionSlots ? \"hidden\" : \"\"}\"\n >\n <slot\n name=\"actions\"\n @slotchange=${this._handleActionSlotChange}\n ></slot>\n </div>\n </div>\n </div>`\n : \"\";\n }\n}\n\nif (!customElements.get(\"nys-modal\")) {\n customElements.define(\"nys-modal\", NysModal);\n}\n"],"names":["t","e","s","o","n$2","r","n","S","c","i","h","a","l","p","d","u","f","b","y","styles","css","componentIdCounter","_NysModal","_a","LitElement","value","changeProps","prev","innerBtn","slot","node","isMobile","el","btn","ariaDescriptions","dismissBtn","modal","knownFocusableElements","focusableElements","slotElements","assigned","actionBtn","firstFocusableEl","lastFocusableEl","active","activeIndex","prevIndex","prevElement","html","__decorateClass","property","state","NysModal"],"mappings":";;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,MAAMA,IAAE,YAAWC,IAAED,EAAE,eAAsBA,EAAE,aAAX,UAAqBA,EAAE,SAAS,iBAAe,wBAAuB,SAAS,aAAW,aAAY,cAAc,WAAUE,IAAE,OAAM,GAAGC,IAAE,oBAAI;AAAO,IAAAC,IAAC,MAAO;AAAA,EAAC,YAAY,GAAE,GAAED,GAAE;AAAC,QAAG,KAAK,eAAa,IAAGA,MAAID,EAAE,OAAM,MAAM,mEAAmE;AAAE,SAAK,UAAQ,GAAE,KAAK,IAAE;AAAA,EAAC;AAAA,EAAC,IAAI,aAAY;AAAC,QAAI,IAAE,KAAK;AAAE,UAAMA,IAAE,KAAK;AAAE,QAAGD,KAAY,MAAT,QAAW;AAAC,YAAMA,IAAWC,MAAT,UAAgBA,EAAE,WAAN;AAAa,MAAAD,MAAI,IAAEE,EAAE,IAAID,CAAC,IAAY,MAAT,YAAc,KAAK,IAAE,IAAE,IAAI,iBAAe,YAAY,KAAK,OAAO,GAAED,KAAGE,E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B,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA3BI7B,EA2BM,WAAA,kBAAA,CAAA;AA3BZ,IAAM8B,IAAN9B;AAyWF,eAAe,IAAI,WAAW,KACjC,eAAe,OAAO,aAAa8B,CAAQ;","x_google_ignoreList":[0,1,2,3]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/nys-modal",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "The Modal component from the NYS Design System.",
|
|
5
5
|
"module": "dist/nys-modal.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,16 +21,13 @@
|
|
|
21
21
|
"build:watch": "tsc --emitDeclarationOnly && vite build --watch",
|
|
22
22
|
"test:watch": "vite build && wtr --watch"
|
|
23
23
|
},
|
|
24
|
-
"peerDependencies": {
|
|
25
|
-
"lit": "^3.2.1"
|
|
26
|
-
},
|
|
27
24
|
"dependencies": {
|
|
28
|
-
"@nysds/nys-button": "^1.
|
|
25
|
+
"@nysds/nys-button": "^1.11.0"
|
|
29
26
|
},
|
|
30
27
|
"devDependencies": {
|
|
31
28
|
"lit": "^3.2.1",
|
|
32
29
|
"typescript": "^5.7.2",
|
|
33
|
-
"vite": "^
|
|
30
|
+
"vite": "^7.1.2"
|
|
34
31
|
},
|
|
35
32
|
"keywords": [
|
|
36
33
|
"new-york-state",
|