@nysds/nys-checkbox 1.6.0 → 1.8.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-checkbox.js +367 -298
- package/dist/nys-checkbox.js.map +1 -1
- package/dist/nys-checkboxgroup.d.ts +8 -5
- package/package.json +4 -4
package/dist/nys-checkbox.js
CHANGED
|
@@ -15,7 +15,7 @@ import { css as be, LitElement as ie, html as S } from "lit";
|
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
17
|
const I = globalThis, W = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ce = Symbol(), K = /* @__PURE__ */ new WeakMap();
|
|
18
|
-
let
|
|
18
|
+
let ue = class {
|
|
19
19
|
constructor(e, t, s) {
|
|
20
20
|
if (this._$cssResult$ = !0, s !== ce) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
21
21
|
this.cssText = e, this.t = t;
|
|
@@ -33,51 +33,51 @@ let ye = class {
|
|
|
33
33
|
return this.cssText;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const pe = (
|
|
37
|
-
if (W)
|
|
36
|
+
const pe = (r) => new ue(typeof r == "string" ? r : r + "", void 0, ce), ye = (r, e) => {
|
|
37
|
+
if (W) r.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
38
38
|
else for (const t of e) {
|
|
39
39
|
const s = document.createElement("style"), o = I.litNonce;
|
|
40
|
-
o !== void 0 && s.setAttribute("nonce", o), s.textContent = t.cssText,
|
|
40
|
+
o !== void 0 && s.setAttribute("nonce", o), s.textContent = t.cssText, r.appendChild(s);
|
|
41
41
|
}
|
|
42
|
-
}, J = W ? (
|
|
42
|
+
}, J = W ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((e) => {
|
|
43
43
|
let t = "";
|
|
44
44
|
for (const s of e.cssRules) t += s.cssText;
|
|
45
45
|
return pe(t);
|
|
46
|
-
})(
|
|
46
|
+
})(r) : r;
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
51
|
*/
|
|
52
|
-
const { is: _e, defineProperty:
|
|
52
|
+
const { is: _e, defineProperty: ke, getOwnPropertyDescriptor: fe, getOwnPropertyNames: ve, getOwnPropertySymbols: xe, getPrototypeOf: ge } = Object, $ = globalThis, Y = $.trustedTypes, me = Y ? Y.emptyScript : "", B = $.reactiveElementPolyfillSupport, q = (r, e) => r, R = { toAttribute(r, e) {
|
|
53
53
|
switch (e) {
|
|
54
54
|
case Boolean:
|
|
55
|
-
|
|
55
|
+
r = r ? me : null;
|
|
56
56
|
break;
|
|
57
57
|
case Object:
|
|
58
58
|
case Array:
|
|
59
|
-
|
|
59
|
+
r = r == null ? r : JSON.stringify(r);
|
|
60
60
|
}
|
|
61
|
-
return
|
|
62
|
-
}, fromAttribute(
|
|
63
|
-
let t =
|
|
61
|
+
return r;
|
|
62
|
+
}, fromAttribute(r, e) {
|
|
63
|
+
let t = r;
|
|
64
64
|
switch (e) {
|
|
65
65
|
case Boolean:
|
|
66
|
-
t =
|
|
66
|
+
t = r !== null;
|
|
67
67
|
break;
|
|
68
68
|
case Number:
|
|
69
|
-
t =
|
|
69
|
+
t = r === null ? null : Number(r);
|
|
70
70
|
break;
|
|
71
71
|
case Object:
|
|
72
72
|
case Array:
|
|
73
73
|
try {
|
|
74
|
-
t = JSON.parse(
|
|
74
|
+
t = JSON.parse(r);
|
|
75
75
|
} catch {
|
|
76
76
|
t = null;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
return t;
|
|
80
|
-
} }, Z = (
|
|
80
|
+
} }, Z = (r, e) => !_e(r, e), Q = { attribute: !0, type: String, converter: R, reflect: !1, hasChanged: Z };
|
|
81
81
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), $.litPropertyMetadata ?? ($.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
82
82
|
class P extends HTMLElement {
|
|
83
83
|
static addInitializer(e) {
|
|
@@ -86,27 +86,27 @@ class P extends HTMLElement {
|
|
|
86
86
|
static get observedAttributes() {
|
|
87
87
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
88
88
|
}
|
|
89
|
-
static createProperty(e, t =
|
|
89
|
+
static createProperty(e, t = Q) {
|
|
90
90
|
if (t.state && (t.attribute = !1), this._$Ei(), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
91
91
|
const s = Symbol(), o = this.getPropertyDescriptor(e, s, t);
|
|
92
|
-
o !== void 0 &&
|
|
92
|
+
o !== void 0 && ke(this.prototype, e, o);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
static getPropertyDescriptor(e, t, s) {
|
|
96
|
-
const { get: o, set: c } =
|
|
96
|
+
const { get: o, set: c } = fe(this.prototype, e) ?? { get() {
|
|
97
97
|
return this[t];
|
|
98
|
-
}, set(
|
|
99
|
-
this[t] =
|
|
98
|
+
}, set(i) {
|
|
99
|
+
this[t] = i;
|
|
100
100
|
} };
|
|
101
101
|
return { get() {
|
|
102
102
|
return o == null ? void 0 : o.call(this);
|
|
103
|
-
}, set(
|
|
103
|
+
}, set(i) {
|
|
104
104
|
const h = o == null ? void 0 : o.call(this);
|
|
105
|
-
c.call(this,
|
|
105
|
+
c.call(this, i), this.requestUpdate(e, h, s);
|
|
106
106
|
}, configurable: !0, enumerable: !0 };
|
|
107
107
|
}
|
|
108
108
|
static getPropertyOptions(e) {
|
|
109
|
-
return this.elementProperties.get(e) ??
|
|
109
|
+
return this.elementProperties.get(e) ?? Q;
|
|
110
110
|
}
|
|
111
111
|
static _$Ei() {
|
|
112
112
|
if (this.hasOwnProperty(q("elementProperties"))) return;
|
|
@@ -116,7 +116,7 @@ class P extends HTMLElement {
|
|
|
116
116
|
static finalize() {
|
|
117
117
|
if (this.hasOwnProperty(q("finalized"))) return;
|
|
118
118
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(q("properties"))) {
|
|
119
|
-
const t = this.properties, s = [...
|
|
119
|
+
const t = this.properties, s = [...ve(t), ...xe(t)];
|
|
120
120
|
for (const o of s) this.createProperty(o, t[o]);
|
|
121
121
|
}
|
|
122
122
|
const e = this[Symbol.metadata];
|
|
@@ -165,7 +165,7 @@ class P extends HTMLElement {
|
|
|
165
165
|
}
|
|
166
166
|
createRenderRoot() {
|
|
167
167
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
168
|
-
return
|
|
168
|
+
return ye(e, this.constructor.elementStyles), e;
|
|
169
169
|
}
|
|
170
170
|
connectedCallback() {
|
|
171
171
|
var e;
|
|
@@ -190,16 +190,16 @@ class P extends HTMLElement {
|
|
|
190
190
|
var c;
|
|
191
191
|
const s = this.constructor.elementProperties.get(e), o = this.constructor._$Eu(e, s);
|
|
192
192
|
if (o !== void 0 && s.reflect === !0) {
|
|
193
|
-
const
|
|
194
|
-
this._$Em = e,
|
|
193
|
+
const i = (((c = s.converter) == null ? void 0 : c.toAttribute) !== void 0 ? s.converter : R).toAttribute(t, s.type);
|
|
194
|
+
this._$Em = e, i == null ? this.removeAttribute(o) : this.setAttribute(o, i), this._$Em = null;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
_$AK(e, t) {
|
|
198
198
|
var c;
|
|
199
199
|
const s = this.constructor, o = s._$Eh.get(e);
|
|
200
200
|
if (o !== void 0 && this._$Em !== o) {
|
|
201
|
-
const
|
|
202
|
-
this._$Em = o, this[o] = h.fromAttribute(t,
|
|
201
|
+
const i = s.getPropertyOptions(o), h = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((c = i.converter) == null ? void 0 : c.fromAttribute) !== void 0 ? i.converter : R;
|
|
202
|
+
this._$Em = o, this[o] = h.fromAttribute(t, i.type), this._$Em = null;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
requestUpdate(e, t, s) {
|
|
@@ -230,11 +230,11 @@ class P extends HTMLElement {
|
|
|
230
230
|
if (!this.isUpdatePending) return;
|
|
231
231
|
if (!this.hasUpdated) {
|
|
232
232
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
233
|
-
for (const [c,
|
|
233
|
+
for (const [c, i] of this._$Ep) this[c] = i;
|
|
234
234
|
this._$Ep = void 0;
|
|
235
235
|
}
|
|
236
236
|
const o = this.constructor.elementProperties;
|
|
237
|
-
if (o.size > 0) for (const [c,
|
|
237
|
+
if (o.size > 0) for (const [c, i] of o) i.wrapped !== !0 || this._$AL.has(c) || this[c] === void 0 || this.P(c, this[c], i);
|
|
238
238
|
}
|
|
239
239
|
let e = !1;
|
|
240
240
|
const t = this._$AL;
|
|
@@ -283,63 +283,71 @@ P.elementStyles = [], P.shadowRootOptions = { mode: "open" }, P[q("elementProper
|
|
|
283
283
|
* Copyright 2017 Google LLC
|
|
284
284
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
285
285
|
*/
|
|
286
|
-
const $e = { attribute: !0, type: String, converter: R, reflect: !1, hasChanged: Z }, Ae = (
|
|
286
|
+
const $e = { attribute: !0, type: String, converter: R, reflect: !1, hasChanged: Z }, Ae = (r = $e, e, t) => {
|
|
287
287
|
const { kind: s, metadata: o } = t;
|
|
288
288
|
let c = globalThis.litPropertyMetadata.get(o);
|
|
289
|
-
if (c === void 0 && globalThis.litPropertyMetadata.set(o, c = /* @__PURE__ */ new Map()), c.set(t.name,
|
|
290
|
-
const { name:
|
|
289
|
+
if (c === void 0 && globalThis.litPropertyMetadata.set(o, c = /* @__PURE__ */ new Map()), c.set(t.name, r), s === "accessor") {
|
|
290
|
+
const { name: i } = t;
|
|
291
291
|
return { set(h) {
|
|
292
292
|
const n = e.get.call(this);
|
|
293
|
-
e.set.call(this, h), this.requestUpdate(
|
|
293
|
+
e.set.call(this, h), this.requestUpdate(i, n, r);
|
|
294
294
|
}, init(h) {
|
|
295
|
-
return h !== void 0 && this.P(
|
|
295
|
+
return h !== void 0 && this.P(i, void 0, r), h;
|
|
296
296
|
} };
|
|
297
297
|
}
|
|
298
298
|
if (s === "setter") {
|
|
299
|
-
const { name:
|
|
299
|
+
const { name: i } = t;
|
|
300
300
|
return function(h) {
|
|
301
|
-
const n = this[
|
|
302
|
-
e.call(this, h), this.requestUpdate(
|
|
301
|
+
const n = this[i];
|
|
302
|
+
e.call(this, h), this.requestUpdate(i, n, r);
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
throw Error("Unsupported decorator location: " + s);
|
|
306
306
|
};
|
|
307
|
-
function l(
|
|
308
|
-
return (e, t) => typeof t == "object" ? Ae(
|
|
309
|
-
const
|
|
310
|
-
return o.constructor.createProperty(c,
|
|
311
|
-
})(
|
|
307
|
+
function l(r) {
|
|
308
|
+
return (e, t) => typeof t == "object" ? Ae(r, e, t) : ((s, o, c) => {
|
|
309
|
+
const i = o.hasOwnProperty(c);
|
|
310
|
+
return o.constructor.createProperty(c, i ? { ...s, wrapped: !0 } : s), i ? Object.getOwnPropertyDescriptor(o, c) : void 0;
|
|
311
|
+
})(r, e, t);
|
|
312
312
|
}
|
|
313
313
|
/**
|
|
314
314
|
* @license
|
|
315
315
|
* Copyright 2017 Google LLC
|
|
316
316
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
317
317
|
*/
|
|
318
|
-
|
|
318
|
+
function Ee(r) {
|
|
319
|
+
return l({ ...r, state: !0, attribute: !1 });
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* @license
|
|
323
|
+
* Copyright 2017 Google LLC
|
|
324
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
325
|
+
*/
|
|
326
|
+
const M = globalThis, D = M.trustedTypes, X = D ? D.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, ne = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, he = "?" + m, we = `<${he}>`, w = document, N = () => w.createComment(""), U = (r) => r === null || typeof r != "object" && typeof r != "function", G = Array.isArray, Se = (r) => G(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", j = `[
|
|
319
327
|
\f\r]`, z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ee = /-->/g, te = />/g, A = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
|
|
320
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), se = /'/g, oe = /"/g, ae = /^(?:script|style|textarea|title)$/i,
|
|
321
|
-
function le(
|
|
322
|
-
if (!G(
|
|
323
|
-
return
|
|
328
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), se = /'/g, oe = /"/g, ae = /^(?:script|style|textarea|title)$/i, T = Symbol.for("lit-noChange"), b = Symbol.for("lit-nothing"), re = /* @__PURE__ */ new WeakMap(), E = w.createTreeWalker(w, 129);
|
|
329
|
+
function le(r, e) {
|
|
330
|
+
if (!G(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
331
|
+
return X !== void 0 ? X.createHTML(e) : e;
|
|
324
332
|
}
|
|
325
|
-
const
|
|
326
|
-
const t =
|
|
327
|
-
let o, c = e === 2 ? "<svg>" : e === 3 ? "<math>" : "",
|
|
333
|
+
const Ce = (r, e) => {
|
|
334
|
+
const t = r.length - 1, s = [];
|
|
335
|
+
let o, c = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", i = z;
|
|
328
336
|
for (let h = 0; h < t; h++) {
|
|
329
|
-
const n =
|
|
330
|
-
let d,
|
|
331
|
-
for (;
|
|
332
|
-
const g =
|
|
333
|
-
c +=
|
|
337
|
+
const n = r[h];
|
|
338
|
+
let d, u, a = -1, f = 0;
|
|
339
|
+
for (; f < n.length && (i.lastIndex = f, u = i.exec(n), u !== null); ) f = i.lastIndex, i === z ? u[1] === "!--" ? i = ee : u[1] !== void 0 ? i = te : u[2] !== void 0 ? (ae.test(u[2]) && (o = RegExp("</" + u[2], "g")), i = A) : u[3] !== void 0 && (i = A) : i === A ? u[0] === ">" ? (i = o ?? z, a = -1) : u[1] === void 0 ? a = -2 : (a = i.lastIndex - u[2].length, d = u[1], i = u[3] === void 0 ? A : u[3] === '"' ? oe : se) : i === oe || i === se ? i = A : i === ee || i === te ? i = z : (i = A, o = void 0);
|
|
340
|
+
const g = i === A && r[h + 1].startsWith("/>") ? " " : "";
|
|
341
|
+
c += i === z ? n + we : a >= 0 ? (s.push(d), n.slice(0, a) + ne + n.slice(a) + m + g) : n + m + (a === -2 ? h : g);
|
|
334
342
|
}
|
|
335
|
-
return [le(
|
|
343
|
+
return [le(r, c + (r[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
|
|
336
344
|
};
|
|
337
345
|
class O {
|
|
338
346
|
constructor({ strings: e, _$litType$: t }, s) {
|
|
339
347
|
let o;
|
|
340
348
|
this.parts = [];
|
|
341
|
-
let c = 0,
|
|
342
|
-
const h = e.length - 1, n = this.parts, [d,
|
|
349
|
+
let c = 0, i = 0;
|
|
350
|
+
const h = e.length - 1, n = this.parts, [d, u] = Ce(e, t);
|
|
343
351
|
if (this.el = O.createElement(d, s), E.currentNode = this.el.content, t === 2 || t === 3) {
|
|
344
352
|
const a = this.el.content.firstChild;
|
|
345
353
|
a.replaceWith(...a.childNodes);
|
|
@@ -347,15 +355,15 @@ class O {
|
|
|
347
355
|
for (; (o = E.nextNode()) !== null && n.length < h; ) {
|
|
348
356
|
if (o.nodeType === 1) {
|
|
349
357
|
if (o.hasAttributes()) for (const a of o.getAttributeNames()) if (a.endsWith(ne)) {
|
|
350
|
-
const
|
|
351
|
-
n.push({ type: 1, index: c, name:
|
|
358
|
+
const f = u[i++], g = o.getAttribute(a).split(m), H = /([.?@])?(.*)/.exec(f);
|
|
359
|
+
n.push({ type: 1, index: c, name: H[2], strings: g, ctor: H[1] === "." ? ze : H[1] === "?" ? qe : H[1] === "@" ? Me : L }), o.removeAttribute(a);
|
|
352
360
|
} else a.startsWith(m) && (n.push({ type: 6, index: c }), o.removeAttribute(a));
|
|
353
361
|
if (ae.test(o.tagName)) {
|
|
354
|
-
const a = o.textContent.split(m),
|
|
355
|
-
if (
|
|
356
|
-
o.textContent =
|
|
357
|
-
for (let g = 0; g <
|
|
358
|
-
o.append(a[
|
|
362
|
+
const a = o.textContent.split(m), f = a.length - 1;
|
|
363
|
+
if (f > 0) {
|
|
364
|
+
o.textContent = D ? D.emptyScript : "";
|
|
365
|
+
for (let g = 0; g < f; g++) o.append(a[g], N()), E.nextNode(), n.push({ type: 2, index: ++c });
|
|
366
|
+
o.append(a[f], N());
|
|
359
367
|
}
|
|
360
368
|
}
|
|
361
369
|
} else if (o.nodeType === 8) if (o.data === he) n.push({ type: 2, index: c });
|
|
@@ -371,14 +379,14 @@ class O {
|
|
|
371
379
|
return s.innerHTML = e, s;
|
|
372
380
|
}
|
|
373
381
|
}
|
|
374
|
-
function C(
|
|
375
|
-
var
|
|
376
|
-
if (e ===
|
|
377
|
-
let o = s !== void 0 ? (
|
|
382
|
+
function C(r, e, t = r, s) {
|
|
383
|
+
var i, h;
|
|
384
|
+
if (e === T) return e;
|
|
385
|
+
let o = s !== void 0 ? (i = t._$Co) == null ? void 0 : i[s] : t._$Cl;
|
|
378
386
|
const c = U(e) ? void 0 : e._$litDirective$;
|
|
379
|
-
return (o == null ? void 0 : o.constructor) !== c && ((h = o == null ? void 0 : o._$AO) == null || h.call(o, !1), c === void 0 ? o = void 0 : (o = new c(
|
|
387
|
+
return (o == null ? void 0 : o.constructor) !== c && ((h = o == null ? void 0 : o._$AO) == null || h.call(o, !1), c === void 0 ? o = void 0 : (o = new c(r), o._$AT(r, t, s)), s !== void 0 ? (t._$Co ?? (t._$Co = []))[s] = o : t._$Cl = o), o !== void 0 && (e = C(r, o._$AS(r, e.values), o, s)), e;
|
|
380
388
|
}
|
|
381
|
-
class
|
|
389
|
+
class Pe {
|
|
382
390
|
constructor(e, t) {
|
|
383
391
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
384
392
|
}
|
|
@@ -391,13 +399,13 @@ class Ce {
|
|
|
391
399
|
u(e) {
|
|
392
400
|
const { el: { content: t }, parts: s } = this._$AD, o = ((e == null ? void 0 : e.creationScope) ?? w).importNode(t, !0);
|
|
393
401
|
E.currentNode = o;
|
|
394
|
-
let c = E.nextNode(),
|
|
402
|
+
let c = E.nextNode(), i = 0, h = 0, n = s[0];
|
|
395
403
|
for (; n !== void 0; ) {
|
|
396
|
-
if (
|
|
404
|
+
if (i === n.index) {
|
|
397
405
|
let d;
|
|
398
|
-
n.type === 2 ? d = new
|
|
406
|
+
n.type === 2 ? d = new V(c, c.nextSibling, this, e) : n.type === 1 ? d = new n.ctor(c, n.name, n.strings, this, e) : n.type === 6 && (d = new Ue(c, this, e)), this._$AV.push(d), n = s[++h];
|
|
399
407
|
}
|
|
400
|
-
|
|
408
|
+
i !== (n == null ? void 0 : n.index) && (c = E.nextNode(), i++);
|
|
401
409
|
}
|
|
402
410
|
return E.currentNode = w, o;
|
|
403
411
|
}
|
|
@@ -406,7 +414,7 @@ class Ce {
|
|
|
406
414
|
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
|
|
407
415
|
}
|
|
408
416
|
}
|
|
409
|
-
class
|
|
417
|
+
class V {
|
|
410
418
|
get _$AU() {
|
|
411
419
|
var e;
|
|
412
420
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
@@ -426,7 +434,7 @@ class D {
|
|
|
426
434
|
return this._$AB;
|
|
427
435
|
}
|
|
428
436
|
_$AI(e, t = this) {
|
|
429
|
-
e = C(this, e, t), U(e) ? e === b || e == null || e === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : e !== this._$AH && e !==
|
|
437
|
+
e = C(this, e, t), U(e) ? e === b || e == null || e === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : e !== this._$AH && e !== T && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Se(e) ? this.k(e) : this._(e);
|
|
430
438
|
}
|
|
431
439
|
O(e) {
|
|
432
440
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -442,8 +450,8 @@ class D {
|
|
|
442
450
|
const { values: t, _$litType$: s } = e, o = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = O.createElement(le(s.h, s.h[0]), this.options)), s);
|
|
443
451
|
if (((c = this._$AH) == null ? void 0 : c._$AD) === o) this._$AH.p(t);
|
|
444
452
|
else {
|
|
445
|
-
const
|
|
446
|
-
|
|
453
|
+
const i = new Pe(o, this), h = i.u(this.options);
|
|
454
|
+
i.p(t), this.T(h), this._$AH = i;
|
|
447
455
|
}
|
|
448
456
|
}
|
|
449
457
|
_$AC(e) {
|
|
@@ -454,7 +462,7 @@ class D {
|
|
|
454
462
|
G(this._$AH) || (this._$AH = [], this._$AR());
|
|
455
463
|
const t = this._$AH;
|
|
456
464
|
let s, o = 0;
|
|
457
|
-
for (const c of e) o === t.length ? t.push(s = new
|
|
465
|
+
for (const c of e) o === t.length ? t.push(s = new V(this.O(N()), this.O(N()), this, this.options)) : s = t[o], s._$AI(c), o++;
|
|
458
466
|
o < t.length && (this._$AR(s && s._$AB.nextSibling, o), t.length = o);
|
|
459
467
|
}
|
|
460
468
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
@@ -481,20 +489,20 @@ class L {
|
|
|
481
489
|
}
|
|
482
490
|
_$AI(e, t = this, s, o) {
|
|
483
491
|
const c = this.strings;
|
|
484
|
-
let
|
|
485
|
-
if (c === void 0) e = C(this, e, t, 0),
|
|
492
|
+
let i = !1;
|
|
493
|
+
if (c === void 0) e = C(this, e, t, 0), i = !U(e) || e !== this._$AH && e !== T, i && (this._$AH = e);
|
|
486
494
|
else {
|
|
487
495
|
const h = e;
|
|
488
496
|
let n, d;
|
|
489
|
-
for (e = c[0], n = 0; n < c.length - 1; n++) d = C(this, h[s + n], t, n), d ===
|
|
497
|
+
for (e = c[0], n = 0; n < c.length - 1; n++) d = C(this, h[s + n], t, n), d === T && (d = this._$AH[n]), i || (i = !U(d) || d !== this._$AH[n]), d === b ? e = b : e !== b && (e += (d ?? "") + c[n + 1]), this._$AH[n] = d;
|
|
490
498
|
}
|
|
491
|
-
|
|
499
|
+
i && !o && this.j(e);
|
|
492
500
|
}
|
|
493
501
|
j(e) {
|
|
494
502
|
e === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
495
503
|
}
|
|
496
504
|
}
|
|
497
|
-
class
|
|
505
|
+
class ze extends L {
|
|
498
506
|
constructor() {
|
|
499
507
|
super(...arguments), this.type = 3;
|
|
500
508
|
}
|
|
@@ -502,7 +510,7 @@ class Pe extends L {
|
|
|
502
510
|
this.element[this.name] = e === b ? void 0 : e;
|
|
503
511
|
}
|
|
504
512
|
}
|
|
505
|
-
class
|
|
513
|
+
class qe extends L {
|
|
506
514
|
constructor() {
|
|
507
515
|
super(...arguments), this.type = 4;
|
|
508
516
|
}
|
|
@@ -510,12 +518,12 @@ class ze extends L {
|
|
|
510
518
|
this.element.toggleAttribute(this.name, !!e && e !== b);
|
|
511
519
|
}
|
|
512
520
|
}
|
|
513
|
-
class
|
|
521
|
+
class Me extends L {
|
|
514
522
|
constructor(e, t, s, o, c) {
|
|
515
523
|
super(e, t, s, o, c), this.type = 5;
|
|
516
524
|
}
|
|
517
525
|
_$AI(e, t = this) {
|
|
518
|
-
if ((e = C(this, e, t, 0) ?? b) ===
|
|
526
|
+
if ((e = C(this, e, t, 0) ?? b) === T) return;
|
|
519
527
|
const s = this._$AH, o = e === b && s !== b || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, c = e !== b && (s === b || o);
|
|
520
528
|
o && this.element.removeEventListener(this.name, this, s), c && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
521
529
|
}
|
|
@@ -524,7 +532,7 @@ class qe extends L {
|
|
|
524
532
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
525
533
|
}
|
|
526
534
|
}
|
|
527
|
-
class
|
|
535
|
+
class Ue {
|
|
528
536
|
constructor(e, t, s) {
|
|
529
537
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
|
|
530
538
|
}
|
|
@@ -536,22 +544,22 @@ class Me {
|
|
|
536
544
|
}
|
|
537
545
|
}
|
|
538
546
|
const F = M.litHtmlPolyfillSupport;
|
|
539
|
-
F == null || F(O,
|
|
547
|
+
F == null || F(O, V), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.2.1");
|
|
540
548
|
/**
|
|
541
549
|
* @license
|
|
542
550
|
* Copyright 2018 Google LLC
|
|
543
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
544
552
|
*/
|
|
545
|
-
const
|
|
553
|
+
const Te = (r) => r ?? b, de = be`
|
|
546
554
|
:host {
|
|
547
555
|
/* Anything that can be overridden should be defined here */
|
|
548
556
|
|
|
549
557
|
/* Global Checkbox Styles */
|
|
550
558
|
--_nys-checkbox-size: var(--nys-size-400, 32px);
|
|
551
|
-
--_nys-checkbox-radius: var(--nys-radius-md, 4px);
|
|
552
|
-
--_nys-checkbox-width
|
|
553
|
-
--_nys-checkbox-color
|
|
554
|
-
--_nys-checkbox-width
|
|
559
|
+
--_nys-checkbox-border-radius: var(--nys-radius-md, 4px);
|
|
560
|
+
--_nys-checkbox-border-width: var(--nys-border-width-md, 2px);
|
|
561
|
+
--_nys-checkbox-outline-color: var(--nys-color-focus, #004dd1);
|
|
562
|
+
--_nys-checkbox-outline-width: var(--nys-border-width-md, 2px);
|
|
555
563
|
--_nys-checkbox-outline-offset: var(--nys-space-2px, 2px);
|
|
556
564
|
/* space between checkbox and it's label */
|
|
557
565
|
--_nys-checkbox-gap: var(--nys-space-150, 12px);
|
|
@@ -571,8 +579,7 @@ const Ue = (i) => i ?? b, de = be`
|
|
|
571
579
|
)
|
|
572
580
|
);
|
|
573
581
|
--_nys-checkbox-font-size: var(--nys-font-size-ui-md, 16px);
|
|
574
|
-
--_nys-checkbox-font-weight
|
|
575
|
-
--_nys-checkbox-font-weight-600: var(--nys-font-weight-semibold, 600);
|
|
582
|
+
--_nys-checkbox-font-weight: var(--nys-font-weight-regular, 400);
|
|
576
583
|
--_nys-checkbox-line-height: var(--nys-font-lineheight-ui-md, 24px);
|
|
577
584
|
|
|
578
585
|
/* Global Checkbox Colors */
|
|
@@ -580,57 +587,59 @@ const Ue = (i) => i ?? b, de = be`
|
|
|
580
587
|
--nys-color-ink,
|
|
581
588
|
var(--nys-color-neutral-900, #1b1b1b)
|
|
582
589
|
);
|
|
583
|
-
--_nys-checkbox-required-color: var(
|
|
584
|
-
--nys-color-danger,
|
|
585
|
-
var(--nys-color-red-600, #b52c2c)
|
|
586
|
-
);
|
|
587
590
|
|
|
588
591
|
/* Default (Empty) */
|
|
589
|
-
--_nys-checkbox-color
|
|
590
|
-
--_nys-checkbox-color
|
|
592
|
+
--_nys-checkbox-background-color: var(--nys-color-ink-reverse, #ffffff);
|
|
593
|
+
--_nys-checkbox-border-color: var(--nys-color-neutral-600, #62666a);
|
|
591
594
|
/* Empty + Hovered */
|
|
592
|
-
--_nys-checkbox-
|
|
593
|
-
|
|
595
|
+
--_nys-checkbox-background-color--hover: var(
|
|
596
|
+
--nys-color-neutral-50,
|
|
597
|
+
#ededed
|
|
598
|
+
);
|
|
599
|
+
--_nys-checkbox-border-color--hover: var(--nys-color-ink, #1b1b1b);
|
|
594
600
|
/* Empty + Pressed */
|
|
595
|
-
--_nys-checkbox-
|
|
596
|
-
|
|
601
|
+
--_nys-checkbox-background-color--active: var(
|
|
602
|
+
--nys-color-neutral-100,
|
|
603
|
+
#d0d0ce
|
|
604
|
+
);
|
|
605
|
+
--_nys-checkbox-border-color--active: var(--nys-color-ink, #1b1b1b);
|
|
597
606
|
/* Checked */
|
|
598
|
-
--_nys-checkbox-
|
|
599
|
-
--_nys-checkbox-
|
|
607
|
+
--_nys-checkbox-background-color--checked: var(--nys-color-theme, #154973);
|
|
608
|
+
--_nys-checkbox-border-color--checked: var(--nys-color-theme, #154973);
|
|
600
609
|
/* Checked + Hovered */
|
|
601
|
-
--_nys-checkbox-checked
|
|
610
|
+
--_nys-checkbox-background-color--checked--hover: var(
|
|
602
611
|
--nys-color-theme-strong,
|
|
603
612
|
#0e324f
|
|
604
613
|
);
|
|
605
|
-
--_nys-checkbox-checked
|
|
614
|
+
--_nys-checkbox-border-color--checked--hover: var(
|
|
606
615
|
--nys-color-theme-strong,
|
|
607
616
|
#0e324f
|
|
608
617
|
);
|
|
609
618
|
/* Checked + Pressed */
|
|
610
|
-
--_nys-checkbox-
|
|
619
|
+
--_nys-checkbox-background-color--checked--active: var(
|
|
611
620
|
--nys-color-theme-stronger,
|
|
612
621
|
#081b2b
|
|
613
622
|
);
|
|
614
|
-
--_nys-checkbox-
|
|
623
|
+
--_nys-checkbox-border-color--checked--active: var(
|
|
615
624
|
--nys-color-theme-stronger,
|
|
616
625
|
#081b2b
|
|
617
626
|
);
|
|
618
627
|
/* Disabled */
|
|
619
|
-
--_nys-checkbox-
|
|
620
|
-
|
|
628
|
+
--_nys-checkbox-background-color--disabled: var(
|
|
629
|
+
--nys-color-ink-reverse,
|
|
630
|
+
#f0f0f0
|
|
631
|
+
);
|
|
632
|
+
--_nys-checkbox-border-color--disabled: var(
|
|
621
633
|
--nys-color-neutral-400,
|
|
622
634
|
#757575
|
|
623
635
|
);
|
|
624
|
-
--_nys-checkbox-disabled-color-text
|
|
625
|
-
--nys-color-text-disabled,
|
|
626
|
-
#bec0c1
|
|
627
|
-
);
|
|
636
|
+
--_nys-checkbox-color--disabled: var(--nys-color-text-disabled, #bec0c1);
|
|
628
637
|
/* Disabled Checked */
|
|
629
|
-
--_nys-checkbox-
|
|
638
|
+
--_nys-checkbox-background-color--checked--disabled: var(
|
|
630
639
|
--nys-color-neutral-100,
|
|
631
640
|
#d0d0ce
|
|
632
641
|
);
|
|
633
|
-
--_nys-checkbox-
|
|
642
|
+
--_nys-checkbox-border-color--checked--disabled: var(
|
|
634
643
|
--nys-color-neutral-100,
|
|
635
644
|
#d0d0ce
|
|
636
645
|
);
|
|
@@ -639,70 +648,81 @@ const Ue = (i) => i ?? b, de = be`
|
|
|
639
648
|
/* Small Variant */
|
|
640
649
|
:host([size="sm"]) {
|
|
641
650
|
--_nys-checkbox-size: var(--nys-size-300, 24px);
|
|
642
|
-
--_nys-checkbox-radius: var(--nys-radius-sm, 2px);
|
|
651
|
+
--_nys-checkbox-border-radius: var(--nys-radius-sm, 2px);
|
|
643
652
|
--_nys-checkboxgroup-gap: var(--nys-space-100, 8px);
|
|
644
653
|
--_nys-checkbox-gap: var(--nys-space-100, 8px);
|
|
645
654
|
}
|
|
646
655
|
/* Medium Variant */
|
|
647
656
|
:host([size="md"]) {
|
|
648
657
|
--_nys-checkbox-size: var(--nys-size-400, 32px);
|
|
649
|
-
--_nys-checkbox-radius: var(--nys-radius-md, 4px);
|
|
658
|
+
--_nys-checkbox-border-radius: var(--nys-radius-md, 4px);
|
|
650
659
|
}
|
|
651
660
|
|
|
652
661
|
/* Tile Variant */
|
|
653
662
|
:host([tile]) {
|
|
654
|
-
--_nys-checkbox-
|
|
655
|
-
--_nys-checkbox-
|
|
656
|
-
--_nys-checkbox-
|
|
657
|
-
--_nys-checkbox-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
663
|
+
--_nys-checkbox-border-width--tile: var(--nys-border-width-sm, 1px);
|
|
664
|
+
--_nys-checkbox-border-radius--tile: var(--nys-radius-md, 4px);
|
|
665
|
+
--_nys-checkbox-border-color--tile: var(--nys-color-neutral-100, #d0d0ce);
|
|
666
|
+
--_nys-checkbox-background-color--tile: var(
|
|
667
|
+
--nys-color-ink-reverse,
|
|
668
|
+
#ffffff
|
|
669
|
+
);
|
|
670
|
+
--_nys-checkbox-padding--x--tile: var(--nys-space-250, 20px);
|
|
671
|
+
--_nys-checkbox-padding--y--tile: var(--nys-space-200, 16px);
|
|
661
672
|
/* Hover */
|
|
662
|
-
--_nys-checkbox-
|
|
673
|
+
--_nys-checkbox-border-color--tile--hover: var(
|
|
663
674
|
--nys-color-neutral-700,
|
|
664
675
|
#4a4d4f
|
|
665
676
|
);
|
|
666
|
-
--_nys-checkbox-
|
|
677
|
+
--_nys-checkbox-background-color--tile--hover: var(
|
|
678
|
+
--nys-color-ink-reverse,
|
|
679
|
+
#ffffff
|
|
680
|
+
);
|
|
667
681
|
/* Pressed */
|
|
668
|
-
--_nys-checkbox-
|
|
682
|
+
--_nys-checkbox-border-color--tile--active: var(
|
|
669
683
|
--nys-color-neutral-900,
|
|
670
684
|
#1b1b1b
|
|
671
685
|
);
|
|
672
|
-
--_nys-checkbox-
|
|
686
|
+
--_nys-checkbox-background-color--tile--active: var(
|
|
673
687
|
--nys-color-ink-reverse,
|
|
674
688
|
#ffffff
|
|
675
689
|
);
|
|
676
690
|
/* Checked */
|
|
677
|
-
--_nys-checkbox-
|
|
691
|
+
--_nys-checkbox-border-color--tile--checked: var(
|
|
678
692
|
--nys-color-theme-mid,
|
|
679
693
|
#457aa5
|
|
680
694
|
);
|
|
681
|
-
--_nys-checkbox-
|
|
695
|
+
--_nys-checkbox-background-color--tile--checked: var(
|
|
682
696
|
--nys-color-theme-faint,
|
|
683
697
|
#f7fafd
|
|
684
698
|
);
|
|
685
699
|
/* Disabled */
|
|
686
|
-
--_nys-checkbox-
|
|
700
|
+
--_nys-checkbox-background-color--tile--disabled: var(
|
|
687
701
|
--nys-color-ink-reverse,
|
|
688
702
|
#f0f0f0
|
|
689
703
|
);
|
|
690
|
-
--_nys-checkbox-
|
|
704
|
+
--_nys-checkbox-border-color--tile--disabled: var(
|
|
691
705
|
--nys-color-neutral-100,
|
|
692
706
|
#d0d0ce
|
|
693
707
|
);
|
|
694
708
|
}
|
|
695
709
|
|
|
696
710
|
:host([tile][size="sm"]) {
|
|
697
|
-
--_nys-checkbox-
|
|
698
|
-
--_nys-checkbox-
|
|
711
|
+
--_nys-checkbox-padding--x--tile: var(--nys-space-200, 16px);
|
|
712
|
+
--_nys-checkbox-padding--y--tile: var(--nys-space-150, 12px);
|
|
699
713
|
}
|
|
700
714
|
|
|
701
715
|
:host([tile][showError]) {
|
|
702
|
-
--_nys-checkbox-
|
|
703
|
-
--_nys-checkbox-
|
|
704
|
-
--_nys-checkbox-
|
|
705
|
-
|
|
716
|
+
--_nys-checkbox-border-color--tile: var(--nys-color-danger, #b52c2c);
|
|
717
|
+
--_nys-checkbox-border-color--tile--hover: var(--nys-color-danger, #b52c2c);
|
|
718
|
+
--_nys-checkbox-border-color--tile--active: var(
|
|
719
|
+
--nys-color-danger,
|
|
720
|
+
#b52c2c
|
|
721
|
+
);
|
|
722
|
+
--_nys-checkbox-border-color--tile--checked: var(
|
|
723
|
+
--nys-color-danger,
|
|
724
|
+
#b52c2c
|
|
725
|
+
);
|
|
706
726
|
}
|
|
707
727
|
|
|
708
728
|
#single-error-message {
|
|
@@ -731,12 +751,12 @@ const Ue = (i) => i ?? b, de = be`
|
|
|
731
751
|
line-height: var(--_nys-checkbox-line-height);
|
|
732
752
|
|
|
733
753
|
/* Tile */
|
|
734
|
-
border-radius: var(--_nys-checkbox-
|
|
735
|
-
border: var(--_nys-checkbox-
|
|
736
|
-
var(--_nys-checkbox-
|
|
737
|
-
background: var(--_nys-checkbox-
|
|
738
|
-
padding: var(--_nys-checkbox-
|
|
739
|
-
var(--_nys-checkbox-
|
|
754
|
+
border-radius: var(--_nys-checkbox-border-radius--tile);
|
|
755
|
+
border: var(--_nys-checkbox-border-width--tile) solid
|
|
756
|
+
var(--_nys-checkbox-border-color--tile);
|
|
757
|
+
background: var(--_nys-checkbox-background-color--tile);
|
|
758
|
+
padding: var(--_nys-checkbox-padding--y--tile)
|
|
759
|
+
var(--_nys-checkbox-padding--x--tile);
|
|
740
760
|
gap: var(--_nys-checkbox-gap);
|
|
741
761
|
}
|
|
742
762
|
|
|
@@ -768,10 +788,10 @@ const Ue = (i) => i ?? b, de = be`
|
|
|
768
788
|
height: var(--_nys-checkbox-size);
|
|
769
789
|
max-width: var(--_nys-checkbox-size);
|
|
770
790
|
max-height: var(--_nys-checkbox-size);
|
|
771
|
-
border: solid var(--_nys-checkbox-width
|
|
772
|
-
var(--_nys-checkbox-color
|
|
773
|
-
background-color: var(--_nys-checkbox-color
|
|
774
|
-
border-radius: var(--_nys-checkbox-radius);
|
|
791
|
+
border: solid var(--_nys-checkbox-border-width)
|
|
792
|
+
var(--_nys-checkbox-border-color);
|
|
793
|
+
background-color: var(--_nys-checkbox-background-color);
|
|
794
|
+
border-radius: var(--_nys-checkbox-border-radius);
|
|
775
795
|
outline-offset: var(--_nys-checkbox-outline-offset);
|
|
776
796
|
outline: none;
|
|
777
797
|
}
|
|
@@ -784,89 +804,99 @@ const Ue = (i) => i ?? b, de = be`
|
|
|
784
804
|
|
|
785
805
|
/* Checked */
|
|
786
806
|
.nys-checkbox__checkbox:not(:disabled):checked {
|
|
787
|
-
background-color: var(--_nys-checkbox-
|
|
788
|
-
border-color: var(--_nys-checkbox-
|
|
807
|
+
background-color: var(--_nys-checkbox-background-color--checked);
|
|
808
|
+
border-color: var(--_nys-checkbox-border-color--checked);
|
|
789
809
|
}
|
|
790
810
|
:host([tile])
|
|
791
811
|
.nys-checkbox:has(.nys-checkbox__checkbox:not(:disabled):checked) {
|
|
792
|
-
border-color: var(--_nys-checkbox-
|
|
793
|
-
background-color: var(--_nys-checkbox-
|
|
812
|
+
border-color: var(--_nys-checkbox-border-color--tile--checked);
|
|
813
|
+
background-color: var(--_nys-checkbox-background-color--tile--checked);
|
|
794
814
|
}
|
|
795
815
|
|
|
796
816
|
/* Checked + Disabled */
|
|
797
817
|
.nys-checkbox__checkbox:disabled:checked {
|
|
798
|
-
background-color: var(--_nys-checkbox-
|
|
799
|
-
border-color: var(--_nys-checkbox-
|
|
818
|
+
background-color: var(--_nys-checkbox-background-color--checked--disabled);
|
|
819
|
+
border-color: var(--_nys-checkbox-border-color--checked--disabled);
|
|
800
820
|
}
|
|
801
821
|
:host([tile]) .nys-checkbox:has(.nys-checkbox__checkbox:disabled:checked) {
|
|
802
|
-
border-color: var(--_nys-checkbox-
|
|
803
|
-
background-color: var(--_nys-checkbox-
|
|
822
|
+
border-color: var(--_nys-checkbox-border-color--tile--disabled);
|
|
823
|
+
background-color: var(--_nys-checkbox-background-color--tile--disabled);
|
|
804
824
|
}
|
|
805
825
|
|
|
806
826
|
/* Disabled */
|
|
807
827
|
.nys-checkbox__checkbox:disabled {
|
|
808
|
-
background-color: var(--_nys-checkbox-
|
|
809
|
-
border-color: var(--_nys-checkbox-
|
|
828
|
+
background-color: var(--_nys-checkbox-background-color--disabled);
|
|
829
|
+
border-color: var(--_nys-checkbox-border-color--disabled);
|
|
810
830
|
cursor: not-allowed;
|
|
811
831
|
}
|
|
812
832
|
.nys-checkbox__content:has(.nys-checkbox__checkbox:disabled)
|
|
813
833
|
.nys-checkbox__text
|
|
814
834
|
* {
|
|
815
|
-
color: var(--_nys-checkbox-disabled
|
|
835
|
+
color: var(--_nys-checkbox-color--disabled);
|
|
816
836
|
cursor: not-allowed;
|
|
817
837
|
}
|
|
818
838
|
:host([tile]) .nys-checkbox:has(.nys-checkbox__checkbox:disabled) {
|
|
819
|
-
background-color: var(--_nys-checkbox-
|
|
820
|
-
border-color: var(--_nys-checkbox-
|
|
839
|
+
background-color: var(--_nys-checkbox-background-color--disabled);
|
|
840
|
+
border-color: var(--_nys-checkbox-border-color--disabled);
|
|
821
841
|
cursor: not-allowed;
|
|
822
842
|
}
|
|
823
843
|
|
|
824
844
|
/* Hover - not checked */
|
|
825
845
|
.nys-checkbox__checkbox:hover:not(:disabled):not(:checked) {
|
|
826
|
-
background-color: var(--_nys-checkbox-
|
|
827
|
-
border-color: var(--_nys-checkbox-
|
|
846
|
+
background-color: var(--_nys-checkbox-background-color--hover);
|
|
847
|
+
border-color: var(--_nys-checkbox-border-color--hover);
|
|
828
848
|
}
|
|
829
849
|
:host([tile])
|
|
830
850
|
.nys-checkbox:hover:has(
|
|
831
851
|
.nys-checkbox__checkbox:not(:disabled):not(:checked)
|
|
832
852
|
) {
|
|
833
|
-
border-color: var(--_nys-checkbox-
|
|
834
|
-
background-color: var(--_nys-checkbox-
|
|
835
|
-
outline: solid var(--_nys-checkbox-
|
|
836
|
-
var(--_nys-checkbox-
|
|
853
|
+
border-color: var(--_nys-checkbox-border-color--tile--hover);
|
|
854
|
+
background-color: var(--_nys-checkbox-background-color--tile--hover);
|
|
855
|
+
outline: solid var(--_nys-checkbox-border-width--tile)
|
|
856
|
+
var(--_nys-checkbox-border-color--tile--hover);
|
|
837
857
|
}
|
|
838
858
|
|
|
839
859
|
/* Hover + Checked */
|
|
860
|
+
.nys-checkbox__checkbox:hover:not(:disabled):checked {
|
|
861
|
+
border-color: var(--_nys-checkbox-border-color--checked--hover);
|
|
862
|
+
background-color: var(--_nys-checkbox-background-color--checked--hover);
|
|
863
|
+
}
|
|
840
864
|
:host([tile])
|
|
841
865
|
.nys-checkbox:hover:has(.nys-checkbox__checkbox:not(:disabled):checked) {
|
|
842
|
-
outline: solid var(--_nys-checkbox-
|
|
843
|
-
var(--_nys-checkbox-
|
|
866
|
+
outline: solid var(--_nys-checkbox-border-width--tile)
|
|
867
|
+
var(--_nys-checkbox-border-color--tile--checked);
|
|
844
868
|
}
|
|
845
869
|
|
|
846
|
-
/* Pressed -
|
|
870
|
+
/* Pressed - not checked */
|
|
847
871
|
.nys-checkbox__checkbox:active:not(:disabled):not(:checked) {
|
|
848
|
-
background-color: var(--_nys-checkbox-
|
|
849
|
-
border-color: var(--_nys-checkbox-
|
|
872
|
+
background-color: var(--_nys-checkbox-background-color--active);
|
|
873
|
+
border-color: var(--_nys-checkbox-border-color--active);
|
|
850
874
|
}
|
|
851
875
|
:host([tile])
|
|
852
876
|
.nys-checkbox:has(
|
|
853
877
|
.nys-checkbox__checkbox:active:not(:disabled):not(:checked)
|
|
854
878
|
) {
|
|
855
|
-
border-color: var(--_nys-checkbox-
|
|
856
|
-
background-color: var(--_nys-checkbox-
|
|
857
|
-
outline: solid var(--_nys-checkbox-
|
|
858
|
-
var(--_nys-checkbox-
|
|
879
|
+
border-color: var(--_nys-checkbox-border-color--tile--active);
|
|
880
|
+
background-color: var(--_nys-checkbox-background-color--tile--active);
|
|
881
|
+
outline: solid var(--_nys-checkbox-border-width--tile)
|
|
882
|
+
var(--_nys-checkbox-border-color--tile--active);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
/* Pressed + Checked */
|
|
886
|
+
.nys-checkbox__checkbox:active:not(:disabled):checked {
|
|
887
|
+
border-color: var(--_nys-checkbox-border-color--checked--active);
|
|
888
|
+
background-color: var(--_nys-checkbox-background-color--checked--active);
|
|
859
889
|
}
|
|
860
890
|
|
|
861
891
|
/* Focused */
|
|
862
|
-
:host(:not([tile])) .nys-checkbox__checkbox:focus
|
|
863
|
-
outline: solid var(--_nys-checkbox-width
|
|
864
|
-
var(--_nys-checkbox-color
|
|
892
|
+
:host(:not([tile])) .nys-checkbox__checkbox:focus {
|
|
893
|
+
outline: solid var(--_nys-checkbox-outline-width)
|
|
894
|
+
var(--_nys-checkbox-outline-color);
|
|
865
895
|
}
|
|
866
|
-
:host([tile]) .nys-checkbox:has(*:focus
|
|
867
|
-
outline: solid var(--_nys-checkbox-
|
|
868
|
-
var(--_nys-checkbox-color
|
|
869
|
-
border-color: var(--_nys-checkbox-color
|
|
896
|
+
:host([tile]) .nys-checkbox:has(*:focus) {
|
|
897
|
+
outline: solid var(--_nys-checkbox-border-width--tile)
|
|
898
|
+
var(--_nys-checkbox-outline-color) !important;
|
|
899
|
+
border-color: var(--_nys-checkbox-outline-color) !important;
|
|
870
900
|
}
|
|
871
901
|
|
|
872
902
|
/* Checkbox Label Holder */
|
|
@@ -879,58 +909,75 @@ const Ue = (i) => i ?? b, de = be`
|
|
|
879
909
|
|
|
880
910
|
/* Label styling */
|
|
881
911
|
.nys-checkbox__label {
|
|
882
|
-
font-weight: var(--_nys-checkbox-font-weight
|
|
912
|
+
font-weight: var(--_nys-checkbox-font-weight);
|
|
883
913
|
color: var(--nys-color-text, #1b1b1b);
|
|
884
914
|
}
|
|
885
915
|
|
|
886
916
|
/* Description styling */
|
|
887
917
|
.nys-checkbox__description {
|
|
888
|
-
font-weight: var(--_nys-checkbox-font-weight
|
|
918
|
+
font-weight: var(--_nys-checkbox-font-weight);
|
|
889
919
|
font-style: italic;
|
|
890
920
|
text-align: left;
|
|
891
921
|
}
|
|
892
922
|
|
|
893
923
|
/* Required */
|
|
894
924
|
.nys-checkbox__required {
|
|
895
|
-
color: var(--
|
|
925
|
+
color: var(--nys-color-danger, #b52c2c);
|
|
896
926
|
}
|
|
897
927
|
|
|
898
928
|
.nys-checkbox__requiredwrapper {
|
|
899
|
-
display:
|
|
929
|
+
display: flex;
|
|
930
|
+
gap: 3px;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/* Screen readers ONLY */
|
|
934
|
+
fieldset {
|
|
935
|
+
all: unset;
|
|
936
|
+
display: contents;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.sr-only {
|
|
940
|
+
position: absolute;
|
|
941
|
+
width: 1px;
|
|
942
|
+
height: 1px;
|
|
943
|
+
padding: 0;
|
|
944
|
+
margin: -1px;
|
|
945
|
+
overflow: hidden;
|
|
946
|
+
border: 0;
|
|
900
947
|
}
|
|
901
948
|
`;
|
|
902
|
-
var
|
|
903
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
904
|
-
(
|
|
905
|
-
return s && o &&
|
|
949
|
+
var Oe = Object.defineProperty, He = Object.getOwnPropertyDescriptor, k = (r, e, t, s) => {
|
|
950
|
+
for (var o = s > 1 ? void 0 : s ? He(e, t) : e, c = r.length - 1, i; c >= 0; c--)
|
|
951
|
+
(i = r[c]) && (o = (s ? i(e, t, o) : i(o)) || o);
|
|
952
|
+
return s && o && Oe(e, t, o), o;
|
|
906
953
|
};
|
|
907
|
-
let
|
|
908
|
-
var
|
|
909
|
-
const _ = (
|
|
954
|
+
let Ie = 0;
|
|
955
|
+
var v;
|
|
956
|
+
const _ = (v = class extends ie {
|
|
910
957
|
// allows use of elementInternals' API
|
|
911
958
|
constructor() {
|
|
912
|
-
super(), this.id = "", this.name = "", this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.tile = !1, this._size = "md", this._internals = this.attachInternals();
|
|
959
|
+
super(), this.id = "", this.name = "", this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.tile = !1, this._slottedDescriptionText = "", this._size = "md", this._internals = this.attachInternals();
|
|
913
960
|
}
|
|
914
961
|
get size() {
|
|
915
962
|
return this._size;
|
|
916
963
|
}
|
|
917
964
|
set size(e) {
|
|
918
|
-
this._size =
|
|
965
|
+
this._size = v.VALID_SIZES.includes(
|
|
919
966
|
e
|
|
920
967
|
) ? e : "md";
|
|
921
968
|
}
|
|
922
969
|
// Generate a unique ID if one is not provided
|
|
923
970
|
connectedCallback() {
|
|
924
|
-
super.connectedCallback(), this.id || (this.id = `nys-checkbox-${Date.now()}-${
|
|
971
|
+
super.connectedCallback(), this.id || (this.id = `nys-checkbox-${Date.now()}-${Ie++}`), this.addEventListener("nys-change", this._handleCheckboxChange), this.addEventListener("invalid", this._handleInvalid);
|
|
925
972
|
}
|
|
926
973
|
disconnectedCallback() {
|
|
927
974
|
super.disconnectedCallback(), this.removeEventListener("nys-change", this._handleCheckboxChange), this.removeEventListener("invalid", this._handleInvalid);
|
|
928
975
|
}
|
|
929
976
|
firstUpdated() {
|
|
930
|
-
this._setGroupExist(), this.
|
|
977
|
+
this._setGroupExist(), this._updateCheckboxSize(), this._updateCheckboxTile(), this._updateCheckboxShowError(), this._getSlotDescriptionForAria();
|
|
931
978
|
}
|
|
932
979
|
updated(e) {
|
|
933
|
-
e.has("required") && this.required && this._setupCheckboxRequired(), e.has("size") && this.
|
|
980
|
+
e.has("required") && this.required && this._setupCheckboxRequired(), e.has("size") && this._updateCheckboxSize(), e.has("tile") && this._updateCheckboxTile(), e.has("showError") && this._updateCheckboxShowError();
|
|
934
981
|
}
|
|
935
982
|
/********************** Functions **********************/
|
|
936
983
|
_setGroupExist() {
|
|
@@ -938,24 +985,6 @@ const _ = (x = class extends ie {
|
|
|
938
985
|
t.groupExist = !0;
|
|
939
986
|
});
|
|
940
987
|
}
|
|
941
|
-
async _handleInvalid(e) {
|
|
942
|
-
e.preventDefault(), this.showError = !0, this._manageCheckboxRequired();
|
|
943
|
-
const t = this.querySelector("nys-checkbox"), s = t ? await t.getInputElement() : null;
|
|
944
|
-
if (s) {
|
|
945
|
-
const o = this._internals.form;
|
|
946
|
-
o ? Array.from(o.elements).find((h) => {
|
|
947
|
-
if (h.tagName.toLowerCase() === "nys-checkboxgroup") {
|
|
948
|
-
if (Array.from(
|
|
949
|
-
this.querySelectorAll("nys-checkbox")
|
|
950
|
-
).filter(
|
|
951
|
-
(y) => y.checked
|
|
952
|
-
).length === 0)
|
|
953
|
-
return h;
|
|
954
|
-
} else
|
|
955
|
-
return typeof h.checkValidity == "function" && !h.checkValidity();
|
|
956
|
-
}) === this && s.focus() : s.focus();
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
988
|
// Initial update on checkbox required attribute
|
|
960
989
|
async _setupCheckboxRequired() {
|
|
961
990
|
const e = this.querySelector("nys-checkbox"), t = this.errorMessage || "This field is required", s = e ? await e.getInputElement() : null;
|
|
@@ -965,18 +994,13 @@ const _ = (x = class extends ie {
|
|
|
965
994
|
s || this
|
|
966
995
|
);
|
|
967
996
|
}
|
|
968
|
-
// Similar to how native forms handle multiple same-name fields, we group the selected values into a list for FormData.
|
|
969
|
-
_handleCheckboxChange(e) {
|
|
970
|
-
const t = e, { name: s } = t.detail, c = Array.from(this.querySelectorAll("nys-checkbox")).filter((r) => r.checked).map((r) => r.value);
|
|
971
|
-
this.name = s, this._internals.setFormValue(c.join(", ")), this._manageCheckboxRequired();
|
|
972
|
-
}
|
|
973
997
|
// Updates the required attribute of each checkbox in the group
|
|
974
998
|
async _manageCheckboxRequired() {
|
|
975
999
|
if (this.required) {
|
|
976
1000
|
const e = this.errorMessage || "Please select at least one option.", t = this.querySelector("nys-checkbox"), s = t ? await t.getInputElement() : null;
|
|
977
1001
|
let o = !1;
|
|
978
|
-
this.querySelectorAll("nys-checkbox").forEach((
|
|
979
|
-
|
|
1002
|
+
this.querySelectorAll("nys-checkbox").forEach((i) => {
|
|
1003
|
+
i.checked && (o = !0);
|
|
980
1004
|
}), o ? (this._internals.setValidity({}), this.showError = !1) : (this._internals.setValidity(
|
|
981
1005
|
{ valueMissing: !0 },
|
|
982
1006
|
e,
|
|
@@ -985,82 +1009,127 @@ const _ = (x = class extends ie {
|
|
|
985
1009
|
}
|
|
986
1010
|
}
|
|
987
1011
|
// Updates the size of each checkbox in the group
|
|
988
|
-
|
|
1012
|
+
_updateCheckboxSize() {
|
|
989
1013
|
this.querySelectorAll("nys-checkbox").forEach((t) => {
|
|
990
1014
|
t.setAttribute("size", this.size);
|
|
991
1015
|
});
|
|
992
1016
|
}
|
|
993
|
-
|
|
1017
|
+
_updateCheckboxTile() {
|
|
994
1018
|
this.querySelectorAll("nys-checkbox").forEach((t) => {
|
|
995
1019
|
this.tile ? t.toggleAttribute("tile", !0) : t.removeAttribute("tile");
|
|
996
1020
|
});
|
|
997
1021
|
}
|
|
998
|
-
|
|
1022
|
+
_updateCheckboxShowError() {
|
|
999
1023
|
this.querySelectorAll("nys-checkbox").forEach((t) => {
|
|
1000
1024
|
this.showError ? t.setAttribute("showError", "") : t.removeAttribute("showError");
|
|
1001
1025
|
});
|
|
1002
1026
|
}
|
|
1027
|
+
// Get the slotted text contents so native VO can attempt to announce it within the legend in the fieldset
|
|
1028
|
+
_getSlotDescriptionForAria() {
|
|
1029
|
+
var s;
|
|
1030
|
+
const e = (s = this.shadowRoot) == null ? void 0 : s.querySelector(
|
|
1031
|
+
'slot[name="description"]'
|
|
1032
|
+
), t = (e == null ? void 0 : e.assignedNodes({ flatten: !0 })) || [];
|
|
1033
|
+
this._slottedDescriptionText = t.map((o) => {
|
|
1034
|
+
var c;
|
|
1035
|
+
return (c = o.textContent) == null ? void 0 : c.trim();
|
|
1036
|
+
}).filter(Boolean).join(", ");
|
|
1037
|
+
}
|
|
1038
|
+
async _handleInvalid(e) {
|
|
1039
|
+
e.preventDefault(), this.showError = !0, this._manageCheckboxRequired();
|
|
1040
|
+
const t = this.querySelector("nys-checkbox"), s = t ? await t.getInputElement() : null;
|
|
1041
|
+
if (s) {
|
|
1042
|
+
const o = this._internals.form;
|
|
1043
|
+
o ? Array.from(o.elements).find((h) => {
|
|
1044
|
+
if (h.tagName.toLowerCase() === "nys-checkboxgroup") {
|
|
1045
|
+
if (Array.from(
|
|
1046
|
+
this.querySelectorAll("nys-checkbox")
|
|
1047
|
+
).filter(
|
|
1048
|
+
(u) => u.checked
|
|
1049
|
+
).length === 0)
|
|
1050
|
+
return h;
|
|
1051
|
+
} else
|
|
1052
|
+
return typeof h.checkValidity == "function" && !h.checkValidity();
|
|
1053
|
+
}) === this && s.focus() : s.focus();
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
/******************** Event Handlers ********************/
|
|
1057
|
+
// Similar to how native forms handle multiple same-name fields, we group the selected values into a list for FormData.
|
|
1058
|
+
_handleCheckboxChange(e) {
|
|
1059
|
+
const t = e, { name: s } = t.detail, c = Array.from(this.querySelectorAll("nys-checkbox")).filter((i) => i.checked).map((i) => i.value);
|
|
1060
|
+
this.name = s, this._internals.setFormValue(c.join(", ")), this._manageCheckboxRequired();
|
|
1061
|
+
}
|
|
1003
1062
|
render() {
|
|
1004
|
-
return S`
|
|
1005
|
-
<nys-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
<
|
|
1063
|
+
return S`
|
|
1064
|
+
<div class="nys-checkboxgroup">
|
|
1065
|
+
<nys-label
|
|
1066
|
+
for=${this.id}
|
|
1067
|
+
label=${this.label}
|
|
1068
|
+
description=${this.description}
|
|
1069
|
+
flag=${this.required ? "required" : this.optional ? "optional" : ""}
|
|
1070
|
+
>
|
|
1071
|
+
<slot name="description" slot="description">${this.description}</slot>
|
|
1072
|
+
</nys-label>
|
|
1073
|
+
<div class="nys-checkboxgroup__content">
|
|
1074
|
+
<fieldset>
|
|
1075
|
+
<legend class="sr-only">
|
|
1076
|
+
${this.label}${this._slottedDescriptionText ? ` ${this._slottedDescriptionText}` : this.description ? ` ${this.description}` : ""}
|
|
1077
|
+
</legend>
|
|
1078
|
+
<slot></slot>
|
|
1079
|
+
</fieldset>
|
|
1080
|
+
</div>
|
|
1081
|
+
<nys-errormessage
|
|
1082
|
+
?showError=${this.showError}
|
|
1083
|
+
errorMessage=${this._internals.validationMessage || this.errorMessage}
|
|
1084
|
+
.showDivider=${!this.tile}
|
|
1085
|
+
></nys-errormessage>
|
|
1015
1086
|
</div>
|
|
1016
|
-
|
|
1017
|
-
?showError=${this.showError}
|
|
1018
|
-
errorMessage=${this._internals.validationMessage || this.errorMessage}
|
|
1019
|
-
.showDivider=${!this.tile}
|
|
1020
|
-
></nys-errormessage>
|
|
1021
|
-
</div>`;
|
|
1087
|
+
`;
|
|
1022
1088
|
}
|
|
1023
|
-
},
|
|
1024
|
-
|
|
1089
|
+
}, v.VALID_SIZES = ["sm", "md"], v.styles = de, v.formAssociated = !0, v);
|
|
1090
|
+
k([
|
|
1025
1091
|
l({ type: String })
|
|
1026
1092
|
], _.prototype, "id", 2);
|
|
1027
|
-
|
|
1093
|
+
k([
|
|
1028
1094
|
l({ type: String, reflect: !0 })
|
|
1029
1095
|
], _.prototype, "name", 2);
|
|
1030
|
-
|
|
1096
|
+
k([
|
|
1031
1097
|
l({ type: Boolean, reflect: !0 })
|
|
1032
1098
|
], _.prototype, "required", 2);
|
|
1033
|
-
|
|
1099
|
+
k([
|
|
1034
1100
|
l({ type: Boolean, reflect: !0 })
|
|
1035
1101
|
], _.prototype, "optional", 2);
|
|
1036
|
-
|
|
1102
|
+
k([
|
|
1037
1103
|
l({ type: Boolean, reflect: !0 })
|
|
1038
1104
|
], _.prototype, "showError", 2);
|
|
1039
|
-
|
|
1105
|
+
k([
|
|
1040
1106
|
l({ type: String })
|
|
1041
1107
|
], _.prototype, "errorMessage", 2);
|
|
1042
|
-
|
|
1108
|
+
k([
|
|
1043
1109
|
l({ type: String })
|
|
1044
1110
|
], _.prototype, "label", 2);
|
|
1045
|
-
|
|
1111
|
+
k([
|
|
1046
1112
|
l({ type: String })
|
|
1047
1113
|
], _.prototype, "description", 2);
|
|
1048
|
-
|
|
1114
|
+
k([
|
|
1049
1115
|
l({ type: Boolean, reflect: !0 })
|
|
1050
1116
|
], _.prototype, "tile", 2);
|
|
1051
|
-
|
|
1117
|
+
k([
|
|
1118
|
+
Ee()
|
|
1119
|
+
], _.prototype, "_slottedDescriptionText", 2);
|
|
1120
|
+
k([
|
|
1052
1121
|
l({ reflect: !0 })
|
|
1053
1122
|
], _.prototype, "size", 1);
|
|
1054
|
-
let
|
|
1055
|
-
customElements.get("nys-checkboxgroup") || customElements.define("nys-checkboxgroup",
|
|
1056
|
-
var
|
|
1057
|
-
for (var o = s > 1 ? void 0 : s ? Ne(e, t) : e, c =
|
|
1058
|
-
(
|
|
1059
|
-
return s && o &&
|
|
1123
|
+
let Re = _;
|
|
1124
|
+
customElements.get("nys-checkboxgroup") || customElements.define("nys-checkboxgroup", Re);
|
|
1125
|
+
var De = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, y = (r, e, t, s) => {
|
|
1126
|
+
for (var o = s > 1 ? void 0 : s ? Ne(e, t) : e, c = r.length - 1, i; c >= 0; c--)
|
|
1127
|
+
(i = r[c]) && (o = (s ? i(e, t, o) : i(o)) || o);
|
|
1128
|
+
return s && o && De(e, t, o), o;
|
|
1060
1129
|
};
|
|
1061
1130
|
let Ve = 0;
|
|
1062
|
-
var
|
|
1063
|
-
const p = (
|
|
1131
|
+
var x;
|
|
1132
|
+
const p = (x = class extends ie {
|
|
1064
1133
|
// allows use of elementInternals' API
|
|
1065
1134
|
constructor() {
|
|
1066
1135
|
super(), this.checked = !1, this.disabled = !1, this.required = !1, this.label = "", this.description = "", this.id = "", this.name = "", this.value = "", this.showError = !1, this.errorMessage = "", this.groupExist = !1, this.tile = !1, this._size = "md", this._internals = this.attachInternals();
|
|
@@ -1069,7 +1138,7 @@ const p = (v = class extends ie {
|
|
|
1069
1138
|
return this._size;
|
|
1070
1139
|
}
|
|
1071
1140
|
set size(e) {
|
|
1072
|
-
this._size =
|
|
1141
|
+
this._size = x.VALID_SIZES.includes(
|
|
1073
1142
|
e
|
|
1074
1143
|
) ? e : "md";
|
|
1075
1144
|
}
|
|
@@ -1142,6 +1211,7 @@ const p = (v = class extends ie {
|
|
|
1142
1211
|
this.dispatchEvent(
|
|
1143
1212
|
new CustomEvent("nys-change", {
|
|
1144
1213
|
detail: {
|
|
1214
|
+
id: this.id,
|
|
1145
1215
|
checked: this.checked,
|
|
1146
1216
|
name: this.name,
|
|
1147
1217
|
value: this.value
|
|
@@ -1177,7 +1247,7 @@ const p = (v = class extends ie {
|
|
|
1177
1247
|
id="${this.id}"
|
|
1178
1248
|
class="nys-checkbox__checkbox"
|
|
1179
1249
|
type="checkbox"
|
|
1180
|
-
name="${
|
|
1250
|
+
name="${Te(this.name ? this.name : void 0)}"
|
|
1181
1251
|
.checked=${this.checked}
|
|
1182
1252
|
?disabled=${this.disabled}
|
|
1183
1253
|
.value=${this.value}
|
|
@@ -1185,6 +1255,7 @@ const p = (v = class extends ie {
|
|
|
1185
1255
|
aria-checked="${this.checked}"
|
|
1186
1256
|
aria-disabled="${this.disabled ? "true" : "false"}"
|
|
1187
1257
|
aria-required="${this.required}"
|
|
1258
|
+
aria-describedby="group-info"
|
|
1188
1259
|
@change="${this._handleChange}"
|
|
1189
1260
|
@focus="${this._handleFocus}"
|
|
1190
1261
|
@blur="${this._handleBlur}"
|
|
@@ -1199,14 +1270,12 @@ const p = (v = class extends ie {
|
|
|
1199
1270
|
</div>
|
|
1200
1271
|
${this.label && S` <div class="nys-checkbox__text">
|
|
1201
1272
|
<div class="nys-checkbox__requiredwrapper">
|
|
1202
|
-
<
|
|
1203
|
-
|
|
1204
|
-
>
|
|
1205
|
-
${this.required ? S`<label class="nys-checkbox__required">*</label>` : ""}
|
|
1273
|
+
<div class="nys-checkbox__label">${this.label}</div>
|
|
1274
|
+
${this.required ? S`<div class="nys-checkbox__required">*</div>` : ""}
|
|
1206
1275
|
</div>
|
|
1207
|
-
<
|
|
1276
|
+
<div class="nys-checkbox__description">
|
|
1208
1277
|
<slot name="description">${this.description}</slot>
|
|
1209
|
-
</
|
|
1278
|
+
</div>
|
|
1210
1279
|
</div>`}
|
|
1211
1280
|
</label>
|
|
1212
1281
|
${((e = this.parentElement) == null ? void 0 : e.tagName.toLowerCase()) !== "nys-checkboxgroup" ? S`<nys-errormessage
|
|
@@ -1217,50 +1286,50 @@ const p = (v = class extends ie {
|
|
|
1217
1286
|
></nys-errormessage>` : ""}
|
|
1218
1287
|
`;
|
|
1219
1288
|
}
|
|
1220
|
-
},
|
|
1221
|
-
|
|
1289
|
+
}, x.VALID_SIZES = ["sm", "md"], x.styles = de, x.formAssociated = !0, x);
|
|
1290
|
+
y([
|
|
1222
1291
|
l({ type: Boolean, reflect: !0 })
|
|
1223
1292
|
], p.prototype, "checked", 2);
|
|
1224
|
-
|
|
1293
|
+
y([
|
|
1225
1294
|
l({ type: Boolean, reflect: !0 })
|
|
1226
1295
|
], p.prototype, "disabled", 2);
|
|
1227
|
-
|
|
1296
|
+
y([
|
|
1228
1297
|
l({ type: Boolean, reflect: !0 })
|
|
1229
1298
|
], p.prototype, "required", 2);
|
|
1230
|
-
|
|
1299
|
+
y([
|
|
1231
1300
|
l({ type: String })
|
|
1232
1301
|
], p.prototype, "label", 2);
|
|
1233
|
-
|
|
1302
|
+
y([
|
|
1234
1303
|
l({ type: String })
|
|
1235
1304
|
], p.prototype, "description", 2);
|
|
1236
|
-
|
|
1305
|
+
y([
|
|
1237
1306
|
l({ type: String })
|
|
1238
1307
|
], p.prototype, "id", 2);
|
|
1239
|
-
|
|
1308
|
+
y([
|
|
1240
1309
|
l({ type: String, reflect: !0 })
|
|
1241
1310
|
], p.prototype, "name", 2);
|
|
1242
|
-
|
|
1311
|
+
y([
|
|
1243
1312
|
l({ type: String })
|
|
1244
1313
|
], p.prototype, "value", 2);
|
|
1245
|
-
|
|
1314
|
+
y([
|
|
1246
1315
|
l({ type: Boolean, reflect: !0 })
|
|
1247
1316
|
], p.prototype, "showError", 2);
|
|
1248
|
-
|
|
1317
|
+
y([
|
|
1249
1318
|
l({ type: String })
|
|
1250
1319
|
], p.prototype, "errorMessage", 2);
|
|
1251
|
-
|
|
1320
|
+
y([
|
|
1252
1321
|
l({ type: Boolean })
|
|
1253
1322
|
], p.prototype, "groupExist", 2);
|
|
1254
|
-
|
|
1323
|
+
y([
|
|
1255
1324
|
l({ type: Boolean, reflect: !0 })
|
|
1256
1325
|
], p.prototype, "tile", 2);
|
|
1257
|
-
|
|
1326
|
+
y([
|
|
1258
1327
|
l({ reflect: !0 })
|
|
1259
1328
|
], p.prototype, "size", 1);
|
|
1260
|
-
let
|
|
1261
|
-
customElements.get("nys-checkbox") || customElements.define("nys-checkbox",
|
|
1329
|
+
let Le = p;
|
|
1330
|
+
customElements.get("nys-checkbox") || customElements.define("nys-checkbox", Le);
|
|
1262
1331
|
export {
|
|
1263
|
-
|
|
1264
|
-
|
|
1332
|
+
Le as NysCheckbox,
|
|
1333
|
+
Re as NysCheckboxgroup
|
|
1265
1334
|
};
|
|
1266
1335
|
//# sourceMappingURL=nys-checkbox.js.map
|