@nysds/components 1.4.5 → 1.5.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/nysds.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { css as g, LitElement as u, html as a } from "lit";
|
|
|
2
2
|
import { property as r, state as O } from "lit/decorators.js";
|
|
3
3
|
import { ifDefined as h } from "lit/directives/if-defined.js";
|
|
4
4
|
/*!
|
|
5
|
-
* New York State Design System (v1.
|
|
5
|
+
* New York State Design System (v1.5.0)
|
|
6
6
|
* Description: A design system for New York State's digital products.
|
|
7
7
|
* Repository: https://github.com/its-hcd/nysds
|
|
8
8
|
* License: MIT
|
|
@@ -660,17 +660,17 @@ const k1 = class k1 extends u {
|
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
662
|
k1.styles = Y1;
|
|
663
|
-
let
|
|
663
|
+
let l1 = k1;
|
|
664
664
|
m1([
|
|
665
665
|
r({ type: String })
|
|
666
|
-
],
|
|
666
|
+
], l1.prototype, "position");
|
|
667
667
|
m1([
|
|
668
668
|
r({ type: Boolean, reflect: !0 })
|
|
669
|
-
],
|
|
669
|
+
], l1.prototype, "visible");
|
|
670
670
|
m1([
|
|
671
671
|
O()
|
|
672
|
-
],
|
|
673
|
-
customElements.get("nys-backtotop") || customElements.define("nys-backtotop",
|
|
672
|
+
], l1.prototype, "isMobile");
|
|
673
|
+
customElements.get("nys-backtotop") || customElements.define("nys-backtotop", l1);
|
|
674
674
|
const K1 = g`
|
|
675
675
|
:host {
|
|
676
676
|
/* Anything that can be overridden should be defined here */
|
|
@@ -1729,7 +1729,7 @@ const A = (j = class extends u {
|
|
|
1729
1729
|
if (Array.from(
|
|
1730
1730
|
this.querySelectorAll("nys-checkbox")
|
|
1731
1731
|
).filter(
|
|
1732
|
-
(
|
|
1732
|
+
(S) => S.checked
|
|
1733
1733
|
).length === 0)
|
|
1734
1734
|
return c;
|
|
1735
1735
|
} else
|
|
@@ -1834,7 +1834,7 @@ T([
|
|
|
1834
1834
|
], A.prototype, "size", 1);
|
|
1835
1835
|
let re = A;
|
|
1836
1836
|
customElements.get("nys-checkboxgroup") || customElements.define("nys-checkboxgroup", re);
|
|
1837
|
-
var ne = Object.defineProperty, ie = Object.getOwnPropertyDescriptor,
|
|
1837
|
+
var ne = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, V = (l, e, t, o) => {
|
|
1838
1838
|
for (var s = o > 1 ? void 0 : o ? ie(e, t) : e, n = l.length - 1, i; n >= 0; n--)
|
|
1839
1839
|
(i = l[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
1840
1840
|
return o && s && ne(e, t, s), s;
|
|
@@ -1999,43 +1999,43 @@ const L = (G = class extends u {
|
|
|
1999
1999
|
`;
|
|
2000
2000
|
}
|
|
2001
2001
|
}, G.VALID_SIZES = ["sm", "md"], G.styles = H1, G.formAssociated = !0, G);
|
|
2002
|
-
|
|
2002
|
+
V([
|
|
2003
2003
|
r({ type: Boolean, reflect: !0 })
|
|
2004
2004
|
], L.prototype, "checked", 2);
|
|
2005
|
-
|
|
2005
|
+
V([
|
|
2006
2006
|
r({ type: Boolean, reflect: !0 })
|
|
2007
2007
|
], L.prototype, "disabled", 2);
|
|
2008
|
-
|
|
2008
|
+
V([
|
|
2009
2009
|
r({ type: Boolean, reflect: !0 })
|
|
2010
2010
|
], L.prototype, "required", 2);
|
|
2011
|
-
|
|
2011
|
+
V([
|
|
2012
2012
|
r({ type: String })
|
|
2013
2013
|
], L.prototype, "label", 2);
|
|
2014
|
-
|
|
2014
|
+
V([
|
|
2015
2015
|
r({ type: String })
|
|
2016
2016
|
], L.prototype, "description", 2);
|
|
2017
|
-
|
|
2017
|
+
V([
|
|
2018
2018
|
r({ type: String })
|
|
2019
2019
|
], L.prototype, "id", 2);
|
|
2020
|
-
|
|
2020
|
+
V([
|
|
2021
2021
|
r({ type: String, reflect: !0 })
|
|
2022
2022
|
], L.prototype, "name", 2);
|
|
2023
|
-
|
|
2023
|
+
V([
|
|
2024
2024
|
r({ type: String })
|
|
2025
2025
|
], L.prototype, "value", 2);
|
|
2026
|
-
|
|
2026
|
+
V([
|
|
2027
2027
|
r({ type: Boolean, reflect: !0 })
|
|
2028
2028
|
], L.prototype, "showError", 2);
|
|
2029
|
-
|
|
2029
|
+
V([
|
|
2030
2030
|
r({ type: String })
|
|
2031
2031
|
], L.prototype, "errorMessage", 2);
|
|
2032
|
-
|
|
2032
|
+
V([
|
|
2033
2033
|
r({ type: Boolean })
|
|
2034
2034
|
], L.prototype, "groupExist", 2);
|
|
2035
|
-
|
|
2035
|
+
V([
|
|
2036
2036
|
r({ type: Boolean, reflect: !0 })
|
|
2037
2037
|
], L.prototype, "tile", 2);
|
|
2038
|
-
|
|
2038
|
+
V([
|
|
2039
2039
|
r({ reflect: !0 })
|
|
2040
2040
|
], L.prototype, "size", 1);
|
|
2041
2041
|
let le = L;
|
|
@@ -2111,17 +2111,17 @@ const f1 = class f1 extends u {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
};
|
|
2113
2113
|
f1.styles = ce, f1.formAssociated = !0;
|
|
2114
|
-
let
|
|
2114
|
+
let c1 = f1;
|
|
2115
2115
|
x1([
|
|
2116
2116
|
r({ type: Boolean })
|
|
2117
|
-
],
|
|
2117
|
+
], c1.prototype, "showError");
|
|
2118
2118
|
x1([
|
|
2119
2119
|
r({ type: String })
|
|
2120
|
-
],
|
|
2120
|
+
], c1.prototype, "errorMessage");
|
|
2121
2121
|
x1([
|
|
2122
2122
|
r({ type: Boolean, reflect: !0 })
|
|
2123
|
-
],
|
|
2124
|
-
customElements.get("nys-errormessage") || customElements.define("nys-errormessage",
|
|
2123
|
+
], c1.prototype, "showDivider");
|
|
2124
|
+
customElements.get("nys-errormessage") || customElements.define("nys-errormessage", c1);
|
|
2125
2125
|
async function he(l, e) {
|
|
2126
2126
|
if (!e || e.trim() === "") return !0;
|
|
2127
2127
|
const t = e.toLowerCase().split(",").map((n) => n.trim()), o = l.name.toLowerCase(), s = o.includes(".") ? o.split(".").pop() : "";
|
|
@@ -2465,21 +2465,21 @@ const L1 = class L1 extends u {
|
|
|
2465
2465
|
}
|
|
2466
2466
|
};
|
|
2467
2467
|
L1.styles = ue;
|
|
2468
|
-
let
|
|
2468
|
+
let o1 = L1;
|
|
2469
2469
|
v1([
|
|
2470
2470
|
r({ type: String })
|
|
2471
|
-
],
|
|
2471
|
+
], o1.prototype, "filename");
|
|
2472
2472
|
v1([
|
|
2473
2473
|
r({ type: String })
|
|
2474
|
-
],
|
|
2474
|
+
], o1.prototype, "status");
|
|
2475
2475
|
v1([
|
|
2476
2476
|
r({ type: Number })
|
|
2477
|
-
],
|
|
2477
|
+
], o1.prototype, "progress");
|
|
2478
2478
|
v1([
|
|
2479
2479
|
r({ type: String })
|
|
2480
|
-
],
|
|
2481
|
-
customElements.define("nys-fileitem",
|
|
2482
|
-
var ge = Object.defineProperty,
|
|
2480
|
+
], o1.prototype, "errorMessage");
|
|
2481
|
+
customElements.define("nys-fileitem", o1);
|
|
2482
|
+
var ge = Object.defineProperty, M = (l, e, t, o) => {
|
|
2483
2483
|
for (var s = void 0, n = l.length - 1, i; n >= 0; n--)
|
|
2484
2484
|
(i = l[n]) && (s = i(e, t, s) || s);
|
|
2485
2485
|
return s && ge(e, t, s), s;
|
|
@@ -2779,43 +2779,43 @@ const C1 = class C1 extends u {
|
|
|
2779
2779
|
};
|
|
2780
2780
|
C1.styles = ye, C1.formAssociated = !0;
|
|
2781
2781
|
let x = C1;
|
|
2782
|
-
|
|
2782
|
+
M([
|
|
2783
2783
|
r({ type: String })
|
|
2784
2784
|
], x.prototype, "id");
|
|
2785
|
-
|
|
2785
|
+
M([
|
|
2786
2786
|
r({ type: String, reflect: !0 })
|
|
2787
2787
|
], x.prototype, "name");
|
|
2788
|
-
|
|
2788
|
+
M([
|
|
2789
2789
|
r({ type: String })
|
|
2790
2790
|
], x.prototype, "label");
|
|
2791
|
-
|
|
2791
|
+
M([
|
|
2792
2792
|
r({ type: String })
|
|
2793
2793
|
], x.prototype, "description");
|
|
2794
|
-
|
|
2794
|
+
M([
|
|
2795
2795
|
r({ type: Boolean })
|
|
2796
2796
|
], x.prototype, "multiple");
|
|
2797
|
-
|
|
2797
|
+
M([
|
|
2798
2798
|
r({ type: String })
|
|
2799
2799
|
], x.prototype, "accept");
|
|
2800
|
-
|
|
2800
|
+
M([
|
|
2801
2801
|
r({ type: Boolean, reflect: !0 })
|
|
2802
2802
|
], x.prototype, "disabled");
|
|
2803
|
-
|
|
2803
|
+
M([
|
|
2804
2804
|
r({ type: Boolean, reflect: !0 })
|
|
2805
2805
|
], x.prototype, "required");
|
|
2806
|
-
|
|
2806
|
+
M([
|
|
2807
2807
|
r({ type: Boolean, reflect: !0 })
|
|
2808
2808
|
], x.prototype, "optional");
|
|
2809
|
-
|
|
2809
|
+
M([
|
|
2810
2810
|
r({ type: Boolean, reflect: !0 })
|
|
2811
2811
|
], x.prototype, "showError");
|
|
2812
|
-
|
|
2812
|
+
M([
|
|
2813
2813
|
r({ type: String })
|
|
2814
2814
|
], x.prototype, "errorMessage");
|
|
2815
|
-
|
|
2815
|
+
M([
|
|
2816
2816
|
r({ type: Boolean })
|
|
2817
2817
|
], x.prototype, "dropzone");
|
|
2818
|
-
|
|
2818
|
+
M([
|
|
2819
2819
|
r({ type: String, reflect: !0 })
|
|
2820
2820
|
], x.prototype, "width");
|
|
2821
2821
|
customElements.get("nys-fileinput") || customElements.define("nys-fileinput", x);
|
|
@@ -3452,14 +3452,14 @@ const Ce = {
|
|
|
3452
3452
|
transform: scale(-1, -1);
|
|
3453
3453
|
}
|
|
3454
3454
|
`;
|
|
3455
|
-
var be = Object.defineProperty, _e = Object.getOwnPropertyDescriptor,
|
|
3455
|
+
var be = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, h1 = (l, e, t, o) => {
|
|
3456
3456
|
for (var s = o > 1 ? void 0 : o ? _e(e, t) : e, n = l.length - 1, i; n >= 0; n--)
|
|
3457
3457
|
(i = l[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
3458
3458
|
return o && s && be(e, t, s), s;
|
|
3459
3459
|
}, t1;
|
|
3460
|
-
const
|
|
3460
|
+
const n1 = (t1 = class extends u {
|
|
3461
3461
|
constructor() {
|
|
3462
|
-
super(...arguments), this.name = "", this.
|
|
3462
|
+
super(...arguments), this.name = "", this.ariaLabel = "", this.rotate = "0", this.flip = "", this.color = "", this._size = "sm";
|
|
3463
3463
|
}
|
|
3464
3464
|
get size() {
|
|
3465
3465
|
return this._size;
|
|
@@ -3473,7 +3473,7 @@ const o1 = (t1 = class extends u {
|
|
|
3473
3473
|
const e = Ce[this.name];
|
|
3474
3474
|
if (!e) return null;
|
|
3475
3475
|
const s = new DOMParser().parseFromString(e, "image/svg+xml").documentElement;
|
|
3476
|
-
return s instanceof SVGElement ? (s.setAttribute("role", "img"), this.
|
|
3476
|
+
return s instanceof SVGElement ? (s.setAttribute("role", "img"), this.ariaLabel ? (s.setAttribute("aria-label", this.ariaLabel), s.removeAttribute("aria-hidden")) : (s.setAttribute("aria-hidden", "true"), s.removeAttribute("aria-label")), s.style.rotate = `${this.rotate}deg`, s.style.color = this.color || "currentcolor", s.classList.add(`nys-icon--${this.size}`), s.classList.add("nys-icon--svg"), this.flip && s.classList.add(`nys-icon--flip-${this.flip}`), s) : null;
|
|
3477
3477
|
}
|
|
3478
3478
|
render() {
|
|
3479
3479
|
const e = this.getIcon();
|
|
@@ -3497,28 +3497,25 @@ const o1 = (t1 = class extends u {
|
|
|
3497
3497
|
"48",
|
|
3498
3498
|
"64"
|
|
3499
3499
|
], t1);
|
|
3500
|
-
|
|
3500
|
+
h1([
|
|
3501
3501
|
r({ type: String, reflect: !0 })
|
|
3502
|
-
],
|
|
3503
|
-
|
|
3502
|
+
], n1.prototype, "name", 2);
|
|
3503
|
+
h1([
|
|
3504
3504
|
r({ type: String })
|
|
3505
|
-
],
|
|
3506
|
-
|
|
3505
|
+
], n1.prototype, "ariaLabel", 2);
|
|
3506
|
+
h1([
|
|
3507
3507
|
r({ type: String })
|
|
3508
|
-
],
|
|
3509
|
-
|
|
3508
|
+
], n1.prototype, "rotate", 2);
|
|
3509
|
+
h1([
|
|
3510
3510
|
r({ type: String })
|
|
3511
|
-
],
|
|
3512
|
-
|
|
3511
|
+
], n1.prototype, "flip", 2);
|
|
3512
|
+
h1([
|
|
3513
3513
|
r({ type: String })
|
|
3514
|
-
],
|
|
3515
|
-
|
|
3516
|
-
r({ type: String })
|
|
3517
|
-
], o1.prototype, "color", 2);
|
|
3518
|
-
i1([
|
|
3514
|
+
], n1.prototype, "color", 2);
|
|
3515
|
+
h1([
|
|
3519
3516
|
r({ reflect: !0 })
|
|
3520
|
-
],
|
|
3521
|
-
let me =
|
|
3517
|
+
], n1.prototype, "size", 1);
|
|
3518
|
+
let me = n1;
|
|
3522
3519
|
customElements.get("nys-icon") || customElements.define("nys-icon", me);
|
|
3523
3520
|
const xe = g`
|
|
3524
3521
|
:host {
|
|
@@ -3599,7 +3596,7 @@ var we = Object.defineProperty, b1 = (l, e, t, o) => {
|
|
|
3599
3596
|
(i = l[n]) && (s = i(e, t, s) || s);
|
|
3600
3597
|
return s && we(e, t, s), s;
|
|
3601
3598
|
};
|
|
3602
|
-
const
|
|
3599
|
+
const $1 = class $1 extends u {
|
|
3603
3600
|
constructor() {
|
|
3604
3601
|
super(...arguments), this.id = "", this.label = "", this.description = "", this.flag = "";
|
|
3605
3602
|
}
|
|
@@ -3618,21 +3615,21 @@ const S1 = class S1 extends u {
|
|
|
3618
3615
|
`;
|
|
3619
3616
|
}
|
|
3620
3617
|
};
|
|
3621
|
-
|
|
3622
|
-
let
|
|
3618
|
+
$1.styles = xe;
|
|
3619
|
+
let r1 = $1;
|
|
3623
3620
|
b1([
|
|
3624
3621
|
r({ type: String })
|
|
3625
|
-
],
|
|
3622
|
+
], r1.prototype, "id");
|
|
3626
3623
|
b1([
|
|
3627
3624
|
r({ type: String })
|
|
3628
|
-
],
|
|
3625
|
+
], r1.prototype, "label");
|
|
3629
3626
|
b1([
|
|
3630
3627
|
r({ type: String })
|
|
3631
|
-
],
|
|
3628
|
+
], r1.prototype, "description");
|
|
3632
3629
|
b1([
|
|
3633
3630
|
r({ type: String })
|
|
3634
|
-
],
|
|
3635
|
-
customElements.get("nys-label") || customElements.define("nys-label",
|
|
3631
|
+
], r1.prototype, "flag");
|
|
3632
|
+
customElements.get("nys-label") || customElements.define("nys-label", r1);
|
|
3636
3633
|
const Z1 = g`
|
|
3637
3634
|
:host {
|
|
3638
3635
|
/* Global Radiobutton Styles */
|
|
@@ -3991,7 +3988,7 @@ var ke = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, B = (l, e,
|
|
|
3991
3988
|
(i = l[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
3992
3989
|
return o && s && ke(e, t, s), s;
|
|
3993
3990
|
};
|
|
3994
|
-
let
|
|
3991
|
+
let $e = 0;
|
|
3995
3992
|
var Y;
|
|
3996
3993
|
const E = (Y = class extends u {
|
|
3997
3994
|
// allows use of elementInternals' API
|
|
@@ -4008,7 +4005,7 @@ const E = (Y = class extends u {
|
|
|
4008
4005
|
}
|
|
4009
4006
|
// Generate a unique ID if one is not provided
|
|
4010
4007
|
connectedCallback() {
|
|
4011
|
-
super.connectedCallback(), this.id || (this.id = `nys-radiogroup-${Date.now()}-${
|
|
4008
|
+
super.connectedCallback(), this.id || (this.id = `nys-radiogroup-${Date.now()}-${$e++}`), this.addEventListener("nys-change", this._handleRadioButtonChange), this.addEventListener("invalid", this._handleInvalid);
|
|
4012
4009
|
}
|
|
4013
4010
|
disconnectedCallback() {
|
|
4014
4011
|
super.disconnectedCallback(), this.removeEventListener("nys-change", this._handleRadioButtonChange), this.removeEventListener("invalid", this._handleInvalid);
|
|
@@ -4145,14 +4142,14 @@ B([
|
|
|
4145
4142
|
B([
|
|
4146
4143
|
r({ type: Boolean, reflect: !0 })
|
|
4147
4144
|
], E.prototype, "tile", 2);
|
|
4148
|
-
let
|
|
4149
|
-
customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup",
|
|
4150
|
-
var De = Object.defineProperty,
|
|
4151
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
4145
|
+
let Se = E;
|
|
4146
|
+
customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", Se);
|
|
4147
|
+
var De = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, F = (l, e, t, o) => {
|
|
4148
|
+
for (var s = o > 1 ? void 0 : o ? Ve(e, t) : e, n = l.length - 1, i; n >= 0; n--)
|
|
4152
4149
|
(i = l[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
4153
4150
|
return o && s && De(e, t, s), s;
|
|
4154
4151
|
};
|
|
4155
|
-
let
|
|
4152
|
+
let Me = 0;
|
|
4156
4153
|
var y;
|
|
4157
4154
|
const q = (y = class extends u {
|
|
4158
4155
|
constructor() {
|
|
@@ -4177,7 +4174,7 @@ const q = (y = class extends u {
|
|
|
4177
4174
|
/********************** Lifecycle updates **********************/
|
|
4178
4175
|
// Generate a unique ID if one is not provided
|
|
4179
4176
|
connectedCallback() {
|
|
4180
|
-
super.connectedCallback(), this.id || (this.id = `nys-radiobutton-${Date.now()}-${
|
|
4177
|
+
super.connectedCallback(), this.id || (this.id = `nys-radiobutton-${Date.now()}-${Me++}`), this.checked && (y.buttonGroup[this.name] && (y.buttonGroup[this.name].checked = !1, y.buttonGroup[this.name].requestUpdate()), y.buttonGroup[this.name] = this);
|
|
4181
4178
|
}
|
|
4182
4179
|
updated(e) {
|
|
4183
4180
|
e.has("checked") && this.checked && y.buttonGroup[this.name] !== this && (y.buttonGroup[this.name] && (y.buttonGroup[this.name].checked = !1, y.buttonGroup[this.name].requestUpdate()), y.buttonGroup[this.name] = this);
|
|
@@ -4438,7 +4435,7 @@ var He = Object.defineProperty, p1 = (l, e, t, o) => {
|
|
|
4438
4435
|
(i = l[n]) && (s = i(e, t, s) || s);
|
|
4439
4436
|
return s && He(e, t, s), s;
|
|
4440
4437
|
};
|
|
4441
|
-
class
|
|
4438
|
+
class i1 extends u {
|
|
4442
4439
|
constructor() {
|
|
4443
4440
|
super(...arguments), this.disabled = !1, this.selected = !1, this.value = "", this.label = "", this.hidden = !1;
|
|
4444
4441
|
}
|
|
@@ -4467,20 +4464,20 @@ class a1 extends u {
|
|
|
4467
4464
|
}
|
|
4468
4465
|
p1([
|
|
4469
4466
|
r({ type: Boolean, reflect: !0 })
|
|
4470
|
-
],
|
|
4467
|
+
], i1.prototype, "disabled");
|
|
4471
4468
|
p1([
|
|
4472
4469
|
r({ type: Boolean, reflect: !0 })
|
|
4473
|
-
],
|
|
4470
|
+
], i1.prototype, "selected");
|
|
4474
4471
|
p1([
|
|
4475
4472
|
r({ type: String })
|
|
4476
|
-
],
|
|
4473
|
+
], i1.prototype, "value");
|
|
4477
4474
|
p1([
|
|
4478
4475
|
r({ type: String })
|
|
4479
|
-
],
|
|
4476
|
+
], i1.prototype, "label");
|
|
4480
4477
|
p1([
|
|
4481
4478
|
r({ type: Boolean, reflect: !0 })
|
|
4482
|
-
],
|
|
4483
|
-
customElements.define("nys-option",
|
|
4479
|
+
], i1.prototype, "hidden");
|
|
4480
|
+
customElements.define("nys-option", i1);
|
|
4484
4481
|
var Ze = Object.defineProperty, Ie = Object.getOwnPropertyDescriptor, H = (l, e, t, o) => {
|
|
4485
4482
|
for (var s = o > 1 ? void 0 : o ? Ie(e, t) : e, n = l.length - 1, i; n >= 0; n--)
|
|
4486
4483
|
(i = l[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
@@ -4523,7 +4520,7 @@ const z = (W = class extends u {
|
|
|
4523
4520
|
if (!e || !t) return;
|
|
4524
4521
|
t.querySelectorAll("option:not([hidden])").forEach((i) => i.remove()), e.assignedElements({ flatten: !0 }).forEach((i) => {
|
|
4525
4522
|
var c;
|
|
4526
|
-
if (i instanceof
|
|
4523
|
+
if (i instanceof i1) {
|
|
4527
4524
|
const d = document.createElement("option");
|
|
4528
4525
|
d.value = i.value, d.textContent = i.label || ((c = i.textContent) == null ? void 0 : c.trim()) || "", d.disabled = i.disabled, d.selected = i.selected, t.appendChild(d);
|
|
4529
4526
|
}
|
|
@@ -4763,7 +4760,7 @@ var Ue = Object.defineProperty, I1 = (l, e, t, o) => {
|
|
|
4763
4760
|
(i = l[n]) && (s = i(e, t, s) || s);
|
|
4764
4761
|
return s && Ue(e, t, s), s;
|
|
4765
4762
|
};
|
|
4766
|
-
const
|
|
4763
|
+
const S1 = class S1 extends u {
|
|
4767
4764
|
constructor() {
|
|
4768
4765
|
super(), this.id = "", this.href = "";
|
|
4769
4766
|
}
|
|
@@ -4804,8 +4801,8 @@ const $1 = class $1 extends u {
|
|
|
4804
4801
|
`;
|
|
4805
4802
|
}
|
|
4806
4803
|
};
|
|
4807
|
-
|
|
4808
|
-
let u1 =
|
|
4804
|
+
S1.styles = qe;
|
|
4805
|
+
let u1 = S1;
|
|
4809
4806
|
I1([
|
|
4810
4807
|
r({ type: String })
|
|
4811
4808
|
], u1.prototype, "id");
|
|
@@ -6290,7 +6287,7 @@ const D1 = class D1 extends u {
|
|
|
6290
6287
|
updated(e) {
|
|
6291
6288
|
super.updated(e);
|
|
6292
6289
|
const t = this._firstAssignedEl;
|
|
6293
|
-
t && e.has("text") && this.
|
|
6290
|
+
t && e.has("text") && this._passAria(t);
|
|
6294
6291
|
}
|
|
6295
6292
|
// Listen to window scroll so a focus tooltip can auto position even when user move across the page
|
|
6296
6293
|
_addScrollListeners() {
|
|
@@ -6300,9 +6297,15 @@ const D1 = class D1 extends u {
|
|
|
6300
6297
|
window.removeEventListener("scroll", this._handleScrollOrResize, !0), window.removeEventListener("resize", this._handleScrollOrResize);
|
|
6301
6298
|
}
|
|
6302
6299
|
/******************** Functions ********************/
|
|
6303
|
-
// We need to pass `ariaDescription` to the nys-components so they can announce both their label and the tooltip's text
|
|
6304
|
-
|
|
6305
|
-
e.tagName.toLowerCase()
|
|
6300
|
+
// We need to pass `ariaLabel` or `ariaDescription` to the nys-components so they can announce both their label and the tooltip's text
|
|
6301
|
+
_passAria(e) {
|
|
6302
|
+
const t = e.tagName.toLowerCase();
|
|
6303
|
+
if (t.startsWith("nys-"))
|
|
6304
|
+
if (t === "nys-icon") {
|
|
6305
|
+
const o = e.getAttribute("ariaLabel") || "", s = o ? `${o}, ${this.text}` : this.text;
|
|
6306
|
+
e.setAttribute("ariaLabel", s);
|
|
6307
|
+
} else
|
|
6308
|
+
e.setAttribute("ariaDescription", this.text);
|
|
6306
6309
|
}
|
|
6307
6310
|
async _applyFocusBehavior(e) {
|
|
6308
6311
|
var o;
|
|
@@ -6316,8 +6319,8 @@ const D1 = class D1 extends u {
|
|
|
6316
6319
|
}
|
|
6317
6320
|
// Checks if user's set position fit with current viewport (Does not account for overflow texts at this moment)
|
|
6318
6321
|
_doesPositionFit(e) {
|
|
6319
|
-
var S
|
|
6320
|
-
const t = (
|
|
6322
|
+
var $, S;
|
|
6323
|
+
const t = ($ = this.shadowRoot) == null ? void 0 : $.querySelector(".nys-tooltip__wrapper"), o = (S = this.shadowRoot) == null ? void 0 : S.querySelector(".nys-tooltip__content");
|
|
6321
6324
|
if (!t || !o || e == null) return;
|
|
6322
6325
|
const s = t.getBoundingClientRect(), n = o.getBoundingClientRect(), i = 8, c = {
|
|
6323
6326
|
top: s.top - i,
|
|
@@ -6334,10 +6337,10 @@ const D1 = class D1 extends u {
|
|
|
6334
6337
|
}
|
|
6335
6338
|
// Calculates the best placement based on available space (flips placement if it doesn't fit)
|
|
6336
6339
|
async autoPositionTooltip() {
|
|
6337
|
-
var S
|
|
6338
|
-
const e = (
|
|
6340
|
+
var $, S;
|
|
6341
|
+
const e = ($ = this.shadowRoot) == null ? void 0 : $.querySelector(
|
|
6339
6342
|
".nys-tooltip__wrapper"
|
|
6340
|
-
), t = (
|
|
6343
|
+
), t = (S = this.shadowRoot) == null ? void 0 : S.querySelector(
|
|
6341
6344
|
".nys-tooltip__content"
|
|
6342
6345
|
);
|
|
6343
6346
|
if (!e || !t) return;
|
|
@@ -6378,8 +6381,8 @@ const D1 = class D1 extends u {
|
|
|
6378
6381
|
".nys-tooltip__wrapper"
|
|
6379
6382
|
)).getBoundingClientRect(), s = e.getBoundingClientRect(), n = o.left + o.width / 2, i = s.left < 0, c = s.right > window.innerWidth;
|
|
6380
6383
|
this._resetTooltipPositioningStyles(e), i ? (e.style.left = "0px", e.style.transform = "none") : c && (e.style.right = "0px", e.style.left = "auto", e.style.transform = "none");
|
|
6381
|
-
const d = e.getBoundingClientRect(),
|
|
6382
|
-
e.style.setProperty("--arrow-offset-x", `${
|
|
6384
|
+
const d = e.getBoundingClientRect(), $ = (n - d.left) / d.width, S = Math.max(0, Math.min(1, $)) * 100;
|
|
6385
|
+
e.style.setProperty("--arrow-offset-x", `${S}%`);
|
|
6383
6386
|
}
|
|
6384
6387
|
// Reposition tooltip back to original set position (e.g. top, left, bottom, right) to avoid positioning issue base on last position
|
|
6385
6388
|
_resetTooltipPositioningStyles(e) {
|
|
@@ -6799,12 +6802,12 @@ const nt = g`
|
|
|
6799
6802
|
<path d="M67.6348 51.8019C67.6348 51.8019 67.6173 51.782 67.6173 51.7303C67.6173 51.6787 67.6348 51.6588 67.6348 51.6588H68.5564C68.5564 51.6588 68.5749 51.6806 68.5749 51.7303C68.5749 51.78 68.5564 51.8019 68.5564 51.8019H68.1932V52.9205C68.1932 52.9205 68.1659 52.9404 68.0976 52.9404C68.0292 52.9404 67.998 52.9205 67.998 52.9205V51.8019H67.6348Z" fill="#154973"/>
|
|
6800
6803
|
<path d="M69.4282 52.8659C69.4135 52.8748 69.3891 52.8858 69.3471 52.8858C69.3178 52.8858 69.2837 52.8798 69.27 52.8659L68.9889 52.1476C68.9723 52.1088 68.9459 52.0323 68.944 52.0214C68.944 52.0264 68.9371 52.1277 68.9332 52.1565L68.8815 52.9205C68.8815 52.9205 68.8561 52.9404 68.7858 52.9404C68.7155 52.9404 68.6862 52.9205 68.6862 52.9205L68.7839 51.6787C68.7839 51.6787 68.8112 51.6588 68.8776 51.6588C68.9518 51.6588 68.9781 51.6787 68.9781 51.6787L69.3042 52.5162L69.3471 52.6533C69.3481 52.6473 69.3774 52.5559 69.392 52.5162L69.7181 51.6787C69.7181 51.6787 69.7464 51.6588 69.8206 51.6588C69.886 51.6588 69.9124 51.6787 69.9124 51.6787L70.01 52.9205C70.01 52.9205 69.9807 52.9404 69.9104 52.9404C69.8401 52.9404 69.8167 52.9205 69.8167 52.9205L69.763 52.1546L69.7523 52.0194C69.7523 52.0194 69.722 52.1148 69.7093 52.1456L69.4282 52.8659Z" fill="#154973"/>
|
|
6801
6804
|
</svg>`;
|
|
6802
|
-
var at = Object.defineProperty,
|
|
6805
|
+
var at = Object.defineProperty, a1 = (l, e, t, o) => {
|
|
6803
6806
|
for (var s = void 0, n = l.length - 1, i; n >= 0; n--)
|
|
6804
6807
|
(i = l[n]) && (s = i(e, t, s) || s);
|
|
6805
6808
|
return s && at(e, t, s), s;
|
|
6806
6809
|
};
|
|
6807
|
-
const
|
|
6810
|
+
const V1 = class V1 extends u {
|
|
6808
6811
|
constructor() {
|
|
6809
6812
|
super(...arguments), this.trustbarVisible = !1, this.searchDropdownVisible = !1, this.languageVisible = !1, this.isSearchFocused = !1, this.hideTranslate = !1, this.hideSearch = !1, this.languages = [
|
|
6810
6813
|
["English", ""],
|
|
@@ -6882,6 +6885,7 @@ const M1 = class M1 extends u {
|
|
|
6882
6885
|
<nys-button
|
|
6883
6886
|
id="nys-unavheader__know"
|
|
6884
6887
|
label="Here's how you know"
|
|
6888
|
+
ariaLabel=${this.trustbarVisible ? "Here's how you know expanded" : "Here's how you know collapsed"}
|
|
6885
6889
|
variant="ghost"
|
|
6886
6890
|
size="sm"
|
|
6887
6891
|
suffixIcon="slotted"
|
|
@@ -6923,7 +6927,7 @@ const M1 = class M1 extends u {
|
|
|
6923
6927
|
circle
|
|
6924
6928
|
icon="close"
|
|
6925
6929
|
size="sm"
|
|
6926
|
-
ariaLabel="Close
|
|
6930
|
+
ariaLabel="Close this notice"
|
|
6927
6931
|
.onClick="${() => this._toggleTrustbar()}"
|
|
6928
6932
|
></nys-button>
|
|
6929
6933
|
</div>
|
|
@@ -6934,7 +6938,7 @@ const M1 = class M1 extends u {
|
|
|
6934
6938
|
<a
|
|
6935
6939
|
href="https://www.ny.gov"
|
|
6936
6940
|
id="nys-unavheader__logolink"
|
|
6937
|
-
aria-label="
|
|
6941
|
+
aria-label="Visit the NY.gov homepage"
|
|
6938
6942
|
>
|
|
6939
6943
|
<div class="nys-unavheader__logo">${this._getNysLogo()}</div></a
|
|
6940
6944
|
>
|
|
@@ -6948,6 +6952,7 @@ const M1 = class M1 extends u {
|
|
|
6948
6952
|
<nys-button
|
|
6949
6953
|
id="nys-unavheader__know"
|
|
6950
6954
|
label="Here's how you know"
|
|
6955
|
+
ariaLabel=${this.trustbarVisible ? "Here's how you know expanded" : "Here's how you know collapsed"}
|
|
6951
6956
|
variant="ghost"
|
|
6952
6957
|
size="sm"
|
|
6953
6958
|
suffixIcon="slotted"
|
|
@@ -6971,7 +6976,7 @@ const M1 = class M1 extends u {
|
|
|
6971
6976
|
variant="ghost"
|
|
6972
6977
|
circle
|
|
6973
6978
|
icon="slotted"
|
|
6974
|
-
ariaLabel
|
|
6979
|
+
ariaLabel=${this.languageVisible ? "Translate expanded" : "Translate collapsed"}
|
|
6975
6980
|
id="nys-unavheader__translate"
|
|
6976
6981
|
class="nys-unavheader__iconbutton"
|
|
6977
6982
|
.onClick="${() => this._toggleLanguageList()}"
|
|
@@ -6989,7 +6994,7 @@ const M1 = class M1 extends u {
|
|
|
6989
6994
|
label="Translate"
|
|
6990
6995
|
prefixIcon="language_filled"
|
|
6991
6996
|
suffixIcon=${this.languageVisible ? "chevron_up" : "chevron_down"}
|
|
6992
|
-
ariaLabel
|
|
6997
|
+
ariaLabel=${this.languageVisible ? "Translate expanded" : "Translate collapsed"}
|
|
6993
6998
|
id="nys-unavheader__translate"
|
|
6994
6999
|
.onClick="${() => this._toggleLanguageList()}"
|
|
6995
7000
|
></nys-button>
|
|
@@ -7014,7 +7019,7 @@ const M1 = class M1 extends u {
|
|
|
7014
7019
|
variant="ghost"
|
|
7015
7020
|
circle
|
|
7016
7021
|
icon="search"
|
|
7017
|
-
ariaLabel
|
|
7022
|
+
ariaLabel=${this.searchDropdownVisible ? "Search expanded" : "Search collapsed"}
|
|
7018
7023
|
id="nys-unavheader__searchbutton"
|
|
7019
7024
|
class="nys-unavheader__iconbutton"
|
|
7020
7025
|
.onClick="${() => this._toggleSearchDropdown()}"
|
|
@@ -7040,7 +7045,7 @@ const M1 = class M1 extends u {
|
|
|
7040
7045
|
slot="endButton"
|
|
7041
7046
|
type="submit"
|
|
7042
7047
|
prefixIcon="search"
|
|
7043
|
-
ariaLabel="Search"
|
|
7048
|
+
ariaLabel="Search Button"
|
|
7044
7049
|
.onClick="${() => this._handleSearchButton(
|
|
7045
7050
|
"nys-unavheader__searchbar"
|
|
7046
7051
|
)}"
|
|
@@ -7067,7 +7072,7 @@ const M1 = class M1 extends u {
|
|
|
7067
7072
|
slot="endButton"
|
|
7068
7073
|
type="submit"
|
|
7069
7074
|
prefixIcon="search"
|
|
7070
|
-
ariaLabel="Search"
|
|
7075
|
+
ariaLabel="Search Button"
|
|
7071
7076
|
.onClick="${() => this._handleSearchButton(
|
|
7072
7077
|
"nys-unavheader__searchbardropdown"
|
|
7073
7078
|
)}"
|
|
@@ -7079,27 +7084,27 @@ const M1 = class M1 extends u {
|
|
|
7079
7084
|
`;
|
|
7080
7085
|
}
|
|
7081
7086
|
};
|
|
7082
|
-
|
|
7083
|
-
let P =
|
|
7084
|
-
|
|
7087
|
+
V1.styles = nt;
|
|
7088
|
+
let P = V1;
|
|
7089
|
+
a1([
|
|
7085
7090
|
r({ type: Boolean })
|
|
7086
7091
|
], P.prototype, "trustbarVisible");
|
|
7087
|
-
|
|
7092
|
+
a1([
|
|
7088
7093
|
r({ type: Boolean })
|
|
7089
7094
|
], P.prototype, "searchDropdownVisible");
|
|
7090
|
-
|
|
7095
|
+
a1([
|
|
7091
7096
|
r({ type: Boolean })
|
|
7092
7097
|
], P.prototype, "languageVisible");
|
|
7093
|
-
|
|
7098
|
+
a1([
|
|
7094
7099
|
r({ type: Boolean })
|
|
7095
7100
|
], P.prototype, "isSearchFocused");
|
|
7096
|
-
|
|
7101
|
+
a1([
|
|
7097
7102
|
r({ type: Boolean })
|
|
7098
7103
|
], P.prototype, "hideTranslate");
|
|
7099
|
-
|
|
7104
|
+
a1([
|
|
7100
7105
|
r({ type: Boolean })
|
|
7101
7106
|
], P.prototype, "hideSearch");
|
|
7102
|
-
|
|
7107
|
+
a1([
|
|
7103
7108
|
r({ type: String, reflect: !0 })
|
|
7104
7109
|
], P.prototype, "languages");
|
|
7105
7110
|
customElements.get("nys-unavheader") || customElements.define("nys-unavheader", P);
|
|
@@ -7389,7 +7394,7 @@ var ct = Object.defineProperty, g1 = (l, e, t, o) => {
|
|
|
7389
7394
|
(i = l[n]) && (s = i(e, t, s) || s);
|
|
7390
7395
|
return s && ct(e, t, s), s;
|
|
7391
7396
|
};
|
|
7392
|
-
const
|
|
7397
|
+
const M1 = class M1 extends u {
|
|
7393
7398
|
constructor() {
|
|
7394
7399
|
super(...arguments), this.appName = "", this.agencyName = "", this.homepageLink = "", this.slotHasContent = !0, this.isMobileMenuOpen = !1;
|
|
7395
7400
|
}
|
|
@@ -7414,10 +7419,10 @@ const V1 = class V1 extends u {
|
|
|
7414
7419
|
);
|
|
7415
7420
|
o && s && (o.innerHTML = "", s.innerHTML = "", t.forEach((d) => {
|
|
7416
7421
|
if (d.nodeType === Node.ELEMENT_NODE) {
|
|
7417
|
-
const
|
|
7422
|
+
const $ = d.cloneNode(!0), S = d.cloneNode(!0);
|
|
7418
7423
|
["script", "iframe", "object", "embed, img"].forEach((A1) => {
|
|
7419
|
-
|
|
7420
|
-
}), o.appendChild(
|
|
7424
|
+
$.querySelectorAll(A1).forEach((B1) => B1.remove());
|
|
7425
|
+
}), o.appendChild($), s.appendChild(S), d.remove();
|
|
7421
7426
|
}
|
|
7422
7427
|
}));
|
|
7423
7428
|
}
|
|
@@ -7488,8 +7493,8 @@ const V1 = class V1 extends u {
|
|
|
7488
7493
|
`;
|
|
7489
7494
|
}
|
|
7490
7495
|
};
|
|
7491
|
-
|
|
7492
|
-
let s1 =
|
|
7496
|
+
M1.styles = lt;
|
|
7497
|
+
let s1 = M1;
|
|
7493
7498
|
g1([
|
|
7494
7499
|
r({ type: String })
|
|
7495
7500
|
], s1.prototype, "appName");
|
|
@@ -7693,8 +7698,8 @@ const z1 = class z1 extends u {
|
|
|
7693
7698
|
o && (o.classList.toggle("columns", s), o.classList.toggle("small", !s), o.innerHTML = "", t.forEach((c) => {
|
|
7694
7699
|
if (c.nodeType === Node.ELEMENT_NODE) {
|
|
7695
7700
|
const d = c.cloneNode(!0);
|
|
7696
|
-
["script", "iframe", "object", "embed", "img"].forEach((
|
|
7697
|
-
d.querySelectorAll(
|
|
7701
|
+
["script", "iframe", "object", "embed", "img"].forEach((S) => {
|
|
7702
|
+
d.querySelectorAll(S).forEach((_) => _.remove());
|
|
7698
7703
|
}), o.appendChild(d), c.remove();
|
|
7699
7704
|
}
|
|
7700
7705
|
}));
|
|
@@ -7719,17 +7724,17 @@ const z1 = class z1 extends u {
|
|
|
7719
7724
|
}
|
|
7720
7725
|
};
|
|
7721
7726
|
z1.styles = dt;
|
|
7722
|
-
let
|
|
7727
|
+
let d1 = z1;
|
|
7723
7728
|
w1([
|
|
7724
7729
|
r({ type: String })
|
|
7725
|
-
],
|
|
7730
|
+
], d1.prototype, "agencyName");
|
|
7726
7731
|
w1([
|
|
7727
7732
|
r({ type: String })
|
|
7728
|
-
],
|
|
7733
|
+
], d1.prototype, "homepageLink");
|
|
7729
7734
|
w1([
|
|
7730
7735
|
O()
|
|
7731
|
-
],
|
|
7732
|
-
customElements.get("nys-globalfooter") || customElements.define("nys-globalfooter",
|
|
7736
|
+
], d1.prototype, "slotHasContent");
|
|
7737
|
+
customElements.get("nys-globalfooter") || customElements.define("nys-globalfooter", d1);
|
|
7733
7738
|
const yt = g`
|
|
7734
7739
|
:host {
|
|
7735
7740
|
/* Global Footer Styles */
|
|
@@ -7945,19 +7950,19 @@ customElements.get("nys-unavfooter") || customElements.define("nys-unavfooter",
|
|
|
7945
7950
|
export {
|
|
7946
7951
|
R1 as NysAlert,
|
|
7947
7952
|
G1 as NysAvatar,
|
|
7948
|
-
|
|
7953
|
+
l1 as NysBacktotop,
|
|
7949
7954
|
ee as NysButton,
|
|
7950
7955
|
le as NysCheckbox,
|
|
7951
7956
|
re as NysCheckboxgroup,
|
|
7952
|
-
|
|
7957
|
+
c1 as NysErrorMessage,
|
|
7953
7958
|
x as NysFileinput,
|
|
7954
|
-
|
|
7959
|
+
d1 as NysGlobalFooter,
|
|
7955
7960
|
s1 as NysGlobalHeader,
|
|
7956
7961
|
me as NysIcon,
|
|
7957
|
-
|
|
7958
|
-
|
|
7962
|
+
r1 as NysLabel,
|
|
7963
|
+
i1 as NysOption,
|
|
7959
7964
|
ze as NysRadiobutton,
|
|
7960
|
-
|
|
7965
|
+
Se as NysRadiogroup,
|
|
7961
7966
|
Be as NysSelect,
|
|
7962
7967
|
u1 as NysSkipnav,
|
|
7963
7968
|
Fe as NysTextarea,
|