@nysds/components 1.11.0 → 1.11.2

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,12 +2,12 @@ import { css as u, LitElement as y, html as l } from "lit";
2
2
  import { property as r, query as u1, state as $ } from "lit/decorators.js";
3
3
  import { ifDefined as d } from "lit/directives/if-defined.js";
4
4
  /*!
5
- * New York State Design System (v1.11.0)
5
+ * New York State Design System (v1.11.2)
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
9
9
  */
10
- const i1 = u`
10
+ const a1 = u`
11
11
  :host {
12
12
  /* Anything that can be overridden should be defined here */
13
13
 
@@ -229,7 +229,7 @@ const Ne = class Ne extends y {
229
229
  </div>`;
230
230
  }
231
231
  };
232
- Ne.styles = i1;
232
+ Ne.styles = a1;
233
233
  let le = Ne;
234
234
  De([
235
235
  r({ type: String })
@@ -295,7 +295,7 @@ const Fe = class Fe extends y {
295
295
  </div>`;
296
296
  }
297
297
  };
298
- Fe.styles = i1;
298
+ Fe.styles = a1;
299
299
  let Ce = Fe;
300
300
  Ue([
301
301
  r({ type: String })
@@ -551,7 +551,7 @@ var _1 = Object.defineProperty, C1 = Object.getOwnPropertyDescriptor, P = (a, e,
551
551
  };
552
552
  let m1 = 0;
553
553
  var ne;
554
- const H = (ne = class extends y {
554
+ const A = (ne = class extends y {
555
555
  constructor() {
556
556
  super(...arguments), this.id = "", this.heading = "", this.icon = "", this.dismissible = !1, this.duration = 0, this.text = "", this.primaryAction = "", this.secondaryAction = "", this.primaryLabel = "Learn more", this.secondaryLabel = "Dismiss", this._alertClosed = !1, this._slotHasContent = !0, this._type = "base", this._timeoutId = null;
557
557
  }
@@ -668,44 +668,44 @@ const H = (ne = class extends y {
668
668
  ], ne);
669
669
  P([
670
670
  r({ type: String })
671
- ], H.prototype, "id", 2);
671
+ ], A.prototype, "id", 2);
672
672
  P([
673
673
  r({ type: String })
674
- ], H.prototype, "heading", 2);
674
+ ], A.prototype, "heading", 2);
675
675
  P([
676
676
  r({ type: String })
677
- ], H.prototype, "icon", 2);
677
+ ], A.prototype, "icon", 2);
678
678
  P([
679
679
  r({ type: Boolean, reflect: !0 })
680
- ], H.prototype, "dismissible", 2);
680
+ ], A.prototype, "dismissible", 2);
681
681
  P([
682
682
  r({ type: Number, reflect: !0 })
683
- ], H.prototype, "duration", 2);
683
+ ], A.prototype, "duration", 2);
684
684
  P([
685
685
  r({ type: String })
686
- ], H.prototype, "text", 2);
686
+ ], A.prototype, "text", 2);
687
687
  P([
688
688
  r({ type: String })
689
- ], H.prototype, "primaryAction", 2);
689
+ ], A.prototype, "primaryAction", 2);
690
690
  P([
691
691
  r({ type: String })
692
- ], H.prototype, "secondaryAction", 2);
692
+ ], A.prototype, "secondaryAction", 2);
693
693
  P([
694
694
  r({ type: String })
695
- ], H.prototype, "primaryLabel", 2);
695
+ ], A.prototype, "primaryLabel", 2);
696
696
  P([
697
697
  r({ type: String })
698
- ], H.prototype, "secondaryLabel", 2);
698
+ ], A.prototype, "secondaryLabel", 2);
699
699
  P([
700
700
  $()
701
- ], H.prototype, "_alertClosed", 2);
701
+ ], A.prototype, "_alertClosed", 2);
702
702
  P([
703
703
  $()
704
- ], H.prototype, "_slotHasContent", 2);
704
+ ], A.prototype, "_slotHasContent", 2);
705
705
  P([
706
706
  r({ reflect: !0 })
707
- ], H.prototype, "type", 1);
708
- let x1 = H;
707
+ ], A.prototype, "type", 1);
708
+ let x1 = A;
709
709
  customElements.get("nys-alert") || customElements.define("nys-alert", x1);
710
710
  const w1 = u`
711
711
  :host {
@@ -809,25 +809,22 @@ const w1 = u`
809
809
  fill: currentColor;
810
810
  }
811
811
  `;
812
- var k1 = Object.defineProperty, K = (a, e, t, o) => {
812
+ var k1 = Object.defineProperty, W = (a, e, t, o) => {
813
813
  for (var s = void 0, n = a.length - 1, i; n >= 0; n--)
814
814
  (i = a[n]) && (s = i(e, t, s) || s);
815
815
  return s && k1(e, t, s), s;
816
816
  };
817
- let L1 = 0;
817
+ let S1 = 0;
818
818
  const je = class je extends y {
819
819
  constructor() {
820
- super(...arguments), this.id = "", this.ariaLabel = "", this.image = "", this.initials = "", this.icon = "", this.color = "", this.interactive = !1, this.disabled = !1, this.lazy = !1, this._slotHasContent = !0;
820
+ super(...arguments), this.id = "", this.ariaLabel = "", this.image = "", this.initials = "", this.icon = "", this.color = "", this.interactive = !1, this.disabled = !1, this.lazy = !1, this._slotHasContent = !1;
821
821
  }
822
822
  /******************** Functions ********************/
823
823
  // Generate a unique ID if one is not provided
824
824
  connectedCallback() {
825
- super.connectedCallback(), this.id || (this.id = `nys-avatar-${Date.now()}-${L1++}`);
826
- }
827
- firstUpdated() {
828
- this._checkSlotContent();
825
+ super.connectedCallback(), this.id || (this.id = `nys-avatar-${Date.now()}-${S1++}`);
829
826
  }
830
- async _checkSlotContent() {
827
+ async _handleSlotChange() {
831
828
  const e = this.shadowRoot?.querySelector("slot");
832
829
  if (!e) {
833
830
  this._slotHasContent = !1;
@@ -849,8 +846,8 @@ const je = class je extends y {
849
846
  document.body.removeChild(n);
850
847
  const c = i.match(/\d+/g);
851
848
  if (!c) return;
852
- const p = Number(c[0]), h = Number(c[1]), V = Number(c[2]), j = (0.299 * p + 0.587 * h + 0.114 * V) / 255 < 0.5;
853
- return this.initials?.length > 0 ? j ? s : o : j ? t : e;
849
+ const p = Number(c[0]), h = Number(c[1]), V = Number(c[2]), T = (0.299 * p + 0.587 * h + 0.114 * V) / 255 < 0.5;
850
+ return this.initials?.length > 0 ? T ? s : o : T ? t : e;
854
851
  }
855
852
  render() {
856
853
  return l`
@@ -866,7 +863,9 @@ const je = class je extends y {
866
863
  aria-label=${d(
867
864
  this.image ? void 0 : this.ariaLabel ? this.ariaLabel : "avatar"
868
865
  )}
869
- tabindex=${this.interactive && !this.disabled ? "0" : d(void 0)}
866
+ tabindex=${d(
867
+ this.interactive && !this.disabled ? 0 : void 0
868
+ )}
870
869
  >
871
870
  ${this.image?.length > 0 ? l`<img
872
871
  part="nys-avatar__image"
@@ -879,14 +878,13 @@ const je = class je extends y {
879
878
  class="nys-avatar__initials"
880
879
  aria-hidden="true"
881
880
  >${this.initials}</span
882
- >` : this._slotHasContent ? l`<div part="nys-avatar__icon">
883
- <slot></slot>
884
- </div>` : l`<div part="nys-avatar__icon">
885
- <nys-icon
886
- label="nys-avatar__icon"
887
- name=${this.icon?.length > 0 ? this.icon : "account_circle"}
888
- ></nys-icon>
889
- </div>`}
881
+ >` : l`<div part="nys-avatar__icon">
882
+ <slot @slotchange=${this._handleSlotChange}></slot>
883
+ ${this._slotHasContent ? null : l`<nys-icon
884
+ label="nys-avatar__icon"
885
+ name=${this.icon?.length > 0 ? this.icon : "account_circle"}
886
+ ></nys-icon>`}
887
+ </div>`}
890
888
  </div>
891
889
  </div>
892
890
  </label>
@@ -895,38 +893,38 @@ const je = class je extends y {
895
893
  };
896
894
  je.styles = w1;
897
895
  let I = je;
898
- K([
896
+ W([
899
897
  r({ type: String })
900
898
  ], I.prototype, "id");
901
- K([
899
+ W([
902
900
  r({ type: String })
903
901
  ], I.prototype, "ariaLabel");
904
- K([
902
+ W([
905
903
  r({ type: String })
906
904
  ], I.prototype, "image");
907
- K([
905
+ W([
908
906
  r({ type: String })
909
907
  ], I.prototype, "initials");
910
- K([
908
+ W([
911
909
  r({ type: String })
912
910
  ], I.prototype, "icon");
913
- K([
911
+ W([
914
912
  r({ type: String })
915
913
  ], I.prototype, "color");
916
- K([
914
+ W([
917
915
  r({ type: Boolean, reflect: !0 })
918
916
  ], I.prototype, "interactive");
919
- K([
917
+ W([
920
918
  r({ type: Boolean, reflect: !0 })
921
919
  ], I.prototype, "disabled");
922
- K([
920
+ W([
923
921
  r({ type: Boolean, reflect: !0 })
924
922
  ], I.prototype, "lazy");
925
- K([
923
+ W([
926
924
  $()
927
925
  ], I.prototype, "_slotHasContent");
928
926
  customElements.get("nys-avatar") || customElements.define("nys-avatar", I);
929
- const S1 = u`
927
+ const L1 = u`
930
928
  .nys-backtotop {
931
929
  /* These props ARE NOT publicly overridable */
932
930
  --_nys-button-border-radius--start: var(--nys-radius-round, 1776px);
@@ -994,7 +992,7 @@ const Ge = class Ge extends y {
994
992
  ></nys-button>`;
995
993
  }
996
994
  };
997
- Ge.styles = S1;
995
+ Ge.styles = L1;
998
996
  let ve = Ge;
999
997
  Ze([
1000
998
  r({ type: String })
@@ -1018,8 +1016,12 @@ const E1 = u`
1018
1016
  --_nys-button-height: var(--nys-size-600, 48px);
1019
1017
  --_nys-button-border-radius--start: var(--nys-radius-xl, 12px);
1020
1018
  --_nys-button-border-radius--end: var(--nys-radius-xl, 12px);
1021
- --_nys-button-padding--y: var(--nys-space-150, 12px);
1022
- --_nys-button-padding--x: var(--nys-space-250, 20px);
1019
+ --_nys-button-padding--y: calc(
1020
+ var(--nys-space-150, 12px) - var(--nys-border-width-md, 2px)
1021
+ ); /* remove calc when SASS'd */
1022
+ --_nys-button-padding--x: calc(
1023
+ var(--nys-space-250, 20px) - var(--nys-border-width-md, 2px)
1024
+ ); /* remove calc when SASS'd */
1023
1025
  --_nys-button-gap: var(--nys-space-100, 8px);
1024
1026
  --_nys-button-border-width: var(--nys-border-width-md, 2px);
1025
1027
  --_nys-button-outline-width: var(--nys-border-width-md, 2px);
@@ -1093,18 +1095,30 @@ const E1 = u`
1093
1095
  /* Sizes */
1094
1096
  :host([size="sm"]) {
1095
1097
  --_nys-button-height: var(--nys-size-500, 40px);
1096
- --_nys-button-padding--y: var(--nys-space-100, 8px);
1097
- --_nys-button-padding--x: var(--nys-space-200, 16px);
1098
+ --_nys-button-padding--y: calc(
1099
+ var(--nys-space-100, 8px) - var(--nys-border-width-md, 2px)
1100
+ ); /* remove calc when SASS'd */
1101
+ --_nys-button-padding--x: calc(
1102
+ var(--nys-space-200, 16px) - var(--nys-border-width-md, 2px)
1103
+ ); /* remove calc when SASS'd */
1098
1104
  }
1099
1105
  :host([size="md"]) {
1100
1106
  --_nys-button-height: var(--nys-size-600, 48px);
1101
- --_nys-button-padding--y: var(--nys-space-150, 12px);
1102
- --_nys-button-padding--x: var(--nys-space-250, 20px);
1107
+ --_nys-button-padding--y: calc(
1108
+ var(--nys-space-150, 12px) - var(--nys-border-width-md, 2px)
1109
+ ); /* remove calc when SASS'd */
1110
+ --_nys-button-padding--x: calc(
1111
+ var(--nys-space-250, 20px) - var(--nys-border-width-md, 2px)
1112
+ ); /* remove calc when SASS'd */
1103
1113
  }
1104
1114
  :host([size="lg"]) {
1105
1115
  --_nys-button-height: var(--nys-size-700, 56px);
1106
- --_nys-button-padding--y: var(--nys-space-200, 16px);
1107
- --_nys-button-padding--x: var(--nys-space-300, 24px);
1116
+ --_nys-button-padding--y: calc(
1117
+ var(--nys-space-200, 16px) - var(--nys-border-width-md, 2px)
1118
+ ); /* remove calc when SASS'd */
1119
+ --_nys-button-padding--x: calc(
1120
+ var(--nys-space-300, 24px) - var(--nys-border-width-md, 2px)
1121
+ ); /* remove calc when SASS'd */
1108
1122
  }
1109
1123
  :host([fullWidth]) {
1110
1124
  --_nys-button-width: 100%;
@@ -1584,7 +1598,6 @@ const E1 = u`
1584
1598
  .nys-button {
1585
1599
  width: var(--_nys-button-width);
1586
1600
  min-height: var(--_nys-button-height);
1587
- height: var(--_nys-button-height);
1588
1601
  /* set every corner individually */
1589
1602
  border-start-start-radius: var(--_nys-button-border-radius--start);
1590
1603
  border-end-start-radius: var(--_nys-button-border-radius--start);
@@ -1675,18 +1688,17 @@ var D1 = Object.defineProperty, M1 = Object.getOwnPropertyDescriptor, _ = (a, e,
1675
1688
  return o && s && D1(e, t, s), s;
1676
1689
  };
1677
1690
  let z1 = 0;
1678
- var S;
1679
- const b = (S = class extends y {
1691
+ var L;
1692
+ const b = (L = class extends y {
1680
1693
  // allows use of elementInternals' API
1681
1694
  constructor() {
1682
- super(), this.id = "", this.name = "", this._size = "md", this.fullWidth = !1, this._variant = "filled", this.inverted = !1, this.label = "", this.ariaLabel = "", this.ariaControls = "", this.prefixIcon = "", this.suffixIcon = "", this.circle = !1, this.icon = "", this.disabled = !1, this.form = null, this.value = "", this.ariaDescription = "", this._type = "button", this.onClick = () => {
1683
- }, this.href = "", this._target = "_self", this._internals = this.attachInternals();
1695
+ super(), this.id = "", this.name = "", this._size = "md", this.fullWidth = !1, this._variant = "filled", this.inverted = !1, this.label = "", this.ariaLabel = "", this.ariaControls = "", this.prefixIcon = "", this.suffixIcon = "", this.circle = !1, this.icon = "", this.disabled = !1, this.form = null, this.value = "", this.ariaDescription = "", this._type = "button", this.onClick = null, this.href = "", this._target = "_self", this._internals = this.attachInternals();
1684
1696
  }
1685
1697
  get size() {
1686
1698
  return this._size;
1687
1699
  }
1688
1700
  set size(e) {
1689
- this._size = S.VALID_SIZES.includes(
1701
+ this._size = L.VALID_SIZES.includes(
1690
1702
  e
1691
1703
  ) ? e : "md";
1692
1704
  }
@@ -1694,7 +1706,7 @@ const b = (S = class extends y {
1694
1706
  return this._variant;
1695
1707
  }
1696
1708
  set variant(e) {
1697
- this._variant = S.VALID_VARIANTS.includes(
1709
+ this._variant = L.VALID_VARIANTS.includes(
1698
1710
  e
1699
1711
  ) ? e : "filled";
1700
1712
  }
@@ -1702,7 +1714,7 @@ const b = (S = class extends y {
1702
1714
  return this._type;
1703
1715
  }
1704
1716
  set type(e) {
1705
- this._type = S.VALID_TYPES.includes(
1717
+ this._type = L.VALID_TYPES.includes(
1706
1718
  e
1707
1719
  ) ? e : "button";
1708
1720
  }
@@ -1710,7 +1722,7 @@ const b = (S = class extends y {
1710
1722
  return this._target;
1711
1723
  }
1712
1724
  set target(e) {
1713
- this._target = S.VALID_TARGETS.includes(
1725
+ this._target = L.VALID_TARGETS.includes(
1714
1726
  e
1715
1727
  ) ? e : "_self";
1716
1728
  }
@@ -1729,7 +1741,7 @@ const b = (S = class extends y {
1729
1741
  return `nys-button-${Date.now()}-${z1++}`;
1730
1742
  }
1731
1743
  _manageFormAction() {
1732
- typeof this.onClick == "function" && this.click();
1744
+ typeof this.onClick == "function" && this.onClick !== null && this.onClick(new Event("click"));
1733
1745
  const e = this._internals.form;
1734
1746
  if (e)
1735
1747
  switch (this.type) {
@@ -1767,9 +1779,19 @@ const b = (S = class extends y {
1767
1779
  );
1768
1780
  t && t.click();
1769
1781
  } else
1770
- this._handleClick(e);
1782
+ this._handleAnyAttributeFunction(), this._handleClick(e);
1771
1783
  }
1772
1784
  }
1785
+ /**
1786
+ * Vanilla JS & Native HTML keydown solution:
1787
+ * The <nys-button onClick="doFunction();"></nys-button> onClick is an attribute here.
1788
+ * Thus, we call it here. Otherwise, at this point, this.onClick is null as it isn't props, but a string attribute
1789
+ * In vanilla HTML/JS, clicking with execute the attribute function, BUT now with keydown, hence this solution.
1790
+ */
1791
+ _handleAnyAttributeFunction() {
1792
+ const e = this.getAttribute("onClick");
1793
+ e && new Function("return " + e)();
1794
+ }
1773
1795
  /******************** Public Methods ********************/
1774
1796
  focus(e) {
1775
1797
  const t = this.renderRoot.querySelector(
@@ -1830,7 +1852,6 @@ const b = (S = class extends y {
1830
1852
  this.ariaLabel || this.label || (this.circle ? this.icon : null) || this.prefixIcon || this.suffixIcon || "button"
1831
1853
  )}
1832
1854
  aria-description=${d(this.ariaDescription || void 0)}
1833
- onclick="${this.onClick}"
1834
1855
  @click=${this._handleClick}
1835
1856
  @focus="${this._handleFocus}"
1836
1857
  @blur="${this._handleBlur}"
@@ -1854,18 +1875,18 @@ const b = (S = class extends y {
1854
1875
  `}
1855
1876
  `;
1856
1877
  }
1857
- }, S.VALID_SIZES = ["sm", "md", "lg"], S.VALID_VARIANTS = [
1878
+ }, L.VALID_SIZES = ["sm", "md", "lg"], L.VALID_VARIANTS = [
1858
1879
  "filled",
1859
1880
  "outline",
1860
1881
  "ghost",
1861
1882
  "text"
1862
- ], S.VALID_TYPES = ["submit", "reset", "button"], S.VALID_TARGETS = [
1883
+ ], L.VALID_TYPES = ["submit", "reset", "button"], L.VALID_TARGETS = [
1863
1884
  "_self",
1864
1885
  "_blank",
1865
1886
  "_parent",
1866
1887
  "_top",
1867
1888
  "framename"
1868
- ], S.styles = E1, S.formAssociated = !0, S);
1889
+ ], L.styles = E1, L.formAssociated = !0, L);
1869
1890
  _([
1870
1891
  r({ type: String })
1871
1892
  ], b.prototype, "id", 2);
@@ -1931,7 +1952,7 @@ _([
1931
1952
  ], b.prototype, "target", 1);
1932
1953
  let V1 = b;
1933
1954
  customElements.get("nys-button") || customElements.define("nys-button", V1);
1934
- const H1 = u`
1955
+ const A1 = u`
1935
1956
  :host {
1936
1957
  /* Anything that can be overridden should be defined here */
1937
1958
 
@@ -2011,10 +2032,10 @@ const H1 = u`
2011
2032
  font-weight: var(--_nys-badge-prefix-font-weight);
2012
2033
  }
2013
2034
  `;
2014
- var A1 = Object.defineProperty, B1 = Object.getOwnPropertyDescriptor, ue = (a, e, t, o) => {
2035
+ var H1 = Object.defineProperty, B1 = Object.getOwnPropertyDescriptor, ue = (a, e, t, o) => {
2015
2036
  for (var s = o > 1 ? void 0 : o ? B1(e, t) : e, n = a.length - 1, i; n >= 0; n--)
2016
2037
  (i = a[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
2017
- return o && s && A1(e, t, s), s;
2038
+ return o && s && H1(e, t, s), s;
2018
2039
  }, q;
2019
2040
  const oe = (q = class extends y {
2020
2041
  constructor() {
@@ -2074,7 +2095,7 @@ const oe = (q = class extends y {
2074
2095
  "error",
2075
2096
  "success",
2076
2097
  "warning"
2077
- ], q.styles = H1, q.DEFAULT_ICONS = {
2098
+ ], q.styles = A1, q.DEFAULT_ICONS = {
2078
2099
  neutral: "info",
2079
2100
  error: "emergency_home",
2080
2101
  success: "check_circle",
@@ -2106,7 +2127,7 @@ ue([
2106
2127
  ], oe.prototype, "suffixIcon", 1);
2107
2128
  let I1 = oe;
2108
2129
  customElements.get("nys-badge") || customElements.define("nys-badge", I1);
2109
- const a1 = u`
2130
+ const l1 = u`
2110
2131
  :host {
2111
2132
  /* Anything that can be overridden should be defined here */
2112
2133
 
@@ -2489,14 +2510,14 @@ const a1 = u`
2489
2510
  border: 0;
2490
2511
  }
2491
2512
  `;
2492
- var P1 = Object.defineProperty, Z1 = Object.getOwnPropertyDescriptor, A = (a, e, t, o) => {
2513
+ var P1 = Object.defineProperty, Z1 = Object.getOwnPropertyDescriptor, H = (a, e, t, o) => {
2493
2514
  for (var s = o > 1 ? void 0 : o ? Z1(e, t) : e, n = a.length - 1, i; n >= 0; n--)
2494
2515
  (i = a[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
2495
2516
  return o && s && P1(e, t, s), s;
2496
2517
  };
2497
2518
  let q1 = 0;
2498
- var W;
2499
- const E = (W = class extends y {
2519
+ var K;
2520
+ const E = (K = class extends y {
2500
2521
  // allows use of elementInternals' API
2501
2522
  constructor() {
2502
2523
  super(), this.id = "", this.name = "", this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.tile = !1, this._tooltip = "", this.inverted = !1, this.form = null, this._slottedDescriptionText = "", this._size = "md", this._internals = this.attachInternals();
@@ -2505,7 +2526,7 @@ const E = (W = class extends y {
2505
2526
  return this._size;
2506
2527
  }
2507
2528
  set size(e) {
2508
- this._size = W.VALID_SIZES.includes(
2529
+ this._size = K.VALID_SIZES.includes(
2509
2530
  e
2510
2531
  ) ? e : "md";
2511
2532
  }
@@ -2636,47 +2657,47 @@ const E = (W = class extends y {
2636
2657
  </div>
2637
2658
  `;
2638
2659
  }
2639
- }, W.VALID_SIZES = ["sm", "md"], W.styles = a1, W.formAssociated = !0, W);
2640
- A([
2660
+ }, K.VALID_SIZES = ["sm", "md"], K.styles = l1, K.formAssociated = !0, K);
2661
+ H([
2641
2662
  r({ type: String })
2642
2663
  ], E.prototype, "id", 2);
2643
- A([
2664
+ H([
2644
2665
  r({ type: String, reflect: !0 })
2645
2666
  ], E.prototype, "name", 2);
2646
- A([
2667
+ H([
2647
2668
  r({ type: Boolean, reflect: !0 })
2648
2669
  ], E.prototype, "required", 2);
2649
- A([
2670
+ H([
2650
2671
  r({ type: Boolean, reflect: !0 })
2651
2672
  ], E.prototype, "optional", 2);
2652
- A([
2673
+ H([
2653
2674
  r({ type: Boolean, reflect: !0 })
2654
2675
  ], E.prototype, "showError", 2);
2655
- A([
2676
+ H([
2656
2677
  r({ type: String })
2657
2678
  ], E.prototype, "errorMessage", 2);
2658
- A([
2679
+ H([
2659
2680
  r({ type: String })
2660
2681
  ], E.prototype, "label", 2);
2661
- A([
2682
+ H([
2662
2683
  r({ type: String })
2663
2684
  ], E.prototype, "description", 2);
2664
- A([
2685
+ H([
2665
2686
  r({ type: Boolean, reflect: !0 })
2666
2687
  ], E.prototype, "tile", 2);
2667
- A([
2688
+ H([
2668
2689
  r({ type: String })
2669
2690
  ], E.prototype, "_tooltip", 2);
2670
- A([
2691
+ H([
2671
2692
  r({ type: Boolean, reflect: !0 })
2672
2693
  ], E.prototype, "inverted", 2);
2673
- A([
2694
+ H([
2674
2695
  r({ type: String, reflect: !0 })
2675
2696
  ], E.prototype, "form", 2);
2676
- A([
2697
+ H([
2677
2698
  $()
2678
2699
  ], E.prototype, "_slottedDescriptionText", 2);
2679
- A([
2700
+ H([
2680
2701
  r({ reflect: !0 })
2681
2702
  ], E.prototype, "size", 1);
2682
2703
  let O1 = E;
@@ -2847,7 +2868,7 @@ const w = (X = class extends y {
2847
2868
  ></nys-errormessage>` : ""}
2848
2869
  `;
2849
2870
  }
2850
- }, X.VALID_SIZES = ["sm", "md"], X.styles = a1, X.formAssociated = !0, X);
2871
+ }, X.VALID_SIZES = ["sm", "md"], X.styles = l1, X.formAssociated = !0, X);
2851
2872
  D([
2852
2873
  r({ type: Boolean, reflect: !0 })
2853
2874
  ], w.prototype, "checked", 2);
@@ -2987,10 +3008,10 @@ const Y1 = u`
2987
3008
  var(--_nys-errormessage-color);
2988
3009
  }
2989
3010
  `;
2990
- var K1 = Object.defineProperty, Te = (a, e, t, o) => {
3011
+ var W1 = Object.defineProperty, Te = (a, e, t, o) => {
2991
3012
  for (var s = void 0, n = a.length - 1, i; n >= 0; n--)
2992
3013
  (i = a[n]) && (s = i(e, t, s) || s);
2993
- return s && K1(e, t, s), s;
3014
+ return s && W1(e, t, s), s;
2994
3015
  };
2995
3016
  const Ie = class Ie extends y {
2996
3017
  // allows use of elementInternals' API
@@ -3016,7 +3037,7 @@ Te([
3016
3037
  r({ type: Boolean, reflect: !0 })
3017
3038
  ], me.prototype, "showDivider");
3018
3039
  customElements.get("nys-errormessage") || customElements.define("nys-errormessage", me);
3019
- async function W1(a, e) {
3040
+ async function K1(a, e) {
3020
3041
  if (!e || e.trim() === "") return !0;
3021
3042
  const t = e.toLowerCase().split(",").map((n) => n.trim()), o = a.name.toLowerCase(), s = o.includes(".") ? o.split(".").pop() : "";
3022
3043
  for (const n of t)
@@ -3308,7 +3329,7 @@ var J1 = Object.defineProperty, qe = (a, e, t, o) => {
3308
3329
  (i = a[n]) && (s = i(e, t, s) || s);
3309
3330
  return s && J1(e, t, s), s;
3310
3331
  };
3311
- const Ke = class Ke extends y {
3332
+ const We = class We extends y {
3312
3333
  constructor() {
3313
3334
  super(...arguments), this.filename = "", this.status = "pending", this.progress = 0, this.errorMessage = "";
3314
3335
  }
@@ -3381,8 +3402,8 @@ const Ke = class Ke extends y {
3381
3402
  `;
3382
3403
  }
3383
3404
  };
3384
- Ke.styles = Q1;
3385
- let fe = Ke;
3405
+ We.styles = Q1;
3406
+ let fe = We;
3386
3407
  qe([
3387
3408
  r({ type: String })
3388
3409
  ], fe.prototype, "filename");
@@ -3516,7 +3537,7 @@ const Pe = class Pe extends y {
3516
3537
  async _processFile(e) {
3517
3538
  e.status = "processing";
3518
3539
  try {
3519
- if (!await W1(e.file, this.accept)) {
3540
+ if (!await K1(e.file, this.accept)) {
3520
3541
  e.status = "error", e.errorMsg = "File type is invalid.", this.requestUpdate();
3521
3542
  return;
3522
3543
  }
@@ -3641,8 +3662,9 @@ const Pe = class Pe extends y {
3641
3662
  ${this._dragActive ? "drag-active" : ""}
3642
3663
  ${this._isDropDisabled ? "disabled" : ""}
3643
3664
  ${this.showError && !this._isDropDisabled ? "error" : ""}"
3644
- @click=${this._isDropDisabled ? null : this._openFileDialog}
3645
- @keydown=${(e) => !this._isDropDisabled && (e.key === "Enter" || e.key === " ") && this._openFileDialog()}
3665
+ @click=${this._isDropDisabled ? null : (e) => {
3666
+ e.target.closest("nys-button") || this._openFileDialog();
3667
+ }}
3646
3668
  @dragover=${this._isDropDisabled ? null : this._onDragOver}
3647
3669
  @dragleave=${this._isDropDisabled ? null : this._onDragLeave}
3648
3670
  @drop=${this._isDropDisabled ? null : this._onDrop}
@@ -3656,10 +3678,9 @@ const Pe = class Pe extends y {
3656
3678
  ariaLabel=${this._buttonAriaLabel}
3657
3679
  ariaDescription=${this._buttonAriaDescription}
3658
3680
  ?disabled=${this._isDropDisabled}
3659
- @nys-click=${(e) => {
3660
- e.stopPropagation(), this._openFileDialog();
3661
- }}
3662
- @click=${(e) => e.stopPropagation()}
3681
+ @nys-click="${(e) => {
3682
+ e.preventDefault(), e.stopPropagation(), this._openFileDialog();
3683
+ }}"
3663
3684
  ></nys-button>
3664
3685
  <p>or drag here</p>`}
3665
3686
  </div>` : l`<nys-button
@@ -4632,7 +4653,7 @@ var lt = Object.defineProperty, ct = Object.getOwnPropertyDescriptor, ke = (a, e
4632
4653
  (i = a[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
4633
4654
  return o && s && lt(e, t, s), s;
4634
4655
  };
4635
- const We = class We extends y {
4656
+ const Ke = class Ke extends y {
4636
4657
  constructor() {
4637
4658
  super(...arguments), this.for = "", this.label = "", this.description = "", this.flag = "", this.inverted = !1, this._tooltip = "";
4638
4659
  }
@@ -4658,7 +4679,7 @@ const We = class We extends y {
4658
4679
  ?inverted=${this.inverted}
4659
4680
  >
4660
4681
  <div class="nys-label__tooltip-icon">
4661
- <nys-icon name="info" size="3xl"></nys-icon>
4682
+ <nys-icon name="info" size="4xl"></nys-icon>
4662
4683
  </div>
4663
4684
  </nys-tooltip>` : ""}
4664
4685
  </div>
@@ -4669,8 +4690,8 @@ const We = class We extends y {
4669
4690
  `;
4670
4691
  }
4671
4692
  };
4672
- We.styles = at;
4673
- let te = We;
4693
+ Ke.styles = at;
4694
+ let te = Ke;
4674
4695
  ke([
4675
4696
  r({ type: String })
4676
4697
  ], te.prototype, "for", 2);
@@ -4868,9 +4889,6 @@ const re = (ae = class extends y {
4868
4889
  disconnectedCallback() {
4869
4890
  super.disconnectedCallback(), this._restoreBodyScroll(), window.removeEventListener("keydown", (e) => this._handleKeydown(e));
4870
4891
  }
4871
- firstUpdated() {
4872
- this._handleBodySlotChange(), this._handleActionSlotChange();
4873
- }
4874
4892
  async updated(e) {
4875
4893
  e.has("open") && (this.open ? (this._hideBodyScroll(), this._dispatchOpenEvent(), await this.updateComplete, this._savePrevFocused(), this._focusOnModal(), this._updateDismissAria()) : (this._restorePrevFocused(), this._restoreBodyScroll(), this._dispatchCloseEvent(), this._updateDismissAria()));
4876
4894
  }
@@ -4890,9 +4908,9 @@ const re = (ae = class extends y {
4890
4908
  async _restorePrevFocused() {
4891
4909
  const e = this._prevFocusedElement;
4892
4910
  if (e && e.tagName.toLowerCase() === "nys-button") {
4893
- const t = await e.getButtonElement();
4894
- if (t) {
4895
- t.focus();
4911
+ const o = await e.getButtonElement();
4912
+ if (o) {
4913
+ o.focus();
4896
4914
  return;
4897
4915
  }
4898
4916
  } else
@@ -4980,10 +4998,10 @@ const re = (ae = class extends y {
4980
4998
  let h = document.activeElement, V = s.indexOf(h);
4981
4999
  if (e.shiftKey) {
4982
5000
  e.preventDefault();
4983
- let F = V - 1;
4984
- F < 0 && (F = s.length - 1);
4985
- const j = s[F];
4986
- s[F].tagName.toLowerCase() === "nys-button" ? (await j.getButtonElement())?.focus() : j.focus();
5001
+ let j = V - 1;
5002
+ j < 0 && (j = s.length - 1);
5003
+ const T = s[j];
5004
+ s[j].tagName.toLowerCase() === "nys-button" ? (await T.getButtonElement())?.focus() : T.focus();
4987
5005
  } else
4988
5006
  h === p && (e.preventDefault(), c.tagName.toLowerCase() === "nys-button" ? (await c.getButtonElement())?.focus() : c.focus());
4989
5007
  }
@@ -5216,8 +5234,13 @@ const Xe = class Xe extends y {
5216
5234
  constructor() {
5217
5235
  super(), this.id = "", this.name = "", this.currentPage = 1, this.totalPages = 1, this._twoBeforeLast = !1;
5218
5236
  }
5219
- updated(e) {
5220
- super.updated(e), this.currentPage = this._clampPage(this.currentPage), this._twoBeforeLast = this.currentPage === this.totalPages - 2;
5237
+ willUpdate(e) {
5238
+ if (e.has("currentPage") || e.has("totalPages")) {
5239
+ const t = this._clampPage(this.currentPage);
5240
+ t !== this.currentPage && (this.currentPage = t);
5241
+ const o = this.currentPage === this.totalPages - 2;
5242
+ o !== this._twoBeforeLast && (this._twoBeforeLast = o);
5243
+ }
5221
5244
  }
5222
5245
  // Generate a unique ID if one is not provided
5223
5246
  connectedCallback() {
@@ -5318,7 +5341,7 @@ Me([
5318
5341
  r({ type: Boolean, reflect: !0 })
5319
5342
  ], ce.prototype, "_twoBeforeLast");
5320
5343
  customElements.get("nys-pagination") || customElements.define("nys-pagination", ce);
5321
- const l1 = u`
5344
+ const c1 = u`
5322
5345
  :host {
5323
5346
  /* Global Radiobutton Styles */
5324
5347
  --_nys-radiobutton-size: var(--nys-size-400, 32px);
@@ -5685,7 +5708,7 @@ var bt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, M = (a, e,
5685
5708
  };
5686
5709
  let Ct = 0;
5687
5710
  var Q;
5688
- const L = (Q = class extends y {
5711
+ const S = (Q = class extends y {
5689
5712
  // allows use of elementInternals' API
5690
5713
  constructor() {
5691
5714
  super(), this.id = "", this.name = "", this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.tile = !1, this._tooltip = "", this.inverted = !1, this.form = null, this.selectedValue = null, this._slottedDescriptionText = "", this._size = "md", this._internals = this.attachInternals();
@@ -5706,7 +5729,7 @@ const L = (Q = class extends y {
5706
5729
  super.disconnectedCallback(), this.removeEventListener("nys-change", this._handleRadioButtonChange), this.removeEventListener("invalid", this._handleInvalid);
5707
5730
  }
5708
5731
  async firstUpdated() {
5709
- this._initializeCheckedRadioValue(), this._setValue(), this._setRadioButtonRequire(), this._updateRadioButtonsSize(), this._updateRadioButtonsTile(), this._updateRadioButtonsShowError(), this._getSlotDescriptionForAria(), await this.updateComplete, this._initializeChildAttributes(), this._updateGroupTabIndex();
5732
+ await this.updateComplete, this._initializeCheckedRadioValue(), this._setValue(), this._setRadioButtonRequire(), this._updateRadioButtonsSize(), this._updateRadioButtonsTile(), this._updateRadioButtonsShowError(), this._getSlotDescriptionForAria(), this._initializeChildAttributes(), this._updateGroupTabIndex();
5710
5733
  }
5711
5734
  updated(e) {
5712
5735
  (e.has("required") || e.has("selectedValue")) && this._manageRequire(), e.has("size") && this._updateRadioButtonsSize(), e.has("tile") && this._updateRadioButtonsTile(), e.has("inverted") && this._updateRadioButtonsInvert(), e.has("showError") && this._updateRadioButtonsShowError(), e.has("form") && this._updateRadioButtonsForm();
@@ -5748,7 +5771,9 @@ const L = (Q = class extends y {
5748
5771
  }
5749
5772
  /********************** Core Keyboard & Click Logic **********************/
5750
5773
  _getAllRadios() {
5751
- return Array.from(this.querySelectorAll("nys-radiobutton"));
5774
+ return Array.from(
5775
+ this.querySelectorAll("nys-radiobutton")
5776
+ );
5752
5777
  }
5753
5778
  // Arrow / Space / Enter navigation at group level
5754
5779
  async _handleKeyDown(e) {
@@ -5822,7 +5847,9 @@ const L = (Q = class extends y {
5822
5847
  async _handleInvalid(e) {
5823
5848
  if (e.preventDefault(), this._internals.validity.valueMissing) {
5824
5849
  this.showError = !0, this._manageRequire();
5825
- const t = this.querySelector("nys-radiobutton");
5850
+ const t = this.querySelector(
5851
+ "nys-radiobutton"
5852
+ );
5826
5853
  if (t) {
5827
5854
  const o = this._internals.form;
5828
5855
  o ? Array.from(o.elements).find(
@@ -5858,53 +5885,53 @@ const L = (Q = class extends y {
5858
5885
  ></nys-errormessage>
5859
5886
  </div>`;
5860
5887
  }
5861
- }, Q.VALID_SIZES = ["sm", "md"], Q.styles = l1, Q.formAssociated = !0, Q);
5888
+ }, Q.VALID_SIZES = ["sm", "md"], Q.styles = c1, Q.formAssociated = !0, Q);
5862
5889
  M([
5863
5890
  r({ type: String })
5864
- ], L.prototype, "id", 2);
5891
+ ], S.prototype, "id", 2);
5865
5892
  M([
5866
5893
  r({ type: String, reflect: !0 })
5867
- ], L.prototype, "name", 2);
5894
+ ], S.prototype, "name", 2);
5868
5895
  M([
5869
5896
  r({ type: Boolean, reflect: !0 })
5870
- ], L.prototype, "required", 2);
5897
+ ], S.prototype, "required", 2);
5871
5898
  M([
5872
5899
  r({ type: Boolean, reflect: !0 })
5873
- ], L.prototype, "optional", 2);
5900
+ ], S.prototype, "optional", 2);
5874
5901
  M([
5875
5902
  r({ type: Boolean, reflect: !0 })
5876
- ], L.prototype, "showError", 2);
5903
+ ], S.prototype, "showError", 2);
5877
5904
  M([
5878
5905
  r({ type: String })
5879
- ], L.prototype, "errorMessage", 2);
5906
+ ], S.prototype, "errorMessage", 2);
5880
5907
  M([
5881
5908
  r({ type: String })
5882
- ], L.prototype, "label", 2);
5909
+ ], S.prototype, "label", 2);
5883
5910
  M([
5884
5911
  r({ type: String })
5885
- ], L.prototype, "description", 2);
5912
+ ], S.prototype, "description", 2);
5886
5913
  M([
5887
5914
  r({ type: Boolean, reflect: !0 })
5888
- ], L.prototype, "tile", 2);
5915
+ ], S.prototype, "tile", 2);
5889
5916
  M([
5890
5917
  r({ type: String })
5891
- ], L.prototype, "_tooltip", 2);
5918
+ ], S.prototype, "_tooltip", 2);
5892
5919
  M([
5893
5920
  r({ type: Boolean, reflect: !0 })
5894
- ], L.prototype, "inverted", 2);
5921
+ ], S.prototype, "inverted", 2);
5895
5922
  M([
5896
5923
  r({ type: String, reflect: !0 })
5897
- ], L.prototype, "form", 2);
5924
+ ], S.prototype, "form", 2);
5898
5925
  M([
5899
5926
  $()
5900
- ], L.prototype, "selectedValue", 2);
5927
+ ], S.prototype, "selectedValue", 2);
5901
5928
  M([
5902
5929
  $()
5903
- ], L.prototype, "_slottedDescriptionText", 2);
5930
+ ], S.prototype, "_slottedDescriptionText", 2);
5904
5931
  M([
5905
5932
  r({ reflect: !0 })
5906
- ], L.prototype, "size", 1);
5907
- let mt = L;
5933
+ ], S.prototype, "size", 1);
5934
+ let mt = S;
5908
5935
  customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", mt);
5909
5936
  var xt = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, O = (a, e, t, o) => {
5910
5937
  for (var s = o > 1 ? void 0 : o ? wt(e, t) : e, n = a.length - 1, i; n >= 0; n--)
@@ -6018,7 +6045,7 @@ const Z = (g = class extends y {
6018
6045
  </label>
6019
6046
  `;
6020
6047
  }
6021
- }, g.VALID_SIZES = ["sm", "md"], g.buttonGroup = {}, g.styles = l1, g);
6048
+ }, g.VALID_SIZES = ["sm", "md"], g.buttonGroup = {}, g.styles = c1, g);
6022
6049
  O([
6023
6050
  r({ type: Boolean, reflect: !0 })
6024
6051
  ], Z.prototype, "checked", 2);
@@ -6055,9 +6082,9 @@ O([
6055
6082
  O([
6056
6083
  r({ type: Boolean, reflect: !0 })
6057
6084
  ], Z.prototype, "tile", 2);
6058
- let Lt = Z;
6059
- customElements.get("nys-radiobutton") || customElements.define("nys-radiobutton", Lt);
6060
- const St = u`
6085
+ let St = Z;
6086
+ customElements.get("nys-radiobutton") || customElements.define("nys-radiobutton", St);
6087
+ const Lt = u`
6061
6088
  :host {
6062
6089
  /* Global Select Styles */
6063
6090
  --_nys-select-width: 100%;
@@ -6410,7 +6437,7 @@ const z = (J = class extends y {
6410
6437
  @blur="${this._handleBlur}"
6411
6438
  @change="${this._handleChange}"
6412
6439
  >
6413
- <option hidden disabled selected value=""></option>
6440
+ <option data-native hidden disabled selected value=""></option>
6414
6441
  </select>
6415
6442
  <slot
6416
6443
  @slotchange="${this._handleSlotChange}"
@@ -6429,7 +6456,7 @@ const z = (J = class extends y {
6429
6456
  </div>
6430
6457
  `;
6431
6458
  }
6432
- }, J.VALID_WIDTHS = ["sm", "md", "lg", "full"], J.styles = St, J.formAssociated = !0, J);
6459
+ }, J.VALID_WIDTHS = ["sm", "md", "lg", "full"], J.styles = Lt, J.formAssociated = !0, J);
6433
6460
  B([
6434
6461
  r({ type: String })
6435
6462
  ], z.prototype, "id", 2);
@@ -6544,10 +6571,10 @@ const Vt = u`
6544
6571
  outline: none;
6545
6572
  }
6546
6573
  `;
6547
- var Ht = Object.defineProperty, c1 = (a, e, t, o) => {
6574
+ var At = Object.defineProperty, d1 = (a, e, t, o) => {
6548
6575
  for (var s = void 0, n = a.length - 1, i; n >= 0; n--)
6549
6576
  (i = a[n]) && (s = i(e, t, s) || s);
6550
- return s && Ht(e, t, s), s;
6577
+ return s && At(e, t, s), s;
6551
6578
  };
6552
6579
  const Qe = class Qe extends y {
6553
6580
  constructor() {
@@ -6588,14 +6615,14 @@ const Qe = class Qe extends y {
6588
6615
  };
6589
6616
  Qe.styles = Vt;
6590
6617
  let Ee = Qe;
6591
- c1([
6618
+ d1([
6592
6619
  r({ type: String })
6593
6620
  ], Ee.prototype, "id");
6594
- c1([
6621
+ d1([
6595
6622
  r({ type: String })
6596
6623
  ], Ee.prototype, "href");
6597
6624
  customElements.get("nys-skipnav") || customElements.define("nys-skipnav", Ee);
6598
- const d1 = u`
6625
+ const h1 = u`
6599
6626
  :host {
6600
6627
  /* Anything that can be overridden should be defined here */
6601
6628
 
@@ -6749,7 +6776,11 @@ const d1 = u`
6749
6776
  rgba(255, 255, 255, 0.9)
6750
6777
  );
6751
6778
  width: var(--nys-size-300, 24px);
6779
+ min-width: var(--nys-size-300, 24px);
6780
+ max-width: var(--nys-size-300, 24px);
6752
6781
  height: var(--nys-size-300, 24px);
6782
+ min-height: var(--nys-size-300, 24px);
6783
+ max-height: var(--nys-size-300, 24px);
6753
6784
  display: flex;
6754
6785
  align-items: center;
6755
6786
  justify-content: center;
@@ -6865,7 +6896,11 @@ const d1 = u`
6865
6896
  border: none;
6866
6897
  background-color: var(--nys-color-neutral-200, #bec0c1);
6867
6898
  height: var(--nys-size-100, 8px);
6899
+ min-height: var(--nys-size-100, 8px);
6900
+ max-height: var(--nys-size-100, 8px);
6868
6901
  width: 100%;
6902
+ min-width: 100%;
6903
+ max-width: 100%;
6869
6904
  color: transparent;
6870
6905
  }
6871
6906
 
@@ -6924,7 +6959,11 @@ const d1 = u`
6924
6959
  rgba(255, 255, 255, 0.9)
6925
6960
  );
6926
6961
  width: var(--nys-space-300, 24px);
6962
+ min-width: var(--nys-space-300, 24px);
6963
+ max-width: var(--nys-space-300, 24px);
6927
6964
  height: var(--nys-space-300, 24px);
6965
+ min-height: var(--nys-space-300, 24px);
6966
+ max-height: var(--nys-space-300, 24px);
6928
6967
  color: var(--nys-color-text, #1b1b1b);
6929
6968
  }
6930
6969
 
@@ -6949,10 +6988,10 @@ const d1 = u`
6949
6988
  }
6950
6989
  }
6951
6990
  `;
6952
- var At = Object.defineProperty, be = (a, e, t, o) => {
6991
+ var Ht = Object.defineProperty, be = (a, e, t, o) => {
6953
6992
  for (var s = void 0, n = a.length - 1, i; n >= 0; n--)
6954
6993
  (i = a[n]) && (s = i(e, t, s) || s);
6955
- return s && At(e, t, s), s;
6994
+ return s && Ht(e, t, s), s;
6956
6995
  };
6957
6996
  const Je = class Je extends y {
6958
6997
  constructor() {
@@ -7002,7 +7041,7 @@ const Je = class Je extends y {
7002
7041
  `;
7003
7042
  }
7004
7043
  };
7005
- Je.styles = d1;
7044
+ Je.styles = h1;
7006
7045
  let G = Je;
7007
7046
  be([
7008
7047
  r({ type: Boolean, reflect: !0 })
@@ -7020,7 +7059,7 @@ be([
7020
7059
  r({ type: Boolean })
7021
7060
  ], G.prototype, "isCompactExpanded");
7022
7061
  be([
7023
- r({ type: Function })
7062
+ r({ attribute: !1 })
7024
7063
  ], G.prototype, "onClick");
7025
7064
  be([
7026
7065
  r({ type: Number })
@@ -7076,24 +7115,26 @@ const e1 = class e1 extends y {
7076
7115
  });
7077
7116
  }
7078
7117
  _updateCounter() {
7079
- if (this.isCompactExpanded) {
7080
- this.counterText = "Back to Form", this.style.height = "-webkit-fit-content", this.style.height = "-moz-fit-content", this.style.height = "fit-content";
7081
- return;
7082
- } else
7118
+ let e;
7119
+ if (this.isCompactExpanded)
7120
+ e = "Back to Form", this.style.height = "-webkit-fit-content", this.style.height = "-moz-fit-content", this.style.height = "fit-content";
7121
+ else {
7083
7122
  this.style.height = "auto";
7084
- const e = this.querySelectorAll("nys-step"), t = Array.from(e).findIndex(
7085
- (s) => s.hasAttribute("selected")
7086
- ), o = e.length;
7087
- this.counterText = t >= 0 ? `Step ${t + 1} of ${o}` : `Step 1 of ${o}`;
7123
+ const t = this.querySelectorAll("nys-step"), o = Array.from(t).findIndex(
7124
+ (n) => n.hasAttribute("selected")
7125
+ ), s = t.length;
7126
+ e = o >= 0 ? `Step ${o + 1} of ${s}` : `Step 1 of ${s}`;
7127
+ }
7128
+ e !== this.counterText && (this.counterText = e);
7088
7129
  }
7089
- updated() {
7130
+ willUpdate() {
7090
7131
  const e = this.querySelectorAll("nys-step");
7091
7132
  this._stepsNumbered || (e.forEach((n, i) => {
7092
7133
  n.stepNumber = i + 1;
7093
7134
  }), this._stepsNumbered = !0);
7094
7135
  let t = !1, o = !1, s = !1;
7095
7136
  e.forEach((n, i) => {
7096
- n.hasAttribute("current") && (s ? n.removeAttribute("current") : s = !0), i === 0 ? n.setAttribute("first", "") : n.removeAttribute("first"), n.hasAttribute("current") ? (t = !0, n.removeAttribute("previous")) : t ? n.removeAttribute("previous") : n.setAttribute("previous", ""), n.hasAttribute("selected") && (t || o ? n.removeAttribute("selected") : o = !0), this.hasAttribute("isCompactExpanded") ? n.setAttribute("isCompactExpanded", "") : n.removeAttribute("isCompactExpanded");
7137
+ n.hasAttribute("current") && (s ? n.removeAttribute("current") : s = !0), i === 0 ? n.setAttribute("first", "") : n.removeAttribute("first"), n.hasAttribute("current") ? (t = !0, n.removeAttribute("previous")) : t ? n.removeAttribute("previous") : n.setAttribute("previous", ""), n.hasAttribute("selected") && (t || o ? n.removeAttribute("selected") : o = !0), this.isCompactExpanded ? n.setAttribute("isCompactExpanded", "") : n.removeAttribute("isCompactExpanded");
7097
7138
  }), o || (s ? e.forEach((n) => {
7098
7139
  n.hasAttribute("current") && !o && (n.setAttribute("selected", ""), o = !0);
7099
7140
  }) : e.length > 0 && (e[0].setAttribute("current", ""), e[0].setAttribute("selected", ""))), this._updateCounter();
@@ -7129,7 +7170,7 @@ const e1 = class e1 extends y {
7129
7170
  `;
7130
7171
  }
7131
7172
  };
7132
- e1.styles = d1;
7173
+ e1.styles = h1;
7133
7174
  let he = e1;
7134
7175
  Ve([
7135
7176
  r({ type: String })
@@ -7293,8 +7334,8 @@ var Pt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, x = (a, e,
7293
7334
  return o && s && Pt(e, t, s), s;
7294
7335
  };
7295
7336
  let qt = 0;
7296
- var T;
7297
- const C = (T = class extends y {
7337
+ var R;
7338
+ const C = (R = class extends y {
7298
7339
  // allows use of elementInternals' API
7299
7340
  constructor() {
7300
7341
  super(), this.id = "", this.name = "", this.label = "", this.description = "", this.placeholder = "", this.value = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.optional = !1, this._tooltip = "", this.inverted = !1, this.form = null, this.maxlength = null, this.width = "full", this.rows = 4, this._resize = "vertical", this.showError = !1, this.errorMessage = "", this._hasUserInteracted = !1, this._internals = this.attachInternals();
@@ -7303,12 +7344,12 @@ const C = (T = class extends y {
7303
7344
  return this._resize;
7304
7345
  }
7305
7346
  set resize(e) {
7306
- this._resize = T.VALID_RESIZE.includes(
7347
+ this._resize = R.VALID_RESIZE.includes(
7307
7348
  e
7308
7349
  ) ? e : "vertical";
7309
7350
  }
7310
7351
  async updated(e) {
7311
- await Promise.resolve(), e.has("width") && (this.width = T.VALID_WIDTHS.includes(this.width) ? this.width : "full"), e.has("rows") && (this.rows = this.rows ?? 4);
7352
+ await Promise.resolve(), e.has("width") && (this.width = R.VALID_WIDTHS.includes(this.width) ? this.width : "full"), e.has("rows") && (this.rows = this.rows ?? 4);
7312
7353
  }
7313
7354
  // Generate a unique ID if one is not provided
7314
7355
  connectedCallback() {
@@ -7421,6 +7462,7 @@ const C = (T = class extends y {
7421
7462
  class="nys-textarea__textarea ${this.resize}"
7422
7463
  name=${this.name}
7423
7464
  id=${this.id}
7465
+ .value=${this.value}
7424
7466
  ?disabled=${this.disabled}
7425
7467
  ?required=${this.required}
7426
7468
  ?readonly=${this.readonly}
@@ -7439,9 +7481,7 @@ const C = (T = class extends y {
7439
7481
  @blur="${this._handleBlur}"
7440
7482
  @select="${this._handleSelect}"
7441
7483
  @selectionchange="${this._handleSelectionChange}"
7442
- >
7443
- ${this.value}</textarea
7444
- >
7484
+ ></textarea>
7445
7485
  <nys-errormessage
7446
7486
  ?showError=${this.showError}
7447
7487
  errorMessage=${this._internals.validationMessage || this.errorMessage}
@@ -7449,7 +7489,7 @@ ${this.value}</textarea
7449
7489
  </label>
7450
7490
  `;
7451
7491
  }
7452
- }, T.VALID_WIDTHS = ["sm", "md", "lg", "full"], T.VALID_RESIZE = ["vertical", "none"], T.styles = It, T.formAssociated = !0, T);
7492
+ }, R.VALID_WIDTHS = ["sm", "md", "lg", "full"], R.VALID_RESIZE = ["vertical", "none"], R.styles = It, R.formAssociated = !0, R);
7453
7493
  x([
7454
7494
  r({ type: String })
7455
7495
  ], C.prototype, "id", 2);
@@ -7754,8 +7794,8 @@ var Tt = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, f = (a, e,
7754
7794
  return o && s && Tt(e, t, s), s;
7755
7795
  };
7756
7796
  let Nt = 0;
7757
- var R;
7758
- const v = (R = class extends y {
7797
+ var N;
7798
+ const v = (N = class extends y {
7759
7799
  // allows use of elementInternals' API
7760
7800
  constructor() {
7761
7801
  super(), this.id = "", this.name = "", this._type = "text", this.label = "", this.description = "", this.placeholder = "", this.value = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.optional = !1, this._tooltip = "", this.form = null, this.pattern = "", this.maxlength = null, this.width = "full", this.step = null, this.min = null, this.max = null, this.inverted = !1, this.showError = !1, this.errorMessage = "", this.showPassword = !1, this._originalErrorMessage = "", this._hasUserInteracted = !1, this._maskPatterns = {
@@ -7766,7 +7806,7 @@ const v = (R = class extends y {
7766
7806
  return this._type;
7767
7807
  }
7768
7808
  set type(e) {
7769
- this._type = R.VALID_TYPES.includes(
7809
+ this._type = N.VALID_TYPES.includes(
7770
7810
  e
7771
7811
  ) ? e : "text";
7772
7812
  }
@@ -7782,7 +7822,7 @@ const v = (R = class extends y {
7782
7822
  }
7783
7823
  // Ensure the "width" property is valid after updates
7784
7824
  async updated(e) {
7785
- if (e.has("width") && (await Promise.resolve(), this.width = R.VALID_WIDTHS.includes(this.width) ? this.width : "full"), e.has("disabled") && (this._validateButtonSlot("startButton"), this._validateButtonSlot("endButton")), e.has("type")) {
7825
+ if (e.has("width") && (await Promise.resolve(), this.width = N.VALID_WIDTHS.includes(this.width) ? this.width : "full"), e.has("disabled") && (this._validateButtonSlot("startButton"), this._validateButtonSlot("endButton")), e.has("type")) {
7786
7826
  const t = this._maskPatterns[this.type], o = this.shadowRoot?.querySelector("input");
7787
7827
  if (o)
7788
7828
  if (t)
@@ -7980,7 +8020,7 @@ const v = (R = class extends y {
7980
8020
  </div>
7981
8021
  `;
7982
8022
  }
7983
- }, R.VALID_TYPES = [
8023
+ }, N.VALID_TYPES = [
7984
8024
  "email",
7985
8025
  "number",
7986
8026
  "password",
@@ -7988,7 +8028,7 @@ const v = (R = class extends y {
7988
8028
  "tel",
7989
8029
  "text",
7990
8030
  "url"
7991
- ], R.VALID_WIDTHS = ["sm", "md", "lg", "full"], R.styles = Ut, R.formAssociated = !0, R);
8031
+ ], N.VALID_WIDTHS = ["sm", "md", "lg", "full"], N.styles = Ut, N.formAssociated = !0, N);
7992
8032
  f([
7993
8033
  r({ type: String })
7994
8034
  ], v.prototype, "id", 2);
@@ -8331,12 +8371,12 @@ const jt = u`
8331
8371
  }
8332
8372
  }
8333
8373
  `;
8334
- var Gt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, N = (a, e, t, o) => {
8374
+ var Gt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, F = (a, e, t, o) => {
8335
8375
  for (var s = o > 1 ? void 0 : o ? Yt(e, t) : e, n = a.length - 1, i; n >= 0; n--)
8336
8376
  (i = a[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
8337
8377
  return o && s && Gt(e, t, s), s;
8338
8378
  };
8339
- let Kt = 0;
8379
+ let Wt = 0;
8340
8380
  var ee;
8341
8381
  const U = (ee = class extends y {
8342
8382
  // allows use of elementInternals' API
@@ -8353,7 +8393,7 @@ const U = (ee = class extends y {
8353
8393
  }
8354
8394
  // Generate a unique ID if one is not provided
8355
8395
  connectedCallback() {
8356
- super.connectedCallback(), this.id || (this.id = `nys-toggle-${Date.now()}-${Kt++}`);
8396
+ super.connectedCallback(), this.id || (this.id = `nys-toggle-${Date.now()}-${Wt++}`);
8357
8397
  }
8358
8398
  /********************** Form Integration **********************/
8359
8399
  // Update the internals whenever `checked` or `value` changes.
@@ -8425,41 +8465,41 @@ const U = (ee = class extends y {
8425
8465
  `;
8426
8466
  }
8427
8467
  }, ee.VALID_SIZES = ["sm", "md"], ee.styles = jt, ee.formAssociated = !0, ee);
8428
- N([
8468
+ F([
8429
8469
  r({ type: String })
8430
8470
  ], U.prototype, "id", 2);
8431
- N([
8471
+ F([
8432
8472
  r({ type: String, reflect: !0 })
8433
8473
  ], U.prototype, "name", 2);
8434
- N([
8474
+ F([
8435
8475
  r({ type: String })
8436
8476
  ], U.prototype, "value", 2);
8437
- N([
8477
+ F([
8438
8478
  r({ type: String })
8439
8479
  ], U.prototype, "label", 2);
8440
- N([
8480
+ F([
8441
8481
  r({ type: String })
8442
8482
  ], U.prototype, "description", 2);
8443
- N([
8483
+ F([
8444
8484
  r({ type: String, reflect: !0 })
8445
8485
  ], U.prototype, "form", 2);
8446
- N([
8486
+ F([
8447
8487
  r({ type: Boolean, reflect: !0 })
8448
8488
  ], U.prototype, "checked", 2);
8449
- N([
8489
+ F([
8450
8490
  r({ type: Boolean, reflect: !0 })
8451
8491
  ], U.prototype, "disabled", 2);
8452
- N([
8492
+ F([
8453
8493
  r({ type: Boolean })
8454
8494
  ], U.prototype, "noIcon", 2);
8455
- N([
8495
+ F([
8456
8496
  r({ type: Boolean, reflect: !0 })
8457
8497
  ], U.prototype, "inverted", 2);
8458
- N([
8498
+ F([
8459
8499
  r({ reflect: !0 })
8460
8500
  ], U.prototype, "size", 1);
8461
- let Wt = U;
8462
- customElements.get("nys-toggle") || customElements.define("nys-toggle", Wt);
8501
+ let Kt = U;
8502
+ customElements.get("nys-toggle") || customElements.define("nys-toggle", Kt);
8463
8503
  const Xt = u`
8464
8504
  :host {
8465
8505
  /* Global Tooltip Styles */
@@ -8617,7 +8657,7 @@ const Xt = u`
8617
8657
  }
8618
8658
  }
8619
8659
  `;
8620
- var Qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, Le = (a, e, t, o) => {
8660
+ var Qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, Se = (a, e, t, o) => {
8621
8661
  for (var s = o > 1 ? void 0 : o ? Jt(e, t) : e, n = a.length - 1, i; n >= 0; n--)
8622
8662
  (i = a[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
8623
8663
  return o && s && Qt(e, t, s), s;
@@ -8814,22 +8854,22 @@ const t1 = class t1 extends y {
8814
8854
  };
8815
8855
  t1.styles = Xt;
8816
8856
  let se = t1;
8817
- Le([
8857
+ Se([
8818
8858
  r({ type: String })
8819
8859
  ], se.prototype, "id", 2);
8820
- Le([
8860
+ Se([
8821
8861
  r({ type: String })
8822
8862
  ], se.prototype, "text", 2);
8823
- Le([
8863
+ Se([
8824
8864
  r({ type: Boolean, reflect: !0 })
8825
8865
  ], se.prototype, "inverted", 2);
8826
- Le([
8866
+ Se([
8827
8867
  r({ type: Boolean, reflect: !0 })
8828
8868
  ], se.prototype, "focusable", 2);
8829
- Le([
8869
+ Se([
8830
8870
  $()
8831
8871
  ], se.prototype, "_active", 2);
8832
- Le([
8872
+ Se([
8833
8873
  r({ type: String, reflect: !0 })
8834
8874
  ], se.prototype, "position", 1);
8835
8875
  customElements.get("nys-tooltip") || customElements.define("nys-tooltip", se);
@@ -9134,7 +9174,7 @@ const ts = u`
9134
9174
  flex-direction: column;
9135
9175
  }
9136
9176
 
9137
- #nys-unavheader__translate:not([circle]),
9177
+ #nys-unavheader__translate--desktop,
9138
9178
  #nys-unavheader__searchbar {
9139
9179
  display: none;
9140
9180
  }
@@ -9277,16 +9317,14 @@ const s1 = class s1 extends y {
9277
9317
  _getNysLogo() {
9278
9318
  return new DOMParser().parseFromString(ss, "image/svg+xml").documentElement;
9279
9319
  }
9280
- _toggleTrustbar() {
9281
- this.trustbarVisible = !this.trustbarVisible, this.trustbarVisible ? (this.languageVisible = !1, this.searchDropdownVisible = !1, this.updateComplete.then(() => {
9282
- this.shadowRoot?.getElementById(
9283
- "nys-unavheader__closetrustbar"
9284
- )?.focus();
9285
- })) : this.updateComplete.then(() => {
9286
- this.shadowRoot?.getElementById(
9287
- "nys-unavheader__know--inline"
9288
- )?.focus();
9289
- });
9320
+ _toggleTrustbar(e) {
9321
+ if (this.trustbarVisible = !this.trustbarVisible, this.trustbarVisible && (this.languageVisible = !1, this.searchDropdownVisible = !1), e === "no focus") return;
9322
+ if (e === "nys-unavheader__know--inline" || !e) {
9323
+ const o = this.trustbarVisible ? "nys-unavheader__closetrustbar" : "nys-unavheader__know--inline";
9324
+ this.updateComplete.then(() => {
9325
+ this.shadowRoot?.getElementById(o)?.focus();
9326
+ });
9327
+ }
9290
9328
  }
9291
9329
  _toggleLanguageList() {
9292
9330
  this.languageVisible = !this.languageVisible, this.languageVisible && (this.trustbarVisible = !1, this.searchDropdownVisible = !1);
@@ -9326,7 +9364,9 @@ const s1 = class s1 extends y {
9326
9364
  <header class="nys-unavheader">
9327
9365
  <div
9328
9366
  class="nys-unavheader__trustbar wrapper"
9329
- @click="${this._toggleTrustbar}"
9367
+ @click="${(e) => {
9368
+ e.target.closest("nys-button") || this._toggleTrustbar("no focus");
9369
+ }}"
9330
9370
  >
9331
9371
  <div class="content">
9332
9372
  <label id="nys-unavheader__official"
@@ -9339,8 +9379,8 @@ const s1 = class s1 extends y {
9339
9379
  variant="ghost"
9340
9380
  size="sm"
9341
9381
  suffixIcon="slotted"
9342
- @keydown="${(e) => {
9343
- (e.code === "Enter" || e.code === "Space" || e.key === "Enter" || e.key === " ") && this._toggleTrustbar();
9382
+ @nys-click="${(e) => {
9383
+ e.preventDefault(), e.stopPropagation(), this._toggleTrustbar("nys-unavheader__know");
9344
9384
  }}"
9345
9385
  >
9346
9386
  <nys-icon
@@ -9364,7 +9404,7 @@ const s1 = class s1 extends y {
9364
9404
  icon="close"
9365
9405
  size="sm"
9366
9406
  ariaLabel="Close this notice"
9367
- @nys-click="${this._toggleTrustbar}"
9407
+ @nys-click="${() => this._toggleTrustbar("nys-unavheader__know--inline")}"
9368
9408
  ></nys-button>
9369
9409
  <div class="nys-unavheader__messagewrapper">
9370
9410
  <div
@@ -9414,7 +9454,7 @@ const s1 = class s1 extends y {
9414
9454
  variant="ghost"
9415
9455
  size="sm"
9416
9456
  suffixIcon="slotted"
9417
- @nys-click="${this._toggleTrustbar}"
9457
+ @nys-click="${() => this._toggleTrustbar("nys-unavheader__know--inline")}"
9418
9458
  >
9419
9459
  <nys-icon
9420
9460
  slot="suffix-icon"
@@ -9706,7 +9746,7 @@ const rs = u`
9706
9746
  font-weight: var(--_nys-globalheader-font-weight);
9707
9747
  line-height: var(--_nys-globalheader-line-height);
9708
9748
  letter-spacing: var(--_nys-globalheader-letter-spacing);
9709
- text-wrap: wrap;
9749
+ overflow-wrap: break-word; /* note: we use this bc text-wrap: wrap; is not a standard CSS property (yet). */
9710
9750
  }
9711
9751
 
9712
9752
  .nys-globalheader__agencyName {
@@ -9868,7 +9908,7 @@ const rs = u`
9868
9908
  }
9869
9909
  }
9870
9910
  `;
9871
- var ns = Object.defineProperty, He = (a, e, t, o) => {
9911
+ var ns = Object.defineProperty, Ae = (a, e, t, o) => {
9872
9912
  for (var s = void 0, n = a.length - 1, i; n >= 0; n--)
9873
9913
  (i = a[n]) && (s = i(e, t, s) || s);
9874
9914
  return s && ns(e, t, s), s;
@@ -9901,18 +9941,18 @@ const o1 = class o1 extends y {
9901
9941
  t.forEach((i) => {
9902
9942
  if (i.nodeType === Node.ELEMENT_NODE) {
9903
9943
  const c = i.cloneNode(!0), p = i.cloneNode(!0);
9904
- ["script", "iframe", "object", "embed, img"].forEach((F) => {
9905
- c.querySelectorAll(F).forEach((j) => j.remove());
9944
+ ["script", "iframe", "object", "embed, img"].forEach((j) => {
9945
+ c.querySelectorAll(j).forEach((T) => T.remove());
9906
9946
  });
9907
- const V = (F) => {
9908
- const j = Array.from(F.querySelectorAll("a"));
9909
- let Se = {
9947
+ const V = (j) => {
9948
+ const T = Array.from(j.querySelectorAll("a"));
9949
+ let Le = {
9910
9950
  li: null,
9911
9951
  length: 0
9912
9952
  };
9913
- j.forEach((Ae) => {
9914
- const h1 = Ae.getAttribute("href"), $e = this._normalizePath(h1);
9915
- $e && ($e === "/" && n === "/" ? Se = { li: Ae.closest("li"), length: 1 } : n?.startsWith($e) && $e.length > Se.length && (Se = { li: Ae.closest("li"), length: $e.length }), j.forEach((y1) => y1.closest("li")?.classList.remove("active")), Se.li?.classList.add("active"));
9953
+ T.forEach((He) => {
9954
+ const i1 = He.getAttribute("href"), $e = this._normalizePath(i1);
9955
+ $e && ($e === "/" && n === "/" ? Le = { li: He.closest("li"), length: 1 } : n?.startsWith($e) && $e.length > Le.length && (Le = { li: He.closest("li"), length: $e.length }), T.forEach((y1) => y1.closest("li")?.classList.remove("active")), Le.li?.classList.add("active"));
9916
9956
  });
9917
9957
  };
9918
9958
  V(c), V(p), o.appendChild(c), s.appendChild(p), i.remove();
@@ -10011,19 +10051,19 @@ const o1 = class o1 extends y {
10011
10051
  };
10012
10052
  o1.styles = rs;
10013
10053
  let ye = o1;
10014
- He([
10054
+ Ae([
10015
10055
  r({ type: String })
10016
10056
  ], ye.prototype, "appName");
10017
- He([
10057
+ Ae([
10018
10058
  r({ type: String })
10019
10059
  ], ye.prototype, "agencyName");
10020
- He([
10060
+ Ae([
10021
10061
  r({ type: String })
10022
10062
  ], ye.prototype, "homepageLink");
10023
- He([
10063
+ Ae([
10024
10064
  $()
10025
10065
  ], ye.prototype, "slotHasContent");
10026
- He([
10066
+ Ae([
10027
10067
  $()
10028
10068
  ], ye.prototype, "isMobileMenuOpen");
10029
10069
  customElements.get("nys-globalheader") || customElements.define("nys-globalheader", ye);
@@ -10515,7 +10555,7 @@ export {
10515
10555
  pt as NysModal,
10516
10556
  de as NysOption,
10517
10557
  ce as NysPagination,
10518
- Lt as NysRadiobutton,
10558
+ St as NysRadiobutton,
10519
10559
  mt as NysRadiogroup,
10520
10560
  zt as NysSelect,
10521
10561
  Ee as NysSkipnav,
@@ -10523,7 +10563,7 @@ export {
10523
10563
  he as NysStepper,
10524
10564
  Ot as NysTextarea,
10525
10565
  Ft as NysTextinput,
10526
- Wt as NysToggle,
10566
+ Kt as NysToggle,
10527
10567
  se as NysTooltip,
10528
10568
  Oe as NysUnavFooter,
10529
10569
  Y as NysUnavHeader